Comparison Between PID Control and Fuzzy PID
Comparison Between PID Control and Fuzzy PID
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.
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
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.
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
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.