H2 Optimal Control
H2 control minimizes the energy of the closed-loop response to white-noise or impulsive disturbances by minimizing a system's H2 norm.
The H2 norm
For a stable transfer function G(s), the H2 norm is the square root of the integral over frequency of the trace of G(jw)*G(jw). Physically it measures the RMS output when the input is unit-variance white noise, or equivalently the total energy of the impulse response. Minimizing it drives disturbance energy out of the regulated outputs.
The classic LQG problem is an H2 problem: a Kalman filter estimates the state under process and measurement noise, and an LQR gain feeds back the estimate. The separation principle lets the estimator and regulator be designed independently, and the resulting controller is the H2-optimal solution for the corresponding generalized plant.
Generalized plant setup
Modern H2 design uses a generalized plant P mapping exogenous inputs w and controls u to regulated outputs z and measurements y. The controller K closes the loop from y to u. The design chooses K to minimize the H2 norm of the transfer function from w to z, denoted the lower linear fractional transformation F_l(P,K).
The solution is obtained from two algebraic Riccati equations, one for control and one for estimation, provided standard assumptions hold: stabilizability, detectability, and full-rank direct terms on the control and measurement channels. The optimal controller has the same order as the plant.
Weighting and trade-offs
Frequency-dependent weights on z shape where the design spends effort. Heavy weighting on tracking error at low frequency tightens regulation there; weighting control signals penalizes actuator activity. H2 optimizes average performance rather than worst case, so it is complementary to H-infinity control, which bounds the peak gain.
In a fusion context, H2 methods suit plasma-adjacent systems where disturbances are stochastic and broadband, such as coolant-loop pressure regulation, where minimizing mean-square fluctuation is the natural objective. Kronos machines remain design and simulation studies, so such controllers are evaluated in models, not on hardware.
import numpy as np
# H2 cost = trace(C X C^T), X solves Lyapunov: A X + X A^T + B B^T = 0
from scipy.linalg import solve_lyapunov
A=np.array([[-1.,1.],[0.,-2.]]); B=np.array([[0.],[1.]]); C=np.array([[1.,0.]])
X=solve_lyapunov(A, -B@B.T)
h2=np.sqrt(np.trace(C@X@C.T)); print(round(h2,4))