yAtlas

正在绘制第一帧……

秩序之下 · No.18 · 实时图版

Feedback

反馈控制

Plates on feedback control, each one computed in the browser as you watch. The root locus, the paths the poles of a closed loop take as the gain is turned up, drawn at every pixel as one field line among those of point charges at the poles and zeros, from a motor that only gets quicker to a stick balanced on a fingertip. Nyquist's criterion, the curve a system's answers to sine waves trace in the complex plane, and the turns it makes round −1. State feedback, where every point of a plane of gains is a controller and the Riccati equation finds the bottom of a bowl of costs. The shortest time, full throttle and full brake, switching on a curve in the phase plane. And the Kalman filter, a belief carried forward by a model and sharpened by every reading, whose poles walk the same hyperbola as the regulator's.

图版
I–V
循环
每张 60 秒
分辨率
随播放区域自适应,最高 440 万像素
预先录好的帧
没有
短片
制作中

图版 I · 4 段 · 1:00 循环

The root locus

A feedback loop measures the output, compares it with what is wanted and acts on the difference, multiplied by a gain K. How the closed loop responds is set by its poles, the roots of 1+KL(s)=0, where L(s) is the open-loop transfer function, once round the loop. A point s of the complex plane is a closed-loop pole for some positive K exactly when L(s) is a negative real number, and the gain that puts it there is 1/|L(s)|. Walter Evans drew these paths by hand in 1948; here the shader computes log|L(s)| and argL(s) at every pixel. Their contours are the equipotentials and the field lines of point charges sitting at the poles and zeros; the root locus, in gold, is the field line on which argL(s)=π, and the closed-loop poles sit where it crosses the contour |L(s)|=1/K, in ice blue.

图版

说明

The closed loop in the corner

Every plate keeps the closed loop in its corner: the characteristic polynomial at this moment, whose roots are the closed-loop poles, or the feedback law itself, and below it one fact found twice. Once it is measured on the picture: the peak of a step response, the gap between two zero crossings, the turns a curve makes round a point, the angle where it crosses a circle, the poles read back off a response, the energy along an input, the time along a path, the area inside a boundary. Once it comes from the poles, a formula or an equation: the roots themselves, Routh's table, Lyapunov's and Riccati's equations, Bushaw's time to go, Kalman's update, least squares solved all at once.

A locus at every pixel

The root locus is not traced from point to point. At every pixel s the shader adds up the logarithms and the angles of the distances from s to each zero, and subtracts those to each pole: the real and imaginary parts of logL(s). Their contours cross at right angles, like the equipotentials and field lines of point charges. The gold line is where the angles add up to π; the ice-blue line is where the logarithms add up to −log K. Where the locus splits, L′(s)=0 and the gain contour pinches into a knot.

A controller at every pixel

In the plane of gains each pixel is a whole controller. The shader solves that controller's closed loop on the spot: where its two poles are, how fast its response dies away and how fast it oscillates, and, from Lyapunov's equation, what a push costs. The lines of equal decay rate, the parabola on which the two poles meet, and the bowl whose bottom the Riccati equation finds are all drawn from those per-pixel solutions, not from curves worked out beforehand.

One equation, two directions

The regulator of plate III and the filter of plate V solve the same Riccati equation, transposed: the regulator's runs backward from a cost to come, the filter's forward from what has been seen. For the stick, both put their poles on the hyperbola (Res)2−(Ims)2=1, and the filter's two gains at a ratio q/r are the regulator's at the price r/q, swapped. Kalman pointed out this duality in 1960.

Computed, not stored

Nothing on screen is precomputed. The closed-loop poles are found every frame by the Durand–Kerner iteration, the step responses by integrating the state equations with Runge–Kutta, and the loop with a delay by integrating with the remembered past of its own output. The sheet |P(s)| is rebuilt from ten thousand evaluations each frame as its poles move, and the turns round −1 are counted by adding up the angle along the curve.