Convex Optimization Formulation of Robust …. Introduction Model Predictive Control (MPC) design...

15
Convex Optimization Formulation of Robust Nonlinear Model-Predictive-Controller Design S. Sai Vaddi * Optimal Synthesis, Los Altos, 94022, USA The objective of this work is to formulate the solution to a model predictive control de- sign problem involving nonlinear system dynamics, nonlinear state and control constraints, and parametric plant uncertainties, as an optimization problem that has the potential to be solved in near real-time. A convex relaxation of the problem that is suitable for fast numerical computation is derived in this paper. Affine approximations over small trust regions are used to address the nonlinearities. Min-Max formulation is used to address the uncertainty in the plant dynamic models. The paper first illustrates the approaches for handling nonlinear effects and plant uncertainties separately using numerical examples. A combined formulation that can accommodate nonlinearity and plant uncertainties together is formulated later. The robust-nonlinear model predictive controller is tested on nonlin- ear dynamic system representing the rigid body angular velocity dynamics with uncertain moment of inertia parameters. Monte-Carlo simulations conducted to verify the robust- ness indicate that errors resulting from the robust-nonlinear formulations are significantly better than those obtained with the nonlinear formulation alone. I. Nomenclature x - State vector of size (n × 1) x * - State reference trajectory u * - Control reference trajectory x min ,x max - Lower and upper limits of the state vector respectively (n × 1) u min ,u max - Lower and upper limits of the control vector respectively (m × 1) f - Vector field representing the nonlinear dynamic system size (n × 1) u - Control vector of size (m × 1) p - Parameter vector of size (l × 1) N - Horizon x 0 - Initial condition x f - Final condition Δx - Vector representing the size of trust region for state components (n × 1) Δu - Vector representing the size of trust region for control components (n × 1) Δp - Vector representing the size of parameter uncertainties (l × 1) ΔT - Sampling time period (l × 1) h e (x, u) - Nonlinear equality constraint h i (x, u) - Nonlinear inequality constraint A de ,B de ,C de - Matrices representing affine approximation obtained by Euler integration A ds ,B ds ,C ds - Matrices representing affine approximation obtained using state transition matrices A dp ,B dp ,C dp - Matrices representing affine approximation obtained using particle filter approach LP E - Linear propagation error NLPE - Nonlinear propagation error * Research Scientist, Los Altos, CA, AIAA Member. 1 of 15 American Institute of Aeronautics and Astronautics

Transcript of Convex Optimization Formulation of Robust …. Introduction Model Predictive Control (MPC) design...

Convex Optimization Formulation of Robust Nonlinear

Model-Predictive-Controller Design

S. Sai Vaddi∗

Optimal Synthesis, Los Altos, 94022, USA

The objective of this work is to formulate the solution to a model predictive control de-sign problem involving nonlinear system dynamics, nonlinear state and control constraints,and parametric plant uncertainties, as an optimization problem that has the potential tobe solved in near real-time. A convex relaxation of the problem that is suitable for fastnumerical computation is derived in this paper. Affine approximations over small trustregions are used to address the nonlinearities. Min-Max formulation is used to address theuncertainty in the plant dynamic models. The paper first illustrates the approaches forhandling nonlinear effects and plant uncertainties separately using numerical examples. Acombined formulation that can accommodate nonlinearity and plant uncertainties togetheris formulated later. The robust-nonlinear model predictive controller is tested on nonlin-ear dynamic system representing the rigid body angular velocity dynamics with uncertainmoment of inertia parameters. Monte-Carlo simulations conducted to verify the robust-ness indicate that errors resulting from the robust-nonlinear formulations are significantlybetter than those obtained with the nonlinear formulation alone.

I. Nomenclature

x - State vector of size (n× 1)

x∗ - State reference trajectory

u∗ - Control reference trajectory

xmin, xmax - Lower and upper limits of the state vector respectively (n× 1)

umin, umax - Lower and upper limits of the control vector respectively (m× 1)

f - Vector field representing the nonlinear dynamic system size (n× 1)

u - Control vector of size (m× 1)

p - Parameter vector of size (l × 1)

N - Horizon

x0 - Initial condition

xf - Final condition

∆x - Vector representing the size of trust region for state components (n× 1)

∆u - Vector representing the size of trust region for control components (n× 1)

