Solving differential equation system with time dependent condition ?
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hey everyone,
I am trying to solve a system of differential equation using ode function.
My questions about it are the following:
- how to choose the right ode function to use ?
- the tricky part is that I need to set some of the state as a time-dependent function (sin(t) here), there are some explanation about time-dependent coefficient but I found nothing on time-dependent function for state.
Basically I need to impose a trajectory on two states and keeping the other at 0, compute the control u and use it in a cost function to be minimized, giving me the best angle to use for the propeller (alpha & beta).
For information here is my system: p(t) vector of position (x,y,z) (p_dot, p_dot_dot derivative), R(t) vector of angle (phi,theta,psi) (w speed angle vector, w_dot acceleration angle vector). It's about a drone with six propellers (u is control vector of the speed of rotation of the propeller)
w_dot = -inv(J)*cross(w,J*w)+inv(J)*F2*u
p_dot_dot= [0;0;-g] + (1/M)*wRb*F1*u
F1,F2,J are constant matrix, wRb a rotation matrix changing with orientation state R(t)
Thanks in advance, don't hesitate to ask for further detail if need
(PS: I put my different file in joint-file, as a french guy the name can be confusing so here are the translation:
optimisation = optimization (main file)
contrainte = constraint (non-linear constraint file)
wrench = the file enabling me to compute the control u from the solution of equation
dynamique = dynamic (file describing the system of equation)
solveur = solver (the function calling the ode function)
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Ordinary Differential Equations finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!