Green's Functions and Poloidal-Field Coil Response
The vacuum field of every PF coil is a Green's function of the Grad-Shafranov operator; superposing them turns shape control into a linear-algebra problem.
The elliptic Green's function
Outside the plasma the Grad-Shafranov operator is linear, so the flux from any set of coil currents is a superposition of single-coil responses. The response of a unit toroidal current filament is the Green's function of the Delta* operator, expressible in closed form via complete elliptic integrals. This linearity is what makes real-time shape control tractable on the breeder.
Flux at (R,Z) from a unit ring current at (R',Z'):
G(R,Z; R',Z') = (mu0 / (2*pi)) * sqrt(R R') / k *
[ (2 - k^2) K(k) - 2 E(k) ]
k^2 = 4 R R' / [ (R+R')^2 + (Z-Z')^2 ]
K,E : complete elliptic integrals of the 1st and 2nd kind
Total external flux: psi_ext(x) = sum_c G(x; x_c) * I_c
Assembling the response matrix
Evaluating the Green's function at the control points (boundary shape-control gaps, flux loops, X-point) for each coil builds a response matrix M mapping coil-current vector I to the flux/field observations. Shape control is then the linear inverse of M against a shaped target.
Response (Green's) matrix:
y = M I , M_[i,c] = G(x_i ; x_c) (+ field derivatives for B)
y : observations at control points (flux, B_R, B_Z, gaps)
I : coil current vector
Desired shape -> target y* -> solve for I:
I* = argmin || M I - y* ||^2 + lambda ||I||^2 (Tikhonov)
Ill-conditioning and regularization
M is typically ill-conditioned: many coil-current combinations produce nearly the same boundary, so a naive inverse amplifies noise and demands unphysical currents. Tikhonov regularization (the lambda term) or truncated SVD stabilizes the inverse, trading a little shape error for well-behaved, current-limited commands. The regularization weight is a tuning knob the shape controller exposes.
# truncated-SVD pseudo-inverse for coil currents
U, s, Vt = svd(M)
keep = s > rcond * s[0] # drop tiny singular values
I_star = (Vt[keep].T / s[keep]) @ (U[:, keep].T @ y_star)
# smaller 'keep' -> smoother, more robust, less exact shape
The Green's-function response matrix is also the linearization MPC uses locally: near an operating point, incremental coil moves map linearly to incremental shape changes, so the receding-horizon QP inherits this structure directly. Because the map is analytic, its sensitivities are exact rather than estimated, which keeps the controller's internal model faithful as the breeder moves around its negative-triangularity target.
The closed-form nature of the Green's function is what keeps this whole chain real-time. No mesh solve is needed to relate coils to observations in the vacuum region; a matrix built once from elliptic-integral evaluations, refreshed only as geometry changes, suffices. That efficiency is why coil-to-shape reasoning fits inside the control cycle for the breeder's 9.66 MA, high-field operating point.