You are on page 1of 7

International Journal of Social Science and Technology ISSN: 2415-6566 Vol. 2 No.

4; August 2017

Design of Self Tuning PID Controller Using Fuzzy Logic for DC


Motor Speed

Dr. Ala Eldin Abdallah Awouda


Sudan University of Science and Technology
Musaab Hassan Mergani
College of Engineering, School of Electronics Sudan University of Science and Technology
ala_awouda@yahoo.com College of Engineering, School of Electronics
mosaabhsn@hotmail.com

1. Introduction
Abstract: The development of high performance
motor drives is very important in industrial as well A basic control system has an input, a
as other purpose applications such as electric process, and an output. The basic objective of
trains and robotics. Generally, a high-performance control system is of regulating the value of some
motor drive system must have good dynamic speed physical variable or causing that variable to change
command tracking and load regulating response to in a prescribed manner in time.
perform task.
For a large variety of Industrial applications
In this paper present an implementation of dc motors are being used such as elevators, electric
self-tuned Fuzzy-PID controller for speed control trains, automobiles, robots. Micro-machines are
of DC motor based MATLAB/SIMULINK. The electric machines with parts the size of red blood
algorithms of Fuzzy-PID controller and cells, and find many applications in medicine.
conventional PID controller are implemented using Several conventional and numeric
PID and Fuzzy logic simulation toolkit of the Mat controller types, the controllers can be:
lab. Proportional integral (PI), proportional integral
derivative (PID), Fuzzy Logic Controller (FLC) or
The simulation results demonstrate that the the combination between them: Fuzzy-Neural
designed self-tuned Fuzzy-PID controller realize a Networks, Fuzzy-Genetic Algorithm, Fuzzy-Ants
perfect speed tracking with lesser over shoot and Colony, Fuzzy-PID.
settling time, minimum steady state error and give Control system design and analysis
better performance compared to conventional PID objectives include: producing the response to a
controller and Fuzzy controller. transient disturbance follows a specified pattern
Key Words: DC Motor, Speed Control, Ziegler (over-damped or under damped), minimizing the
Nichols method, PID Controller, Fuzzy Logic steady-state errors, and achieving the stability. [1]
Controller and Fuzzy-PID Controller,
MATLAB/SIMULINK.

2. DC Motor Mathematical Model


In armature control of separately excited DC
motors, the voltage applied to the armature of the
motor is adjusted without changing the voltage
applied to the field. The development of the
27
International Journal of Social Science and
nd T
Technology ISSN: 2415-6566 Vol.
Vo 2 No. 4; August 2017

mathematical model is to relate the voltag


voltage applied 3. Tuning Methods
to the armature to the velocity of the motor [14]
[7].the equivalent circuit of the DC motor is shown Speed of DC motorr can be controlled using
in fig.1: different tuning methods
hods such
s as:
I. PID Controller
troller.
II. Fuzzy Logic Controller.
Co
III. Fuzzy-PID
D Controller.
Con

3.1PID Controller (Ziegler--Nichols)