∆p - Vector representing the size of parameter uncertainties (l × 1)

∆T - Sampling time period (l × 1)

he(x, u) - Nonlinear equality constraint

hi(x, u) - Nonlinear inequality constraint

Ade, Bde, Cde - Matrices representing affine approximation obtained by Euler integration

Ads, Bds, Cds - Matrices representing affine approximation obtained using state transition matrices

Adp, Bdp, Cdp - Matrices representing affine approximation obtained using particle filter approach

LPE - Linear propagation error

NLPE - Nonlinear propagation error

∗Research Scientist, Los Altos, CA, AIAA Member.

1 of 15

American Institute of Aeronautics and Astronautics

II. Introduction

Model Predictive Control (MPC) design methodology is widely used in the industry for process controlapplications.1 Model predictive controllers are also being actively used in aerospace engineering applicationssuch as aircraft,2 spacecraft,3 missile4 and hypersonic vehicles.5 A unique advantage of the MPC method-ology over conventional feedback control design is the ability to accommodate limits on state and controlvariables. Traditionally, MPC designs have been formulated using discrete-time linear dynamic system mod-els. A quadratic performance index that is a function of the state and control variables is minimized over achosen look-ahead horizon while satisfying the system dynamic propagation constraints. Linear constraintson state and control variables, such as upper and lower limits on state and control variables are also typ-ically included in these formulations. The resulting optimization problems are convex and can be solvedusing quadratic programming techniques.6 A major hurdle in adopting nonlinear dynamic system models isthat the resulting nonlinear optimization problem cannot be solved easily in general. The present work seeksto address this issue by adopting computationally efficient convex relaxations of the nonlinear optimizationproblem. The solution to the robust nonlinear model predictive control problem is posed as the solution toa sequence a linear model-predictive-control problems. The work is motivated by recent developments7 infast computation of linear model predictive control solutions by Wang and Boyd (Ref.[7]). Computationaltechniques that exploit the special structure of the equations resulting from MPC were identified and solvedin Ref.[7]. Taking advantage of the special structure for a dynamic system with n states and m controland N time steps reduces the computational cost to O(N(n+m)3), as opposed to a computational cost ofO(N3(n+m)3) when the special structure is not exploited.

Section III describes the nonlinear model predictive control problem description with constraints andplant uncertainties. The continuous time infinite dimensional optimization problem is converted to a finitedimensional optimization problem by discretizing over time-domain and the parameter space in Section IV.Affine representation techniques for approximating the nonlinear system dynamics and nonlinear constraintsare presented in Section V. Sequential convex optimization formulation of a nonlinear model predictivecontrol problem using affine representation of the nonlinear system dynamics and nonlinear constraints overa trust region is illustrated with an example in Section VI. Robust model predictive control suitable forlinear dynamic system where uncertainties modeled by an ensemble of system matrices is illustrated withan example in Section VII. A combined formulation that addresses both the nonlinear effects and modelinguncertainties is derived and illustrated with an example in Section VIII.

III. Problem Description

A nonlinear dynamic system of the following form is considered,

x = f(x, u, p) (1)

where x is the state vector of length n, u is the control vector of length m, and p is the plant parametervector of length l. In this work it is assumed that modeling uncertainties are characterized in terms ofthe parameter vector. The actual value of the parameter vector is unknown but is assumed to lie within abounded convex set P such as a box described below,

P ={p∣∣∣|p− p∗| ≤ ∆p

}(2)

The task for the controller is to transfer the system from a given initial state x0 to a specified final statexf at a specified final time tf . It is desired to compute the time histories of control and the associated statenecessary to achieve this task. Constraints could result from limitations of resources such as bounds oncontrol magnitudes and system safety considerations expressed in terms of state variables. In some scenariossuch as a spacecraft control, it is crucial to use as little control as possible to increase the longevity of themission. Therefore, it is desirable to minimize a performance index that is a function of control time history.All the above considerations can be mathematically represented as an optimization problem as follows:

minimize

∫ tf

t0

uTudt (3)

subject to x = f(x, u, p), ∀ p ∈ P ={p∣∣∣|p− p∗| ≤ ∆p

}(4)

2 of 15

American Institute of Aeronautics and Astronautics

x(t0) = x0 (5)

x(tf ) = xf (6)

