Stabilization and tracking control of underactuated ball and beam system using metaheuristic optimization based TID-F and PIDD2–PI control schemes

In this paper, we propose two different control strategies for the position control of the ball of the ball and beam system (BBS). The first control strategy uses the proportional integral derivative-second derivative with a proportional integrator PIDD2-PI. The second control strategy uses the tilt integral derivative with filter (TID-F). The designed controllers employ two distinct metaheuristic computation techniques: grey wolf optimization (GWO) and whale optimization algorithm (WOA) for the parameter tuning. We evaluated the dynamic and steady-state performance of the proposed control strategies using four performance indices. In addition, to analyze the robustness of proposed control strategies, a comprehensive comparison has been performed with a variety of controllers, including tilt integral-derivative (TID), fractional order proportional integral derivative (FOPID), integral–proportional derivative (I-PD), proportional integral-derivative (PI-D), and proportional integral proportional derivative (PI-PD). By comparing different test cases, including the variation in the parameters of the BBS with disturbance, we examine step response, set point tracking, disturbance rejection analysis, and robustness of proposed control strategies. The comprehensive comparison of results shows that WOA-PIDD2-PI-ISE and GWO-TID-F- ISE perform superior. Moreover, the proposed control strategies yield oscillation-free, stable, and quick response, which confirms the robustness of the proposed control strategies to the disturbance, parameter variation of BBS, and tracking performance. The practical implementation of the proposed controllers can be in the field of under actuated mechanical systems (UMS), robotics and industrial automation. The proposed control strategies are successfully tested in MATLAB simulation.


