You are on page 1of 19

DEBRE MARKOS UNIVERSITY

COLLEGE OF TECHNOLOGY
DEPARTEMENT OF ELECTRICAL AND
COMPUTER ENGINEERING
CONTROL STREAM
FUZZY LOGIC AND NEURAL NETWORK
PROJECT
TITLE: SPEED CONTROL OF DC MOTOR
USING FUZZY LOGIC CONTROLLER
Group four
No. Name Id no.
1. Bamelaku Yihunie......................TER/3720/05
2. Biks Mekonnen............................TER/4170/05
3. Birhie Shebabaw.........................TER/3851/05
4. Dagnew Weldu.............................TER/3597/05
5. Tamiru Demelash.......................TER/4015/05
Abstract
This project uses FUZZY LOGIC TECHNIQUE in estimating speed
and controlling it for DC motor.
The speed control of DC motor using a fuzzy logic controller to
meet the desired speed.
Fuzzy logic is one of the most successful applications of fuzzy set
in which the variables are linguistic rather than numeric.
A fuzzy logic controller (FLC) is based on a set of control
rules (fuzzy rules) among linguistic variables. The personal
computer provides the necessary flexibility in setting any
speed profile with the use of fuzzy packages. The proposed
fuzzy controller results in a better response compared to the basic
fuzzy controller and normal response of DC motor.
The fuzzy logic controller employs if-else form programming of the
various conditions to control the motor speed.

Speed control of dc motor


Introduction
Direct current (DC) motors have been widely used in many
industrial applications such as electric vehicles, steel rolling
mills, electric cranes, and robotic manipulators due to
precise, wide, simple and continuous control characteristics.
The development of high performance motor drives is very
important in industrial as well as other purpose applications.
Generally, a high performance motor drive system must have
good dynamic speed command tracking and load regulating
response. DC drives, because of their simplicity, ease of
application, reliability and favourable cost have long been a
backbone of industrial applications. DC drives are less complex
with a single power conversion from AC to DC.
DC drives are normally less expensive for most horsepower
ratings. DC motors have a long tradition of use as adjustable
speed machines and a wide range of options have evolved for this
purpose. In these applications, the motor should be precisely
controlled to give the desired performance.
The proposed controller systems consist of multi-input fuzzy logic
controller (FLC) and multi-input integrated fuzzy logic controller
(IFLC) for the speed control. Speed control techniques in dc motor
varying the armature voltage in the constant torque region. In the
constant power region, field flux should be reduced to achieve
speed above the rated speed.

DC motor 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. Figure shows a
separately excited DC motor equivalent model.
The term speed control stand for intentional speed variation
carried out manually or automatically DC motors are most
suitable for wide range speed control and are there for many
adjustable speed drives.

Ra La
Where
Va is the armature voltage. (In volt)
Eb is back emf the motor (In volt)
Ia is the armature current (In ampere) Ra is the armature
resistance (In ohm)
La is the armature inductance (In Henry)
Tm is the mechanical torque developed (In Nm)
Jm is moment of inertia (In kg/m)
Bm is friction coefficient of the motor (In Nm/ (rad/sec))
is angular velocity (In rad/sec)
We know that
(Va-IaRa)/
=> = (Va-IaRa)/Ka............................. (1)
Where
= Field flux per pole
Ka= Armature constant = PZ/2a
Where P = No. of pole
Z = Total no. of armature conductor
a = No. of parallel path
From the equation (1) it is clear that for DC motor there are
basically 3 method of speed control.
They are:-
1-Variation of resistance in armature circuit
2-Variation of field flux
3- Variation of armature terminal voltage.
2.2: Modeling of separately excited dc
Motor
From figure 1: The armature voltage equation is given by:
Va=Eb+ IaRa+ La (dIa/dt)
Now the torque balance equation will be given by:
Tm= Jmd/dt +Bm+TL
Where:
TL is load torque in Nm.
Friction in rotor of motor is very small (can be neglected), so
Bm =0
Therefore, new torque balance equation will be given by:
Tm= Jmd/dt + TL--------- (i)
Taking field flux as and Back EMF Constant as K. Equation for
back emf of motor will be:
Eb= K --------- (ii)
Also, Tm= K Ia--------- (iii)
Taking Laplace transform of the motors armature voltage
equation we get
Ia(S) = (VaEb)/ (Ra+ LaS)
Now, taking equation (ii) into consideration, we have:
Ia(s) = (VaK) /Ra (1+ LaS/Ra)
And
w(s) = (Tm-TL) /JS = (KIa-TL) /JmS
(Armature Time Constant)
Ta= La/Ra
Block Model of Separately Excited DC Motor
After simplifying the above motor model, the overall transfer
function will be
(s) /Va(s) = [K /Ra] /JmS (1+TaS) / [1+ (K/Ra)/JmS(1+TaS)]

