1. Introduction
Most of the physical systems have nonlinear dynamics so that it could be difficult to model and control them compared to the linear ones. Understanding the nonlinearity and finding theoretical ways to overcome that challenge enabled technical improvements. We selected the inverted pendulum, which is one of the benchmark nonlinear problems in control theory, with its unstable, nonminimum phase and underactuated characteristics [Reference Boubaker1]. Since the inverted pendulum system (IPS) is easily influenced by the inner system and outer disturbances, it is regarded as a highly nonlinear and unstable platform. So that it is a suitable tool to apply nonlinear control methodologies on it, since those methodologies are used to implement many technological devices, [Reference Vigentini, Ghidelli and Martinelli2–Reference Zielinska, Rivera Coba and Ge4] virtual model-based remote control laboratories [Reference Benrejeb and Boubaker5–Reference Yao, Dai, Tian and Zhang9] and several biological examples [Reference Dini and Majd10]. Many practical problems in engineering need to be solved by a group of ordinary differential equations [Reference Boubaker and Iriarte11,Reference Ogata12]. People mostly researched to control the swing-up behaviour of inverted pendulums at the desired positions, [Reference Boubaker and Iriarte11,Reference Bradshaw and Shao13] but the stabilization [Reference Boubaker and Iriarte11] and tracking control of inverted pendulums are more crucial for real-life applications such as space vehicles and gait control on humanoid robots [Reference Dini and Majd10].
Although the inverted pendulum has a quite simple structure in its basic form, many standard techniques in control theory do not work when applied to an IPS. Because of the geometric properties and the changing stabilization points of fulcrum during the upright movement, the study of the system and building a control structure becomes more complex. There are various types of inverted pendulums in its geometric structure which allow kinds of interesting control challenges. We can list the pendulum types that were commonly studied on, such as the rotational single-arm pendulum, [Reference Boubaker1] the inverted pendulum on a cart [Reference Boubaker and Iriarte11,Reference Ogata12] with rotary and planar types, double [Reference Moysis14] and multiple-link types [Reference Furuta, Ochiai and Ono15–Reference Li, Miao and Wang17] and 3D or spherical types [Reference Shen, Sanyal, Chaturvedi, Bernstein and McClamroch18,Reference Sakka, Hayot and Lacouture19].
The basic inverted pendulum on a cart moving horizontally should keep its upright balance position due to an external force. The classical pendulum in a plane can be montaged in three different configurations that are the x type which moves in x horizontal direction, [Reference Ogata12] the x-y type that moves in x-y horizontal plane and the x-z type which is proposed by Maravall [Reference Maravall, Zhou and Alonso20,Reference Maravall, Tarn, Chen and Zhou21] moves in the x-z horizontal plane [Reference Wang22]. The control action destabilizes the pendulum due to a small angular deviation causing instability in the system. Regardless of the type, various control methods from basic to complex were developed and tested on the linear or nonlinear inverted pendulums for research and educational use [Reference Boubaker and Iriarte11]. The most used control method for the stability and robustness of IPs is the conventional proportional-integral-derivative (PID) control which enables the ease of use and efficiency. Linear quadratic regulator (LQR) is another popular classical method which enables optimally controlled feedback gains to the system for stabilizing its action [Reference Prasad, Tyagi and Gupta23]. People also used sliding mode control and model predictive control in order to balance the upright position and stabilize the cart system [Reference Dini and Majd10,Reference Rong-Jong and Li-Jung24–Reference Kalayci and Yiğit26]. With the invention of artificial intelligence-based methods, many of them have been tested on this nonlinear, underactuated IPS. Different types of fuzzy controllers, [Reference Marzi27–Reference Tao, Taur, Wang and Chen29] neural controllers [Reference Anderson30–Reference Daley and Liu33] and hybrid neuro-fuzzy controllers [Reference Maravall, Zhou and Alonso20] were used on the control of IPS. A general inference can be made about studied control approaches that the use of a linearized model may cause instability and poor closed-loop system response. On the other hand, energy-based methods with the application of the nonlinear control techniques are much complicated in theory and difficult to implement control algorithms. Fuzzy logic and neural control are easy to implement and fast iteration methods; however, they are not good at satisfying stability conditions. It is stated that optimal control and predictive control may produce quite well results but they may also suffer about stability in some cases. There are recently applied symbolic regression methods for the automatic synthesis of the stabilization system [Reference Ted Su, Samad, Omidvar and Elliott34,Reference Diveev and Shmalko35]. These symbolic regression methods are seemed as the further development of neural networks which can automate the process of synthesis of control systems. However, there are some limitations that should be solved like non-numerical search space and the absence of a metric on it, the high level programming and the absence of publicly available software packages.
Therefore, it is commonly accepted that the PID controller is still one of the simplest and easy to implement algorithm in the stabilization of IPs. Mainly, it has a simple structure, practical to apply, robust and cost-effective. However, tuning of PID parameters which give satisfactory response for an inverted pendulum is an important and difficult task. In recent years, different optimization methods which are very capable in solving many inverse problems are being used to obtain PID parameters. Optimization is an important step in solving the inverse problems. The parameters are found by a regularized data fitting approach which chooses an optimal model by minimizing an objective function [Reference Ye, Roosta-Khorasani, Cui, Wood, de Gier, Praeger and Tao36,Reference Dereli and Köker37].
Researchers compared recently popular metaheuristic algorithms like genetic algorithm (GA), [Reference Chakraborty, Mukherjee and Mukherjee38,Reference Gupta and Srivastava39] Ant Colony Optimization (ACO) and the particle swarm optimization (PSO) [Reference Bharadwaj, Babu and Rajasekar40–Reference Mousa, Ebrahim and Hassan44] with its various adaptations, and reasonably good results were obtained compared to the classical methods [Reference Valluru and Singh Chadli45–Reference Chegini, Bagheri and Najafi47]. Moreover, many new techniques are being used to tune PID parameters such as artificial bee colony algorithm, [Reference Yan and Li48,Reference Caraveo, Valdez and Castillo49] current search algorithm, [Reference Puangdownreong and Sukulin50] ant colony [Reference Jacknoon and Abido51] and harmony search algorithms [Reference Mohammed, Faycel and Rochdi52,Reference Arulanand and Dhara53].
Despite the diversity and the developments in metaheuristic approaches used with PID control, there is still place to improve the performance characteristics such as the stability and the robustness. As far as the authors searched, there is no work carried out on nonlinear x-z type IPS with an LSA-tuned PID controller. In this paper, a two DOF x and the x-z type IPSs are searched and the nonlinear control scheme is designed with the two different PID controllers. Based on Maravall’s pendulum design, [Reference Maravall, Zhou and Alonso20] the IP is regarded as a combination of the vertical force with the accompanying horizontal force emerging at the stabilization points for different constructions of the system. In ref. [Reference Maravall, Zhou and Alonso20], they used a simplified model with some approximations and applied hybrid fuzzy control in the stabilization of the inverted pendulum which provided a more flexible and intuitive way. The x-z inverted pendulum is more realistic and more versatile compared to the conventional inverted pendulum, for real-life designs. Additionally, stabilization and tracking control problems find more applications for itself than that of the swing-up control. This is the strong idea behind studying with the x-z inverted pendulum. Wang [Reference Wang22] has studied the x-z type inverted pendulum with various control methods. He used double and triple PID controllers for the stabilization and the tracking control of three types of inverted pendulums. In ref. [Reference Wang54], he implemented sliding mode control for an x-z type inverted pendulum and satisfactory well results were obtained. In another study by Wang and Kumbasar, [Reference Wang and Kumbasar55] a hierarchical sliding mode control with “big bang–big crunch” optimization is studied on an x-z type inverted pendulum. A performance comparison with PSO optimized sliding mode control is given, and the effectiveness of the proposed method is shown.
Therefore, the main contribution of this paper includes a new optimization scheme with a nature-inspired meta-heuristic algorithm for the optimal tuning of nonlinear PID (NL-PID) controller on an x-z type IP. The PID parameters are concurrently optimized via LSA instead of the classical and the PSO-tuned PID controller. The uncertain part of the system and the effect of the disturbances are taken into account. The simulation results validate the system response parameters based on the stabilizing effect, the settling time and the tracking performance. The simulation results show that this NL-PID controller optimized with LSA is ahead of previous methods as the feasibility and the effectiveness. The novelty of the study is in the kind of optimization method that was used and the efficiency proved in it: LSA algorithm is used to tune a NL-PID controller for a rarely used x-z type IPS.
This paper is constructed in the way that the Section 2 analyses mathematical modelling of IPS with control structure applied on it. In Section 3, nonlinear PID Controller design with Lightning Search Algorithm (LSA) is presented. Section 4 presents the simulation results of detailed LSA-supported nonlinear PID controller. Section 5 presents the conclusion.
2. Structure and Equations of Movement for Inverted Pendulum
In a classical inverted pendulum on a cart, the pendulum is free to fall along the cart’s axis of motion. The pendulum has a limited action in the vertical direction, whereas the cart has a limited action along the horizontal direction. A horizontally applied external force controls the pendulum’s angle while also controlling the position of the cart.
2.1 Structure and equations of movement for x-type inverted pendulum
The equations of motion for an x-type (Fig. 1(a)) inverted pendulum is obtained by applying Lagrange’s Equations to the pendulum system. The cart has a translational motion when the pendulum rotates around the pivot. The only actuation of the system is the external force exerted to the cart. The total kinetic and potential energies of the pendulum system is given in Eq. (1);
stating that, ${x_p} = x + l\sin (\theta )$ , ${z_p} = z + l\cos (\theta )\,$ . M, m are the masses of the pivot and the pendulum, respectively. l shows the distance between the pivot and the centre of mass of the pendulum. (x,z), ( $\dot x,\;\dot z$ ) and ( $\ddot x,\ddot z$ ) are the position, velocity and accelerations in the xoz coordinate (Fig. 1(a)). Moreover, ( ${x_p},{z_p})$ , $({\dot x^{}}_p,{\dot z^{}}_p)$ and $({\ddot x^{}}_p,{\ddot z^{}}_p)$ are the position, velocity and accelerations in the x’o’z’ (Fig. 1(b)). g is the gravity constant. The inertia of the pendulum is neglected.
Then L is defined as $L = T - V$ ,
After choosing x and $\theta $ as the generalized coordinates, the Lagrange’s equations become
Equations of motion of the system are obtained as (6)–(7).
${F_x}$ is the horizontal force. The final state equations are represented with (8)–(11);
Here, ${x_1} = x,{x_2} = \dot x,{x_3} = \theta ,{x_4} = \dot \theta ,{d_1} = {d_2} = 20\sin (20\pi t)$ , ${d_1}$ and ${d_2}$ are external disturbances.
2.2 Structure and equations of movement for x-type inverted pendulum
Maraval [Reference Maravall, Zhou and Alonso20] introduced the stabilization of an inverted pendulum by the combination of a horizontal force ${F_x}$ and a vertical force ${F_z}$ . In order to stabilize the IPS, a vertical force ${F_z}$ is applied to the system which enables a fast stabilization effect. The construction of ${F_z}$ producing effect is supported with the usual electrical cart of mass M that is depicted in Fig. 1(b). Maravall [Reference Maravall, Zhou and Alonso20] stated that the use of horizontal force can only be used as a feedback control action, whereas application of a single vertical force may lead the platform to free fall. Therefore, they proposed to use the horizontal and the vertical forces together.
By following the similar steps as in x-type inverted pendulum, we get the total kinetic and the potential energies of the x-z type pendulum system;
By applying $L = T - V$ ,
The Lagrange’s equations are given with (15)–(17).
The nonlinear equations of motion are depicted by Eqs. (18), (19) and (20)
The state equations are shown as,
where ${x_1} = x,{x_2} = \dot x,{x_3} = z,{x_4} = \dot z,{x_5} = \theta ,{x_6} = \dot \theta ,{d_1} = {d_1} = {d_3} = 20\sin (20\pi t)$ , ${d_1},{d_2}\,and\,{d_3}$ are external disturbances.
From the model equations obtained, it can be seen that the system has three states ${x_1},{x_3}\,$ and $\theta $ to be controlled and have only two direct control forces ${F_x}$ and ${F_z}$ which makes the system an extremely challenging problem. It is an underactuated two inputs and three outputs MIMO system so that it needs a very precise work to design an efficient controller for the control of every state (Fig. 6). Three PID controllers are necessary to be designed. The first PID controller (PID1) can adjust the controllable range of angle of the inverted pendulum. The second PID controller (PID2) is designed for the horizontal direction control. The third PID controller (PID3) can be used to control the vertical direction to assist the vertical control force [Reference Wang22].
3. Nonlinear PID Controller Design with Lightning Search Algorithm (LSA)
In a typical PID controller, the error between the output and the desired input is corrected and then a control signal $u$ is obtained which sets the output to the desired input. The error term is basically defined as
where r(t) shows the reference input and y(t) shows the output of the system. PID controller consists of three terms which take the error as an input and produce the control input $u(t)$ to the plant,
where the ${K_p}$ compensates for the current error and produces a response proportional with it. ${K_i}$ uses the past errors and tries to compensate for the steady state errors. ${K_d}$ produces an anticipatory response depending on the current rate of the change of the output. It is a rigorous task to tune the best parameter values of PID when the system is unstable. Moreover, the PID controller may not work well if there is a plant with changing working conditions.
For nonlinear system, Eq. (28) is not sufficient, where an error function is introduced by Su and Dong Sun [Reference Su and Dong Sun57] as in Eq. (29);
$\delta $ describes the linear range of the function $f$ showing nonlinear characteristics. The control signal u of a nonlinear PID is given as;
The function $f(e,\alpha ,\delta )$ shows the rate of error feedback. ${\alpha _p}\, \in \,\left[ {0,1} \right]$ is selected to compensate the nonlinearity of the system, ${\alpha _i}\, \in \,\left[ { - 1,0} \right]$ and ${\alpha _d}\, \gt \,0$ is selected to decrease the differential effect.
As a solution to these complex and time-consuming tuning problems, nonlinear PID controllers which are tuned with intelligent meta-heuristic approaches were proposed [Reference Valluru and Singh Chadli45,Reference Su and Dong Sun57]. These artificial intelligence methods became popular with their quick and precise responses. The NL-PID has the ability to quickly change its parameters over time based on the system error. They may offer an extra degree of freedom for better performance. There are many bio-inspired optimization methods in literature and new approaches continue to be developed. In every newly proposed metaheuristic algorithm, there is a difference about searching mechanisms, tuning mechanisms and decision mechanisms. They offer to lessen the system matrix eigenvalues. For example in PSO, some candidate population members with lower fitness are removed with higher probability which affects the duration of the run, [Reference Gupta and Srivastava39,Reference Banks, Vincent and Anyakoha41,Reference Banks, Vincent and Anyakoha42] whereas the Genetic algorithm is regarded as omnidirectional [Reference Chakraborty, Mukherjee and Mukherjee38,Reference Gupta and Srivastava39]. We tested a newly developed Lightning Search Algorithm as a tool to tune nonlinear PID parameters on an x-z type inverted pendulum and the responses of the simulated model are observed to be optimum which are depicted as bold on the following tables.
3.1. Lightning Search Algorithm (LSA)
LSA is a recently developed optimization algorithm [Reference Shareef, Ibrahim and Mutlag58] that is efficiently used in many different field problems. In ref. [Reference Asvany, Amudhavel and Sujatha59], LSA is used for solving coverage problems in wireless sensor networks which produced highly productive results. In a comprehensive survey study on LSA, [Reference Abualigah, Elaziz, Hussien, Alsalibi, Jalali and Gandomi60] two of the benchmark engineering problems which are Pressure vessel and Tension/compression spring design problems are evaluated to present the performance of LSA comparing with commonly used optimization methods in the literature. In ref. [Reference Sarker, Mohamed, Saad and Mohamed61], LSA is used to enhance the piezoelectric energy harvesting system converter (PEHSC) using the dSPACE DS1104 controller board as the proportional integral voltage controller. In a recent study on position control of a servomechanism, an LSA-tuned fractional order PID controller is presented with a successful performance [Reference Gao, Zhao and Zhang62].
LSA mimics the travel of the projectile ejected from the thunder cell which turns into the step leader forming a channel. The projectile represents the initial population size. The final solution refers to the tip of the current step leader’s energy ${E_c}$ . LSA is a kind of step leader approach but it consists of binary tree structure of the step leader. Therefore, two leader tips at fork points enables a fast decision status compared to the classical step leader techniques. It is considered that the main discrimination of the LSA lies in the forking mechanism and the channel elimination procedure.
The search process is managed by the fast particles known as projectiles. The initial velocity of a projectile is given as,
where Vp is current velocity of the projectile; Vo is the primary acceleration of the projectile; ${\alpha _i}$ is the ionization rate, c is the light speed; m is the mass of the projectile; and p is the length of the path travelled. Velocity in Eq. (31) is a function of leader tip position and projectile mass. Therefore, ionization or the exploring path largely depends to this factors that can be controlled by using the relative energies of the step leaders.
There are three types of projectiles which are transition, space and lead projectiles. The transition projectile actuates the population of solutions. The space projectiles explore and lead projectiles exploit at the step leader for the optimum solution or leader of the initial population.
The probability density function (PDF) of transition projectile f(x T )is given as
where ${x_T}$ is the initial tip energy ${E_{sl,i}}$ of the step leader $sl,i$ defined by a random number. a and b are the lower and upper bounds of the solution space.
The position of the space projectile ${p_s}$ can be partially modelled by a random number with the exponential distribution having a shaping parameter $D$ . The PDF of an exponential distribution is
Here, $D$ is the distance between the lead projectile ${p^L}$ and the previous projectile $p_S^i$ .
The PDF of the best solution projectile x L
Here, $\nu $ is the shape parameter and $\sigma $ is the scale parameter.
In each iteration, this projectile is updated as
by generating a normal random number between the selected parameters. $p_{new}^L$ is the new position of the pilot projectile. In order to guarantee the propagation of the step leader, the energy of the lead projectile should be greater than the previous step leaders.
The systematic flow of the LSA method can be seen in ref. [Reference Shareef, Ibrahim and Mutlag58]. Apart from the conventional optimization algorithms, LSA uses the exponential random behaviour of the space projectile. The simultaneous creation of two leader tips at fork points using opposition theory enables a higher performance, whereas the major exploitation process is managed by the lead projectile with a normal random search [Reference Shareef, Ibrahim and Mutlag58]. The channel time is another superiority of the LSA method.
Based on the flowchart in ref. [Reference Shareef, Ibrahim and Mutlag58], the LSA pseudo code to tune NL-PID controllers for IPS is summarized as follows:
The main purpose of using LSA in this problem is to get optimal control parameters of the NL-PID controller which is responsible for stabilization and tracking control of the x-z pendulum as compared to other optimization techniques. Finding the optimal parameters would lead to fine tuning of the PID controller and simultaneously improvement in the transient as well as steady state response of the system under consideration.
A general block diagram of the LSA-based NL-PID control approach is shown in Fig. 2. Initially, LSA algorithm assigns ${K_p},{K_i},{K_d}$ values and computes the cost function and continuously update the controller parameters ${\alpha _p},{\alpha _i},{\alpha _d}$ until the objective functions are optimized. The optimization algorithm is set to satisfy the specific performance criterion which is defined by an objective or cost function. The cost function is determined for different ranges of maximum overshoot and tracking errors, and then, the optimum control parameters ${K_p},{K_i}$ and ${K_d}$ were searched with the three different algorithms to minimize the cost function. Several objective functions have been proposed in the literature to optimize the response of the controlled system, some of which are integral of absolute Error (IAE), Integral of Time Absolute Error (ITAE), Integral of Squared Error (ISE), Integral of Time Squared Error (ITSE) and Mean squared error (MSE). ITAE is a commonly preferred tuning criterion which is used to obtain PID controller parameters that penalizes long-duration transients. We have tried some of these algorithms and have seen that ITAE performance index is much more selective than the IAE or the ISE. The minimum value of its integral is much more definable as the system parameters are varied. The ITAE performance index is mathematically given by :
where t is the time and e(t) is the difference between set point and the controlled variable. LSA and the PSO are employed for adjusting their control parameters with respect to the proposed cost function. In this study, a composite objective optimization for LSA and PSO-based PID controllers are obtained by summing values of the three mentioned objective functions through the following sum method by Eq. (39) given in Table IV.
4. Simulation Results
We simulated the dynamic behaviour of the IP system in Matlab/Simulink environment. Matlab ODE45 numerical solution method is used for the solution of equations. All of the selected parameters are given in Table I. For the simulations, some assumptions must be made. The friction of the surfaces is neglected. The system is simulated by using the nonlinear Eqs. (7)–(9) and (18)–(20). We built an optimal NL-PID controller that stabilizes the pendulum angle at its upright position due to the changing initial conditions. In order to show the effectiveness of the NL-PID controllers, we have given the simulation results of the stabilization control and the tracking control results compared with the PSO and literature for different conditions in the following part. The simulations were implemented in MATLAB 2018b, Win_64, on an Intel Core i5 Processor, 2.8 GHz speed and 8 GB RAM.
4.1. Stabilization of NL-IP
4.1.1. x-type IP control
The controller design for x-type inverted pendulum is done in two ways. The first application consists of designing single PID controller for the angle control of the pendulum. The control structure of x inverted pendulum with PID1 controller is given in Fig. 3(a). The initial angle position is set to 0.5 rad. The system was simulated first without disturbance, then an outer disturbance of ${d_1}$ as $20\sin (20\pi t)$ was applied. The tuning ranges of the parameters such as the size, the dimension, the mutation rate and the selection rate of the population, and the maximum iteration size of the algorithms for finding the best optimizing tuning parameters are given in Table II. In Table III, PID1 controller gain parameters of the all three applied algorithms are given. Any little change on the parameters of the controller may affect the pendulum angle and cart position simultaneously. The second application contains double PID controllers fed to the systems separately. Double PID controller design is depicted in Fig. 3(b). In a double PID controller case, the first PID1 controller works for the angle $(\theta )$ control and the second PID2 controller is used to stabilize the horizontal movement x.
The results of the simulations for x-type inverted pendulum with single PID controller without and with disturbance are given in Fig. 4(a)–(b). From the figures, it is observed that better stabilization performances in settling times and overshoot were achieved with LSA and PSO than the ref. [Reference Wang22]. Moreover, LSA is slightly ahead of PSO in settling times (Table V).
In the double PID case, Fig. 5(a)–(d) show the simulation results without and with disturbance for the $(\theta )$ and the $x$ . The simulations parameters can be seen in Tables II–IV. We set d 1 = d 2 as $20\sin (20\pi t)$ . From the simulation results in Fig. 5(a)–(b), we can see that the metaheuristic method-based PID have better stabilization performance with the minimum overshoot so that the system is stabilized in a quick and robust way. Moreover, the settling time of LSA is the best one with 1.039213 s for the angle and 2.547588 s for the x position (Table VI). In case of disturbance with $20\sin (20\pi t)$ , the metaheuristic algorithms enabled a better performance than the regular adjusted PID parameters ref. [Reference Wang22]. They have better smoothing ability. LSA is the quickest method and has the best smoothing ability which is indicated in Tables V and VI.
4.1.2. x-z type IP control
The x-z type IP is controlled with three PID controllers. We added an extra PID block rather than the first two PID blocks, to control the position for the z-axis. PID1 and PID2 do not change much, and the parameters of PID3 controller are also optimized by metaheuristic approaches. The structure of three PID design is given in Fig. 6.
Figure 7(a)–(f) shows the angular and position changes by LSA, PSO and ref. [Reference Wang22] with the three PID controllers. The response parameters maximum overshoot and settling time for theta are shown in Table V and for x and z positions are given Table VI. It can be inferred from Fig. 7(a)–(b) that, for controlling the theta, LSA-tuned controller produces the fastest stabilizing effect with 0.980516 s for the no disturbed situation and. 2.863364 s in case of disturbance. Ref. [Reference Wang22] has less overshoot but its settling time is longer than LSA and PSO. In case of horizontal movement control (Fig. 7(c)–(d)), LSA is the quickest method that settles the system. The overshoot values of PSO and LSA are very close to each other and better than ref. [Reference Wang22]. In case of vertical movement control (Fig. 7(e)–(f)), LSA has the quickest response and the minimum overshoot.
4.2. Tracking control of NL-IP
In this part, the tracking control performances are given for two PID and three PID designs. In Fig. 8(a)–(d), the tracking control and tracking errors of the x inverted pendulum with two PID controllers are given. The reference signal is ${x_d} = 0.3\sin (0.05\pi t)$ . The outer disturbances ${d_1}$ and ${d_2}$ are as $20\sin (20\pi t)$ . ${x_d}$ is the reference signal of ${x_{}}$ , ${z_d}$ is the reference signal of $z$ . ${e_x} = {x_d} - x$ is the horizontal control error, ${e_z} = {z_d} - z$ is the vertical control error. From the simulation results in Fig. 8(a)–(d), we can see that the LSA-tuned x-inverted pendulum with PID1 and PID2 have better tracking performance and more robustness than the PSO and ref. [Reference Wang22]. All of the tracking performance results are given in Table VII.
In Fig. 9(a)–(d), the tracking control of x-z inverted pendulum with three PID controllers for the x position is given. The reference signals are selected as follows: ${x_d} = 0.25\sin (0.05\pi t)$ and ${z_d} = 0.15\sin (0.05\pi t)$ . The outer disturbances ${d_1},{d_2}$ and ${d_3}$ are selected as $20\sin (20\pi t)$ . A good tracking performance of x-z inverted pendulum is obtained. Although the response values are so close to each other, minimum tracking errors are and the minimum settling times are obtained with LSA algorithm (Table VII) for the cases with and without disturbance.
In Fig. 10(a)–(d), the tracking control of x-z inverted pendulum with three PID controllers for the z position is given. It can be seen that three PIDs can realize tracking of x-z inverted pendulum with the minimum error. Minimum tracking errors and the minimum settling times are obtained by using the LSA-tuned PID controller.
In general, from the simulation results in Figs. 8, 9 and 10, we can see that the LSA-tuned x-z inverted pendulum have good tracking ability in the horizontal and vertical space. The figures show that the x-z inverted pendulum not only can track the reference curves in the horizontal and vertical space but also have robustness to slight and medium outer disturbances. This is very important for many practical realization of control systems.
4.3. Evaluation of optimization algorithms
Based on the selected population size and maximum iteration for each optimization technique, the fitness values are presented in Fig. 11. The minimum objective function value (Best Value) and elapsed time in optimizations are shown in Table VIII. This figure shows the convergence trajectory of LSA and PSO. Based on the convergence curves, we can observe that PSO has a faster convergence with single PID controller. LSA converges fast with double PID and in the case of three PID controller both algorithms perform well. Solver times for PSO are shorter than the times for LSA. The reason is, PSO has a single operator for the velocity calculation which shortens the computation time. Although the computation time of PSO is less for convergence, the parameters of LSA-tuned PID controller performs better than PSO in stabilization and tracking performance of inverted pendulum which is very important for precise engineering applications.
We have obtained reasonable results with LSA compared to the existing literature. This is due to the LSA’s space projectile selection which uses the exponential random behaviour. The following issues can be considered for future studies. The metaheuristic algorithms have a quick response for the linear system problems, whereas the response time gets longer for nonlinear systems. For this reason, we need algorithms that are independent from the population size and the iteration number. In real-world engineering problems, several different sources of the disturbances may arise. Further studies may be conducted, taking into account various real requirements.
5. Conclusions
Inverted pendulum studies occupy a huge place in control systems literature; however, there is still place to improve the performance characteristics such as the stability and the robustness. This study searched for the application of a new type metaheuristic algorithm LSA that is used to tune a nonlinear PID controller on the x-z type IPS. The results of the system were compared with the well-known PSO algorithm and a previous study from the literature [Reference Wang22]. According to the simulation results, the LSA-tuned PID controller produced minimum overshoot and optimal system performance with the time taken for the instability to settle in all the cases as compared to the results with PSO-tuned PID and the conventional tuning. Hence, it can be considered that the LSA improves the optimal system performance of the PID controllers satisfactorily. Furthermore, these findings can be useful for researchers to apply the advantages of LSA to the complex industrial and any real-world problems such as the humanoid robot or the gait robot studies.
Author Contributions
NGÖ conceived and designed the study. MM conducted data gathering and statistical analyses. NGÖ wrote the article and supervised the study.
Conflicts of Interest
None.
Financial Support
This research did not receive any specific grant from funding agencies in the public, commercial or not-for-profit sectors.