Combining Passivity-Based Control and Linear Quadratic Regulator to Control a Rotary Inverted Pendulum

—In this manuscript, new combination methodology is proposed, which named combining Passivity-Based Control and Linear Quadratic Regulator (for short, CPBC-LQR), to support the stabilization process as the system is far from equilibrium point. More precisely, Linear Quadratic Regulator (for short, LQR) is used together with Passivity-Based Control (for short, PBC) controller. Though passivity-based control and linear quadratic regulator are two control methods, it is possible to integrate them together. The combination of passivity-based control and linear quadratic regulator is analyzed, designed and implemented on so-called rotary inverted pendulum system (for short, RIP). In this work, CPBC-LQR is validated and discussed on both MATLAB/Simulink environment and real-time experimental setup. The numerical simulation and experimental results reveal the ability of CPBC-LQR control scheme in stabilization problem and achieve a good and stable performance. Effectiveness and feasibility of proposed controller are confirmed via comparative simulation and experiments.


I. INTRODUCTION
RIP or Furuta pendulum system was first introduced in 1992 at Tokyo Institute of Technology by Katsuhisa Furuta and his colleagues.Swing up control scheme based on pseudo-state feedback is the first control strategy that Katsuhisa Furuta and his colleagues implemented successfully on RIP [1].Professor K. Furuta and his colleagues continuously studied and published new results to scientific community in 2001, 2004, and 2006, respectively [56]- [58].RIP is a single input multiple output system (SIMO) and under-actuated system (i.e., underactuated robots are those systems which have lower number of actuators when compared to the number of degrees of freedom they possess).It is a good platform for outlining, testing, validation for control engineers, researchers to qualify control approaches.
In addition, some researchers combine two or three control strategies for validation on RIP system.For instance, linear quadratic regulator associates with neural network for improving the responses [22], Lyapunov-base controller and linear PD controller [23], LQR-FLC and LQR-PID [24]- [26], backstepping sliding mode controller [27], fuzzy-sliding mode controller [28].Moreover, swing-up and trajectory tracking are problems that many researcher focus on studying and using RIP for validation their proposed control schemes.Swing-up Journal of Robotics and Control (JRC) ISSN: 2715-5072 480 controller is used to swing an inverted pendulum from original position (stable position) to vertical upright position (unstable position).A few authors concentrate on addressing the swingup control of RIP such as [48], [56], [57], [59]- [64].Trajectory tracking control is one of topic to study in control engineering [66]- [69].Besides, a few authors use programmable logic controller (PLC) to control of RIP such as [70]- [73].
PBC is a nonlinear control methodology, can handle the performance of system, not just stability.The main point of PBC is a methodology which consists in controlling a system with the aim at making the closed loop system, passive [29].Although, PBC was first introduced in 1980s [30], this control strategy still develops and many studies have been done by using this methodology [39]- [42].This method has been qualified in some studies such as robust PBC for active suspension system [31], application of PBC for single-phase cascaded H-Bridge grid-connected photovoltaic inverter [32], validation of PBC for three-level photovoltaic inverter to mitigate commonmode resonant current [33].Besides, researchers have ideas like combining PBC with other control strategies.For example, passivity-based sliding mode control [34]- [37], passivitybased sliding mode observer [37], passive-based adaptive robust super-twisting nonlinear controller [38].LQR technique is a popular linear control scheme, the principle of this method can be referred to [22].LQR approach has been studied in many research belong to different fields [43]- [47].
Since RIP system is a nonlinear and unstable system, selecting such wide ranges of the gains in the digital-deployment environment hinders its applicability [22].As a sequence, in this work, we focus on combining two control strategies including PBC and LQR for stabilizing a RIP system at vertical upright position.Control scheme is structured with PBC control signal and LQR control signal.Advantage of LQR is well-stabilizing the closed-loop system arbitrarily around equilibrium point.Meanwhile, nonlinear control, such as PBC, has a wide working range due to feasibility of controller and stability proved by Lyapunov criteria.Hence, we propose a hybrid controller which can combine LQR and PBC to verify stabilization control of RIP.The main contributions of this manuscript are as follows: • The hybrid controller is generated by combining PBC and LQR, on one hand, could support the stabilization process as the system is far from equilibrium point and, on the one hand, when RIP approaches the equilibrium posture, LQR takes responsibility for balancing inverted pendulum at upright position.RIP is an under-actuated robot that has two degrees of freedom (2-DOF).Basic structural components consist of arm, pendulum, and DC servo motor.There are two angles shown in Fig. 1, one for arm and one for pendulum.DC servo motor's shaft with encoder is attached to arm one, which moves horizontally.Pendulum is connected with arm via encoder, which moves rotational.Expectation objective of this system is to control pendulum one stabilize at vertical upright position (equilibrium point).The angle of arm is denoted as θ 1 and the angle of pendulum is denoted as θ 2 .First of all, information of parameters of system and their value are introduced in Table I.The value of those parameters are measured and identified based on real time model that shown in Fig. 3. Equations of motion are described in Eq. ( 1) [48].The dynamic model is affected by many factors such as Centrifugal Journal of Robotics and Control (JRC) ISSN: 2715-5072 481 forces, Coriolis forces, Gravitational forces, etc. Motion equations are given in Eq. ( 1) where M (θ) is inertia matrix, C(θ, θ) contains centrifugal/Coriolis terms and G(θ) is the vector of gravity forces.
Note that the inertia matrix M (θ) is symmetric matrix.Moreover, From Eq. ( 1) it follows that is skew symmetric matrix for any (n×1) vector with N T +N = 0 and θT N (θ, θ)θ = 0.The skew symmetric matrix property plays an vital role for Lagrange dynamics.This property is used in establishing the passivity of RIP system is [29]: The RIP potential energy is defined in Eq. ( 6)

