How to plot this (time delayed) system in matlab?

1 次查看(过去 30 天)
I have a time delayed state space model like this...!
dx1/dt = x1(t) + x2(t) + x1(t-d(t)) +x2(t--d(t))
dx2/dt = 0.7*x1(t) + x2(t) + x1(t-d(t)) +0.5*x2(t--d(t))
where x(t-d(t)) is the delayed state.... and our delay is time variant given by d(t) = 3+2*cos(t)...
i know about dde23 but it's for time invariant delays...
i wrote a code like this....
function v=f(t,x)
v=zeros(2,1);
v(1) = x(1) + x(2);
v(2) = 0.7* x(1) + x(2);
Initial_Time=10;
Final_Time=5000;
[x1,x2] = meshgrid(-2:0.1:2);
[t,x] = ode45(@v, [Initial_Time Final_Time], [0.01624 0.1535]);
plot(x(:,1),x(:,2))
this code is without adding time delay... will someone help how to add time delay in this....?

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Classical Control Design 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by