Nothing Special   »   [go: up one dir, main page]

Next Article in Journal
Sectoral Efficiency and Resilience: A Multifaceted Analysis of S&P Global BMI Indices Under Global Crises
Previous Article in Journal
Logistics Optimization Applied to Redesign Operations Involving Merchandise Location, Employee Ergonomics and Distribution Network
You seem to have javascript disabled. Please note that many of the page functionalities won't work as expected without javascript enabled.
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Transition Control of a Rotary Double Inverted Pendulum Using Direct Collocation †

by
Doyoon Ju
,
Taegun Lee
and
Young Sam Lee
*
Department of Electrical and Computer Engineering, Inha University, 100 Inha-ro, Michuhol-gu, Incheon 22212, Republic of Korea
*
Author to whom correspondence should be addressed.
This article is a revised and expanded version of a paper entitled “Implementation of 12 Transition Controls for Rotary Double Inverted Pendulum Using Direct Collocation”, which was presented at ICINCO 2024, Portu, Portugal, 18–20 November 2024.
Mathematics 2025, 13(4), 640; https://doi.org/10.3390/math13040640
Submission received: 16 January 2025 / Revised: 12 February 2025 / Accepted: 13 February 2025 / Published: 15 February 2025
(This article belongs to the Section C2: Dynamical Systems)

Abstract

:
The rotary double inverted pendulum system is characterized by one stable equilibrium point and three unstable equilibrium points due to its kinematic properties. This paper defines the transition control problem between these equilibrium points to extend the conventional swing-up control problem and proposes an implementation method using a laboratory-developed rotary double inverted pendulum. To minimize energy consumption during the transition process while satisfying the boundary conditions of different equilibrium points, a two-point boundary value optimal control problem is formulated. The feedforward trajectory required for feedforward control is computed offline by solving this problem. The direct collocation method is employed to convert the constrained continuous optimal control problem into a nonlinear optimization problem. Furthermore, a time-varying linear–quadratic (LQ) controller is utilized as a feedback controller to accurately track the generated feedforward trajectory during real-time control, compensating for uncertainties in the feedforward control process. The proposed transition control strategy is experimentally implemented, and its effectiveness and practicality are validated through the successful tracking of 12 transition trajectories.
MSC:
70E60; 49M25; 34H05; 49M37; 64K10

1. Introduction

