BRANCH-AND-BOUND OPTIMIZATION IN

0 downloads 0 Views 766KB Size Report
The branch-and-bound optimization method is a discrete search technique, which has been ... the aplication of branch-and-bound in model predictive control to ...
BRANCH-AND-BOUND OPTIMIZATION IN MULTIVARIABLE MODEL PREDICTIVE CONTROL L.F. Mendonc¸a C.A. Silva J.M. Sousa

Technical University of Lisbon, Instituto Superior T´ecnico Dept. of Mechanical Engineering/ GCAR - IDMEC Av. Rovisco Pais, 1049-001 Lisbon, Portugal Phone: +351-21-8418190, E-mail: mendonca,cs,j.sousa @dem.ist.utl.pt

Abstract: The branch-and-bound optimization method is a discrete search technique, which has been successfully applied to different complex optimization problems. This method can be applied to model predictive control when the control actions are discretized. This paper generalizes the aplication of branch-and-bound in model predictive control to multivariable systems. New features have been introduced to extend the application of branch-and-bound to MIMO systems. A realistic simulation of a gantry crane shows the applicability of the method. Copyright c Controlo’2000 Keywords: Model predictive control, branch-and-bound optimization, multivariable systems, gantry crane.

1. INTRODUCTION Model Predictive Control (MPC) is a model-based control strategy that has been applied to a large number of industrial processes (Richalet 1993, D.A.Linkens and M.Mahfont 1994). MPC is able to deal with multivariable, nonlinear, non-minimum phase, open-loop unstable processes in the presence of constraints. Two major issues limit the application of MPC to nonlinear systems: A model to predict the process variables over the specified prediction horizon with sufficient accuracy must be available. Given a nonlinear process model, a nonlinear (and usually non-convex) optimization problem must be solved at each sampling period. The first factor hampers the application of MPC to complex or partially known systems for which reliable models cannot be obtained. The second factor hampers the application to fast systems where iterative optimization techniques cannot be properly used, due to short sampling times. Both these issues can be solved

by using the branch-and-bound (B&B) algorithm to solve the non-convex optimization problem in MPC (Sousa et al. 1997). This paper proposes the generalization of the B&B algorithm applied in MPC to multi-input-multi-output (MIMO) systems. To illustrate the methodology proposed in this paper, the B&B optimization method is applied to a MIMO system, namely, a gantry crane which has two inputs and three outputs. Special attention is paid to the selection of the objective function in order to mimic the control strategy of an experienced driver. The outline of the paper is as follows. Section 2 explains the basics of MPC. Section 3 describes the B&B algorithm of MIMO systems, which is used to solve the non-convex problem in nonlinear MPC. Section 4 describes the gantry crane system used in this paper and the results of simulation experiments. Finally, Section 5 concludes the paper.

2. MODEL PREDICTIVE CONTROL Predictive control is a general methodology for solving control problems in the time domain having one common feature: the controller is based on the prediction of the future system behavior by using a process model (Camacho and Bordons 1995). MPC is based on the following basic concepts: (1) Use of an available (nonlinear) model to predict the process outputs at future discrete time instants over a prediction horizon. (2) Computation of a sequence of future control action using this model by minimizing a certain objective function. (3) Receding horizon principle; at each sampling instant the optimization process is repeated with new measurements, and the first control action obtained is applied to the process. Because of the explicit use of a process model and the optimization approach, MPC can handle multivariable processes with nonlinearities, non-minimum phase behavior or long time delays, and can efficiently deal with constraints. The future plant outputs for a determined prediction horizon are predicted at each time instant by using a model of the process. The predicted output values , depend on the states of the process at the current time and on the future control signals , where is the control horizon. The control signals change only inside the control horizon, remaining constant afterwards, i.e., , for . The sequence of future control signals is obtained by optimizing a cost function which describes the control goal, and is usually of the following form:

this case iterative optimization techniques are usually considered. However, these methods have generally high computational costs and converge often to local minima. By discretizing the control actions, the efficient B&B algorithm can be used to search the discrete space for the best solution. This has proven to give better results than iterative optimization techniques (Sousa et al. 1997).