The structure of PID includes proportional
term, integral term and derivative
deriv term. The PID
controller is mainly to adjust appropriate
proportional gain (kP),, integral
inte gain (ki), and
Fig.1: equivalent circuit of the DC
Cmmotor. differential gain (kd) to achieve
achiev the optimal control
performance. PID structureture as shown in Fig.3, r (t)
Whereas: is reference, e (t) is error, u (t)
( is controller output
Va:Voltage source (v) and y (t) system output.
Ra:Armature resistance (Ω)
La:Armature inductance (H)
Ia: Armature current (A)
Vc: Induced voltage (v)
Wa: Angular velocity of rotor (rad/s)
J: Rotor inertia (kgm2)
Β: Friction constant (Nms/rad)
Kb:Back electromotive forceconstant
stant ((vs/rad)
Kv:Torque constant (Nm/A) Fig.3: PID Controlle
roller Structure

The overall transfer functionon bet


between the Relation between the input
nput e (t) and output u (t)
output angular velocity and inpu input applied can be formulated in the following:
follow
voltage given within the last block
ck in ffig.2
e (t)=r(t)-y(t)
y(t)..(2)

U (t) =kP.e (t) +kI dt+kD. … (3)

The transfer function is expressed (Laplace


Fig.2: block diagram of the DC motor
otor model domain):

The transfer function of DC C mo


motor speed C(S) = =kP+ +kDS... (4)
with respect to the voltage source
Can be written as: PID controllers are tuned
tun in terms of Kp, KI
and KD. Ziegler-Nichols ls is atype of controller
(1) tuning.It is performed by
y setting
settin the I (integral) and
∧ D (derivative) gains to zero.
ero. The
T "P" (proportional)
gain,kP is then increasedsed (from
( zero) until it
MATLAB based DC motor model was built
reaches the ultimate gainku, at
a which the output of
in order to run fuzzy and PID algori
algorithms and
the control loop hass stablesta and consistent
also to analyze.
28
International Journal of Social Science and Technology ISSN: 2415-6566 Vol. 2 No. 4; August 2017

oscillations.kuand the oscillation period Tuare used


to set the P, I, and D gains depending on the type
of controller used:[3]
Table.1: Ziegler–Nichols Method

Fig.5: Simulink Model of the System Using Fuzzy Logic


Controller

Fuzzy membership function using


triangular functions for error input in Fig.6 for
change of error inputs in Fig.7, and for output in
3.2 Fuzzy Logic Controller
Fig.8.
Fuzzy logic is express by means of the
human language. Based on fuzzy logic, a fuzzy
controller converts a linguistic control strategy into
automatic control strategy, and fuzzy rules are
constructed by expert experience or knowledge
database (IF X AND Y THEN Z). Fuzzy logic
controller (FLC) process is shown in Fig.4.
Fig.6: Membership Functions for Error Input.

Fig.7: Membership Functions for Change of Error Input.


Fig.4: Process of Fuzzy Logic Controller

First, set the error e (t) and the change of


error ce(t) of the angular velocity to be the variable
inputs of the fuzzy logic controller. The control
voltage u(t) is the variable output of the fuzzy logic
controller.
E (t) = r(t) – u(t)... (5) Fig.8: Membership Function for Output.

Ce(t) = e(t) – e(t-1)... (6) Based on speed of error, change of error,


output and defined set of rules we have input and
Block diagram for speed control of DC output relationship for fuzzy controller as shown in
motor using fuzzy logic controller is shown in Fig.9.
Fig.5.

29
International Journal of Social Science and
nd T
Technology ISSN: 2415-6566 Vol.
Vo 2 No. 4; August 2017

change ki is shown in Fig.14,


Fig the degree of
membership of change kdis shown
sh in Fig.15.

Fig.9: Input and Output Relation for Fuzzy


zy Co
Controller.
Fig.11: Degree of Membership
p of Speed Control Error (e).
3.3Fuzzy-PID Controller
The structure of the fuzzy auto tu tuning PID
controller designed for control speedd of ddc motor is
shown in Fig.10. Its inputs are error (e (e) and the
change of error (ce).the fuzzy auto to tu
tuner block
adjusts the parameter of the increme cremental PID
controller,and the incremental PID controller
calculates the control output.

Fig.12: Degree of Membership of Change


C Speed Error (ce).

Fig.10: The Structure of Self-Tuning Fuzzy-PID


PID Controller

The fuzzy auto-tuning of PID ID co


controller is Fig.13: Degree of Member
bership of Change kp
to find the fuzzy logic relationshipp betw
between three
parameters of PID with error (e)and and cchange of
error (ce), calculate(e)and (ce)in cyclcycle in the
operation of control system and adjust (k(kp),(ki)and
(kd)on-line according to the fuzzyy logi
logic control
principle .
Set the membership functionction of fuzzy
variables as triangle membership rship function
(trimf),the degree of membership function
nction of speed Fig.14: Degree of Member
bership of Change ki.
control error (e) is shown in Fig.11,
1, the degree of
membership of change speed error (ce) is shown in
Fig.12, the degree of membership of chachange kp is
shown in Fig.13, the degree of memb membership of

30
International Journal of Social Science and Technology ISSN: 2415-6566 Vol. 2 No. 4; August 2017

Fig.15: Degree of Membership of Change kd

According to the membership degree


calculation of all fuzzy variable sets, and the fuzzy Fig.17: Error of the Closed Loop System Using PID
tuning rule sets and algorithms of all control Controller
parameters, the mamdani-type inference system
Fuzzy-PID is developed using the fuzzy control Fig.18 show performance of the Fuzzy
simulation toolbox” fuzzy “ofMATLAB. controller.Fig.19 shows Error of the closed loop
system using Fuzzy controller.
4. Results
After simulating the process control of
speed control system models by using
MATLAB/SIMULINK, the performance of the
controllers was analyzed by comparing the output
signal represented by the graph.
Fig.16 shows performance of the PID
controller. Using Ziegler-Nichols method to tune
PID controller parameters.Fig.17 shows Error of
the closed loop system using PID controller. Fig.18: Step Response of the System with Fuzzy Controller.

Fig.16: Step Response of the System with PID Controller.


Fig.19: Error of the Closed Loop System Using Fuzzy
Controller

Fig.20 showstep response of system using


fuzzy-PID controller. Fig.21 shows Error of the
closed loop system using fuzzy-PID controller.

31
International Journal of Social Science and Technology ISSN: 2415-6566 Vol. 2 No. 4; August 2017

amplitude
Peak time 0.0742 0.25 0.29
(sec)
% 48.3 4.5 0
Overshoot
Settling time 0.571 0.36 0.2
(sec)
Rise time 0.03 0.15 0.11
(sec)

5. Conclusion
Fig.20: Step Response of System Using Fuzzy-PID Controller From the simulation results it is concluded
that, compared with the conventional PID
controller, Fuzzy controller and self-tuning PID
controller. Fuzzy-PID controller has a better
performance in both transient and steady state
response. Theself-tuning Fuzzy-PID has better
dynamic response curve, short response time,
smaller overshoot, less peak amplitude, minimum
settling time, small steady state error (SSE), high
steady precision compared to the conventional PID
controller and Fuzzy controller.

References:
Fig.21: Error of the Closed Loop System Using Fuzzy-PID
Controller [1]Rao, V.Dukkipati,” Analysis and Design of
control systems using MATLAB”, 2006.
Comparisonbetween PID, Fuzzy and
Fuzzy- PID controller step response specification [2]Karl Johan Astrom,” Control System Design”,
as shown in Fig.22 and Table.2. 2002.
[3]
https://en.wikipedia.org/wiki/PID_controller#PID_
controller_theory.
[4]Franck dernoncourt, “introduction to fuzzy
logic”, mit, jan 2013.
[5]Michael Negnevitsky, “Artificial Intelligence”,
second edition:2005.
[6]Fuzzy Logic Toolbox™ User's Guide.
[7]http://www.profjrwhite.com/system_dynamics/s
Fig.22: Step Response of System. dyn/s6/s6fmathm/s6fmathm.
Table.2: Comparison between the Output Responses for [8] Salim, J. O,” Fuzzy Based PID Controller for
Controller Speed Control of D.C. Motor Using LabVIEW”
Title PID Fuzzy Fuzzy-PID October 2015.
controller controller controller [9] Umesh.K. B and R. N” Speed Control of DC
Peak 1.48 1.045 1 Motor Using Fuzzy PID Controller”2013.
32
International Journal of Social Science and Technology ISSN: 2415-6566 Vol. 2 No. 4; August 2017

[10] Ravishankar. K, Dhaval. R” Fuzzy Adaptive


PID Speed Control of a Converter Driven DC
Motor” April-2015.
[11] SatyaSheel,Omhari Gupta” High Performance
Fuzzy Adaptive PID Speed Control of a Converter
Driven DC Motor” March, 2012.
[12] karl j. astrom, tore .h” PID controller: theory,
design and tuning”2nded.
[13]Philip A. Adewuyi,” DC Motor Speed Control:
A Case between PID
Controller and Fuzzy Logic Controller” MAY
2013.
[14] Husain. A, Gagan. S, Vikash. B, Saket. S,
Shubham. A”Controlling of DC motor using Fuzzy
Logic Contoller” (CAC2S 2013).
[15]Rekha.K,Sulochana :”Speed Control of
Separately Exited DC motor using Fuzzy Logic
Controller”(IJETT) 2013.

Appendix:DC Motor Model Parameters

Armature resistance (Ra) = 0.5 Ω

Torque constant (KT) =0.5 Nm/A

Armature inductance (La) = 0.02 H

Friction constant (Β) = 0.008 Nms/rad

Rotor inertia (J) = 0.1 kgm2

Back emf constant (Kb) = 1.25 Vs/rad

33