The inverted pendulum system has been extensively employed in control engineering as a canonical example for verifying control theories and evaluating their practical applicability. This system encompasses both nonlinear and non-minimum phase characteristics alongside inherent instability, making it an invaluable educational platform for teaching control theory principles. Furthermore, researchers utilize it as a testbed to validate advanced control strategies. Key research areas related to inverted pendulum systems include swing-up control, which involves transitioning the pendulum from its initial downward state to an upright position, and balance control, which stabilizes the system after the swing-up process [1,2,3,4,5,6]. Swing-up control is significantly more challenging than balance control, as it necessitates the design of controllers that account for the system’s nonlinearity, instability, and inherent input–output constraints [7].
Unlike linear inverted pendulum systems, where the pendulum is constrained to rotate within a single plane, in rotary inverted pendulum systems, the powered arm also rotates. This characteristic enables the pendulum to move within three-dimensional space, introducing additional challenges to swing-up control. Various methods have been applied to address the swing-up problem in rotary inverted pendulum systems, including self-tuning techniques [8], PID controllers [9], and approaches utilizing sliding observers [10]. Recently, research has also solved this problem using AI-based controllers [11,12]. Additionally, experimental studies have investigated real-world implementations of swing-up control for rotary inverted pendulums. For instance, Cherrat [13] implemented swing-up PD and sliding mode control on a rotary inverted pendulum, while Jensen [14] introduced an updated Furuta pendulum design that improves accessibility for control demonstrations. These studies contribute to the experimental validation of swing-up control strategies in rotary systems.
However, for rotary double inverted pendulums with increased pendulum stages, most studies have implemented swing-up control primarily in simulation environments [15,16,17,18]. In the rare instances utilizing real systems, research is typically limited to balance control following manually performed swing-up operations [19,20]. A common limitation of these studies is that either the researchers lacked a real rotary double inverted pendulum capable of swing-up control or, even when such systems were available, successful swing-up control was not published. Ibrahim’s study [19], one of the few works involving real systems, used a rotary double inverted pendulum manufactured by Quanser [21], a company specializing in educational control system platforms. However, this system has a structural limitation that restricts free rotation of the second pendulum. Additionally, Sondarangallage [20] built a custom rotary double inverted pendulum allowing free rotation of the arm and pendulum. Nonetheless, their study only addressed balance control using sliding mode control in a follow-up paper, without exploring swing-up control [22].
Based on our extensive experience studying inverted pendulums, we aim to address the problem by directly constructing a real rotary inverted pendulum system, similar to Sondarangallage’s approach, instead of purchasing commercially available rotary systems. The key aim of this process is to ensure that the defining feature of rotary inverted pendulums—unrestricted rotation of the arm—is guaranteed during the construction phase. In rotary inverted pendulum systems without slip ring structures, wires transmitting rotational information constrain the arm’s rotational displacement, leading to limitations. To address this issue, the authors’ laboratory utilized a slip ring structure to resolve the rotational displacement constraint and successfully implemented swing-up control by employing a Kalman filter [7]. Other researchers aiming to increase the number of pendulum stages constructed linear double inverted pendulums, demonstrating the effectiveness of the proposed structure through successful swing-up control [23]. Building upon this experience, the authors intend to construct a rotary double inverted pendulum system and implement swing-up control using the real system.
In an inverted pendulum system with a single pendulum, the only swing-up problem involves transitioning the pendulum from the stable equilibrium point where it hangs downward to the unstable equilibrium point in the upright position. However, when the system includes two pendulums, they can be arranged in configurations such as Down–Down, Down–Up, Up–Down, and Up–Up. This introduces two additional unstable equilibrium points, in addition to the stable Down–Down equilibrium point and the unstable Up–Up equilibrium point. These configurations allow for the control problem to be redefined to include the conventional swing-up problem as well as the transition control problem, which involves moving between different equilibrium points. Among the four equilibrium points generated by the two pendulums, there are 11 transition types alongside traditional swing-up. This paper experimentally implements all 12 transition control problems, including swing-up control.
The transition control among the four equilibrium points of the rotary double inverted pendulum can be designed by referencing the swing-up control strategies of linear inverted pendulums. In 2007, Graichen introduced a two-degree-of-freedom control structure that combined feedforward and feedback control to effectively address the swing-up control problem of linear inverted pendulums, accounting for rail length constraints [24]. The fundamental concept of Graichen’s two-degree-of-freedom control structure involves the dynamic equations of the multi-stage inverted pendulum to calculate the state and control input trajectories offline, which guide the pendulum to the upright position. These calculated trajectories are applied in a feedforward manner to induce the swing-up motion. During the system’s operation, any discrepancies between the actual trajectory and the calculated feedforward trajectory are corrected through feedback control, ensuring that the pendulum closely follows the feedforward trajectory and achieves successful swing-up. Building on this approach, this paper employs the direct collocation method [25] to numerically solve the nonlinear optimal control problem to determine the feedforward trajectory for the rotary double inverted pendulum. The feedback controller design is similar to Graichen’s, utilizing an LQ control method optimized for time-varying systems. In Graichen’s method [24], trajectories are generated through a combination of cosine terms, limiting their flexibility. However, direct collocation generates trajectories by directly solving the governing equations without assuming a specific functional form. Instead, it simultaneously satisfies the dynamic equations and constraints to search for the optimal solution, providing greater flexibility in trajectory design. As a result, using the direct collocation method increases the likelihood of finding diverse trajectories required for transition control and can effectively handle more complex dynamic conditions. These advancements highlight the need for a more generalized transition control framework, leading to the key contributions of this study, as summarized below.
Based on the limitations of existing swing-up control strategies and the transition control challenges for rotary double inverted pendulums, this study makes the following key contributions:
  • Development of a fully operational rotary double inverted pendulum for transition control
    This study introduces a physically constructed rotary double inverted pendulum system designed to enable all 12 transition control types among four equilibrium points. Unlike previous studies on balance control or swing-up control in simulations, this system provides a real-world experimental platform for validating complex transition control strategies.
  • Flexible feedforward trajectory generation via direct collocation
    Unlike conventional methods that rely on predefined functional forms, such as a combination of cosine terms for trajectory generation, this study employs the direct collocation method to numerically solve the nonlinear optimal control problem. This approach enhances flexibility in trajectory design and enables simultaneous satisfaction of dynamic constraints, making it highly adaptable to complex transition scenarios.
  • Experimental implementation and validation on a real-world system
    A physically constructed rotary double inverted pendulum system is used to experimentally implement 12 different transition control types, demonstrating the proposed control strategy’s practicality and effectiveness.
These contributions collectively advance transition control in underactuated robotic systems, enabling more efficient and versatile control of rotary double inverted pendulums.
Building on these contributions, this revised and expanded version of the paper experimentally implements 12 transition control types using a physically constructed rotary double inverted pendulum system, as outlined in the following sections [26]. Section 2 provides a detailed explanation of the structural characteristics of the rotary double inverted pendulum and derives the system’s dynamic equations based on the Euler–Lagrange formulation. In Section 3, the equilibrium points and transition control problems are defined and a method to obtain feedforward trajectories using direct collocation to numerically solve the nonlinear optimal control problem is proposed. Section 4 describes the experimental implementation of 12 transition control problems using a two-degree-of-freedom controller designed with time-varying LQ control. Finally, Section 5 analyzes the results to validate the proposed method’s effectiveness.

2. Structure and Mathematical Modeling of the Rotary Double Inverted Pendulum

The rotary double inverted pendulum proposed in this paper is shown in Figure 1. The system uses an 80 W BLDC motor to provide power to the arm, with position and angular velocity information measured by an E40H8-5000-3-N-5 encoder (Autonics, Mundelein, IL, USA) with 20,000 CPR (Counts Per Revolution) resolution. The first pendulum is equipped with an AMT102-V encoder (Same Sky, Lake Oswego, OR, USA) with an 8192 CPR resolution, while the second pendulum uses an AS5145B encoder (ams OSRAM, Premstaetten, Austria) with a 4096 CPR resolution, both selected to meet the design requirements and provide precise positional information. To ensure structural integrity and accurate dynamic modeling, the rotary double inverted pendulum was designed and fabricated using SolidWorks (Solidworks 2024), a 3D CAD modeling tool. During the design phase, the system was meticulously modeled to maintain geometric symmetry, thereby minimizing structural imbalances. This symmetry was preserved throughout the manufacturing process to ensure the physical system adhered to the design specifications. Furthermore, each component’s material properties and mass distribution were rigorously analyzed to precisely determine the center of mass (CoM) positions, reducing discrepancies between the theoretical model and the actual system. These considerations significantly improved consistency between the mathematical model and the experimental implementation, ultimately enhancing the accuracy of system identification and control performance. For real-time control and data acquisition, we developed a rapid control prototyping (RCP) system in our research laboratory [27]. This system is the primary interface for executing control algorithms on the physical hardware while simultaneously acquiring real-time sensor feedback. To ensure precise synchronization among sensing, computation, and actuation, the sampling rate was set to 1 kHz, and MATLAB (Matlab 2022b)/Simulink (Simulink 10.6)-based real-time processing tools were employed to maintain deterministic execution of the control loop. This architecture effectively minimizes timing discrepancies and ensures stable real-time performance throughout the experimental procedure. Figure 2 illustrates the mechanical concept of the rotary double inverted pendulum.

