---
title: "State space model of vertical two-mass system"
subject: "Control Systems"
chapter: 8
key: "semester_3/control_systems:ss-mech-m1-m2-k-b"
source: https://www.bctengineer.com/q/semester_3/control_systems/ss-mech-m1-m2-k-b
site: BCT Engineering
---

# State space model of vertical two-mass system

Control Systems · Chapter 8: State Space Analysis

- Asked in: 2076 Asoj, 8 marks
- Video: [Mechanical Component State Space Model](https://www.youtube.com/watch?v=PbXQG8LITgo) — Dr. Gargi Phadke
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_3/control_systems/ss-mech-m1-m2-k-b
- Whole chapter: https://www.bctengineer.com/md/semester_3/control_systems/chapter-8

## Question

Consider a mechanical system shown in figure below. The external force u(t) is input to the system and displacement y(t) of the mass is the output. Obtain the state space representation of the system. [Figure: vertical system; mass M1 hangs from a fixed support through spring K, with external force u(t) applied to M1; mass M2 hangs below M1 through damper B; y(t) is the downward displacement of M2; a fixed surface is drawn below M2]

## Short answer

Define states x1=y1, x2=dy1/dt, x3=y2, x4=dy2/dt. The state-space model is x' = Ax + Bu with A = [0 1 0 0; -K/M1 -B/M1 0 B/M1; 0 0 0 1; 0 B/M2 0 -B/M2], B = [0; 1/M1; 0; 0], y = [0 0 1 0]x.

## Answer

Let $y_1$ be the downward displacement of $M_1$ and $y = y_2$ that of $M_2$, both measured from the static equilibrium position, so gravity and the static spring force cancel and do not appear.

```text
   //////////  support
       |
       K  (spring)
       |
   +-------+
   |  M1   | <-- u(t), y1
   +-------+
       |
       B  (damper)
       |
   +-------+
   |  M2   |  y(t) = y2
   +-------+
```

#### Equations of motion
For $M_1$: spring force $Ky_1$ and damper force $B(\dot{y}_1 - \dot{y}_2)$ oppose its motion:

$$
M_1\ddot{y}_1 + B(\dot{y}_1 - \dot{y}_2) + Ky_1 = u(t)
$$

For $M_2$: only the damper acts on it:

$$
M_2\ddot{y}_2 + B(\dot{y}_2 - \dot{y}_1) = 0
$$

#### State variables

$$
x_1 = y_1,\quad x_2 = \dot{y}_1,\quad x_3 = y_2,\quad x_4 = \dot{y}_2
$$

$$
\begin{aligned}
\dot{x}_1 &= x_2 \\
\dot{x}_2 &= -\frac{K}{M_1}x_1 - \frac{B}{M_1}x_2 + \frac{B}{M_1}x_4 + \frac{1}{M_1}u \\
\dot{x}_3 &= x_4 \\
\dot{x}_4 &= \frac{B}{M_2}x_2 - \frac{B}{M_2}x_4
\end{aligned}
$$

#### State-space representation

$$
\begin{bmatrix} \dot{x}_1 \\ \dot{x}_2 \\ \dot{x}_3 \\ \dot{x}_4 \end{bmatrix} = \begin{bmatrix} 0 & 1 & 0 & 0 \\ -\dfrac{K}{M_1} & -\dfrac{B}{M_1} & 0 & \dfrac{B}{M_1} \\ 0 & 0 & 0 & 1 \\ 0 & \dfrac{B}{M_2} & 0 & -\dfrac{B}{M_2} \end{bmatrix}\begin{bmatrix} x_1 \\ x_2 \\ x_3 \\ x_4 \end{bmatrix} + \begin{bmatrix} 0 \\ \dfrac{1}{M_1} \\ 0 \\ 0 \end{bmatrix}u(t)
$$

$$
y(t) = \begin{bmatrix} 0 & 0 & 1 & 0 \end{bmatrix}\begin{bmatrix} x_1 \\ x_2 \\ x_3 \\ x_4 \end{bmatrix}
$$

$y_2$ itself is needed as a state only because it is the output; the dynamics depend on $y_1$, $\dot{y}_1$ and $\dot{y}_2$.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. What force acts on M2?
   A. Spring and damper both
   B. Only the damper: M2 y2'' + B(y2' - y1') = 0
   C. The external force u
   D. Gravity only
   Answer: B. M2 is connected only through the damper. (Key point: Equation of M2)

2. Which equation describes M1?
   A. M1 y1'' + B y1' + K y1 = 0
   B. M1 y1'' + K(y1 - y2) = u
   C. M1 y1'' + B(y1' - y2') + K y1 = u
   D. M1 y1'' + B(y2' - y1') + K y1 = 0
   Answer: C. M1 has the spring, damper and external force acting on it. (Key point: Equation of M1)

3. How many states are used?
   A. 2
   B. 3
   C. 6
   D. 4: y1, y1', y2, y2'
   Answer: D. Two second-order equations give four first-order states. (Key point: Number of states)

4. Why does gravity not appear?
   A. Displacements are measured from static equilibrium, where gravity and static spring force cancel
   B. Gravity is negligible for all masses
   C. The damper balances it
   D. The fixed surface supports it
   Answer: A. Measuring from equilibrium removes the constant gravity term. (Key point: Why gravity absent)

## Related in Control Systems

- [State space model of two-mass system](https://www.bctengineer.com/question.md?key=semester_3%2Fcontrol_systems%3Ass-m1-m2-k1b1-k2b2-outputs) — Control Systems, chapter 8
- [State model of two-mass spring system, output x2](https://www.bctengineer.com/question.md?key=semester_3%2Fcontrol_systems%3Ass-m1-m2-k1-k2-x2) — Control Systems, chapter 8
- [Vertical two-mass system transfer function X1/F](https://www.bctengineer.com/question.md?key=semester_3%2Fcontrol_systems%3Atf-vertical-m1-m2-k1-b1) — Control Systems, chapter 2
- [F-V and F-I analogy of two-mass system, X2 output](https://www.bctengineer.com/question.md?key=semester_3%2Fcontrol_systems%3Afv-fi-tf-m1-m2-k) — Control Systems, chapter 2, asked 3×
- [State model of a mass-spring-damper system](https://www.bctengineer.com/question.md?key=semester_3%2Fcontrol_systems%3Ass-model-mass-spring-damper) — Control Systems, chapter 8
- [Two-mass spring system X1/F and F-V analogy](https://www.bctengineer.com/question.md?key=semester_3%2Fcontrol_systems%3Atf-fv-m1-m2-k1-k2) — Control Systems, chapter 2

## Related in other subjects

- [ILD: vertical reaction at fixed support](https://www.bctengineer.com/question.md?key=semester_5%2Ftheory_of_structures_ii%3Aild-vertical-reaction-fixed-propped-025) — Theory of Structures II, chapter 4
- [Two oscillating masses: motion, centre of mass, energy](https://www.bctengineer.com/question.md?key=semester_3%2Fapplied_mechanics_dynamics%3Atwo-masses-springs-equations-energy) — Applied Mechanics (Dynamics), chapter 3
- [Two-wire 40 Ω line, input and output voltage](https://www.bctengineer.com/question.md?key=semester_3%2Felectromagnetism%3Atwo-wire-40-ohm-line-voltages) — Electromagnetism, chapter 5
- [Derive resultant force, variable mass system](https://www.bctengineer.com/question.md?key=semester_3%2Fapplied_mechanics_dynamics%3Avariable-mass-resultant-force) — Applied Mechanics (Dynamics), chapter 3, asked 2×
