Kumar Abhishek; International Journal of Advance Research, Ideas and Innovations in Technology
ISSN: 2454-132X
Impact factor: 6.078
(Volume 6, Issue 5)
Available online at: https://www.ijariit.com
Fuzzy logic technique applied in tuning of PID controller to
control speed of DC motor
Dr. Abhishek Kumar
[email protected] RTC Institute of Technology, Anandi, Jharkhand
ABSTRACT
This paper give solution of tuning technique of PID (Proportional integral derivative) controller by using
fuzzy logic technique applied in speed control of DC motor. The proportional, integral and derivate (KP, KI, KD) gains
of the PID controller are regulate according to fuzzy logic technique. The Fuzzy logic Proportional integral derivative
controller (FLPIDC) is designed according to fuzzy rules. Twenty five self tuning rules are programmed for PID controller.
Two inputs are applied to PID controller one for speed error actual speed and the second is rate of change in speed error. The
Parameter of PID controllers are used to control the speed of the DC Motor. The MATLAB model for speed control of DC
motor using fuzzy logic is easy and less calculation required. The results proof that the designed self-tuned PID controller
perform optimum speed control of DC motor, compared to conventional PID controller.
Keywords: Fuzzy Logic, PID Controller, DC, Membership Function, FLPIDC
1. INTRODUCTION
The DC motor posses the High starting torque Speed control over a wide range, both below and above the normal speed Accurate
step less speed control with constant torque quick starting stopping, reversing and accelerating high reliability. The speed and
torque curve of dc motor are very good as compare to AC motor. A DC motors can give excellent control of speed in accelerating
and breaking mode provide excellent control of speed for acceleration and deceleration. To control the speed of DC motor to take
different work there are number of technique are used one of the popular technique is PID control the main purpose of is paper is
to improve the error in conventional PID controller by using Fuzzy logic technique. Applicability and ease of use offered by the
PID controller. PID controllers provide robust and reliable performance for most systems if the PID parameters are tuned properly.
Fuzzy logic technique now a day very popular for researcher it was introduced by L.A.Zadeh in year1965 and mamdani (1975)
give Since then, FLC has been very helpful tool in research and various industrial application. The error and the change of the
error are two inputs for the design of such a fuzzy logic PID Controller (FLPID).
2. DC MOTOR
In figure 2.1 show a separately excited DC motor the applied voltage of the armature varies without changing the field voltage.
The dc motor is connected with mechanical load having moment of inertia J and viscous friction coefficient B a variable voltage is
applied to armature and following parameter is consider for calculation.
Fig. 1: Diagram of DC motor modal for speed control
© 2020, www.IJARIIT.com All Rights Reserved Page | 444
Kumar Abhishek; International Journal of Advance Research, Ideas and Innovations in Technology
Notations
R = Armature Resistance (Ω).
L = Inductance of armature winding (H).
ia = Armature current (A).
if = Field current (A).
ea = applied armature voltage (V)
eb = back emf (V)
Tm = torque developed by motor (Nm)
θ = angular displacement of motor shaft (rad). ω = angular speed of motor shaft (rad/sec.)
J = equivalent moment of inertia of motor and load referred to motor shaft (kg-m2)
B = equivalent friction coefficient of motor and load referred to motor shaft (Nm/rad/sec)
Applying torque equation and KVL in loop of DC motor figure (2.1) we get the following equation.
The Mechanical torque Tm of motor is proportional to the product of armature current and air gap flux, i.e.
𝑇𝑚 = 𝐾1 𝐾𝑓 𝑖𝑓 𝑖𝑎 (2.1)
Here K1 is constant.
In this case dc motor, the field current is constant
𝑇𝑚 = 𝐾𝑖𝑎 (2.2)
𝑑Ѳ
𝑒𝑏 = 𝐾𝑏 (2.3)
𝑑𝑡
KVL in loop of dc motor
𝑑i
L 𝑑𝑡a + R𝑖𝑎 + 𝑒𝑏 − 𝑒𝑎 = 0 (2.4)
𝑑2 Ѳ 𝑑Ѳ
J 𝑑𝑡 2 + 𝐵 𝑑𝑡 = 𝑇𝑚 =𝐾𝑇 𝑖𝑎 (2.5)
Laplace transforms of (2.3) (2.4) and (2.5) are
𝐸𝑏 (s) = 𝐾𝑏 s Ѳ(s) (2.6)
(Ls+R) 𝑖𝑎 (s)=𝐸𝑏 (s) − 𝐸𝑎 (s) (2.7)
(J𝑠 2 + 𝐵𝑠)Ѳ(s)= 𝑇𝑚 =𝐾𝑇 𝑖𝑎 (𝑠) (2.8)
Ѳ(s) 𝑇 𝐾
= 𝑠[(𝑅+𝐿𝑠)(𝐽𝑠+𝐵)+𝐾 (2.9)
𝐸𝑎 (𝑠) 𝑇 𝐾𝑏 ]
ω(s)
Ѳ(s) = (2.10)
s
𝜔(𝑠) 𝑇 𝐾
= [(𝑅+𝐿𝑠)(𝐽𝑠+𝐵)+𝐾 (2.11)
𝐸𝑎 (𝑠) 𝑇 𝐾𝑏 ]
DC motor of 3.70KW, 240V 17500rpm DC motor with the below parameter is used
R=0.5Ω,L=0.02 H, V=240 V, J=0.1 Kg.m2, B=0.008Nms/rad , N=1500rpm 𝐾𝑇 =1 Nm/A
𝐾𝑏 = 1.28Vs/rad
Putting the above value the Transfer function of the DC motor is given by
𝜔(𝑠) 1
G(s) =𝐸 = 0.002𝑠 2+0.05𝑠+1.2 (2.12)
𝑎 (𝑠)
3. RESPONSE OF TRANSFER FUNCTION OF DC MOTOR (WITHOUT USING FLPID
CONTROLLER)
The unit step response of equation (2.12) is obtained by using mat lab Programs
© 2020, www.IJARIIT.com All Rights Reserved Page | 445
Kumar Abhishek; International Journal of Advance Research, Ideas and Innovations in Technology
Fig. 3: Response of transfer function of dc motor (without using FLPID controller)
𝜔(𝑠) 1
Response of = 0.002𝑠 2 +0.05𝑠+1.2
𝑒𝑎 (𝑠)
By using MATLAB Programming the response of the transfer function is shown in Figure 3.1 from the graph the value of
Maximum overshoot, Rise Time, Peak time, Settling time is obtained.
Maximum overshoot Mp=33%.
Delay time 𝑇𝑑 =0.141sec.
Rise Time Tr=0.228sec.
Peak time Tp=0.423sec.
Settling time TS=3.08sec.
To improve the performance of these parameter of the system a controller is required the conventional controller are PD, PI,and
PID controllers are widely used in industrial use.
4. PID CONTROLLER
The PID controls consist of three basic element a proportional derivative and integral control as shown in Figure 4.1 the input
signal is send to PID through a summer which is subtracted by feedback signal the difference of these two signals are send to PID
Controller and output of PID is applied to the transfer function of the plant if the desired output is not appropriate then error signal
is send by feedback this process is continue until desired output is achieved selection of controller parameter is difficult task the
tuning rule is proposed by Ziegler and Nicholas is shown in table on selection of Kp , T i and Td are extract from that table and
calculation is performed.
Fig. 4: PID Control
© 2020, www.IJARIIT.com All Rights Reserved Page | 446
Kumar Abhishek; International Journal of Advance Research, Ideas and Innovations in Technology
𝑑𝑒(𝑡)
𝑒𝑎 (t)= 𝐾𝑃 e(t)+ 𝐾𝐼 ∫ 𝑒(𝑡) + 𝐾𝐷 (4.1)
𝑑𝑡
1 𝑑𝑒(𝑡)
𝑒𝑎 (t)= [e(t)+ 𝑇 ∫ 𝑒(𝑡) +𝑇𝐷 ] (4.2)
𝐼 𝑑𝑡
Where 𝐾𝑃 =Proportion gain, 𝐾𝐼 =Integral gain , 𝐾𝐷 =Derivative gain
𝑇𝐼 =Integral time
𝑇𝐷 =Derivative time
The Laplace transform of the actuating signal incorporating PID control
𝐾𝑖
𝐸𝑎 (𝑠) =E(s)+s𝑇𝑑 𝐸 (𝑠) + 𝐸(𝑠) (4.3)
𝑠
𝐾
𝐸𝑎 (𝑠) =E(s)[1+s𝑇𝑑 + 𝑠𝑖 ] (4.4)
If the transfer function of system is known then it is possible to apply usual design techniques for tuning PID controller known as
Ziegler-Nichols (Z-N) method, for determine parameters of the controller that will meet the transient and steady state
specifications of the close loop system by using PID controller. However the plant is so complicated that model cannot be easily
tuned i.e. it is difficult to selecting the parameters ( Kp, Ki, Kd) , The Fuzzy logic technique give solution of tuning problem.
5. FUZZY LOGIC PROPORTIONAL INTEGRAL DERIVATIVE (FLPID) CONTROLLER
DESIGN
Designing of FLPID Controller for proposed modal The FLPID controller in a closed loop control system is shown below Figure
5.
Fig. 5: Block diagram of System with FLPID
Fig. 6: Block diagram of Fuzzy inference unit(FIU)
Figure 5.2 show Block diagram of Fuzzy inference Fuzzy inference is the process of formulating the mapping from a given input
to an output using fuzzy logic. The mapping then provides a basis from which decisions can be made, or patterns discerned. The
process of fuzzy inference involves all of the pieces that are described in membership function logical operation and If then rules.
5.1 Fuzzification
The process of fuzzification is to transformation of crisp input to the fuzzy input for example if any one want to convert the height
of human being which is a crisp value may varies from 2 feet to 7 feet into a membership function which varies from 0 to 1,so the
person below 2 feet and above 7 feet is not consider in this particular membership function. The maximum crisp value of this case
is 7 feet so the fuzzy value of this is 1 similarly the person whom height is 3.5 feet the value of fuzzy is 0.5 in this way the
membership may be framed so height may defined as very high(VH) ,medium (ME),short(SH), very short(VS) . For the proposed
FLPID controller the membership function is define as fuzzy sets: NM (Negative Medium ), NS (Negative Small), ZO (Zero), PS
© 2020, www.IJARIIT.com All Rights Reserved Page | 447
Kumar Abhishek; International Journal of Advance Research, Ideas and Innovations in Technology
(Positive Small), and PM (Positive Medium). Each fuzzy variable is a member of the subsets with a degree of membership μ
varying between 0 (non-member) and 1 (full-member). All the membership functions have asymmetrical shape with more
crowding near the origin (steady state). This permits higher precision at Steady state. Fuzzy rule for input voltage and change in
voltage (Kp,Kd ,Ki) is given in Table 5.1b ,Table5.1c and Table 5. 1d. Table 5.1a show the fuzzy logic algorithm
5.2 Fuzzy logic algorithm
Table 1: Fuzzy logic algorithm
Table 2: Fuzzy Rule defied for Kp
Table 3: Fuzzy Rule defied for Ki
Table 4: Fuzzy Rule defied for Kd
The membership function plots for the input variable of (Kp,Ki,Kd) are taken by using MATLAB as Shown in Figure 7, 8, 9.
© 2020, www.IJARIIT.com All Rights Reserved Page | 448
Kumar Abhishek; International Journal of Advance Research, Ideas and Innovations in Technology
Fig. 7: Membership Function plots for input Kp.
Fig. 8: Membership Function plots for input Ki
Fig. 9: Membership Function plots for input Kd
5.2 Detemination of Rule for Flpid
The input variable and output variable is governed by certain rule which is defined in FIS editor for FLPID as shown in figure 10
If then rule is fed in Mamdani block shown in white color in FIS editor after defining 20 rules (figure 11) the graph of the rule is
observed in figure 12 and figure 13(3D graph) show the Kp Ki and Kd relationship for fuzzy controller and Figure 14 Membership
Function plots for output PID controller.
Fig. 11: FIS Editor for FLPID.
© 2020, www.IJARIIT.com All Rights Reserved Page | 449
Kumar Abhishek; International Journal of Advance Research, Ideas and Innovations in Technology
Fig. 12: Rule editor for FLPID
Fig. 13: Rule Viewer for Fuzzy Logic PID controller
Fig. 14: Kp Ki and Kd relationship for fuzzy controller.
Fig. 15: Membership Function plots for output PID controller
© 2020, www.IJARIIT.com All Rights Reserved Page | 450
Kumar Abhishek; International Journal of Advance Research, Ideas and Innovations in Technology
5.3 Defuzzification
There are many defuzzification methods but the most common methods are as follows:
• Mean of maximum (MOM) Technique
• Center of gravity (COG) Technique
• Bisector of area (BOA) Technique
• Smallest of maximum (SOM) Technique
5.4 Advantages
There are many advantages of Fuzzy logic to controlling the devices as compare to other controlling techniques. The Some are:-
• Fuzzy logic is a accurate problem solving Technique
• It is able to handle big numerical data and linguistic knowledge.
• A technique that facilitates control of a complicated system without knowledge of its mathematical description.
• Fuzzy logic differs from classical logic in that statements are no longer black or white, true or false, on or off.
In traditional logic an object takes on a value of either zero or one. In fuzzy logic, a statement can assume any real value between
0 and 1, representing the degree to which an element belongs to a given set.
• A computational paradigm that is based on how humans think
• Fuzzy logic looks at the world in the imprecise terms, in much the same way that our brain takes in information (e.g temperature
is hot, speed is slow),then responds with precise actions.
• The human brain can reason with uncertainties, vagueness, and judgments. Computers can only manipulate precise valuation.
Fuzzy logic is an attempt to combine the two techniques.
6. SIMULINK IMPLEMENTATION GAIN INTEGRATAR
In this section the FLPDI model is design by using MATLAB as shown in figure 16. To design the model the Integrator.
derivative ,gain, fuzzy logic controller block is selected from Simulink library browser and drag to workspace and for testing
unit step signal is applied and summer is added to give feedback to summer with and output signal is observe in scope transfer
function block differentiator gain summer is drag to workspace and model is formed as shown in the figure 6.1
The input test signal is given by using unit step test signal a summer is add to take feedback signal.
Fig. 16: FLPID control system
Fuzzy logic controller is connected with the system having transfer function G(s) the result is taken in scope.
7. RESULTS AND CONCLUSION
This paper addressed the problem of tuning the gain of FLPID Figure 17. shows the responses of the system and the conclude that
the FLPID controller improve rise time, delay time, peak time, Maximum overshoot, setting time, which is shown in Table 7.1a
hence the system become fast.
Fig. 17: Output of the scope
© 2020, www.IJARIIT.com All Rights Reserved Page | 451
Kumar Abhishek; International Journal of Advance Research, Ideas and Innovations in Technology
Table 7.1a Simulation Result Of The Flpid Controller
8. REFERENCES
[1] Chiu, Stephen. "Using fuzzy logic in control applications: beyond fuzzy PID control." IEEE Control Systems Magazine 18.5
(1998): 100-104.
[2] Thepsatorn, P., et al. "DC motor speed control using fuzzy logic based on LabVIEW." 2006 SICE-ICASE International Joint
Conference. IEEE, 2006.
[3] Xu, Z. S. "Models for multiple attribute decision making with intuitionistic fuzzy information." International Journal of
Uncertainty, Fuzziness and Knowledge-Based Systems 15.03 (2007): 285-297.
[4] Tipsuwan, Yodyium, and Mo-Yuen Chow. "Fuzzy logic microcontroller implementation for DC motor speed
control." IECON'99. Conference Proceedings. 25th Annual Conference of the IEEE Industrial Electronics Society (Cat. No.
99CH37029). Vol. 3. Ieee, 1999.
[5] Thepsatorn, P., et al. "DC motor speed control using fuzzy logic based on LabVIEW." 2006 SICE-ICASE International Joint
Conference. IEEE, 2006.
[6] Xia, Changliang, et al. "Speed control of brushless DC motor using genetic algorithm based fuzzy controller." Proceeding of
the 2004 International Conference on Intelligent Mechatronics and Automation, Chengdu, China, 3rd edn. A Treatise on
Electricity and Magnetism. Vol. 2. 2004.
[7] Almatheel, Y. A., & Abdelrahman, A. (2017, January). Speed control of DC motor using Fuzzy Logic Controller. In 2017
International Conference on Communication, Control, Computing and Electronics Engineering (ICCCCEE) (pp. 1-8). IEEE.
[8] Aydemir, Seda, Serkan Sezen, and H. Mertin Ertunc. "Fuzzy logic speed control of a DC motor." The 4th International
Power Electronics and Motion Control Conference, 2004. IPEMC 2004.. Vol. 2. IEEE, 2004.
[9] Rao, D. H., and S. S. Saraf. "Study of defuzzification methods of fuzzy logic controller for speed control of a DC
motor." Proceedings of International Conference on Power Electronics, Drives and Energy Systems for Industrial Growth.
Vol. 2. IEEE, 1996.
[10] Rao, D.H. and Saraf, S.S., 1996, January. Study of defuzzification methods of fuzzy logic controller for speed control of a
DC motor. In Proceedings of International Conference on Power Electronics, Drives and Energy Systems for Industrial
Growth (Vol. 2, pp. 782-787). IEEE.
[11] Rao, D. H., and S. S. Saraf. "Study of defuzzification methods of fuzzy logic controller for speed control of a DC motor."
In Proceedings of International Conference on Power Electronics, Drives and Energy Systems for Industrial Growth, vol. 2,
pp. 782-787. IEEE, 1996.
[12] Rao, D.H. and Saraf, S.S., 1996, January. Study of defuzzification methods of fuzzy logic controller for speed control of a
DC motor. In Proceedings of International Conference on Power Electronics, Drives and Energy Systems for Industrial
Growth (Vol. 2, pp. 782-787). IEEE.
© 2020, www.IJARIIT.com All Rights Reserved Page | 452