You are on page 1of 17

International Journal of Parallel, Emergent and

Distributed Systems

ISSN: (Print) (Online) Journal homepage: https://www.tandfonline.com/loi/gpaa20

Position control of a ball balancer system using


Particle Swarm Optimization, BAT and Flower
Pollination Algorithm

Ajit Kumar Sharma & Bharat Bhushan

To cite this article: Ajit Kumar Sharma & Bharat Bhushan (2023) Position control of a ball
balancer system using Particle Swarm Optimization, BAT and Flower Pollination Algorithm,
International Journal of Parallel, Emergent and Distributed Systems, 38:3, 213-228, DOI:
10.1080/17445760.2023.2190972

To link to this article: https://doi.org/10.1080/17445760.2023.2190972

Published online: 19 Mar 2023.

Submit your article to this journal

Article views: 83

View related articles

View Crossmark data

Full Terms & Conditions of access and use can be found at


https://www.tandfonline.com/action/journalInformation?journalCode=gpaa20
INTERNATIONAL JOURNAL OF PARALLEL, EMERGENT AND DISTRIBUTED SYSTEMS
2023, VOL. 38, NO. 3, 213–228
https://doi.org/10.1080/17445760.2023.2190972

RESEARCH ARTICLE

Position control of a ball balancer system using Particle Swarm


Optimization, BAT and Flower Pollination Algorithm
Ajit Kumar Sharma and Bharat Bhushan
Department of Electrical Engineering, Delhi Technological University, Delhi, India

ABSTRACT ARTICLE HISTORY


The design and control of the 2DoF Ball Balancer system is presented in Received 7 April 2022
this work. The ball balancer is a feedback-based underactuated system that Accepted 10 March 2023
is nonlinear, multivariate, and electromechanical. The proportional deriva- KEYWORDS
tive (PD) controller is optimized by using Bat Algorithm, Particle Swarm Ball balancer system; Bat
Optimization, and Flower Pollination Algorithm in this research. By regu- Algorithms (BA); Particle
lating the plate inclination angle, the suggested controller accomplishes Swarm Optimization (PSO);
self-balancing control for a ball on the plate. The modelling of the ball Flower Pollination Algorithm
balancer system is accomplished using a 2DoF ball balancer system. In (FPA); proportional derivative
addition, Bat Algorithms, Particle Swarm Optimization, and the Flower Pol- controller
lination Algorithm are used to analyze the state of a process autonomously.
The system’s model is created using MATLAB/Simulink approaches, and the
results present the system with a steady and controllable output for ball
balancing and plate angle control.
Graphical abstract
The author control the position of the ball balancer by using the PD con-
troller and optimized the parameter of the controller through FPA, BA, and
PSO.

1. Introduction
Nonlinear systems with underactuated actuators are approximated with intelligent-control and
autonomous decision development methods [1]. They arose in a variety of contexts [2] and were
attempted in a variety of ways. Researchers have investigated the behaviour of numerous controllers
aiming at achieving self-balancing control and steady-state operation because of the structural com-
plexity of these systems. The inverted pendulum [3], the twin-rotor-multi-input–multi-output system
(TRMS) [4], the ball & beam system [5], the hovercraft [6], the furuta pendulum [7], and the ball &

CONTACT Ajit Kumar Sharma sharmaajit01@gmail.com Department of Electrical Engineering, Delhi Technological
University, Delhi, India

© 2023 Informa UK Limited, trading as Taylor & Francis Group


214 A. K. SHARMA AND B. BHUSHAN