xmin ≤ x(t) ≤ xmax,∀t ε [t0 tf ] (7)

umin ≤ u(t) ≤ umax,∀t ε [t0 tf ] (8)

he(x, u) = 0,∀t ε [t0 tf ] (9)

hi(x, u) ≤ 0,∀t ε [t0 tf ] (10)

where the continuous-time state and control time histories over [t0 tf ] are the decision variables. It shouldbe noted that even though a quadratic performance index is used here any convex function can be used inthe context of the current work. The above optimization problem is in general difficult to solve analyticallyor numerically. However, with appropriate relaxations described later in this work the problem becomescomputationally tractable. The first step in this process is the discretization of state and control variablesover time domain, and the discretization of the parameter space, which are further discussed in the followingsection.

IV. Discretization

The primary purpose of discretization is to convert the infinite dimensional continuous time decisionvariables to finite number of discretized state and control decision variables. Discretization is also done overthe parameter space to facilitate easier modeling of the dynamic system propagation constraint over theuncertain-parameter space. A sampling time-period ∆t is chosen and the control time-history is replaced byvalues at discrete-time instances that are integral multiples (k∆t, k = 0..N) of the sampling period. Controland state variables at intermediate time values can be obtained by interpolation. The discretized version ofthe continuous variable optimization problem can be written as shown below,

minimize ΣN−1k=0 u[k]Tu[k]

subject to x[0] = x0

x[N ] = xf

xmin ≤ x[k] ≤ xmax, ∀k = 0..(N − 1)

umin ≤ u[k] ≤ umax, ∀k = 0..(N − 1)

x[k + 1] = F (x[k], u[k], p), ∀k = 0..(N − 1), ∀ p ∈ P ={p1, p2, ...pL

}he(x[k], u[k]) = 0, ∀k = 0..(N − 1)

hi(x[k], u[k]) ≤ 0, ∀k = 0..(N − 1)

(11)

where the optimization variables are,

x[1], x[2], .., x[N − 1], u[0], u[1], .., u[N − 1] (12)

and the problem data is,

x0, xf , N, xmin, xmax, umin, umax, ∆t, F, he, hi, p1, p2, ..pL (13)

The nonlinear equations of motion can be discretized using a numerical integration approach such as thefourth-order Runge-Kutta method. The state at time t = (k+ 1)∆t is computed using the state and controlinformation at time t = k∆t.

x[k + 1] = F (x[k], u[k]) (14)

It should be noted that the functions f, F, he, hi can be computer programs. Explicit analytical represen-tation of these functions is not assumed in this work.

The optimization problem described by Eq.11 is convex without the last three constraints. Affine ap-proximations are sought for these constraints in the following section to convert the nonlinear optimizationproblem into a convex optimization problem. These approximations are typically valid over a limited statespace and not globally. However, in the current context, approximations that are valid over a small trustregion around a reference point are of particular interest.

F (x, u) ≈ Ax+Bu+ C, ∀ (x, u) ∈ T ={

(x, u)∣∣∣|x− x∗| ≤ ∆x and |u− u∗| ≤ ∆u

}(15)

3 of 15

American Institute of Aeronautics and Astronautics

V. Affine Approximation of Nonlinearities

Affine approximation of the nonlinearity can be obtained using approaches such as Taylor series expansionand the particle filter approach.

A. Taylor Series Expansion

Taylor series expansion of the nonlinear vector field about a reference trajectory of state x∗ and control u∗

is a standard approach used to obtain linearized representation of the nonlinear dynamic system.

x∗ + δx ≈ f(x∗, u∗, p) +Acδx+Bcδu (16)

Ac =∂f

∂x

∣∣∣x∗,u∗,p

Bc =∂f

∂u

∣∣∣x∗,u∗,p

(17)

x∗ = 0 (18)

δx ≈ f(x∗, u∗, p) +Acδx+Bcδu (19)

The approach could be used for the functions representing the nonlinear equality and inequality con-straints,

he(x, u) = he(x∗, u∗) +Aheδx+Bheδu (20)

hi(x, u) = hi(x∗, u∗) +Ahiδx+Bhiδu (21)

where,

Ahe =∂he∂x

∣∣∣x∗,u∗,p

Bhe =∂he∂u

∣∣∣x∗,u∗,p