2.1. Structure of the Rotary Double Inverted Pendulum

This paper uses the International System of Units (SI), and all variables and parameters are defined accordingly. Here, θ represents the arm’s rotational displacement from its initial position and u denotes its angular acceleration. CoM1 and CoM2 represent the centers of mass of the first and second pendulums, respectively. The distances L 1 , R 1 , r 1 , r 2 , l 1 , and l 2 are illustrated in the side-view diagram of Figure 3. M 1 and M 2 denote the masses of the first and second pendulums, respectively. α is the rotational displacement of the first pendulum relative to the vertical ground normal, while β represents the relative rotational displacement of the second pendulum with respect to the first pendulum. Furthermore, c 1 and c 2 denote the rotational friction coefficients at the pivots of the first and second pendulums, respectively. Figure 3 illustrates the inertia tensors I of the first and second pendulums. Terms such as I x x 1 and I x x 2 represent the moments of inertia along the x-axis for the first and second pendulums, respectively. Additionally, elements like I x z 1 and I x z 2 also represent components of the inertia tensor. Details of the gear reduction mechanism are shown in Figure 4.
A BLDC motor is used as the drive component, and a double-reduction structure employing a timing belt and timing pulley is implemented to minimize backlash. By applying a 4:1 reduction ratio twice, a total reduction ratio of 16:1 is achieved, which improves the encoder resolution and enables precise angular velocity control. This structure is pivotal in enhancing the control performance of the rotary double inverted pendulum. First, the reduction mechanism minimizes backlash, reducing nonlinear effects. The high resolution of the encoder facilitates accurate dynamic modeling based on moments of inertia, reducing the discrepancy between control inputs and actual system responses and significantly improving model-based control consistency. Moreover, the dual-reduction structure ensures a stable high-torque output, effectively controlling the instability that can arise in nonlinear, multi-stage systems such as the rotary double inverted pendulum.

2.2. Mathematical Modeling of the Rotary Double Inverted Pendulum

The dynamic model of the rotary double inverted pendulum can be derived using the Euler–Lagrange equation as follows:
n 1 n 2 θ ¨ + m 11 m 12 m 21 m 22 α ¨ β ¨ + d 1 d 2 = 0
Each component of Equation (1) is defined as follows:
n 1 = h 1 cos ( α ) + h 2 cos ( α + β ) , n 2 = h 2 cos ( α + β ) , m 11 = h 3 + h 6 + 2 h 4 cos ( β ) , m 12 = h 6 + h 4 cos ( β ) , m 21 = h 6 + h 4 cos ( β ) , m 22 = h 6 , d 1 = h 4 sin β ( 2 α ˙ β ˙ + β ˙ 2 ) h 5 sin α h 7 sin ( α + β ) + c 1 α ˙ θ ˙ 2 { 1 2 h 8 sin ( 2 α ) + h 4 sin ( 2 α + β ) + 1 2 h 9 sin ( 2 α + 2 β ) } , d 2 = h 4 sin β ( α ˙ 2 ) h 7 sin ( α + β ) + c 2 β ˙ θ ˙ 2 { 1 2 h 9 sin ( 2 α + 2 β ) + 1 2 h 4 ( sin ( 2 α + 2 β ) sin β ) } .
The terms h 1 h 9 are defined as follows, where g represents the gravitational acceleration of 9.81 [m/s2].
h 1 = M 1 l 1 r 1 + M 2 L 1 ( R 1 + r 2 ) I x z 1 , h 2 = M 2 l 2 ( R 1 + r 2 ) I x z 2 , h 3 = I x x 1 + M 1 l 1 2 + M 2 L 1 2 , h 4 = M 2 L 1 l 2 , h 5 = g ( M 1 l 1 + M 2 L 1 ) , h 6 = I x x 2 + M 2 l 2 2 , h 7 = M 2 g l 2 , h 8 = M 1 l 1 2 + M 2 L 1 2 + I y y 1 I z z 1 , h 9 = M 2 l 2 2 + I y y 2 I z z 2 .
At this point, Equation (1) can be rearranged as follows:
α ¨ β ¨ = m 11 m 12 m 21 m 22 1 n 1 n 2 θ ¨ + d 1 d 2 .
By solving this equation, we obtain
α ¨ = ( m 22 n 1 + m 12 n 2 ) θ ¨ + ( m 22 d 1 + m 12 d 2 ) Φ , β ¨ = ( m 21 n 1 m 11 n 2 ) θ ¨ + ( m 21 d 1 m 11 d 2 ) Φ , Φ = m 11 m 22 m 12 m 21 .
Here, the state vector is defined as x 1 = θ , x 2 = α , x 3 = β , x 4 = θ ˙ , x 5 = α ˙ , x 6 = β ˙ , and x 7 = 0 t θ ( τ ) d τ , and the angular acceleration θ ¨ is represented as the control input u. The final model equations of the double inverted pendulum can be expressed as the following nonlinear state-space equations. Note that the last term of the state vector, 0 t θ ( τ ) d τ , is added to eliminate the steady-state error of the arm’s position.
x ˙ 1 x ˙ 2 x ˙ 3 x ˙ 4 x ˙ 5 x ˙ 6 x ˙ 7 x ˙ = x 4 x 5 x 6 u ( m 22 n 1 + m 12 n 2 ) u + ( m 22 d 1 + m 12 d 2 ) Φ ( m 21 n 1 m 11 n 2 ) u + ( m 21 d 1 m 11 d 2 ) Φ x 1 f ( x , u )
The above-derived dynamic model is later used as the feedforward trajectory generation model when applying the direct collocation method.

