Interactive demonstration

LPV tracking simulation

Simulate a mass-spring-damper system with time-varying stiffness tracking a reference signal, and move the parameter until it leaves the range stated by the synthesis.

|ρ| ≤ 1.19: inside the range stated by the synthesis

y(t) vs r(t) [m]u(t), control effort [N]ρ(t), parameter
y axis
u axis

Mass-spring-damper system

Visualizing LPV dynamics

M

m ÿ + c ẏ + k(ρ(t)) y = u

1.0 ÿ + 2.0 ẏ + 10.00 y = 0.00

k(ρ(t)) = 10(1 + 0.4ρ(t)) is the varying stiffness.

Observe how stiffness affects system response.

Blue background: |ρ| ≤ 1.19, the guaranteed stability and performance range stated by the synthesis. Copper background: potential instability. One can see that these limits are conservative.

Tip: with a mouse, drag vertically on the y or u plot to rescale, Shift+drag to pan, double-click to reset. The buttons below the plots do the same by keyboard and touch.

What is simulated

Plant
m = 1 kg, c = 2 Ns/m, k(ρ) = 10(1 + 0.4ρ) N/m
Discretization
Explicit Euler, Ts = 1 ms, 20 steps per displayed frame
Controller
Gain-scheduled, 4 states, LFT dependence on ρ. Matrices computed offline, γopt = 0.838
Reference
Square wave between 0.2 m and 0, switching every 2 s
Parameter
ρ(t) = ρ₀ + Aρ sin(2π fρ t), adjustable above
Saturation
±20 N on the control input, outside the synthesis model
Display
400 samples, a sliding window of 8 s

What this demonstration shows, and what it does not

Technical decisions

A numerical core separated from the display
The calculations live in a module with no interface, so a test can compare every trajectory with those produced by the original code.
An SVG drawing updated directly
The curves change on every frame without going through React, which keeps the simulation smooth on a phone.
Equations rendered on the server with KaTeX
They appear without JavaScript and stay readable by assistive technologies.

Controller data

Show the matrices used by the simulation

Values run by this page, γopt = 0.83801934. The controller LFT depends on ρ through the channels wθ and zθ.

AK=[0.969381458−0.001469621120.00181514675−0.00000597496434−2.791086430.7651917610.165320929−0.000525765191−8.01785556×10−11−6.46709383×10−120.999940002−1.56465318×10−14−346.138070−28.980257420.57632920.924621239]A_K = \begin{bmatrix} 0.969381458 & -0.00146962112 & 0.00181514675 & -0.00000597496434 \\ -2.79108643 & 0.765191761 & 0.165320929 & -0.000525765191 \\ -8.01785556 \times 10^{-11} & -6.46709383 \times 10^{-12} & 0.999940002 & -1.56465318 \times 10^{-14} \\ -346.138070 & -28.9802574 & 20.5763292 & 0.924621239 \end{bmatrix}
BK1=[−0.0002644835470.01130099250.06250000001.42571483]B_{K1} = \begin{bmatrix} -0.000264483547 \\ 0.0113009925 \\ 0.0625000000 \\ 1.42571483 \end{bmatrix}
BKθ=[0.000001421058812.23581087×10−70.000188351463−6.97073747×10−73.73638529×10−153.61978003×10−17−0.00796908894−0.0000777665875]B_{K\theta} = \begin{bmatrix} 0.00000142105881 & 2.23581087 \times 10^{-7} \\ 0.000188351463 & -6.97073747 \times 10^{-7} \\ 3.73638529 \times 10^{-15} & 3.61978003 \times 10^{-17} \\ -0.00796908894 & -0.0000777665875 \end{bmatrix}
CK1=[−2769.10456−231.842060164.610634−0.523428099]C_{K1} = \begin{bmatrix} -2769.10456 & -231.842060 & 164.610634 & -0.523428099 \end{bmatrix}
DK11=[11.4057187]D_{K11} = \begin{bmatrix} 11.4057187 \end{bmatrix}
DK1θ=[−0.0637527100−0.000622130000]D_{K1\theta} = \begin{bmatrix} -0.0637527100 & -0.000622130000 \end{bmatrix}
CKθ=[−15.41178580.0392469590−0.02884612290.00009495349955.18899160×10−154.39535561×10−160.0001211407409.92034400×10−19]C_{K\theta} = \begin{bmatrix} -15.4117858 & 0.0392469590 & -0.0288461229 & 0.0000949534995 \\ 5.18899160 \times 10^{-15} & 4.39535561 \times 10^{-16} & 0.000121140740 & 9.92034400 \times 10^{-19} \end{bmatrix}
DKθ1=[0.004203160000.00127849000]D_{K\theta 1} = \begin{bmatrix} 0.00420316000 \\ 0.00127849000 \end{bmatrix}
DKθθ=[−0.0000225827868−0.000003555734174.51053468×10−191.30659887×10−20]D_{K\theta\theta} = \begin{bmatrix} -0.0000225827868 & -0.00000355573417 \\ 4.51053468 \times 10^{-19} & 1.30659887 \times 10^{-20} \end{bmatrix}

An opportunity, a research collaboration, or a project to develop?

Tell me about the context and what you would like to discuss.

Get in touch