1. Introduction
The under actuated mechanical systems (UMS) are challenging to control as they are inherently unstable, nonlinear and have complex dynamics [
1]. Because of the under actuation property UMS require reliable, efficient and fast controllers. This broad research area of UMS control can be divided into two main categories: set-point regulation and trajectory tracking, that aim to stabilize UMSs in the face of various uncertainties and external disturbances [
2]. The UMS have fewer actuators than degrees of freedom to be controlled, so many traditional non-linear control methods cannot be used directly in this scenario. It is well known that UMS exists in a number of forms, such as the Acrobat, Pendubot, cart-pole systems, crane systems, rotating pendulums, inertia wheel pendulums, beam-and-ball systems, magnetic suspension systems, translational oscillators with rotational actuators (TORAs), vertical takeoff and landing (VTOL) aircraft, and surface vessels. The ball and balancer system with two degrees of freedom is one of the best-known examples of an under actuated mechanical systems. The position control of ball in this system is a major challenge that is usually addressed by applying various control methodologies. To achieve the required balancing objective, various controllers have been tested upon the ball and balancer system including feedback linearization, energy, back stepping, sliding mode, and fuzzy logic. Overall, the results of these studies have demonstrated the effectiveness and potential of advanced control methods in improving the performance of systems. A new hybridized Chaotic state of matter search with Elite opposition-based learning (CSMSEOBL) [
3] algorithm is proposed to tune the gains of PID controller to improve the transient response of ball and balancer system. Their results showed that the CSMSEOBL based PID controller outperforms classical PID controllers and other optimization techniques such as PSO-PID, SFS-PID, and SMS-PID. An artificial intelligence-based deep reinforcement learning (AI-RL) PID controller and a genetic algorithm-based PID controller are compared for linearized ball and balancers [
4]. Their analysis reflected that DDPG-FC-350-E-PID outperformed all other approaches and achieves the best performance. For improving time domain response fuzzy PID and Reinforcement Learning (RL) controllers are investigated in [
5]. There were various fuzzy controller proposed for motion control and trajectory tracking of ball and beam system in [
6,
7,
8,
9]. Moreover a fuzzy based adaptive integral control action had been proposed that significantly reduces the steady state error because of the integral control [
10]. The effect of parameters variation has been verified by introducing PD tuned fuzzy logic controller in time domain and the results are compared with classical PD controller [
11]. The goal to provide a quick and accurate response with little tracking error has achieved in [
12] by proposing two types of ball stabilization controllers, a classical PID controller and a Lead/Lag compensation controller and Lead/Lag controller performed the best. Traditional PID controllers face a draw back when it comes to adjusting their settings. There are different methods to help with tuning these PID parameters. There are several examples of PID tuning [
13,
14] with ITAE [
8,
15,
16,
17]. ITAE have strong emphasis on minimizing steady-state error and settling time. In addition it is more sensitive to overshooting compared to IAE.
Using metaheuristics to solve multi-objective problems has have been proven to be an efficient and cost-effective way. There are several popular and relatively recent metaheuristics that can be used to tune controllers. Particle Swarm Optimization (PSO), Simulated Annealing (SA) and Genetic algorithm (GA) are used to optimize the gains of PID controller to control a ball and balancer system [
18]. Their results were compared with classical PID in terms of delay time, rise time, and settling time and all shown a very good percentage of improvement. A fuzzy logic controller optimized with chicken swarm optimization algorithm (CS0) has been proposed and showed improvement in transient response of the ball and balancer system [
19]. Whale optimization algorithms are used [
20] to regulate PID parameters for tracking control of robot manipulator. As evidenced by settling times, errors, and convergence times, as well as the robustness of the WOA-PID for tuning parameters for PID controllers for robot tracking, it had proved effective for tracking robots with or without disturbances. The control of such systems was also addressed by using intelligent controllers or autonomous decision-making methods [
21,
22,
23,
24]. The simulation results indicate that sliding mode control (SMC) control scheme excels in dynamic performance as well as disturbance rejection compared to PID, fuzzy control, and LQR control [
25]. An internal model control based scheme had proposed to give zero steady state error in tracking of ball and balancer system [
26,
27]. A neural integrated fuzzy and its hybridization with PID had been implemented to control the position of ball and angle of plate [
28]. In their work steady-state error analysis and time response analysis are used to evaluate each controller’s performance. Some fractional order controllers also contribute to stabilize ball and balancer system [
29,
30,
31]. The FOMC performed better in terms of less chattering, improved trajectory control [
32] and speed then SMC.
Fuzzy controllers are quite good in handling imprecise and nonlinear systems, but they can be complex to design and computationally intensive. Sliding mode controllers are robust to uncertainties but may exhibit chattering, and they can be sensitive to modelling errors. Neural controllers offer adaptability and effectiveness in complex systems but lack interpretability and may require significant computational resources for training.
PID controllers remain a reliable choice due to their simplicity, ease of implementation, and well-established track record in a wide range of applications. Their ability to provide stable performance make them advantageous, especially in scenarios where a precise mathematical model is available.
There are various configurations of PID are available.
controllers are often used to control position, velocity and acceleration feedback [
33], as our aim is to control position of ball so we choose
. TID-F controller is easier to tune with enhanced disturbance rejection capacity, and gives outstanding durability to parameter variation [
34]. Four metahueristic approaches are selected and applied for tuning the controllers with optimal gains.
This paper investigates the position control and tracking performance of ball and balancer system with a tilt integral derivative controller with filter based on GWO/WOA and a proportional integral derivative second derivative controller based on GWO/WOA. In this context, this research paper has following main contributions:
Design and implementation of two novel controllers TID-F and -PI for stabilizing underactuated ball and balancer system and optimization with different metaheuristic algorithms like WOA, CSA, GBO and GWO.
The performance of the system has been analyzed using set point tracking analysis, and step response analysis of the proposed control strategies by employing ITAE as an error reducing function.
An evaluation of the control strategies WOA/GWO-TID-F and WOA/GWO--PI with numerous different control schemes like PID, PI-D, PI-PD, -PD and optimization techniques. Robustness has been verified by analyzing some test cases with different parameters of the ball and balancer system, as well as with reference tracking to different ball positions.
Following is a brief outline of rest of the paper: A two-degree-of-freedom ball balancer system is described in
Section 2, different controllers are described in
Section 3, metaheuristic algorithms are described in
Section 4 a summary of the findings and an analysis is presented in
Section 5, while conclusion with future prospects are discussed in
Section 6.
2. Dynamic Modeling of Ball and Balancer System
A ball and balancer system typically refers to a mechanical or dynamic arrangement involving a ball and a balancing mechanism. For a variety of applications, this system is often designed to ensure stability or equilibrium. Quanser Lab’s equipment 2D ball and balancer system is used in this research represents the system depicted in
Figure 1. The plate accommodates a ball that is freely moving. A gimbal with two degrees of freedom can be used to rotate the plate in any direction. Overhead USB cameras and vision units are used to determine the ball’s position. The Quanser Rotary Servo Base Unit (SRV02) mathematical modeling instructions are as follows
In order to move a ball while preserving the servo load angle following equation can be used [
35]:
As a result of inclination, the positive force is written as:
Rotational forces are generated by the rotation of the ball:
where
is the moment of inertia of the ball is,
is the ball angle and
is the radius of the ball. When the moment of the ball is applied in the x-direction, we have put
in (
3):
Putting the value of
and
in (
1):
Now adding servo motor (SRV02) dynamics. The equation of motion representing the position of the ball rotation the ball of the servo motor SRV02 load gear and the beam angle as . Where is the length of the table or plate and h is the height of the table or plate. Taking the sine of the load angle of the servo motor (SRV02):
. Where is the distance between the couple joint and output gear-shaft.
Put in (
5):
Trigonometric value
is a non-linear function. We use an approximation
for linearization:
Over all Transfer Function of ball and balancer system is denoted as
, where the transfer function of servo motor is
and ball & balancer system is
as shown in
Figure 2. So the transfer function of the ball and balancer system is:
Let model gain is the co-efficient of
as:
The moment of inertia of the ball is calculated by using the values given in
Table 1:
kgm
2. Put in (
10):
Putting this in (
11) we get
The Laplace transformation of the linear equation of motion is
The angular rate of the SRV02 load shaft with
, an input voltage
,
a steady state gain, and
is a time constant of the motor then transfer function of the motor is:
Putting the values of
and
in (
8):
3. Controller Design
Two robust control strategies including the -PI, and TID-F tuned with metaheuristic optimization algorithms, WOA and GWO are propose for the position control analysis of ball and balancer systems.
3.1. PID Controller
The ball and balancer system is a classic example of a control problem, where the objective is to keep a ball balanced on a platform by controlling the motion of the platform. One of the most commonly used control techniques for such systems is PID control. PID control is a feedback control technique. In the first step, classical PID controller is implemented tuned with the proposed schemes GWO & WOA as shown in
Figure 3.
A PID control method uses feedback control. Depending on the amount of difference between the actual and desired outputs of the system, the control input is adjusted employing proportional, integral, and derivative terms. Control input is adjusted according to the error with the proportional term. As time passes, the integral term adjusts for accumulated errors. By using a derivative term, errors over time can be adjusted.
Ball and balancer systems are controlled by PID by measuring the ball position and comparing it with a set point that is desired. An appropriate control input is determined based on the error in the PID controller, which then adjusts the platform position as a result. This process is repeated continuously to maintain the ball at the required position. The cascaded scheme for control is applied which is consisting of two loops. The inner loop and the outer loop as shown in
Figure 4.
In order for the outer loop to be stabilized, the inner loop must first be stabilized. An inner loop keeps track of the angle of the motor Hence; the controller of inner loop should be programmed so the motor angle tracks the reference signal. Ball angles are controlled by outer loops using inner feedback loops. It is therefore necessary to begin with the inner loop. Firstly the inner loop is stabilized, with the inner loop gains Kp = 5.9462, Ki = 0.0136, and Kd = 0.0305. The closed inner loop transfer function using PID is:
After the reduction block, the ball and balancer system is reduced as shown in
Figure 5 below:
The error function E(s) of a complete system (inner and outer loop) for the PID controller:
3.2. -PI Controller
The Proposed controller for the ball and balancer system is
coupled with the PI controller as shown in
Figure 6.
Proportional Integral Derivative Double Derivative () regulates a process variable to a desired set point. The algorithm is an extension of the classical PID 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 and PI controllers. Proportional terms represent the current error between the set point and the actual process variable. The combination of and PI control improves the performance. The algorithm adds a second derivative term to the control signal, which helps to damp any overshoot or oscillations in the system response. On the other hand, PI controller adjust the control signal continuously based on the accumulated error of the system to eliminate steady-state errors. Error signals are calculated as differences between set points and process variables. A control signal is calculated via the algorithm by combining integral, proportional, derivative, and double derivative terms. The process variable is measured and compared to the desired set point. 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 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 transfer function of
and PI are written as:
The error function for ball and balancer systems using equations of
-PI with ball and balancer system equation is written as:
3.3. TID-F Controller
Filtered tilt integral derivative controller is a combination of TID with filter. The control scheme is shown in
Figure 7. It is a feedback controller having four parameters (Kp, N, Ki, and Kd).
TID design [
36] have some similarities with PID design, but they also have 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:
, , and represent proportional/tilt, integral and derivative 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.
The error function for ball and balancer system using equation of TID-F with ball and balancer equation is written as
5. Simulation Results and Discussion
In this section, position control of the ball on ball and balancer model with two degrees of freedom is designed and developed in Simulink/MATLAB. The problem is defined using an objective function or fitness function for optimization process, such as convergence of a metaheuristic algorithm toward the global optima of controller adjusted parameters.
The classical PID controller is initially applied to the ball and balancer system, but the results are unsatisfactory as shown in
Figure 10.
Table 2 shows that the classical PID controller has large settling time and overshoot. To overcome this situation cascaded control strategy is used for the implementation of the controller. The response of the system is deliberately divided into two sections. Firstly the response of proposed controllers with various others is analyzed by applying different metahueristic approaches like GWO, CSA, GBO and WOA respectively.
The step response comparisons of controllers tuned by GWO are shown in
Figure 11.
The proposed control schemes along with the various controllers, like PID, PI-D, PI-PD and
-PI, are then optimized with the recent metaheuristic algorithm including GWO, CSA, GBO, and WOA and results are compared. The optimal gains for controllers tuned by GWO, CSA, GBO and WOA are shown in
Table 3. These optimal gains are used further for the improved controller performances.
The GWO is used to tune the PID, PI-D, PI-PD,
-PD,
-PI and TID-F controllers with a focus on minimizing overshoot. However, despite achieving fast rise times, the
-PD controller exhibits a large amount of overshoot. In contrast, the proposed
-PI controller outperforms all other controllers in terms of performance, with a very small settling time 0.6421 s & TID-F settling time 1.0277 s along zero overshoots as shown in
Table 4. It is clear that GWO-
-PI & GWO-TID-F perform excellent, and GWO-
-PI is quicker in rise and settling time than GWO-TID-F.
Figure 12 shows that when controllers are tuned using the CSA, the PID and
-PD controllers exhibited a very high degree of overshoot that is 31.0255% and 37.9147%. On the other hand, the PI-D controller has smaller overshoot that is 11.122%, while both the PI-PD and
-PI controllers achieve zero overshoot. Furthermore, the
-PI controller settled faster than the PI-PD controller. A very short rise time is achieved by the
-PD controller. TID-F has good rise and settling time with large overshoots. PI-PD and
-PI controllers are better tuned by CSA. Step response characteristics are shown in
Table 5.
Figure 13 shows that, the proposed
-PI controller is optimized very efficiently using GBO settled in 1.6919 s with zero overshoot, Unlike other controllers such as PID, PI-D, and PI-PD, which are having high overshoot. The
-PD controller achieves a quick response with a small overshoot 5.5756%. Further step response characteristics are shown in
Table 6.
Figure 14 shows that the WOA algorithm is capable of optimizing a range of controllers, including PID, PID-D, PI-PD,
-PD, and the proposed
-PI. Based on WOA optimization, the
-PD controller for the Ball and Balancer system achieves quick settlement in 0.3965 s and a really fast rise time that is 0.0059 s but having overshoot. On the other hand WOA-
-PI and WOA-TID-F are giving zero overshoots with 0.7 s and 1.21 s settling time, respectively, as shown in
Table 7. Hence it is clear that GWO and WOA tuning schemes exhibit the most impressive performance among all.
This section explains the response of proposed and comparison controllers tuned with different metahueristic approaches.
Figure 15 shows that PID is effectively optimized with WOA, but it tend to result in overshoots when used with CSA and GBO i-e 31.02% and 22.3% respectively. Accordingly, not all optimization algorithms are suitable for all control structures.
Figure 16 shows that the WOA efficiently optimized PI-D control method with 1.5682 s settling time but 4.6% overshoots as shown in
Table 7. However, when applied to CSA and GBO, it tends to result in overshoots and take longer to settle compared to other control methods shown in
Table 5 and
Table 6.
Figure 17 indicates that the PI-PD control method is effectively optimized by GWO with a significantly smaller settling time than the WOA that is 1.7463 s and 4.3581 s respectively. However, it can lead to overshoots when used with CSA and GBO shown in
Table 5 and
Table 6.
Figure 18 shows that the
-PD control method is efficiently optimized with GWO, CSA, GBO and WOA with rapid rise time shown in
Table 4,
Table 5,
Table 6 and
Table 7. While it results in significant overshoots with GWO, and only minor overshoots with GBO, CSA, and WOA.
Figure 19 shows that the proposed controller
-PI is more effectively optimized by the GWO, CSA, GBO, and WOA shown in
Table 4,
Table 5,
Table 6 and
Table 7. This control method is associated with quick rise time and very short settling time, with no overshoots observed. These findings indicate that the
-PI control method can deliver satisfactory results when applied to all optimization techniques.
Figure 20 demonstrates that TID-F control method is effectively optimized by the GWO and WOA but gives some overshoots when tuned by CSA, GBO. TID-F tuned GWO, and WOA gives satisfactory results in rise and settling time with no overshoots. According to the analysis of the results,
-PI and TID-F performed best with WOA and GWO, respectively.
In
Figure 21a, the rise time is plotted against each controller. In
Figure 21b, the Settling time is plotted against each controller. In
Figure 22, the maximum overshoot is plotted against each controller.
5.1. Case Study
This section provides analysis and comparison of proposed control strategies with relevant published research work. It demonstrates the improved performance and robustness. The robustness of proposed control schemes is verified by applying change in parameters of ball and balancer system. In addition step response performance and set point tracking capabilities of proposed strategies are validated.
5.1.1. Case 1
A comparison is made between the proposed controllers GWO-TID-F & GWO-
-PI and SMS-PID & CSMSEOBL-PID [
3] by using the model parameters used in
Table 1 for a ball and balancer system.
5.1.2. Step Response Comparison with SMS-PID & CSMSEOBL-PID
The step response comparison of proposed control schemes GWO-TID-F & GWO-
-PI with SMS-PID & CSMSEOBL-PID [
3] are shown in
Table 8.
Figure 23 shows the comparison of step responses for GWO-TID-F & GWO-
-PI versus SMS-PID & CSMSEOBL-PID. It shows that the proposed controller WOA-
-PI gives an excellent response in terms of rise and settling time with zero overshoot. WOA-
-PI reduced 79.55% rise time and decreased 70.35% settling time compared to CSMSEOBL-PID. The 2nd proposed controller GWO-TID-F reduced 53.28% settling time compared to CSMSEOBL-PID with zero overshoot.
5.1.3. Set Point Tracking with SMS-PID & CSMSEOBL-PID
The set point tracking performance is compared by using the reference track signal used in [
3]. Comparison of the tracking performance is made with GWO-TID-F & WOA-
-PI versus SMS-PID & CSMSEOBL-PID [
3].
Figure 24 shows the comparison of tracking responses for GWO-TID-F & WOA-
-PI versus SMS-PID & CSMSEOBL-PID. It is evident that the proposed controller WOA-
-PI tracks the input signal ideally. The other proposed controller GWO-TID-F tracks the input signal excellently compared to SMS-PID & CSMSEOBL-PID with zero overshoot.
Figure 25 shows the comparison of step responses for GWO-TID-F & WOA-
-PI versus DDPG-FC-350-R-PID [
4].
Figure 26 is showing the comparison of proposed controllers versus SMS-PID & CSMSEOBL-PID.
5.1.4. Case 2
In CASE 02, the proposed controllers are tested with another related controller deep deterministic policy gradient based PID DDPG-FC-350-R-PID [
4] by taking different model parameters. The motor is treated as a first-order system and denote it as
. The gain compensator
and time constant
[
4]. Servo Motor transfer function is:
Transfer function of Ball Balancer is:
Combine transfer function of the Plant is [
4]:
5.1.5. Step Response Comparison with DDPG-FC-350-R-PID
The step response comparison of proposed control schemes GWO-TID-F & WOA-
-PI using the transfer function of ball and plate system as given in (
25) with DDPG-FC-350-R-PID [
4] is shown in
Table 9.
It is clear that proposed controller WOA-
-PI gives an excellent response in terms of rise and settling time with zero overshoot. WOA-
-PI reduced 94.81% rise time and decreased 95% settling time compared to DDPG-FC-350-R-PID, as plotted in
Figure 27. The other proposed controller GWO-TID-F reduced 92.76% rise time & decreased 89.50% settling time compared to DDPG-FC-350-R-PID with zero overshoot.
6. Conclusions & Future Work
In this work, the with PI and TID with filter (TID-F) are proposed control strategies for a ball and balancer system with ITAE as the objective function. The proposed controllers are optimized with CSA, GWO, GBO and WOA. The findings of this research are:
-PI is best tuned with WOA as compared other optimization algorithms like CSA, GWO, and GBO.
Optimal tuning of TID-F is achieved with GWO over other optimization algorithms like CSA, WOA, and GBO.
The WOA--PI and GWO-TID-F controller gives the best response in terms of settling time, rise time and overshoots then others PID, PI-D, PI-PD & -PD.
The proposed controller WOA--PI reduced 73.38% settling time, 88.16% rise time compared to classical-PID with zero overshoot
The proposed controller GWO-TID-F reduced 58.06% settling time, 26.96% rise time compared to classical-PID with zero overshoot
WOA-
-PI reduced 83.96% rise time and 68.94% settling time compared to SMS-PID [
3] with zero overshoot
GWO-TID-F reduced 51.06% settling time compared to SMS-PID [
3] with zero overshoot.
WOA-
-PI reduced 79.55% rise time and 70.35% settling time compared to CSMSEOBL-PID [
3] with zero overshoot.
GWO-TID-F reduced 53.28% settling time compared to CSMSEOBL-PID [
3] with zero overshoot.
WOA-
-PI reduced 94.81% rise time and 95% settling time compared to DDPG-FC-350-R-PID [
4] with zero overshoot.
GWO-TID-F reduced 92.76% rise time & 89.03% settling time compared to DDPG-FC-350-R-PID [
4] with zero overshoot.
As a result of this research study, it can be concluded that TID-F is best tuned with GWO, and that -PI is perfectly tuned with WOA. In comparison with related recent published work, GWO-TID-F and WOA--PI control schemes are robust and provide superior performance in terms of rising and settling times with zero overshoot with a ball and balancer system. The ball and balancer system likely aims to maintain stability while efficiently controlling the position or movement of the ball. Numerical improvements indicate better stability and enhanced performance of the proposed controllers compared to other methods. This is particularly important in applications where precise control is required, such as in robotics, manufacturing, or even in consumer electronics.
Controllers that exhibit numerical improvements may result in more energy-efficient systems. This is especially relevant in battery-powered devices or systems where minimizing energy usage is essential for prolonged operation. In real-world applications, especially those involving dynamic environments or interacting with external factors, a faster response time can be crucial. For example, in autonomous vehicles or robotic systems, quick and precise control responses are essential for avoiding obstacles or adapting to changing conditions. The ball and balancer system may encounter external disturbances or uncertainties. If the proposed controllers demonstrate numerical improvements in terms of robustness, it implies a better ability to handle disturbances and uncertainties. In practical applications, this robustness can be critical for ensuring reliable performance in varied and unpredictable environments.
Both control strategies provide excellent set point tracking. There are following few future recommendations: There may be room for further optimization of the controller parameters to improve its performance in specific scenarios and implemented to other under actuated systems. The -PI and TID-F controller can be hybridized with other metaheuristic algorithms such as the Teaching–Learning-Based optimization (TLBO), League Championship Algorithms (LCA), exchange market algorithm (EMA), seeker optimization algorithm (SOA) and social-based algorithm (SBA) etc., to solve complex control problems. Real-time implementation of the -PI and TID-F controller on embedded hardware platforms can be a future research direction to explore its efficacy in industrial automation systems.