Journal of Fuzzy Systems and Control, Vol. 2, No 1, 2024

Application of LQG Control for Pendubot System

Duc-Anh-Quan Nguyen 1, Luu-Quang-Thinh Nguyen 2,*, Hoang-Anh Nguyen 3, Phu-Hung Nguyen 4, Quoc-Thai Tran 5,

Cao-Sang Pham 6, Hoang-Bao Tran 7, Van-Huy Pham 8, Anh-Quoc Nguyen 9, Phong-Luu Nguyen 10 

1,2,3,4,5,6,7,8,9,10 Ho Chi Minh City University of Technology and Education (HCMUTE), Thu Duc city, HCMC, Vietnam

Email: 1 20151408@student.hcmute.edu.vn, 2 20151063@student.hcmute.edu.vn, 3 20151254@student.hcmute.edu.vn,

4 20145514@student.hcmute.edu.vn, 5 20145608@student.hcmute.edu.vn, 6 20145596@student.hcmute.edu.vn,

7 20151339@stundent.hcmute.edu.vn, 8 20145452@student.hcmute.edu.vn, 9 20145431@student.hcmute.edu.vn,

10 luunp@hcmute.edu.vn   

*Corresponding Author

Abstract The paper focuses on the study of the Pendubot system, a classic system widely used in control research, particularly the 2-link Pendubot. This system is nonlinear with a single input and multiple outputs (SIMO) and is under-actuated. The paper addresses the challenges of applying optimal Linear Quadratic Regulator (LQR) control to Pendubot, requiring an accurate model without noise. The author proposes using a Kalman filter to estimate the system's state variables and mitigate the impact of noise. Subsequently, the LQR controller is applied based on the estimated state variables. Thus, the study suggests an integrated approach combining Kalman filtering and LQR control to enhance Pendubot's performance under real-world conditions. The combination of LQR and Kalman forms a new controller called LQG, which addresses issues encountered by standalone LQR and improves the system's optimal performance. The paper focuses on evaluating the performance of LQR and LQG controllers through system simulations with the input being the motor force applied to the first bar of the Pendubot system in MATLAB Simulink software.

Keywords—Pendubot, LQG Control, Kalman Filter, MATLAB/Simulink

  1. Introduction

Pendubot is an underactuated system with two degrees of freedom, as illustrated in Fig. 1, consisting of one actuated joint and two non-actuated joints [1]-[4]. In various experiments, researchers have analyzed the second-order mathematical equations of the Pendubot and employed control strategies for stability and trajectory tracking. Additionally, practical applications of Pendubot have been explored in control research and educational environments.

In these studies, the authors have modeled the system starting from a stable equilibrium position with a vertically downward configuration of the two joints to an unstable balanced position with the two joints in an upright configuration using a Swing-up control scheme [4]-[11]. Once the Pendubot is brought close to the balanced state, a balancing control law is activated to maintain the Pendubot in an upright position. Notably, solutions based on energy methods have been proposed. For instance, I. Fantoni and colleagues designed a control law by computing the potential energy of the pendulum at the upright position and establishing a Lyapunov-based control law [10]. In the study by Daniel J. Block [12], a linearization technique combined with a PD controller was employed to Swing-up the Pendubot to the unstable balanced position (Top or MID) by adjusting the parameters of KD and KP. An optimal control approach was also applied to achieve stabilization.

Over the past decades, several balancing control laws for Pendubot have been proposed to evaluate the system's stability [6]-[13]. These include nonlinear control laws, linear control laws, and intelligent control laws. However, the presence of noise in the system is a consideration in the development of control strategies in the field of control engineering. In a published paper in 2014, Nguyen Dinh implemented a nonlinear control law based on the Sliding Mode control technique for the underactuated system to achieve robust and stable control in a noisy environment [13]. In [14], a nonlinear disturbance observer was utilized to estimate and compensate for disturbances, enabling stable and balanced control for the Pendubot system. In [15], Adaptive sliding-mode neural network control is based on passive properties.

