Numerical solution to coupled non linear differential equations

3 vues (au cours des 30 derniers jours)
Atharv
Atharv le 25 Fév 2025
Commenté : James Tursa le 25 Fév 2025
Consider coupled robot dynamic equations for robots with joint stiffness:
M(q)q_pd + V(q,q_p) + G(q) = K(theta-q)
J*theta_pd = Tm - K(theta-q);
describing a 3DOF robot, Im intrested in determing the angular positions,velocities and accelarations of the links and the motors given the Tm or torque to motors. How can ODEs be used for the same.
  2 commentaires
Steven Lord
Steven Lord le 25 Fév 2025
What difficulties are you having solving these differential equations? If you're not sure how to use the ODE solvers or how to set up the functions necessary to use the ODE solvers, I suggest trying out the Solve ODE live editor task. This allows you to select the equation that looks like the system of ODEs that you're trying to solve (in this case, since your mass matrix only depends on the "time" variable q, that would be the third button.) Then you can ask MATLAB to create template local functions that you can fill in to define the mass matrix function and the ODE function.
James Tursa
James Tursa le 25 Fév 2025
@Atharv Instead of the text version of the differential equations you posted, it would be easier for the readers if you simply posted an image of the differential equations.

Connectez-vous pour commenter.

Réponses (1)

Sam Chak
Sam Chak le 25 Fév 2025
Modifié(e) : Sam Chak le 25 Fév 2025
Although I don't understand your robotic dynamics, but based on your ODEs, I see that is present in the highest order derivative. Therefore, you need to specify the mass matrix in the odeset() function and declare it as a state-dependent mass matrix using the Name=Value structure, such as MStateDependence='strong' or MStateDependence='weak', as part of the options structure for the ode45() solver.

Produits


Version

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by