0% found this document useful (0 votes)
89 views4 pages

Comparison Between PID Control and Fuzzy PID

Comparison Between PID Control and Fuzzy PID

Uploaded by

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

Comparison Between PID Control and Fuzzy PID

Comparison Between PID Control and Fuzzy PID

Uploaded by

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

2021 International Electrical Engineering Congress (iEECON2021)

March 10-12, 2021, Pattaya, THAILAND

Comparison Between PID Control and Fuzzy PID


Control on Invert Pendulum System
Chart Rithirun Anuchit Charean Winyu Sawaengsinkasikit
Electrical Engineering Dept Electrical Engineering Dept Electrical Engineering Dept
Faculty of Engineering Faculty of Engineering Faculty of Engineering
Kasem Bundit University Kasem Bundit University Kasem Bundit University
2021 9th International Electrical Engineering Congress (iEECON) | 978-1-7281-9584-1/20/$31.00 ©2021 IEEE | DOI: 10.1109/iEECON51072.2021.9440344

Thailand Thailand Thailand


[email protected] [email protected] [email protected]

Abstract Invert pendulum system is a nonlinear set point that need to be balanced the pole of invert
control system with more than one equilibrium point. That pendulum at all times.
are when the pole of the invert pendulum is down to the
earth and it stable at the equilibrium point, the other point is II. FUZZY PID CONTROL AND PID CONTROL
when the pole of the invert pendulum is up to the sky, this
Fuzzy PID control was designed as a controller to
is not the equilibrium point or we can know as the unstable
equilibrium point. The pole of the invert pendulum can stabilize the pole in an upright position and the
raise upright at an angle depend on the movement of the acceleration of the cart must be controlled quickly so
cart when the cart has to be move to the left or to the right. that the invert pendulum's pole did not fall down by
So that the pole of the invert pendulum is always the gravity. In this paper, we combined Fuzzy Logic
perpendicular to the movement of the cart, therefore the control and PID control to provide fast response. The
cart has to be move rapidly with acceleration to maintain response control are Fuzzy PD control and Fuzzy PI
that balance. Conventional PID control can control that control separately which combined to the design of
balance, if any disturbance interferes to the pole then the Fuzzy PID control [2] as shown in Fig. 1
response of the control system must be fast enough to
respond quickly to such interference in order to maintain
that balance. This paper will apply the Fuzzy logic control
implemented with PID control in order to respond to the
cart of invert pendulum system to keep the pole always be
perpendicular. This Fuzzy PID control will respond well to
the set point of the system and also good response to
nonlinear system, the complex system which we don't know
the mathematical model of the system. Fig. 1. Design of a Fuzzy PD control and a Fuzzy PI
control.
Keywords Invert pendulum, PID control, Fuzzy logic
control, Fuzzy PID control. The input membership function of Fuzzy PD
control and Fuzzy PI control (Fig. 2) and the output
I. INTRODUCTION membership function (Fig. 3) The defuzzification for
Invert pendulum control system is the system output can consider from the center of mass in
which can able to control the perpendicular pole that equation 1.
it can be set up on the cart. The controller has d(n), r(n) negative Zero d(n), r(n) positive
response quickly to small angle changes. In which the 1
control of such angles cannot be controlled directly,
but instead relies on the movement of the cart. And 0.5
the movement of the car must be controlled with
acceleration so that it can affect to the angle of the
pole of the invert pendulum in that balance. However,
-L 0 L d(n), r(n)
if the cart is moving at constant speed, it will not
affect the angle of the invert pendulum's pole, the Fig. 2. The input membership function of Fuzzy PD
acceleration required to control the cart's motion will control and Fuzzy PI control.
also have a nonlinear rate of change due to the gravity
of the earth. It is involved and influences the pole output negative zero output positive
weight of the invert pendulum in balance, by creating 1
a systemic state of change like a nonlinear system
that requires rapid response. And if there is a large
number of outside interfere to the pole, the system is output signal
ready to fail thus the control system must respond to
stable it at all times. Fuzzy logic control is the simple -L 0 L
control system that can be use and design the control Fig. 3. The output membership function of Fuzzy PD
rules to be consistent with PID control focusing on control and Fuzzy PI control.

978-1-7281-9584-1/21/$31.00 ©2021 IEEE 337

Authorized licensed use limited to: University of Prince Edward Island. Downloaded on July 04,2021 at 11:06:50 UTC from IEEE Xplore. Restrictions apply.
2021 International Electrical Engineering Congress (iEECON2021)
March 10-12, 2021, Pattaya, THAILAND

