Delay Differential Equations System of equations

62 Views Asked by At

I need some help with

  1. Confirmation my system of equations truly is a DDE system and
  2. Any insight into users who have solved state dependent DDE systems (either using matlab ddesd or could recommend a scheme maybe like a modified RK ect)

Find below my system of equations - typical Newton Euler representation of a single rigid body. In my implementation I simply solved for the derivatives in each equation to form a system of ODE's and use matlab ode45 for constant force and moment terms.

\begin{equation} \begin{aligned} F_x &= m \left(\dot{u} + \omega_{y_{\bar{B}}} w - \omega_{z_{\bar{B}}} v \right) \\ F_y &= m \left(\dot{v} + \omega_{z_{\bar{B}}} u - \omega_{x_{\bar{B}}} w \right) \\ F_z &= m \left(\dot{w} + \omega_{x_{\bar{B}}} v - \omega_{y_{\bar{B}}} u \right) \\ u &= \left(\dot{x}_{\bar{B}} + \omega_{y_{\bar{B}}} z_{\bar{B}} - \omega_{z_{\bar{B}}} y_{\bar{B}}\right) \\ v &= \left(\dot{y}_{\bar{B}} + \omega_{z_{\bar{B}}} x_{\bar{B}} - \omega_{x_{\bar{B}}} z_{\bar{B}}\right) \\ w &= \left(\dot{z}_{\bar{B}} + \omega_{x_{\bar{B}}} y_{\bar{B}} - \omega_{y_{\bar{B}}} x_{\bar{B}}\right) \\ M_x &= I_{B_{xx}}\dot{\omega}_x - \left(I_{B_{yy}} - I_{B_{zz}}\right)\omega_y\omega_z \\ M_y &= I_{B_{yy}}\dot{\omega}_y - \left(I_{B_{zz}} - I_{B_{xx}}\right)\omega_z\omega_x \\ M_z &= I_{B_{zz}}\dot{\omega}_z - \left(I_{B_{xx}} - I_{B_{yy}}\right)\omega_x\omega_y \\ \omega_{x_{\bar{B}}} &= \dot{\phi} -\dot{\psi}\sin{\theta}\\ \omega_{y_{\bar{B}}} &= \dot{\theta}\cos{\phi} + \dot{\psi}\sin{\phi}\cos{\theta}\\ \omega_{z_{\bar{B}}} &= \dot{\psi}\cos{\phi}\cos{\theta} - \dot{\theta}\sin{\phi}\\ \end{aligned} \end{equation}

My next iteration of the problem is using non-constant force $F_x, F_y, F_z$ and moment $M_x, M_y, M_z$ terms that are dependent on the previous state.
I believe this makes the set of equations DDE is this correct?

I've tried to implement this in matlab using ddesd and have done so incorrectly because my history function is overwriting (if I zero out my force and moment terms for debugging) or acting as a multiplicative factor to the returned values from my delay functions. I've already posted on Matlabs forums with not much success yet. Any suggestions, pointers? Thank you.