Further simplifying the above transfer function:


(s) /Va(s) = (1/k) / {1 +(k /Ra) /JmS (1+TaS)} -------------(iv)
Assuming,
Tem= JmRa/ (k) as electromechanical time constant.
Then the above transfer function can be written as:
w(s) /Va(s) = (1/k)/ [STem (1+STa) +1] -------- (v)

Let us assume that during starting of motor, load torque


TL= 0 and applying full voltage Va
Also assuming negligible armature inductance, the basic armature
voltage equation can be written as:
Va= K (t) + IaRa
At the same time Torque equation will be:
Tm= Jmd/dt = KIa----- (VI)
Putting the value of Ia in above armature equation:
Va= K (t) + (Jmd/dt) Ra/ K
Dividing on both sides by K,
Va/K= (t) +JmRa (d/dt)/ (K) ------------------------ (vii)
Va/K is the value of motor speed under no load condition.
Therefore,
W (no load) = (t) +JRa (d/dt)/ (K) = (t) + Tem (d/dt)
Where, K = Km (say)
And Tem=JmRa / (K) =JRa/ (Km)
Therefore, Jm= Tem (Km) / Ra--------- (viii)
From motor torque equation, we have:
(s) = KmIa(s)/JS -TL/JmS -------- (ix)
From equation (viii) and (ix), we have:
(s) = [(Ra/ Km) Ia(s) -TLRa/ (Km) ] (1/Tem(s))
Now, Replacing K by Kmin equation (v), we will get: (s)/Va(s) =
(1/Km) / (1+STem+STaTem) ------------(x)
The armature time constant Ta is very much less than the
electromechanical time constant Tem, (Ta<< Tem) Simplifying,
1 + STem+ STaTem 1 + S (Ta+Tem) STaTem= (1+STem) (1 +
STa)
The equation can be written as:
w(s) / Va(s) = (1/K)/ ((1 + STem) (1 + STa)) -----(xi)
Tem and Ta are the time constants of the above system transfer
function which will determine the response of the system. Hence
the dc motor can be replaced by the transfer function obtained in
equation (xi) in the DC drive model.
Fuzzy Logic Controller
Fuzzy logic is expressed by means of the human language.Based
on fuzzy logic, a fuzzy controller converts a linguistic control
strategy into an automatic control strategy, and fuzzy rules are
constructed by expert experience or knowledge database. First,
set the error e(t) and the error variation de(t) of the angular speed
to be the input variables of the fuzzy logic controller. The control
voltage Va (t) is the output variable of the fuzzy logic controller.
The linguistic variables are defined as {NL, NS, Z, PS, PL}, where
NL means negative large, NS means negative small, Z means
zero, PS means positive small and PL means positive large. The
fuzzy rules are summarized in table below. The type of fuzzy
inference engine is Mamdani.
A fuzzy logic model is a logical-mathematical procedure based on
an IF-THEN rule system that mimics the human way if thinking
in computational form. Generally, a fuzzy rule system has four
modules.
Fuzzification
Fuzzy Inference
Rule base
Defuzzification

Fuzzification
The process of converting a numerical variable (real number or
crisp variables) into a linguistic variable (fuzzy number) is called
Fuzzification. In others words, means the assigning of linguistic
value, defined by relative small number of membership functions
to variable.

Fuzzy inference
Under inference, the truth value for the premise of each rule is
computed, and applied to the conclusion part of each rule. This
results in one fuzzy subset to be assigned to each output variable
for each rule. Mostly MIN or PRODUCT is used as inference rules.
In MIN inference, the output membership function is clipped off at
a height corresponding to the rule premise's computed degree of
truth (fuzzy logic AND). In PRODUCT inference, the output
membership function is scaled by the rule premise's computed
degree of truth.

