Multirate nonlinear predictive control

0 downloads 0 Views 225KB Size Report
control. For the next sampling instant (k + 1) the pre- diction horizon is shifted to [k + 1,k +1+ N] and the procedure is repeated, as the name Receding-Horizon.
Proceedings of the American Control Conference Anchorage, AK May 8-10, 2002

Multirate Nonlinear Predictive Control U. Halldorsson, M. Fikar† , H. Unbehauen Control Engineering Laboratory, Department of Electrical Engineering and Information Sciences, Ruhr-University Bochum, D-44780 Bochum, Germany. E-mail: [email protected] † Department of Process Control, CHTF STU, Radlinsk´eho 9, SK-812 37 Bratislava, Slovakia, Fax: + 421 7 39 31 98 Keywords : nonlinear systems, predictive control

Abstract This paper introduces a new approach to reduce the computational load of nonlinear model based predictive controllers. The idea is based on dividing a long prediction horizon into only a few equidistant intervals with piecewise constant control signals. After solving a first dynamic optimization problem the prediction horizon is halved, keeping the second half of the solution fixed and doubling the sampling rate in the first half of the control horizon. Using these settings a second optimization is performed to improve the first acquired solution. This procedure is repeated until the applied control step has a reasonable sampling time. In this paper the multirate method is merged with the Quasi-Infinite Horizon Nonlinear Predictive Control scheme, based on augmenting the optimization problem with a terminal region condition and the objective function with a quadratic terminal cost term. Some illustrative simulation results are presented to show the improved stability and computational cost properties of the resulting control strategy without deteriorated quality of control.

1

Introduction

Receding-Horizon (RH) control problem, also known as Model Predictive Control (MPC) problem, can in general be formulated as performing an on-line dynamic optimization, where the dynamics and constraints of the underlying system are taken into account, considering them as optimization boundary conditions. This simple idea behind MPC, as well as its practical properties, makes it easy to implement system nonlinearities and constraints directly into the control strategy. In discrete-time, the basic idea is to solve a finite-horizon optimization problem over the interval [k, k + N ], but to use only the first control element of the solution for 0-7803-7298-0/02/$17.00 © 2002 AACC

control. For the next sampling instant (k + 1) the prediction horizon is shifted to [k + 1, k + 1 + N ] and the procedure is repeated, as the name Receding-Horizon control hints at. In [2] it was shown that the straightforward implementation of the RH control strategy can easily result in an unstable closed-loop behavior. The simple but demanding method of augmenting the optimization problem with a terminal zero-state condition was early shown to provide a stability guarantee for RH control [7, 8]. Further stability approaches for the linear case have been presented in the literature, showing that the theory of linear MPC has been extensively explored and is well understood, see for example the collection in [4]. Also when applying nonlinear models to MPC, which is the main topic of this paper, stability properties can be derived by the use of different strategies. A survey can be found in [5] showing for example the concept of zerostate terminal conditions [7] where the terminal state of the prediction horizon is fixed to the origin. A dualmode control was suggested in [11] turning the terminal state condition into an inequality condition, forcing the terminal state to belong to a suitable neighborhood of the origin. This scheme is called dual-mode because when the state vector reaches the defined neighborhood of the origin, a switching from the RH controller to a linear controller takes place. The paper [3] presents a similar idea called Quasi-Infinite Horizon Nonlinear Predictive Control, also using a terminal region to define the boundary condition needed for stability, but excluding the necessity of switching to a linear controller at any time during control. Two of the most demanding obstacles when applying Nonlinear MPC (NMPC) to practical applications are based on computational and stability issues. There are only a few methods that address the computational problem. Most often, some part of the problem is treated as linear, such as using a bank of linear models [6] or optimizing only some control moves and having a linear controller generate the others [13, 10]. For stability the the origin or some defined region

4191

