Enhanced the Control Strategy of a Triple Link Robotic System (Robogymnast)

This research aims to optimise performance in a Fuzzy Linear Quadratic Regulator controller by implementing 2 types of algorithm to stabilise the triple-link ‘Robogymnast’ robotic system. The Robogymnast recreates the movements of a human gymnast, with the hand/arm element of the system securely attached to a high bar with ball0bearing mountings, which can rotate freely. This article explores the complex factors involved in swing-up control in the underactuated Robogymnast and presents a linearisation of the mathematical modelling for the system, considering methods which apply Lagrangian equations in defining state space in such systems. Both the Teaching-Learning-Based Optimization (TLBO) and Particle Swarm Optimization (PSO) algorithm were used for tuning the hybrid Fuzzy Linear Quadratic Regulator controller for later application with the robot and assessment of response stability. In addition, MATLAB Simulink was used to simulate performance and show the effect of altering parameters including time for rising, settling and overshoot. This work aims primarily to explore how a Linear Quadratic Regulator/Fuzzy Logic controller can be applied with acrobatic robots.


I. INTRODUCTION
Inverted Pendulum Systems (IPSs) are frequently applied when studying Non-Linear Control Theory (NLCT) and in education on this topic, due to IPSs' ability to represent unstable and under-actuated mechanisms [1], [2]. Technological progression in control systems underpins the advancements made across a range of areas in technology and the sciences. Assessments of performance in a control system involve controller design and then application with systems, to monitor system operation. Within this, this research considers upswing in the triple-link, nonlinear Robogymnast [3].
This system presents an opportunity to apply and evaluate different control systems, as it offers underactuation and high levels of mechanical complexity [4]. Controlling an underactuated system is highly challenging, due to the fact that most systems of this type are not full-state feedback linearisable about a given point of equilibrium, potentially not offering small-time local controllability (STLC) [5]. As a The associate editor coordinating the review of this manuscript and approving it for publication was Aysegul Ucar . result, underactuated systems have garnered significant interest among researchers in the fields of robotics and control engineering [6]. Inverted pendulums (referring to a component which swings in an unrestricted manner under gravitational forces and hangs from a single locus) have become popular models to demonstrate underactuation characteristics and have frequent applications for control of motion. They can show chaos-based or hybrid behaviours, and are therefore useful in studying underactuation [7], [8].
Robotics studies have grappled with the issue of balance in systems with triple-inverted pendulums, as this structure is comparable with structural elements and balance approaches in humans. One case study for such research is the multi-link robotics system: and unstable underactuated mechanism mimicking motion within acrobatics in humans, and this has allowed for various theory-and practice-based research on non-linear controllers. This system uses and inverted pendulum and has utility for researching different systems of control to be used with underactuation [6], [9].
The problem of balance in the multi-link systems was addressed by developing an advanced-design controller  based on hybridised approaches of fuzzy and established controls to achieve swing, catch and balance in inversion [10]. The types of controllers applied engaged proportional integral-derivative methods, state variable feedback and linear quadratic regulation.

II. RELATED WORK
Recently, a number of studies have focused optimising robotic systems whose functions involve performing gymnastic and dynamic movements, including the Robogymnast, leading to significant progress in this area. Earlier studies have provided extensive information on independent swing-up motion for triple-link robots, and especially for robots using a single unactuated and 2 actuated joints,   including for example those reported in [11], [12], [13], [14], and [15] The main focus of such work has been on designing and implementing various types of controllers to operate the Robogymnast, which is a triple-link system with a pendulum action. In addition, these studies have investigated the problem of stabilising multiple-link robots using swinging mechanisms, again through different controller designs, : e.g., LQR [1] PID [16] Fuzzy-PD [17] and FLQR [18] and LQR-PID [19].
Moreover, prior work has investigated problems of motion in people who have restricted or impaired limb motion due to injury or disability [20]. The effective control of the dynamic characteristics of these types of system would provide a basis for developing greater energy efficiency in machine design, using motion comparable to naturally evolved systems of motion [21].
The current work contributes distinctively to this endeavour through its implementation and comparison of two different approaches to optimisation for stabilisation of a 3-link robot mechanism with a hybrid FLQR controller. This research aims to assess motion performance for each link in the system, applying two algorithms: Teaching-Learning-Based Optimisation (TLBO) and Particle Swarm Optimisation (PSO). It will also develop findings of earlier work through performance assessment for the Robogymnast. This paper takes the following structure: the third section comprehensively characterises the Robogymnast system, analysing the mathematical modelling which relates to it. The subsequent section the considers controller design in relation to the challenge of upswing. Section Five discusses different algorithms to optimise the responsive performance of the system, including PSO and TLBO. Analysis of the findings from simulation and what follows from these is presented in the following section. The final section summarises the paper's main findings and considers their broader implications.