The Pendubot system is a complex nonlinear system, and computing its exact model can often be more challenging compared to a linear model. Hence, the authors propose the use of a Linear Quadratic Regulator (LQR) control law. However, due to the presence of noise in the system's operation, a Kalman filter is designed to estimate the system's noise. The combination of an LQR controller and a Kalman filter will result in an LQG controller. The control system's performance will be enhanced, and the LQG controller will mitigate the effects of system noise and measurement noise, which are the two primary causes of instability in the control system design. To design the LQR controller, linearization of the system around the operating point is required [4], [6]. Estimating the system's noise enables easier control of the system and reduces the energy supplied by the motor, thereby preventing potential damage.

  1. Material and Method

  1. Modeling of Pendubot System

The Pendubot is a two-degree-of-freedom (two-DOF) underactuated system with two controlled joints, as depicted in Fig. 1. Joint one is directly linked and controlled (q1), while joint two is coupled to joint one through a connecting joint and equipped with an encoder to measure the angle (q2). The mass of joint one (two) is denoted as the length of link one (two) is defined as (l1(l2)), and the distance from the encoder axis to the center of mass of link one (two) is denoted as lc1(lc2). The inertia moment is located at the center of the mass of link one (two) and is defined as I1(I2). We apply the Euler-Lagrange equation as follows:

(1)

Where  is the position vector and  is the velocity vector of the system,  is the input of the control variable. The obtained dynamic equation of the system is expressed as follows:

(2)

Where:

In addition,  is referred to as the inertia matrix,  is referred to as the Coriolis matrix, and  is referred to as the gravity matrix. The parameters used in this paper are defined as presented in Table 1.

Description: A diagram of a mechanical engineering project

Description automatically generated with medium confidence

  1. Dynamics analysis of the pendubot system
  1. Analysis of System Controllability

Before designing control and filtering systems for any given linear system, it is necessary to assess the controllability and observability of the system. Starting from the nonlinear equations, linearization around the operating point of the system is performed. In this case, the control is chosen at the TOP positionas in Fig. 2.

  1. Analysis of System Controllability

Linear System:

(3)

When the system is stable, the state variables of the system will converge to zero:

The matrices A and B are obtained through linearization of the system around the operating point, resulting in:

;

The controllability matrix is given by:

(4)

Using the matrices A and B, we can assess the controllability of the system. If the rank of the controllability matrix, denoted as (4), is equal to the number of state variables, then we conclude that the system is controllable. Based on this, we can design a control system for the linearized system:

(5)

Therefore, based on the controllability matrix (5), we can conclude that the system is controllable.

  1. Parameters of the system

Parameter

Description

Mass of link 1 ()

Mass of link 2 ()

Length of link 1 ()

Length of link 2 ()

Distance from the encoder axis to the center of mass of link 1 (m)

Distance from the encoder axis to the center of mass of link 2 (m)

Inertia moment of link 1 ()

Inertia moment of link 2 ()

Angle of link 1 with respect to the horizontal axis

()

Angle of link 2 with respect to link 1 ()

Description: A black background with a black square

Description automatically generated with medium confidence

  1. Top position of the pendubot
  1. Analysis of System Observability

The essence of the Kalman filter is an observer, and to construct this filter, it is necessary to assess the observability of the system. The observability matrix is presented:

(6)

The output-state matrix C of the system is as follows:

Therefore, we obtain the result:

Hence, based on the rank of the observability matrix being equal to the number of state variables, we can conclude that the system is observable.

  1. Design of the Control System

Fig. 3 illustrates the structure of the controller, and the LQG optimal control problem can be separately solved by addressing the pre-defined optimal control problem and the optimal state estimation problem. In this case, the state variables used for computation are denoted as , with an additional component added as the estimation gain . The control signal  is computed based on these state variables, resulting in a control signal with reduced amplitude oscillations, thereby minimizing adverse effects on the system.

  1. LQR controller in the system

The quality criteria can be expressed through the following fitness function:

(7)

The optimal control signal is designed as follows:

(8)

Where K is the state feedback gain matrix determined by the formula:

(9)

Where P is the positive semi-definite solution of the algebraic Riccati equation:

(10)

The authors simulated the discrete-time system using MATLAB software. To obtain the control gain, they utilized the dlqr (A, B, Q, R) function, which allowed them to calculate the coefficient K for the control design. Where Q and R are positive definite weighting matrices.

  1. Design of the Kalman Filter for the System

Consider a discrete-time linear system:

(11)

