Stabilization of Online Linear Matrix Inequality based Model Predictive Control of Cart in Inverted Pendulum System

DOI : 10.17577/IJERTV5IS050484

Download Full-Text PDF Cite this Publication

Text Only Version

Stabilization of Online Linear Matrix Inequality based Model Predictive Control of Cart in Inverted Pendulum System

P. Komakhan Sudar Vendan, N. Vishnu

Department of Instrumentation and Control Systems Engineering PSG College of Technology

Coimbatore, India

AbstractThe Model Predictive Control (MPC) schemes are employed in process industries, mainly because the constraints in the system are handled more effectively. The online Linear Matrix Inequality (LMI) based MPC is a recent development in the synthesis approach of model predictive controllers that uses the state space model of the system for predicting the future state and the control input. This method involves updating the weights (decision variables) and finding the optimal cost during each sampling instant. Stabilization of a system by a controller is very important as this directly affects the safety of a system. If the system is not stabilized by the controller, the plant might become unstable and pose a threat for the safe operation of the process. Hence, the stabilization of a plant plays a critical role in the process industry. As the optimum conditions are arrived at each instant by this controller, the system is stabilized over a wide operating range and is thus more secure. The inverted pendulum system which has the pendulum mounted over the moving cart is a standard control problem. In this analysis, the existing LMI based MPC and the online LMI based MPC methods are employed for stabilizing the cart in the inverted pendulum system and their performance under the same initial conditions are evaluated and compared.

