BALANCING AND TRAJECTORY-TRACKING BY LQR CONTROL FOR LINEAR TRIPLE-LINKED PENDUBOT

: Pendubot is a popular single input-multi output (SIMO) in laboratories to test control algorithms. In this paper, we focus on a developed model of pendubot – linear triple-linked pendubot (LTLP) and propose LQR to control this model. Through simulation, link 1 is kept balanced, kept following trajectories when link 2, 3 is kept upward under LQR control. Thence, besides balancing well this model at TOP position, our algorithm also makes system tracking sine and pulse trajectories well


Introduction
Pendubot is a standard and important model in study of algorithms.This is the basis for building selfstabilizing systems such as rockets, suspensions of cars, balance cars.In [1], both PID and LQR controllers are used well for pendubot at static work points.In [2], fuzzy algorithm is used to balance it well.However, this model becomes basic and it cannot satisfy the requirement of research in high-order structure.Therefore, LTLP is created for testing control algorithms with higher challenges.With one link added when still maintaining only one motor.LQR method is presented to work well for this model in [3].
LQR method gives simple control structure and control parameters can be calculated from mathematical model of system.Thence, LQR is a suitable control method for this complicated model.Only TOP position is examined and trajectories tracking control is not concerned in that study.
In this paper, we analyse dynamic equations of LTLP from structure of a multi-linked robot arm in [4].This approach is different from study [3] which follows the structure of n-linked pendubot in [5].And, we propose a structure of LQR control which helps this system to follow trajectories sine and pulse.This is a development from [3].

Mathematical Model
From Fig. 1, first arm is linked to the motor in position O. Next, we have some changes to convert the model into SIMO system: link 2 connects to Link 1 through the uncontrolled point A. Similarly in Link 3 linked to Link 2.
In [4], author was shown for 3-axis robot kinematics similar to the model LTLP, we inherit the mathematical equations of the Motion of a Planar 3-DOF Manipulator.By only controlling Link 1 of the robot and not affecting Link 2 and 3, the robot 3-DOF Manipulator will become LTLP.The nonlinear model of LTLP is described in the form: where: ; We define variables of system as: Linear equations have the form: where: .

Control Method
Equilibrium point is chosen as This equilibrium point is TOP position of LTLP in which all links are kept upward.At that position, moment on link 1 is zero to maintain system stable.
If system is round working point in (4), LQR signal to control system is: Basically, weighing matrices Q and R can be selected as eye matrix.However, genetic algorithm (GA) is used to find and optimize these matrixes.
Matrix K is calculated as angle of link 3 0 (rad)  ̇3 angle speed of link 3 0 (rad/s) Detailed description: the biggest block "Linear Triple-linked Pendubot" contains parameters from Tab. 1. Block "sample trajectory" at the top is used to investigate stability in fluctuating working regions.All signals about angle and angle speed will be feedback into block "Linear Triple-linked Pendubot" to accurately and continuously describe the state of the system throughout the survey period.This system is complicated and fast.Therefore, to ensure the best control of the system, we choose a slightly smaller sample time at 1ms.
Before data is collected, it is divided by 6 to transfer the collected data into the workspace of the GA.This coefficient is based on the experience of experts to choose the division coefficient.From Fig. 3, output signals are put into a 1x6 matrix and time with a 6x1 K matrix.We get τ 1 feedback into the "Kinematic of model" block.The angle data is transferred to the "GA" block to collect data for GA to perform its searching loop to find the parameters in (6).Substituting them into (7), we will receive suitable K matrix.