(22)

Ahi =∂hi∂x

∣∣∣x∗,u∗,p

Bhi =∂hi∂u

∣∣∣x∗,u∗,p

(23)

An integration routine is required to convert the linear differential equation in Eq.19 into linear differenceequation.

1. Euler Integration

The linearized system dynamic model can be integrated using an approximate scheme such as Euler inte-gration shown below:

δx[k + 1]− δx[k]

∆t≈ f(x∗, u∗, p) +Acδx+Bcδu (24)

δx[k + 1] ≈ Adeδx[k] +Bdeδu[k] + Cde (25)

Ade = (I + ∆tAc) Bde = ∆tBc Cde = ∆tf(x∗[k], u∗[k], p) (26)

Euler integration is a computationally inexpensive and is suitable for small time steps.

2. Integration Using State Transition Matrices

Integration can be done more accurately for large steps using the state transition matrices involving matrixexponentials:

δx[k + 1] ≈ Adsδx[k] +Bdsδu[k] + Cds (27)

Ads = eAc∆t Bds =

∫ ∆t

0

eAcsBcds Cds = f(x∗[k], u∗[k], p)

∫ ∆t

0

eAcsds (28)

It should be noted that computing the matrix exponentials is computationally expensive compared to Eulerintegration.

Equations 25 and 27 are affine approximations of the nonlinear dynamic propagation equation x[k+ 1] =F (x[k], u[k]) valid over a small trust region around x∗, u∗. However, the exact size of the region and accuracyof the approximation cannot be explicitly established.

4 of 15

American Institute of Aeronautics and Astronautics

B. Using Particle Filter Approach

The particle filter approach involves sampling several state xi and control ui vectors over the trust region.Linear approximation (Adp, Bdp, Cdp) can be obtained by minimizing the choice of norm of the approxima-tion error over the sampled state and vectors:

minimize

K∑i=1

∣∣∣F (xi, ui)−Adpxi −Bdpui − Cdp

∣∣∣ (29)

minimize

K∑i=1

(F (xi, ui)−Adpxi −Bdpui − Cdp

)2

(30)

minimize maxi=1..K

∣∣∣F (xi, ui)−Adpxi −Bdpui − Cdp

∣∣∣ (31)

It should be noted that each of the above optimization problems is convex and can be solved very efficiently.The actual computational effort required for implementing the above approach depends on the number ofparticles sampled from the trust region. It is likely that this approach could be the most computationallyexpensive of all the approaches. However, this approach has a unique advantage: unlike the Taylor seriesexpansion whose region of validity cannot be readily generated, the particle filter approach with sufficientlylarge number of samples, and sufficiently small trust region leads to an affine approximation that is validover a known trust region.

VI. Nonlinear Model Predictive Control

In this section the nonlinear model predictive control problem without parameteric uncertainty will beconsidered. Affine representations presented in the previous section will be used to convert nonlinear con-straints into convex constraints. The solution methodology involves solving a sequence of convex optimizationproblems and incrementally improving the solution by the size of a pre-chosen trust region at each iteration.The definition of a trust region over the state and control variables is a crucial component of the proposedapproach. Forcing the solution to only change by the size of the trust region reinforces the validity of theaffine approximations. The validity of the affine representations can be improved by decreasing the size ofthe trust region. The solution is thus continually improved by redefining the trust region around the solutionobtained in each iteration. Appropriately tuned, the approach is expected to converge to the solution of thenonlinear optimization problem over a few iterations. Steps involved in each iteration of this approach aredescribed in the following sub-section.

A. Sequential Convex Optimization Over Trust Region

Initialization

1. Start with i = 1

2. Initialize x∗1 using an interpolation scheme such as linear or cubic spline interpolation between x0 andxf .

3. Set u∗1 = 0

4. Select size of trust region ∆x and ∆u

Iterations

1. Compute Ai(k), Bi(k) and Ci(k) using x∗i and u∗i such that:

F (x∗i [k] + δx, u∗i [k] + δu)− x∗i [k + 1] ≈ Ai(k)δx+Bi(k)δu+ Ci(k) (32)

∀δx < ∆x and ∀δu < ∆u (33)

5 of 15

American Institute of Aeronautics and Astronautics

2. Solve

