00.250.5m1wn = sqrt(k / m)2zeta = b / (2*sqrt(k*m))3den = [1, 2*zeta*wn, wn**2]b = 1.6m = 1 kg
0123450.00.10.20.30.40.5time (s)x (m)CART POSITION x(t)ζ=0ζ=0.2ζ=0.5ζ=1ζ=1.25F/k = 0.25 m−10−8−6−4−20−4−2024σ, real partjω, imaginary partS-PLANEωn = 4
Blocks: the wall, the damper (its setting b on the front), the cart and the ruler; the spring is the zigzagArrow on the cart: the steady 4 N push that starts at t = 0 (the step input)Plots: x(t) for each damping ratio, and the two poles on the s-plane, both computed from the modelCode card: three lines of Python that turn k, m and b into ωn, ζ and the denominatorA 1 kg cart on a spring (k = 16 N/m) and a damper, pushed by a steady 4 N. The equation m·ẍ + b·ẋ + k·x = F in standard form is ẍ + 2ζωn·ẋ + ωn²·x = ωn²·F/k with ωn = 4 rad/s and ζ = b/8. The settling times (2.02 s, 1.46 s, 2.10 s) are measured on the exact curves: the last moment the cart is more than 2 % away from 0.25 m. The quick formulas for peak time, overshoot and settling time are the next lesson, "Rise time, peak time, overshoot and settling time".

Two numbers

  1. A 1 kg cart is tied to a wall by a spring and a damper. At t = 0 a steady 4 N push starts. The cart will end up at 4/16 = 0.25 m. How it gets there depends on just two numbers.

Four kinds of answer

Read it from the poles

What is happening

# step 1/11 · setup
# about: Wall (fixed), Spring k = 16 N/m, Damper b, Cart m = 1 kg, Push F = 4 N, Position x

cart     m = 1 kg
spring   k = 16 N/m
damper   b = ? N·s/m (we will try five)
push     F = 4 N from t = 0

final position  F / k = 4 / 16 = 0.25 m

Besides the final value, a first-order system
needs one number, its time constant.
A second-order one needs two.

The cart, spring and damper are illustrative values (m = 1 kg, k = 16 N/m, F = 4 N, b = 0, 1.6, 4, 8 or 10 N·s/m), chosen so ωn = 4 rad/s exactly. Every curve and number in the figure is the exact solution of the equation of motion for these values. The Python steps the equation forward 0.1 ms at a time (semi-implicit Euler) and reaches the same peaks as the exact curves to three decimals. python-control (python-control.readthedocs.io) offers tf, step_response and step_info, which use the same 2 % settling band by default.