Rule base
For the rule bases a classic interpretation of Mandani was used.
Under rule base, rules are constructed for outputs. The rules are
in If.Then format and formally the If Side is called the
conditions and the Then side is called the conclusion. A rule
base controller is easy to understand and easy to maintain
for a non- specialist end user and an equivalent controller
could be implemented using conventional techniques.
For speed control of DC motor we construct rules as follows:
1. If (input1 is EZ) and (input2 is dEZ) then (output is VaZ)
2. If (input1 is EZ) and (input2 is dEPS) then (output is VaPS)
3. If (input1 is EZ) and (input2 is dEZ) then (output is VaPS)
4. If (input1 is EPS) and (input2 is dEPS) then (output is VaPL)
5. If (input1 is ENS) and (input2 is dEPS) then (output is VaZ)
6. If (input1 is EZ) and (input2 is dEPL) then (output is VaPL)

Control Change in speed error


voltage dENL dENS dEZ dEPS dEPL
Speed ENL VaNL VaNL VaNL VaZ VaPS
Error ENS VaNL VaNL VaNS VaZ VaPS
EZ VaNL VaNS Vaz VaPS VaPL
EPS VaNS VaZ VaPS VaPL VaPL
EPL VaZ VaPS VaPL VaPL VaPL

Numerical Range of Linguistic Variable -


Error (e)
The numerical range of values for error and the corresponding
linguistic notation is shown below. The error indicates the
difference between the actual output speed and the reference
speed. The values of the error are their scaled values.
Linguistic variables Notation Numerical range

Negative large NL [-0.75 -0.5 -0.25]


Negative small NS [-0.5 -0.25 0]
Zero Z [-0.25 0 0.25]
Positive small PS [0 0.25 0.5]
Positive large PL [0.25 0.5 0.75]

Numerical Range of Linguistic Variable -


Change in Error (de)
The numerical range of values for change in error and the
corresponding linguistic notation is shown below. The change in
error indicates the differential of the error. The values of the
change in error are their scaled values.
Linguistic Notation Numerical range
variable(de)
Negative large NNL [-1.5 -1 -0.5]
Negative small NS [-1 -0.5 0]
Zero Z [-0.5 0 0.5]
Positive small PS [0 0.5 1]
Positive large PL [0.5 1 1.5]

Block diagram of the project

+
Wr weFuzzy Dc motor Va
Wo - controller

d(We)

Speed

Questions:
a. Determine input and output variables( linguistic variables)
The linguistic variables for speed control of dc motor are;
Input variables;
Error of speed
Change in error of speed
Output variables;
The control voltage Va
b. Determine the linguistic values for each linguistic variables :
For error of speed , the linguistic values are;
.Negative large error
.Negative small error
.Zero error
.Positive small error
.Positive large error
For change in error of speed, the linguistic values are;
. Negative large change in error
.Negative small change in error
.Zero change in error
.Positive small change in error
.Positive large change in error
For output variable (control speed, Va)
.Negative large control voltage
.Negative small control voltage
.Zero control voltage
.Positive small control voltage
.Positive large control voltage
c. Give membership functions for each linguistic variables with
appropriate fuzzy sets

Fig a fuzzy input variable speed error

Fig b fuzzy input variable change in speed error


Fig c fuzzy output variable V a control
d. Give a specific crisp values (numerical value) for the inputs
and determine the recommended output values using the
following operations:
For rule 1; to determine which conclusion should be reached when
the rules that are ON are applied to deciding the control voltage
input to the motor should be.
Recommendation for rule one:
If input1 is zero and input2 is zero, then the control voltage is zero
The premise;
u
premise( 1)=prod{1,upossmall(dE)}=Prod{1,u(0.15)}=prod{1,0.55}=0.5
5
By assuming u (.15) =0.55
Input1=0 input2=0.15
output=0.669

Recommendation for another rule:


If error is zero and change in error is positive small, then control
voltage is positive small.
Upremise(2)=prod{1,upossmall(dE)}=prod{1,u(0.15)}=prod{1,0.35}=0.
35;
Again by assuming another point of positive small of change of
error.

Implication: minimum rule;


Min {0.55, 0.35} =0.35
Aggregation: sum;
Sum {0.55, 0.35} =0.9 output

Defuzzification
Defuzzification is a process in which crisp output is obtained by
the fuzzy
Output. In other words, process of converting fuzzy output to crisp
number. There is more Defuzzification methods in which two of
the more common techniques are the center average is used for
our project.
Ucrisp= bi prmise (i)/ prmise (i)

i i

Ucrisp= (0*0.55+0.15*.35)/
(0.55+0.35)=0.058

You might also like