# Homework Help: Mass-Spring-Damper time response to step input

1. Aug 13, 2009

### hhspunter

1. The problem statement, all variables and given/known data

I am going to do some paraphrasing here, because the question is for automotive dynamics class, but is a pretty general question in its simplest form (1 degree of freedom):

Find the time response to a step input of y=10cm.

This is for a vertically oriented mass-spring-damper system, where the spring and damper are parallel, and the mass rests on top of the spring.

Sorry for the poor quality, I can't find my camera so I had to use my phone.

Variables are:
x[t] and y[t], and their derivatives.
x refers to the position of the sprung mass where x=0 means the system is in equlibrium.
y refers to the position of the bottom of the spring.

Initial conditions:

x[0]=0
x'[0]=0.

For t>0, y=0.1 (in meters). For t less than/equal to 0, y=0.

2. Relevant equations

mx''+cx'+kx=ky+cy'

3. The attempt at a solution

I am using Wolfram Mathematica, so to solve the differential equation I assign values for m, c, and k. I use NDSolve, then write the equation, the initial conditions (x[0]=0, x'[0]=0), tell it to solve for x, and for 0<t<3. Now y'[t]=0 for t>0, so the cy' portion of the equation can be dropped. If I assign a value of 0.1 to y, and use DSolve, it gives an error, telling me that "0 cannot be used as a valiable" (it is getting the 0 from when I specify 0<t<3, verified by changing the lower bound of t). If I do not assign a value to y, I get the same result (after clearing all variables). If I use NDSolve, with or without an assigned value to y, I get an error message that "The fuction x appears with no arguements."

Here is my code, if it helps:
m = 1440/4;
k = 358*9.81/.15;
c = 1855;
y = 0.1;
DSolve[{m*x''[t] + c*x'[t] + k*x == k*y, x[0] == 0,
x'[0] == 0}, x, {t, 0, 3}]

Expansion of the problem
Now, I also need to be able to solve this same problem (step input of y=0.1meters) for multiple DOF systems. If I can solve it for a single DOF situation, I can develop similar equations of motion using matrices for m, c, and k. Hopefully I'll be able to apply the same strategy that ends up working for the 1DOF problem to the multiple DOF system (I need to go all the way up to a full-car model, with a double MSD in series on each corner of the car, plus a front and rear roll stiffness, but again I have the similar equations of motion as above).