plate system [8] are all used as benchmark examples in the majority of the studies. In general, lin-
ear controllers make closed-loop control for such systems simple to implement [9], but their complex
nonlinear dynamics limit the control rules for all generalized applications. This gained the atten-
tion of a number of nonlinear control techniques [10], but these controllers have difficulties when
it comes to dealing with external load and lagging caused by additional feedback. The literature has
developed feedback-linearization [11] and partial feedback-linearization [12] for mechanically under-
actuated systems in order to satisfy these needs. However, challenges arising from a lack of resilience
have limited their use in a variety of disciplines. In addition, [13] proposes a passivity-based con-
trol at the selected equilibrium point, proposed a strategy for passivating the system with a storage
function. With differential feedback, this has the drawback of being unable to magnify measurement
noises. These drawbacks also prevented the successful development of a control mechanism capable
of achieving steady-state operation. These objectives are met by exemplifying the position control
and path tracking for an underactuated ball and plate benchmark problem in this study. Different
proportional–integral–derivative (PID) controller-based approaches for system control on a point-
to-point basis have previously been investigated [1415]. Disturbance rejection controllers [16] and
different optimization algorithms [17] are also used to demonstrate the desired tracking performance
for the ball and plate systems. Sliding mode control has been extensively explored for achieving self-
balancing control [18], as well as the development of fractional-order sliding mode control [19] to
eliminate the chattering phenomenon of classic SMC with greater efficiency [20]. Because of their
advantages with time-varying reference systems, model predictive controllers were often utilised with
ball balancer systems [21]. The fundamental problem of these classic approaches, however is that they
produce a long settling time and peak overshoot. In addition to self-balancing control, hybrid and
intelligent controllers such as fuzzy [22], fuzzy cerebellar model articulation controller [23], and par-
ticle swarm optimization-based fuzzy-neural controller [24] are utilized to control the position and
trajectory of the ball and plate system. The PID controller is widely utilised in practical engineering
applications, despite the fact that there are various control algorithms for establishing self-balancing
control with balancer systems in the literature. The PID controller provides a number of benefits,
including a simple design, high dependability, and exceptional stability. On the other hand, traditional
PID controllers have a severe problem with parameter tuning.
In many engineering and industrial design applications, we must try to discover the best solution
to a problem while dealing with exceedingly complex limitations. Such limited optimization prob-
lems are frequently highly nonlinear, and finding the best solution can be time-consuming. For issues
involving nonlinearity and multimodality, traditional optimization does not produce good solutions.
To solve such tough problems, the current tendency is to use nature-inspired metaheuristic algo-
rithms, which have been demonstrated to be unexpectedly efficient. As a result, the metaheuristics
literature has grown dramatically in the recent two decades [25–28]. Researchers have only used a
few natural properties so far, and there is still room for more algorithm improvement. There are a vari-
ety of strategies for tweaking PID parameters that may be found in the literature. Various intelligent
approaches, such as fuzzy [29] neural network [30] self-tuning algorithms [31] genetic [32] and evo-
lutionary algorithms [33] are used in these techniques. On the other hand, these strategies strive to
retain superior generations, resulting in a local rather than global optimum. Furthermore, issues with
intelligent controller weight adjustment, low memory, premature convergence, weak local search, and
high computational effort for genetic and other evolutionary algorithms have led to the development
of an optimal multi-objective approach for solving combinatorial optimization problems [34,35], such
as Particle Swarm Optimization (PSO), BAT Algorithm (BA), and Flower Pollination Algorithm (FPA).
To construct a nonlinear algorithm that can try to address multimodal optimization difficulties, the
attraction mechanism was integrated with light intensity fluctuations. Swarm Intelligence (SI) refers
to a type of interpretive capability that appears in processing unit communication [36]. Where the
theory of intelligence indicates that the analytical ability is successful in some ways [37,38], the theory
of swarm describes stochastic manner, multiplicity, messiness, and unpredictability. SI is inspired by
human behaviour as well as insects such as termites, ants, wasps, and bees, as well as other social
INTERNATIONAL JOURNAL OF PARALLEL, EMERGENT AND DISTRIBUTED SYSTEMS 215

animal groupings such as flocks of birds and schools of fish [39,40]. Individuals in the swarm can
be described as simple solutions, yet they have a strong ability to work together to solve complex
non-linear problems [41].
PSO was established in 1995 by Kenndy and Eberhart for the purpose of training neural networks
and solving non-linear optimization issues. Human cognition of natural behaviour, such as how human
learning is influenced by their surroundings, how they interact with others, and how they encode their
patterns into their learning methods, are simple findings in PSO. PSO uses this learning phenomenon
to find an optimal solution. PSO has become increasingly natural for dealing with non-linear complex
optimization problems, especially in a wide range of fields. A swarm in PSO is a population of vector
solutions that is probing new search areas while hunting for food, resembling the evolution of a school
of fish. To find the global optimum, all particles in the swarm translate information and follow each
other’s best experiences as well as their own past best experiences [42]. Each particle must adhere to
the basic rule of determining the location of its prior best or neighbour.
Researchers have developed a novel data clustering technique (named FPAB) that simulates flower
pollination by bees [43]. Following that, a flower pollination algorithm (FPA) was devised, which resem-
bles a broader notion of the flower reproduction process [44]. Due to its effective application to
real-world problems, FPA has recently gained a lot of attention. The FPA has been utilised to manage a
range of optimization problems in a variety of real-world scenarios due to its efficiency and versatility.
Xin-She Yang created the bat algorithm (BA) in 2010, based on the echolocation features of micro-
bats [25]. During foraging, BA employs frequency tuning in conjunction with changes in loudness
and pulse emission rates. All of these algorithms can be categorized as swarm intelligence heuristic
algorithms since they optimise social interactions and biologically inspired rules [26,27].
In this paper, the authors present simulation findings of controllers on the control of a ball bal-
ancer. Due to its inherent complexity, the ball balancer system faces issues such as (1) balancing the
ball on a plate and (2) point stabilisation control, which allows the ball to be moved to a precise loca-
tion and held there while minimising tracking error and time. This study contributes to mathematical
modelling, optimal parameter selection, and exemplary controller design for the ball balancer system
to solve the existing issues. The concept of using metaheuristic algorithms to control a ball balancer
system is a new one. The goal of this study is to compare several metaheuristics control strategies
used on a ball balancer. The focus of the article is on utilising Simulink to develop and implement con-
trollers for ball balancer setup. Adapting a metaheuristics algorithm for optimising controllers proved
to be an innovative adaptation, as evidenced by the Ball Balancer findings. Finally, the comparison is
performed using various control algorithms. The remainder of the paper is divided into the following
sections: The ball balancer setup modelling and its operating phenomenon are described in Section II.
The third section deals with the algorithms used for observing the ball’s position on the plate. The
results of comparative simulations are presented in Section 4 to verify the proposed methodology.
Finally, in Section 5, the conclusion is presented, followed by references.