Introduction
Underactuated mechanical systems (UMS) have fewer control actuators than their degree of freedom they possess.Modern science and engineering incorporate these systems in various practical and diverse applications.Diverse fields, including robotics, the aeronautical industry, and aerospace, actively use underactuated systems.Furthermore, researchers find these systems of great interest and importance as prototypes for complex nonlinear systems in addition to their practical applications.In recent years, researchers have focused primarily on underactuated systems control design.As the field of UMS continues to emerge, a fundamental challenge arises: the development of a theoretical framework.Through a theoretical perspective, UMS controllability and stabilization is a significant challenge for the control research community.The utilization of underactuated mechanical systems (UMS) in engineering research and education encompasses various applications, with the ball and beam system (BBS) emerging as a particularly renowned and widely-used benchmark.Using a straightforward yet efficient mechanism, it actively illustrates the fundamental principles of control system engineering, encompassing modeling, identification, analysis, and design.The system consists of a ball that travels along a beam and a sensor that measures the position of the ball.An angle adjustment of the beam controls the position of the ball.
Researchers have explored various control strategies, such as Proportional Integral Derivative (PID), Linear Quadratic Regulator (LQR), fuzzy logic, neural networks, adaptive control, and many more upon BBS.This study advanced the development of the PID controller [1] to achieve improved control for the BBS.
Comparisons are made between Fractional Order Proportional Derivative (FOPID) controllers [2][3][4][5] and conventional PID controllers, as well as advanced controllers like Linear Quadratic Gaussian (LQG) and H1.FOPID controllers outperformed all these controllers.A fractional order sliding mode control [6,7] was proposed to improve the stability and robustness of the system.They controlled a highly nonlinear BBS fractionally in their work.Their conclusion indicated that a FOPID controller offers more freedom than a PID controller.
Regarding variations in system gain, simulations show that fractional order control (FOC) is superior to Integer Order Control (IOC).They employed an optimal control approach [8] to minimize the tracking error of the ball.The results demonstrated that Fuzzy PID [9][10][11] exhibits superior performance and algorithmic efficiency compared to traditional PID.A more complex problem is addressed by utilizing the sliding mode controller [12].Simulations and experimental results of BBS verify the effectiveness and demand of the designed control laws.
Metaheuristic approaches are optimization techniques inspired by natural processes such as evolutionary algorithms, swarm intelligence, and simulated annealing.These approaches have proven effective in solving complex optimization problems, including control problems [13].Metaheuristic algorithms [14] have been applied to the BBS to optimize the control parameters and provide better performance.An algorithm that combines the exploration and exploitation abilities of two or more algorithms to produce an optimal solution is called a hybrid algorithm.Additionally, some studies focused on comparing different metaheuristic algorithms for controlling the BBS.The optimization of the PID controller for the BBS has been done with a Genetic Algorithm (GA) [15,16].The results showed that the modified PID outperformed the standard PID search algorithm and other optimization techniques in terms of cost and raised time.A knowledge-based particle swarm optimization (PSO) algorithm [17][18][19] adaptively controls the BBS.In comparison to H-infinity-based PIDs and Particle Swarm Optimization (PSO)-based I-PDs, they concluded that the Cuckoo Search algorithm CSA--PI-PD [20] serves as a significantly superior controller in terms of closed-loop transient response.The study of the set point tracking response of a BBS involved the employment of a PI-PD controller.Researchers utilized evolutionary computational techniques like genetic algorithms (GA) to determine the optimum parameters of the proposed controller.The assessment of a PI-PD controller included the usage of ITSE, ISE, ITAE, and IAE.Simulation results demonstrate that GA-PI-PD [21] controllers with each performance index are more efficient than SIMC-PID [22] and H-infinity controllers.They investigated the stability of the BBS using a PID controller in their study.Simple internal model control (SIMC) based PID and H-Infinity controller had been proposed and gave satisfactory results.Based on the coefficient diagram method (CDM), their work aims to present a design methodology for a PID controller for an unstable BBS.The study reveals that CDM-PID controllers maintain excellent stability of ball position and exhibit a lower percentage of error compared to ZN-PID controllers [23].The Simulated Annealing (SA) methodology calibrates the gain coefficients of three control techniques, PID, PIDA, and PI-D to achieve the desired behavior.Analyzing the response of controllers, SA-PIDA demonstrates favorable results, followed by SA-PID and SA-PIσD, respectively [24].
Demonstrating superior effectiveness, the knowledge-based PSO algorithm [25] surpasses BBS, as evidenced by response curves generated through advanced correction, ziegler-nichols, basic PSO, and knowledge-based PSO.In a study, PSO, an artificial bee colony technique (ABC) [26,27] and a bat algorithm optimization technique (BAO) are among the metaheuristics techniques used to tune PID for cascaded control of BBS.The BAT algorithm has optimized motor position control more efficiently.The PSO algorithm outperformed other algorithms in overall system optimization, considering time response, overshoot, and steadystate error.The Gravitational Search Algorithm (PSO-GSA) and grey wolf optimization (PSO-GWO) [28] hybrid algorithms are applied to tune controller parameters, thereby improving system performance.Compared to other controllers, PSO-GWO controlled the position and angle of the ball more effectively.
In addition to UMS, many types of pendulums are often used in research, such as The Furuta pendulum or rotational inverted pendulum [29] it is a prototype underactuated nonlinear system used as a test bed for various control schemes [30], the inertia-wheel pendulum [31], the acrobat and pendubot [32], and the rotating pendulum [33], the cart pole system [34], the BBS [35], the ball and balancer system [36], the translational oscillator with a rotational actuator TORAsystem [37], and many others.Focusing on control-an observer-based nonlinear robust controller for the BBS has been successfully developed [38].As the observer output tracks the plant output, the estimation error between them quickly converges to zero.An adaptive control method also provides better control performance in terms of robustness [39,40].Controlling the ball position involved implementing an active disturbance rejection control (ADRC) [41], yielding better results compared to PID.
Highly nonlinear or time-varying systems can compromise the performance of PID controllers.The PID controller lacks inherent predictive capability, resulting in erratic behavior when exposed to noise.PID faces difficulties during dead time zones.The complexity and sensitivity of FOPID controllers can lead to a higher implementation cost than traditional PID controllers, along with increased computational resource requirements.In contrast to tuning a simpler controller like a PI or PD, PI-PD controllers can be more complex.PI-PD controllers may encounter challenges when attempting to control systems with strong nonlinearities.PI-PD has limited adaptability to time-varying Systems.Non-standard sensors and unconventional measurement devices may present challenges for PI-PD controllers.In addition to being less robust to parameter changes and more sensitive to noise, PI-D controllers are extremely sensitive to operational noise because of the derivative term amplifying high-frequency components.I-PD controllers may not be suitable for all systems.Handling nonlinearities can be challenging, and adding derivative terms may not be advantageous for systems that undergo minimal dynamic changes or have minimal delays.Non-standard sensors are difficult to integrate with TID controllers.The accuracy of a system model influences the effectiveness of a controller.Research on the control of BBS has made significant progress in improving their performance, particularly in terms of stability and steady-state response.However, there remains a notable research gap in addressing the transient time response of controllers for BBS.The transient time, also known as settling time, is a crucial aspect of system dynamics, representing the duration it takes for the system to reach and stabilize around its desired position after a disturbance or change in set point.The existing literature predominantly focuses on steady-state performance metrics, such as stability and accuracy, while the transient time response is often overlooked.The transient behavior of a control system is essential in applications where rapid and accurate repositioning is crucial, such as in industrial automation, robotics, or precision control systems.
Closing this research gap is essential for achieving optimal performance in ball and beam systems, as an improved transient time response contributes to faster and more accurate system reactions to external disturbances or set point changes.Addressing this gap requires the development and implementation of novel control strategies, tuning methods, or adaptive algorithms that specifically target and optimize the transient response of the system.
There are many challenges while designing the control strategies for the BBS.Like nonlinear dynamics, sensitivity to initial conditions, friction in the system and mechanical constraints, sensors measuring the ball position could introduce noise; the dynamics of the actuators used to tilt the beam could introduce delays or nonlinearities, affecting the system's response to control inputs.Variations in system parameters (e.g., ball mass, beam length) can occur.Achieving a balance between the speed of response and system stability is crucial.
• Formulation of the objective functions for optimal gains of the controllers.
• Optimization of the objective function with recent metaheuristic algorithms Whale Optimization Algorithm (WOA) and Grey Wolf Optimization (GWO).
• Detailed analysis of stability, the transient, and steady-state performance of the proposed control strategies, WOA/GWO-TID-F and WOA/GWO-PIDD 2 -PI, by employing four distinct performance indices.
• The robustness and disturbance rejection analysis of the proposed control strategies, WOA/ GWO-TID-F and WOA/GWO-PIDD 2 -PI is carried out with different test cases subject to change in parameters of the BBS, disturbance, and reference tracking to different ball positions.
• Comprehensive comparison between numerous different control schemes and optimization techniques with the proposed WOA/GWO-TID-F and WOA/GWO-PIDD 2 -PI control strategies.

Modeling of ball and beam system
Based on the laws of motion and energy, the equation of motion [13, 21-23, 36, 42-44] for the BBS can be derived.As the name implies, the BBS consist of a beam pivoting at one end and a ball rolling along it.Servo motors move the beam up and down so the ball can be positioned on the beam.In which ball has mass m, moment of inertia J, radius r, and moment of inertia J, θ (i.e.rotation angle with the wheel) represents the angle between a connecting beam and the horizontal line.The rotation angle of the beam is α, the distance between the connecting point of the connecting beam and the gear is d, and the length of the crossbar is L.
The slope angles β and θ of the crossbar approximated a proportional relation, and it related as: The equation of motion of the BBS system is given as [36].
When beta is zero the system is in horizontal position and in equilibrium.We can linearize the system with small angle because the value of From Eq 1 into Eq 3, we get: Taking Laplace transformation we get The moment of inertia is calculated as: Putting the values of the parameter from Table 1 in Eq 5 we get the final transfer function of ball and beam system GðsÞ ¼ XðSÞ yðSÞ ¼ ð0:11ÞðÀ 9:8Þð0:04Þ ð1Þ 9:9e À 6 0:015 2 þ 0:11 Firstly, the PID controller is tuned using metaheuristic optimization schemes such as GWO and WOA as part of the design methodology then the proportional integral derivative-second derivative with a proportional integrator PIDD 2 -PI, and the tilt integral derivative with filter (TID-F) are two proposed control schemes that are tuned with WOA and GWO are implemented on BBS as shown in Figs 2-4.Details are given below.
The objective is to keep a ball balanced on a beam by controlling the motion of the beam.One of the most used control technique for such systems is PID control.
A PID controller uses feedback to control the system.Using proportional, integral, and derivative terms, the control input is adjusted according to the difference between the desired set point and the actual output.The proportional term adjusts the control input in accordance with the error.As time passes, the integral term adjusts for accumulated errors.By using a derivative term, errors over time can be adjusted.To apply PID control to the BBS, the position of the ball is measured and compared to the desired set point.The error is then fed into the PID controller, which calculates the appropriate control input to adjust the position of the beam.This process is repeated continuously to maintain the ball at the desired position.The closed loop transfer function by using PID is The Proposed controller for the BBS is PIDD 2 coupled with the PI controller.The controller structure is shown in   control algorithm used in control systems to regulate a process variable to a desired set point.The PIDD 2 algorithm is an extension of the classical PID (Proportional Integral Derivative) controller and adds a second derivative term to improve the system's performance.The PI (Proportional Integral) controller is a basic feedback control system that uses two control actions to regulate a process variable.An integral term represents the cumulative error over time in PIDD 2 and PI controllers.Proportional terms represent the current error between the set point and the actual process variable.Control performance is improved when the PIDD 2  and PI controller are combined.The PIDD 2 algorithm adds a second derivative term to the control signal, which helps to dampen any overshoot or oscillations in the system response.
On the other hand, PI controllers adjust the control signal continuously based on the accumulated error of the system to eliminate steady-state errors.The PIDD 2 coupled with the PI controller working principle can be summarized as follows: • The process variable is measured and compared to the desired set point.
• Error signals are calculated as differences between set points and process variables.
• A control signal is calculated via the PIDD 2 algorithm by combining proportional, integral, derivative, and double derivative terms.
• The PI controller adjusts the control signal based on the accumulated error to eliminate steady-state error.
• As a result of the control signal, the actuator adjusts the process variable.
The control loop is repeated to continuously regulate the process variable to the desired set point based on the next measurement of the process variable.Overall, the PIDD 2 coupled with the PI controller provides a more advanced and robust control system that can handle a wider range of process dynamics and disturbances compared to the classical PID controller.The proposed controller PIDD 2 -PI controller has been optimized with various control optimization algorithms such as GWO and WOA to achieve excellent performance, including a short settling time and rapid rise without overshoot.
There is a similarity between TID's design [45,46] and PID's, though there are some differences; PID is modified by replacing "(1/s)n" with a real number (n) in place of the proportional constant.
TID-F controller is mathematically represented as follows: K T , K D , and K I represent proportional/tilt, derivative and integral constants on controllers, respectively.The TID controller can be characterized as a combination of fractional order (FO) and integer controllers.TID has an advantage over FO and integer controllers.This method quickly eliminates disturbances between integers and FOs.Where derivative filter coefficient is defined by the parameter N and the Fig 4 shows the TID-F controller's structure.
By measuring the difference between the desired output and the actual output of a control system, performance indices, or error criteria, are used to evaluate the performance of control systems.There are several types of performance indices, including the Integral of Absolute value of Error (IAE), Integral of Time multiplied by Absolute value of Error (ITAE), Integral of Squared Error (ISE), and Integral of Time multiplied by squared value of Error (ITSE) [36].
IAE measures the cumulative absolute error over time, giving more weight to larger errors.ITAE is similar to IAE but gives more weight to errors that occur earlier in the system's response.ISE measures the cumulative squared error over time, giving more weight to larger errors.ITSE is similar to ISE but gives more weight to errors that occur earlier in the system's response.Over some defined period of time T, these performance indices are as follows: dt: ð12Þ