KeywordsInverted Pendulum, Linear Matrix Inequality, Model Predictive Control, Stabilization.

  1. INTRODUCTION

    MPC refers to the control algorithm that was originally designed for power plants, petroleum refineries to optimize the performance of the process plants by computing a sequence of future manipulated variable adjustments. The first solution software for solving the MPC problem is referred as IDCOM [3], an acronym for Identification and Command. Some distinguishing features of IDCOM approach are the quadratic cost function optimized over a finite prediction horizon, future plant output specified by a reference trajectory, optimal inputs identified using a heuristic iterative algorithm. An important advantage in the model predictive control is that it is able to cope with the hard constraints on controls and states. Thus it has been widely used in process industries where there are hard constraints to be maintained to run the plant in an efficient way. Control of both the linear and the nonlinear systems based on the MPC method is also achieved. The model predictive control solves a finite horizon control problem online and this is equivalent to the infinite horizon control problems [4].

    The main objective in the process industry is to minimize the operating costs and to maintain the plant in a safe and stable condition at all operating points. The MPC schemes are

    used for optimizing the cost and stabilizing the plant in industries mainly because these controllers address the state and the control input constraints more effectively. Over the years, a number of model predictive control schemes are developed [1]. The industrial MPC developed earlier adopts heuristic algorithms and uses the linear models of the process. The examples of this type of controllers are Dynamic Matrix Control (DMC) and the Model Algorithmic Control (MAC). The adaptive MPC methods are then developed from the Minimum Variance Control (MVC). These are commonly called as Generalized Predictive Control (GPC) that provides flexibility for more theoretical studies. Since the results are based on the theoretical studies and one has to tune with the trial and error method, the stability analysis is hard in industrial MPC and the adaptive MPC. Because of these difficulties in the stability analysis of the earlier industrial MPC and the adaptive MPC, synthesis approach of MPC is developed which uses the state space model for the stability analysis of the process. The early version of synthesis approach is the Receding Horizon Control (RHC) proposed in the early 1990s. The stability analysis in synthesis approach is relatively easier compared to the earlier MPC methods. The LMI based model predictive method is developed based on the synthesis approach of the model predictive control method [10]. The online LMI based model predictive control is a recent development in the LMI based MPC methods which effectively optimizes the cost and stabilizes the system compared to the industrial and adaptive MPCs. This can be inferred from the current work.

    The system considered for testing the different model predictive control schemes is the inverted pendulum mounted on a moving cart system. This is a classic example of an under actuated system which has only one input in the form of input voltage to the motor and has two degrees of freedom namely the carts linear movement and the pendulums angular movement. The stabilization problem of inverted pendulum benchmark system has resulted in a variety of advanced control algorithms. The controllers are designed based on the linearized system dynamics to stabilize at the equilibrium point, but the region of attraction is very small. Moreover, in the presence of significant uncertainties, the conventional model predictive controllers become less effective. For this purpose, a multi time scale control algorithm is developed [2]. In the multi time scale structure, Extended High Gain Observers are used to estimate the states and the uncertainties in the first and the fastest time scale. Dynamic inversion is used to deal with the uncertain input coefficients in the second

    time scale. The pendulum converges to a reference trajectory in third time scale and in the final time scale both the cart and the pendulum converges to a desired trajectory [5]. An optimal linear quadratic regulator controller achieves the robust stabilization of the inverted pendulum even in the presence of disturbance and the trajectory tracking of cart [6]. However, this controller has high oscillation amplitude and that affects the operating cost and stability of the process. The optimization problems in the model predictive control methods suffered setbacks because of the limitations in the hardware capabilities. The development of complex convex optimization in the early 1990s resulted in the improvement of the synthesis approach of model predictive control [7,8]. Recent developments in processors with high processing speed paved the way for research in number of optimization problems. The online LMI based model predictive controller which is a recent development is used for stabilizing a large- scale plant in decentralized configuration. The large-scale plant is divided into a number of subsystem. The LMI based MPC is used to stabilize the individual subsystem and as a result the whole plant is stabilized [1]. This control algorithm based on online LMI is proposed for stabilizing the cart position from any initial condition. As most of the systems present in the industry are unstable nonlinear systems, this controller gains significance with its ability to effectively optimize the cost and stabilize the unstable nonlinear systems.

    The paper is organized as follows. Section I contains the survey of recent development MPC schemes and the study of existing control methods for inverted pendulum system. In Section II, modelling of the inverted pendulum system is given in detail. In Section III, the algorithm for the existing LMI based MPC and that of the online LMI based MPC for the inerted pendulum system is presented. Simulation results for the existing LMI based MPC and that of the online LMI based MPC methods are presented in Section IV. Based upon the observations, discussions are provided in Section V. Section VI concludes the analysis with future scope.

  2. MODELLING OF INVERTED PENDULUM

    The under actuated unstable nonlinear inverted pendulum system has two degrees of motions with a single input and such systems are difficult to control. The output is the linear motion of the cart and the angular motion of the pendulum. Because of this nature of the system, they are selected for studying various modern control problems. The schematic representation of the inverted pendulum on a moving cart system is shown in Figure 1 [6].

    The cart-inverted pendulum system consists of a pendulum of mass and length attached to the cart of mass and the cart in turn is attached to a motor that drives the cart along the horizontal track by means of gear arrangement. The mass of the cart is given by the sum of the cart mass plus the mass of the additional weights that are added to balance the weight of the pendulum attached to the cart.

    Fig. 1. Cart-Inverted Pendulum System

    The movement of the cart is constrained only in the horizontal direction whereas the pendulum can rotate in the x- y plane. Hence the system can be represented by the two state variables namely, the horizontal displacement of the cart and the angular displacement of the pendulum . The coulombs frictional force exerted by the cart pinion arrangement and the force on the cart due to pendulums action are assumed to be negligible for the modelling of the system. The Cartesian co-ordinates of the cart-inverted pendulum is represented as shown in Figure 2.

    Fig. 2. Cartesian co-ordinates of Cart-Inverted Pendulum System

    The global frames are fixed as and the position of the pendulum with respect to the global frame is given by corresponding to the and global reference frame. The mathematical model of the setup shown in Figure 2 is obtained by applying the Euler-Lagrangian energy equation.

    1. Euler Lagrangian Formulation

      The Lagrangian formulation is based on the differentiation of the energy terms with respect to the systems state variables and time [6]. When the complexity of the system increases, the Lagrangian method becomes relatively simpler to use. Lagrangian method is based on the following two generalized equations: one for linear motions and the other for rotational motions. Because of the effectiveness, the Lagrangian method is used for modelling the complex systems which have translational as well as rotational motions. The Lagrangian is defined as

      (1)

      Where is the Lagrangian, is the total kinetic energy of the system, is the total potential energy of the system. The equations governing the Lagrangian method is given by

      (2)

      (3)

      Where the summation of all external forces for a translational motion is and is the summation of all external forces for rotational motion, and are the system variables. Hence in order to get the equations of motion for the system, the energy equations of the system are derived first and then the Lagrangian is differentiated according to Equations (2) and (3). For the cart-inverted pendulum system, the linear motion is given by cart position and the angular

      motion is given by pendulum position . The Euler-

      Lagrangian for the cart-inverted pendulum system is given by

      (4)

      (5)

      Where and are the force applied on the and co- ordinate respectively. The nonlinear model obtained by the Euler Lagrangian method is linearized around the equilibrium point i.e. upright position such that

      . The linearized model is written in

      TABLE I

      SYSTEM PARAMETERS OF CART-INVERTED PENDULUM SYSTEM.

      Parameter Description Value

      Mass of cart Pendulum mass Pendulum length from centre to C.G Pendulum moment of Inertia

      Acceleration due to gravity Viscous damping

      co-efficient at Pendulum axis

      Viscous damping

      co-efficient at motor pinion

      The system parameters governing the cart-pendulum system is substituted in (8) to get the state space model. The cart-pendulum system parameters that are used to obtain the state space model are shown in Table 1.

      By substituting the parameters given in Table 1 [13] in Equations (8), the state space model of the system is obtained as shown below:

      the state space form as

      (6)

      (7)

      Where,, and .

      The state space model of the system is thus obtained as

      (8)

      Linearization is done at the equilibrium point and the state space model of the system is obtained. This model represents the system only within an operating region and whenever the system states exceeds the maximum boundary, the model will not be able to accommodate them. The state and the control input values tend to increase exponentially. Hence, it is important to note the operating region and the conditions that are chosen for testing should fall within the operating range, else the system will become unstable.

      (9)

      (10)

      The output of the system is taken as the cart position and the cart velocity . The Linear matrix inequality based model predictive control is to be used for stabilizing the cart from different initial conditions and so the two state variables corresponding to the cart are taken as output variables.

    2. Non Linear Model of the Cart-Inverted Pendulum System

    For the analysis of the system, a nonlinear model of the system is developed in MATLAB Simulink as a subsystem. The model is developed by rewriting the nonlinear equations of motion given by

    (11)

    (12)

    The above equations are used to model the system which has the nonlinear terms of sine and the cosine functions in them. The nonlinear model of the system is shown in Figure 3. A simple model predictive control to track the desired trajectory using the nonlinear model as a subsystem is shown in Figure 4. This control block is used to select the control and

    prediction horizon for the system to get the optimal performance. For this control and prediction horizon, the LMI based model predictive control for stabilization of the cart is executed.

    1. Existing LMI Based Model Predictive Control

      The available linear matrix inequality based model predictive controller is one of the existing synthesis based approach of the model predictive control [10]. Here, for the LMI based optimization problem, the state predictions are rendered by

      (13)

      Where,

      And

      (14)

      (15)

      Let and be the block diagonal matrices with the diagonal element being and matrices respectively. The cost function to be optimized is given by

      Fig. 3. Nonlinear model of the Cart-Inverted Pendulum System

      With

      (16)

      (17)

      The MPC optimization problem is transformed into the existing LMI optimization problem as

      Such that (19) is satisfied.

      (18)

      , . (19)

      Fig. 4. Model Predictive Control of Cart-Inverted Pendulum System

  3. LMI BASED MODEL PREDICTIVE CONTROL

    The LMI based MPC falls under the synthesis approaches of MPC. The synthesis approach uses the state space model for optimizing the output in a process plant. There are two common ways in which the control problems are operated upon when considering the optimization problem in a finite horizon. They are either an off-line approach, in which the control parameters are chosen from off-line calculations or an on-line approach, in which the control parameters are updated online during each iteration. The online approach of MPC is used for uncertain and highly unstable systems to improve their region of attraction and to obtain the optimum performance from such systems.

    At each time , only the obtained is implemented and at the next sampling instant, based on the new measurement , the optimization is redone such that is obtained. In thismethod, the LMIs of

    Equation (19) is solved to get the value of and then the cost function is formulated and the optimization is done as in Equation (18) to obtain the optimal control input. The obtained optimal control input is substituted in the Equation

    1. to predict the state variables and the process is repeated.

      1. Proposed Online LMI Based Model Predictive Control

      The proposed online LMI based model predictive control is the advancement in the existing method of the LMI based model predictive control [1]. As the weighing matrices which are the decision variables are updated during each instant, the optimization problem is feasible over a wide area and hence have a larger region of attraction. The sequence of operation in the proposed online LMI based MPC during each sampling instant is summarized in Figure 5.

      Start

      Input the system model and other dependent variables

      (22)

      Based on the value of this quadratic function during each instant, the conditions are obtained for optimizing the cost function. The cost function is given by

      (23)

      Where,

      Obtain the optimal weights by solving the Linear Matrix Inequalities.

      Obtain the optimal weights by solving the Linear Matrix Inequalities.

      (24)

      The stability constraint for optimizing the cost function is given by

      Formulate the cost function and the quadratic function using the obtained optimal weights.

      Formulate the cost function and the quadratic function using the obtained optimal weights.

      (25)

      Optimize the cost function to get the optimal control input based on the given conditions.

      Optimize the cost function to get the optimal control input based on the given conditions.

      Here is taken as . The input is also constrained to be while considering the optimization for the cart-pendulum system. The optimization is done based on the values of as follows:

      For MPC optimization is

      done by

      (26)

      Use this control input to get the optimal states. The control input and the states are stored incrementally.

      Use this control input to get the optimal states. The control input and the states are stored incrementally.

      Such that Equation (25), the input constraints are satisfied and the current value of the quadratic function is calculated as

      (27)

      Plot the control input and the states

      Stop

      For is defined by

      For , MPC optimization is done by Such that Equation (27) with ,

      (28)

      (29)

      Fig. 5. Proposed Online LMI Based Model Predictive Control.

      In this method, the general discrete time riccati equation is used to form the matrix inequality which is given by

      For the below equation is solved for its optimal value,

      Where,

      (20)

      For Equation (29) is used to perform the MPC operation and

      • For MPC is done by

    (31)

    • Such that (32)

    (21)

    In the inequality equation mentioned in Equation (20), the weighing matrices and are taken to be the decision variables. Hence during each sampling instant these optimal weighing matrices are calculated. With the optimal weights a quadratic function is defined as

    In this analysis using the online LMI based MPC, the weighing matrices are obtained from solving the matrix inequality during each sampling instant as explained in Figure

    5. These weighing matrices are then used to find the quadratic function and this in turn is used to solve the optimization problem. The resultant optimal inputs are then used to estimate the optimal states as in Equation (13) (15). The control input obtained from this method guarantees stability and confirms the effectiveness of this analysis.

  4. SIMULATION

    The simulation is carried out for stabilizing the cart position from the given initial condition using the existing LMI and the proposed online LMI based MPCs. A common control and prediction horizon has to be selected, such that the performance of the existing LMI based MPC and the proposed online LMI based MPC can be compared. For selecting these parameters, a set point of three centimeter amplitude square wave is given and the cart position is made to track this desired trajectory using the MPC control block shown in Figure 4. The control and prediction horizon are chosen by trial and error method. When the prediction horizon is chosen above 30, the system state tend to increase exponentially. When the prediction horizon is less than 30, the output is not able to track the desired trajectory. Hence the prediction horizon is fixed at 30 and the control horizon is varied. The simulation output when the control horizon is 3 and the prediction horizon is 30 is shown in Figure 6.

    value lower than the maximum allowable limit for the safety of the motor. The initial conditions are taken as

    for both the cases. The cost function is formulated as in Equation (16) and the simulation response of the system for the existing LMI based controller is shown in Figure 7 for the given initial condition.

    From the Figure 7, it is clear that the system is not stabilized from the given operating point. The sustained oscillations are present in the states corresponding to the cart namely, the cart position and the cart velocity . Thus the system is not completely stabilized. In the online LMI based MPC method, the simulation response of the cart for the same initial conditions as for the existing LMI based control is shown in Figure 8. From Figure 8, it is observed that the system is stabilized i.e. the system states cart position and the cart velocity reaches zero as time increases for the given conditions.

    Cart Position(m) and Cart velocity (m/s)

    Cart Position(m) and Cart velocity (m/s)

    0.12

    0.1

    0.08

    0.06

    0.04

    0.02

    0

    Online LMI Based Model Predictive Control of Cart

    Cart Position

    Cart Velocity

    Cart Position

    Cart Velocity

    -0.02

    0 5 10 15 20 25 30

    time(sec)

    control input

    3

    Fig. 6. MPC Output for Control horizon as 3 and Prediction horizon as 30

    The tracking performance of the cart is better for the current control and prediction horizons. When the control horizon is increased further the performance of the controller is similar as shown in Figure 6. Thus the control and prediction horizons are selected as 3 and 30 respectively. For this control and the prediction horizon, the existing LMI based model predictive control is performed to stabiize the cart from the given initial condition.

    LMI Based Model Predictive Control of Cart

    Cart Position(m) and Cart velocity (m/s)

    Cart Position(m) and Cart velocity (m/s)

    Cart Position

    Cart Velocity

    Cart Position

    Cart Velocity

    0.1

    0.08

    0.06

    0.04

    0.02

    0

    -0.02

    -0.04

    0 5 10 15 20 25 30

    time(sec)

    control input

    3

    Controlled Input (V)

    Controlled Input (V)

    2

    1

    0

    -1

    -2

    -3

    0 5 10 15 20 25 30

    time(sec)

    Fig. 7. LMI Based Model Predictive Control of Cart.

    The weighing matrices and are initialized as identity in both the cases before the start of the optimization process. Constraint on the control input is set as whereas the motor can operate at about . The constraints are set at a

    2

    Controlled Input (V)

    Controlled Input (V)

    1

    0

    -1

    -2

    0 5 10 15 20 25 30

    time(sec)

    Fig. 8. Online LMI Based Model Predictive Control of Cart.

  5. DISCUSSIONS

    In the existing LMI based MPC method [10], the weights are not updated during each sampling instant and only the cost function is optimized by utilizing the linear matrix inequality form explained in Equation (18) to get the optimal state and the input values. From Figure 6, it is clear that sustained oscillations are present in the states. The control input corresponding to the optimal cost found out during each sampling instant is not able to stabilize the cart completely from the given initial condition.

    In the online LMI based MPC, the controller performance is improved in a way that in addition to finding the optimal control input at each sampling instant, the weights are updated by solving the LMI form as in Equation (20). These weights in turn are used to find the optimum control input from the updated cost function. Hence, the optimality of the control input obtained is further increased by this approach. The system is stabilized with zero steady state error and there no oscillations once the system is stabilized. Very small overshoot and undershoot before stabilizing and the settling time of the state variables are also less. By this way, the region of attraction for unstable systems such as cart-pendulum is increased to keep them in the stabilized operating region. This method demands huge computation from the controller during each sampling instant as this involves finding the updated

    weights and optimizing the cost function in the single run at each instant. However, this demand on the controller can be tolerated for the stabilizing nature of the controller. In future, new methods might evolve that optimizes cost and guarantees stability with minimum computational demand from the controller.

  6. CONCLUSION