2. 2 DOF ball balancer model


A ball balancer is a typical benchmark problem for achieving, balancing control, ball position tracking,
and visual servo control. The goal of creating a controller for a two-degree-of-freedom ball balancer
is to keep the ball in place on the balance plate. This requires controlling the position of the rotating
servos linked to the plate’s bottom using the X-Y position of the ball as measured by the overhead
camera. A ball and plate mechanism is depicted schematically in Figure 1.
The 2 DOF Ball Balancer module comprises a free-moving plate on which a ball can be placed. Two
DOF gimbals connect two actuation units to the sides of the plate. The plate can be rotated in both the
X- and Y-axis directions. The servo motors are wired together in actuating units, which are controlled
by a potentiometer. To balance the ball at a specific planar position, the tilt angle of the plate can be
adjusted by adjusting the position of the servo load gears. The Faulhaber series DC micromotor [45] is
utilised to balance the system in both directions using the rotational motion of the plate.
216 A. K. SHARMA AND B. BHUSHAN

Figure 1. Schematic representation of ball and plate system.

Figure 2. 2 DOF ball balancer free body diagram.

2.1. Mathematical modeling of ball balancer


The dynamics of each axis are considered to be the same in the 2 DOF Ball Balancer, which uses two
symmetrical servo motor units. With the premise that the angle of the x-axis servo solely effects ball
motion in the x direction, the 2 DOF Ball Balancer is represented as two de-coupled ‘ball and beam’
systems. The equation of motion represents the ball’s motion along the x-axis in relation to the plate
angle. The free body diagram of the Ball and Beam system is shown in Figure 2.
A positive voltage servo motor rotates the gear in the positive direction, causing the beam to rise
and the ball to roll in the positive direction. The forces exerted on the ball as it goes down the beam
will be, according to Newton’s first law of motion:

mball ẍ(t) = F x,t − F x,r (1)

where mball is the ball’s mass, x(t) is its displacement, F x,r is its inertia force, and F x,t is its gravita-
tional translational force. When the momentum force and gravitational force are both equal, the ball
is considered to be in equilibrium.
The ball inertia force F x,r is given as:

F x,r = mball g sin α beam (2)


INTERNATIONAL JOURNAL OF PARALLEL, EMERGENT AND DISTRIBUTED SYSTEMS 217

And gravitational translational force F x,t is equal to,

Jball ẍ(t)
F x,t = (3)
r2 ball

The non linear equation of motion of ball beam is given as.

Jball ẍ(t)
mball ẍ(t) = mball g sin α beam − (4)
r2 ball

The acceleration is given as


mball g sin α beam r2 ball
ẍ(t) = (5)
mball r2 ball + Jball
The beam angle α, is affected by the position of the ball on the plate, which is further influenced by
the servo gear angle. The following is the relationship between gear angle and beam angle:

sin α beam lplate


sin θ gear =
2rarm

The nonlinear equation for ball motion in terms of gear angle is:

2mball grarmr2 ball


ẍ(t) = sin θ gear (6)
lplate (mball r2 ball + Jball )

At zero angle the linearized equation of motion of the ball is given as –

2mball grarmr2 ball


ẍ(t) = θ gear (7)
lplate (mball r2 ball + Jball )

In addition, the transfer function for controlling ball position for input θ gear and output x is as follows:

x(s) Kb
Sb (s) = = 2 (8)
θ gear (s) s

2mball grarmr2
where, K b = ball
lplate (mball r2 ball +Jball )
Similarly, the servo motor’s control of plate angle is expressed as a transfer function.

θ gear Kg
Ss (s) = = (9)
V m (s) s(1 + sτ )

The overall transfer function of the servo motor and ball balancer module cascaded connection is as
follows:
x(s) K bK g
S(s) = Ss (s)Sb (s) = = 3 (10)
V m (s) s (1 + sτ )
The state-space representation of the above equation is given as,
⎡ ⎤
⎡ ⎤ ⎡ ⎤⎡ ⎤ 0
ẋ(t) 0 1 0 0 x(t) ⎢ ⎥
⎢ ẍ(t) ⎥ ⎢0 Kb 0 ⎥ ⎢ ⎥ ⎢ 0 ⎥
⎢ ⎥ ⎢ 0 ⎥ ⎢ ẋ(t) ⎥ + ⎢ 0 ⎥ u(t)
⎣θ̇ gear (t)⎦ = ⎣0 0 0 1 ⎦ ⎣θ gear (t)⎦ ⎢ ⎥
⎣K K ⎦
θ̈ gear (t) 0 0 0 −1/τ θ̇ gear (t) b g
τ
218 A. K. SHARMA AND B. BHUSHAN

