0% found this document useful (0 votes)
12 views7 pages

SSRN Id4378784

The document presents a comparative study of the Firefly Algorithm and Fminsearch optimization algorithms for tuning PID controller parameters to control the speed of a DC motor. It evaluates the algorithms based on time-domain response, finding that Fminsearch converges faster with a shorter computation time and settling time, though Firefly Algorithm converges steadily after more iterations.

Uploaded by

muhammad shahbaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views7 pages

SSRN Id4378784

The document presents a comparative study of the Firefly Algorithm and Fminsearch optimization algorithms for tuning PID controller parameters to control the speed of a DC motor. It evaluates the algorithms based on time-domain response, finding that Fminsearch converges faster with a shorter computation time and settling time, though Firefly Algorithm converges steadily after more iterations.

Uploaded by

muhammad shahbaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Optimization of PID Controller Parameters for

Speed Control of DC Motor Using Firefly and


Fminsearch Algorithms
Subrata Pandey
subratapandey.ee@gmail.com
National Institute of Technical Teachers’ Training & Research, Kolkata

Abstract:

This research paper presents a comparative study of the performance of two optimization
algorithms, namely the Firefly Algorithm (FFA) and Fminsearch, for the PID tuning of a
DC motor speed control system. The performance of the two algorithms is evaluated based
on the time-domain response of the DC motor speed control system. The Integral of Time
multiplied by the Absolute value of the Error (ITAE) is used as the objective function here.
The results show that the Fminsearch algorithm outperforms the FFA in terms of the rate
of convergence, computation time and settling time. The proposed approach provides an
effective and efficient way for the design and tuning of PID controllers in DC motor speed
control systems. This study contributes to the ongoing efforts in developing more efficient
and reliable control systems for DC motors, which are widely used in various industrial
applications.

Keywords: DC motor, PID control, optimization algorithms, Firefly Algorithm, Fminsearch.

1. Introduction:

DC motors are widely used in various industrial applications, such as robotics, aerospace, and
manufacturing. The performance of the DC motor is highly dependent on the speed control
system, which plays a crucial role in maintaining the motor speed at a desired level. The PID
controller is a popular control method for DC motor speed control, which provides a simple
and effective way of regulating the motor speed.
The design and tuning of the PID controller are critical for achieving the desired performance
of the DC motor speed control system. The optimization algorithms have been widely used
for the design and tuning of PID controllers, which automate the process of finding the
optimal PID parameters that can achieve the desired performance.
In this paper, we present a comparative study of two optimization algorithms, namely the
Firefly Algorithm (FFA) [1] and Fminsearch for the PID tuning of a DC motor speed control
system. The FFA is a metaheuristic optimization algorithm inspired by the flashing behaviour
of fireflies which is effective in solving various optimization problems [2]. Fminsearch is a
built-in optimization algorithm in MATLAB, which is widely used for the design and tuning
of PID controllers. It is based on Nelder-Mead simplex method [3].

2. Literature Review:

Electronic copy available at: https://ssrn.com/abstract=4378784