III. SYSTEM DESCRIPTION AND MATHEMATICAL MODEL A. SYSTEM DESCRIPTION
This work uses a triple link robot, the Robogymnast, developed from observation of gymnasts' motion as they swing up in free rotation on the high bar. The Robotgymnast's main structural features are provided in the diagram in Fig. 1. The first link is representative of human arms, with wrist and elbow joints not included; link 2 combines head, neck, and trunk into one unit, while link three represents the legs without knee/ankle joints. The first joint is unactuated, with passive operation, and corresponds to human hands; the second joint reflects the shoulder joints and the third the hip joints. The latter two are active in their operation [20]. In Fig. 1, the robotic system is shown by means of a block diagram, in which it moves based on inputs from a pair of stepper motors, achieving smoothness of movement through control provided by a stepper driver. Programming of this control applies an STM32 microcontroller, using C++ programming language for the computer, controller and robot to communicate [14]. Sensors are attached to the three links, with link 1 attached to a rotary encoder, and links 2 and 3 each linking to a potentiometer, which allows absolute angles to be measured for the different positions [1].

B. MATHEMATICAL MODEL
Modelling of the Robogymnast when positioned vertically used linear, continuous-time state-space approaches with instruments provided in MATLAB, as well as other researcher-generated M-files. The terminology and values of the variables used are given in Table 1. Four matrices (A, B, C, and D) are applied to illustrate the model of state-space. Antiswing control aims include stabilising links in the pendulum where they are in vertical downward alignment, with minimal vibration. The system's point of stable equilibrium in relation to link condition can be shown through θ1 = θ2 = θ3 = 0. State space for the system's equations is shown in mathematical terms as:ẋ The system is described by two equations. The first equation represents the state-space model of the system, whereẋ is the state vector derivative, x is the state vector, u is the input vector, A is the system matrix, and B is the input matrix. The second equation represents the output equation of the system, where y is the output vector, and C is the output matrix. Numerical modelling for the robotic system was conducted in MATLAB/toolbox for determining A, B and C, while: where: Discretising equations 1 and 2 were applied sequentially to represent the robot in discrete time, as implemented using the MATLAB command window. This allowed the matrices for mathematical modelling to be integrated into the simulation to achieve findings, as shown through the later commands implemented in MATLAB.

IV. CONTROL DESIGN
The hybrid FLQR controller developed here is a combination of an optimised LQR control and a rules-based fuzzy control system [16]. FLC systems centrally utilise Fuzzy Control Rules (FCRs) linked together with fuzzy implications as well as the compositional rule of inference key component of an FLC system is a set of Fuzzy Control Rules (FCRs) that are connected through a fuzzy implication and the compositional rule of inference [17]. Here, the design process to develop controllers based on fuzzy logic is discussed, and this is frequently applied supplementally to bring improvements in conventional controllers to respond to dynamic conditions. Fuzzy logic has numerous applications for systems including those used in goods manufacture and are applied to enhance the intelligence of technologies [18]. When fuzzy models are developed via the Mamdani approach, it is possible to adjust closed-loop controller feedback gain. For the current study, transformations of input variables error (E) and error change (EC), as well as output variable (U) to create variables based on language were performed through triangular membership functions. Table 2 provides the Robogymnast controller's fuzzy rules as follows: NB = negative big; NM = negative medium; NM = negative small; Z = zero; PS = positive small; PM = positive medium; and PB = positive big. An illustration of FLQR as implemented through Simulink is given in Figure 5.
The implementation of FLQR controller is displayed in Fig. 5, which shows the structure of the controller and its various components. The FLQR controller is a type of fuzzy logic controller that combines the advantages of both fuzzy logic and linear quadratic regulator (LQR) controllers. It uses fuzzy logic to handle the uncertainties and non-linearity of the system, and LQR to optimize the control action based on the system's mathematical model. In addition to the controller structure, the linguistic fuzzy rule base plays a key role in the performance of fuzzy logic controllers. The rule base is a collection of if-then statements that define the relationship between the system inputs and outputs. In this study, the rules are investigated by reviewing the dynamic behaviour of the robotic system. The goal is to identify the optimal set of rules that can produce the desired system response. Overall, the combination of fuzzy logic and LQR in the FLQR controller provides a powerful tool for controlling complex and nonlinear systems.

V. THE PROPOSED ALGORITHM
This section will describe the two algorithms developed and applied here for performance optimisation in the model put forward in the study, before drawing comparisons when assessing how effectively these algorithms can enhance modelling.

A. TLBO
Rao first put forward Teaching-Learning-Based Optimisation, drawing on theories of classroom-based teaching and VOLUME 11, 2023 learning and simulating teaching impacts on student performance [22]. As with various algorithms applying swarm intelligence, this metaheuristic optimising algorithm is based on populations and has achieved widespread use based on a number of its components. This includes the concept of the algorithm and the lack of a requirement for set parameters, as well as ease of implementation, speed, and broad application across a range of engineering fields and problems. TLBO utilises the impact of a teacher on students by describing two fundamental learning approaches: firstly, mediated by the teacher (teacher phase); and secondly, by student-student interaction (learner phase). The TLBO algorithm specifies utilises the student group as the population, while various subjects that they can study represent the range of design parameters for optimisation [23]. A student's outcomes relate to the optimisation problem's ''fitness'' value. The teacher is specified as the optimal solution for the entire group [24]. Design variables include variables which relate to the optimisation problem's objective function, with the optimal solution being the optimal objective function value [1]. Figure 6 provides a flow diagram showing the TLBO algorithm. Findings can be subdivided under sub-headings, to summarise and accurately describe the findings of experiments, how these findings are interpreted and the possible conclusions from this work drawn [24], [25].
The number of iterations is applied in to optimise the proposed control are 100, every iteration has 30 particles as shown in table.

