Trajectory Optimization for Scenario Design
A scenario is a time-dependent path in state and actuation; direct collocation turns designing it into a large, structured nonlinear program.
Designing the whole path
Beyond a single operating point, a scenario is a trajectory: how current, shape, fueling, and heating evolve from breakdown to flat-top and back, or how the burner reaches and holds its potential. Trajectory optimization designs this path to meet objectives while satisfying dynamics and constraints at every instant. It is the offline planner whose output MPC tracks.
Direct collocation transcription:
min Integral_0^T L(x(t), u(t)) dt + E(x(T))
s.t. xdot = f(x, u) (dynamics, enforced at nodes)
path constraints g(x,u) <= 0
boundary conditions on x(0), x(T)
Discretize on N nodes; enforce dynamics via collocation:
x_{k+1} - x_k = (h/2)( f_k + f_{k+1} ) (trapezoidal)
-> large sparse nonlinear program in {x_k, u_k}
Direct versus indirect methods
Direct methods discretize states and controls and hand the resulting nonlinear program to a solver; they are robust and handle path constraints naturally. Indirect methods derive optimality conditions (Pontryagin's principle) first, then solve - accurate but delicate. The stack uses direct collocation for scenario design because envelope and actuator constraints are first-class and the sparse NLP solves reliably.
# direct-collocation NLP assembly (schematic)
vars = stack([x_k for k in range(N)] + [u_k for k in range(N)])
cons = []
for k in range(N-1):
cons.append(x[k+1]-x[k] - 0.5*h*(f(x[k],u[k])+f(x[k+1],u[k+1])))
cons += path_constraints(x, u) + boundary(x[0], x[N-1])
sol = nlp_solve(objective(x,u), cons, bounds) # SQP / interior-point
Feeding the control loop
The optimized trajectory becomes the reference MPC tracks, and its terminal state defines the operating point around which the terminal set and cost are built. For the breeder this plans the negative-triangularity ramp within stability limits; for the burner it explores candidate paths to the ambipolar operating point in simulation, carrying the regime and coil-stress caveats so the plan is understood as a design study, not a schedule for existing hardware.
- Optimizes the full time-dependent path, not one point.
- Direct collocation: constraints at every node, robust NLP.
- Output = MPC reference and terminal ingredients.
- Burner trajectories carry the honest gates as caveats.
Trajectory optimization sits between Bayesian scenario search (which picks the regime) and MPC (which executes in feedback), completing the optimization stack from design to real-time control.