Finding the eigenvalues and eigenvectors with the system response
9 views (last 30 days)
Show older comments
A 2 degree of freedom (2 DOF) system with 3 springs only is given. I am little bit confused to write the codes. I would be glad for some help.
[ 1 0 𝒙̈(𝑡) + [ 12 −2 x(𝑡) = 0 and 𝒙̇(0) = 0 , 𝒙(0) = [1 1]^𝑇
0 4] 2 12]
So here, m1=1 and m2=4 while k1=k3=10 and k2=2. But I do not know why my code is wrong.
0 Comments
Answers (1)
Saarthak Gupta
on 15 Dec 2023
Edited: Saarthak Gupta
on 26 Dec 2023
Hi Joni,
I understand you wish to solve a spring-mass system consisting of two masses and three springs.
The equations of motion of such a system are typically described using differential of Lagrangian of the system as follows:
Using the values of masses and spring constants in your problem and the above formula, K evaluates to
[-12 2; 0.5 -3]
However, after rearranging your differential equation, K evaluates to
inv([1 0; 0 4]) * [-12 2; -2 -12]
which in turn evaluates to
[-12 2; -0.5 -3]
It appears there is a discrepancy in the sign of the matrix's third entry. The correct value should be 0.5, whereas your calculation resulted in -0.5. This error might stem from an incorrect sign in the third term of the coefficient matrix of x(t), leading to an incorrect evaluation.
Consider changing the coefficient matrix of x(t) in your differential equation to
[-12 2; 2 -12]
Once the correction has been made, finding the solution is a straightforward task. The second order equation can be reduced to a system of first order equations which can be solved by an appropriate ODE solver, like “ode45”. Refer to the examples in the documentation of “ode45” (attached below) for a step-by-step approach.
Please refer to the following documentations for further reference:
Hope this helps!
Best regards,
Saarthak
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!