Direct Multiple Shooting Method
System Discretization
From Continuous to Discrete
Optimal control problems live in a world of continuous time, described by ordinary differential equations (ODEs). But the tools we use to solve them, numerical optimizers, live in a world of discrete numbers. To bridge this gap, we must perform system discretization. This process transforms the smooth, continuous dynamics of our problem into a series of distinct snapshots in time.
The first step is to establish a time grid. We chop the total time horizon, say from to , into a finite number of segments. These segments are defined by a series of points called nodes or knots, . The state of our system, , is now only explicitly considered at these specific nodes, becoming a sequence . This set of points forms the skeleton of our discretized problem.
The spacing of these nodes doesn't have to be uniform. Placing more nodes in regions where the dynamics change rapidly can improve accuracy without needlessly increasing computational cost everywhere.
Parameterizing the Controls
Just like the state, the control input, , must also be discretized. Instead of trying to find an entire continuous function, we define its shape over each time interval using a simple, fixed structure. This is called control parameterization.
The most common approach is to assume the control is piecewise-constant. Within each interval, the control value is held constant at some value . The optimizer's job is no longer to find a function, but to find the best sequence of constant values . Another option is piecewise-linear, where the control varies linearly from to within the interval. This offers more fidelity at the cost of more complexity.
By parameterizing the control, we have transformed an infinite-dimensional problem (finding a function) into a finite-dimensional one (finding a set of parameters). This is a crucial step toward making the problem solvable for a computer.
Integrating the Dynamics
Now we have the state at time and a defined control for the interval . How do we find the state at time ? We must integrate the system's ODE, , across the time interval.
Since the function can be complex and nonlinear, we can't usually find an exact analytical solution. Instead, we use a numerical integration scheme. A popular and robust choice is the fourth-order Runge-Kutta method (RK4). It provides a good balance of accuracy and computational effort.
The entire RK4 process can be wrapped into a single function, often called an integrator, which we can denote as . This function takes the current state and control and returns the next state .
This equation is the core of the discretization. For each interval, we create an algebraic equality constraint that the optimizer must satisfy: . This ensures that the trajectory follows the system dynamics. In methods, these constraints link the states from one node to the next, but the states at each node are treated as independent decision variables by the solver.
Preparing for the Solver
With our discretization scheme in place, we have successfully transformed the original continuous optimal control problem into a large (NLP) problem. The decision variables for the NLP solver are all the states and all the control parameters . The constraints are the equality constraints from our integrator () plus any other path or boundary constraints from the original problem.
To solve this NLP efficiently, gradient-based optimizers need more than just the constraint values. They also need sensitivity information: how does the final state of an interval, , change when the initial state, , or the control, , is slightly perturbed? These are the Jacobians, and . These derivatives can be computed through methods like finite differences or, more efficiently, using automatic differentiation on the integrator function.
This complete package of decision variables, constraints, and their derivatives provides the NLP solver with everything it needs to find a dynamically feasible and optimal solution.
What is the primary purpose of system discretization in optimal control?
When a continuous control input, , is modeled as a sequence of constant values over each time interval, this approach is called:
This process of discretization is the fundamental bridge between the theoretical world of continuous dynamics and the practical world of numerical optimization.