3. BRANCH-AND-BOUND OPTIMIZATION The B&B method is a structured search technique belonging to a general class of enumerative schemes. It is useful to solve problems for which direct solution methods either do not exist ore are inefficient. The B&B method is based on the fact that, in general, only a small number of possible solutions need to be enumerated, while the remaining solutions are eliminated through the application of bounds. This method have been applied to the solution of various constrained optimization problems such as integer linear programming, nonlinear programming, the travelingsalesman problem or the quadratic assignment problem (Horowitz and Sahni 1978). The two basic operations of the method are: branching - which consists of dividing possible sets of solutions into subsets; and bounding - the establishment of bounds on the value of the cost function over the subsets of possible solutions. These bounds eliminate those subsets that do not contain an optimal solution. Branching and bounding operations are applied recursively. When the control actions are discretized, the B&B method can be applied to predictive control, as shown in Fig. 1. Let the MIMO model be given by: (2)

(1) where The first term of (1) accounts for the minimization of the output errors and the second term represents the minimization of the control effort. The process inputs and outputs, as well as state variables, can be subjected to constraints, which are incorporated in the optimization problem. Note that the cost function is only a suitable mathematical approximation of the real control objectives. Its quadratic nature is convenient for finding solutions for linear models, but it may be less suitable for achieving the real control goals, such as fast rise time, small overshoot or good damping. Although many authors provide tuning rules that attempt to relate the desired performance to the setting of the individual parameters in (1), in practice, extra constraints must be imposed in order to meet the prescribed goals. The performance of MPC depends largely on the used process model. The model must be able to accurately predict the future process outputs, and at the same time be computationally attractive to meet real-time demands. The use of nonlinear models, results in a non-convex optimization problem. In

are the outputs of the system, are the states, which can be obtained from the several inputs and outputs of the system, joining them in a vector:

(3) The control actions are given by . The orders of control actions, outputs and states are denoted by , respectively. The function relates the states at time with the states and the control actions at time . The parameters are the orders of the inputs , and the parameters are the orders of the outputs , respectively. Further, note that the dimension of the state vector is given by . Each input of the system is discretized in discrete control actions. Therefore, a discrete control action

Fig. 1. Branch-and-Bound search tree. is represented by , with and . The complete set of discrete control actions is represented in Table 1. Table 1 – Complete set of discrete control actions.

number of alternatives, bounding is applied. A particular branch at level is followed only if the cumulative cost plus a lower bound on the cost from the level to the terminal level , denoted is lower than an upper bound of the total cost, denoted : (4)

With the discretization for each input, it is possible to derive a vector with all the possible control actions in the -dimensional space. Each element of this vector is represented as , with and . The space containing all the possible discrete control actions is represented by . Table 2 presents the first, second and last elements of this vector, and the correspondent discrete control inputs. Table 2 – Vector of possible control actions. ...

At each time step (level of tree shown in Fig. 1), control alternatives are considered, yielding a maximum of branches. Let denote the th level of the tree ( at initial node) and let denote the branch corresponding to the control alternative . The cumulative cost at node is given by . Note that no branching takes place beyond the control horizon ( ) and the last control action is applied successively until is reached. Application of the branching alone would result in the search of the entire tree (enumerative search), i.e., possibilities, which is computationally prohibitive, except for very small control horizons. To reduce the

The lower bound is difficult to derive, and can be simply set to zero . The branch-and-bound algorithm in MPC applied to multivariable systems can be described by an algorithm with the following steps: Step 1: Initialize algorithm. At each level (time ), starting from level , the smallest is chosen, and branching is made for all possible discrete control actions . The best cost at step , is chosen as the initial lower bound: (5) The remaining nodes created at level are eliminated because they do not constitute an optimal solution. The algorithm goes to level . Step 2: Estimate lower bound. The algorithm is at level . The branch with the best cost function found so far, and that is not fully explored, is chosen. This means that if the best cost function at level has already branches to level , the second best value for must be chosen. The lower bound on the cost over the remaining steps must be estimated. If no estimation is available, it is simply set to zero: . Step 3: Apply branch condition. The branching condition (6) is applied to the considered branch at level for all , discretized control actions .

This procedure generates is generated go to step 6. If

branches. If no branch

,