2.3. Estimation of Physical Parameters of the Pendulum

To calculate the optimal state trajectory x * and control input trajectory u * required for transition control, we must accurately estimate the system parameters. Accordingly, parameters such as M 1 , M 2 , I x x 1 , I x x 2 , I y y 1 , I y y 2 , I z z 1 , I z z 2 , I x z 1 , I x z 2 , l 1 , l 2 , c 1 , c 2 , and L 1 , as illustrated in Figure 2 and Figure 3, must be precisely estimated. Among these, M 1 , M 2 , I x x 1 , I x x 2 , l 1 , l 2 , c 1 , and c 2 can be estimated using the parameter estimation method for the linear double inverted pendulum described in [23]. This method involves driving the arm of the rotary inverted pendulum in a specific manner and using the resulting state variable trajectories when the pendulums are oscillated. However, the values of the parameters that generate the measured state variable trajectories are not always unique. To better illustrate this, let us remove the second pendulum from the rotary double inverted pendulum. Then, the system reduces to a single inverted pendulum and its model equation can be expressed as follows:
θ ¨ 1 = ζ 1 sin θ 1 ζ 2 θ ˙ 1 ζ 1 g cos θ 1 u .
Here, ζ 1 and ζ 2 are defined as follows:
ζ 1 = m g l 1 I x x 1 + m 1 l 1 2 , ζ 2 = c 1 I x x 1 + m 1 l 1 2 .
Because ζ 1 and ζ 2 are functions of four parameters ( I x x 1 , l 1 , m 1 , and c 1 ), the combinations of I x x 1 , l 1 , m 1 , and c 1 that produce the same ζ 1 and ζ 2 are not unique. However, if two of these parameters are fixed, a unique solution can be obtained to estimate the remaining parameters. Therefore, among the four parameters, m 1 and l 1 (which can be directly measured) are determined using a scale and a length-measuring device, respectively. The remaining parameters, I x x 1 and c 1 , are estimated using experimental data. The parameters of the second pendulum are estimated using the same approach as the first pendulum. The inertia tensor can be estimated by using the method described in [7] or 3D modeling software to calculate the values. The parameters of the rotary double inverted pendulum obtained through this estimation and measurement are summarized as follows:
The transition control between the pendulum’s equilibrium points is performed using a 2-DOF control technique combining nonlinear feedforward control and feedback control, as proposed in [24]. Figure 5 illustrates the 2-DOF control structure. The precomputed ideal angular acceleration trajectory u * ( t ) is combined with the correction input Δ u ( t ) , which is calculated based on the error Δ x ( t ) = x * ( t ) x ( t ) between the predicted and actual state variables of the inverted pendulum system. This generates the actual angular acceleration input u ( t ) = u * ( t ) + Δ u ( t ) . This control approach ensures smooth transitions between equilibrium points and improves the control system’s robustness by compensating for possible errors between the planned trajectory and the actual motion. In this paper, the feedforward trajectory is generated by considering the dynamic constraints and setting up a nonlinear optimal control problem that numerically minimizes the desired cost function while satisfying various constraints. The direct collocation method is used to numerically solve this problem [25]. This method effectively estimates the control inputs and state variable paths of continuous dynamic systems and is a proven technique for obtaining the optimal trajectory to achieve control objectives.

3. Transition Control

3.1. Design of Transition Control

The four equilibrium points of the rotary double inverted pendulum, determined by the states of the first and second pendulum segments, are illustrated in Figure 6. In this paper, the equilibrium points are defined by assigning the states “Up” and “Down” to 1 and 0, respectively, and representing them as binary numbers. Starting with the first pendulum segment, the equilibrium point where both the first and second segments are facing downward (Down–Down) corresponds to the binary number 00 and is labeled as EP0, while the equilibrium point corresponding to the Up–Down state is represented as 10 and labeled as EP2. This naming convention offers the advantage of assigning equilibrium points systematically according to the same binary rule, even when the number of pendulum segments increases. It also facilitates intuitive understanding of the pendulum’s equilibrium states. Henceforth, in this paper, the equilibrium points of the pendulum are denoted as EP0 (Down–Down), EP1 (Down–Up), EP2 (Up–Down), and EP3 (Up–Up).
Transition control is a complex problem that must satisfy both the stability of each equilibrium point and the transition process between them. To address this, the transition control follows three key steps. Each step is designed to ensure stability during the transition process, perform the transition operation, and maintain final stability.
  • The linear control is performed to ensure the system’s stability at the current equilibrium point.
  • The transition control is carried out to move from the current equilibrium point to the next.
  • The linear control is performed to maintain stability at the next equilibrium point.
This structure is similar in principle to the swing-up problem, which involves moving the pendulum from the initial state (EP0) to the upright state (EP3). Therefore, the transition process must satisfy both stability and transition requirements at each step. In particular, the double inverted pendulum system has 12 distinct transition trajectories, making it essential to design and conduct experiments that satisfy the characteristics and conditions of each trajectory. The 12 transition trajectory paths proposed in this paper are constructed as shown in Figure 7.

3.2. Direct Collocation

