Final-State Constrained Optimal Control via a Projection Operator Approach
Ivano Notarnicola, Florian A. Bayer, Giuseppe Notarstefano and, Frank Allgower

TL;DR
This paper introduces a numerical method for solving nonlinear optimal control problems with exact final-state constraints, ensuring recursive feasibility and suitability for real-time applications.
Contribution
It extends the PRONTO method to exactly handle final-state constraints using a projection operator, guaranteeing feasibility and enabling real-time implementation.
Findings
Successfully applied to inverted pendulum state transfer
Guarantees recursive feasibility of final-state constraints
Enables real-time optimal control with exact final-state satisfaction
Abstract
In this paper we develop a numerical method to solve nonlinear optimal control problems with final-state constraints. Specifically, we extend the PRojection Operator based Netwon's method for Trajectory Optimization (PRONTO), which was proposed by Hauser for unconstrained optimal control problems. While in the standard method final-state constraints can be only approximately handled by means of a terminal penalty, in this work we propose a methodology to meet the constraints exactly. Moreover, our method guarantees recursive feasibility of the final-state constraint. This is an appealing property especially in realtime applications in which one would like to be able to stop the computation even if the desired tolerance has not been reached, but still satisfy the constraints. Following the same conceptual idea of PRONTO, the proposed strategy is based on two main steps which (differently…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsVehicle Dynamics and Control Systems · Advanced Optimization Algorithms Research · Advanced Control Systems Optimization
Final-State Constrained Optimal Control via a Projection Operator
Approach
Ivano Notarnicola1, Florian A. Bayer2, Giuseppe Notarstefano1, and Frank Allgöwer2 1Ivano Notarnicola and Giuseppe Notarstefano are with the Department of Engineering, Università del Salento, Lecce, Italy, [email protected]2Florian Bayer and Frank Allgöwer are with the Institute for Systems Theory and Automatic Control, University of Stuttgart, 70550 Stuttgart, Germany, {bayer, allgower}@ist.uni-stuttgart.de This result is part of a project that has received funding from the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (grant agreement No 638992 - OPT4SMART).
F. Bayer and F. Allgöwer would like to thank the German Research Foundation (DFG) for financial support within the Cluster of Excellence in Simulation Technology (EXC 310/2) at the University of Stuttgart.
Abstract
In this paper we develop a numerical method to solve nonlinear optimal control problems with final-state constraints. Specifically, we extend the PRojection Operator based Netwon’s method for Trajectory Optimization (PRONTO), which was proposed by Hauser for unconstrained optimal control problems. While in the standard method final-state constraints can be only approximately handled by means of a terminal penalty, in this work we propose a methodology to meet the constraints exactly. Moreover, our method guarantees recursive feasibility of the final-state constraint. This is an appealing property especially in realtime applications in which one would like to be able to stop the computation even if the desired tolerance has not been reached, but still satisfy the constraints. Following the same conceptual idea of PRONTO, the proposed strategy is based on two main steps which (differently from the standard scheme) preserve the feasibility of the final-state constraints: (i) solve a quadratic approximation of the nonlinear problem to find a descent direction, and (ii) get a (feasible) trajectory by means of a feedback law (which turns out to be a nonlinear projection operator). To find the (feasible) descent direction we take advantage of final-state constrained Linear Quadratic optimal control methods, while the second step is performed by suitably designing a constrained version of the trajectory tracking projection operator. The effectiveness of the proposed strategy is tested on the optimal state transfer of an inverted pendulum.
I Introduction
Optimal control problems (OCPs) are an active field of research in the controls community since they may arise in many application areas as, e.g., Process Control, Robotics, Aerospace and Automotive. Throughout the last decades, many different approaches have been presented to solve these problems. A possible classification of these methods has been given in [1]: (i) Dynamic programming, (ii) Indirect Methods, and (iii) Direct methods. While methods in the first class solve the OCP by finding optimal input segments using the Principle of Optimality (see, e.g., [2], or [3]), the ones in the second area are based on solving the necessary conditions for optimality using a (two-point) boundary value problem, which can be solved by means of calculus of variations ([4], [5]) or Pontryagin’s Maximum Principle ([6], [7]). The third direction is the most investigated and simplifies the OCP by parameterizing the control. According to the way the dynamics is handled, these methods are classified into fully discretized (or collocation) methods (see, e.g., [8]) and direct shooting methods, where the dynamics are included by some integration scheme (see, e.g., [9]). A detailed overview over Direct methods can, for example, be found in [10].
Of special interest for our paper is the PRojection Operator based Newton method for Trajectory Optimization (PRONTO) which was introduced in [11], see also [12]. In contrast to many other approaches solving optimal control problems, this method is able to guarantee feasibility of the dynamics after each iteration of the underlying Newton method using a “projection operator” defined by a feedback, closed-loop system. According to the classification in [1] this can be seen as a combination of shooting and collocation.
This method was designed to handle unconstrained optimal control problems (and extended to input-constrained problems in [13]), considering final-state constraints only approximately by means of a final penalty. Matching exactly final-state constraints is of interest in many control applications. This is the case, for example, in the field of hybrid systems, that is, systems that consist of continuous and discrete event dynamics (see, e.g., [14] and the references therein). Discontinuous jumps of continuous states may occur when the system state traverses a certain region of the state space. This demands for an exact satisfaction of constraints on the final state. Another field where this is of interest is the field of Model Predictive Control (MPC) (see, e.g., [15] and the references therein). In MPC, the system is controlled by means of repeatedly solving a finite-horizon OCP. In many approaches within MPC, convergence and stability can be guaranteed if a certain terminal condition is satisfied. This leads to the need of an algorithm being able to handle final state constraints.
A first approach to solve the nonlinear transfer problem was introduced in [16]. In there, the terminal constraint was satisfied asymptotically by iteratively choosing a terminal reference until the actual final state matches the target one.
The contribution of this paper is twofold. First, we introduce a new projection operator, inspired by the one presented in [12], such that not only the dynamics, but also the terminal constraint is satisfied after each iteration of the optimization algorithm. We reformulate the constrained projection as a root-finding of an infinite dimensional functional, which can be accomplished by means of a Newton root-finding in Banach spaces. Then, based on this new projection operator, as main contribution we propose an optimal control method solving final-state constrained problems which shows recursive feasibility. The proposed algorithm consists of two steps. First, a feasible descent direction is determined using a quadratic approximation of the nonlinear problem. The descent direction is chosen such that the mismatch on the final state is zero. Second, the perturbed curve is projected on the feasible manifold such that the dynamics and the terminal constraint are satisfied.
An interesting feature of the proposed algorithm is that it is amenable to realtime, fast MPC schemes. Indeed, in many applications one may not be able to run the algorithm until convergence is achieved with a desired tolerance. Due to a reduced computation time it could be that a (much) shorter number of iterations can be run. Since feasibility of both the dynamics and the final state-constraint are guaranteed at each iteration one can stop the computation and still get a feasible trajectory.
The paper is organized as follows. In Section II we introduce the problem setup and recall how to solve final-state constrained linear quadratic optimal control problems. PRONTO is introduced in Section III. Our new final-state constrained PRONTO is presented in Section IV and a numerical simulation for the optimal state-transfer of an inverted pendulum is given in Section V.
Notation
Given a smooth vector field , we denote by its derivative with respect to evaluated at , and, consistently, by its derivative with respect to . For the curve , we introduce the projections and such that and . Given a functional , with a Banach space, and a point , we denote by the first Fréchet derivative of evaluated at , and, consistently, by its second Fréchet derivative, [17].
II Problem Setup and Preliminaries
In this paper we consider a final-state constrained optimal control problem. That is, we aim at finding a trajectory of a dynamical system that minimizes a given objective functional while satisfying an initial and a terminal constraint. Formally, we consider the problem
[TABLE]
where is the running cost, is the nonlinear vector field describing the control system, and and are the initial and final fixed states respectively. We assume and to be functions. Notice that in the rest of the paper, for the sake of brevity, we will omit the dimensions of the quantities when it will be clear from the equations.
Before stating the main assumptions for problem (1), we recall some notation that will be also useful in the rest of the paper. Consider the Hamiltonian of (1) given by
[TABLE]
where is the costate. Then, for define
[TABLE]
where is a (state-input) curve representing a variation from , while , and denote the appropriate second derivative of the evaluated along the extremal state-control-costate trajectory, e.g., .
Given a dynamical system , , we say that a state-input curve is a trajectory of the system if it satisfies the dynamics, i.e., for all and . We denote the (infinite-dimensional) manifold of all system trajectories by , so that we write .
Given a trajectory , we denote by the manifold of curves satisfying the linearized dynamics
[TABLE]
with and for . We say that is the tangent space of the trajectory manifold at .
Assumption II.1** (Linear controllability).**
The system is linearly controllable around any trajectory. That is, for any defined on , the linearized system (4) is controllable over .
Assumption II.2** (Second Order Sufficiency).**
Given a trajectory , the Hamiltonian satisfies for and some , and the quadratic functional is positive-definite111See, e.g., [17] for the definition of positive definite functional. on .
Theorem II.3** ([16, Theorem ]).**
Let be a stationary trajectory of (1) with corresponding costate trajectory . Suppose that Assumption II.2 hold at . If the system is linearly controllable around , then is an isolated local minimum of (1).
Remark II.4**.**
Assumption II.1 not only is a sufficient condition for the theorem above, but also guarantees that the algorithm we propose will be solvable at each iteration.
II-A Linear Quadratic (LQ) optimal state transfer problem
We start by considering a special version of problem (1) in which the cost is quadratic and the dynamics is linear and time-varying, i.e., we consider the problem
[TABLE]
where we assume that and are piecewise continuous vectors, and , , , , and are piecewise continuous matrices with , , for some .
Remark II.5**.**
Problem (5) can be obtained as the linear-quadratic approximation of problem (1). In particular, and result from the linearization of the nonlinear dynamics at a given trajectory, while , , , and define the quadratic approximation of the nonlinear cost functional at the same trajectory.
Theorem II.6** ([16, Proposition ]).**
If in (5) describes a controllable linear time-varying system over and is positive definite on the space of the system trajectories, then problem (5) has a unique solution.
Next, we recall how to solve problem (5). We start by imposing the first-order necessary conditions of optimality.
Setting to zero the first variation of the Hamiltonian with respect to , we obtain the optimal feedback law
[TABLE]
By setting the first variations of the Hamiltonian with respect to and to zero and by using (6), we obtain the following linear two-point boundary value problem
[TABLE]
where is the costate, is a boundary value to be determined, and .
It can be shown that and in (9) are related via an affine relation, i.e.,
[TABLE]
By defining the gain matrix , the optimal input (6) results into the affine feedback law Then, equation (9) can be decoupled by means of the sweep method, [3], which leads to the following differential (Riccati) equations
[TABLE]
where the boundary conditions follow from (10).
The above equations should be integrated to determine the optimal control (6) and thus solve problem (5). However, the terminal vector is still unknown. Thus, we need to express explicitly the relation between and the terminal condition . Plugging (10) into the first equation of (9), we obtain
[TABLE]
Next, we observe that
[TABLE]
where is the unforced response of system (13) at time , whereas and are the forced responses due to the inputs and , respectively.
Focusing on , we note that it can be further split into two contributions related, respectively, to the forced and unforced responses of . The latter contribution depends directly on and it can be shown that equation (14) can be rewritten as , where is the controllability Gramian matrix,
[TABLE]
evaluated at time , with being the state transition function associated to closed-loop system with state matrix , while denotes the terminal state of
[TABLE]
where denotes the forced response of , i.e., it solves (12) with zero terminal condition.
To conclude, can be computed as
[TABLE]
III Projection Operator Newton Method for Trajectory Optimization (PRONTO)
PRONTO was introduced in [12] to solve the following finite-horizon optimal control problem
[TABLE]
which, differently from problem (1), has a terminal penalty rather than a terminal constraint.
The key idea of PRONTO is to (i) convert the dynamically constrained (infinite-dimensional) optimization problem into an unconstrained one by means of a projection operator, and (ii) solve the unconstrained problem via an infinite-dimensional Newton method.
We start recalling the projection operator, which is based on a trajectory tracking feedback law.
III-A The trajectory tracking nonlinear projection operator
Suppose that (defined on ) is a bounded state-input curve and let be the trajectory determined by the nonlinear feedback system
[TABLE]
Under suitable conditions on and , the feedback system in (16) defines a continuous nonlinear projection operator .
The operator is a projection since on its domain. Indeed, independent of , if is a trajectory of , then is a fixed point of , i.e., . As a consequence, a trajectory can be characterized in terms of the projection operator as if and only if . In [12], the authors have proven that the projection operator is as smooth as and one can compute (and analyze) its derivatives. In particular, if is , then the first derivative of the projection operator is the linear mapping defined by
[TABLE]
which is obtained by linearizing (16) about . It can be shown that is itself a projection, so that if and only if .
III-B The PRONTO algorithm
Writing the cost in (15) as the functional
[TABLE]
we see that the optimal control problem (15) is equivalent to the constrained optimization problem . Using the trajectory characterization and defining the constrained problem can be converted into an unconstrained one as
The PRONTO algorithm, stated in Algorithm 1, is based on a Newton method applied to and includes two key steps. First, the search direction is determined by an optimization problem considering the first and second derivatives of the nonlinear functional . Since the derivatives of are computed, the projection is inherently considered within the calculation of the search direction. Moreover, the search direction is limited to the tangent space of the trajectory manifold at the current trajectory , that is, . Second, the update is performed using the projection in (18), thus a feasible trajectory is determined after each iteration of the optimization algorithm.
Remark III.1**.**
Notice that step (17) consists of solving a (standard) LQR problem in the form
[TABLE]
Step (18) consists of computing the updated trajectory by running the closed loop system (16) with (given) curve .
IV Final-state constrained PRONTO
In this section, we introduce an optimization algorithm which solves the nonlinear optimal state transfer problem. The key approach is to: (i) introduce a projection operator, inspired by the one introduced in [12] (and recalled in Section III), such that not only the dynamics, but also the terminal constraint is satisfied, and (ii) compute a descent direction that satisfies the final-state constraint to first-order.
IV-A Final-state constrained projection operator
The Projection Operator as recalled in Section III-A is not able to guarantee an exact matching of the terminal constraint. As a key step of our algorithm, we introduce a final-state constrained projection operator, satisfying where, as usual, is a curve while a trajectory. Our idea is to design the operator as an iterative routine in which, at each iteration: (i) we perturb the actual trajectory in order to hit exactly the terminal constraint and (ii) we project the resulting curve by means of the standard projection operator (16).
The final-state constrained projection can be formalized in terms of an infinite dimensional root-finding. Given , let us define a functional which associates to a state-input curve the difference between its terminal state and . Hence, a trajectory being a root of , i.e., such that , is exactly what we expect to be the result of the final-state constrained projection operator when applied to a curve .
Following the same high level idea in Section III-B to derive the PRONTO algorithm, we convert the constrained root-finding of into the unconstrained root-finding of , with being the (unconstrained) projection operator introduced in (16).
Given an initial curve , the root of the functional is found by means of an infinite-dimensional Netwon method. Formally, at each iteration the perturbation is obtained by setting to zero the first order approximation of the perturbed functional, i.e. by solving for the following equation
[TABLE]
Using the chain rule, the linear mapping applied to a state-input curve can be expressed as . When is a trajectory, the linear mapping is a projection on the tangent space (see [12]). Moreover, the first order expansion of the perturbed functional turns out to be . Thus, we can conclude that equation (19) simply enforces a terminal condition on , i.e., find the state component of such that
[TABLE]
Note that, since the linear mapping is not invertible, the solution of (19) is not unique.
A finite dimensional counter-part of equation (19) is a linear system of the form . When is non-empty, the equation has not a unique solution. A typical approach to overcome this problem is to consider the equivalent least-square problem, which selects the minimum norm solution of the linear system.
Motivated by this finite-dimensional observation, a reasonable choice is to select a satisfying condition (20) with minimum norm. It can be obtained solving the following linear quadratic optimal state transfer problem
[TABLE]
where and result by the linearization of dynamics around the current iterate .
A pseudo code of the constrained projection operator is given in the following table (Algorithm 2).
Remark IV.1**.**
The convergence of Algorithm 2 can be guaranteed by satisfying the hypotheses of Newton-Kantorovich theorem (see, e.g., [18, 19]).
IV-B fsPRONTO Algorithm
We are ready to present the final-state constrained PRojection Operator Newton method for Trajectory Optimization (fsPRONTO) algorithm which is an iterative algorithm able to solve problem (1). The algorithm extends the PRONTO outlined in Section III-B combining a particular descent direction and the final-state constrained projection operator presented in Section IV-A.
First, we search for a descent direction satisfying the final constraint to first-order by means of a linear-quadratic state transfer problem as in (5). Since each is already feasible, in order to maintain feasibility to first order, the perturbation must satisfy the terminal constraint . Second, we perform a backtracking line-search to modulate the descent direction. Finally, we perform the projection step by means of the constrained projection operator described by Algorithm 2.
The fsPRONTO algorithm is formally stated in the following table (Algorithm 3).
In the following, we have a closer look at some of the specific aspects of our newly presented Algorithm 3.
Remark IV.2**.**
Notice that step (21) consists of solving a linear quadratic optimal state transfer problem in the form
[TABLE]
as discussed in detail in Section II-A. Step (23) consists of computing the updated trajectory via Algorithm 2 with a (given) curve .
V Numerical Computations
In this section we provide numerical computations showing the effectiveness of the proposed nonlinear algorithm. We solve the optimal state transfer problem for a driven inverted pendulum. We consider the problem
[TABLE]
with m being the length of the pendulum and the gravity acceleration. We set the time horizon to s. Moreover, is a (continuous) desired curve, is a symmetric, positive-definite matrix and is a positive scalar.
Before testing the fsPRONTO algorithm, we highlight the applicability of the final-state constrained projection operator presented in Algorithm 2.
We consider a given curve which is not a feasible trajectory of the inverted pendulum. The projected state is depicted in Figure 2. Both projections (in magenta) and (in red) provide a trajectory close to the curve (in green). However, when closely checking the terminal state, one can see that only the trajectory projected under satisfies the terminal constraint.
Next, we apply the fsPRONTO (Algorithm 3) in order to optimize the trajectory of an inverted pendulum. We use and as cost parameters. The choice of a higher penalty on the first component of the least-square distance will result in an optimal solution (solid red) which almost overlaps the first component of the desired curve (dashed-dot blue) as shown in Figure 1.
It is worth nothing that, as expected, the algorithm guarantees recursive feasibility. In fact, the terminal error, highlighted in the inset, is zero at each iteration for both the state components.
In Figure 3 the descent at each iteration, in logarithmic scale, is depicted. It gives a measure of the rate of convergence of the algorithm which appears to be quadratic.
VI Conclusions
In this paper we have presented a new numerical approach for solving final-state constrained optimal control problems. The main advantage of the proposed method is that it guarantees recursive feasibility of both the dynamics and the final-state constraint at each iteration. Specifically, we have proposed a Newton method, inspired to the one introduced in [11], based on: (i) the design of a final-state constrained projection operator, being able to find a trajectory satisfying the final constraint, and (ii) the computation of a descent direction satisfying the final constraint to first-order.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] M. Diehl, H. G. Bock, H. Diedam, and P.-B. Wieber, “Fast direct multiple shooting algorithms for optimal robot control,” in Fast motions in biomechanics and robotics . Springer, 2006, pp. 65–93.
- 2[2] D. P. Bertsekas, Dynamic Programming and Optimal Control , 2nd ed. Athena Scientific, 2005.
- 3[3] A. E. Bryson and Y.-C. Ho, Applied Optimal Control - Optimization, Estimation, and Control . Hemisphere Publishing Cooperation, 1975.
- 4[4] D. E. Kirk, Optimal Control Theory . Prentice-Hall Inc., 1970.
- 5[5] A. P. Sage, Optimum Systems Control . Prentice-Hall, 1968.
- 6[6] L. S. Pontryagin, V. G. Boltyanskii, R. Gamkrelidze, and E. F. Mishchenko, The Mathematical Theory of Optimal Processes . Wiley (NY), 1962.
- 7[7] D. Liberzon, Calculus of Variations and Optimal Control Theory: a Concise Introduction . Princeton, NJ: Princeton University Press, 2012.
- 8[8] A. Cervantes and L. T. Biegler, “Large-scale DAE optimization using a simultaneous NLP formulation,” AI Ch E Journal , vol. 44, no. 5, pp. 1038–1050, 1998.
