Skip to main content

State model of a mass-spring-damper system

Short answer

Let x1 = displacement x, x2 = velocity x_dot. Then state model: x_dot = [0 1; -K/M -B/M] x + [0; 1/M] F(t), y = [1 0] x for displacement output.

Obtain state space model of the following mechanical system. [Figure: mass M (displacement x, on rollers) with applied force F(t), connected to the left wall by spring K and to the right wall by damper B]

The mass is pulled by F(t)F(t), held back by the spring KK (left wall) and the damper BB (right wall). Both oppose the motion.

Differential equation

Newton's law (free-body diagram of MM):

Md2xdt2+Bdxdt+Kx=F(t)M\frac{d^2x}{dt^2} + B\frac{dx}{dt} + Kx = F(t)

State variables

Displacement and velocity of the mass (energy in the spring and the mass):

x1=x,x2=x˙x_1 = x, \qquad x_2 = \dot{x} x˙1=x2x˙2=−KMx1−BMx2+1MF(t)\begin{aligned} \dot{x}_1 &= x_2 \\ \dot{x}_2 &= -\frac{K}{M}x_1 - \frac{B}{M}x_2 + \frac{1}{M}F(t) \end{aligned}

State-space model

Taking the displacement xx as the output:

[x˙1x˙2]=[01−KM−BM][x1x2]+[01M]F(t)\begin{bmatrix} \dot{x}_1 \\ \dot{x}_2 \end{bmatrix} = \begin{bmatrix} 0 & 1 \\ -\dfrac{K}{M} & -\dfrac{B}{M} \end{bmatrix}\begin{bmatrix} x_1 \\ x_2 \end{bmatrix} + \begin{bmatrix} 0 \\ \dfrac{1}{M} \end{bmatrix}F(t) y=[10][x1x2]y = \begin{bmatrix} 1 & 0 \end{bmatrix}\begin{bmatrix} x_1 \\ x_2 \end{bmatrix}

(If velocity is wanted as output, use C=[0    1]C = [0 \;\; 1].) The corresponding transfer function is X(s)F(s)=1Ms2+Bs+K\dfrac{X(s)}{F(s)} = \dfrac{1}{Ms^2 + Bs + K}.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Control Systems chapter 8 questions →