Many studies have been conducted on the design and tuning of PID controllers for DC motor
speed control using various optimization algorithms. For example, Ekinci and his colleagues
[4], present a novel approach to optimize the PID controller parameters for DC motor speed
control using the Harris Hawks Optimization (HHO) algorithm [5]. The results of the
simulations and experiments presented in the paper show that the optimized PID controller
using the HHO algorithm provides better performance compared to the conventional PID
controller. The paper also demonstrates the robustness of the proposed method against
parameter variations and load disturbances.
In another paper, Qi and his colleagues [6], propose a method for tuning digital PID
controllers using the particle swarm optimization (PSO) algorithm[7] for a controller area
network (CAN)-based DC motor subject to stochastic delays. The PSO algorithm is then
presented as a potential solution to the challenges of tuning PID controllers for the system.
The proposed method is validated through simulations and experimental results, which
demonstrate that the optimized PID controller using the PSO algorithm provides better
performance compared to the conventional PID controller.
In their paper, Ibrahim and his colleagues [8] proposes a method to optimize the PID
controller parameters of a brushless DC (BLDC) motor using the genetic algorithm (GA)
technique [9]. the paper proposes the use of GA as an optimization tool to search for the
optimal PID controller parameters. The proposed method uses the fitness function to evaluate
the performance of the PID controller, and the GA algorithm to search for the optimal set of
controller parameters. The paper presents simulation results that demonstrate the
effectiveness of the proposed method in optimizing the PID controller parameters for the
BLDC motor. The optimized PID controller provides better performance compared to the
conventional PID controller, as measured by the steady-state error, overshoot, and settling
time.
In their paper, Pandey and his colleagues [10] propose a new method to design a robust PID
controller for a DC motor using the Teaching-Learning Based Optimization (TLBO) [11]
algorithm. the paper proposes the use of the TLBO algorithm to search for the optimal set of
PID controller parameters that provide robust performance in the face of these uncertainties
and disturbances. The paper presents simulation results that demonstrate the effectiveness of
the proposed method in designing a robust PID controller for the DC motor. The optimized
PID controller provides robust performance in the presence of modelling uncertainties,
parameter variations, and external disturbances, as measured by the steady-state error,
overshoot, and settling time.

3. Methodology:

The DC motor speed control system using the PID controller is modelled using the transfer
functions given below.
The transfer function for the speed control of the DC motor is modelled as follows:

𝐺(𝑠)= 2
𝐾

(1)
𝐽𝑏𝑠 +𝐽𝑠+𝐾

Here,

Electronic copy available at: https://ssrn.com/abstract=4378784


K= The torque constant J=
The moment of inertia
b=The damping coefficient
The values of the torque constant K, the moment of inertia J and the damping coefficient b are
selected as follows –
K=1 N·m/A
J=0.01 kg·m2
b=0.1 N·s/m
Substituting the values of K, J and B in equation (1) –

𝐺(𝑠)= (2)
0.

The PID controller is designed using the following transfer function:


𝐶(𝑠)= 𝐾𝑝 + 𝐾 𝑖
𝑠 +𝐾𝑑 (3)

where 𝐾𝑝, 𝐾𝑖, and 𝐾𝑑 are the proportional, integral, and derivative gains of the PID controller,
respectively.

Fig1. Block Diagram of the controller and dc motor arrangement

The arrangement of the controller and the dc motor for the speed control system of the DC
motor is given in Fig.1. The objective of the optimization is to find the optimal values of 𝐾𝑝,
𝐾𝑖, and 𝐾𝑑 that can minimize the error between the reference speed and the actual speed of the
DC motor.
The FFA and Fminsearch algorithms are used for the optimization of the PID controller
parameters. The FFA algorithm is implemented using the following steps:

1. Initialize the population of fireflies with random values of 𝐾𝑝, 𝐾𝑖, and 𝐾𝑑
2. Calculate the fitness value of each firefly based on the objective function.
3. Update the light intensity of each firefly based on its fitness value and the distance
between the fireflies.
4. Move each firefly towards the brighter fireflies.
5. Evaluate the fitness value of the new population.
6. Repeat steps 3-5 until the stopping criterion is met.
The parameters selected for this work are given below – •
Total number of fireflies=20
• Total number of iterations=600

Electronic copy available at: https://ssrn.com/abstract=4378784


• Alpha value=0.5 • Beta value=0.2
• Gamma value=1
• The lowest permissible values for the PID tuning parameters=0
• The highest permissible values for the PID tuning parameters=200
The Fminsearch algorithm is implemented using the built-in fminsearch function in
MATLAB. The function takes the objective function, initial guess of the parameters, and
other parameters as inputs and returns the optimal values of the parameters.
The parameters selected for this work are given below – •
Initial values = 0
• The lowest permissible values for the PID tuning parameters=0
• The highest permissible values for the PID tuning parameters=200
The performance of the two optimization algorithms is evaluated based on the time-domain
response of the DC motor speed control system. The time-domain response is analyzed based
on the steady-state error, percentage of overshoot, settling time and rise time. The
computation times and the convergence plots of both algorithms were also determined and
analyzed. The simulation is carried out in MATLAB R2014a in a laptop computer with Intel
Core i3-2 GHz CPU and 4 GB RAM.