membership value of input x corresponding output Rule 19: if -L > d(n) and -L > r(n) then Upd = 0 ;
u( nT )  (1) Upi = -L;
membership value of input
Rule 20: if L < d(n) and -L > r(n) then Upd = L ;
The output of Fuzzy PD control and Fuzzy PI Upi = 0;
Rule 21: if d(n) = 0 and r(n) = 0 then Upd = 0 ;
control has a value in equation 2 and equation 3.
Upi = 0;
When
Fuzzy PI = fuzzy {f(kpp*r(n))+(ki*d(n))} (2) pi1=L*(ki*d(n)+kpp*r(n))/(2*(2*L-(kpp*r(n))));
pi2=L*(ki*d(n)+kpp*r(n))/(2*(2*L-(ki*d(n))));
Fuzzy PD = fuzzy {f(kp*d(n))+(kd*r(n))} (3) pi3=((kpp*r(n))+L)/2;
pi4=((ki*d(n))+L)/2;
When d(n) is the error, r(n) is the error rate, Upd
pi5=((kpp*r(n))-L)/2;
is the output of Fuzzy PD and Upi is the output of
pi6=((ki*d(n))-L)/2;
Fuzzy PI
pd1=L*(kp*d(n)-kd*r(n))/(2*(2*L-(kd*r(n))));
And this Fuzzy PID Control is written as the
pd2=L*(kp*d(n)-kd*r(n))/(2*(2*L-(kp*d(n))));
control rules (if ... then rule), 21 rules as follows:
pd3=((-kd*r(n))+L)/2;
Rule 1: if L > d(n) and d(n) > 0 and -L < r(n) and pd4=((kp*d(n))-L)/2;
r(n) < 0 and d(n) > |r(n)| then pd5=((-kd*r(n))-L)/2;
Upd = pd2 ; Upi = pi2; pd6=((kp*d(n))+L)/2;
Rule 2: if L > d(n) and d(n) > 0 and L > r(n) and After tuning the Fuzzy control parameters, we got
r(n) > 0 and d(n) > r(n) then the number as following
Upd = pd2 ; Upi = pi2;
Rule 3: if L > d(n) and d(n) > 0 and L > r(n) and Fuzzy PD : kpp = 8, kd = 0.001
r(n) > 0 and d(n) < r(n) then Fuzzy PI : kp = 6, ki = 0.001
Upd = pd1 ; Upi = pi1; L = 700 ; Fuzzy PID gain = 20
Rule 4: if -L < d(n) and d(n) < 0 and L > r(n) and The conventional PID control was designed to
r(n) > 0 and |d(n)| < r(n) then control the invert pendulum, we referenced from [5]
Upd = pd1 ; Upi = pi1; with an invert pendulum constant analysis as follows.
Rule 5: if -L < d(n) and d(n) < 0 and L > r(n) and
r(n) > 0 and |d(n)| > r(n) then M_mass = 0.02791 kg., gravity = 9.81 m/s2
Upd = pd2 ; Uzi = pi2; J_inertial = 0.0005242317 kg.m2,
Rule 6: if -L < d(n) and d(n) < 0 and -L < r(n) and And the tuning value gain control: kp = 10.04
r(n) < 0 and |d(n)| > |r(n)| then ki = 8, and kd = 1
Upd = pd2 ; Upi = pi2;
Rule 7: if -L < d(n) and d(n) < 0 and -L < r(n) and
III. EXPERIMENTAL RESULTS
r(n) < 0 and |r(n)| > |d(n)| then
Upd = pd1 ; Upi = pi1; In the experiment, the control results obtained
Rule 8: if L > d(n) and d(n) > 0 and -L < r(n) and from PID control and Fuzzy PID control were
r(n) < 0 and |r(n)| > d(n) then performed by initiating the system where the invert
Upd = pd1 ; Upi = pi1; pendulum's pole was in the position down to the
Rule 9: if L < d(n) and -L < r(n) and r(n) < 0 earth, and then pressing the button for the system to
then Upd = pd3 ; Upi = pi3; start by swinging up, the pole of the invert pendulum
Rule 10: if L < d(n) and L > r(n) and r(n) > 0 try to raised up to the sky position and the controller
then Upd = pd3 ; Upi = pi3; was set up to response to the change of pole’s angle
Rule 11: if L > d(n) and d(n) > 0 and L < r(n) by control the acceleration of the cart to maintain
then Upd = pd4 ; Upi = pi4; itself perpendicular and recorded the results as shown
Rule 12: if -L < d(n) and d(n) < 0 and L < r(n) in Fig. 4 (a and b)
then Upd = pd4 ; Upi = pi2;
Rule 13: if -L > d(n) and L > r(n) and r(n) > 0
then Upd = pd5 ; Upi = pi5;
Rule 14: if -L > d(n) and -L < r(n) and r(n) < 0
then Upd = pd5 ; Upi = pi5;
Rule 15: if -L < d(n) and d(n) < 0 and -L > r(n) then
Upd = pd6 ; Upi = pi6;
Rule 16: if L > d(n) and d(n) > 0 and -L > r(n) then
Upd = pd6 ; Upi = pi6;
Rule 17: if L < d(n) and L < r(n) then Upd = 0 ;
Upi = L;
Rule 18: if -L > d(n) and L < r(n) then Upd = -L ; a) Swinging up
Upi = 0;

338

