See discussions, stats, and author profiles for this publication at: [Link]
net/publication/283096505
Fuzzy based PID controller for speed control of D.C. motor using LabVIEW
Article in WSEAS Transactions on Systems and Control · January 2015
CITATIONS READS
21 2,585
2 authors, including:
Jyoti Ohri
National Institute of Technology, Kurukshetra
66 PUBLICATIONS 244 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
Sliding mode control View project
All content following this page was uploaded by Jyoti Ohri on 03 October 2016.
The user has requested enhancement of the downloaded file.
WSEAS TRANSACTIONS on SYSTEMS and CONTROL Salim, Jyoti Ohri
FUZZY Based PID Controller for Speed Control of D.C. Motor Using
LabVIEW
SALIM, JYOTI OHRI
Department of Electrical Engineering
National Institute of Technology
Kurukshetra
INDIA
salimnitk@[Link] ohrijyoti@[Link]
Abstract: - This paper presents an implementation of self-tuned PID controller (FPID) for speed control of DC
motor based on LabVIEW (Laboratory Virtual Instrument Engineering Workbench Environment). The
algorithms of fuzzy PID controller (FPID) and conventional PID controller (CPID) are implemented using PID
and Fuzzy Logic simulation toolkits of the Lab View environment. The simulation results demonstrate that the
designed self-tuned PID controller realize a perfect speed tracking with lesser rise time and settling time,
minimum steady state error and give better performance compared to conventional PID controller.
Key-Words: - DC Motor, Ziegler-Nichols Tuning, Speed Control, Fuzzy Logic and Fuzzy plus PID controller,
LabVIEW.
1 Introduction 2 DC Motor Mathematical Model
Virtual instrumentation is the use of optimizable DC motor system is a separately excited DC motor,
software and modular measurement hardware to which is often used to the velocity tuning and the
aids in creating a user-defined measurement system, position adjustment [3] [10].The equivalent circuit
called virtual instruments. LabVIEW is a software of the DC motor using the armature voltage control
package for high performance numerical method is shown in Fig.1:
computation and visualization. It is ideal for any
measurement or control system, and the heart of the
NI (National Instruments) design platform. NI-
LabVIEW provides comprehensive tool that is
needed to build any measurement or control
application in dramatically lesser time, LabVIEW is
the ideal development environment for innovation,
discovery, and accelerated results [4][8].
In this paper, speed of a DC motor is
controlled using different tuning algorithms. The
DC motors are popular in the industry control area Fig.1: Equivalent circuit of the DC motor.
for a long time because they possess good
characteristics, for example: high start torque Where
characteristics, high response performance, easier to : Armature resistance (Ω)
be linearly controlled etc. The basic property of DC : Armature inductance (H)
motor is that speed of DC motor can be adjusted by : Armature current (A)
varying its terminal voltage. Therefore, the DC : Field current (A)
motor control is better than other kinds of motors. : Input voltage (V)
The real-time application can be easily understood : Back electromotive force (EMF) (V)
and interfaced with LabVIEW with a quick response : Motor torque (Nm)
but it may not be very apparent and easily ω : An angular velocity of rotor (rad/s)
comprehensive with MATLAB and other simulation J : Rotor inertia (kgm )
software. In the present work, PID controller is used B : Friction constant (Nms/rad)
to control the speed of the DC motor. : EMF constant (Vs/rad)
: Torque constant (Nm/A)
E-ISSN: 2224-2856 154 Volume 10, 2015
WSEAS TRANSACTIONS on SYSTEMS and CONTROL Salim, Jyoti Ohri
The functional block diagram of a DC motor The transfer function is expressed as follows,
armature voltage control system is shown in Fig.2:
34 6 5
C s K& ( ( K.s (3)
5 7 5
PID controllers are tuned in terms of , !
and " . Ziegler- Nichols is a type of continuous
cycling method for controller tuning. The term
continuous cycling refers to a continuous oscillation
Fig. 2: DC motor armature control system block diagram. with constant amplitude and is based on the trial-
and-error procedure of changing the proportional
The transfer function of DC motor speed with gain ( ). Is increased from small value till the
respect to the input voltage can be written as point at which the system goes to unstable. Thus the
follows, gain at which system starts oscillating is noted as
the ultimate gain ( 9 ) and period of oscillations is
ѡ the ultimate time period (:9 ).
(1)
∗ ∗ ∗ These two parameters, 9 and :9 are used to find
the loop-tuning constants of the PID controller using
the formula tabulated in Table.1 [3] [8]
A LabVIEW based DC motor model was built in
order to run fuzzy and PID algorithms and also to
analyze their works.
Controller ;< ;= ;>
P 0.5 9 ∞ 0
3 Tuning Methods
Speed of DC motor can be controlled using different :9
tuning methods and are as follows:- PI 0.45 9 0
I. PID Controller (Ziegler- Nichols Method) 1.2
II. Fuzzy Controller
III. PID Plus Fuzzy Controller :9 :9
PID 0.6 9
2 8
3.1 PID Controller (Ziegler- Nichols Method) Table.1 for Ziegler Nichols parameters
The development of PID control theories has The advantage of this method is that it is a proven
already started in early sixties. PID control has been online method and includes dynamics of whole
one of the control system design methods of the process, which gives a more accurate picture of how
longest history. PID controller is mainly to adjust an the system is behaving.
appropriate proportional gain ( ), integral gain
( ! ), and differential gain ( " ) to achieve the
optimal control performance [4][6]. The relationship 3.2 Fuzzy Controller Design
between the input e(t) and output u(t) can be Fuzzy Logic (FL) incorporates a simple, rule-based
formulated in the following,
IF X AND Y THEN Z approach to a solving
, /0 , control problem rather than attempting to model a
U t K & e t ( K ) *- e t dt ( K . (2)
/, system mathematically. Fuzzy logic provides an
alternative way to represent linguistic and subjective
A general PID controller system block diagram is
shown in Fig.3: attributes of the real world in computing. FL
requires some numerical parameters in order to
operate such as what is considered significant error
and significant rate-of-change-of-error, but exact
values of these numbers are usually not critical
unless very responsive performance is required in
which case empirical tuning would determine
Fig. 3: PID controller system block diagram. them.[7] [10]
E-ISSN: 2224-2856 155 Volume 10, 2015
WSEAS TRANSACTIONS on SYSTEMS and CONTROL Salim, Jyoti Ohri
Fuzzy controller process block is shown in Fig.4:
Fig.7: Membership Function for change of error signal.
Fig.4: Process Blocks for a Fuzzy Controller.
Basically, FLC process is based on experiences and
linguistic definitions instead of system model. The
input to the Fuzzy Controller are error e(t) and
Change of error de(t). Fig.8: Membership Function for output signal.
e(t) = R(t) – U(t) (4) Based on speed of error, change of error, output
signal and some defined set of rules we have input –
de(t) = e(t) – e(t-1) (5) output relationship for fuzzy controller as shown in
Fig 9. Here U(t) is output signal, e(t) is speed of
error and Ce(t) is change of speed of error.
Using fuzzy control rules speed of DC motor can be
controlled. Block diagram for speed control of DC
motor using fuzzy controller is shown in Fig.5:
Fig.5: Speed control of DC motor using fuzzy controller.
Fig.9: Input and output relationship for fuzzy controller.
Fuzzy membership function using triangular and
trapezoidal functions for speed of error is shown in
Fig 6; for speed of change of error is shown in Fig
3.2 PID Plus Fuzzy Controller Design
7; and for output signal is shown in Fig 8.
Fuzzy plus PID (FPID) provides good performance
as compared to standalone Fuzzy. Simple rule base
are used for Fuzzy controller while FPID uses
different rule base for proportional, integral and
derivative gains to make response faster [12].
The input to the Self-tuning Fuzzy PID
Controller are error e(t) and Change of error de(t) as
given in Eqn.4 and in Eqn.5. Using fuzzy control
rules on-line, PID parameters , ! and " is
adjusted, which constitute a self-tuning fuzzy PID
controller is shown in Fig 10.
Fig.6: Membership Function for error signal.
E-ISSN: 2224-2856 156 Volume 10, 2015
WSEAS TRANSACTIONS on SYSTEMS and CONTROL Salim, Jyoti Ohri
The gains parameters , ! and " are finalized
and optimized automatically instead of manual
calculation of the gains.
Fig.14: Membership Function for output signal ( D )
Fig.10: The structure of self-tuning fuzzy PID controller.
Fuzzy membership function using triangular
functions for speed of error is shown in Fig 11; for
speed of change of error is shown in Fig 12; output
signal for proportional gain is shown in Fig 13;
output signal for integral gain is shown in Fig 14;
and output signal for derivative gain is shown in Fig
15.
Fig.15: Membership Function for output signal ( E)
Input output relationship for proportional, integral
and derivative controller based on error signal,
change of error signal and respective output signals
for fuzzy plus PID controller are shown in Fig.16,
Fig.17, and Fig.18 respectively.
, ! and " are output signals, e(t) is speed of
error and Ce(t) is change of speed of error.
Fig.11: Membership Function for error signal (FPPID).
Fig.16: I/O relationship for Proportional controller ( C ).
Fig.12 Membership Function for change of error signal
(FPPID).
Fig.13 Membership Function for output signal ( Fig.17: I/O relationship for Integral controller ( D ).
C)
E-ISSN: 2224-2856 157 Volume 10, 2015
WSEAS TRANSACTIONS on SYSTEMS and CONTROL Salim, Jyoti Ohri
Front Panel and Block Diagram view for speed
control of DC motor using different tuning methods
is shown in Fig.20 and Fig.21 respectively.
Fig.18: I/O relationship for derivative controller ( E ).
4 Simulation Results
We have used LabVIEW software for simulation
work in controlling the speed of DC motor because
it is suitable for creating flexible and scalable
design, control and test applications rapidly at
minimal cost. Execution time and survey ability is
better in LabVIEW so we use LabVIEW for DC
motor speed control.
Fig.20: Front panel window for PID, Fuzzy and Fuzzy
plus PID controller.
4.1 DC motor model is to be created with the
help of LabVIEW Math script.
4.2 Step response is to be calculated using
Armature resistance ( ) = 3.3 Ω PID controller, Fuzzy controller and
Torque constant ( ) = 0.028Nm/A FPID controller for speed control of DC
Armature inductance ( ) = 0.00464H motor.
Friction constant (Β) = 1.8E-6Nms/rad
Rotor inertia (J) = 9.64E-6 kgF
EMF constant ( ) = 0.028 Vs/rad
[Link]
G(s) = [Link] ∗P H [Link] ∗P [Link]
(6)
Fig.19: Math script model of DC Motor.
Fig.21: Block diagram window for PID, Fuzzy and Fuzzy
plus PID controller.
E-ISSN: 2224-2856 158 Volume 10, 2015
WSEAS TRANSACTIONS on SYSTEMS and CONTROL Salim, Jyoti Ohri
4.3 Comparison between PID, Fuzzy and [4] Brian R Copeland, “Using the Lab-VIEW PID
Fuzzy plus PID controller step response Control Toolkit with the LabVIEW Control
Design and Simulation Module”, Sep 2009.
specifications.
[5] K.P Ramachandran “Control Engineering”
Tuning Rule Wiley Precise Textbook”,2011.
Comparison [6] “Tuning of PID Controller using Ziegler-
Fuzzy Fuzzy Plus Nichols Method for Speed Control of DC
between PID, PID Motor”, ISBN:978-81-909042-2-3, IEEE 2012.
logic PID
Fuzzy and FPID [7] Y. Tipsuwan, Y. Chow, “Fuzzy Logic
Microcontroller Implementation for DC Motor
Damping ratio 0.67 0.76 0.79
Response Specification
Speed Control”, IEEE 1999.
Peak time (s) 0.008 0.0048 0.0036 [8] Bishop, R. H., “Learning with LabVIEW”,
Addison-Wesley, 1999.
Gain margin ∞ ∞ ∞ [9] “LabVIEW based Intelligent Controllers for
Rise time (s) 0.0053 0.004 0.0029 Speed Regulation of Electric Motor”, ISBN: 0-
7803-8879-8, IEEE, 2005.
Settling time(s) 0.0144 0.0114 0.0082 [10] [Link] and [Link],
Dead time (s) 0.0036 0.0033 0.0025 “Implementation of Fuzzy PI Controllerfor
Speed Control of Induction Motor Using
Table.2: Step response specifications for PID, Fuzzy and FPGA, Journal of Power Electronics, Vol.10,
Fuzzy plus PID controllers respectively. No.1, pp.65-71, Jan 2010.
[11] R. Arulmozhiyal, [Link], “Design of
5 Conclusion Fuzzy PID Controller for Brushless DC Motor,
From the simulation results tabulated in Table.2 it is International Conference on Computer
concluded that using Fuzzy plus PID controller Communication and Informatics, Jan 2012.
damping ratio, rise time, settling time and peak time
is better than PID and Fuzzy controller. It can easily
be deduced that FPID (Fuzzy plus PID) can
maintain the speed at desired values irrespective of
change of load. It can also be concluded that a
superior performance is guaranteed than other
conventional controllers which in fact extends from
robustness of the system to the parameter variation.
Moreover simulation with LabVIEW
software saves project development time as the
motor position and generation of proper motor
control signal can be easily adjusted. LabVIEW
debugging tool is self-adaptive and easy to
implement which saves considerable amount of time
than other simulation software’s like MATLAB.
References:
[1] Liau, J. C., LabVIEW PID Control Toolset
User Manual, National Instruments, 2001. A
Study of Lab-VIEW Aided in DC Motor Speed
Monitoring System. National Taiwan Ocean
University Department of Mechanical and
Mechatronic Engineering,2000.
[2] National Instruments LabVIEW 2013 Help,
Part Number 371361K-01,Edition June 2013.
[3] Brian R Copeland, “The Design of PID
Controllers using Ziegler Nichols Tuning”,
March 2008.
E-ISSN: 2224-2856 159 Volume 10, 2015
View publication stats