Verification with static working position 3 arm pointing up
With a sample time of 1ms and a simulation duration of 100 seconds, the results we obtained are very promising.From Fig. 4 we can see that the LQR controller has successfully stabilized this system.Although the stabilization time is quite long, up to 20 seconds.But this is understandable because each small change in τ 1 greatly affects the entire system.The established error after the simulation time returns to 0 rad, which shows that the system is completely stable.The parameters obtained from Fig. 5 and Fig. 6 provide valuable insights.The LTLP system will eventually reach stability.A critical condition is that the deflection angle and angular velocity of link 3 must stabilize to 0 as quickly as possible.Although oscillations occur in the deflection angles of link 1 and link 2, they overshoot rapidly and exhibit strong fluctuations until link 3 stabilizes.Subsequently, link 1 and link 2 gradually transition to a stable position.Throughout this process, the deflection angle and angular velocity of link 3 remain consistently at 0.
Based on the above results, it is evident that this system has the potential to tackle more challenging simulations, such as motion trajectory tracking.

Verification Sine Wave Trajectory Tracking
Based on Fig. 3, we have adjusted the "sample trajectory" block to generate a sine wave with a frequency of 0.5 rad/s and an amplitude of 0.3 rad.This adjustment allows for tracking position correction of link 1 and link 2, while ensuring that link 3 remains vertical, as per the data collected from static working position verification.Fig. 7. Angle  1 (radian) compared to the sine wave Unlike a static working area, sine wave oscillates continuously.This system has the characteristic of slow response, according to parameters collected from static working position verification.Therefore, the sine wave we choose has a fairly low frequency with an oscillation of amplitude that is not too large.Changing the characteristics of the working area greatly affects the control ability of the LQR controller.Therefore, GA needs to be used for each solid point with different oscillation characteristics.For sine wave, optimal set of parameters we find is as follows: From Fig. 7, link 1 of the system tracks the sine trajectory effectively, maintaining system stability despite a certain delay.The graph in Fig. 8 and Fig. 10, we can see that the values are almost symmetrical.The sum of the values of link 1 and link 2 angle is approximately 0. Throughout the process of link 1 attempting to follow a sinusoidal trajectory, link 2 remains consistently close to vertical alignment.From the graph in Fig. 9 we can see that the bar fluctuates very slightly and almost always remains vertical.These small oscillations are needed to counteract inertia while the whole system moves.

Verification Orbit Tracking Ability with Pulse
From Fig. 3, we adjust the "sample trajectory" block to generate a pulse wave with a period of 30s and an amplitude of 0.2 radian.The pulse signal needs to be tweaked a bit to make the sample signal more differentiable.Correct the orbital position of link 1 and link 2 while link 3 remains vertical based on data collected from static working position verification.For signal pulses, burden on LQR controller increases significantly.The nature of state reversals being too fast, almost instantaneous, with large amplitudes, is the biggest challenge.Signal pulses are differentiable when they have long periods with not too large amplitudes and not too sudden state reversals.Therefore, GA algorithm needs to be used to find a more suitable set of parameters.Although distance between the current angle and next state angle are quite far apart.But still responsive and stable.However, unlike the static working point, sample signal pulse responds faster, so the control quality is not as good as the static point.

Conclusions
Through simulation, we have demonstrated the outstanding nonlinear control capabilities of the LQR controller.It not only achieves and rapidly maintains a stable state but also effectively tracks motion trajectories such as pulses and sine waves.These results serve as the initial groundwork for developing other nonlinear controllers for more intricate systems.

Acknowledgement
This paper belongs to project SV2024-156 which is funded by Ho Chi Minh city University of Technology and Education (HCMUTE).We, authors, want to give thanks for that support.

Fig. 1 .Tab. 1 .
Fig. 1.Analyze physical quantities for LTLP model based on document [4] Tab. 1. Parameters of system from [4] Parameters Description Values m 1 mass of link 1 0.15 (kg) m 2 mass of link 2 0.14 (kg) m 3 mass of link 3 0.055 (kg) l 1 length of link 1 0.2 (m) l 2 length of link 2 0.2 (m) l 3 length of link 3 0.22 (m) g gravity of Earth 9.81(m s 2 ⁄ ) Note: in this model, point C is the center of gravity of each armThe nonlinear model of LTLP is described in the form: