How to simulate nonlinear stochastic delay differential equations?

4 views (last 30 days)
Hi,
is it possible to simulate nonlinear stochastic delay differential equations with additive noise using Simulink? The one I'm working with is an inverted pendulum with two PD-controllers ("A model of Postural Control in Quiet Standing: Robust Compensation of Delay-Induced Instability Using Intermittent Activation of Feedback Control" (Asai et al. 2009)). The other controller has time delay in input and works only when certain criteria is met. This is the equation:
I*A''(t)=m*g*h*A(t)-[P1*A(t)+D1*A'(t)+f1(A(t-d))+f2(A'(t-d))]+s*N(t),
f1(A(t-d))=P2*A(t-d) & f2(A'(t-d))=D2*A'(t-d), when A(t-d)*[A'(t-d)-a*A(t-d)]>0 and f1(A(t-d))=0 & f2(A'(t-d))=0 otherwise.
A(t) is the pendulum angle, I,m,g,h,s,P1,D1,P2,D2,a are constants, N(t) is Gaussian noise (mean=0, variance=1), t is time and d is time delay.
After some reformulation I believe this is what should be simulated:
x(n+1)=x(n)+f(x(n),x(n-k))dt+s*N(n)*sqrt(dt)
k=d/dt. The initial state is x0=[A(0),A'(0)]=[0.01,0]. (In the paper d was '\Delta' and dt was '\Deltat'.)
Apparently the sqrt(dt) instead of just dt is the key problem here. I can simulate this without noise in Simulink. If I understood correctly I cannot just add a Gaussian noise block multiplied by s*sqrt(dt). If this is not doable with noise in Simulink, any hint about how to make this happen is appreciated.
Thank you, Aino

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!