B. Passivity of RIP
In this subsection, passivity of RIP is delivered.Total energy of RIP is given in Eq. ( 7) Taking derivative of H(θ, θ) with respect to t, we obtain Integrating both sides of Eq. ( 8), we obtain Eq. ( 9): Accordingly, RIP having τ as control input and θ as output is passive.When τ = 0, RIP in Eq. ( 1) has two equilibrium points, include (θ 1 , θ1 , θ 2 , θ2 ) = (0, 0, π, 0) corresponding to downward position, is stable equilibrium position.For the remaining position, (θ 1 , θ1 , θ 2 , θ2 ) = (0, 0, 0, 0) corresponding to the upright position, is unstable equilibrium position.Total energy of RIP is different between two equilibrium points.Total energy of each equilibrium points is described as follows The control target is to stabilize the RIP at vertical upright position, its unstable equilibrium point.

C. DC Motor Model
Actually, the system is not yet completed.We observe that just the pendulum and rotary arm have been taken into account, but the DC servo motor has to implemented.Therefore, for the convenience of adjusting DC servo motor as well as applying control schemes to the real time experiment setup, authors transform the control signal from motor torque to voltage that is applied to DC motor by Eq. (10).Parameters of DC servo motor was carried out by previous study [81].
From the motion equations of RIP (1), the control input for mechanical system is motor torque τ .This applied motor torque at the base of the rotary arm generated by the servo motor is described by Eq. (10).The motor can be simplified and expressed as shown in Eq. (10).This equation is implemented on MATLAB/Simulink model. where Rm , τ is the torque of DC motor, K t is torque constant, V is input voltage, θ1 is motor angular velocity.Parameters of servo motor are provided in Table II

D. Non-linear Dynamic Model
The non-linear dynamic model is used to model RIP plant in Matlab/Simulink software.Let x 1 = θ 2 ; x 2 = θ2 ; x 3 = θ 1 ; x 4 = θ1 .From equations ( 1) and ( 10), state-space equations in nonlinear form are given in Eq. ( 11) as follows: where y is output of system, e is input of system, x is statespace vector.Components f 1 (x, t), f 2 (x, t), g 1 (x, t), g 2 (x, t) are obtained as expressed below.