must be reached at the end of the prediction horizon. Feasibility of this type of problems increases with the horizon length, but on the other hand, the increased horizon length can result in an exponential growth in computational efforts. The sampling time of controller outputs must be limited for practical applications, which also limits the available calculation time for optimization. The aim of this contribution is to present a new approach of optimization to handle the two counteractive obstacles of computational and stability issues in an effective way. This approach uses the full underlying dynamic nonlinear model in all calculation steps and reduces the computational load by dividing the optimization problem into a series of simpler optimization problems, solved sequentially in each sampling step. The resulting solution is a control trajectory, sampled in a non-equidistant way, where the shortest sampling interval is placed at the beginning of the horizon and the following intervals are expanded exponentially with time. Hence follows the name Multirate Nonlinear Predictive Control. To demonstrate the applicability of this control strategy, the Quasi-Infinite Horizon NMPC is used as the underlying MPC strategy to guarantee nominal stability. The paper is structured as follows: In Section 2 the general problem of nonlinear model predictive control is stated. Section 3 describes the suggested Multirate Approach. A short description of the Quasi-Infinite Horizon NMPC is given in Section 4, combining this control method with the multirate idea. The resulting control properties are pointed out using simulation results and discussed in Section 5.

2

Problem Setup

Let us consider the time-invariant nonlinear continuoustime system x(t) ˙ = f (x(t), u(t)),

(1)

where x(t) ∈ Rx is the state vector, u(t) ∈ Ru is the input vector, f is a twice differentiable nonlinear function, satisfying f (xs , us ) = 0, where xs is the desired state vector and us is the corresponding constant control signal. The state and input vectors are subject to the constraints x(t) ∈ X,

u(t) ∈ U,

t ≥ 0,

(2) x

u

where X and U are compact sets of R and R respectively, with xs ∈ X and us ∈ U . Considering (1) and (2) as boundary conditions an objective function to be minimized at sampling time k is defined as Z T ¢ ¡ s ||x − x(t|k)||2W x + ||us − u(t|k)||2W u dt J = 0

+ ||xs − x(T |k)||2P ,

(3)

where T is the prediction horizon length, x(t|k) and u(t|k) are the expected future values of x(t) and u(t), respectively, with the prediction performed at sampling instant k, W u > 0, W x ≥ 0 are weighting matrices and the matrix P > 0 is a symmetric weighting matrix. The calculated control vector u(t|k) is a piecewise constant step function, with steps of equal time duration for the classical predictive control case. In this work the desired system state and its corresponding constant control are set without loss of generality to the origin xs = 0 and us = 0. Assumption 1: For a given T > 0 and a number of control steps m > 0, there exists a nonempty neighborhood X(T ) of the origin such that ∀x(0) ∈ X(T ) there exists a sequence {u(j)|j = 1, . . . , m} of equally long (T /m) control steps, driving the state of (1) to a neighborhood Ω of the origin, defined as Ω := {x|xT P x ≤ α}

for some

α ≥ 0,

(4)

satisfying the constraints given by (2) in the prediction time-interval t ∈ [0, T ], where the combination (P , α, T , W x , W u ) is selected to satisfy the Quasi-Infinite Horizon stability conditions discussed in Section 4.

3

Multirate Scheme

The measure to use nonlinear models instead of linear models for predictive control becomes adequate when a linearized model of the underlying process does not describe its dynamics with a sufficient precision. This can easily be the case when a highly nonlinear process is about to change from one operating point to another. A typical practical example would be a polymers line where dozen grades or more can be manufactured, representing a system with strongly varying dynamics between the different operating points. In order for the predictive control to take the nonlinear nature of the process fully into account, a sufficiently long prediction horizon must be chosen, enclosing the transients of the operating point change. Furthermore, if stability is to be assured, a long prediction horizon must be chosen for the system state vector to be able to reach the steadystate, or its neighborhood, at the end of the horizon. One can therefore expect that feasibility and quality of control can be improved by increasing the prediction horizon length T . This leads however, for the classical case, to a large number of optimized control variables and a tedious optimization problem to be solved in one step. In this paper another method of optimization is suggested, which uses a recursive algorithm to find an approximated solution to minimizing the objective function in (3). The idea is based on dividing the optimization problem stated in Section 2 into a series of simpler optimization problems to be solved sequentially.