Metaheuristic computation for controller tuning
Metaheuristic computational techniques are important for solving optimization problems because they provide efficient and effective solutions when exact methods are impractical or too time-consuming.These techniques can be used in situations where the problem is constantly changing or dynamic, requiring quick adjustments to the solution approach.These are an essential tool for solving optimization problems in a timely and effective manner.Two recently introduced metaheuristic optimization algorithms have been used in this paper.
Controllers are tuned using metaheuristic techniques to get the optimum results, and details are given in this section.

Grey Wolf Optimization algorithm (GWO)
GWOs [47] are motivated by grey wolves' intelligent hunting tactics and social structure.It is common for grey wolves to live in groups of 5 to 12 individuals.Its primary goal is to develop the candidate solution during each iteration, which makes GWO different from other metaheuristic optimization algorithms.In other words, GWO imitates gray wolf hunting behavior, which involves locating and attacking prey.Grey wolves undergo the following stages of hunting as outlined by [48][49][50][51][52][53].The process of following, pursuing, and moving forward with the prey continually following, encircling, and harassing the prey.Targeting prey with an attack.
Using the GWO algorithm to tune PID controller parameters has exploded in control engineering publications.In recent years, grey wolf optimizer (GWO) has become one of the most popular metaheuristic swarm intelligence methods.The initial search for this technique does not require any derivation information, which makes it more efficient than other swarm intelligence techniques.GWO is organized into four groups based upon the various roles that the wolves play in progressing the hunting process.It has been determined that alpha is the most successful hunting strategy out of the four, with beta, delta, and omega representing the others.
In nature, gray wolves are divided into four groups based on their dominance structures.The creators of this algorithm carried out a thorough trial and discovered that taking.A grey wolf population is established as a random population in the GWO search procedure, like previous swarm intelligence algorithms.The four wolf groups and their positions are then established, and the distances to the intended prey are calculated.An update is made on each wolf as it symbolizes a potential solution during the search process.To prevent the local optima from stagnating, keep up the exploration and exploitation.Its mathematical model differs from that of other population-based algorithms in that it determines the global optimum by calculating the value of the global average.To mimic gray wolves hunting and encircling their prey in the wild, it moves a solution around another in an n-dimensional space.GWO only requires a position vector, thereby requiring less memory.Additionally, GWO only retains three best solutions.One of the SI algorithms with the fastest growth is GWO.The success of the GWO algorithm inspires other academics to use the approach to address various optimization issues.The flow chart for GWO is shown in Fig 5.

