You are on page 1of 9

Available online at www.sciencedirect.

com
Available online at www.sciencedirect.com
ScienceDirect
ScienceDirect
Available online at www.sciencedirect.com
Procedia Computer Science 00 (2019) 000–000
Procedia Computer Science 00 (2019) 000–000 www.elsevier.com/locate/procedia
ScienceDirect www.elsevier.com/locate/procedia

Procedia Computer Science 152 (2019) 252–260

International Conference on Pervasive Computing Advances and Applications – PerCAA 2019


International Conference on Pervasive Computing Advances and Applications – PerCAA 2019
Comparison of Fuzzy-PID and PID Controller for Speed Control of
Comparison of Fuzzy-PID and PID Controller for Speed Control of
DC Motor using LabVIEW
DC Motor using LabVIEW
Devendra Somwanshiaa*, Mahesh Bundelebb,Gaurav Kumarcc, Gajal Parashardd
Devendra Somwanshi *, Mahesh Bundele ,Gaurav Kumar , Gajal Parashar
Assistant Professor, Poornima College of Engineering, Jaipur, 302022, India
a
b
Director,
Assistant
a
Poornima
Professor, College
Poornima of Engineering,
College Jaipur,
of Engineering, 302022,
Jaipur, India India
302022,
b c,d
Research
Director, Scholar,College
Poornima Poornima University, Jaipur,
of Engineering, Jaipur,302022,
302022,India
India
c,d
Research Scholar, Poornima University, Jaipur, 302022, India