minimize ΣN−1k=0 (u∗i + δu[k])T (u∗i + δu[k]) + λ|δx[k + 1]−Ai(k)δx[k]−Bi(k)δu[k]− Ci(k)| (34)

subject to δx[0] = 0 (35)

δx[N ] = 0 (36)

xmin ≤ δx[k] + x∗i [k] ≤ xmax, ∀k = 0..(N − 1) (37)

umin ≤ δu[k] + u∗i [k] ≤ umax, ∀k = 0..(N − 1) (38)

−∆x[k] ≤ δx[k] ≤ ∆x[k], ∀k = 0..(N − 1) (39)

−∆u[k] ≤ δu[k] ≤ ∆u[k], ∀k = 0..(N − 1) (40)

3. Set x∗i = x∗i + δx∗, u∗i = u∗i + δu∗

4. Compute σl(i) = ΣN−1k=0 |LPEi(k)| where LPEi(k) = δx[k + 1]−Ai(k)δx[k]−Bi(k)δu[k]− Ci(k)

5. Compute σn(i) = ΣN−1k=0 |NLPEi(k))| where NLPEi(k) = x∗i [k + 1]− F (x∗i [k], u∗i [k])

6. If σn(i) < ε terminate

7. Else set x∗i+1 = x∗i , u∗i+1 = u∗i , i = i+ 1 and go to step 1

Special attention is required for constraints in Eqs.(39) and (40). These constraints ensure that thesolution only changes by a small amount dictated by the size of the trust region. It should also be notedthat the dynamic propagation constraint is not explicitly implemented as a constraint in Step 2. Insteadit is included in the cost function because of the trust region limitations from Eqs.(39) and (40). However,the initial and final conditions constraints are implemented in all iterations by Eqs.(35) and (36). As theiterations keep increasing the cost resulting from the violation of dynamic propagation constraint is expectedto go to zero. However, the real performance metric for convergence is the nonlinear propagation constraintviolation characterized by σn. The size of the trust can vary with time k and the iteration counter i. Itis desirable to make smaller changes to the trajectory as the solution converges. The above formulationcan also accommodate limits on control slew rate and time varying upper and lower limits on the state andcontrol variables. Nonlinear equality (h(x, u) <= 0) and inequality h(x, u) = 0 constraints on state andcontrol variables can also be implemented using the trust region approach. They were not shown in theabove formulation for the sake of brevity. Another important point to note is that optimization problemin Step 2 can be solved efficiently using the the computational approach developed in Ref.[7]. Numericalresults obtained from implementing the sequential convex optimization approach on rigid body dynamicsare presented in the following sub-section.

B. Example

The rotational dynamics of a rigid body can be described by Euler’s equations as follows:

ω1 =I2 − I3I1

ω2ω3 + k1c1 + k2c31 (41)

ω2 =I3 − I1I2

ω2ω3 + k1c2 + k2c32 (42)

ω3 =I1 − I2I3

ω2ω3 + k1c3 + k2c33 (43)

where x = [ω1 ω2 ω3]T is the state vector representing the angular velocity vector and the external torquesare computed as a nonlinear function of hypothetical control vector u = [c1 c2 c3]T . The affine representationused in this example is obtained by using Taylor series expansion and Euler Integration. CVX software8 wasused for solving the optimization problem corresponding to step 2 of the iterations. The initial condition,final condition, parameter values, final time, discretization time step and the size of trust region are givenbelow:

x0 = [1 − 1 0.1]T , xf = [0 0 1]T (44)

6 of 15

American Institute of Aeronautics and Astronautics

I1 = 5, I2 = 7, I3 = 9, k1 = 1, k2 = 3 (45)

tf = 10, ∆t = 0.1, N = 100 (46)

λ = 1e5, ∆x = 0.1, ∆u = 0.1 (47)

Shown in the figure 1(a) are the optimal state time histories at the end of 20 iterations and the timehistories obtained by actual nonlinear propagation. The optimal control time history is shown in figure1(b). The sharp knee in the control history can be ironed out by incorporating the slew rate constraint.The nonlinear propagation error time histories at the first and last iterations are shown in figure 2(a) andfigure 2(b) respectively. It may be observed that the maximum error reduced from 2 rad/s to 0.05 rad/s.Similar plots for the linear propagation error are shown in figure 3(a) and figure 3(b) respectively. It shouldbe noted that linear propagation error, which is included in the cost function has almost gone to zero. Thenorm of the nonlinear and linear propagation errors is shown in figure 4(a) and figure 4(b) respectively. Thenonlinear propagation constraint norm reduces by more than 90 per cent over 20 iterations but stagnates atthis point. This is due to the fact that a constant trust region is used in this example. The evolution of thestate and control time histories are shown in figures 5(a) to 5(f). Note that these time histories change onlyby the size of trust region from one iteration to the next.