4192

It is important that these sub-problems of optimization all result in a solution satisfying necessary stability conditions. In this paper stability is guaranteed using the quadratic terminal cost term in the objective function (3) and by conditioning the optimization to force the terminal state vector at the end of the prediction horizon to belong to a terminal region Ω containing the origin as stated in Assumption 1. At sampling instant k we model {u(t|k)|0 ≤ t ≤ T } as a sequence of a low but even number m of future control steps u(j), each of time duration T /m, where the prediction horizon length T is selected according to Assumption 1, such that the initial state x(0) is an element of X(T ). Using this pattern of control the cost function in (3) is minimized, such that the terminal region Ω is reached at the end of the horizon. Although this solution could be applied to the process, the long time duration T /m of each control step makes it impracticable. Therefore, in the next recursive optimization step, the derived solution is improved by keeping the latter control steps {u(j)|j = (m/2 + 1), . . . , m} and the intermediate terminal state vector x(T |k) = xi fixed, but splitting the first control steps {u(j)|j = 1, . . . , m/2} up into m new control steps, each of time duration T /(2m), to be optimized. This is now repeated nr times until the desired sampling rate is reached for the first control step u(1). To clarify the method it can be formulated as the following algorithm: Let us define the end time te = T . Set the iteration counter to i = 1 and the desired number of optimization recursions to nr . Now continue with the following steps: 1. Divide the time interval [0, te ] into (the even number) m intervals with piecewise constant control steps {u(j)|j = 1, . . . , m}, each of length ∆ = te /m, and solve the optimization problem i

min J =

u[0,te ]

Z

T 0

¡

¢ ||x(t|k)||2W x + ||u(t|k)||2W u dt

+ ||x(T |k)||2P subject to x(T |k) ∈ Ω x(t|k) ∈ X, u(t|k) ∈ U,

∀t ∈ [0, T ] (5)

2. Define the new end time as te := te /2 (in the middle). 3. Define an intermediate state vector as xi = x(te |k). 4. Increase the iteration counter by one and terminate the algorithm if i > nr . 5. Again divide the time interval [0, te ] into m intervals with piecewise constant control steps

{u(j)|j = 1, . . . , m} and solve the optimization task min J i =

u[0,te ]

Z

te 0

¡

¢ ||x(t|k)||2W x + ||u(t|k)||2W u dt

subject to x(te |k) = xi x(t|k) ∈ X, u(t|k) ∈ U,

∀t ∈ [0, te ] (6)

6. Jump to step 2. The main properties of this procedure are: • Control steps of length ∆1 = 2−nr +1 T /m are applied to the process. • The optimization problem is solved nr times using only m control variables. As a result the optimization task in the first recursion represents a simple problem, giving a high reliability of finding a feasible and stable solution of control. The principle of the multirate method is demonstrated in Fig. 1, optimizing two control steps in three recursions (m = 2, nr = 3, T = 8). The smallest sampling interval for this case occurs at time t = 0 and is ∆1 = 1, where the classical equidistantly sampled approach would need to solve 8 variables in one optimization step to arrive with the same sampling rate. Referring to the well known problem of curse of dimensionality [9], the computational cost of the multirate approach can be expected to be significantly lower when compared with the classical method using the same prediction horizon length T while assigning the length ∆1 to all control steps. Moreover, the exponential growth in sampling interval lengths makes it easier to realize an overall prediction horizon T , large enough to satisfy Assumption 1. An alternative approach to the multirate method is to optimize, without recursion, m control steps, defined to have exponentially growing sampling intervals ∆1 , ∆2 = 2∆1 , . . . , ∆m = 2m−1 ∆1 . However, the main difference when compared with the multirate strategy, has its origin in the complexity of the optimization task. Since the number of optimized variables in each recursive step of the multirate approach is lower, one can expect better convergence properties. Furthermore, using a small interval ∆1 for the first control step u(1) will lead to excessive control actions, violation of constraints, and will represent a more difficult task for the optimizer. In the first recursion of the multirate method, control steps are of long time duration and a feasible solution can easily be found which is unlikely to violate input signal constraints. Initialization of subsequent recursive optimization problems is an easy task, since the solution from the preceding recursion satisfies all boundary conditions of the subsequent optimization problems.