Thus in this analysis, the proposed online LMI based MPC gives better optimal control inputs which results in optimal states with optimized cost function. The stability of the system is improved as the region of attraction by this controller is increased. The design of such online LMI based MPC is done and its ability to stabilize the nonlinear system is analyzed and compared with the existing LMI based MPC. As a future work, further reduction of the computational complexity in the proposed controller can be carried out.

REFERENCES

  1. H.D. Tuan, A. Savkin, T.N. Nguyen, H.T. Nguyen, "Decentralised model predictive control with stability constraints and its application in process control", J. Process Control, Vol. 26, pp. 73-89, 2015.

  2. Joonho Lee, Ranjan Mukherjee, "Output feedback stabilization of inverted pendulum on a cart in the presence of uncertainties", Automatica, Vol. 54, pp. 146-157, 2015.

  3. L. Magni, R. Scattolini, "Stabilizing decentralized model predictive control of nonlinear systems", Automatica, Vol. 42, pp. 1231-1236, 2006.

  4. S. Joe Qin, Thomas A. Badgwell, "A survey of industrial model predictive control technology", Control Engineering Practice, Vol. 23, pp. 733-764, 2003.

  5. V. Ravichandran, D. Mahindrakar, "Robust stabilization of a class of under actuated mechanical sytems using time scaling and Lyapunov redesign", IEEE Transactions on Industrial Electronics, Vol. 58, pp. 4299-4313, 2011.

  6. E. Vinodh Kumar, Jovitha Jerome "Robust LQR controller design for stabilizing and trajectory tracking of Inverted Pendulum," Procedia Engineering, vol. 64, pp.169-178, 2013.

  7. M. Rotkowitz, S. Lall, "A characterization of convex problems in decentralized control", IEEE Transactions on Automatic Control, Vol. 51, pp. 1984-1996, 2006.

  8. B. Johansson, T. Keviczky, "Consensus algorithms for solving convex optimization problems", 47th IEEE Conference on Decision and Control, pp. 4185-4190, 2008.

  9. R. Ortega, D. Mahindrakar, "Constructive immersion and invariance stabilization for a class of underactuated mechanical systems", Automatica, Vol. 49, pp. 1442-1448, 2013.

  10. Bao-Cang Ding, "Modern Predictive Control", CRC Press, 2010.

  11. D. Mayne, J. Rawlings, "Model Predictive Control: Theory and Design", Nob Hill Publishing, 2009.

  12. W.H Kwon and S. Han "Receding Horizon Control: Model Predictive Control for State Models", Springer-Verlag London Ltd., 2005.

  13. Quanser Inc., Canada, "Inverted Pendulum Plant Manual", 2006.

Leave a Reply