28 views (last 30 days)

Show older comments

Equations of motion for a 2D mass spring damper system and code for modelling on matlab needed.

William Rose
on 24 May 2021

The equation of motion for a M-S-D system may be written as

where is a position vector, is frictional drag, is spring force, and is the external force (if any). may have 1 or 2 or 3 dimension (or more, I suppose). We assume that the spring pulls the object directly toward the origin, with a force proportional to the distance from the origin, and that frictional drag is the direction oppostite to the velocity, and proportional to the magnitude of velocity. These assumptions can be written as

and

Therefore we get the equation

In the 2-D case, we have, in the x-direction,

which looks totally normal. It involves the x-components of the spring force and the drag force. But here's where it gets tricky and then simple again. What are the equations for and ? It turns out the equations are

and

So we end up with

You get a similar result for the y-component:

So we see that for this special case - a linear mass-spring-dashpot system - the x- and y-parts do not affect each other, i.e. the equations of motion are totally separable. These two equations are what you need to solve. Since they are not coupled, you can solve them separately, in either order.

William Rose
on 27 May 2021

The system in the image you attached is obviously a lot more complicated. Masses m1 and m3 have 6 attached elements and therefore 6 forces. Each force may have x- an y-components. Masses m2 and m4 have 4 attached elements and therefore 4 forces. For m1:

where are the x and y components of the spring force from the wall acting on m1. are the x and y components of the dashpot force from the wall acting on m1. And so on. You will need geometry and calculus and physics to express each spring force and each dashpot force in terms of the x,y coordinates of the masses. If you want to solve the system in Matlab, you will need to convert the second order differetial equations above to coupled first order differential equations. Each mass will have four state variables. For m1, the state variables are . Likewise for the other three masses. So the state vector for the whole system will have 16 elements. This is explained well, and with examples, in the Matlab help on solving ordinary differential equations.

The attached document shows how each of the twelve forces above (on the right hand side of the equations) can be expressed in terms of the state varibles , etc. It also explains how to compute all the other forces that you need to solve the system.

William Rose
on 24 May 2021

The equation of motion for a M-S-D system may be written as

where is a position vector, is frictional drag, is spring force, and is the external force (if any). may have 1 or 2 or 3 dimension (or more, I suppose). We assume that the spring pulls the object directly toward the origin, with a force proportional to the distance from the origin, and that frictional drag is the direction oppostite to the velocity, and proportional to the magnitude of velocity. These assumptions can be written as

and

Therefore we get the equation

In the 2-D case, we have, in the x-direction,

which looks totally normal. It involves the x-components of the spring force and the drag force. But here's where it gets tricky and then simple again. What are the equations for and ? It turns out the equations are

and

So we end up with

You get a similar result for the y-component:

So we see that for this special case - a linear mass-spring-dashpot system - the x- and y-parts do not affect each other, i.e. the equations of motion are totally separable. These two equations are what you need to solve. Since they are not coupled, you can solve them separately, in either order.

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

Start Hunting!