The direct collocation method is an iterative numerical solution technique implemented using a nonlinear optimization solver. In this method, the shape of the initial trajectory provided by the designer can influence both the numerical solutions’ computation time and the resulting trajectory shape. By considering these characteristics, the designer can select an appropriate initial trajectory and apply direct collocation to derive a trajectory suitable for a specific transition control problem. In this paper, the initial trajectory is designed using the simplest form of a straight-line trajectory that connects the start and end boundary conditions. Additionally, a cost function is designed to satisfy all the specified constraints and boundary conditions, thereby formulating a general nonlinear optimal control problem. Equation (5) represents the optimal control problem formulated to compute the optimal trajectory.
u ( t ) Minimize J ( x ( t ) , u ( t ) ) subject to input / output constraint , dynamic equations , boundary conditions .
In the above equation, J ( x ( t ) , u ( t ) ) represents the cost function and is defined as an optimal control problem that satisfies the constraints established using the actual system model parameters listed in Table 1. The cost function can be used to minimize time or optimize the cost over a given time period. The constraints and limitations applied to the cost function include the dynamic equations of the rotary double inverted pendulum (2) and, as shown in (6), restrictions on the maximum arm rotation during the control process, as well as limitations on the arm’s maximum angular velocity and input angular acceleration within the actuator’s linear operating range. These conditions are crucial in ensuring the operational feasibility and stability of the control system.
x 1 * θ l i m i t , x 4 * θ ˙ l i m i t , u * u l i m i t .
The specified limits are all defined as positive values, with θ l i m i t > 0 , θ ˙ l i m i t > 0 , and u l i m i t > 0 representing the maximum allowable values for the arm’s output displacement, output angular velocity, and input angular acceleration, respectively. These limits reflect the actual operational constraints of the rotary double inverted pendulum used in the experiments, and the corresponding constraints are explicitly detailed in Table 2.
To satisfy various constraints in the 12 distinct transition control processes, additional constraints can also be applied to the pendulum’s rotational angles α and β , as well as their angular velocities α ˙ and β ˙ . Furthermore, at the start time ( t = 0 ) and end time ( t = T ) of the transition control, the boundary conditions corresponding to the equilibrium points for a specific transition must be satisfied. For instance, the starting and ending points differ depending on the transition number, and this situation is shown in Table 3.
The transition trajectories obtained using the direct collocation method are shown in Figure 8 and Figure 9. Figure 8 illustrates the representative swing-up trajectory transitioning from EP0 to EP3, corresponding to transition 11. Figure 9 represents the control input trajectories used in all transitions. In the control input trajectories for transitions 4–7, the trajectories satisfy the prescribed constraints and boundary conditions during the transition process.

4. Experimental Results

4.1. Experimental Setup

The design of the feedback controller for trajectory tracking follows a similar approach to that of Graichen [24], as mentioned in the introduction, but with the distinction that this study applies the optimal LQ control technique for time-varying systems across the entire process. In Graichen’s research, the control system was shown to lose controllability due to high compensation values in regions where the gain coefficients increased sharply, leading to the decision to discontinue feedback in specific intervals. However, in this study, a consistent control strategy is maintained by utilizing the calculated time-varying LQ control gains throughout all intervals during transition control. This time-varying LQ controller utilizes a linearized dynamic system based on the swing-up trajectory of the double inverted pendulum system. The state equation, which varies over time and is used in this process, is modeled as a time-varying form of A and B values, as shown in Equation (7).
A ( t ) = f x x * ( t ) , u * ( t ) , B ( t ) = f u x * ( t ) , u * ( t ) .
Here, x * ( t ) and u * ( t ) represent the feedforward trajectories for states and inputs obtained using the direct collocation method. The difference between the computed feedforward trajectory and the actual state variable values is calculated as Δ x ( t ) = x * ( t ) x ( t ) , and the correction input Δ u ( t ) , generated to compensate for this error, is defined by Equation (8):
Δ u ( t ) = K ( t ) Δ x ( t ) .
At this point, the time-varying state equation can be expressed as Equation (9):
Δ x ˙ ( t ) = A ( t ) Δ x ( t ) + B ( t ) Δ u ( t ) .
The cost function is defined as follows:
J = Δ x T ( T ) H T r Δ x ( T ) + 0 T Δ x ( t ) T Q T r Δ x ( t ) + Δ u ( t ) T R T r Δ u ( t ) d t .
Here, the subscript T r indicates the design variables for the transition process. In Equation (10), the variables with this subscript satisfy H T r 0 , Q T r 0 , and R T r > 0 . The matrix H T r represents the weight on the terminal state, Q T r represents the weight on the system state, and R T r represents the weight on the control input. These weights are determined through experimental processes and are set to the following values:
Q T r = diag ( 1 , 300 , 500 , 1 , 1 , 1 , 1 ) , R T r = 1 .
In addition, the time-varying gain K ( t ) must be calculated by solving the differential Riccati equation:
P ˙ ( t ) = A ( t ) T P ( t ) P ( t ) A ( t ) + P ( t ) B ( t ) R T r 1 B T ( t ) P ( t ) Q T r , P ( T ) = H T r .
Finally, the time-varying gain K ( t ) can be computed using Equation (13). For example, the LQ control gain K ( t ) applied in Figure 8 can be observed in Figure 10.
K ( t ) = R T r 1 B T ( t ) P ( t ) .

4.2. Experimental Data and Analysis

