question about coding a delay function for ddesd

Hello everyone
I am working on a state dependent time delay - delay differential equation problem where my delay is defined as [x(t) - x(t-tau) = constant]
I am trying to sove it with ddesd but am not sure how to code this delay function
thanks and regards

9 Comments

Include your delay differential equation.
the full system of equations goes like this
x3(t) - x3(t-tau) = constant
Delay term = (x1(t) - x1(t-tau)
system of equations= x(2)
- (Delay term *x(2) + Delay term * x(4)) - (C1 * x(2)) - (C2 * x(1)) + C3*t
x(3)
-(Delay term *x(2) + Delay term * x(4)) - (C4 * x(4)) - (C5 * x(3)) + C6*t)]
And you say tau depends on the state variables - how is it calculated ?
It is calculated through intepolating with the time index
x3 minus the constant will give you x3 (t-tau) through interpolatin we get t- tau and then we interpolate again with x1 to get x1 (t-tau)
You don't need to do this interpolation - the delay solver does this.
The only question is: is "tau" a constant during the integration or does it change with x1, x2, x3 or t ?
By the way: The condition x3(t) - x3(t-tau) = constant already fixes x3(t) for all t. So you cannot define it a second time by a differential equation.
Tau changes as x3 changes
So you start with the history of states and based on how far x3 has progressed tau changes to keep the x3(t) - x3 (t-tau) constant
You prescribe x3 for -tau <= t < 0 as the history of x3.
Then, by the condition x3(t) = x3(t-tau) + constant, x3 is uniquely determined for t >=0. No differential equation for x3 is needed.
I had a mistake on the equations earlier the proper equations should be
x3(t) - x3(t-tau) = constant
Delay term = (x1(t) - x1(t-tau)
system of equations= x(2)
- (Delay term *x(2) + Delay term * x(4)) - (C1 * x(2)) - (C2 * x(1)) + C3*t
x(4)
-(Delay term *x(2) + Delay term * x(4)) - (C4 * x(4)) - (C5 * x(3)) + C6*t)]
in this system of equations x3 is a position and x4 is a velocity
the delay term couples them to x1 ( also a position) and x2 (a velocity)
sorry for the confusion
I doesn't change my answer.
You can't write a differential equation and an algebraic relation for x3 because using both will lead to a contradiction.

Sign in to comment.

Answers (0)

Asked:

on 11 Jun 2022

Commented:

on 12 Jun 2022

Community Treasure Hunt

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

Start Hunting!