Skip to main content

State space model of two-mass system

Short answer

Use states x1, ẋ1, x2, ẋ2. The state-space model is ẋ=Ax+BF, y=Cx with A = [[0,1,0,0],[-k1/m1,-b1/m1,k1/m1,b1/m1],[0,0,0,1],[k1/m2,b1/m2,-(k1+k2)/m2,-(b1+b2)/m2]], B = [0,1/m1,0,0]ᵀ, C = [[1,0,0,0],[0,0,1,0]], D=0.

Obtain a state-space representation of the mechanical system shown in the figure where external force F is the input and the displacements of the masses x1 and x2 are the outputs. [Figure: wall – spring k2 parallel with damper b2 – mass m2 (displacement x2, on rollers) – spring k1 parallel with damper b1 – mass m1 (displacement x1, on rollers, force F applied)]

A state-space model is obtained by writing Newton's second law for each mass and choosing the displacements and velocities as state variables (one pair per mass, so 4 states).

System and assumptions

 wall |--[k2 || b2]--[ m2 ]--[k1 || b1]--[ m1 ]--> F
                      x2 ->               x1 ->
  • Masses run on rollers, so there is no friction with the ground.
  • x1x_1, x2x_2 are measured from equilibrium, positive to the right.
  • k1k_1, b1b_1 connect m1m_1 and m2m_2; k2k_2, b2b_2 connect m2m_2 to the wall.

Equations of motion

Free body of m1m_1 (force FF, spring and damper k1k_1, b1b_1 resisting relative motion):

m1x¨1=F−k1(x1−x2)−b1(x˙1−x˙2)m_1\ddot{x}_1 = F - k_1(x_1 - x_2) - b_1(\dot{x}_1 - \dot{x}_2)

Free body of m2m_2 (pulled by k1k_1, b1b_1; held back by k2k_2, b2b_2):

m2x¨2=k1(x1−x2)+b1(x˙1−x˙2)−k2x2−b2x˙2m_2\ddot{x}_2 = k_1(x_1 - x_2) + b_1(\dot{x}_1 - \dot{x}_2) - k_2x_2 - b_2\dot{x}_2

Choice of state variables

z1=x1,z2=x˙1,z3=x2,z4=x˙2,u=Fz_1 = x_1,\quad z_2 = \dot{x}_1,\quad z_3 = x_2,\quad z_4 = \dot{x}_2,\quad u = F

State equations

z˙1=z2z˙2=−k1m1z1−b1m1z2+k1m1z3+b1m1z4+1m1uz˙3=z4z˙4=k1m2z1+b1m2z2−k1+k2m2z3−b1+b2m2z4\begin{aligned} \dot{z}_1 &= z_2 \\ \dot{z}_2 &= -\frac{k_1}{m_1}z_1 - \frac{b_1}{m_1}z_2 + \frac{k_1}{m_1}z_3 + \frac{b_1}{m_1}z_4 + \frac{1}{m_1}u \\ \dot{z}_3 &= z_4 \\ \dot{z}_4 &= \frac{k_1}{m_2}z_1 + \frac{b_1}{m_2}z_2 - \frac{k_1 + k_2}{m_2}z_3 - \frac{b_1 + b_2}{m_2}z_4 \end{aligned}

Matrix form

[z˙1z˙2z˙3z˙4]=[0100−k1m1−b1m1k1m1b1m10001k1m2b1m2−k1+k2m2−b1+b2m2][z1z2z3z4]+[01m100]F\begin{bmatrix}\dot{z}_1\\ \dot{z}_2\\ \dot{z}_3\\ \dot{z}_4\end{bmatrix} = \begin{bmatrix} 0 & 1 & 0 & 0\\ -\frac{k_1}{m_1} & -\frac{b_1}{m_1} & \frac{k_1}{m_1} & \frac{b_1}{m_1}\\ 0 & 0 & 0 & 1\\ \frac{k_1}{m_2} & \frac{b_1}{m_2} & -\frac{k_1+k_2}{m_2} & -\frac{b_1+b_2}{m_2} \end{bmatrix} \begin{bmatrix}z_1\\ z_2\\ z_3\\ z_4\end{bmatrix} + \begin{bmatrix}0\\ \frac{1}{m_1}\\ 0\\ 0\end{bmatrix}F

Output equation

The outputs are the two displacements y1=x1y_1 = x_1 and y2=x2y_2 = x_2:

[y1y2]=[10000010][z1z2z3z4]+[00]F\begin{bmatrix}y_1\\ y_2\end{bmatrix} = \begin{bmatrix}1 & 0 & 0 & 0\\ 0 & 0 & 1 & 0\end{bmatrix} \begin{bmatrix}z_1\\ z_2\\ z_3\\ z_4\end{bmatrix} + \begin{bmatrix}0\\ 0\end{bmatrix}F

Summary

MatrixSizeMeaning
AA4×44\times 4Masses, springs, dampers
BB4×14\times 1Force acts on m1m_1 only
CC2×42\times 4Picks x1x_1 and x2x_2
DD2×12\times 1Zero (no direct path)

Answer: z˙=Az+BF\dot{z} = Az + BF, y=Czy = Cz with AA, BB, CC as above and D=0D = 0. Physical check: in the static case (z˙=0\dot{z} = 0), the equations give k2x2=Fk_2x_2 = F and k1(x1−x2)=Fk_1(x_1 - x_2) = F, i.e. the two springs carry the same force in series, as expected.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Control Systems chapter 8 questions →