(a) States (b) Controls

Figure 1. Optimal State and Control Time-Histories

(a) Before Iter=1 (b) After Iter=20

Figure 2. Nonlinear Propagation Error

7 of 15

American Institute of Aeronautics and Astronautics

(a) Before Iter=1 (b) After Iter=20

Figure 3. Linear Propagation Error

(a) Nonlinear (b) Linear

Figure 4. Propagation Error Norm

VII. Robust Linear Model Predictive Control

In this section a convex optimization formulation will be developed for a linear dynamic system withuncertain system matrices (A,B). Uncertainty in parameter space for a linear dynamic system can beequivalently translated into uncertainty in system matrices. It is assumed that the system matrices can

assume any value in an ensemble of matrices{

(A1, B1), (A2, B2), ..(AL, BL)}

. The control computation

problem can be defined as follows:minimize ΣN−1

k=0 uT [k]u[k] (48)

x[k + 1] = Ax[k] +Bu[k], k = 0..(N − 1), ∀ (A,B) ∈{

(A1, B1), (A2, B2), ..(AL, BL)}

(49)

x(0) = x0 (50)

x(N) = xf (51)

It is desired to compute a single control time history that can satisfy the dynamic propagation equationsof multiple plants. The existence of an exact solution to this problem is unlikely in general. Therefore,an approximate convex optimization approach referred to as the ‘Min-Max’ approach is employed in thefollowing sub-section.

8 of 15

American Institute of Aeronautics and Astronautics

(a) ω1 Time Histories (b) ω2 Time Histories

(c) ω3 Time Histories (d) u1 Time Histories

(e) u2 Time Histories (f) u3 Time Histories

Figure 5. Iterative Evolution of Optimal State and Control Time Histories

A. Min-Max Approach

The Min-Max approach uses a different state vector for each system matrix pair (Ai, Bi) while retaining asingle control vector that is applied to all the plants. As the name suggests the formulation minimizes themaximum terminal boundary condition error over all the plants. The resulting convex optimization problemcan be described as follows:

minimize ΣN−1k=0 u

Tu+ λ{max(e1, e2, ..ej, ..eL)} (52)

9 of 15

American Institute of Aeronautics and Astronautics

subject to xi[0] = x0,∀i = 1..L (53)

xi[k + 1]−Aixi[k]−Biu[k] = 0, ∀k = 1..N − 1,∀i = 1..L (54)

ei = xi[N ]− xf ,∀i = 1..L (55)

The decision variables for the above optimization problem are the state and control time histories. Byappropriate choice of λ the solution to the above problem can generate controls that transfer multiple lineardynamic systems with the same initial conditions very close to a desired final condition as is illustrated bythe example in the following sub-section.

B. Example

The following is the problem data used in this example.

A1 =

[0.9 1.2

0.1 0.8

]B1 =

[0

1

](56)

A2 =

[0.85 1.2

0.1 0.8

]B2 = B1 (57)

A3 =

[0.95 1.2

0.1 0.8

]B3 = B1 (58)

x0 = [0 0]T , xf = [1 0]T , N = 20 (59)

Shown in figure 6(a) and figure 6(b) are the time histories of x1 and x2 respectively for the three differentsystem matrices using the optimal control solution computed using the nominal plant model (A1, B1) alonebut implemented on all three systems. The control satisfies the terminal conditions when applied on thenominal plant model. However, the same control does not satisfy the terminal conditions on the other twoplants. The terminal condition values of the state component x1 for plant (A2, B2) and (A3, B3) are 1.6and 0.4 respectively, as opposed to the desired value of 1. Similarly, the terminal condition values of x2 are0.12 and −0.1, as opposed to the desired value of 0. It should be noted that the results presented here areopen-loop predictions as opposed to closed-loop response. Closed-loop response can result in smaller errorsdue to the feedback nature.

