From Optimization to Optimal Control
Optimal control is concerned with choosing the best possible evolution of a dynamical system. The word best must always be interpreted relative to a clearly defined performance measure. Depending on the application, one may wish to minimize travel time, energy consumption, fuel use, tracking error, vibration, or economic cost. In other applications, the objective may be to maximize profit, harvested energy, range, or reliability.
The central ideas of optimal control are easiest to understand by first returning to ordinary scalar optimization. In scalar optimization, the unknown is a number. In optimal control, the unknown is an entire function of time. The mathematical transition from optimizing a number to optimizing a function is the key conceptual step developed in this section.
Optimization as Efficient Decision Making¶
Optimization appears whenever a task can be accomplished in more than one way and some alternatives are preferred over others. Everyday scheduling, route planning, engineering design, and resource allocation all possess the same basic structure:
there is a decision to be made;
there is a goal or objective;
there are constraints that restrict what is possible;
there may be many feasible alternatives;
one seeks the alternative that performs best according to a chosen metric.
For example, suppose a person must complete grocery shopping. The task can be completed by many different routes through the store. One route may minimize time, while another may minimize walking distance or physical effort. The optimal route therefore depends on the chosen objective.
The Elements of an Optimization Problem¶
A generic finite-dimensional optimization problem can be written as
subject to
Here:
is the vector of decision variables;
is the objective function;
are inequality constraints;
are equality constraints.
The set of all points satisfying the constraints is called the feasible set:
The grocery-shopping example illustrates infeasibility. If the complete task must be finished in two minutes, no physically realizable route may satisfy the time constraint. If the allowed time is increased to three hours, the feasible set may become nonempty.
The Objective Function and the Meaning of “Optimal”¶
The objective function is the numerical quantity used to compare feasible solutions. For a minimization problem, a feasible point is globally optimal if
For a maximization problem, is globally optimal if
Different objective functions generally produce different optimal solutions. For the same physical task, minimizing elapsed time may lead to a different decision than minimizing energy expenditure.
Scalar Functions¶
The simplest optimization setting is a scalar-valued function of a scalar variable:
The input is a real number, and the output is also a real number. For a smooth function, classical calculus provides useful necessary and sufficient conditions for identifying local minima and maxima.
Critical Points and the First-Derivative Condition¶
Suppose is differentiable. At an interior local minimum or maximum, the slope must vanish under standard regularity assumptions:
For the smooth functions considered here, critical points are obtained by solving
Let
denote all roots of this equation. These points are only candidates for extrema. A zero derivative does not by itself prove that a point is a minimum or maximum.
Why the first derivative vanishes¶
If is an interior local minimum and is differentiable, then for sufficiently small ,
For ,
while for ,
Taking the limit from the right and left implies
This result is a necessary condition for a smooth interior optimum, but it is not sufficient.
The Second-Derivative Test¶
The second derivative describes local curvature.
The interpretation follows from a second-order Taylor expansion:
Because ,
Since , the sign of determines whether nearby function values are larger or smaller.
Stationary Points That Are Not Extrema¶
A stationary point need not be a minimum or maximum.
Consider
Then
so
However, is neither a local minimum nor a local maximum, because for and for .
Figure 1:A stationary inflection point: , but is neither a local minimum nor a local maximum.
Local and Global Extrema¶
A local optimum is best only in a neighborhood. A global optimum is best over the entire admissible domain.
Figure 2:A smooth function may have several local extrema. Only one may be globally optimal.
For a smooth function with finitely many local maxima , the global maximum among those candidates is found by comparing their objective values:
Constrained Scalar Optimization¶
Now consider
The feasible set is the closed interval
A crucial point is that the optimizer may lie at a boundary:
At a boundary optimum, the derivative need not be zero.
Why the derivative test can fail¶
Consider
Then
for every . There is no solution of , yet the maximum is clearly
Thus, the equation
detects only smooth interior stationary points. It does not detect active-boundary optima.
A Systematic Procedure on a Closed Interval¶
If is continuous on , the extreme value theorem guarantees that attains both a global minimum and a global maximum on .
A systematic procedure is:
solve
for all critical points in ;
evaluate at every interior critical point;
evaluate the endpoints:
compare all candidate values.
Therefore,
where are the critical points in .
One-Sided Neighborhoods at a Boundary¶
At an interior local maximum , one compares to function values on both sides. At a right boundary , only feasible perturbations to the left are allowed.
Thus, is a local maximum relative to the feasible set if there exists such that
Similarly, is a local maximum relative to if there exists such that
These are one-sided optimality statements because the feasible set restricts allowable perturbations.
Maximum Value Versus Maximizing Argument¶
There is an important distinction between the value of the objective and the point at which that value occurs.
The maximum value is
The maximizing argument is
The first expression returns a number in the range of . The second returns a point in the domain of .
For example, if
then
whereas
If several points yield the same maximum value, the argmax is a set:
A Maximum-Principle Viewpoint¶
A derivative-free statement of optimality is
Equivalently,
This statement is more general than the condition because it remains meaningful when:
the optimum lies on the boundary;
the function is nonsmooth;
the decision variable is multidimensional;
the feasible set is discrete;
derivatives do not exist or are difficult to compute.
Derivative conditions are powerful computational tools when their assumptions hold, but they are not the definition of optimality.
From Points to Functions¶
Classical scalar optimization searches for a number:
Optimal control searches for one or more functions of time:
The unknown is therefore an entire trajectory, not a single point.
A standard optimal control problem has the form
subject to the differential equation
boundary conditions such as
and possibly path constraints
Functions and Functionals¶
A function maps numbers or vectors to numbers or vectors. For example,
A functional maps an entire function to a number:
where is a space of admissible functions.
A common functional is
The input to is the complete function , while the output is a scalar.
A Route-Planning Interpretation¶
Suppose a traveler wishes to move from an initial location to a destination. A route can be represented by a path
Many paths may connect the same endpoints:
A minimum-time problem seeks
subject to kinematic, road, and speed constraints.
A minimum-distance problem instead minimizes
The two formulations may produce different paths. Again, the meaning of optimality depends on the performance index.
The Conceptual Transition¶
The progression from elementary optimization to optimal control can be summarized as follows:
| Concept | Static optimization | Optimal control |
|---|---|---|
| Unknown | Point | Function or trajectory |
| Objective | Functional | |
| Constraints | Algebraic | Differential and algebraic |
| Solution | Optimal point | Optimal path or control history |
| Mathematical tools | Calculus, nonlinear programming | Calculus of variations, maximum principle, dynamic programming, direct transcription |
Chapter Summary¶
The main ideas are:
Optimization selects the best feasible decision according to a specified performance measure.
A problem may be infeasible if its constraints cannot be satisfied.
For a smooth scalar function, interior critical points satisfy
The second derivative classifies nondegenerate critical points:
A critical point need not be an extremum.
Local extrema are not necessarily global extrema.
In constrained optimization, the optimizer may occur on the boundary, where the derivative need not vanish.
The expression
gives the optimal value, while
gives the maximizing argument.
Optimal control extends optimization from points to functions.
A functional maps a function to a scalar.
Connection. Optimizing trajectories requires a space in which functions themselves can vary, so the scalar ideas above now give way to function spaces and functionals.