# First order ODE with input delay

**URL:** <https://discourse.julialang.org/t/first-order-ode-with-input-delay/65231>\
**Category:** General Usage\
**Tags:** turing\
**Created:** [July 24, 2021, 12:08pm UTC](https://discourse.julialang.org/t/first-order-ode-with-input-delay/65231 "2021-07-24T12:08:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fabian](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fabian/32/25015_2.png) [@Fabian](https://discourse.julialang.org/u/Fabian)\
**Post date:** [July 24, 2021, 12:08pm UTC](https://discourse.julialang.org/t/first-order-ode-with-input-delay/65231/1 "2021-07-24T12:08:52Z")

</div>

Hi,  
I am new to Julia / Turing.jl and wondering if it is possible to estimate the affine parameters a,b of the following model.  
The model is a stochastic differential equation (SDE) of first order with variable input delay T\_d in the external control input u\_1(t) (control engineering nomenclature):

T\dot{x} =x+ u\_1(t-Td) + \epsilon  
T\_d(t) = a + bu\_2(t)

with \epsilon being white, Gaussian noise.  
I have time-discrete measurements of x(t). The external inputs u\_1(t),u\_2(t) are known as well.

I have seen SDE in DifferentialEquations.jl but I am not sure, if time-dependent delays are possible.

Thanks.

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [July 24, 2021, 7:18pm UTC](https://discourse.julialang.org/t/first-order-ode-with-input-delay/65231/2 "2021-07-24T19:18:05Z")

</div>

That’s a stochastic delay differential equation.

[https://diffeq.sciml.ai/stable/types/sdde\_types/](https://diffeq.sciml.ai/stable/types/sdde_types/)
