Uneingeschränkter Zugang

Integrating Disturbance Handling into Control Strategies for Swing-up And Stabilization of Rotary Inverted Pendulum

,  und   
31. März 2025

Zitieren
COVER HERUNTERLADEN

Introduction

The rotary inverted pendulum (RIP) is a fascinating mechanical system that presents significant control challenges due to its underactuated and nonlinear nature [3,1214,17,20]. This system has been widely used in various fields for investigating nonlinear dynamics and control strategies [4,8,10,16]. The primary control issues in the RIP involve achieving the desired balance position of the pendulum and ensuring system stability during dynamic motion. Researchers have explored different control methods to address these challenges, each with its strengths and limitations.

One promising control approach is the energy-based swing-up controller, which efficiently brings the pendulum into an upright position [1,7,14].

However, a more robust control strategy is necessary to maintain stable control in the vicinity of its unstable equilibrium, as well as deal with disturbances. The Linear Quadratic Regulator (LQR) [15,18,19] is a widely-recognized control technique renowned for its ability to achieve stability in linear systems. However, it does not inherently possess robustness against disturbances. On the other hand, the sliding mode controller (SMC) [2,5,11,21] is renowned for its disturbance rejection capabilities, but its chattering behavior can raise practical implementation concerns. To overcome the limitations of these individual control techniques and leverage their complementary advantages, this paper proposes a novel control strategy for the rotary inverted pendulum: the LQR-based Sliding Mode Control (LQR-based SMC) approach. The objective is to harness the stability advantages of LQR while benefiting from the disturbance rejection capabilities of SMC. The main contribution of this work lies in the design and evaluation of an LQR-based SMC controller for the rotary inverted pendulum. By integrating these two control techniques, the proposed approach aims to achieve enhanced stability and robustness, allowing the system to withstand external disturbances and parameter changes.

This study focuses on addressing the control challenges of the RIP system. The proposed LQR-based SMC controller is designed to stabilize the pendulum and effectively resist the impact of disturbances. Through comprehensive simulations, the controller’s performance is evaluated, and it is found to outper form the traditional LQR controller in the presence of disturbances. The LQR-based SMC controller show-cases resilience against changes in model parameters, making it suitable for real applications with varying system dynamics. However, the presence of chattering in the output signals warrants further research and optimization efforts to ensure smooth control action without compromising disturbance rejection capabilities. Overall, the investigation highlights the potential of the LQR-based SMC controller as a robust and effective solution for regulating the rotary inverted pendulum system in the presence of disturbances and parameter uncertainties, paving the way for advancements in control strategies for complex and nonlinear systems.

In summary, this study makes the following notable contributions:

Integration of the Sliding Mode Control approach into the LQR controller, enabling effective handling of external disturbances and variations in model parameters in a rotary inverted pendulum system.

Implementation of an extended state observer to enhance control performance and reduce the dependency on a large number of sensors.

Conducting extensive multi-scenario simulations to validate and demonstrate the effectiveness of the proposed control approach.

These contributions collectively contribute to the advancement of control strategies for the rotary inverted pendulum system, offering insights into robust and efficient control techniques for various practical applications.

Rotary Inverted Pendulum Modelling

In this article, the RIP model is constructed using Simscape to demonstrate its correspondence with physical reality. Figure 1 displays a schematic depiction of the RIP, comprising a pendulum arm and a pendulum rod of length Lp(m) and mass mp(kg) attached to it. The pendulum arm has a length of Lr(m). Here, the rotary arm angle is represented by θ, while the pendulum angle is denoted by α. In the initial state, the pendulum rod points downwards, and when it reaches the desired equilibrium state, the pendulum will point upwards upright. The detailed parameters of the pendulum are provided in Table 1.

Figure 1.

The 3D model of the RIP.

The parameters of the pendulum.

Symbol Description Values Units
mp Pendulum’s mass 0.125 kg
Lp Pendulum’s length 0.15 m
Lr Rotary arm’s length 0.15 m
Jp Pendulum’s inertia moment 2.3 × 10−4 kgm2
Jr Inertia moment of arm 9.4 × 10−4 kgm2
Bp Viscous friction coefficient of the pendulum rod 9.5 × 10−3 -
Br Viscous friction coefficient of the pendulum arm 0.04 -
Kr Motor torque constant 0.042 Nm/A
Km Motor back EMF constant 0.042 Vs/rad
Rm Terminal resistance 2.6 Ω
Lm Rotor Inductance 0.85 mH
g Gravitational acceleration 9.81 m/s2

