---
title: "State model of a mass-spring-damper system"
subject: "Control Systems"
chapter: 8
key: "semester_3/control_systems:ss-model-mass-spring-damper"
source: https://www.bctengineer.com/q/semester_3/control_systems/ss-model-mass-spring-damper
site: BCT Engineering
---

# State model of a mass-spring-damper system

Control Systems · Chapter 8: State Space Analysis

- Asked in: 2080 Bhadra, 4 marks
- Video: [Example 122: State-space model of a mass-spring-damper system](https://www.youtube.com/watch?v=vXuTCgS8-rU) — bioMechatronics Lab
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_3/control_systems/ss-model-mass-spring-damper
- Whole chapter: https://www.bctengineer.com/md/semester_3/control_systems/chapter-8

## Question

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]

## 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.

## Answer

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

#### Differential equation
Newton's law (free-body diagram of $M$):

$$
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):

$$
x_1 = x, \qquad x_2 = \dot{x}
$$

$$
\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 $x$ as the output:

$$
\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 = \begin{bmatrix} 1 & 0 \end{bmatrix}\begin{bmatrix} x_1 \\ x_2 \end{bmatrix}
$$

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

## Check yourself

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

1. Which equation follows from Newton's law for M with spring K, damper B and force F?
   A. M x'' - B x' - K x = F(t)
   B. M x'' + B x' + K x = F(t)
   C. M x' + B x + K x'' = F(t)
   D. M x'' + B x + K x' = F(t)
   Answer: B. Spring force Kx and damper force Bx' both oppose motion, so they appear on the left with positive signs. (Key point: Equation of motion)

2. Which are the natural state variables?
   A. Force and displacement
   B. Spring and damper forces
   C. Displacement x and velocity x'
   D. Acceleration and force
   Answer: C. Spring stores energy by x; mass stores energy by velocity. (Key point: State variable choice)

3. What is the second row of A?
   A. [K/M  B/M]
   B. [-M/K  -M/B]
   C. [-B/M  -K/M]
   D. [-K/M  -B/M]
   Answer: D. x2' = -(K/M)x1 - (B/M)x2 + F/M. (Key point: State matrix)

4. What is B in the state model (input F)?
   A. [0; 1/M]
   B. [0; M]
   C. [1/M; 0]
   D. [0; K/M]
   Answer: A. Force enters only the acceleration equation, scaled by 1/M. (Key point: Input matrix)

## Related in Control Systems

- [F-V and F-I analogy of mass-spring-damper system](https://www.bctengineer.com/question.md?key=semester_3%2Fcontrol_systems%3Afv-fi-m-k1-k2-b2) — Control Systems, chapter 2
- [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 space model of vertical two-mass system](https://www.bctengineer.com/question.md?key=semester_3%2Fcontrol_systems%3Ass-mech-m1-m2-k-b) — 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
- [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
- [Velocity transfer function of two-mass system with analogies](https://www.bctengineer.com/question.md?key=semester_3%2Fcontrol_systems%3Atf-velocity-m2-fv-fi) — Control Systems, chapter 2

## Related in other subjects

- [Spring-mass-damper instrument parameters](https://www.bctengineer.com/question.md?key=semester_4%2Finstrumentation_and_measurement%3Aspring-mass-damper-instrument-numerical) — Instrumentation and Measurement, chapter 4
- [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×
- [Fleming's right and left hand rules](https://www.bctengineer.com/question.md?key=semester_4%2Felectrical_machine%3Afleming-hand-rules) — Electrical Machine, chapter 1
- [Left and right focal point ratios](https://www.bctengineer.com/question.md?key=semester_5%2Ftheory_of_structures_ii%3Afocal-point-ratios-left-right) — Theory of Structures II, chapter 4