Whale Optimization Algorithm (WOA)
Humpback whales' natural hunting behavior is used to design the whale optimization algorithm WOA [54][55][56][57][58], which involves two main behaviors: searching and encircling prey.The algorithm uses these two behaviors to iteratively improve the fitness of the solution set.In the search phase, the whales move randomly toward the prey, while in the encircling phase, they surround the prey to trap it.By combining these two behaviors, the WOA algorithm forms a multi-objective optimization problem, with the goal of minimizing fitness.General Structure of WOA.It only requires one parameter (time interval) to be adjusted in the algorithm, using a small number of control parameters.It is based on the assumption that a population of humpback whales searches for food in a multidimensional space, in which individuals' positions is represented by decision variables, and the distance between individuals and food is reflected in objective costs.There are three operational phases involved in whale action during its time-dependent location: shrinking encircling the prey, bubble-net attacks, and searching for prey.These operational processes are described and mathematically expressed in the following subsections.
Encircling prey.Detecting prey and surrounding it is one of the skills of humpback whales.WOA assumes that the current most appropriate candidate solution represents the target prey or is near the optimal design since the exact position of the optimal design in the search space is unknown beforehand.While the algorithm seeks to identify the most efficient search agent, the remaining search agents adjust their positions around the most efficient search agent.The following equations are used to describe this behavior mathematically: Where D is the distance vector, that specifies the difference between the current position X (t) and the target position.C is the coefficient vector used to update the encircling mechanism in the algorithm X*(t) signify the position vector of best solution.X(t + 1) denotes the updated position vector for the next and A is the coefficient vector used to update the position which depends on two variables r and a where a is a parameter that controls the spiral updating mechanism.r is a random vector ranging between 0 and 1, used to introduce randomness in the algorithm.
Bubble-net attacks.Bubble-net attacks are cooperative feeding behavior displayed by groups of humpback whales.During a bubble-net attack, a group of whales works together to create a ring of bubbles around a school of fish, which encloses the prey and makes it difficult for them to escape.The whales then take turns swimming through the ring with their mouths open, scooping up large amounts of fish in each pass.
Searching for prey.Hunting requires exploring the search space to find the optimal solution.In WOA, the whales represent potential solutions, and they move randomly in the search space to search for the prey, which is the optimal solution.Set of mathematical equations guide whale movements in a manner similar to how humpback whales hunt bubble-nets.A balanced exploration-exploitation phase balance is central to the algorithm's goal of convergent to a global optimum.The flow chart for WOA is shown in Fig 6.
In comparison to WOA, the TID-F tuned better with GWO.From Table 3 it can be clearly seen that GWO-TID-F provides excellent results.Therefore it can be inferred that ISE index with the proposed controller can tackle BBS with improved dynamic and steady state performance.The other proposed controllers are WOA-PIDD 2 -PI & GWO-PIDD 2 -PI whose optimum control gains are shown in Table 4.
The step response of WOA-PIDD 2 -PI controller is shown in Fig 10 .WOA-PIDD 2 -PI with ISE has excellent results as compared to others.  5.
From Table 5 we see that WOA-PIDD 2 -PI is performing excellent with ISE & IAE WOA--PIDD 2 -PI-ISE rise time is 0.0014 sec & settling time is 0.0025 sec where WOA-PIDD 2 -PI-IAE rise time is 0.0295 sec and settling time is 0.0513 sec.so we choose WOA-PIDD 2 -PI-ISE as a proposed controller.
We implement variety of controllers on BBS for the sake of validity and comparison with the two proposed controllers.The controller which are observed are Tilt-Integral-Derivative