Authorized licensed use limited to: University of Prince Edward Island. Downloaded on July 04,2021 at 11:06:50 UTC from IEEE Xplore. Restrictions apply.
2021 International Electrical Engineering Congress (iEECON2021)
March 10-12, 2021, Pattaya, THAILAND

b) Stabilize pole Fig. 8. The stabilized angle of the invert pendulum’s


pole perpendicular of PID control with the maximum
Fig. 4. Swing up and stabilize the invert pendulum’s forearm of the pole at 311 grams.
pole perpendicular of PID control.

And the results of the experiments that are shown


in graphs of control as shown in Fig. 5 and Fig. 6

Fig. 5. The stabilized angle of the invert pendulum’s Fig. 9. The output control value of PID control with
pole perpendicular of PID control. the maximum forearm of the pole at 311 grams.
In the next experiment we performed the system
programming using the same method for Fuzzy PID
control, it was found that the system was able to
stabilize the equilibrium point of the invert
pendulum’s pole perpendicular and obtained the
results as shown in Fig. 10 (a and b) to Fig. 12
Fig. 6. The output control value of PID control.

From the experimental results of PID control, it


was found that the system was able to stabilize the
equilibrium point of the invert pendulum’s pole
perpendicular. And in testing when the system was
balanced and the weight was added to the forearm of
the pole, it was found that PID control system can
maintain the balance at the maximum weight of 311
grams as shown in Fig. 7 and the output value of PID
control is shown in Fig. 8 and Fig. 9. a) Swinging up

b) Stabilize pole
Fig. 7. PID control of Invert pendulum with the Fig. 10. Swing up and stabilize the invert pendulum’s
maximum forearm of the pole at 311 grams. pole perpendicular of Fuzzy PID control.

339

Authorized licensed use limited to: University of Prince Edward Island. Downloaded on July 04,2021 at 11:06:50 UTC from IEEE Xplore. Restrictions apply.
2021 International Electrical Engineering Congress (iEECON2021)
March 10-12, 2021, Pattaya, THAILAND

Fig. 11. The stabilized angle of the invert pendulum’s


pole perpendicular of Fuzzy PID control.
Fig. 15. The output control value of Fuzzy PID
control with the maximum forearm of the pole at 132
grams.
IV. CONCLUSION
Both PID control and Fuzzy PID control can
stabilize the pole of invert pendulum perpendicularly
and have the performance results of control were
Fig. 12. The output control value of Fuzzy PID pretty good due to the tuning parameters of each
control. control and the entering system to the set point is
different depend on the characteristic of the control.
The tuning parameters of PID controller was derived
From the experimental results of Fuzzy PID from the mathematic model [5] that it is more
control, and in testing when the system was balanced complicate than tuning parameters of Fuzzy PID
and the weight was added to the forearm of the pole. which no need the mathematic model of system but
It was found that Fuzzy control system can maintain should have the fully knowledge of Fuzzy’s behavior
the balance at the maximum weight of 132 grams as to tune them and it can provide the rapid prototype of
shown in Fig. 13 and the output control value of modern controller which suitable for linear and
Fuzzy PID control is shown in Fig. 14 and Fig. 15. nonlinear system. Moreover the final weight counter
at the forearm of the pole, PID control can handle
more weight than Fuzzy PID control because the
control gain of Fuzzy PID was tuned not good enough
for handle more weight it should be retune but it was
not significant, all so the selectable type of control
should be suitable with the plant to be control its
process to get more effectively.
REFERENCES
[1] M.Rabah, A.Rohan and S.Kim “Comparison of
Position Control of a Gyroscopic Inverted
Pendulum Using PID, Fuzzy Logic and Fuzzy
PID controllers” International Journal of Fuzzy
Logic and Intelligent Systems, Vol.18 No.2, June
Fig. 13. Fuzzy PID control of Invert pendulum with 2018.
the maximum forearm of the pole at 132 grams. [2] Pattaradej T. “Implementation of fuzzy P2ID
controller” Master Thesis of King Mongkut’s
Institute of Technology, Ladkrabang Bangkok
2003.
[3] T.Docekal and S.Ozana, “Design of Fuzzy
Controller for Simple Inverted Pendulum” , the
2nd International Conference on Electrical,
Communication and Computer Engineering
(ICECCE), Istanbul, Turkey, 14-15 April 2020.
[4] A.Jain, D.Tayal and N.Sehgal, “Control of Non-
Linear Inverted Pendulum using Fuzzy Logic
Controller”, International Journal of Computer
Applications (0975 – 8887) Volume 69– No.27,
Fig. 14. The stabilized angle of the invert pendulum’s May 2013.
pole perpendicular of Fuzzy PID control with the [5] https: // www.makerasia.com / inverted-pendulum
maximum forearm of the pole at 132 grams. (online)

340

Authorized licensed use limited to: University of Prince Edward Island. Downloaded on July 04,2021 at 11:06:50 UTC from IEEE Xplore. Restrictions apply.

You might also like