4. Results and Discussion:

The convergence plots obtained by running both the Fminsearch and FFA are provided in
Fig.2.

Fig.2. Convergence plots of FFA and Fminsearch

As can be seen from Fig.2, up until near the 200 th function evaluation the convergence plots
of both the algorithms were approximately the same but at and after the 200 th function
evaluation there is a sudden dip in the convergence plot of the Fminsearch, which remained
nearly constant for the rest of the iterations whereas, near the same function evaluation value
of 200, FFA started converging at a constant pace and achieved the same level of error that of
the Fminsearch at around 600th iteration. Hence, the Fminsearch algorithm converged quicker

Electronic copy available at: https://ssrn.com/abstract=4378784


than the FFA. ITAE of the Fminsearch algorithm is slightly less and hence better than the
FFA.
The values of 𝐾𝑝, 𝐾𝑖 & 𝐾𝑑, the final values of the ITAE and the computation time required by
both algorithms are shown in Table 1. In terms of computation time, for 600 iterations FFA
took around 12 times more computation time than the Fminsearch for the same number of
function evaluations so, there is a significant difference in the computation time when both
the computation algorithms are compared. Hence, Fminsearch performed better in terms of
computation time compared to the FFA.

Table 1: Computed PID tuning parameters and the computation time of the algorithms

Algorithm 𝑲𝒑 𝑲𝒊 𝑲𝒅 ITAE Computation


Name time (Seconds)
Fminsearch 9.8463 199.7961 0.2318 0.0283 28.369460
FFA 13.6032 199.5175 0.3379 0.0338 342.484480

The PID tuning parameters obtained from both the algorithms were set into the PID controller
and step response of the system was taken. The step response is shown in Fig.3 and the
parameters obtained from the Fig.3 are shown in Table. 2.

Fig.2. Step responses of the system with FFA and Fminsearch tuned PID parameters

Table 2: The time-domain parameters of the step responses.

PID Name Percentage of Settling Time Rise Time (𝑡𝑟) Steady State
Overshoot (𝑡𝑠) Value
(%OS)
Fmin-PID 6.48 0.116 0.00814 1

FFA-PID 4.5 0.122 0.00538 1

Electronic copy available at: https://ssrn.com/abstract=4378784


In terms of the percentage of overshoot, Fminsearch has a higher value of 6.48% compared to
FFA which has a value of 4.5%. So, Fminsearch has overshoot of around 1.4 times the
overshoot of FFA. A lower overshoot means a better system performance hence, FFA
performed better in terms of the percentage of overshoot.
FFA has a settling time of 0.122 seconds while Fminsearch has a settling time of 0.116
seconds. So, the settling time of FFA is about 5% more than that of Fminsearch. Lower
settling time is expected from a good system hence, Fminsearch performed better in terms of
settling time.
In terms of the rise time, FFA performed better compared to Fminsearch. With a value of
0.00814 seconds, Fminsearch took around 1.5 times more time than the FFA which has a rise
time of 0.00538 seconds.
In both cases, the steady state value is 1 which is the same as the reference input of the system
hence, both the PID controller performed the same.
Both the rise time and the settling time are important for the evaluation of any system. A
longer rise time can lead to a delay in the response of the motor, which may be undesirable in
some applications. Similarly, a longer settling time can result in slower tracking of the desired
speed, leading to slower response of the motor control system.
However, settling time is usually considered more important in the context of speed control of
a DC motor. This is because the steady-state performance of the motor, i.e., how well it
maintains a constant speed, is critical for most motor control applications. The settling time
determines how quickly the motor reaches its steady-state speed after a change in the control
signal, which can affect the overall performance of the control system. Therefore, minimizing
the settling time while maintaining a stable system is usually the primary objective in motor
speed control applications. Hence, although FFA has a better rise time and percentage of
overshoot, Fminsearch performed better in terms of settling time, which is more important in
the context of speed control of a DC motor. Hence, Fminsearch performed better compared to
FFA for the speed control of a DC motor in terms of time-domain parameters.