4193

This enables at any time either to interrupt the optimization and use the actual solution, without violating the feasibility (and stability) Assumption 1, or to use the available computational time to improve the solution furthermore. This so-called feasible path procedure property can be of major importance if numerical optimization methods are applied for optimization.

and its corresponding stability proof can be found in [3]. However, seen from the aspect of multirate control, the kernel of the stability proof is twofold: 1. The predicted state x(T |k) at the end of the prediction horizon must be an element of the terminal region Ω. The difficulty of satisfying this boundary condition is strongly dependent on the horizon length T [3]. Since the multirate approach is well suited to work with long horizons, it can be effectively implemented to simplify the optimization feasibility conditions.

3

2.5 u1 u2 u3 umax

2 ∆1

u 1.5

∆2

2. The objective functional (3) is used as a Lyapunov function to prove stability. The values of the objective function must therefore decrease monotonically with time as the receding-horizon control is applied. It can be shown that this condition is satisfied if the control strategy built at sampling instant k + 1 can reconstruct the predicted control strategy calculated at sampling instant k. Since this is possible for the classical NMPC case, one can by optimality conclude the controller stability. However for the multirate case, the reconstruction property can not be taken for granted as seen by the example in Fig. 2. The control horizon solution found using the multirate method at time k consists of a stepwise function in the interval [0, T ] and a continuous state feedback control u(t|k) = Kx(t|k) beyond that point. At the next sampling instant k + 1 the control horizon cannot perfectly reconstruct the last solution in the shaded regions.

∆3

1

0.5

0 0

1

2

3

4 Sample

5

6

7

8

Figure 1: Principle of the multirate approach Optimizing solely the first half of the horizon at each recursion and assuming an even number m of control steps is somewhat arbitrary. Clearly, other fractions of the interval could be selected which in turn can have major impact on (i) the computational cost and (ii) the degree of deviation from the classical case results. Halving the interval seems like a good compromise between both aspects. The implementation of the multirate and classical nonlinear predictive controllers was done using the Orthogonal Collocation technique on finite elements, where piecewise orthogonal Lagrange polynomials are used to approximate the state trajectory in each control step interval. The reference [12] can be viewed for a detailed description of this method.

4

Therefore, to guarantee stability, a modification of the receding horizon strategy is proposed: if the optimisation problem is infeasible at instant k + 1 or its result violates the monotonic decrease in the Lyapunov function, the optimal control trajectory corresponding to the previously applied control is used. As this modification assures feasibility of the RH problem for all k > 0 and the underlying MPC method is stabilising, it can easily be shown that the multirate approach guarantees stability of the closed-loop system.

Quasi-infinite Horizon Multirate Approach

Here the quasi-infinite horizon method is used to derive a stable multirate NMPC approach. The quasiinfinite horizon NMPC optimizes on-line the objective functional (3) treating (1), (2) and the terminal state constraint x(T |k) ∈ Ω as optimization boundary conditions. The terminal state region Ω defined in (4) is calculated to be invariant subject to a local state feedback control u(t|k) = Kx(t|k) being active for t ≥ T and satisfying (2). The linear control u(t|k) = Kx(t|k) is solely used to calculate the shape of Ω, and is never applied to the process, since the receding-horizon principle is used for control. A detailed coverage of this problem

5

Simulation Results

The properties of the Quasi-Infinite Horizon Multirate procedure described in the previous section are examined in simulation studies. For comparison reasons the same example as used in [3] and [11] is applied: x˙ 1 = x2 + u(0.5 + 0.5x1 ), x˙ 2 = x1 + u(0.5 − 2.0x2 ),

x1 (0) = −0.683, x2 (0) = −0.864,

(7) (8)

subject to U = {u ∈ R1 | − 2 ≤ u ≤ 2}, the control signal constraint. The goal is to steer the state vector

4194

0.2

u(t|k)

0

x2

−0.2 x(t) −0.4

k

−0.6 −0.8 t

−1 0

u(t|k+1)

x1

Classical nr=1 Multirate n =3 r

1

2

3

4

5

6

7

8

1

2

3

4 time units

5

6

7

8

2 k+1

1.5 u(t)

0

Τ/8

T/4

T/2

T

1

t

0.5 0 0

Figure 2: Quasi-infinite multirate control horizon [x1 , x2 ]T to the origin xs = [0, 0]T . The objective functional (3) is parameterized as follows ¶ µ 0.5 0 , W u = 1, (9) Wx = 0 0.5 µ ¶ 16.5926 11.5926 P = , (10) 1.5926 16.5926 subject to the terminal region constraint x(T |k) ∈ Ω with Ω := {x|xT P x ≤ 0.7}, when using a linear LQcontroller to calculate the state feedback control u(t|k) = K LQ x(t|k) being active for the t ≥ T interval of the prediction horizon [3]. The prediction horizon length is set to T = 1.6 timeunits. The classical approach to NMPC is simulated as the prediction horizon is divided into 16 equidistant sampling intervals, corresponding to a sampling time of δ = 0.1 time-units. The multirate approach is simulated, applying the algorithm in Section 3, with the settings of using m = 4 equidistant sampling intervals in nr = 3 recursions of optimization, resulting in the same sampling time of ∆1 = 0.1 time-units. Fig. 3 compares both approaches, showing only very minor deviations in control and state trajectories. Using a SQP based optimization algorithm provided in Matlab, the classical approach needed approximately 30 times more floating-point operations when compared with the multirate method. This result shows that despite the significant reduction in calculation costs, the multirate approach control can provide a control strategy very similar in quality to the optimal classical result. A further advantage can be seen by observing the first NMPC optimization problem being solved at t = 0. Fig. 4 shows various prediction horizons built at the initial time t = 0 using some different methods of optimization. The trajectories using the classical and multirate approaches for the horizon length T = 1.6 timeunits look identical. These trajectories show that the final state of the prediction horizon x(T |0) is located very close to the margins of Ω, making the terminal state constraint x(T |0) ∈ Ω a highly important bound-

Figure 3: Multirate and Classical approach simulation T = 1.6 ary condition for the feasibility and stability of control. A shorter horizon may lead to infeasibility, violate stability conditions, or deteriorate the quality of control. Adding one recursion to the multirate optimization procedure, a prediction horizon of length T = 3.2 timeunits was applied with the same sampling rate to the problem. The results shown in Fig. 4 demonstrate how the terminal state x(T |0) has moved closer to the origin of Ω, relaxing the terminal state condition significantly. Since the first recursive sub-optimization problem demands the most calculation time, the measure of performing one more recursion solely increased the calculation cost by approximately 20%. The ripples seen on the T = 3.2 time-units long predicted trajectory result from the long time-duration of the constant control steps at the end of the horizon. Nevertheless, when compared with the receding-horizon control simulations in Fig. 5 it is obvious that despite these ripples the longer prediction horizon resulted in a predicted state-trajectory clearly resembling the simulated receding-horizon control with a higher accuracy. It should be mentioned that the deviation in simulated trajectories using T = 1.6 and T = 3.2 time-units in Fig. 5 is based on the different parameterization of the objective functional (3), representing two different optimal control behaviors.

6

Conclusions

In this paper a new Multirate recursive approach for optimization has been proposed for NMPC. The aim was to reduce computational efforts needed for the classical NMPC without deteriorating the quality of control. It was possible to merge the Quasi-Infinite Horizon NMPC idea with the Multirate Control scheme to generate a stable Quasi-Infinite Horizon Multirate Control approach.

4195

References

0.4 Classical T=1.6 Multirate T=1.6 Multirate T=3.2

0.2

[1] F. Allg¨ower and A. Zheng, editors. Nonlinear Model Predictive Control, volume 26 of Progress in Systems and Control Theory. Birkh¨auser, Basel, 2000.

0 Ω

−0.2 x2

[2] R. R. Bitmead, M. Gevers, and V. Wertz. Adaptive Optimal Control. Prentice Hall, Englewood Cliffs, New Jersey, 1990.

−0.4

−0.6

[3] H. Chen and F. Allg¨ower. A quasi-infinite horizon nonlinear model predictive control scheme with guaranteed stability. Automatica, 34(10):1205 – 1217, 1998.

−0.8 t=0 −1 −0.8

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

x1

[4] D. W. Clarke, editor. Advances in Model-Based Predictive Control, 1994. Oxford University Press.

Figure 4: Various prediction horizons built at initial time t = 0

[5] G. De Nicolao, L. Magni, and R. Scattolini. Stability and robustness of nonlinear receding horizon control. In Allg¨ower and Zheng [1], pages 3 – 22.

0.4 Classical T=1.6 Multirate T=1.6 Multirate T=3.2

0.2

[6] B. A. Foss, T. A. Johansen, and A. V. Sorensen. Nonlinear predictive control using local models applied to a batch fermentation process. Control Engineering Practice, 3(3):389 – 396, 1995.

0 Ω

−0.2 x2

[7] S. S. Keerthi and E. G. Gilbert. Optimal infinitehorizon feedback laws for a general class of constrained discrete-time systems: stability and moving horizon approximations. Journal of Optimization Theory and Application, 57:265 – 293, 1988.

−0.4

−0.6

−0.8 t=0 −1 −0.8

−0.6

−0.4

−0.2

0

0.2

0.4

[8] W. H. Kwon and A. E. Pearson. On feedback stabilization of time-varying discrete linear systems. IEEE Tr. Aut. Control, 23(3):479 – 481, 1978.

0.6

x1

Figure 5: Simulated trajectories using Multirate and Classical approaches Simulation results showed the Multirate NMPC needing significantly lower calculation efforts when compared with the classical NMPC, although both generated control strategies were practically identical. Since the multirate approach is well suited to work with long horizons, the method was shown to be effective when longer prediction horizons improve controller feasibility and stability properties. It was possible to double the prediction horizon length without high extra cost of calculation, significantly simplifying the terminal state optimization constraint needed to guarantee stability.

Acknowledgments Financial supports of this work from the Alexander von ˇ SR Humboldt Foundation as well as from VEGA MS (1/7337/20, 1/5220/98) for the second author are very gratefully acknowledged.

[9] F. L. Lewis. Optimal Control. Wiley-Interscience, New York, 1986. [10] L. Magni, G. De Nicolao, L. Magnani, and R. Scattolini. A stabilizing model-based predictive control algorithm for nonlinear systems. Automatica, 37 (9):1351–1362, 2001. [11] D. Q. Mayne and H. Michalska. Receding horizon control of nonlinear systems. IEEE Tr. Aut. Control, 35:814 – 824, 1990. [12] J. V. Villadsen and M. L. Michelsen. Solution of Differential Equation Models by Polynomial Approximation. Prentice Hall, Englewood Cliffs, NJ, 1978. [13] A. Zheng. Some practical issues and possible solutions for nonlinear model predictive control. In Allg¨ower and Zheng [1], pages 129 – 143.

4196

Suggest Documents