E. Linear Dynamic Model
Nominal linear state-space equation of RIP is obtained via Taylor expansion as x 1 , x 2 → 0. The model is then simplified and expressed as a linear state-space where x is state vector (nx1), y is output vector (px1), u is control vector (mx1), A, B, C, D are matrices of system.
A, B matrices are calculated by substituting all parameters in Table I and Table II into Eq.( 13).The input matrices, A, B, C, D are obtained as expressed in Eq. ( 14): Stabilizing RIP at θ i = θ d = [0, 0] T (i=1,2), we set The control objective is to stabilize RIP at vertical upright position.θ d is selected as follows θ d = [0, 0] T .Therefore, q = θ i , q = θi , and q = θi .Note the q = 0, q = 0 are not an open-loop equilibrium points.
From Eq. ( 15), the dynamics equations can be rewritten as follows Eq. ( 16) Feedback passivation control law is defined by where ϕ p (0) = 0, q T ϕ p (q) > 0 ∀q ̸ = 0 Based on Equations ( 15), ( 16), (17), equations of motion are obtained and expressed in Eq. ( 18) Storage function E 1 is selected as follows: Derivative of selected storage function E 1 with respect to t in Eq. ( 19) becomes Ė1 = 1 2 qT N q − qT ϕ p (q) + qT e + ϕ T p (q) q ≤ qT e and y = q (21) RIP system is output strictly passive with y = q.Zero-state observable property is validated, the new control input must be zero, i.e e = 0 y = q(t) ≡ 0 ⇒ q(t) ≡ 0 ⇒ ϕ p (q(t)) ≡ 0 ⇒ q(t) ≡ 0 (22) The passive control law is defined by where ϕ d (0) = 0, qT ϕ d ( q) > 0 ∀ q ̸ = 0 Control law of feedback control based on PBC is given by We select ϕ p (q) = K p q and ϕ d (q) = K d q where K p , K d are symmetric matrices and positive definite matrices, The objective of LQR control scheme is to define feedback control law as follows Eq. ( 25) To make the state vector x → 0 so that cost function J is minimum.The cost function as follows where Q = Q T ≥ 0, and R = R T > 0 are respectively the weight matrices for the regulation error and input values.
Because Q is symmetric, positive semi-definite matrix, we set as follows Eq. ( 27) Assumption the pair (A, B) is stabilizable và the pair (A, C) is detectable.The optimal control is defined by Eq. ( 28) where S is symmetric matrix, positive definite, and is the solution of the ARE (Algebraic Riccati Equation) in Eq. ( 29) In this paper, weighting matrices Q and R are defined by The linear feedback gain is computed by using Matlab command K LQR = lqr(A, B, Q, R).The results is given by

C. CPBC-LQR
LQR is well-known control technique in the class of linear control schemes.Advantage of LQR is well-stabilizing Furuta pendulum around working point.However, their working space is just being around the working point and we do not know suitable working range of the system.Differently, nonlinear control, such as passivity-based control has a wide working range due to flexible structure of controller and stability proved by Lyapunov criteria.Hence, we propose a hybrid controller which can combine LQR and PBC to verify stabilization control of RIP at working point.The structure of hybrid control scheme CPBC-LQR is shown in Fig. 2.
Control law of hybrid control scheme CPBC-LQR is defined by combining equations ( 24) & (25) as where V in is input voltage that provides for DC servo motor.
Our controller parameters are listed in Table III.Those controller parameters are chosen by try-and-error method.

IV. EXPERIMENTAL PLATFORM
In this subsection, experimental test bed which is designed by authors, is shown Fig. 3. Physical RIP system has been built up and validated control approaches in many studies before [49]- [54].The construction of experiment setup consists of: 1) Pendulum link 2) Arm link 3) A 500 ppr incremental pendulum encoder 4) DC servo motor TAMAGAWA SEIKI 24VDC -30W 5) A 100 ppr incremental rotary encoder 6) Micro-controller STM32F407VG Discovery electronic board 7) Driver IR2184 8) Module UART CP2102 9) Power supplier 24VDC-10A Besides, Waijung blockset version 17.03 has been used in work to support compilation and verification on MATLAB ® 2018a.Currently, MathWorks ® develops MATLAB ® /Simulink ® environment for STM32F4, the program files required for the embedded system are automatically created and loaded into the processor.Waijung blockset library is developed by Aimagin company that provides an option to make a Simulinkbased application.The detail information of Waijung block-set library 1 can be found at https://waijung1.aimagin.com/.Waijung blockset are also used in many studies such as [74]- [80].Physical parameters of real-time experiment platform is provided in Table I.Connection among components is shown in Fig. 4. DC motor TAMAGAWA SEIKI 24VDC-30W include an integrated 100 ppr rotary encoder for arm state measurement (x 3 ).Driver IR2184 is connected with the arm motor following control command (V olts) generated by CPBCLQR controller.Encoder of pendulum link with 500 ppr is used to measure the pendulum state (x 1 ).STM32F407VG Discovery electronic board takes responsibility for controlling the RIP with CPBCLQR, LQR control schemes.Fig. 7 delivers a comparison between performance of system with CPBC-LQR and LQR.The responses of output system by, respectively, using CPBC-LQR and conventional LQR are illustrated in Fig. 7, from which, one can get that proposed controller is fast than the one by using LQR control scheme.It can be observed that the system with CPBC-LQR has better performance, in terms of less overshoot, faster convergence in the pendulum angle, and arm angle.Angular velocity of pendulum and arm are depicted in the second and fourth graph of this figure.In the end of this figure, the control input with two controllers are also compared.
2) With Disturbances: In this subsection, a comparison is conducted with a pulse wise fault that affects to system at a definite time (t= 0.5, 1.5, 2.5, 3.5, and 4.5 seconds).Fig. 8 shows simulation model in case with disturbances.Fig. 9 delivers a comparison between performance of system with CPBC-LQR and LQR.The responses of output system by, respectively, using CPBC-LQR and conventional LQR are illustrated in Fig. 9.When being disturbed, LQR is still robust but the pendulum (θ 2 ) is varied in quite large range.At each time of pulse wise

