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!