Step 4: Compute a new optimal solution. Compute the outputs from to and the respective costs. Compare the optimal cost found so far, , with this new costs. If a new optimal solution is found, is replaced by the new . Update the best solution found so far. Eliminate the nodes with nonoptimal solutions. Else Step 5: Branch from the best generated node. Choose the smallest cost and go to the next level ( ). Go to Step 2. Step 6: Go up in the tree. Go up in the levels of the tree until a non totally explored branch is found and go to Step 2 afterwards. If all the branches are explored, the optimal solution is the optimal solution found so far, and the algorithm stops. The efficiency of the bounding mechanism depends on the quality of the bound estimates. The upper bound should be as close as possible to the optimum and the lower bound as large as possible, in order to decrease the number of new branches to be created. The availability of these estimates depends on the particular problem. One should not forget that the computational complexity of the algorithm remains exponential, which makes it prohibitively expensive for large control horizons. Since the computing time also increases with an increasing number of control alternatives, this number should be as low as possible. However, too coarse a discretization may result in a rough control policy, inferior to those obtained with a finer discretization. The B&B optimization technique applied to predictive control has three major advantages over other nonlinear optimization methods: (1) The global discrete minimum is always found, guaranteeing the optimality of control performance in the discrete space of control alternatives. (2) The algorithm does not need any initial guess, and hence its performance cannot be negatively influenced by a poor initialization, as in the case of iterative optimization methods. (3) The B&B method implicitly deals with constraints. In fact, the presence of constraints improves the efficiency of bounding, by restricting the search space. Many other optimization techniques result in worse performance when tight constraints are imposed. Apart from the prohibitive computational complexity for large problems, the most serious drawback of the approach described is the restriction of the possible control actions to a set of discrete control alternatives. Next section presents an explanatory example of the proposed method.

Fig. 2. Schematic picture of the container gantry crane.

Fig. 3. Control Loop 4. APPLICATION EXAMPLE The application of B&B optimization in MPC is illustrated by means of a simulated gantry crane which is depicted in Fig. 2. A container gantry crane consists of a bridge girder connected to portal legs from which a trolley system is suspended. The trolley can travel along the bridge girder that stretches over the container ship and part of the quay for loading and unloading the ship. A hoisting mechanism consisting of a spreader suspended from the trolley by means of hoisting cables is used for grabbing and hoisting the container. Three variables must be controlled: the position of the trolley, which must be at a desired horizontal location ; the length of the rope , and the swing of the load, which must be damped so that the container can be positioned accurately. The transport of the container must be done as fast as possible. Two motors, one for the trolley motion and one for hoisting, generate the movement required to displace the container. A predictive control strategy is followed to control the system, as depicted in Fig. 3. The control structure includes measurement noise and system disturbances, which have values similar to the ones in the real system. The controller uses a simplification of the cost function in (1), considering only the error. This cost function revealed to be sufficient to control the system, and is given by: (7)

Container gantry crane controller

Rope lenght [m]

with where , and are the errors between the references and the the three controlled variables, which are respectively the horizontal position , the length of the rope and the swing angle . The matrix in (7) is the weight matrix given by:

20 15 10 5 0

20

40

60

80

100

120

140

160

20

40

60

80

100

120

140

160

20

40

60

80

100

120

140

160

Position [m]

60 40 20 0 0

(8) This discretization results in . The simulation considers the presence of noise in the range of the real system. Figure 4 shows the response of the system for a horizontal displacement of and a vertical displacement of with a sample period of s. The references are chosen based on the work presented in (Sakawa and Shindo 1982). The control actions applied to obtain these response are shown in Fig. 5. The controller presents good performance for both the position and rope length, with are followed by the controller with small position error. The load however presents some swing, which has a maximum absolute value of 0.2 . The swing angle presents has this behavior due the changes in the control actions, especially in the motor controlling the horizontal position, causing the observed chattering. As the number of discrete control actions was not sufficient to reduce the swing angle significantly, a second controller with a finer discretization is tested. In this simulation, the B&B optimization scheme used

Swing angle [º]

1 0.5 0

0

Time [s]

Fig. 4. First simulation of the transfer of a container for 60 meters. Solid line - reference; dash-dotted line - measured outputs.

Container gantry crane controller

Motor 1 [V]

400 200 0

0

20

40

60

20

40

60

80