B. Experimental results
The main purpose of this subsection is to provide performance of state responses of output RIP via experiment.Figures 10 and 11 show two statuses of RIP.Fig. 10 shows the system is in the idle mode, i.e., the machine is ready and available, but is not doing anything productive.Fig. 10 shows the RIP is stable at equilibrium point with CPBCLQR approach.Accordingly, state responses of output can be viewed in Fig. 12 Fig.10.Rotary inverted pendulum is in idle time.Experiment results are drawn in Fig. 12. Fig. 12 delivers the comparison between performance of system with CPBC-LQR and LQR.The responses of output system by, respectively, using CPBC-LQR and LQR are illustrated in Fig. 12, from which, one can get that proposed controller is fast than the one by using LQR control scheme.In the operation time, LQR is still robust but the pendulum (θ 2 ) is varied in quite larger range [−0.02, 0.02] (rad) than the CPBCLQR [−0.01, 0.01] (rad).For the rotary arm state θ 1 with LQR, we can observe that the response of arm state operates like a sine wave with oscillation amplitude is [−0.01,0.31] (rad), while response of arm state with CPBCLQR oscillates around zero radian.It can be observed that the system with CPBC-LQR has better performance, in terms of less overshoot, faster convergence in the pendulum angle, and arm angle.The angle of arm with CPBC-LQR tracks equilibrium point closely, while angle of arm with LQR controller has large amplitude.Angular velocity of pendulum and arm are depicted in the second and fourth graph of this figure.In the end of this figure, the control input with two controllers are also compared.In this manuscript, we have proposed a combination of passivity-based control and linear quadratic regulator for RIP system.Simulation and experiment are performed to qualify the proposed controller CPBC-LQR.Besides, comparison between CPBC-LQR and conventional LQR is carried out, analyzed, and discussed in detailed via simulation on MATLAB/Simulink and laboratory experiment.Both simulation and experimental results show that the proposed design is able to give proper performance.The vital characteristics of CPBCLQR are effectiveness, robustness, and fast adaptation to changes of hardware.Actually, controllers parameters are defined by using try-anderror method.Accordingly, performance of CPBCLQR can be improved by using some optimization methods to optimize controller parameters such as gravity searching algorithm, genetic algorithm.This term could open a new research in the future.Additionally, we will focus on extending the proposed control scheme CPBC-LQR for complex under-actuated robot such as rotary double parallel inverted pendulum.

Fig. 1 .
Fig. 1.Rotary inverted pendulum model Minh-Tai Vo, Combining Passivity-Based Control and Linear Quadratic Regulator to Control a Rotary Inverted Pendulum Journal of Robotics and Control (JRC)

Fig. 11 .
Fig. 11.The inverted pendulum is in upright position (equilibrium point) with CPBCLQR controller which is captured from experimental video.Source: Combining Passivity-Based Control and Linear Quadratic Regulator To Control RIP.https://www.youtube.com/shorts/JibxqHhBQA4.

Fig. 12 .
Fig. 12.State responses of output real time RIP system with CPBC-LQR and LQR techniques

Fig. 13 .
Fig. 13.Video clip of the experiment

TABLE I .
PARAMETERS OF SYSTEM AND VALUE .

TABLE II .
SERVO MOTOR PARAMETERS

TABLE III .
CONTROLLER PARAMETERS