Second order differential equation with large matrices
古いコメントを表示
Greetings,
I am tryig to solve this differential equation M * q'' + K * q= - K_d * q' - K_p * (q - q_d) where M is a 15x15 matrix, q is 15x1 vector, K is a 15x15 matrix, K_d and K_p are 15x15 known matrices and q_d is a 15x1 vector which is also known. q'' is a second time derivative. Which solver is the most applicable for this equation? and is there way to solve this in a matrix form and not expand the whole equation. Thanks in advance.
6 件のコメント
David Togonidze
2022 年 12 月 4 日
Jan
2022 年 12 月 5 日
As Torsten has explained alreayd, rewrite to 2nd order ODE to a system of order 1 equations. You can use matrices to evaluate this system. This is one of the fundamental design ideas of Matlab. Simply write the system as matrix equation.
David Togonidze
2022 年 12 月 6 日
David Togonidze
2022 年 12 月 10 日
One question guys. Let's say matrix M is not constant and is dependent on q, so at every time step M changes accordingly to the values of q calculated at previous time step (starting from initial condition q0). How can i incorporate that into the odesystem function for ode45 solver? Thank you in advance
By dividing through M (assuming M is non-singular):
q'' = M \ (- K * q - K_d * q' - K_p * (q - q_d) )
If M is singular, define M as mass-matrix for the ODE solver in the options-structure and use ode15s or ode23t instead of ode45.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Stability Analysis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