Case study
This section provides an in-depth analysis and comparison between different control schemes and optimization techniques to demonstrate the improved performance and robustness of the proposed control schemes.For a direct comparison with CSA-PI-PD [20] as case-01, the performance of the proposed control schemes GWO-TID-F-ISE and WOA-PIDD-PI-ISE can be evaluated using the BBS parameters given in Table 1.Table 8 represents the step response Comparison of proposed controllers with CSA-PI-PD [20].We then consider BBS with change in its parameters as given in Eq 18, to test the robustness, step response performance, set point tracking and disturbance rejection capabilities of the proposed control schemes GWO-TID-F-ISE and WOA-PIDD-PI-IS, as well as provide the comparison with published relevant research work [21][22][23][24] as a case-02.
Case-01.In this section, a comparison is made between the proposed control strategies GWO-TID-F-ISE and WOA-PIDD 2 -PI-ISE with CSA-PI-PD [20] using the same model parameters given in Table 1 for BBS.
In   Case-02.Here we consider the BBS with change in the parameters of the system as given in Eq 18 for a direct comparison with [21][22][23][24] and show the improved performance and robustness of the proposed schemes.A step response analysis, tracking performance, disturbance rejection analysis is carried out and comparison between different control schemes and optimization techniques are made.The transfer function for the BBS [21][22][23][24] with the same values from Table 1 except the length of beam which is used as L = 0.4 m is given as In Table 9 Comparison of the proposed controller GWO-TID-F-ISE and WOA-PIDD 2 -PI-ISE step response performance with GA-PI-PD [21], SIMC-PID & H-Infinity [22], CDM-PID [23] and SA-PID & SA-PIDA [24] is presented.A comparison of the step response of the proposed controllers WOA-PIDD 2 -PI-ISE and GWO-TID-F-ISE with the GA-PI-PD, SIMC-PID and H-infinity controller is shown in Fig 17 .As can be seen, the proposed controller WOA-PIDD 2 -PI-ISE rise in 0.0113 s and settled in 0.1338 s with a small overshoot.In the other proposal, GWO-TID-F-ISE rises within 0.0094 s and settles in 0.0161 s with no overshoot at all.