Abstract
Abstract
DC Motors are widely used in industries because they provide better quality with high torque and low volume. A individual PID
DC Motorsand
Controller are Awidely
Fuzzyused
Basedin industries because
PID Controller they provide
is proposed betterinquality
to design with high
this paper. By a torque
comparisonand low volume.
between bothA individual PID
the Controllers
Controller
an overview and
of A Fuzzy Based
performance of PID
bothController is proposed
the Controllers to design
is provided. By in
thethis paper. By
literature a comparison
review it is foundbetween both
that many of the researchers
Controllers
an overview
used of performance
fuzzy controller with some of both the Controllers
algorithms to tune theisparameters
provided. of Bythe
thePID
literature review
Controller it is for
so here found that many
the tuning of PID
of the the researchers
parameters
used fuzzy
Fuzzy controller
Controller with
itself some
used. In algorithms
Conventional to tune
PIDthe parameters
Controller of the
there is aPID Controller
difficulty so herethe
to control for value
the tuning of parameters
of the the PID parameters
and get
Fuzzysuitable
good Controller itself used.InInthe
characteristic. Conventional PID Controller
Fuzzy-Controller to satisfy there is a difficulty
the control to control
characteristics of thetheparameters
value of the parameters
there is specialand get
ability
good suitable
and that characteristic.
is to provide an easyIncomputing,
the Fuzzy-Controller
to control forto satisfy
Motor.theBy control
comparingcharacteristics
the responses of the
for parameters there is special
both the controllers, Fuzzyability
based
and that
PID is to provide
Controller presentsanbetter
easy computing,
performancetothan control
PID for Motor. By
Controller. To comparing
Model the DC the Motor
responses
and for thebothsimulation
the controllers,
purpose Fuzzy based
LabVIEW
PID Controller
software presents
has been used. better performance than PID Controller. To Model the DC Motor and for the simulation purpose LabVIEW
software has been used.
© 2019 The Authors. Published by Elsevier Ltd.
© 2019 The Authors. Published by Elsevier Ltd.
This is an open access article under the CC BY-NC-ND license (https://creativecommons.org/licenses/by-nc-nd/4.0/)
© 2019
This The
is an Authors.
open access Published by Elsevier
article under Ltd.
Peer-review under responsibility of the
theCC BY-NC-ND
scientific license
committee of (https://creativecommons.org/licenses/by-nc-nd/4.0/)
the International Conference on Pervasive Computing Advances
This is an open access article
and Applications – PerCAA 2019. under the CC BY-NC-ND license (https://creativecommons.org/licenses/by-nc-nd/4.0/)
Keywords: DC Motor; Fuzzy Logic; LabVIEW; PID Controller
Keywords: DC Motor; Fuzzy Logic; LabVIEW; PID Controller

1. Introduction
1. Introduction
In the proposed paper A Fuzzy based PID Controller is designed for controlling the speed of the motor. In PID
In the proposed
Controller paper
the main issueAisFuzzy
to tunebased PID Controller
the parameters for thisisthere
designed for of
is a need controlling the speedtechniques
other optimization of the motor. In PID
or algorithm
Controller
so the main
to overcome fromissue
thisisissue
to tune the parameters
Fuzzy itself tunedfor
thethis
PID there is a needonline.
parameters of otherFor
optimization techniques
this purpose numbersorofalgorithm
rules are
so to overcome from this issue Fuzzy itself tuned the PID parameters online. For this purpose numbers of rules are

* Corresponding author. Tel.: +91-950-90-67497.


* E-mail address:author.
Corresponding imdev.som@gmail.com
Tel.: +91-950-90-67497.
E-mail address: imdev.som@gmail.com
1877-0509 © 2019 The Authors. Published by Elsevier Ltd.
This is an open
1877-0509 access
© 2019 Thearticle under
Authors. the CC BY-NC-ND
Published license (https://creativecommons.org/licenses/by-nc-nd/4.0/)
by Elsevier Ltd.
This is an open access article under the CC BY-NC-ND license (https://creativecommons.org/licenses/by-nc-nd/4.0/)
1877-0509 © 2019 The Authors. Published by Elsevier Ltd.
This is an open access article under the CC BY-NC-ND license (https://creativecommons.org/licenses/by-nc-nd/4.0/)
Peer-review under responsibility of the scientific committee of the International Conference on Pervasive Computing Advances
and Applications – PerCAA 2019.
10.1016/j.procs.2019.05.019
Devendra Somwanshi et al. / Procedia Computer Science 152 (2019) 252–260 253
2 Devendra Somwanshi/ Procedia Computer Science 00 (2019) 000–000

designed with the number of membership functions which create many of the equations for speed control and tuning
of the parameters of PID. To control the Motor speed terminal voltage of the Motor is varying continuously. For the
simulation purpose LabVIEW software is used, in this paper two Controllers are designed first one is PID Controller
and second one is Fuzzy-PID Controller for the comparison purpose.

2. Objectives of the Paper

 Design Transfer Function For DC Motor in LabVIEW


 Design PID Controller in LabVIEW
 Design Fuzzy-PID Controller.
 Collect The result after simulation in LabVIEW and compare results for PID and Fuzzy-PID Controller

3. DC Motor Modeling

To design the model of the DC Motor Fig. 1 is considered. From Fig 1. Torque of the Motor is directly related to the
current i, by using a torque constant K;

T=Ki (1)

Fig.1 DC Motor Model


Voltage generated by torque ea, is proportional to angular velocity and relative with the constant K;

ea = K wm = K d𝜃𝜃/𝑑𝑑𝑑𝑑 (2)

From Fig.1 Equations for the DC Motor are based on the Newton's law, here the equations are combined with the
Kirchhoff's Law and it can be written as:-
𝑑𝑑 2 𝜃𝜃 𝑑𝑑𝑑𝑑
𝐽𝐽 + 𝑏𝑏 = 𝐾𝐾 𝑖𝑖 (3)
𝑑𝑑𝑡𝑡 2 𝑑𝑑𝑑𝑑
𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑
𝐿𝐿 + 𝑅𝑅𝑅𝑅 = 𝑉𝑉 − 𝐾𝐾 (4)
𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑

From equation (3) and (4), the transfer function from the input voltage, V(s), to the output angle,𝜃𝜃, directly follows:
𝜃𝜃(𝑠𝑠) 𝐾𝐾
G(s) = = (5)
𝑉𝑉(𝑠𝑠) [𝑆𝑆{(𝑅𝑅+𝐿𝐿𝐿𝐿)(𝐽𝐽𝐽𝐽+𝑏𝑏)+𝐾𝐾 2 }]

From Table 1.values of the parameters are assigned for the DC Motor from base Paper.
254 Devendra Somwanshi et al. / Procedia Computer Science 152 (2019) 252–260
Devendra Somwanshi/ Procedia Computer Science 00 (2019) 000–000 3

Table.1 DC Motor Parameters


Parameters Value
Armature Inductance (H) La=0.00464H

Armature resistance (ohm) Ra=3.3 Ω


Rotor inertia (kgm2) Jm= 9.64E-6 kgm^2
Armature voltage (Volt) Va(t) =240V
Viscous friction coefficient(Nms/rad) Bm=0.002953(Nms/rad)

Motor torque constant (Nm/A) Km=0.028 Nm/A

Back emf constant (V s/rad) Kb= 0.028V s/rad


Speed w=1000 rpm

3.1 DC Motor Transfer Function in LabVIEW

To Design DC Motor Transfer function we used Math Script Node. In this node we scripted the motor equations for
transfer function, and enter the Parameters of the Motor in the Inputs and we get Transfer Function While Running
the node.

Fig.2 Transfer Function for DC Motor

Fig.3 Transfer Function in Math Script Node

For designing transfer function in Math Script Node the written Code generate the Motor Equations and the Motor
parameters input manually only once in a while then from the simulation transfer function would be obtained in
LabVIEW.

4 PID Controller

To design PID Controller Following Steps are used to improve the response of system:
Devendra Somwanshi et al. / Procedia Computer Science 152 (2019) 252–260 255
4 Devendra Somwanshi/ Procedia Computer Science 00 (2019) 000–000

 To decrease rise time Proportional Gain is used.


 For less overshoot and less settling time Derivative Gain is used to.
 To maintain the error as less as possible integral gain is used.
Values of the Proportional Gain, Integral Gain and Derivative Gain are shown in the Table 2. And they are calculated
by using Ziegler Nichols Method [7]
The equation of the system is designed by using the characteristics of the parameters of Proportional, Integral &
Derivative Controllers, are applied to the Fuzzy PID Controller.

e(t) = R(t) – U(t) (6)


de(t) = e(t) – e(t-1) (7)
Rules for the Fuzzy Controller are designed as they can control the speed of the DC Motor.

5. Fuzzy based PID Controller

Fig.4 PID Controller based on Fuzzy Controller

PID Controller shows good result while comparing with the standalone Fuzzy. In Fuzzy Controller simple rules are
designed while in the Fuzzy based PID Controller multi rules can be designed for all three Controllers as proportional,
integral and derivative and it shows gains to make response faster [12]. Two inputs are used in Fuzzy-PID Controller
as Error & Change in Error. By using online Fuzzy rules, PID parameters can be tuned online by using self-tuning
Fuzzy PID Controller [10].

5.1 Defining membership functions and rules:

From the defined rules system speed is to reach the reference value. For example, rule is, 'if e(t) is NS then u(t) is DN'.
This rule is explained as; if error value is negative small then output will be negative big. All inputs and outputs are
in the form of linguistics term so it is necessary to convert them in to crisp value.
Fam Table is to be created for designing the rules for Fuzzy designer. For conversion of linguistic terms in crisp value
Fuzzy Membership Functions are used. Ranges are defined for all membership functions is -10 and 10.
In Fig.5 Five Membership Function are designed by us For Input variable Error e(t).Five linguistic terms are used for
Membership Function Negative big, Negative large, Positive big, Positive large, Zero which are denoted as
NA,NB,PA,PB,CERO. Here Used Inte- rval is -20 to 160.
In Fig.6 Two Membership Functions were designed For Change in Error Ce (t).Two linguistic terms are used for
Membership Function Negative large and Positive large which are denoted by ENA, EPA. Interval of Membership
Function of Change in Error is 10 to 70.
In Fig.7 Seven Membership Function are designed by us For Output variable Desired Speed u(t0.Seven linguistic
terms are used for Membership Function Negative big, Negative large, Negative Medium, Positive big, Positive large,
Positive Medium, Zero which are denoted as DM,DB, AM,AP,NP,NA,STR. Here used interval is 0 to 30
256 Devendra Somwanshi et al. / Procedia Computer Science 152 (2019) 252–260
Devendra Somwanshi/ Procedia Computer Science 00 (2019) 000–000 5

In Fig.8 Five Membership Function are designed by us For Input variable Error e(t).Five linguistic terms are used for
Membership Function Negative big, Negative large, Positive big, Positive large, Zero which are denoted as NA, NB,
PA, PB, CERO. Here -20 to 200 assigned as Interval for designing of Membership function. In Fig.9 Two Membership
Function are designed in the interval of 0 to 150 For Change in Error Ce(t).Two linguistic terms are used for
Membership Function Negative large and Positive large which are denoted by ENA, EPA.
In Fig.10 Seven Membership Function are designed for the interval of 0 – 65 for Output variable Desired Speed
u(t).Seven linguistic terms are used for Membership Function Negative big, Negative large, Negative Medium,
Positive big, Positive large, Positive Medium, Zero which are denoted as: DM, DB, AM, AP, NP, NA, STR.

Fig.5 Input Variable Membership Function for P-Controller Fig.6 Change in error Membership Function for P-Controller

Fig.7 Output Value Membership Function for P-Controller Fig.8 Membership Function for Input Variable for Integral Controller

Fig.9 Change in Error Membership Function for Integral Controller Fig.10 Output Variable Membership Function Integral Controller

In Fig.11 Five Membership Function are designed for Input variable Error e(t) in the interval of -20-200 .Five
linguistic terms are used for Membership Function Negative big, Negative large, Positive big ,Positive large, Zero
which are denoted as NA,NB,PA,PB,CERO.
Devendra Somwanshi et al. / Procedia Computer Science 152 (2019) 252–260 257
6 Devendra Somwanshi/ Procedia Computer Science 00 (2019) 000–000

In Fig.12 Two Membership Function are designed in the interval of 0 to 150 For Change in Error Ce (t).Two linguistic
terms are used for Membership Function Negative large and Positive large which are denoted by ENA, EPA

Fig.11 Input Variable Membership Function Derivative Controller Fig.12 Change in Error Membership Function for Derivative Controller

6. Simulation Results

From the Fig.13 & 14 In the PID Controller Design when the transfer function of dc motor is initialized to the
controller firstly the signal is process for all three controller Proportional Controller, Integral Controller and Derivative
controller at the same time, and in the last the sum of all the three controllers signal is process as resulted signal for
the PID Controller.

Fig.13. Block Diagram of PID Controller

Fig.14. Front Panel Diagram of PID Controller


258 Devendra Somwanshi et al. / Procedia Computer Science 152 (2019) 252–260
Devendra Somwanshi/ Procedia Computer Science 00 (2019) 000–000 7

Fig15. Block Diagram of Fuzzy-PID Controller


At the simulation time in the Fig.15 DC Motor Transfer Function initialized first then the reference signal processed
to both of the Controllers PID and Fuzzy Logic Controller. In Fuzzy Logic Controller all defined Membership
Functions and designed rules initialized and tuned the PID parameters. Parameters values keep modifying using Fuzzy
control rules.
In Fuzzy-PID Controller Fuzzy Controller was calculated the gain parameters by its self-tuning ability. There is no
need to put gain parameters they were also found from the Controller in the terms of k p, ki and kd and performance
parameters were measured from the responses as shown in Fig.16
Devendra Somwanshi et al. / Procedia Computer Science 152 (2019) 252–260 259
8 Devendra Somwanshi/ Procedia Computer Science 00 (2019) 000–000

1.6
1.4
1.2
1
0.8 Step input
PID Response
0.6
FUZZY Response
0.4 fuzzy-PID Response
0.2
0
1 6 11 16 21 26 31 36 41 46 51 56 61 66 71 76 81 86 91 96
-0.2

Fig.16 Responses of PID and Fuzzy-based PID Controller

Table.2 Results Comapriosn for PID and Fuzzy-PID Controller


Comparison between PID & Fuzzy-PID
Sr. No. Tuning Rule Gain Parameters Rise time(s) Settling time Peak Time Damping Ratio
kp=24.002,
1 Proposed Fuzzy PID ki=24.9809 0.007 0.0066 0.0025 0.60
kd = 2.8855
kp=0.665
2 Proposed PID ki = 90.11 0.009 0.0080 0.005 0.72
kd = 0.0005819
Kp = 28.0021
3 Fuzzy PID [14] ki = 29.980 0.0029 0.0082 0.0036 0.79
kd = 4.8855
kp = 0.665
4 PID [14] ki = 190.11 0.0053 0.0144 0.008 0.67
kd = 0.0005819

From the Table 2 Fuzzy self-calculated Gain parameters were kp = 24.0021, ki = 24.989, kd = 2.885 and performance
parameters were found as rise time in 0.007sec and settling time in 0.665sec where as For PID Controllers These
Parameters were kP = 0.665, ki = 10.11, kd = 0.000456 and for Fuzzy Controller performance parameters were found
as rise time in 0.00190sec and settling time in 0.00330sec.

7. Conclusion

Performance parameters are found individually for both controllers which are as for PID Controller rise time 0.009sec
& settling time 0.082sec, for Fuzzy-PID Controller rise time 0.006sec & settling time 0.066sec. When results of
designed Fuzzy-PID Controller is compared with the previous work then damping ratio improved by 10%, rise time
improved by 30%, settling time reduced to 20% and peak time improved by 25% for PID Controller and for Fuzzy-
PID Controller damping ratio improved by 14.29%, rise time improved by 58.57%, settling time reduced to 19% and
peak time improved by 30%. Fuzzy-PID Controller performs better than other Controllers which in fact extend from
robustness of the system to the parameter variation. Moreover simulation with LabVIEW software saves project
development time.

8. Future Scope

Instead of general DC Motor some specified DC Motor can be taken into considerations and Optimization methods
can be applied on them. It will improve their performances. Neural network can also be applied. Number of Rules
can be applied for more improved results.
260 Devendra Somwanshi et al. / Procedia Computer Science 152 (2019) 252–260
Devendra Somwanshi/ Procedia Computer Science 00 (2019) 000–000 9

References

[1] R. G. Kanojiya and P. M. Meshram. "Tuning of PID Controller using Ziegler-Nichols Method for Speed Control of DC Motor" IEEE-
International Conference On Advances In Engineering, Science And Management (ICAESM -2012), Nagapattinam, Tamil Nadu, 2012, pp.
117-122.IEEE, 2012.
[2] P. vas and M.J.E.Bulale."Design and Implementation of Fuzzy based PID Controller" Industrial Technology, IEEE ICIT '02. 2007 IEEE
International Conference on, vol.1, pp.220-225. IEEE, 2007.
[3] Fakhrulddin H. Ali and Hussein Mohammed Mahmood. “LABVIEW FPGA Implementation of PID Controller for DC Motor Speed Control”
1st International Conference on Energy, Power and Control (EPC-IQ), pp.1-6. IEEE, 2010.
[4] Wang Xiao kan and Sun Zhong liang."Design and Research based Fuzzy-PID Parameters Self-Tuning Controller with MATLAB" Advanced
Computer Theory and Engineering, 2008. ICACTE '08. International Conference on, pp.996-999, IEEE, 2008.
[5] Munaz Cesar and A. Abdelrahman. "Speed Control of DC Motor using Fuzzy Logic Controller" 2008 International Conference on
Communication, Control, Computing and Electronics Engineering (ICCCCEE), Khartoum, pp.1-8.IEEE, 2008
[6] Guishan S. Chen, "Particle Swarm Optimization for PID Controllers with Robust Testing" International Conference on Machine Learning
and Cybernetics, Hong Kong, 2007, pp.956-961.IEEE, 2007.
[7] Y.Huang and S.Yasunobu. "Design of Neuro-Fuzzy Controller” 9th International Symposium on Communications and Information
Technology, Icheon, 2009, pp.808-813, IEEE, 2009.
[8] M. M. Kamal, L. Mathew and S. Chatterji. "Speed Control of Brushless DC Motor using Genetic Algorithm" 2014 Students Conference on
Engineering and Systems, Allahabad, 2014, pp. 1-5.IEEE, 2014.
[9] Zhang Xiao Ming and Long Shi Liu. "Simulation Study of Fuzzy-PID Controller for DC Motor based on DSP" 2012 International Conference
on Industrial Control and Electronics Engineering. Pp.3401-3405.IEEE, 2012.
[10] S. G. Kadwane and S. Gupta."Real Time Based PI-Fuzzy Controller for DC Servomotor" 2006 International Conference on Power Electronic,
Drives and Energy Systems, New Delhi, 2006, pp.1-4.
[11] Zhao Yongjuan and Pan Yutitan. "The Design and Simulation of Hybrid Fuzzy-PID Controller" Information Technology and Applications
(IFITA), 2010 International Forum on, vol.3, pp.95-98, IEEE, 2010.
[12] J.P. Rey and M.M. Dalvi."A Numerical-based Fuzzy-PID Controller applied to a DC Drive" Industrial Electronics, Symposium Proceedings,
ISIE ', IEEE International Symposium on, pp.429-434, IEEE, 2009.
[13] M.Surya Kalawati. and Mitra R. "Comparative Analysis of Robustness of Optimally Offline Tuned PID Controller and Fuzzy Supervised
PID Controller" Engineering and Computational Sciences (RAECS), 2014 Recent Advances in , pp.1-6, 2014.
[14] Salim Jyoti Ohri and Naveen. “Speed Control of DC Motor using Fuzzy Controller in LABVIEW” WSEAS TRANSACTIONS on SYSTEMS
and CONTROL, IEEE Conference on Vol.10, pp.2224-2856.IEEE, 2015.
[15] Sujit Kumar and V. Kumar, "Speed Control DC Motor using Fractional Fuzzy based PID Controller" 2012 IEEE International Conference
on Engineering and Technology (ICETECH) ), Coimbatore, pp. 1-6.IEEE, 2012.
[16] Vishal Mehra and V. Kala. "Design and Simulation of FOPID Composite Parameters Controller with MATLAB" Computer Design and
Applications (ICCDA), 2010 International Conference on, vol.4, pp.V4-308-V4-311, IEEE, 2010.
[17] Ahamadraza Ahmadi and Kumari S.U. "Optimal Fuzzy-PID Controller” Power Signals Control and Computations (EPSCICON),
International Conference on, pp.1-6. IEEE, 2012.
[18] Gajal Parashar, Devendra Somwanshi “Speed control of Dc motor using PID controller: - A review” SSRG International Journal of Electrical
and Electronics Engineering. Vol. 2 issue 2. May 2016.
[19] Gajal Parashar, Devendra Somwanshi “Response Analysis of DC Motor Using PI, PC, PD, and PID Controller” International Journal of
Automatic Control System. Vol. 2. Issue 2, 2016.

You might also like