Where: represents the system noise and  represents the measurement noise.

Assuming that the system noise and measurement noise are non-Gaussian, uncorrelated, with zero mean and variances of:

(12)

(13)

The discrete Kalman filter has the following form:

(14)

Where L represents the Kalman filter gain, which is presented as:

(15)

With  being the solution of the Riccati equation:

(16)

  1. Results and Discussion

To verify the operation of the controller presented in this paper, we will conduct a simulation using MATLAB/SIMULINK software. This simulation aims to examine the responses of the signals that need to be controlled by the LQG controller. Furthermore, we will compare the performance with the optimal LQR controller when the system is subjected to undesirable components such as measurement noise and system disturbances. In this simulation, we will control the Pendubot to balance in an upright position, facing upwards, with the state vectors. At this position, the controllability of the system has been verified using the formula (4). We will proceed with the simulation for a duration of 4 seconds, with a system sampling time of 0.01 seconds. During the simulation, we will compare the state variables of the system's output without a filter and the system's output with a filter to determine their advantages. The main parameters of the constructed system are presented in Table 2. Controller gain matrix K:

Observation matrix L parameters:

The system noise has very small parameters and is considered to be negligible:

The simulation control system is divided into several blocks as shown in Fig. 4:

  1. Parameters of the pendubot system

Parameter

Unit

=0.1

(kg)

=0.08

(kg)

=0.3

(m)

=0.4

(m)

=0.17

(m)

=0.21

(m)

=0.04

()

=0.06

()

=0.1

(kg)

=0.08

(kg)

Description: A graph of a graph

Description automatically generated with medium confidence

  1. The response of tye output state variables of the model without the kalman filter for estimation

Measurement noise is assumed:

  1. System Modeling Block: The mathematical model of the Pendubot system presented in (2) is implemented in MATLAB/SIMULINK.
  2. Noise Generation Block: In this block, the authors utilize available blocks in MATLAB/SIMULINK to add measurement noise to the output of the model.
  3. Kalman Filter Block: As described in (14), this block is responsible for estimating noise and unwanted components when using sensors for measurements.
  4. Control Block: The authors employ the LQR controller and Kalman filter to bring the Pendubot to an upright balanced state, facing upwards.

The assessment of the quality of the control and filtering on the Pendubot model presented:

In Fig. 5, the state variables' outputs are presented without the Kalman filter, while Fig. 6 illustrates the improved quality of the state variables' outputs with the application of the Kalman filter. It can be observed that the output quality of the Kalman filter is no longer affected by oscillations as seen in the absence of the filter, and the control quality is smoother. In Fig. 5, the angular velocity outputs of variables and exhibit strong oscillations, which negatively impact the system. However, with the application of the filter, the signals become flatter, and the oscillations disappear.

Description: A diagram of a block diagram

Description automatically generated

  1. The structure of the LQG control system

Description: A graph of different colored lines

Description automatically generated

  1. The response of tye output state variables of the model with the kalman filter for estimation

The angular outputs, affected by noise, are estimated remarkably well by the filter in Fig. 7 and Fig. 8. It can be observed that the continuous oscillations captured by the sensors are significantly reduced through the filter, resulting in flat and smooth signals. This indicates excellent performance of the filter.

Description: A graph with a red line

Description automatically generated

  1. The output of the estimated angle of link one, obtained through the kalman filter

The control signal supplied to the system from the motor is also crucial. In Fig. 9, when influenced by motor noise, the control signal exhibits significant oscillations. This can have a substantial impact and potentially damage the motor. However, with the implementation of the filter, the control signal operates with reduced oscillations, minimizing potential harm to the control system.

Description: A graph with a red line

Description automatically generated

  1. The output of the estimated angle of link one, obtained through the kalman filter

Description: A graph showing a red line

Description automatically generated

  1. The response of the control signal if significantly reduced when using the fiter
  1. Conclusion

In this paper, the authors focus on developing a Kalman filter and combining it with an LQR controller to create an LQG controller for the Pendubot model. The goal is to minimize the influence of noise on the system and improve optimal control quality. Simulation results have shown that using the LQG controller significantly improves the system's response, enhances the quality of control signals, and increases the stability of the Pendubot. This research opens opportunities for further development in constructing parameter estimation sets to address unwanted influences on the system. The next development direction is to address noise-induced issues with systems of higher nonlinearity, such as arc robot systems.

