uB[ 0 ][0.5]∫1/sx₁ · m0.100x₂ · m/s0.500C[1 0]yA[ 0 1 ][−25 −2 ]uuuuuu
u/k = 0.2 mpeak 0.305 m at 0.64 s012345600.10.20.3time (s)x₁ (m)POSITION x₁ AFTER A 10 N PUSHy = x₁00.10.20.3-0.400.40.8x₁ position (m)x₂ velocity (m/s)THE STATE'S PATH (STATE SPACE)[x₁, x₂]
Lit arrow with moving dashes: a signal is flowing along itBlocks: the matrices A, B, C, the integrator and the summing puck; the two cells are the statePlots: position over time, and the state's path in the position-velocity planeThe pills riding the arrows carry vectors; their value changes as they pass a blockThe cart as a state-space model: the state (position and velocity) is the memory the integrator keeps; A feeds the state back, B brings the input in, C picks the output. Both plots are the exact solution of ẋ = Ax + Bu after a 10 N push from rest. The state is not unique: any set of independent combinations of position and velocity would also do. Position and velocity are the natural choice here because they are what we can picture and measure.

The state

  1. Take the 2 kg cart on a 50 N/m spring and a 4 N·s/m damper. To predict its future you need two numbers now: position x₁ and velocity x₂. That pair is the state, the cart's memory.

The matrices

Run it

What is happening

# step 1/10 · state
# about: x₁ position, x₂ velocity

state = the smallest set of numbers that, with the
input from now on, fixes everything that happens next

x₁ = position   (m)
x₂ = velocity   (m/s)

frozen moment used in the next steps:
x = [0.1, 0.5]   u = 10 N

The cart is a model with illustrative numbers (2 kg, 4 N·s/m, 50 N/m, a 10 N push from rest). Every curve is the exact solution of ẋ = Ax + Bu; every number in the steps is computed from it. The Python is plain Python 3 with lists, no numpy. python-control's ct.ss(A, B, C, D) builds the same model if you have it installed.