B. PSO
PSO, or Particle Swarm Optimization, is a computational algorithm that uses swarm intelligence to find solutions to optimization problems. It was developed by Dr. Eberhart and Dr. Kennedy in 1995 and is based on the observation of social interaction and animal behaviours like fish schooling and bird flocking. The algorithm uses particles that represent different possible solutions and are initialized in a random population. These particles fly around in a multi-dimensional search space, adjusting their position based on their own experience and that of their neighbours, with the goal of finding the best solution. The performance of each particle is evaluated using a fitness function related to the problem, and the particles swarm towards the best solution encountered in previous iterations. PSO is favored for its simplicity, low computational cost, and strong performance. In PSO, each particle represents a potential solution to the optimization problem. The position of a particle is determined by two factors: its personal best position (p-best), which is the best position it has experienced, and the global best position (g-best), which is the best position among all the particles in the population. The particles keep track of both their own best position and the global best position in each iteration. [27]. The PSO algorithm terminates when a certain performance criterion is met. Some of the commonly used performance criteria are ITAE, IAE, and ISE, each with their own characteristics. For example, ITAE heavily penalizes large errors and lightly penalizes small errors. However, these performance criteria do not accurately control peak overshoot, rise time, and settling time [28], [29]. The steps of PSO algorithm; Define the fitness function: The fitness function should be defined based on the performance criteria of the FLQR controller; Initialize the population: The PSO algorithm starts by randomly initializing a population of particles within the search space; Evaluate the fitness of each particle: The fitness function is evaluated for each particle in the population [30]; Extract the best solution: After the PSO algorithm has completed, the best solution found is extracted and used as the parameters of the FLQR controller.

VI. RESULTS AND DICUSSION
This project utilized MATLAB 2021a software, installed on a computer equipped with an Intel Core i5-6600 CPU @ 3.30GHz. The TLBO and PSO algorithms were coded in .m files, while the FLQR controller model of the multi-link robotic system (Robogymnast) was designed in the MATLAB Simulink environment. The .m file in MATLAB (which contains the code of the algorithm) calls the Simulink file. The parameters of both algorithms were set as outlined in Tables 3 and 4, with a population size of 30 and a maximum iteration count of 100 for all algorithms.

A. RESULTS
In terms of convergence speed, it seems that TLBO is converging faster than PSO as TLBO reaches the desired convergence level of 1 sooner than PSO's convergence level of 2. In summary, the convergence curve in Fig.9 shows that TLBO is a better choice for optimizing the FLQR controller for the Robogymnast system, it's important to consider additional factors such as the convergence speed and stability. Table 5 displays the parameters of the findings, including the O sh (pu) overshot in per unit, U sh (pu) represent the undershoot of system's response in per unit. The table also VOLUME 11, 2023  presents the compilation time in seconds for both the rising and settling time. Additionally, an important factor is to minimize the system error by computing the integral time of absolute error (ITAE). With reference to the preceding figures, movements in the 3 links are illustrated sequentially, with A relating to link one, comparable to the gymnast's arms, the second to link 2 and trunk motion, and the third to link 3, representing the lower limbs. The controller developed here, which combines LQR control approaches with fuzzy logic, showed effective performance across the triplelink mechanism. Evaluating the robustness of this control approach showed that it performed better than a conventional control system for each parameter measured, which included settling times, undershoot and overshoot. The responses of the system recorded for TLBO and PSO are given and compared in Fig. 8. Detailed findings are given in Table 5, which provides unaltered baseline system values. The comparison of these algorithms used with an FLQR controller demonstrate lower over and under-shoot, settling and rise time with improvement in TLBO, in overshoot at 0, 0.39 and 0.23 in θ 1−3 respectively. However, there is no big difference in undershoot. Moreover, although rising time was quicker for the in first optimised technique comparing with PSO, at approximately, 0.21, 0.03 and 0.01 seconds, as well as the settling time is quicker. Upon comparing the current work with previous works in [1] and [17] the differences between the tuned and previous approaches can be observed. The effectiveness of TLBO in minimizing the error to optimize the hybrid control proposal for greater system stabilization is also evident.

VII. CONCLUSION
In summary, this paper has described implementation of the Robogymnast through a controller based on LQR fused with fuzzy logic and discussed systems improvements through the application of algorithms in MATLAB SIMULINK, comparing approaches for performance optimisation. This work sought to design and implement an FLQR controller, to understand how it performed in implementation with the Robogymnast. Simulation modelling was based on the designed controller and sought to analyse the major parameters of the system, identified as rising and settling times as well as overshoot. An evaluation was also made of dynamic system performance. From the findings presented here, an FLQR controller and TLBO algorithm are demonstrated to be more effective than a conventional controller and other algorithms when applied to the Robogymnast.