100

120

140

160

80

100

120

140

160

400

Motor 2 [V]

This weights mimic the objective of following with the same importance the rope and position references, without neglecting the crane swing angle. The value of the third weight is higher because numerically, the swing error value is much smaller than the other weights. The simulation model of the gantry crane is implemented using the Lagrangian of the system (Sakawa and Shindo 1982). The model is extended with the models of electric motors. The parameters of the models have been obtained chosen from automatic cranes in the port of Rotterdam in the European Container Terminal (ECT). The model includes the viscous friction present in the crane. The input of the crane motors is in the interval V. The trolley can reach a maximum velocity of 3.2 ms for a maximum load of 53 ton. The crane construction is assumed to be stiff, but the largest acceleration is limited to 0.8 ms in order to avoid overloading the mechanical structure. Note that this constraint limits the rate of change of the input voltage. In the simulations performed in this paper, the interval V revealed to be sufficient to control the system in an accurate way. The simulations use as prediction horizon , and as control horizon . The B&B optimization scheme used possible changes in the control actions for both motors, with the following values:

200 0

0

Time [s]

Fig. 5. First simulation of the transfer of a container for 60 meters. Control actions.

possible changes in the control actions for both motors, with the following values: (9)

This discretization has possible discrete control actions. This second simulation gives better results, has can be seen in Fig. 6, reducing considerably the swing angle, which has now a much smaller maximum absolute error (0.1 ) in steadystate. As expected, the other references are still followed with very good accuracy. The control actions are now smoother as expected, as can be seen in in Fig. 7. Note that although the rope initial condition mismatches the reference, the predictive controller can correct this error as expected. The implementation of this controller in real-time would require a strategy to reduce the possible control actions in the space .

Rope lenght [m]

Container gantry crane controller 20 15 10 5 0

20

40

60

80

100

120

140

160

Position [m]

60 40 20 0 0

20

40

60

20

40

60

80

100

120

140

160

80

100

120

140

160

Swing angle [º]

1 0.5 0

0

The main disadvantage of B&B optimization applied to MPC with MIMO systems is its large demand in terms of computational power. The number of searches increases exponentially with both the number of discrete control actions and the control horizon. Future research will concentrate on methods for decreasing the computational load. The use of fuzzy objective functions could redefine the bound limits where the B&B search is done and decrease the branching possibilities. Another possible strategy is the use of fuzzy predictive filters in the B&B scheme, as proposed in (Sousa and Setnes 1999) for singleinput single-output control systems. The application to this filters must be extended to MIMO systems.

Time [s]

Fig. 6. Second simulation of the transfer of a container for 60 meters. Solid line - reference; dash-dotted line - measured output Container gantry crane controller

Motor 1 [V]

400 200 0

0

20

40

60

20

40

60

80

100

120

140

160

80

100

120

140

160

Motor 2 [V]

400 200 0

0

Time [s]

Fig. 7. Second simulation of the transfer of a container for 60 meters. Control actions 5. CONCLUSIONS B&B optimization proved to be a valid tool in future implementations of model predictive control applied to MIMO systems. This paper showed that the implementation of this optimization technique to MIMO systems can be a simpler generalization of the SISO case – it only requires the transformation of the multidimensional control space to a 1-dimensional one.

6. REFERENCES Camacho, E.F. and C. Bordons (1995). Model Predictive Control in the Process Industry. Springer Verlag. London, UK. D.A.Linkens and M.Mahfont (1994). Generalized predictive control in clinical anaesthesia.. Oxford University Press. Horowitz, E. and S. Sahni (1978). Fundamentals of Computer Algoritms. Computer Science Press, Inc.. Maryland, USA. Richalet, J. (1993). Industrial applications of model based predictive control. Automatica (29), 1251– 1274. Sakawa, Y. and Y. Shindo (1982). Optimal control of container cranes. Automatica 3(18), 257–266. Sousa, J.M. and M. Setnes (1999). Fuzzy predictive filters in model predictive control. IEEE Transactions on Industrial Electronics 46(6), 1225–1232. Sousa, J.M., R. Babuˇska and H.B. Verbruggen (1997). Fuzzy predictive control applied to an airconditioning system. Control Engineering Practice 5(10), 1395–1406.