To conduct the experiments, 12 transition control types are implemented by combining the swing-up trajectory obtained using the direct collocation method presented in Section 3 with the feedback controller designed using LQ control. The transition sequences are structured according to Figure 7, and each transition sequence between equilibrium points is designed to be traversed only once. The duration of one cycle, which includes a state transition and linear control at an equilibrium point, is set to 5 s. The time required for state transitions varies from 1.8 s to 3 s, as shown in Table 4. During the time following each transition, linear control at the corresponding equilibrium point is performed to stabilize the system until the next transition control begins.
The first transition begins at the 5 s mark, and Figure 11 illustrates all transition control results sequentially. Solid lines represent the simulation model trajectories, and dotted lines show the measured closed-loop trajectory with compensation applied. Due to the compensation effect of closed-loop control, the arm’s rotation angle θ and angular velocity θ ˙ exhibit significant differences immediately after the transition; however, through linear control at the equilibrium point, the θ value is gradually adjusted to approach zero. Additionally, the graphs for α and β , the most critical variables in transition control, demonstrate very precise tracking of the predicted trajectories. To further illustrate the experimental validation of the proposed method, a video of the experiments has been uploaded to YouTube. Figure 12 presents a screenshot of the video, and the full video can be accessed at the following link: https://youtu.be/J8vRJtQ-t3I, accessed on 15 January 2025. (video title: “12 transition controls of a rotary double inverted pendulum (with double reduction timing pulleys)”; channel name: Embedded Control Lab). This video visually demonstrates the transition control process, serving as a supplementary resource to the experimental results discussed in this section.

5. Conclusions

This study establishes an experimental environment using a lab-built rotary double inverted pendulum system and investigates 12 transition control problems, including swing-up control. For segmental transition control, the direct collocation method was introduced to generate feedforward trajectories, and a two-degree-of-freedom controller incorporating the designed time-varying LQ control implemented the 12 transition control paths. Finally, the proposed method’s efficiency and feasibility were demonstrated by sequentially controlling the 12 paths, which enables transitions among the four equilibrium points of the double inverted pendulum, over 60 s, with each path executed within 5 s.
The main contributions of this study are as follows: Firstly, it extends the conventional swing-up problem by defining and experimentally implementing transition control problems between equilibrium points. Secondly, it effectively addresses complex transition control problems by utilizing a two-degree-of-freedom control structure that integrates feedforward trajectory generation via the direct collocation method and time-varying LQ control. Lastly, the proposed method’s practicality is validated through experimental tests using a lab-built rotary double inverted pendulum system.
Building upon these contributions, future research could incorporate AI (artificial intelligence)-based techniques, such as reinforcement learning, to develop adaptive and robust control systems. By advancing the proposed approach and exploring its applicability to multidimensional and multi-actuator systems, this strategy could evolve into a universal control method for complex dynamic systems, further expanding its potential impact.

Author Contributions

Conceptualization, D.J. and Y.S.L.; methodology, D.J.; software, T.L.; hardware, D.J.; validation, D.J.; formal analysis, D.J.; investigation, D.J.; writing—original draft preparation, D.J.; writing—review and editing, Y.S.L. and D.J.; visualization, D.J. and T.L.; supervision, Y.S.L.; project administration, D.J.; funding acquisition, Y.S.L. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by the National Research Foundation of Korea (NRF) grant funded by the Korea government (MSIT) (RS-2024-00347193).

Data Availability Statement

