Solution to the differential equation describing a mass-spring-damper

In summary, the general solution to the differential equation describing a mass-spring-damper can be written as x(t) = C1(e^pt)+C2(e^qt) + Mg/K. However, this solution will only describe oscillations if the damping coefficient C is less than the square root of 4 times the mass and spring constants. By taking the coefficient of x to unity, the equilibrium position becomes more obvious and the general solution can be written as x(t) = C1(e^pt)+C2(e^qt) + F(t)/k, where F(t) is the input to the system.
  • #1
CraigH
222
1
What is the general solution to the differential equation describing a mass-spring-damper?

t=time
x= extension of spring
M=Mass
K=Spring Constant
C=Damping Constant
g= acceleration due to gravity

Spring has 0 length under 0 tension
Spring has 0 extension at t = 0

If the Force downwards due to the mass equals:

Force downwards = M*g

And this is opposed by tension in the spring:

Force upwards = - K*x

And there is a 3rd force acting on the system caused by the damper. This allways acts in the opposite direction as velocity.

Force = - C*(dx/dt) //because damping is proportional to velocity.

So the overall force acting on the mass equals:

Net Force = M*g - K*x - C*(dx/dt)

This net force causes an acceleration in the direction of the force:
F=Ma so...

M*(d2x/dt2) = M*g - K*x - C*(dx/dt)

\\you can see that this will oscillate, because when x is 0 the acceleration will be positive, when M*g= K*x + C*(dx/dt), the acceleration will be 0, and then become negative, and then the velocity will become 0, and then negative, and then the x will become 0 again, and it will repeat.

So the differential equation describing this system is:

M*(d2x/dt2) + C*(dx/dt) + K*x = Mg

Mx''+Cx'+Kx=Mg

This is a second order linear non homogeneous differential equation.
Mx''+Cx'+Kx=g(t)
where g(t) is a constant.

Now my question is, how do I solve it for x?

I tried using the undetermined coefficients method, but I do not get an equation that implies that x is oscillating. Shouldn't I get a sin or cos somewhere in the answer?

Here is what I tried:

corresponding Homogeneous Equation:

Mx''+Cx'+Kx=0

characteristic equation = M*(r^2) + C*r + K

General solution to the homogeneous equation:

C1(e^pt)+C2(e^qt)
where
p=(-C+SQRT((C^2)-4*M*K))/2M
q=(-C-SQRT((C^2)-4*M*K))/2M //from the quadratic equation

Now to calculate the particular solution:

Mx''+Cx'+Kx=Mg

The right hand side is a polynomial of degree 0. try a polynomial as the solution

x=Ax^2 + Bx + C
x'=2Ax +B
x''=2A

Sub these into the differential equation and you end up with:

x=Mg/K

So the general solution to the differential equation is:

x(t) = C1(e^pt)+C2(e^qt) + Mg/K

This can't be correct, because x should oscillate over time.
C1, C2, p, q, ang Mg/K are all constants so this equation does not describe an oscillation.

Where did I go wrong?

Thanks!
 
Physics news on Phys.org
  • #2
Wow... Just realized how big that question is. Let me summarise for those who can't be bothered reading it.

What is the solution to this second order linear non homogeneous differential equation?

M*(d2x/dt2) + C*(dx/dt) + K*x = Mg

My answer is:

x(t) = C1(e^pt)+C2(e^qt) + Mg/K

But this is obviously wrong because it does not describe oscillations.
 
  • #3
CraigH said:
x(t) = C1(e^pt)+C2(e^qt) + Mg/K
But this is obviously wrong because it does not describe oscillations.
It will if p is complex, no?
 
  • #4
Damped Harmonic Oscillator.

1) Verify that if x(t) is solution to homogeneous DHO of the form x''+2ζωx'+ω²x=0, then x(t)+c is a solution of inhomogeneous DHO of the form x''+2ζωx'+ω²x=c. (The only requirement here is that the differential equation is linear.)

2) Realize that for your problem, c=Mg/k.

3) Use information on DHO from the article and other sources to help you find a solution.

(haruspex is certainly not wrong, by the way. But you'll hopefully figure it out.)
 
  • #5
haruspex said:
It will if p is complex, no?

Ahh interesting... So because p and q are:

p=(-C+SQRT((C^2)-4*M*K))/2M
q=(-C-SQRT((C^2)-4*M*K))/2M

The system will only oscillate If (4*M*K) > (C^2) ?

This makes sense, because C is the damping coefficients, and damping reduces oscillations.

Is this correct?
 
Last edited:
  • #6
K^2 said:
1) Verify that if x(t) is solution to homogeneous DHO of the form x''+2ζωx'+ω²x=0, then x(t)+c is a solution of inhomogeneous DHO of the form x''+2ζωx'+ω²x=c. (The only requirement here is that the differential equation is linear.)

2) Realize that for your problem, c=Mg/k.

Thank you for the link and information. All very helpful, however I cannot see how my equation:

Mx''+Cx'+Kx=Mg

can become

x''+2ζωx'+ω²x=Mg/k

If I try,

x''+ C/Mx' + K/Mx = g

And then I get stuck here
 
  • #7