Shown in figure 7(a) and figure 7(b) are the time histories of the same variables and same system matricescomputed using the min-max approach discussed above. Again, one control time history is computed usingthe Min-Max approach. The difference in this case is that the approach explicitly recognizes the uncertaintyin system matrices and computes the control accordingly. Note that the maximum terminal errors for x1

and x2 are less than 0.1 and 0.05 respectively, as opposed to the 0.6 and 0.1 with nominal control.

(a) x1 Time History (b) x2 Time History

Figure 6. Results Using Nominal Control

10 of 15

American Institute of Aeronautics and Astronautics

(a) x1 Time History (b) x2 Time History

Figure 7. Results Using Robust Control

VIII. Robust-Nonlinear Model Predictive Control

In this section a convex optimization problem that is suitable for nonlinear model predictive controlproblem with parameter uncertainties will be derived. This approach combines the sequential convex op-timization over trust regions with the min-max approach. Steps involved in each iteration are presentedbelow:

Initialization

1. Start with i = 1

2. Generate discrete representation of the parameter space P ={p1, p2, ...pj , ..pL

}3. Initialize x∗1j using an interpolation scheme such as linear or cubic spline interpolation between x0 andxf .

4. Set u∗1 = 0

5. Select size of trust region ∆x and ∆u

Iterations

1. Compute Aij(k), Bij(k) and Cij(k) using x∗ij and u∗i such that.

F (x∗ij [k] + δx, u∗ij [k] + δu, pj)− x∗ij [k + 1] ≈ Aij(k)δx+Bij(k)δu+ Cij(k) (60)

∀δx < ∆x and ∀δu < ∆u (61)

2. Solveminimize ΣN−1

k=0 (u∗i + δu[k])T (u∗i + δu[k]) (62)

+λ(maxj=1..LΣN−1k=0 |δxj [k + 1]−Aij(k)δxj [k]−Bij(k)δu[k]− Cij(k)|) (63)

subject to δxj [0] = 0, j = 0..L (64)

δxj [N ] = 0, j = 0..L (65)

xmin ≤ δxj [k] + x∗ij [k] ≤ xmax, k = 0..(N − 1), j = 0..L (66)

umin ≤ δu[k] + u∗i [k] ≤ umax, k = 0..(N − 1) (67)

−∆x[k] ≤ δxj [k] ≤ ∆x[k], k = 0..(N − 1), j = 0..L (68)

−∆u[k] ≤ δu[k] ≤ ∆u[k], k = 0..(N − 1) (69)

11 of 15

American Institute of Aeronautics and Astronautics

3. Set x∗ij = x∗ij + δx∗j , u∗i = u∗i + δu∗

4. Compute σ(i) = maxj=1..LΣN−1k=0 |x∗ij [k + 1]− F (x∗ij [k], u∗i [k])|

5. If σ(i) < ε terminate

6. Else set x∗(i+1)j = x∗i , u∗i+1 = u∗i , i = i+ 1 and go to step 1

A. Results

To demonstrate the effectiveness of the combined formulation, uncertainty is introduced into the inertiaparameters of the rigid body example presented in section VI.B. It is assumed that the inertia parametersI1, I2, and I3 lie in a cube with center at the nominal value [5, 7, 9] and the width of the cube is set to be equalto 1. The eight vertices of the parameter cube and the nominal value of the parameter vector are used as thediscrete parameter representations for control computation using the robust-nonlinear formulation describedin section VIII. Two sets of controls are computed, (i) using the nominal parameter vector and the nonlinearmodel predictive control formulation, and (ii) using the eight vertices of the uncertainty cube and the Min-Max approach. Shown in figure 8(a) to figure 9(a) are comparisons of the control time histories computedusing these two approaches. These approaches and controls will be referred to as nonlinear MPC/control androbust-nonlinear MPC/control. It should be noted that the control time histories are significantly differentboth qualitatively and quantitatively.

