Plasma boundary Target shape PF shaping coils

AI Plasma Shape Control (Tokamak) — 2D Poloidal Cross-Section

Real tokamaks hold their plasma's cross-sectional shape — elongation, triangularity, vertical position — against a genuine instability using currents in external poloidal-field coils. This 2D companion renders that control problem in its actual native domain: the poloidal (R,Z) cross-section plane, the same view real equilibrium-reconstruction codes plot. A proportional-derivative controller fights the same vertical instability as the 3D version, but here the closed-loop poles of the linearized vertical mode are computed and shown live, and a scrolling strip-chart makes the exponential growth (or decay) directly visible over time rather than only inferable from the shape. Turn the AI gain below the displayed open-loop growth rate and watch the same instability run away; raise it back above and watch the poles — and the strip-chart — snap back to stable.