Speed Control of DC Motor Using Fuzzy Logic Based On Labview

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

International Journal of Scientific and Research Publications, Volume 3, Issue 6, June 2013 1

ISSN 2250-3153

Speed Control of DC Motor using Fuzzy Logic based on


LabVIEW
Salim*, Jyoti Ohri**, Naveen***
*
Electrical Department, National Institute of Technology Kurukshetra
**
Electrical Department, National Institute of Technology Kurukshetra
***
Electrical Department, UIET, Kurukshetra University Kurukshetra

Abstract- Speed control of DC Motor is vital in many


applications. In this paper, an effort has been made to control the II. SYSTEM DESCRIPTION
speed of the DC motor using fuzzy logic control (FLC) based on DC MOTOR MATHEMATICAL MODEL - DC motor system is a
LabVIEW (Laboratory Virtual Instrument Engineering separately excited DC motor, which is often used to the velocity
Workbench) program. LabVIEW provides a graphical tuning and the position adjustment. The equivalent circuit of the
programming environment suited for high-level or system-level DC motor using the armature voltage control method [8] is
design. The fuzzy logic controller designed to apply the required shown in Figure 1:
control voltage that sent to dc motor based on fuzzy rule base of
motor speed error (e) and change of speed error (Ce). In this
paper results of FLC, PI and PID Controller are compared. The
simulation results demonstrate that the response of DC motor
with FLC show a satisfactory well damped control performance.

Index Terms- DC Motor, Ziegler-Nichols Tuning, Speed


Control, Fuzzy Logic and PID controller, LabVIEW

I. INTRODUCTION Figure 1: Equivalent circuit of the DC motor.

T he DC motors have been popular in the industry control area


for a long time, because they have many good
characteristics, for example: high start torque characteristic, high
Where
: Armature resistance (3.3Ω)
response performance, easier to be linear control etc. There are : Armature inductance (0.00464H)
different control approaches which depend on the different : Armature current (A)
performance of motors. The basic property of DC motor is that : Field current (A)
speed can be adjusted by varying the terminal voltage. Therefore, : Input voltage (V)
the DC motor control is riper than other kinds of motors. Classic : Back electromotive force (EMF) (V)
Control has proven for a long time to be good enough to handle
: Motor torque (Nm)
control tasks on system control; however its implementation
 : An angular velocity of rotor (rad/s)
relies on an exact mathematical model of the plant to be
J : rotor inertia (9.64E-6kg )
controlled and not simple mathematical operations. The fuzzy
B : Friction constant (1.8E-6Nms/rad)
logic, unlike conventional logic system, is able to model
inaccurate or imprecise models. The fuzzy logic approach offers : EMF constant (0.028Vs/rad)
a simpler, quicker and more reliable solution that is clear : Torque constant (0.028Nm/A)
advantage over conventional techniques. Fuzzy logic may be
viewed as form of set theory [1]. When compared to the Because the back EMF is proportional to speed  directly,
conventional controller, the main advantage of fuzzy logic is that hence
no mathematical modeling is required. Since the controller rules (1)
are especially based on the knowledge of the system behavior
and experience of the control engineer, the FLC requires less
Making use of the KCL voltage law we can get
complex mathematical modeling than classical controller does.
LabVIEW is better for control applications and MATLAB is
better for data manipulation. LabVIEW is the graphical (2)
development environment for creating flexible and scalable test,
measurement, and control applications rapidly and at minimal From Newton law, the motor torque can obtain
cost.
(3)

www.ijsrp.org
International Journal of Scientific and Research Publications, Volume 3, Issue 6, June 2013 2
ISSN 2250-3153

Taking Laplace transform, the above equations can be The relationship between the input e(t) and output u(t) can be
formulated as follows: formulated in the following,

(4)
(9)
(5)
The transfer function is expressed as follows,
(6)
(10)
The DC motor armature control system functional block diagram
from equations (4) to (6) is shown in Figure 2: The PID DC motor speed control system block diagram is shown
in Figure 4:

Figure 2: DC motor armature control system functional block diagram.