Hah. Sorry. My bad. You need to take coefficient of x to unity, rather than that of x'' for the equilibrium position to become obvious.

Let me explain this from the beginning. Suppose you have a general inhomogeneous second order linear differential equation.

ax'' + bx' + cx = d

So let's say x is some solution of the inhomogeneous equation and y is solution to corresponding homogeneous equation.

ay'' + by' + cy = 0

Then the function (x+y) is a solution to the inhomogeneous equation as well.

a(x+y)'' + b(x+y)' + c(x+y) = ax'' + ay'' + bx' + by' + cx + cy = (ax'' + bx' + cx) + (ay'' + by' + cy) = d + 0 = d

The DHO article gives you general solution to homogeneous equation. You construct the inhomogeneous equation as you've done correctly. With DHO coefficients it looks like this.

x'' + 2ζωx' + ω²x = g

Now, we need just one solution. So we go after a trivial one. x = constant. That gives you x' = 0 and x'' = 0. In other words.

ω²x = g

Since ω² = m/k, this gives you x = mg/k, which is what you want. So the general solution to your diff eq is the general solution of DHO + mg/k.

This will agree with your solution once you compute p and q, but it might not be immediately obvious.
 
  • #8
Okay I'm starting to get this more now. Thank you for your time and help it is very much appreciated. This website and its users are amazing and I hope to return the favour once I am of a level where I am confident enough to answer other peoples posts :)

I have just one more question, then I should get this:

so I derived the differential equation describing the DHO

Mx'' + Cx' + Kx = Mg

Mg is a constant so I will call it F

Mx'' + Cx' + Kx = F

This is also the input to the system. (The input of this system is constant. It comes from the weight of the mass itself)
So I can write the system as

Mx'' + Cx' + Kx = F(t)

Put this in the standard form of a second order system. (use DHO coefficients)

x'' + (C/M)x' + (k/M)x = (1/M)F(t)
x'' + 2ζωx' + ω²x = AF(t)
where
2ζω = C/M
ω² = K/M
and the steady sate gain A = 1/M

so this means as time tends to infinity x should = steady state gain * input

x=(1/M)F
x=F/M
or
x=g

however this is not true, from simulations I have seen that the steady state value equals Mg/K

so that means that the steady state gain is 1/K, not 1/M

The general form of a second order diff eq is deffinatley

x'' + 2ζωx' + ω²x = Au(t)

u(t) is the input and A is the steady state gain, so why does this not work?

If I solve the diff eq I get

X(t) = e^ut * ( C1e^(vjt) + C2e^(-vjt)) +Mg/K
where
u=-C/2M
v=(SQRT|C^2 - 4MK|)/2M

Because u is always negative at t approaches infinity, e^ut approaches zero, so the steady state value of x is

x=Mg/K

So this works, so why does the standard form of the DHO equation lie?
 
Last edited:
  • #9
CraigH said:
Mx'' + Cx' + Kx = F(t)
Put this in the standard form of a second order system. (use DHO coefficients)
x'' + (C/M)x' + (k/M)x = (1/M)F(t)
x'' + 2ζωx' + ω²x = AF(t)
where
2ζω = C/M
ω² = K/M
and the steady sate gain A = 1/M

so this means as time tends to infinity x should = steady state gain * input

x=(1/M)F
ω²x = (1/M)F
 

What is a mass-spring-damper system?

A mass-spring-damper system is a type of mechanical system that consists of a mass, a spring, and a damper, all connected together. This system is commonly used to model the behavior of objects that have mass and are subject to external forces, such as vibrating objects or a car suspension system.

What is a differential equation?

A differential equation is a mathematical equation that describes the relationship between a function and its derivatives. In the context of a mass-spring-damper system, the differential equation models the motion of the mass as it is affected by the spring and damper forces.

How do you solve a differential equation for a mass-spring-damper system?

To solve a differential equation for a mass-spring-damper system, you can use techniques such as separation of variables, substitution, or integration. These methods involve manipulating the equation to isolate the dependent variable and then solving for its value.

What is the relationship between the spring constant, damping coefficient, and natural frequency in a mass-spring-damper system?

The spring constant (k) represents the stiffness of the spring, the damping coefficient (c) represents the resistance to motion by the damper, and the natural frequency (ω) represents the frequency at which the mass-spring-damper system will vibrate if left undisturbed. These parameters are related to each other through the equation ω = √(k/m) - (c/2m)^2, where m is the mass of the object.

How does the solution to the differential equation change for different initial conditions and external forces?

The solution to the differential equation for a mass-spring-damper system will vary depending on the initial conditions, such as the initial position and velocity of the mass, and the external forces acting on the system. These factors will affect the amplitude, frequency, and phase of the resulting motion. Additionally, the presence of external forces will require the inclusion of additional terms in the differential equation, leading to a more complex solution.

Similar threads

Replies
1
Views
377
Replies
4
Views
934
Replies
5
Views
310
Replies
76
Views
4K
  • Mechanics
Replies
15
Views
1K
Replies
6
Views
904
  • Introductory Physics Homework Help
Replies
2
Views
938
  • Introductory Physics Homework Help
Replies
3
Views
308
Replies
4
Views
1K
Back
Top