Due to the uniformity of the pendulum rod, the center of mass is located at the midpoint of its length. The position OB within a cylindrical coordinate frame (rθz) with 3-unit-vectors (ereθez) can be represented as follows [13]: OB=OA+AB=Lrer+Lp2sinαeθ+Lp2cosαez

Taking the derivative with respect to time on both sides of the equation (1), the absolute velocity of OB is determined: v=(Lp2sinαθ˙)er+(Lrθ˙+Lp2cosαα˙)eθ(Lp2sinαα˙)ez

Squaring both sides of equation (2), obtain: v2=(Lp2sinαθ˙)2+(Lrθ˙+Lp2cosαα˙)2+(Lp2sinαα˙)2

The kinetic energy of the RIP includes contributions from both the velocity of the pendulum’s center of mass, as well as the rotational motion of both the pendulum rod and pendulum arm. Ek=12mpv2+12Jpα˙2+12Jrθ˙2

The following expression determines the potential energy of the RIP: Ep=mpgLp2cosα

The Lagrangian equation is represented as: L=EkEp=12mpv2+12Jpα˙2+12Jrθ˙2mpgLp2cosα

The pendulum arm is characterized by the viscous friction coefficient Br, whereas the pendulum rod is associated with the viscous friction coefficient Bp. The torque of the motor is [6]: T=Kt(VmKmθ˙Rm)