The transfer function of DC motor speed with respect to the input Figure 4: PID DC motor speed control system block diagram
voltage can be written as follows [11],
The closed loop transfer function of DC motor speed control
(7) system expresses as follows,

(8)
(11)

A LabVIEW based servo control system was built in order to run


fuzzy and PID algorithms and also to analyze their works. The
control system’s aims are %0.5 or less overshot, No steady state (12)
error, Minimum settling time, Minimum rising time.
Ziegler- Nichols is a type of continuous cycling method for
III. PID CONTROLLER DESCRIPTION AND DESIGN controller tuning. The term continuous cycling refers to a
continuous oscillation with constant amplitude and is based on
The development of PID control theories has already been from the trial-and-error procedure of changing the proportional gain
60 years. PID control has been one of the control system design ( ). is increased from small value till the point at which the
method of the longest history. However, this method is still system goes to unstable. Thus the gain at which system starts
extensively used [7] [8]. PID controller is mainly to adjust an oscillating is noted as ultimate gain ( ) and period of
appropriate proportional gain ( ), integral gain ( ), and oscillations is ultimate time period ( ). It allows us to use the
differential gain ( ) to achieve the optimal control performance. ultimate gain value, Ku, and the ultimate period of oscillation
These functions have been enough to the most control processes. ( ) to calculate and . These two parameters, and
The PID controller system block diagram is shown in Figure 3: are used to find the loop-tuning constants of the controller (P,
PI, or PID) using the formula tabulated in Table I:

Controller
P 0.5  0

PI 0.45 0

PID 0.6
Figure 3: PID controller system block diagram.
Table I: for Ziegler Nichols parameters

www.ijsrp.org
International Journal of Scientific and Research Publications, Volume 3, Issue 6, June 2013 3
ISSN 2250-3153

Then according to Z-N tuning rule, by using ultimate gain and linguistic. A preprocessor block in Figure: 5 shows the
ultimate period P, PI, PID gains and obtained using conditions of measurements before enter the controller.
relation and [14] for DC motor is
Fuzzification: The first block inside the controller is
shown in Table II:
fuzzification which converts each piece of input data to degrees
of membership by a lookup in one or several membership
Controller functions.

P 0.5542 0 0 Rule Base: The collection of rules is called a rule base. The
PI 0.4987 85.5540 0 rules are in “If Then “format and formally the If side is called the
conditions and the Then side is called the conclusion. The
PID 0.6650 190.011 0.0005819
computer is able to execute the rules and compute a control
Table II: Simulated results for Ziegler Nichols. signal depending on the measured inputs error (e) and change in
error (Ce).
PID controller transfer function for DC motor using Ziegler
Nichols tuning method is shown in Equation 13. Defuzzification: Defuzzification is when all the actions that
have been activated are combined and converted in to a single
non-fuzzy output signal which is the control signal of the system.
U(s) / E(s) (13) The output levels are depending on the rules that the systems
have and the positions depending on the non-linearity’s existing
IV. FUZZY CONTROLLER DESCRIPTION & DESIGN to the systems. To achieve the results, develop a control curve of
the system representing the I/O relation of the system, and based
The fuzzy logic foundation is based on the simulation of people's on the information define the output degree of membership
opinions and perceptions to control any system. One of the function with the aim to minimize the effect of non-linearity.
methods to simplify complex systems is to tolerate to
imprecision, vagueness and uncertainty up to some extent [15]. Post processing: The post processing block often contains an
Fuzzy provides a remarkably simple way to draw definite output gain that can be tuned and also become as an integrator.
conclusions from vague ambiguous or imprecise information. It
is suitable for applications such as the speed control of dc motor An expert operator develops flexible control mechanism using
which has non-linearities. words like "suitable, not very suitable, high, little high and much.
A fuzzy control system is a control system in which a Figure 5: Shows process blocks for a fuzzy controller.
mathematical system that analyzes analog input values in terms
of logical variables that take on continuous values between 0 and
1, in contrast to classical or digital logic, which operates on
discrete values of either 1 or 0 (true or false, respectively). Fuzzy
Logic provides a simple way to arrive at a definite conclusion
based upon vague, ambiguous, imprecise, noisy, or missing input
information. Fuzzy Logic’s approach to control problems mimics
how a person makes decisions, only much faster. Fuzziness is
connected with the degree to which events occur rather than
likelihood of their occurrence.
FLC have some advantages compared to other classical
controller such as simplicity of control, low cost and the Figure 5: Process Blocks for a Fuzzy Controller.
possibility to design without knowing the exact mathematical
model of the process. Fuzzy logic incorporates an alternative way Although the classic controllers depend on the accuracy of the
of thinking which allows modeling complex systems using system model and parameters, FLC uses different strategies for
higher level of abstraction originating from the knowledge and motor speed control. Basically, FLC process is based on
experience. experiences and linguistic definitions instead of system model. It
is not required to know exact system model to design FLC. In
Components Characteristic of a Fuzzy Controller: addition to this, if there is not enough knowledge about control
 Preprocessing process, FLC may not give satisfactory results [18].
 Fuzzification
 Rule Base Defining Input and Output:
 Defuzzification The goal of designed FLC in this study is to minimize speed
 Post processing error. In addition, the change of error plays an important role to
