---
title: "State model of two-mass spring system, output x2"
subject: "Control Systems"
chapter: 8
key: "semester_3/control_systems:ss-m1-m2-k1-k2-x2"
source: https://www.bctengineer.com/q/semester_3/control_systems/ss-m1-m2-k1-k2-x2
site: BCT Engineering
---

# State model of two-mass spring system, output x2

Control Systems · Chapter 8: State Space Analysis

- Asked in: 2067 Asar (old course), 8 marks
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_3/control_systems/ss-m1-m2-k1-k2-x2
- Whole chapter: https://www.bctengineer.com/md/semester_3/control_systems/chapter-8

## Question

Represent the mechanical system of figure 1 (wall – spring K1 – mass M1 – spring K2 – mass M2 with force F(t) on M2, no friction) with state equation and output equation, if output is x2(t) in the figure.

## Short answer

Define states z₁=x₁, z₂=ẋ₁, z₃=x₂, z₄=ẋ₂. State equations: ż₁=z₂, ż₂=-(K₁+K₂)/M₁ z₁ + (K₂/M₁)z₃, ż₃=z₄, ż₄=(K₂/M₂)z₁ - (K₂/M₂)z₃ + (1/M₂)F. Output y=z₃.

## Answer

Let $x_1$ and $x_2$ be the displacements of $M_1$ and $M_2$ from their rest positions (positive to the right).

```text
 |    K1    +----+   K2    +----+
 |--/\/\/---| M1 |--/\/\/--| M2 |--> F(t)
 |          +----+         +----+
 |           x1 ->          x2 ->
```

#### Equations of motion (no friction)
Mass $M_1$: spring $K_1$ exerts a restoring force $K_1x_1$, and spring $K_2$ exerts $K_2(x_1 - x_2)$:

$$
M_1\ddot{x}_1 + K_1x_1 + K_2(x_1 - x_2) = 0
$$

Mass $M_2$:

$$
M_2\ddot{x}_2 + K_2(x_2 - x_1) = F(t)
$$

#### State variables
$z_1 = x_1$, $z_2 = \dot{x}_1$, $z_3 = x_2$, $z_4 = \dot{x}_2$:

$$
\begin{aligned}
\dot{z}_1 &= z_2 \\
\dot{z}_2 &= -\frac{K_1 + K_2}{M_1}z_1 + \frac{K_2}{M_1}z_3 \\
\dot{z}_3 &= z_4 \\
\dot{z}_4 &= \frac{K_2}{M_2}z_1 - \frac{K_2}{M_2}z_3 + \frac{1}{M_2}F(t)
\end{aligned}
$$

#### State equation

$$
\begin{bmatrix} \dot{z}_1 \\ \dot{z}_2 \\ \dot{z}_3 \\ \dot{z}_4 \end{bmatrix} = \begin{bmatrix} 0 & 1 & 0 & 0 \\ -\dfrac{K_1+K_2}{M_1} & 0 & \dfrac{K_2}{M_1} & 0 \\ 0 & 0 & 0 & 1 \\ \dfrac{K_2}{M_2} & 0 & -\dfrac{K_2}{M_2} & 0 \end{bmatrix}\begin{bmatrix} z_1 \\ z_2 \\ z_3 \\ z_4 \end{bmatrix} + \begin{bmatrix} 0 \\ 0 \\ 0 \\ \dfrac{1}{M_2} \end{bmatrix}F(t)
$$

#### Output equation

$$
y = x_2(t) = \begin{bmatrix} 0 & 0 & 1 & 0 \end{bmatrix}\begin{bmatrix} z_1 \\ z_2 \\ z_3 \\ z_4 \end{bmatrix}
$$

With no damping, the eigenvalues of $A$ lie on the imaginary axis, so the system oscillates without decay (marginally stable).

## Check yourself

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

1. Which is correct for M1?
   A. M1 x1'' + K1 x1 = F
   B. M1 x1'' + K1 x1 + K2(x1 - x2) = 0
   C. M1 x1'' + K2(x2 - x1) = 0
   D. M1 x1'' + K1 x1 - K2 x2 = F
   Answer: B. Both springs act; no force is applied directly. (Key point: Equation of M1)

2. Which is correct for M2?
   A. M2 x2'' + K2 x2 = F
   B. M2 x2'' + K2(x1 - x2) = F
   C. M2 x2'' + K2(x2 - x1) = F
   D. M2 x2'' = F
   Answer: C. Spring K2 pulls M2 back relative to M1. (Key point: Equation of M2)

3. What is B for z = [x1, x1', x2, x2']?
   A. [0; 1/M1; 0; 0]
   B. [0; 0; 0; 1]
   C. [1/M2; 0; 0; 0]
   D. [0; 0; 0; 1/M2]
   Answer: D. F acts on M2 only. (Key point: Input matrix)

4. Why does the system oscillate without decay?
   A. No damping, so eigenvalues are on the imaginary axis
   B. Springs are non-linear
   C. Masses are equal
   D. Force is constant
   Answer: A. Without friction no energy is dissipated. (Key point: Marginal stability)

## Related in Control Systems

- [Two-mass system X2/F by free body diagram, F-V analogy](https://www.bctengineer.com/question.md?key=semester_3%2Fcontrol_systems%3Afbd-fv-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×
- [Two-mass system X2/F with F-V analogy](https://www.bctengineer.com/question.md?key=semester_3%2Fcontrol_systems%3Atf-fv-m1-m2-k1k2-b1b2b3) — Control Systems, chapter 2, asked 3×
- [Two-mass system X1/F, X2/F with F-V analogy](https://www.bctengineer.com/question.md?key=semester_3%2Fcontrol_systems%3Afv-tf-m1-m2-k1b1-k2b2) — Control Systems, chapter 2, asked 3×
- [Two-mass system X2/F with F-V and F-I analogy (D3)](https://www.bctengineer.com/question.md?key=semester_3%2Fcontrol_systems%3Atf-fv-fi-m1-m2-2) — Control Systems, chapter 2, asked 3×
- [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

- [K1 and K2 of LLF from load pattern](https://www.bctengineer.com/question.md?key=semester_8%2Ftransmission_and_distribution_system_design%3Allf-k1-k2-load-pattern) — Transmission and Distribution System Design, chapter 6, asked 2×
- [Wall friction force for developing pipe flow](https://www.bctengineer.com/question.md?key=semester_4%2Fhydraulics%3Afriction-force-parabolic-velocity-pipe) — Hydraulics, chapter 1
- [Mass between two springs, period](https://www.bctengineer.com/question.md?key=semester_1%2Fengineering_physics%3Amass-spring-two-springs) — Engineering Physics, chapter 1
- [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