Figure 3. Block diagram of closed loop ball balancer system.

Figure 4. PID compensator with derivative set point weight.

3. Designing structure of ball balancing controller


Figure 3 shows the SRV02’s x-axis control model, which is combined with the ball balancer mecha-
nism. The ball balancer block diagram depicts two loops of control. The SRV02 motor model is the first
loop, and the 1D ball balancer is the second loop. The inner loop’s goal is to control the servo motor’s
position and estimate the voltage in order to calculate the load’s desired angle.
The following optimization strategies were developed and tested for the PD controller to balance
and regulate the ball balancer system:

• BAT Algorithm (BA)


• Particle Swarm Optimization (PSO) Algorithm
• Flower Pollination Algorithm (FPO)

In order to calculate the initial operating gains, the 1DBB controller must be represented as a PID
controller in the time domain.
 
d d
θ gear,d (t) = Kp,dbb (xd (t) − x(t)) + Kd,dbb hsd xd (t) − x(t) + Ki,dbb (xd (t) − x(t))d(t)
dt dt
(11)
where, K p,dbb , K d,dbb and K i,dbb is proportional gain, derivative gain and velocity gain respectively. hsd
is a velocity weight parameter that is included by a controller to compensate for the derivative error
as shown in Figure 4.
The closed-loop equation of outer loop system when servo dynamics are neglected of a ball
balancer.

K i,dbb
θ gear (s) = K p,dbb + (x d (s) − x(s)) + K d,dbb s(hsd x d (s) − x(s)) (12)
s
INTERNATIONAL JOURNAL OF PARALLEL, EMERGENT AND DISTRIBUTED SYSTEMS 219

when the ball rotates along x-axis of the plate, the estimated and needed gear load are equal
(θ gear,d = θ gear ), substituting the outer loop controller with the one-dimensional ball balancer system
yields the closed-loop equation as follows:

x(s) K ball (K p,dbb s + K i,dbb + K d,dbb s2 hsd )


= 3 (13)
x d (s) s + K bb K p,dbb s + K bb K i,dbb + K bb K d,dbb s2

where, K ball is a ball balancer constant.


To calculate the PID constant, the third order prototype equation is given as:

(s2 + 2ζ ωn s + ωn 2 )(s + p0 ) (14)

where ωn is the system’s natural frequency, ζ is the damping ratio, and p0 is the pole location.
The above third-order characteristic equation becomes

s3 + (2ζ ωn s + p0 )s2 + (ωn 2 + 2ζ ωn p0 )s + ωn 2 p0 (15)

The closed-loop equation’s third-order characteristic equation is:

s3 + K ball K p,dbb s + K ball K i,dbb + K ball K d,dbb s2 (16)

Equating equation no. (15) and (16), the following observations are made:

K ball K p,dbb = 2ζ ωn + p0

K ball K i,dbb = ωn 2 p0

K ball K d,dbb = ωn 2 + 2ζ ωn p0

Further, the PID control gains can be calculated as follows:

2ζ ωn s + p0
K p,dbb =
K ball

ωn 2 p0
K i,dbb =
K ball

ωn 2 + 2ζ ωn p0
K d,dbb =
K ball
To meet the specifications of proportional derivative gain, the pole location is adjusted at origin, i.e,
p0 = 0.
Hence the control gains of PD controller is given as:

2ζ ωn
K p,dbb =
K ball

ωn 2
K d,dbb =
K ball
220 A. K. SHARMA AND B. BHUSHAN

Figure 5. Flow chart of PSO algorithm with initial parameters.

3.1. Particle Swarm Optimization


Particle Swarm Optimization (PSO), often known as swarm intelligence, is a type of intelligence inspired
by flocks of birds [36]. Birds foraging for food and interacting with one another as they fly are both
optimization strategies.
The PSO is made up of a population of particles, each of which represents a possible solution to the
problem K p and K d in our situation. Each particle can be represented by an object having a position
INTERNATIONAL JOURNAL OF PARALLEL, EMERGENT AND DISTRIBUTED SYSTEMS 221