define controller input. Consequently FLC uses error (e) and
Preprocessing: The inputs are most often hard or crisp change of error (Ce) for linguistic variables which are generated
measurement from some measuring equipment rather than from the control rules. Equation (14) and Equation (15),
determines required system equations.

www.ijsrp.org
International Journal of Scientific and Research Publications, Volume 3, Issue 6, June 2013 4
ISSN 2250-3153

e(t) = r(t) – u(t) (14)


Simulation results for P PI PID and fuzzy controller are shown in
(t) = e(t) – e(t-1). (15) Figure: 9 to Figure: 12.

r(t) is desired speed and u(t) is actual speed.

Defining membership functions and rules:


System speed comes to reference value by means of the defined
rules. For example, first rule is, 'if e(t) is NA then u(t) is DM'.
According to this rule, if error value is negative large then output
will be negative large. To calculate FLC output value, the inputs
and outputs must be converted from 'crisp' value into linguistic
form. Fuzzy membership functions are used to perform this
conversion. In this paper, all membership functions are defined
between -5 and 5 intervals.
Figure: 8 Sub VI for DC motor using Fuzzy and PID controller.
Fuzzy rule data base used are ‘if e(t) is NA then u(t) is DM'. 'if
e(t) is NB then u(t) is DB'. 'if e(t) is CERO then u(t) is STR'. 'if
e(t) is CERO and Ce(t) is ENA then u(t) is AM'. 'if e(t) is CERO
and Ce(t) is EPA then u(t) is DM'. ‘if e(t) is PA then u(t) is AM'.
'if e(t) is PB then u(t) is AP'.

Figure: 9 Step Response for proportional controller.

Figure: 6 Membership functions of position error e (t).

Figure: 10 Step Response for proportional plus integral controller

Figure: 7 Membership functions of control signal u (t).

V. EXPERIMENTAL RESULTS
The operation of a FLC is based on heuristic knowledge and
linguistic description to perform a task. The performance of the
FLC is then improved by adjusting the rules and membership
function. The designed FLC consists of three components.

 Fuzzification of input values


 Fuzzy inference
 Defuzzification of fuzzy output

www.ijsrp.org
International Journal of Scientific and Research Publications, Volume 3, Issue 6, June 2013 5
ISSN 2250-3153

gains optimal performance.


2. The proposed controller achieved to overcome the
disadvantage of conventional controller’s sensitiveness to inertia
variation and sensitiveness to variation of the speed with drive
system of dc motor.