5. Conclusion:

In this paper, we have presented a comparative study of two optimization algorithms, namely
the FFA and Fminsearch, for the PID tuning of a DC motor speed control system. ITAE is
used as the objective function. The performance of the two algorithms is evaluated based on
the time-domain response of the DC motor speed control system. The results show that the
Fminsearch algorithm outperforms the FFA in terms of the convergence rate, the computation
time and the settling time. The proposed approach provides an effective and efficient way for
the design and tuning of PID controllers in DC motor speed control systems. This study
contributes to the ongoing efforts in developing more efficient and reliable control systems
for DC motors, which are widely used in various industrial applications.
Future work includes the investigation of other optimization algorithms and their performance
for PID tuning of DC motor speed control systems. The effects of various disturbances and
uncertainties on the performance of the optimized controllers can also be studied. Finally, the
proposed approach can be extended to other types of motors and control systems.

References:

[1] X. S. Yang, “Firefly algorithms for multimodal optimization,” Lecture Notes in


Computer Science (including subseries Lecture Notes in Artificial Intelligence and

Electronic copy available at: https://ssrn.com/abstract=4378784


Lecture Notes in Bioinformatics), vol. 5792 LNCS, pp. 169–178, 2009, doi:
10.1007/978-3-642-04944-6_14/COVER/.
[2] S. Pandey, 100 Optimization Techniques, 1st ed., vol. 1. Kolkata: Independently
Published, 2023. doi: 10.5281/zenodo.7683862.
[3] J. C. Lagarias, J. A. Reeds, M. H. Wright, and P. E. Wright, “Convergence properties of
the Nelder-Mead simplex method in low dimensions,” SIAM Journal on Optimization,
vol. 9, no. 1, 1998, doi: 10.1137/S1052623496303470.
[4] S. Ekinci, D. Izci, and B. Hekimoglu, “PID Speed Control of DC Motor Using Harris
Hawks Optimization Algorithm,” in 2nd International Conference on Electrical,
Communication and Computer Engineering, ICECCE 2020, 2020. doi:
10.1109/ICECCE49384.2020.9179308.
[5] S. Pandey, 100 Optimization Techniques, 1st ed., vol. 1. Kolkata: Independently
Published, 2023. doi: 10.5281/zenodo.7683862.
[6] Z. Qi, Q. Shi, and H. Zhang, “Tuning of digital PID controllers using particle swarm
optimization algorithm for a CAN-Based DC motor subject to stochastic delays,”
IEEE Transactions on Industrial Electronics, vol. 67, no. 7, 2020, doi:
10.1109/TIE.2019.2934030.
[7] S. Pandey, 100 Optimization Techniques, 1st ed., vol. 1. Independently Published,
2023. doi: 10.5281/zenodo.7683862.
[8] M. A. Ibrahim, A. K. Mahmood, and N. S. Sultan, “Optimal PID controller of a
brushless DC motor using genetic algorithm,” International Journal of Power
Electronics and Drive Systems, vol. 10, no. 2, 2019, doi:
10.11591/ijpeds.v10.i2.pp822-830.
[9] S. Pandey, 100 Optimization Techniques, 1st ed., vol. 1. Kolkata: Independently
Published, 2023. doi: 10.5281/zenodo.7683862.
[10] S. K. Pandey, C. Bera, and S. S. Dwivedi, “Design of robust pid controller for dc
motor using tlbo algorithm,” in Proceedings of 2020 IEEE International Conference
on Advances and Developments in Electrical and Electronics Engineering, ICADEE
2020, 2020. doi: 10.1109/ICADEE51157.2020.9368952.
[11] S. Pandey, 100 Optimization Techniques , 1st ed., vol. 1. Kolkata: Independently
Published, 2023. doi: 10.5281/zenodo.7683862.

Electronic copy available at: https://ssrn.com/abstract=4378784

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy