MATLAB How Do You Solve a 2nd Order ODE Using Matlab?

AI Thread Summary
The discussion revolves around solving a second-order ordinary differential equation (ODE) using MATLAB. The equation describes a system involving matrices for mass, damping, and stiffness, specifically for a Tuned Liquid Column Damper. Participants emphasize the need to convert the second-order ODE into a first-order system to facilitate solving it in MATLAB. This involves defining new variables for the first derivatives, such as u for x-dot and v for y-dot, leading to a system of four first-order equations. Clarifications are sought regarding the representation of zeros in the matrices and how to properly format the equations for MATLAB implementation. Overall, the focus is on transforming the original equation into a solvable format within MATLAB's framework.
amir99civil
Messages
3
Reaction score
0
Dear All,

I have a Problem about a 2nd order ode. I don't know how it can be solved with Matlab. If someone know about it then please let me know. I need to get the values of x & y. All other values are known.

The equation is:

[ M + mf mf
mf mf ][ ¨x
¨y ]+
[ C 0
0 cf ][ x˙
y˙ ]+[ K 0
0 kf][ x
y ] = [ Fe(t)
0 ]

Thanks Alot
 
Physics news on Phys.org
you are going to have to make the equation more clear. What are all the 0s? Try to put it up in tex.
 
I think this is how it's supposed to look:
\left(<br /> \begin{array}{cc}<br /> M + m_f &amp; m_f \\<br /> m_f &amp; m_f<br /> \end{array}<br /> \right)<br /> \left(<br /> \begin{array}{cc}<br /> \ddot{x} \\<br /> \ddot{y}<br /> \end{array}<br /> \right) +<br /> \left(<br /> \begin{array}{cc}<br /> C &amp; 0 \\<br /> 0 &amp; c_f<br /> \end{array}<br /> \right)<br /> \left(<br /> \begin{array}{cc}<br /> x\\<br /> y<br /> \end{array}<br /> \right) +<br /> \left(<br /> \begin{array}{cc}<br /> K &amp; 0 \\<br /> 0 &amp; k_f<br /> \end{array}<br /> \right) =<br /> \left(<br /> \begin{array}{cc}<br /> F_{e}(t)\\<br /> 0<br /> \end{array}<br /> \right)

I don't know how to use MATLAB to solve it, though.
 
Last edited:
There should be an \dot{x} after the damping terms (c's) and an x after the stiffness terms (k's)...

For the simulation, first write it in first-order form.

It's quite simple to solve this forced msk system as an IVP in Matlab, check the help files on odes...

:smile:
 
yes. This is an equation of motion for a Tuned Liquid Column Damper with (xdot & ydot) after damping terms and (x & y) after the stiffness matrix.I don't know how i can handle the matrics if i change it to first order. If you know something then please explain a little more about the problem. How to handle the matrics to get a first order system.

The zeros 0s are 0.There is no entry where there is zero.
 
Write:

u=\dot{x} and v=\dot{y}

then...

\dot{u}=\ddot{x} and \dot{v}=\ddot{y}

ie. you now have 4 first-order equations.
 

Similar threads

Back
Top