REFERENCES
[1] Lab VIEW PID Control Toolset User Manual, National Instruments, 2001.
Liau, J. C., A Study of Lab-VIEW Aided in DC Motor Speed Monitoring
System. National Taiwan Ocean University Department of Mechanical &
Mechatronic Engineering, 2000.
[2] Lab VIEW Basics I Course Manual, National Instruments, 1999.
[3] Brian R Copeland, The Design of PID Controllers using Ziegler Nichols
Figure: 11 Step Response for PID controller. Tuning, (March 2008)
[4] Using the Lab-VIEW PID Control Toolkit with the Lab VIEW Control
Design and Simulation Module Sep 2009
[5] K.P Ramachandran ‘Control Engineering’Wiley Precise Textbook, 2011.
[6] Graham C. Goodwin, Stefan F. Graebe, Mario E. Salgado ‘Classical PID
Control’(Control System Design, Prentice Hall PTR)
[7] PID Control of Continuous Processes by John W. Webb Ronald A. Reis.
[8] PC-based PID Speed Control in DC Motor, Guoshing Huang, Shuocheng
Lee, Department of Electronic Engineering, National Chin-Yi University of
Technology, 35, Lane 215, Chung-Shan Rd., Sec. 1, Taiping, Taichung,
Taiwan, 41111, ROC E-mail:hgs@ncut.edu.tw
[9] "Getting in tune with Ziegler-Nichols," Thomas R. Kurfess, PhD, in the
Academic Viewpoint column, Control Engineering magazine, Feb 2007
issue, p. 28, http://www.controleng.com/.
[10] A more recent survey that covers the Ziegler-Nichols and Kappa-Tau tuning
Figure: 12 Step Response for Fuzzy controller. rules: "Automatic Tuning of PID Controllers," Karl J. Åström & Tore
Hägglund, Chapter 52, The Control Handbook, IEEE/CRC Press, 1995,
William S. Levine ed.
Comparison of PID controller and Fuzzy controller step response
[11] PID Example: DC Motor Speed Control
specifications are tabulated in Table III.
[12] "ACTZiegler-NicholsTuning,"
http://ourworld.compuserve.com/homepages/ACTGMBH/zn.htm
Tuning rule [13] Tuning of PID Controller using Ziegler-Nichols Method for Speed Control
Response PID Fuzzy logic of DC Motor.ISBN:978-81-909042-2-3, 2012 IEEE.
specification [14] J. Yan, M. Ryan and J. Power, Using fuzzy logic toward intelligent system,
Prentice Hall, New York,1994.
Damping ratio 0.46 0.70
[15] J.Klir, George, Yuan, Bo. : "Fuzzy Sets and Fuzzy Logic Theory and
Peak time (s) 0.0061 0.00275 Applications"
Peak value 1.275 1.25 [16] L. A. Zadeh, "Fuzzy Sets" informat Control, vol.8, pp 338-353, 1965.
Gain margin ∞ ∞ [17] L. A. Zadeh, "Outline of a new approach to the analysis complex systems
Rise time (s) 0.00325 0.002 and decision processes" IEEE Trans. Syst. Man Cybem, vol.SMC-3, PP. 28-
44, 1973.
Settling time (s) 0.0115 0.007 [18] Y. Tipsuwan, Y. Chow, "Fuzzy Logic Microcontroller Implementation for
Dead time (s) 0.00155 0.00125 DC Motor Speed Control", IEEE, 1999.
Table III: Comparison of PID controller and Fuzzy controller.

From the simulation results tabulated in Table III: it is concluded


that by step response specifications using Fuzzy controller AUTHORS
damping ratio, rise time, settling time, peak value and peak time First Author – Salim, M.TECH (control system), NIT
is better than PID controller. Fuzzy controller results in less Kurukshetra and salimnitk@gmail.com.
oscillation at the control system response. Less oscillations
means better controllability and less sensitivity to change in
Second Author – Dr. Jyoti Ohri, Ph.D. Associate professor,
system condition.
NIT Kurukshetra and ohrijyoti@rediffmail.com
VI. CONCLUSION
Third Author –Naveen, M.Tech, UIET Kurukshetra University,
The results of experiment demonstrate that the proposed fuzzy Kurukshetra and giranaveen@yahoo.com
logic controller is sensitive to variation of the reference speed.
The results of the controller are as follows.
1. The speed control of dc motor by proposed controller (FLC)

www.ijsrp.org

You might also like