References
  1. T. V. Toan, T. T. Ha and T. V. Do, “Hybrid control for swing up and balancing pendubot system: An experimental result,” 2017 International Conference on System Science and Engineering (ICSSE), pp. 450-453, 2017, https://doi.org/10.1109/ICSSE.2017.8030915.
  2. I. Fantoni, R. Lozano and M. W. Spong, “Energy based control of the Pendubot,” IEEE Transactions on Automatic Control, vol. 45, no. 4, pp. 725-729, 2000, https://doi.org/10.1109/9.847110.
  3. T. Albahkali, R. Mukherjee and T. Das, “Swing-Up Control of the Pendubot: An Impulse–Momentum Approach,” IEEE Transactions on Robotics, vol. 25, no. 4, pp. 975-982, 2009, https://doi.org/10.1109/TRO.2009.2022427.
  4. X. Xin, M. Kaneda, T. Oki, “The swing-up control for the Pendubot based on energy control approach,” IFAC Proceedings Volumes, vol. 35, no. 1, pp. 461-466, 2002, https://doi.org/10.3182/20020721-6-ES-1901.00889.
  5. O. Begovich, E. N. Sanchez and M. Maldonado, “Takagi-Sugeno fuzzy scheme for real-time trajectory tracking of an underactuated robot,” IEEE Transactions on Control Systems Technology, vol. 10, no. 1, pp. 14-20, 2002, https://doi.org/10.1109/87.974334.
  1. T. D. Nguyen, “Discrete-Time Sliding mode control for a class of underactuated mechanical systems with bounded disturbances,” Journal of Computer Science and Cybernetics, vol. 30, no. 2, pp. 93-105, 2014, https://doi.org/10.15625/1813-9663/30/2/3569.  
  2. M. T. Vo et al, “Design of Input-Output Feedback Linearization Control for Rotary Inverted Pendulum System,” Journal of Technical Education Science, vol. 17, no. 2, pp. 26–35, 2022, https://doi.org/10.54644/jte.69.2022.1120.
  3. M. Eom and D. Chwa, “Robust Swing-Up and Balancing Control Using a Nonlinear Disturbance Observer for the Pendubot System With Dynamic Friction,” IEEE Transactions on Robotics, vol. 31, no. 2, pp. 331-343, 2015, https://doi.org/10.1109/TRO.2015.2402512.
  4. M. W. Spong and D. J. Block, “The Pendubot: a mechatronic system for control research and education,” Proceedings of 1995 34th IEEE Conference on Decision and Control, vol. 1, pp. 555-556, 1995, https://doi.org/10.1109/CDC.1995.478951.
  5. B. Lu, Y. Fang, “Gain-adapting coupling control for a class of underactuated mechanical systems,” Automatica, vol. 125, p. 109461, 2021, https://doi.org/10.1016/j.automatica.2020.109461.
  1. A. D. Luca, R. Mattone and G. Oriolo, “Control of underactuated mechanical systems: application to the planar 2R robot,” Proceedings of 35th IEEE Conference on Decision and Control, vol. 2, pp. 1455-1460, 1996, https://doi.org/10.1109/CDC.1996.572718.
  2. D. J. Block, M. W. Spong, “Mechanical designer and control for the Pendubot,” Journal of Commercial Vehicles, vol. 104, 1996, https://www.jstor.org/stable/44612095
  3. K. J. Åström and K. Furuta, “Swing up a pendulum by energy control,” Automatica, vol. 36, no. 2, pp. 287–295, 2000, https://doi.org/10.1016/S0005-1098(99)00140-5.
  4. M. W. Spong, “The swing-up control problem for the acrobot,” IEEE Control Systems Magazine, vol. 15, p. 49–55, 1995, https://doi.org/10.1109/37.341864.
  5. V. T. Nguyen, X. T. Vu, H. B. Giap, “Adaptive neural network hierarchical sliding-mode control for pendubot based genetic algorithm optimization,” Intelligent Systems and Networks, pp. 574-580, 2022, https://doi.org/10.1007/978-981-19-3394-3_66.

Duc-Anh-Quan Nguyen, Application of LQG Control for Pendubot System