Conclusion and future work
In this research, PIDD 2 -PI and Filtered TID (TID-F) controllers, optimized using grey wolf optimization (GWO) and whale optimization algorithm (WOA), are evaluated on the BBS to control the stability of the system with four performance indices ITAE, ITSE, ISE, and IAE.WOA-PIDD 2 -PI-ISE and GWO-TID-F-ISE give excellent performance.For additional validation, the proposed controllers are exclusively compared with TID, FOPID, I-PD, PI-D, and PI-PD, affirming that the proposed controllers exhibit superior performance regarding transient response.Furthermore, the robustness, set point tracking, and disturbance rejection of proposed controllers are compared with two case studies, and the findings are as follows: The proposed controller WOA-PIDD 2 -PI-ISE reduced the rise time to 96.28% and the settling time to 95.69% than CSA-PI PD-ITAE [20].The alternative proposed controller, GWO-TID-F-ISE, achieved a remarkable 99.33% reduction in rise time and a substantial 99.18% decrease in settling time compared to CSA-PI PD-ITAE [20].WOA-PIDD 2 -PI-ISE effectively tracks the signal with minimal overshoot, surpassing the performance of GA-PI-PD-ISE and GA-PI-PD-ITAE [21], as well as SIMC-PID and H-infinity [22].Meanwhile, GWO-TID-F-ISE demonstrates ideal signal tracking with zero overshoot, outperforming GA-PI-PD-ISE and GA-PI-PD-ITAE [21] and SIMC-PID and H-infinity [22].WOA-PIDD 2 -PI-ISE reduced the rise time by 97.25%, and the settling time reduced by 96.91% than SA-PID [24] reduced the rise time by 97.03% and reduced the settling time by 96.6%, than SA-PIDA [24] it also minimizes overshoot greatly.GWO-TID-F-ISE reduces rise time by 97.71% and settling time by 99.62% compared to SA-PID [24] and removes overshoot.GWO-TID-F -ISE reduced rise time by 97.53% and settling time by 99.59% with zero overshoot than PIDA [24].WOA-PIDD 2 -PI-ISE significantly reduces rise time and settling time compared to CDM-PID [23] with minimal overshoot.GWO-TID-F-ISE drastically reduces the rise time and settling time than CDM-PID with zero overshoot.WOA-PIDD 2 -PI-ISE exhibits excellent tracking performance with minimal overshoot, surpassing the capabilities of the CDM-PID controller [23].On the other hand, GWO-TID-F-ISE perfectly tracks the reference signal with zero overshoot, indicating superior performance compared to both WOA-PIDD 2 -PI-ISE and the CDM-PID controller [23].Moreover, WOA-PIDD 2 -PI-ISE excels in disturbance rejection with minimal overshoot, outperforming the CDM-PID controller [23], while GWO-TID-F-ISE achieves ideal disturbance rejection with zero overshoot.
Based on the simulation results, one can infer that GWO is more effective in tuning the proposed TID-F control than WOA.The TID-F works well with performance indexes such as ISE.Controller PIDD 2 -PI tuned best with WOA and performed excellently with performance index ISE.GWO-TID-F-ISE and WOA-PIDD 2 -PI-ISE are robust to control the stabilization and tracking performance of the underactuated BBS.In-depth analysis and comparison between different control schemes and optimization techniques confirm better dynamic and steady-state performance, tracking performance, disturbance rejection capability, and the robustness of the parameter variation of the BBS.

Fig 1
is showing the schematic diagram of BBS.

Fig 5 .
Fig 5. Flow chart of GWO.https://doi.org/10.1371/journal.pone.0298624.g005 -PI controllers, which are designed to provide control of the Ball & Beam system with four performance indices, ITAE, ISE, IAE and ITSE are simulated.For simulations, MATLAB/SIMULLINK software is employed.The open loop response of a ball and beam system is examined first.The system's open-loop step response is shown in Fig 7. A growing response indicates that the system exhibits an unstable open loop response.Now feedback control is applied using GWO/WOA-TID-F & GWO/WOA-PIDD 2 -PI.The performance of controllers has been evaluated using three different parameters of transient response, including rise time, overshoot and settling time.The optimum gains of TID-F tuned by GWO & WOA are shown in Table 2.It is evident from Fig 8 GWO-TID-F gives excellent performance in terms of rise time, settling time and overshoot.The proposed controller has zero overshoot on all four performance indices.GWO-TID_F with ISE has a lower rise time of 0.0058 seconds and a very short settling time of 0.01 seconds.The 2nd most suitable is GWO-TID_F with ITSE whose rise time is 0.0079 sec and settling time is 0.0141 seconds with zero overshoot.GWO-TID_F with other performance indexes ITAE and IAE also gives an excellent response with a very slight increase in rise and settling time with zero overshoot as com-pared with ITSE and IAE.Step response of WOA-TID-F controller is shown in Fig 9. We can see the rise time and settling time are very short with small overshoots with all indices.The step response performances of BBS with GWO-TID-F & WOA-TID_F Controller are presented in Table

(
TID), Fractional Order Proportional Integral Derivative (FOPID), Integral -Proportional Derivative (I-PD), Proportional Integral-Derivative (PI-D), Proportional Integral -Proportional Derivative PI-PD tuned with WOA and GWO with four performance indices and choose optimal results for comparison with the proposed controllers.The control gains are shown in Table6.Fig 12 shows the comparison of step response of optimum controllers with proposed controllers.The proposed controller results are excellent compare to others.The comparison of step response characteristics of proposed controllers with selected optimal controllers are shown in Table 7.The graphical representations of rise time, settling time and overshoot time vs different controllers are shown in Figs 13-15 respectively.