vector and a vector velocity, with the location relative to the search space and the velocity guiding the
particle position during the process execution (Figure 5).
The basic PSO algorithm consists of the equation of velocity and position, respectively:
v i (k + 1) = w.v i (k) + c1 r1 (pbesti − x i (k)) + c2 r2 (gbest − x i (k) (17)
x i (k + 1) = x i (k) + k.v i (k + 1) (18)
The population size is given by i = 1 . . . .n. pbest (personal best) and gbest (global best) are the best
positions achieved by a particle in a given position and the entire population in a given neighbour-
hood, respectively; w is the inertia constant; c1 is a social factor; c2 is the factor cognitive; r1 and r2 are
random numbers generated using a uniform distribution in the interval [0,1]; and t = 1. A social factor
of 1.2 and a cognitive factor of 0.12 were employed in the simulation findings. The inertia constant, w,
is set to 0.9. Figure 5 shows the flowchart of PSO with its initial parameters.

3.2. BAT algorithm


The Bat Algorithm is a metaheuristic based on some bat species’ night-flight echolocation technique.
A set of bats stored in the form of a vector, each representing a candidate solution, is generated in this
computational model. The goal is to go to the prey, which is the best approach for minimising the cost
function.
Initially, all n bats x i (i = 1, 2, . . . .n) are initialized with the following parameters: pulse rate ri veloc-
ity −
→v i = 0, amplitude Ai , frequency f i and position x i . For each instant the velocity and position are
updated, respectively. The steps of bat algorithim is discussed in flow chart in Figure 6.
j j j
v i (t) = v i (t − 1) + [x icgbest − x i (t − 1)]f i (19)
j j j
x i (t) = x i (t − 1) + v i (t) (20)
The variable β ∈ [0, 1] is a random number generated from a uniform distribution and is used to update
and weight f i ∈ [f min , f max ]. The variable x icgbest denotes the current global best solution for a decision
variable d, which is determined by comparing all of the solutions offered by n bats. In order to explore
the domain of candidate solutions to the problem, the algorithm executes a local search in the form
of a random walk: x new
i = x old
i + εm, where m is the mean of the amplitude of all bats at time t, and
ε is a random value derived from a uniform distribution. The algorithm comes to stop when ri hits
a predetermined minimum value or when the maximum number of iterations is reached, which are
known as stopping conditions. An amplitude of 0.5 and an initial pulse rate of 0.5 were used in this job.
At maximum and minimum frequencies, 2 and 0 are formed, respectively. The algorithm’s population
is similar to the PSO in that each bat represents a K p and K d .

3.3. Flower Pollination Algorithm


The Flower Pollination Algorithm (FPA) is a method for pollinating flowers that was proposed by [17].
Because pollinators may fly great distances, they are classified as global pollinators, and the Lévy prob-
ability distribution can be used to describe their behaviors. Two key rules govern the implementation
of the method utilizing the Lévy distribution: 1 – The direction of travel must be random. A uniform
distribution can be used to generate a direction; however, the creation of steps must follow the Lévy
distribution.
The following rules [17] were devised by Yang: 1 – Biotic pollination and crossover are regarded as
a global pollination process, with pollen transporters flying from Levy; 2 – Abiotic pollination and self-
pollination are called local pollination; 3 – Loyalty to a flower can be thought of as having a probability
of reproduction proportionate to the similarity of the two plants involved; 4 – Local and global polli-
nation are governed by a probability p ∈ [0, 1].Local pollination can play a substantial role in overall
pollination activities due to physical proximity and other factors such as wind.
222 A. K. SHARMA AND B. BHUSHAN

Figure 6. Flow chart of Bat Algorithm with initial parameters.


INTERNATIONAL JOURNAL OF PARALLEL, EMERGENT AND DISTRIBUTED SYSTEMS 223

The best individual represented by g∗ . The first rule, along with a flower’s loyalty, may be expressed
mathematically as x t+1i = x ti + L(x ti − g∗ ) where x ti is the pollen i in the vector of solutions x i at itera-
tion t, and L is the pollination strength, whose value is determined by the Lévy distribution. The insects
can move a long distance with just a few steps away, and this can mimic with a Lévy flight. That is L > 0
from a Lévy distribution.
λr(λ)sen(π λ/2) 1
L∼ (s  s0 > 0) (21)
π s+λ
where (λ) is the Gamma function and s0 a minimum step.
Local pollination (rule 2) and flower loyalty are represented by the equation x t+1
i = x ti + (x tj − x tk )
t t
where x j , x k are pollens from separate plants of the same species in the same iteration. This is similar
to a flower’s allegiance in a small neighbourhood. If x tj , x tk were of the same species or from the same
population, a tour local random walk (local random walk) would be created by selecting from a uni-
form distribution. To switch between undertaking global pollination and enhancing local pollination,
an exchange probability, or probability of closeness p, is employed according to rule 4. The reason for
this characteristic is that the majority of pollination actions are carried out by bees. It might happen
on a local or global level. In terms of practicality, flowers that are close by or not too far away from
the neighbourhood are more vulnerable to pollination than those that are farther away. p = 8 in this
article, and each flower represents a K p and K d . Figure 7 shows the algotithim of flower pollination.

4. Simulation analysis
The numerical simulation of the 2DoF ball balancer model described in Section 2 was created using
MATLAB/ Simulink software. The action of one servo unit’s controller has an impact on the action of
the second servo unit’s controller because the plate on the two servo units is symmetrical. Regardless
of the fact that both controllers are developed in a decoupled context, they operates them in a con-
nected environment. The technology is set up to manage the ball’s square trajectory on a plate. As the
reference trajectory, PD is used to control the ball balancer by providing it a square input signal with a
frequency of 0.08 Hz and an amplitude of 5 volt. The PD controller’s values are originally determined
using the method explained in Sect. 3.1. In addition, the parameters of the PD controller are optimised
using three different optimization methodologies (PSO, BA, and FPA), and the difference between the
desired and measured ball position is measured as shown in figure 8. The results of PSO, BA, and FPA
on the PD controller are compared to the action of the typical PD controller on the same simulation
running for the same trajectory to assess their performance.
It is identified that by measuring the error between the reference trajectory and captured ball posi-
tion coordinates, the plate angle can be controlled. Hence the choice of the objective function is to
optimize the operation of a controller which should base on the error between measured and desired
trajectories of the ball position. Generally, an error can be termed as an objective function by formulat-
ing it as an integral of the square, time, and absolute. All these functions express error as an objective
function by evaluating its integral over a fixed interval of time. The optimal solution is connected with
an objective function  J during the optimization process. Conventionally, the integral square error,
integral absolute error, and integral time absolute error were used for formulating the objective func-
tion. But due to its slow response and large oscillation time here we use time-weighted indices, integral
of squared time-multiplied square of the error (ISTSE) to improve error performance in optimization
of controller (Figure 8). The objective function  J is given as:
T
J= t2 e2 (t)dt (22)
o

Figure 9 contains a detailed description of the ball balancer system’s ball position, servo angle, and
voltage optimizations for PSO, BA, and FPA. Figure 9a presents the comparison of the PSO, BA, and
FPA algorithms for the ball’s position on the x-axis. The results demonstrate that the x-axis position of
224 A. K. SHARMA AND B. BHUSHAN

Figure 7. Flow chart of Flower Pollination Algorithm with initial parameters.


INTERNATIONAL JOURNAL OF PARALLEL, EMERGENT AND DISTRIBUTED SYSTEMS 225

Figure 8. Position Control using PSO, BA, FPA.

Table 1. Performance parameters for various control using PSO, BA and FPA on ball
balancer system using Simulink.
Controllers Peak time (tp) (s) Settling time (ts) (s) Peak overshoot (Mp) (%)
PSO 1.57 2.21 30.2
BA 1.45 2.178 25.1
FPA 1.43 2.16 20.8

the ball is within a defined range. As a result, the controller’s effectiveness is demonstrated by the least
difference between the initial and final positions. The FPA has a minimum final position and receives
the target value in a short amount of time in this case, then the BA algorithm delivers the minimum
position, and finally the PSO algorithm holds the minimum position. In addition, figure. 9b shows the
ball’s servo angle reaction on the x-axis, exhibiting the servo motor’s control angle fluctuation. The
minimum control angle determines a controller’s precision in achieving balancing control for a ball
balancer system. The FPA has a lower control angle than the BA and PSO controls in this circumstance,
but the BA provides a better result than the PSO. In the FPA algorithm, the plate moves slowly while
balancing the ball, which helps the system achieve a constant response. Figure 9c depicts the servo
input voltage fluctuation as a function of the controller action. The servo units for the FPA optimization
control are noted for running at a lower voltage and settling down earlier than the other controller.
Because the increased FPA achieves the smallest position control and balancing angle, the speed of
the servo motors is reduced to the smallest value possible, ensuring that the ball remains positioned
on the plate while following the appropriate path. As a result, the FPA performs better than the BA and
PSO when compared
In addition, time domain specifications are derived to examine the performance of PSO, BA, and FPA
approaches, with the results displayed in Table 1. The peak overshoot of PSO is 30.2 percent, causing
massive oscillations and making it impossible to balance the ball on the plate, according to the results.
In contrast, as seen in the graph, FPA has a good response to peak overshoot of 20.8 percent and
exhibits perfect ball-on-plate balance with less oscillation.
The integral of squared time-multiplied square of the error (ISTSE) value of PSO, BA, and FPA opti-
mizations is also determined during the operation of the ball balancer for square trajectory in terms of
ball position. The results are tabulated as shown in Table 2.
226 A. K. SHARMA AND B. BHUSHAN

Figure 9. A position of the ball on the x-axis, b servo angle response of ball on the x-axis, c input voltage applied to the servo motor
for the x-axis.

Table 2. Integral of squared time-


multiplied square of the error (ISTSE)
for position during simulation results.
ISTSE
Controller Ball position
PSO 45.337023
BA 45.446932
FPA 44.375275

PSO, BA, and FPA all produced outcomes that were near to one other when compared using the
ISTSE performance measure. The FPA, on the other hand, achieved a better outcome and provides
great position control of the ball on the plate in the ball balancer system.
INTERNATIONAL JOURNAL OF PARALLEL, EMERGENT AND DISTRIBUTED SYSTEMS 227

5. Conclusion
This work uses three different optimal strategies to set the parameters of proportional derivative
control to achieve self-balancing and position control of a two-degree-of-freedom balancer system:
PSO, BA, and FPA are three different types of PSO. Simulation findings show that the developed strat-
egy improves performance significantly within the context of the standard control structure. On the
basis of time response analysis, the outcomes of the established control approaches are validated.
On the ball balancer system, the provided controller has adaptability and good control performance.
According to the findings, the FPA optimised technique performs BA and PSO in terms of ISTSE, settling
time, peak time, and peak overshoot.

Disclosure statement
No potential conflict of interest was reported by the author(s).

ORCID
Ajit Kumar Sharma http://orcid.org/0000-0002-5678-7856

References
[1] Murray RM, Astrom KJ, Boyd SP, et al. Future directions in control in an information-rich word. IEEE Control Syst Mag.
2003;23:20–33. doi:10.1109/MCS.2003.1188769.
[2] Nelles O. Nonlinear system identification. Berlin, Heidelber: Springer; 2001.
[3] Boubaker O. The inverted pendulum: A fundamental benchmark in control theory and robotics. Int Conf Educ e-
Learning Innov. 2012.
[4] Chalupa P, Přikryl J, Novák J. Adaptive control of Twin ROTOR MIMO system. Proc 2015 20th Int Conf Process Control.
PC 2015. 2015: 314–319. doi:10.1109/PC.2015.7169982.
[5] Nowopolski K. Ball-and-beam laboratory system controlled by Simulink model through dedicated microcontrolled-
Matlab data exchange protocol. Comput Appl Electr Eng. 2013;11:310–320.
[6] Aranda J, Chaos D, Dormido-Canto S, et al. Benchmark control problems for a non-linear underactuated hovercraft:
A simulation laboratory for control testing. IFAC Proc. 2006;39:463–468. doi:10.3182/20060621-3-ES2905.00080
[7] Acosta JA. Furuta’s Pendulum: A conservative nonlinear model for theory and practise. Math Probl Eng. 2010;2010.
doi:10.1155/2010/742894.
[8] Awtar S, Bernard C, Boklund N, et al. Mechatronic design of a ball-on-plate balancing system. Mechatronics (Oxf).
2002;12:217–228. doi:10.1016/S0957-4158(01)00062-9.
[9] Aguilar-Avelar C, Moreno-Valenzuela J. New feedback linearization-based control for arm trajectory tracking of the
furuta pendulum. IEEE/ASME Trans Mechatronics. 2016;21:638–648. doi:10.1109/TMECH.2015.2485942.
[10] Rudra S, Barai RK, Maitra M. Block backstepping control of the underactuated mechanical systems. In: Block backstep-
ping design of nonlinear state feedback control Law for underactuated mechanical systems. Singapore : Springer
Singapore; 2007. p. 31–52.
[11] Moreno-Valenzuela J, Aguilar-Avelar C. Feedback Linearization Control of the Furuta Pendulum. Presented at the
(2018).
[12] Spong MW. Partial feedback linearization of underactuated mechanical systems. In: proceedings of IEEE/RSJ inter-
national conference on intelligent robots and systems (IROS’94). p. 314–321. IEEE.
[13] Ortega R, Spong MW, Gomez-Estern F, et al. Stabilization of a class of underactuated mechanical systems via intercon-
nection and damping assignment. IEEE Trans Automat Contr. 2002;47:1218–1233. doi:10.1109/TAC.2002.800770.
[14] Sun S, Li L. The study of ball and plate system based on non-linear PID. Appl Mech Mater. 2012;187:134–137.
doi:10.4028/www.scientific.net/AMM.187.134.
[15] Mochizuki S, Ichihara H. Generalized kalman-YakubovichPopov lemma based I-PD controller design for ball and plate
system. J Appl Math. 2013;2013:1–9. doi:10.1155/2013/854631.
[16] Pinagapani AK, Mani G, K R C, et al. Composite disturbance rejection control for ball balancer system. Procedia
Comput. Sci. 2018;133:124–133.
[17] Ali HI, Jassim HM, Hasan. Optimal nonlinear model reference controller design for ball and plate system. Arab J Sci
Eng. 2019;44:6757–6768. doi:10.1007/s13369-018-3616-1.
[18] Bang H, Lee. Implementation of a ball and plate control system using sliding mode control. IEEE Access.
2018;6:32401–32408. doi:10.1109/ACCESS.2018.2838544.
[19] Das A, Roy P. Improved performance of cascaded fractionalorder smc over cascaded smc for position control of a
ball and plate system. IETE J Res. 2017;63:238–247. doi:10.1080/03772063.2016.1258336.
228 A. K. SHARMA AND B. BHUSHAN

[20] Kao S-T, Ho M-T. Second-order sliding mode control for ball-balancing system. In: 2018 IEEE conference on control
technology and applications (CCTA). p. 1730–1735. IEEE (2018).
[21] Bang H, Lee Y. Embedded model predictive control for enhancing tracking performance of a ball-and-plate system.
IEEE Access. 2019;7:39652–39659. doi:10.1109/ACCESS.2019.2907111.
[22] Zhang Z, Yuan D. Modelling and control scheme of the ball–plate trajectory-tracking pneumatic system with a touch
screen and a rotary cylinder. IET Control Theory Appl. 2010;4:573–589. doi:10.1049/iet-cta.2008.0540.
[23] Marco A, Moreno-Armendariz CAP-O. Floriber to Ortiz Rodrıguez, E.R.: Indirect hierarchical FCMAC control for the
ball and plate system. Neuro Comput. 2010;73:2454–2463. doi:10.1016/j.neucom.2010.03.023.
[24] Dong X, Zhao Y, Xu Y, et al. Design of PSO fuzzy neural network control for ball and plate system. Int J Innov Comput
Inf Control. 2011;7:7091–7103.
[25] Yang XS. A new metaheuristic bat-inspired algorithm. In: Nature-inspired cooperative strategies for optimization
(NICSO 2010). Studies in computational intelligence, Vol. 284. Berlin: Springer; 2010. p. 65–74.
[26] Altringham JD. Bats: biology and behaviour. Oxford: Oxford University Press; 1998.
[27] Bell WJ. Searching behaviour: the behavioural ecology of finding resources. London: Chapman & Hall; 1991.
[28] Yang XS. Nature-Inspired metaheuristic algorithms. Luniver Press; 2008.
[29] Wang Y, Jin Q, Zhang R. Improved fuzzy PID controller design using predictive functional control structure. ISA Trans.
2017;71:354–363. doi:10.1016/j.isatra.2017.09.005.
[30] Wang J, Zhu Y, Qi Ret al. Adaptive PID control of multi-DOF industrial robot based on neural network. J Ambient Intell
Humaniz Comput. 2020. doi:10.1007/s12652-020-01693-w.
[31] Abdo MM, Vali AR, Toloei AR, et al. Stabilization loop of a two axes gimbal system using self-tuning PID type fuzzy
controller. ISA Trans. 2014;53:591–602. doi:10.1016/j.isatra.2013.12.008.
[32] Zhang J, Zhuang J, Du H, et al. Self-organizing genetic algorithm based tuning of PID controllers. Inf Sci (NY).
2009;179:1007–1018. doi:10.1016/j.ins.2008.11.038.
[33] Hou Y-Y. Design and implementation of EP-based PID controller for chaos synchronization of Rikitake circuit systems.
ISA Trans. 2017;70:260–268. doi:10.1016/j.isatra.2017.04.016.
[34] Chang Y-H, Chang C-W, Tao C-W, et al. Fuzzy sliding-mode control for ball and beam system with fuzzy ant colony
optimization. Expert Syst Appl. 2012;39:3624–3633. doi:10.1016/j.eswa.2011.09.052.
[35] Angelov PP. Handbook on computational intelligence. Singapore: World Scientific; 2016.
[36] Li X, Clerc M. Swarm intelligence, In: Handbook metaheuristics. Cham, Switzerland: Springer; 2019. p. 353–384.
[37] Kennedy J. Swarm intelligence, In: Handbook of nature-inspired and innovative computing. Springer; 2006.
p. 187–219.
[38] Gao K, Cao Z, Zhang L, et al. A review on swarm intelligence and evolutionary algorithms for solving _exible jobshop
scheduling problems. IEEE/CAA J Automatica Sin. 2019;6(4):904–916.
[39] Engelbrecht A. Fundamentals of computational swarm intelligence. Hoboken (NJ): Wiley; 2006.
[40] Bahel V, Peshkar A, Singh S. Swarm intelligence-based systems: A review, In: Proc. Int. Conf. Comput. Sci. appl.
Singapore: Springer; 2020. p. 149–156.
[41] Manne JR. Swarm intelligence for multi-objective optimization in engineering design, In: Advanced methodologies
and technologies in artificial intelligence, computer simulation, and human-computer interaction. Hershey, PA, USA:
IGI Global; 2019. p. 180–194.
[42] Kennedy J, Eberhart R. Particle swarm optimization, In: Proc. IEEE ICNN, Vol. 4.; 1995. p. 1942–1948.
[43] Kazemian M, Ramezani Y, Lucas C, et al. Swarm clustering based on flowers pollination by artificial bees. In: Swarm
intelligence in data mining. Berlin: Springer; 2006. p. 191–202.
[44] Yang XS, Gandomi AH, Talatahari S, et al. (2012). Metaheuristics in water, geotechnical and transport engineering.
[45] Electronics M. Faulhaber DC-Micromotors Series 2338.

You might also like