Data are contained within the article.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Äström, K.J.; Furuta, K. Swinging up a pendulum by energy control. Automatica 2000, 36, 287–295. [Google Scholar] [CrossRef]
  2. Huang, S.; Huang, C. Control of an inverted pendulum using grey prediction model. IEEE Trans. Ind. Appl. 2000, 36, 452–458. [Google Scholar] [CrossRef]
  3. Otani, Y.; Kurokami, T.; Inoue, A.; Hirashima, Y. A Swingup Control of an Inverted Pendulum with Cart Position Control. In Proceedings of the IFAC Conference on New Technologies for Computer Control (NTCC 2001), Hong Kong, China, 19–22 November 2001; pp. 395–400. [Google Scholar]
  4. Muskinja, N.; Tovornik, B. Swinging up and stabilization of a real inverted pendulum. IEEE Trans. Ind. Electron. 2006, 53, 631–639. [Google Scholar] [CrossRef]
  5. Äström, K.J.; Aracil, J.; Gordillo, F. A family of smooth controllers for swinging up a pendulum. Automatica 2008, 44, 1841–1848. [Google Scholar] [CrossRef]
  6. Erwin, S.; Agung, S.W.; Elvandry, G.R. Fuzzy Swing Up Control and Optimal State Feedback Stabilization for Self-Erecting Inverted Pendulum. IEEE Access 2020, 8, 6496–6504. [Google Scholar]
  7. Oh, Y.; Lee, Y.S. Robust Swing-up Control of a Rotary Inverted Pendulum Subject to Input/Output Constraints. J. Inst. Control. Robot. Syst. 2018, 24, 423–430. [Google Scholar] [CrossRef]
  8. Ratiroch-Anant, P.; Anabuki, M.; Hirata, H. Self-tuning control for rotational inverted pendulum by: Eigenvalue approach. In Proceedings of the IEEE Region 10 Conference TENCON 2004, Chiang Mai, Thailand, 21–24 November 2004; pp. 542–545. [Google Scholar]
  9. Rahairi, M.R.; Selamat, H.; Zamzuri, H.; Ahmad, F. PID controller optimization for a rotational inverted pendulum using genetic algorithm. In Proceedings of the 2011 Fourth International Conference on Modeling, Simulation and Applied Optimization, Kuala Lumpur, Malaysia, 19–21 April 2011; pp. 1–6. [Google Scholar]
  10. Thein, M.-W.L.; Misawa, E.A. Comparison of the sliding observer to several state estimators using a rotational inverted pendulum. In Proceedings of the 1995 34th IEEE Conference on Decision and Control, New Orleans, LA, USA, 13–15 December 1995; pp. 3385–3390. [Google Scholar]
  11. Brown, D.; Strube, M. Design of a Neural Controller Using Reinforcement Learning to Control a Rotational Inverted Pendulum. In Proceedings of the 2020 21st International Conference on Research and Education in Mechatronics (REM), Cracow, Poland, 9–11 December 2020; pp. 1–5. [Google Scholar]
  12. Hernandez, R.; Garcia-Hernandez, R.; Jurado, F. Modeling, Simulation, and Control of a Rotary Inverted Pendulum: A Reinforcement Learning-Based Control Approach. Modelling 2024, 5, 1824–1852. [Google Scholar] [CrossRef]
  13. Cherrat, N.; Hamid, B.; Hichem, A.; Ratiba, F. Experimental Study of Swing-Up PD and Sliding Mode Control for Rotary Inverted Pendulum. In Proceedings of the 2024 3rd International Conference on Advanced Electrical Engineering (ICAEE), Sidi-Bel-Abbes, Algeria, 5–7 November 2024. [Google Scholar]
  14. Jensen, J.N.; Ishizaki, T. Furuta Pendulum Design Update for Accessible Control Demonstrations. IFAC-PapersOnLine 2023, 56, 7573–7578. [Google Scholar] [CrossRef]
  15. Liang, F.; Xin, X.; Li, Y. Swing-up and Balance Control of Rotary Double Inverted Pendulum. In Proceedings of the 2023 3rd International Conference on Robotics and Control Engineering, Nanjing, China, 12–14 May 2023; pp. 65–70. [Google Scholar]
  16. Tran, N.; Nguyen, V.; Le, C.; Lai, A.; Nguyen, T.; Huynh, M.; Phan, V.; Tong, G.; Nguyen, L.; Ngo, T. LQR Control for Experimental Double Rotary Inverted Pendulum. J. Fuzzy Syst. Control. 2024, 2, 104–108. [Google Scholar]
  17. Singh, S.; Swarup, A. Control of Rotary Double Inverted Pendulum using Sliding Mode Controller. In Proceedings of the 2021 International Conference on Intelligent Technologies (CONIT), Hubli, India, 27 June 2021; pp. 1–6. [Google Scholar]
  18. Zied, B.H.; Mohammad, J.F.; Zafer, B. Development of a Fuzzy-LQR and Fuzzy-LQG stability control for a double link rotary inverted pendulum. J. Frankl. Inst. 2020, 357, 10529–10556. [Google Scholar]
  19. Ibrahim, M.M.; Ubaid, M.A.; Rachid, M.; Maamar, B. Stabilization of a double inverted rotary pendulum through fractional order integral control scheme. Int. J. Adv. Robot. Syst. 2019, 16, 4. [Google Scholar]
  20. Sondarangallage, D.A.; Manukid, P. Control of rotary double inverted pendulum system using mixed sensitivity H controller. Int. J. Adv. Robot. Syst. 2019, 16, 2. [Google Scholar]
  21. Quanser Official Home Page. Available online: www.quanser.com (accessed on 8 January 2025).
  22. Sondarangallage, D.A.; Manukid, P. Control of rotary double inverted pendulum system using LQR sliding surface based sliding mode controller. J. Control Decis. 2022, 9, 89–101. [Google Scholar]
  23. Ju, D.; Choi, C.; Jeong, J.; Lee, Y.S. Design and parameter estimation of a double inverted pendulum for model-based swing-up control. J. Inst. Control. Robot. Syst. 2022, 28, 793–803. [Google Scholar] [CrossRef]
  24. Graichen, K.; Treuer, M.; Zeitz, M. Swing-up of the double pendulum on a cart by feedforward and feedback control with experimental validation. Automatica 2007, 43, 63–71. [Google Scholar] [CrossRef]
  25. Kelly, M. An introduction to trajectory optimization: How to do your own direct collcation. SIAM Rev. 2017, 59, 849–904. [Google Scholar] [CrossRef]
  26. Ju, D.; Lee, T.; Lee, Y.S. Implementation of 12 Transition Controls for Rotary Double Inverted Pendulum Using Direct Collocation. In Proceedings of the ICINCO 2024, Portu, Portugal, 18–20 November 2024. [Google Scholar]
  27. Lee, Y.S.; Jo, B.; Han, S. A light-weight rapid control prototyping system based on open source hardware. IEEE Access 2017, 5, 11118–11130. [Google Scholar] [CrossRef]