By using the Euler-Lagrange equation: { ddt(Lα˙)Lα=Bpα˙ddt(Lθ˙)Lθ=TBrθ˙

Thus, the model for nonlinear dynamics for the RIP can be expressed as follows: { a1α¨+a2θ¨cosα34a1θ˙2sinαcosαa4sinα+a3α˙=0a2α¨cosα+(a5+34a1sin2α)θ¨a2α˙2sinα+a4Lpgα˙θ˙sinαcosα+a6θ˙=a7Vm with a1=mpLp23;a2=mpLpLr2;a3=Bp;a4=mpgLp2;a5=Jr+mpLr2;a6=Br+KtKmRm;a7=KtRm

Selecting the state vector as x=[ αθα˙θ˙ ] and the input as u = Vm, the equations can be presented in the following format: x˙=Ax+Bu with A=[ 00100001Pa4sinαMα0a33a34a2a4sinαcosαMα0a43a44 ] and B=[ 00a2a7cosαMa1a7M ] in which a33=a22sinαcosαα˙a2a4gLPsinαcos2αθ˙+Pa3Ma34=34Pa1sinαcosαθ˙a2a6cosαMa43=a1a22sinαα˙a1a4gLPsinαcosαθ˙+a2a3cosαMa44=34a1a2sinαcos2αθ˙a1a6MM=a1a5+34a12sin2αa22cos2αP=a5+34a1sin2α

Control Problems

In this section, the discussion revolves around bringing the pendulum to an upright position, along with the controllers used to stabilize the pendulum of the RIP system. An estimated observer is also proposed.

LQR control

In a natural state, the pendulum maintains a downward vertical position, so to bring it to an unstable equilibrium position, which is an upward upright position, a swing-up control system must be designed. To address this issue, the energy control law proposed by N.J. Mathew et al. [9] is utilized. The control law is formulated as follows to attain the required energy: m=satς[ k(Ek+EpE0) ]sgn(α˙cosα) where m represents the acceleration of the DC motor, ς is a tuning parameter, k denotes a design parameter, and the function satς refers to a function that saturates at ς.

The second-order linear control system (LQR control) plays a role in finding the optimal control signal to bring the system from the initial state to the final state with the lowest cost. The LQR controller’s cost function is expressed as follows: J(t)=120[ x(t)Qx(t)+uLQR(t)RuLQR(t) ]dt

The objective of the LQR controller is to minimize the cost function as specified in equation (14) in which uLQR(t) denotes the control input of the system at time t.

Modifying the elements, the state weighting matrix Q and the control cost matrix R are designed according to the desired performance. The matrices Q and R are provided as follows: Q=[ 1000000100001000001 ];R=1

The state feedback matrix K is dependent on the matrices Aln, Bln, Q, and R. Matrices Aln and Bln are derived from linearizing the system described in equation (10) at the desired operating point. On the other hand, the selection of matrices Q and R is based on desired performance as defined in equation (15). In MATLAB, the state feedback matrix K can be determined using the LQR function in the following manner: K=lqr(Aln,Bln,Q,R)

The output signal of the LQR controller is: uLQR=Kx

LQR-based Sliding Mode Control

LQR is a linear control system that is suitable for RIP due to its fast settling times. However, the limitation of the LQR is its inability to handle input disturbances. To overcome this drawback, the paper proposes the use of LQR-based SMC.

The SMC is a nonlinear control. The control input taken from the SMC is not a continuous function of time. It switches from one function to another depending on the pendulum’s position. The additional term d(t) is incorporated into the unmodeled plant dynamics and input disturbance.

Consider a nonlinear inverted pendulum system described by: x˙(t)=Ax(t)+Bu(t)+d(t)

The system’s control input is specified as follows: u=uLQR+uSMC

Typically, uSMC=ueq+usw where ueq is the equivalent control and represents the discontinuous high-frequency control added to suppress the uncertainty of system and input disturbances.

Considering the following sliding surface: s(t)=Gx(t)+f(x,t)

In equation (21), gain matrix G is defined by the user. There are multiple methods to determine the gain matrix G, but in this particular study, the left inverse of the input matrix B is employed to calculate G. G=Bleft1=(BB)1B

During sliding, s˙(t)=0 , therefore: s˙(t)=Gx˙(t)+f˙(x,t)=0

Replacing (18) and (19) into (23) yields: s˙(t)=G[ Ax(t)+BuLQR(t)+BuSMC(t)+d(t) ]+f˙(x,t)=0

When combined with LQR, uLQR is a nominal part, while uSMS is responsible for eliminating system uncertainties and input disturbances. Therefore: uSMC=uSW=Nsgn(s(t))

By combining SMC with LQR, the SMC is expected to attenuate input disturbance, meaning that BuSMC = –d(t). Equation (24) can be expressed as: s˙(t)=G[ Ax(t)+BuLQR(t) ]+f˙(x,t)=0

To ensure the existence of sliding mode from the beginning (t = 0), it is necessary to have s(0) = 0 in (21) and satisfy the equation (23), hence the selection: { f˙(x,t)=G[ Ax(t)+BuLQR(t) ]f(x,0)=Gx(0) ensures s˙(t)=GBuSMC(t)+Gd(t) from equations (21) and (27), has the sliding surface: s(t)=G[ x(t)x(0)0t(Ax(t)+BuLQR(t))dt ]

Stability analysis

The Lyapunov stability theorem is employed to compute the discontinuous control input for the SMC. Consider the Lyapunov function as follows: Z(t)=12s(t)s(t)

For a nonlinear system, the sufficient condition for stability is given by: Z˙(t)=s(t)s˙(t)<0

Formulas (28) in (31), we have: Z˙(t)=s(t)(GBuSMC(t)+Gd(t))<0

Choose d(t) = Bdm, where dm is the input disturbance, which is bounded within a predetermined limit and combined with the equation (25): Z˙(t)=GBNs(t)+s(t)GBdm<0

Replace GB = 1 in equation (22): Z˙(t)=Ns(t)+s(t)dm<0Z˙(t)s(t)(N+dm)<0

To ensure system stability, the value of Q is chosen as: Qdm

Extended State Observer

To apply this to the practical model, estimating the velocity of the pendulum and the arm are necessary. The observer estimation also minimizes the use of sensors to avoid waste.

When using an LQR-based SMC, the observer system is designed according to the Extended State Observer design method. An Extended State Observer is as follows: { x^˙a=x^b+σaε(xax^a)x^˙b=hu+x^c+σbε2(xax^a)x^˙c=σcε3(xax^a)

where x^a , x^b , x^c , are observer states, σa, σb, σc > 0, the ε chosen is sufficiently small, h is a nonlinear function, and xa is practical value.

Considering, x=[ αθα˙θ˙ ]=[ x1x2x3x4 ]

The following equation is obtained {x^˙1=x^3+σ1ε(x1x^1)x^˙2=x^4+σε1ε(x2x^2)x^˙3=Bln(3,1)Vm+x^5+σ2ε2(x1x^1)x^˙4=B(4,1)Vm+x^6+σ2ε2(x2x^2)x^˙5=σ3ε3(x1x^1)x^˙6=σ3ε3(x2x^2)

Here, the matrix Bln is obtained from section (3.1); x^i is the estimate of xi, i = 1, 2, 3, 4, and x5 and x6 are extended states. The parameters σ1, σ2, σ3, are positive, and is sufficiently small.

Simulation and Results

Simulation in multiple scenarios is carried out to evaluate the proposed controller (LQR-based SMC) to stabilize the pendulum in the vertically upright position. The traditional LQR controller is chosen as its encounter in every scenario simulation, where the pendulum is initially set at the downright position. Both controllers are first evaluated in two scenarios: external disturbance absent and external disturbance present. After that, the variation in the physical parameter of the model is also deemed to verify the effectiveness of the extended state observer, and this affects the proposed controller’s performance. The parameters of the LQR-based SMC controller are fine-tuned as follows: Aln=[ 00100001132623013.69918.23123.0150237712.154 ];Bln=[ 002246.41497.6 ]

Using the matrix value Q and R in equation (15) and the above matrix value of Aln and Bln, the calculation of the LQR gain K is as follows: K=[ 15.90821.00002.41581.2119 ]

In this simulation, the input disturbance is selected with an intensity of dm = 1. To compensate for the influence of the input disturbance, Q = 1.2 is chosen from equation (35). The gain matrix G can be calculated using equation (22) as: G=[ 003.0819×1042.0546×104 ]

Therefore, the signal obtained from SMC is given as: uSMC=1.1sgn(s(t))

Combined with the LQR signal, the output signal of the LQR-based SMC controller is: u=Kx1.1sgn(s(t))

To design the observer in section 3.4, the parameters are selected as follows: σ1=6;σ2=11;σ3=6;1ε={ 100t3,0t1100,t>1

The next subsections present the simulation results.

Simulation Result Without External Disturbance

In this particular scenario, a comparative evaluation is conducted involving both the proposed controller and the traditional LQR controller. These evaluations are carried out with identical initial conditions and system setups, deliberately excluding any external disturbances that could affect the rotary inverted pendulum system. Our primary objective is to assess how each controller performs in regulating the system dynamics and, more importantly, achieves stability by maintaining the pendulum in an upright position. This stability is a critical factor for the safe and precise operation of the rotary inverted pendulum system.

As illustrated in Subfigures 2a and 2b, it becomes evident that the signal controlled by the LQR exhibits a notably faster settling time when compared to the signal under the control of the LQR-based Sliding Mode Control (SMC) configuration when no input disturbances are introduced into the system. Furthermore, Subfigure 2c visually demonstrates that the signal controlled by the LQR is devoid of the chattering phenomenon that is distinctly observable in the signal governed by the LQR-based SMC.

Figure 2.

The comparison results without external disturbance: (a) the pendulum angle, (b) the arm angle, and (c) the control signal of two controllers.

It is crucial to highlight the fact that the introduction of the SMC component within the SMC-LQR controller, which is primarily designed to enhance robustness against external disturbances, appears to have an adverse effect on its performance in scenarios where disturbances are absent. This observation underscores the importance of carefully selecting and configuring control strategies depending on the specific operational context.

For a more comprehensive examination, Figure 3 offers a detailed comparative analysis of the estimated values and actual values derived from the Extended State Observer for both the traditional LQR (depicted in the two upper subfigures, labeled as aandb) and the SMC-LQR controllers (portrayed in the two lower subfigures, designated as c and d). This analysis provides valuable insights into the behavior and performance of these controllers under various operational conditions.

Figure 3.

The Extended State Observer in the first scenario: (a) the pendulum angle velocity, (b) the arm angle velocity of the LQR controller, (c) the pendulum angle velocity, and (d) the arm angle velocity of the LQR-based SMC controller.

Simulation Result When An External Disturbance Exists

To evaluate the performance of the proposed controller in the presence of external disturbances, a randomized input with an amplitude of 10−2 (Figure 4a) is introduced as a disturbance to the system after 5 seconds. This allows us to validate the controller’s ability to handle disturbances and assess their impact on system stability.

Figure 4.

The comparison results when there is external disturbance (a): the pendulum angle (b), the arm angle (c), and the control signal of two controllers (d).

As illustrated in Subfigures 4b and 4c, the LQR-based SMC controller demonstrates a notable advantage when dealing with input disturbances. The signals controlled by the LQR-based SMC exhibit fast settling times and minimal oscillations, whereas the LQR controller alone fails to stabilize the system, leading to pronounced oscillations. Subfigure 4d emphasizes the impact of input disturbances on the rotary inverted pendulum, with the control signal uSMC from the LQR-based SMC effectively attenuating these disturbances. However, the output signals exhibit a chattering phenomenon due to the discontinuous nature of uSMC containing the sign function. This abrupt switching in the control input may pose challenges in practical applications.

Similar to the previous scenario, the estimated values of the Extended State Observer closely approximate their actual signals, as depicted in Figure 5. This reaffirms the effectiveness of the ESO in estimating system states and supporting the controller’s performance under the influence of external disturbances.

Figure 5.

The Extended State Observer in the first scenario: (a) the pendulum angle velocity, (b) the arm angle velocity of the LQR controller, (c) the pendulum angle velocity, and (d) the arm angle velocity of the LQR-based SMC controller.

The Simulation Result During a Changes in Model Parameters

It is very difficult to obtain the physical parameters of any system with high accuracy. Thus in this scenario, the proposed controller is tested with the assumption that it deviates from the model’s parameter. In detail, the pendulum arm is obtained with a 15% deviation in mass and 8% deviation in length from actual values. This deliberate manipulation of the system’s parameters allows us to explore the controller’s robustness and adaptability in the face of uncertainties. It’s worth noting that this simulation takes place within the context of an environment that includes external disturbances, as previously studied in the second scenario. By incorporating both parameter deviations and external disturbances, our evaluation aims to provide a more realistic and demanding testbed for assessing the controller’s performance.

Subsequently, our observations, as illustrated in Subfigures 6a and 6b, reveal the behavior of the pendulum angle and its arm angle. Notably, the system under the control of the LQR exhibits a pronounced susceptibility to these parameter deviations. While both controllers demonstrate the ability to effectively swing the pendulum arm upward, only the LQR-based SMC controller exhibits the capability to stabilize the pendulum, effectively counteracting the adverse effects of parameter uncertainties. Because of these similar conclusions, figures depicting control signals and ESO’s states for both controllers are not included.

Figure 6.

The comparison results during changes in model parameters: (a) the pendulum angle and (b) the arm angle of two controllers.

Conclusions

In conclusion, our investigation has demonstrated the robustness and adaptability of the LQR-based Sliding Mode Control (LQR-based SMC) controller in dealing with external disturbances and variations in model parameters in the rotary inverted pendulum (RIP) system. Through comprehensive simulations, it was observed that the LQR-based SMC controller outperformed the traditional LQR controller in the presence of external disturbances. The LQR-based SMC controller exhibited fast settling times and minimal oscillations, effectively attenuating the impact of disturbances on the system. This remarkable disturbance rejection capability makes it a valuable choice for applications where uncertainties and external disturbances are prevalent.

Furthermore, the LQR-based SMC controller displayed resilience against changes in model parameters. It successfully maintained stable control, even when faced with uncertainties in the system dynamics. This adaptability is essential for real systems, where model parameters may vary due to environmental conditions or other factors.

However, it is important to acknowledge that the introduction of the Sliding Mode component in the control signal resulted in a chattering phenomenon in the output signals. While this behavior did not compromise the overall stability of the system, it may raise practical implementation concerns. Further research and engineering efforts are necessary to address this issue and optimize the LQR-based SMC controller for smoother control without sacrificing its disturbance-rejection capabilities.

In summary, our study highlights the LQR-based SMC controller as a viable and effective solution for regulating the rotary inverted pendulum system in the presence of external disturbances and uncertain parameters. By combining the advantages of LQR and Sliding Mode Control, this controller demonstrates promising performance and opens avenues for advancements in control strategies for similar complex systems. Looking towards future research, refining the LQR-based SMC controller and exploring hybrid control approaches may pave the way for even more robust and reliable control solutions in various practical applications.

Sprache:
Englisch
Zeitrahmen der Veröffentlichung:
4 Hefte pro Jahr
Fachgebiete der Zeitschrift:
Informatik, Künstliche Intelligenz, Technik, Elektrotechnik, Mess-, Steuer- und Regelungstechnik, Maschinenbau, Grundlagen des Maschinenbaus