Monte-Carlo simulation approach is used to evaluate the robustness of the robust-nonlinear model pre-dictive controller. Parameter vectors are drawn randomly from the uncertainty cube assuming independentuniform distributions along the three parameter vector axes. The state time-histories obtained using non-linear MPC and robust-nonlinear MPC are shown in figure 9(b) to figure 10(b). The same control is usedfor computing all the 100 trajectories in each of these three figures. Control computed using nonlinear MPCformulation using the nominal parameter vector and the control computed using the robust-nonlinear MPCare used in generating all these trajectories. It can clearly seen that the terminal dispersion of the trajec-tories resulting from robust-nonlinear control are much smaller than that of the trajectories resulting fromnonlinear control alone. The trajectories are not only have quantitatively smaller terminal error but aredifferent qualitatively. The terminal error can be better visualized in figure 11 to figure 13. The maximumterminal error resulting from robust-nonlinear control is 63% less for ω1, 72% less for ω2 and 24% less forω3.

(a) u1 Time History (b) u2 Time History

Figure 8. Control Time Histories

IX. Conclusions

A convex optimization approach is formulated for the design of robust nonlinear model predictive con-troller with nonlinear state and control constraints. Sequential convex optimization over trust regions is first

12 of 15

American Institute of Aeronautics and Astronautics

(a) u3 Time History (b) ω1 Time Histories

Figure 9. State and Control Time Histories

(a) ω2 Time Histories (b) ω3 Time Histories

Figure 10. State Time Histories

used for designing a nonlinear model predictive controller. Min-Max approach is used to design a robustlinear model predictive controller that can accommodate plant parametric uncertainties. The approachesare separately illustrated using numerical examples. A combined formulation that accommodates both non-linearity and plant uncertainties is later derived. The effectiveness of the robust-nonlinear model predictivecontrol approach over nonlinear model predictive control approach is demonstrated using Monte-Carlo sim-ulations. It was shown using the results of Monte-Trials that the performance of the robust-nonlinear modelpredictive controller was much better than the nonlinear model predictive control. It should be noted thatthe approach developed in this paper is not theoretically guaranteed to produce a solution in all scenarios.However, it offers a framework for explicitly modeling several challenging issues in controller design andidentifies parameters that can be tuned to achieve the desired performance. Further work is required toestimate the actual computational cost associated with the combined formulation.

X. Acknowledgements

The author would like to thank Prof. Stephen Boyd at Stanford University for introducing him to thefield of convex optimization and its applications to model predictive control.

13 of 15

American Institute of Aeronautics and Astronautics

Figure 11. ω1 Terminal Errors

Figure 12. ω2 Terminal Errors

References

1Maciewjowski, J., Predictive Control with Constraints, Vol. 1, Macmillian, New York, 1st ed., 1964, pp. 203–266.2E. R. Van Oort, P. Q. Chu, J. A. M. and Boom, T. J. J. V. D., “Robust Model Predictive Control of a Feedback Linearized

Nonlinear F-16/MATV Aircraft Model,” Proceedings of the 2006 AIAA Guidance, Navigation, Control Conference and Exhibit ,AIAA, Reston, VA, 2006.

3M. Tillerson, G. I. and How, J. P., “Coordination and Control of Distributed Spacecraft Systems using Convex OptimizationTechniques,” International Journal of Robust and Nonlinear Control , Vol. 12, No. 2, 2002, pp. 207–242.

4Vaddi, S. S., “Moving Mass Actuated Missile Control using Convex Optimization Approach,” Proceedings of the 2006AIAA Guidance, Navigation, Control Conference and Exhibit , AIAA, Reston, VA, 2006.

5Vaddi, S. S. and Sengupta, P., “Controller Design for Hypersonic Vehicles Accommodating Nonlinear State and ControlConstraints,” Proceedings of the 2009 AIAA Guidance, Navigation, Control Conference and Exhibit , AIAA, Reston, VA, 2009.

6Boyd, S. and Vandenberghe, L., Convex Optimization, Vol. 1, Cambridge University Press, Cambridge, 1st ed., 2006, pp.203–266.

14 of 15

American Institute of Aeronautics and Astronautics

Figure 13. ω3 Terminal Errors

7Wang, Y. and Boyd, S., “Fast Model Predictive Control Using Online Optimization,” Proceedings of the IFAC WorldCongress, IFAC, Wahington, DC, 2008, pp. 6974–6997.

8Grant, M. and Boyd, S., “MATLAB Software for Disciplined Convex Programming,” http://stanford.edu/ boyd/cvx,2009.

15 of 15

American Institute of Aeronautics and Astronautics