Figure 1. A rotary double inverted pendulum constructed in the laboratory.
Figure 1. A rotary double inverted pendulum constructed in the laboratory.
Mathematics 13 00640 g001
Figure 2. Conceptual diagram of a rotary double inverted pendulum.
Figure 2. Conceptual diagram of a rotary double inverted pendulum.
Mathematics 13 00640 g002
Figure 3. Inertia tensors of the first and second pendulums.
Figure 3. Inertia tensors of the first and second pendulums.
Mathematics 13 00640 g003
Figure 4. Double reduction structure of the rotary double inverted pendulum.
Figure 4. Double reduction structure of the rotary double inverted pendulum.
Mathematics 13 00640 g004
Figure 5. The 2-DOF control structure for the double inverted pendulum.
Figure 5. The 2-DOF control structure for the double inverted pendulum.
Mathematics 13 00640 g005
Figure 6. Four equilibrium points of a rotary double inverted pendulum.
Figure 6. Four equilibrium points of a rotary double inverted pendulum.
Mathematics 13 00640 g006
Figure 7. Twelve-step transition diagram of a double inverted pendulum.
Figure 7. Twelve-step transition diagram of a double inverted pendulum.
Mathematics 13 00640 g007
Figure 8. Feedforward transition trajectory from EP0 to EP3.
Figure 8. Feedforward transition trajectory from EP0 to EP3.
Mathematics 13 00640 g008
Figure 9. Feedforward transition trajectories for control input.
Figure 9. Feedforward transition trajectories for control input.
Mathematics 13 00640 g009
Figure 10. Time-varying LQ gain of feedforward transition trajectory from EP0 to EP3.
Figure 10. Time-varying LQ gain of feedforward transition trajectory from EP0 to EP3.
Mathematics 13 00640 g010
Figure 11. Twelve-step transition trajectories of a rotary double inverted pendulum: model trajectory (solid line) and actual trajectory (dotted line).
Figure 11. Twelve-step transition trajectories of a rotary double inverted pendulum: model trajectory (solid line) and actual trajectory (dotted line).
Mathematics 13 00640 g011
Figure 12. A YouTube video capture of the 12 transition controls of a rotary double inverted pendulum.
Figure 12. A YouTube video capture of the 12 transition controls of a rotary double inverted pendulum.
Mathematics 13 00640 g012
Table 1. Summary of the parameters for the rotary double inverted pendulum.
Table 1. Summary of the parameters for the rotary double inverted pendulum.
ParameterValue
M 1 0.187 kg
M 2 0.132 kg
I x x 1 1.0415 × 10 3 kgm2
I x x 2 8.8210 × 10 4 kgm2
I y y 1 4.3569 × 10 3 kgm2
I y y 2 4.9793 × 10 3 kgm2
I z z 1 3.3179 × 10 3 kgm2
I z z 2 4.8178 × 10 3 kgm2
I x z 1 3.7770 × 10 4 kgm2
I x z 2 1.9823 × 10 4 kgm2
l 1 0.072 m
l 2 0.133 m
c 1 2.4100 × 10 6
c 2 1.0900 × 10 6
L 1 0.1645 m
R 1 0.1625 m
r 1 0.1597 m
r 2 0.0209 m
Table 2. Constraints for the experiment.
Table 2. Constraints for the experiment.
Transition Number θ limit [ rad ] θ ˙ limit [ rad / s ] u limit [ rad / s 2 ]
11.77.050
21.57.050
31.57.060
41.51270
51.57.050
61.57.050
71.57.070
81.57.050
91.57.050
101.57.050
111.57.050
121.58.050
Table 3. Boundary condition for 12 trajectories.
Table 3. Boundary condition for 12 trajectories.
Transition Number x * ( 0 ) x * ( T )
1 0 , π , 0 , 0 , 0 , 0 , 0 0 , π , π , 0 , 0 , 0 , 0
2 0 , π , π , 0 , 0 , 0 , 0 0 , 0 , π , 0 , 0 , 0 , 0
3 0 , 0 , π , 0 , 0 , 0 , 0 0 , 2 π , 0 , 0 , 0 , 0 , 0
4 0 , 0 , 0 , 0 , 0 , 0 , 0 0 , 0 , π , 0 , 0 , 0 , 0
5 0 , 0 , π , 0 , 0 , 0 , 0 0 , π , π , 0 , 0 , 0 , 0
6 0 , π , π , 0 , 0 , 0 , 0 0 , 0 , 0 , 0 , 0 , 0 , 0
7 0 , 0 , 0 , 0 , 0 , 0 , 0 0 , π , π , 0 , 0 , 0 , 0
8 0 , π , π , 0 , 0 , 0 , 0 0 , π , 0 , 0 , 0 , 0 , 0
9 0 , π , 0 , 0 , 0 , 0 , 0 0 , 0 , π , 0 , 0 , 0 , 0
10 0 , 0 , π , 0 , 0 , 0 , 0 0 , π , 0 , 0 , 0 , 0 , 0
11 0 , π , 0 , 0 , 0 , 0 , 0 0 , 0 , 0 , 0 , 0 , 0 , 0
12 0 , 0 , 0 , 0 , 0 , 0 , 0 0 , π , 0 , 0 , 0 , 0 , 0
Table 4. Transition timing parameters used in the experiment.
Table 4. Transition timing parameters used in the experiment.
Starting EPDestination EPT [s]
EP0EP12.000
EP23.000
EP32.500
EP1EP01.800
EP22.500
EP32.500
EP2EP02.500
EP12.000
EP32.921
EP3EP02.500
EP12.000
EP22.000
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Ju, D.; Lee, T.; Lee, Y.S. Transition Control of a Rotary Double Inverted Pendulum Using Direct Collocation. Mathematics 2025, 13, 640. https://doi.org/10.3390/math13040640

AMA Style

Ju D, Lee T, Lee YS. Transition Control of a Rotary Double Inverted Pendulum Using Direct Collocation. Mathematics. 2025; 13(4):640. https://doi.org/10.3390/math13040640

Chicago/Turabian Style

Ju, Doyoon, Taegun Lee, and Young Sam Lee. 2025. "Transition Control of a Rotary Double Inverted Pendulum Using Direct Collocation" Mathematics 13, no. 4: 640. https://doi.org/10.3390/math13040640

APA Style

Ju, D., Lee, T., & Lee, Y. S. (2025). Transition Control of a Rotary Double Inverted Pendulum Using Direct Collocation. Mathematics, 13(4), 640. https://doi.org/10.3390/math13040640

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop