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.
y(t) vs r(t) [m] u(t), control effort [N] ρ(t), parameter 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.
This simulation requires JavaScript.
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 The browser does not solve any LMI: it runs a controller computed beforehand. This page illustrates a method and certifies no property. The range |ρ| ≤ 1/γ ≈ 1.19 is the one stated by the synthesis for the design model. The ±20 N saturation is not part of that model. A run without divergence does not prove stability, and leaving the stated range does not imply instability: these limits are conservative. The documentation reasons in continuous time; the controller simulated here is in discrete time. The damper failure is an animation tied to the drawing. It changes neither the model nor the curves. 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θ.
A K = [ 0.969381458 − 0.00146962112 0.00181514675 − 0.00000597496434 − 2.79108643 0.765191761 0.165320929 − 0.000525765191 − 8.01785556 × 10 − 11 − 6.46709383 × 10 − 12 0.999940002 − 1.56465318 × 10 − 14 − 346.138070 − 28.9802574 20.5763292 0.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} A K = 0.969381458 − 2.79108643 − 8.01785556 × 1 0 − 11 − 346.138070 − 0.00146962112 0.765191761 − 6.46709383 × 1 0 − 12 − 28.9802574 0.00181514675 0.165320929 0.999940002 20.5763292 − 0.00000597496434 − 0.000525765191 − 1.56465318 × 1 0 − 14 0.924621239 B K 1 = [ − 0.000264483547 0.0113009925 0.0625000000 1.42571483 ] B_{K1} = \begin{bmatrix} -0.000264483547 \\ 0.0113009925 \\ 0.0625000000 \\ 1.42571483 \end{bmatrix} B K 1 = − 0.000264483547 0.0113009925 0.0625000000 1.42571483 B K θ = [ 0.00000142105881 2.23581087 × 10 − 7 0.000188351463 − 6.97073747 × 10 − 7 3.73638529 × 10 − 15 3.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} B K θ = 0.00000142105881 0.000188351463 3.73638529 × 1 0 − 15 − 0.00796908894 2.23581087 × 1 0 − 7 − 6.97073747 × 1 0 − 7 3.61978003 × 1 0 − 17 − 0.0000777665875 C K 1 = [ − 2769.10456 − 231.842060 164.610634 − 0.523428099 ] C_{K1} = \begin{bmatrix} -2769.10456 & -231.842060 & 164.610634 & -0.523428099 \end{bmatrix} C K 1 = [ − 2769.10456 − 231.842060 164.610634 − 0.523428099 ] D K 11 = [ 11.4057187 ] D_{K11} = \begin{bmatrix} 11.4057187 \end{bmatrix} D K 11 = [ 11.4057187 ] D K 1 θ = [ − 0.0637527100 − 0.000622130000 ] D_{K1\theta} = \begin{bmatrix} -0.0637527100 & -0.000622130000 \end{bmatrix} D K 1 θ = [ − 0.0637527100 − 0.000622130000 ] C K θ = [ − 15.4117858 0.0392469590 − 0.0288461229 0.0000949534995 5.18899160 × 10 − 15 4.39535561 × 10 − 16 0.000121140740 9.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} C K θ = [ − 15.4117858 5.18899160 × 1 0 − 15 0.0392469590 4.39535561 × 1 0 − 16 − 0.0288461229 0.000121140740 0.0000949534995 9.92034400 × 1 0 − 19 ] D K θ 1 = [ 0.00420316000 0.00127849000 ] D_{K\theta 1} = \begin{bmatrix} 0.00420316000 \\ 0.00127849000 \end{bmatrix} D K θ 1 = [ 0.00420316000 0.00127849000 ] D K θ θ = [ − 0.0000225827868 − 0.00000355573417 4.51053468 × 10 − 19 1.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} D K θθ = [ − 0.0000225827868 4.51053468 × 1 0 − 19 − 0.00000355573417 1.30659887 × 1 0 − 20 ]