DC Motor Speed ...
DC Motor Speed ...
DC Motor Speed ...
التحكم في سرعة محرك تيار مستمر باستخدام المنطق الغامض والمتحكم التناسبي
التكاملي التفاضلي
Thesis Submitted in Partial Fulfillment of The Requirements for The Degree of Master of
Computer and Network Engineering
By:
Alfatih Yassin Awad Babiker
Supervisor:
Dr. Mohammed Alnour Abdalla
March 2019
اآلية
قال تعالى:
يز ْال َح ِكي ُم). ّللاُ أَنَّهُ الَ إِلَـهَ إِالَّ ُه َو َو ْال َمالَئِ َكةُ َوأ ُ ْولُواْ ْال ِع ْل ِم قَآئِ َما ً بِ ْال ِقس ِ
ْط الَ إِلَـهَ إِالَّ ُه َو ْالعَ ِز ُ ش ِهدَ ه
( َ
I
Dedication
II
Acknowledgement
III
ABSTRACT
IV
المستخلص
تستخدم محركات التيار المستمر على نطاق واسع في الصناعات ألغراض متعددة .تتطلب
العديد من الحاالت التغير في سرعة محرك التيار المستمر ،وهذا يتطلب ضرورة إليجاد طريقة للتحكم
الفعال في سرعة محرك التيار المستمر .حيث أن هناك أنواع من أجهزة التحكم التقليدية والرقمية مثل
المتحكم التناسبي التكاملي ) ،(PIالتناسبي التفاضلي ) ،(PDالتناسبي التكاملي التفاضلي )(PID
ومتحكم المنطق الغامض ) .(FLCمتحكم المنطق الغامض تستخدم في تحسين األداء لكل من المتحكم
التناسبي التكاملي ،التناسبي التفاضلي و التناسبي التكاملي التفاضلي للتحكم في سرعة محرك التيار
المستمر .وفي هذا المشروع تم استخدام كل من طرق التحكم السابقة لتحسين أداء التحكم في سرعة
محرك التيار المستمر .في هذا المشروع تم تصميم نموذج PD ،PIو( PIDمع وبدون متحكم
المنطقي غامض) ومحاكاته في بيئة MATLAB SIMULINKللتحكم في سرعة التيار المستمر.
وبعد تحليل وتقييم المتحكمات في أربعة خصائص هي التجاوز األقصى ،وزمن الصعود ،خطأ الحالة
المستقرة وزمن السكون بغرض الحصول على أفضل أداء .وكنتيجة لذلك ،فإن المتحكم التفاضلي
التكاملي التناسبي الغامض ) )FPIDهو أفضل متحكم بسبب تحسن األداء مقارنة بالمتحكمات األخرى.
V
List of Contents
Title Page
اآلية I
Dedication II
Acknowledgment III
Abstract IV
المستخلص V
List of Contents VI
List of Figures X
1.1 Preface. 2
1.3 Objectives. 4
1.4 Methodology. 5
VI
CHAPTER TWO: LITERATURE REVIEW 8
2.1 Introduction. 8
2.6.1 PI Controller. 13
2.6.2 PD Controller. 14
VII
CHAPTER THREE: SYSTEM MODEL & SIMULATION 27
3.1 Introduction. 27
3.3.1 PI Controller. 30
3.3.2 PD Controller. 30
4.1 Introduction. 42
VIII
CHAPTER FIVE: CONCLUSION AND RECOMMENDATIONS 49
5.1 Conclusion. 49
5.2 Recommendations. 49
REFERENCES 52
IX
List of Figures
X
Figure 3.7 speed control error (e). 32
XI
Figure 4.3 Step Response for the System using PI Controller 43
Figure 4.4 Step Response for the System using PID Controller 44
Figure 4.6 Step Response for the System using FPD Controller 45
Figure 4.7 Step Response for the System using FPI Controller 46
Figure 4.8 Step Response for the System using FPID Controller 46
XII
List of Tables
XIII
List of Abbreviations
Abbreviation Meaning
AC Alternating Current
Ce Change in Error
DC Direct Current
E Error
GA Genetic Algorithm
Kd Differential Term
Ki Integral Term
Kp Proportional Term
PD Proportional Derivation
PI Proportional Integral
XIV
CHAPTER ONE
INTRODUCTION
Chapter One Introduction
CHAPTER ONE
INTRODUCTION
1.1 Preface
3
Chapter One Introduction
Fuzzy control possesses the intuition like a human which gives it the
strength to adapt to the difficulties in the control and work well even with
noisy input.
1.3 Objectives
4
Chapter One Introduction
1.4 Methodology
5
Chapter One Introduction
6
CHAPTER TWO
LITERATURE REVIEW
Chapter Two Literature Review
CHAPTER TWO
LITERATURE REVIEW
2.1 Introduction
There are two main types of electrical motors. There are direct
current or DC and alternating current or AC motors. The reference of DC
or AC refers to how the electrical current is transferred through and from
the motor. Both types of motors have different functions and uses. DC
motors come in two general types. They can have brushes or be brushless
(synchronous motor). Then, AC motors come in two different types which
8
Chapter Two Literature Review
are they can be single phase and three phases. In this project only, DC
motors was covered.
9
Chapter Two Literature Review
10
Chapter Two Literature Review
12
Chapter Two Literature Review
used to encode information for transmission, its main use is to allow the
control of the power supplied to electrical devices, especially to inertial
loads such as motors. The average value of voltage (and current) fed to the
load is controlled by turning the switch between supply and load on and off
at a fast pace. The longer the switch is on compared to the off periods, the
higher the power supplied to the load is. The PWM switching frequency
has to be much faster than what would affect the load, which is to say the
device that uses the power. Typically switching have to be done several
times a minute in an electric stove, 120 Hz in a lamp dimmer, from few
kilohertz (kHz) to tens of kHz for a motor drive and well into the tens or
hundreds of kHz in audio amplifiers and computer power supplies. The
term duty cycle describes the proportion of 'on' time to the regular interval
or 'period' of time. A low duty cycle corresponds to low power, because the
power is off for most of the time. Duty cycle is expressed in percent, 100%
being fully on [2].
2.6.1 PI Controller
13
Chapter Two Literature Review
decrease the rise time and eliminate the oscillations. If applied, any amount
of I guarantees set point overshoot [8].
2.6.2 PD Controller
14
Chapter Two Literature Review
15
Chapter Two Literature Review
𝑑
𝑢(𝑡) = 𝑘𝑝 𝑒(𝑡) + 𝑘𝑖 ʃ𝑒(𝑡) + 𝑘𝑑 𝑒(𝑡) (2.2)
𝑑𝑡
16
Chapter Two Literature Review
PID tuning is a difficult problem, even though there are only three
parameters and in principle is simple to describe, because it must satisfy
complex criteria within the limitations of PID control. There are several
methods for tuning a PID loop. The most effective methods generally
involve the development of some form of process model, then choosing P,
I, and D based on the dynamic model parameters. Manual tuning methods
can be relatively inefficient, particularly if the loops have response times
17
Chapter Two Literature Review
18
Chapter Two Literature Review
Control Type Kp Ki Kd
P 0.5 Ku - -
The Fuzzy theory was first put forward by L.A. Zadeh in 1965. He
felt that the classical theory concentrates much on precision rather than
easy and efficient controlling mechanism. Unlike classical sets, the Fuzzy
sets have a certain degree of membership for each element.
Fuzzy sets depend on certain rules. The rule base is the most
important requirement for the fuzzy logic. The rule base generally consists
of various cases of If-Then rules. First the fuzzy sets and the membership
functions are declared. Then the If-Then rules for the membership
functions are decided for the particular control. The output is controlled by
these rules on input. A typical If-Then rule consists of two parts. They are
Antecedent and Consequence or Conclusion. The If statement is the
19
Chapter Two Literature Review
One of the main features of fuzzy logic is its ability to operate with
vague or ambiguous concepts typical of qualitative reasoning, based on a
mathematical support quantitative conclusion can be drawn from a set of
observations and qualitative rules. Fuzzy logic control is the application of
fuzzy inference process automation. A typical fuzzy controller infers the
consequent of more or less large simple rules, this process of reasoning can
be performed in parallel, yielding the result with a simple logical sum. This
parallel processing capability allows even relatively complex controllers to
perform the fuzzy inference in a minimum computation time.
20
Chapter Two Literature Review
Fuzzy Input: the inputs are most often hard or crisp measurement
from some measuring equipment is converted into fuzzification block.
21
Chapter Two Literature Review
Defuzzification: is when all the actions that have been activated are
combined and converted into a single non-fuzzy output signal which is the
control signal of the system. The output levels are depending on the rules
that the systems have and the positions depending on the non-linearities
existing to the systems. To achieve the result, develop the control curve of
the system representing the I/O relation of the systems and based on the
information, define the output degree of the membership function with the
aim to minimize the effect of the non-linearity [4].
Fuzzy Output: is output gain that can be tuned and also become as
an integrator. The output crisp value can be calculated by the center of
gravity or the weighted average [4].
This section introduces the some of related and previous studied and
works in this topic then it shows the final results of their work. Firstly,
Purushotam Kumar, Prabhakar Kumar Prabhat, Mithun Kumar, Dr. S.D.
Choudhary controlled DC motor speed with PID controller and first system
is checked without controller on loaded and unloaded condition then add
PID controller and system is tuned using its existing tuning methods. After
its system is further tuned in order to get desired value with less steady
state error.
22
Chapter Two Literature Review
They use Fuzzy controller to improve the motor speed control, they
found that the Fuzzy controller provides better control strategies than other
controllers. They used MATLAB\SIMULINK to simulate the required
model.
23
Chapter Two Literature Review
base. Finally, The FLC is the best controller according to the final result of
this project.
24
Chapter Two Literature Review
In this project the PID controller and Fuzzy logic controller will be
simulated in MATLAB environment to control of DC motor speed. Then
many techniques will be compared in terms overshoot, settling Time,
Stelling time and steady state error.
25
CHAPTER THREE
CHAPTER THREE
3.1 Introduction
This chapter will start with the method and alternatives that have
been used from the beginning until the end of this project. Beginning from
mathematical modelling of DC motor until the PD, PI, and PID controller
have been designed. In the last part, FPD, FPI, FPID were designed to
control DC motor speed. MATLAB environment used to simulate the
previous controllers, then compare in terms of overshoot, settling time, rise
time and steady state error.
For this project, the following values for the physical parameters of
the DC motor have been used in this project [9].
27
Chapter Three System Modeling And Simulation
Parameter Value
𝑇 = 𝐾𝑡 𝐼𝑎 (3.1)
𝑉𝑏 = 𝐾𝑏 𝜔 (3.2)
𝑑𝜔
𝐽 + 𝐵𝜔 = 𝑇 (3.3)
𝑑𝑡
𝑑𝐼𝑎
𝐿𝑎 + R 𝑎 𝐼𝑎 = 𝑉𝑖 − 𝑉𝑏 (3.4)
𝑑𝑡
Using the Laplace transform, equations (3.3) and (3.4) can be written as:
28
Chapter Three System Modeling And Simulation
where (s) denotes the Laplace operator. substitute (3.6) in (3.5) to obtain:
𝑉𝑖 (s)−𝑉𝑏 (𝑠)
𝐽𝑠𝜔(𝑠) + 𝐵𝜔(𝑠) = 𝐾𝑡 𝐼𝑎 (𝑠) = 𝐾𝑡 [ ] (3.7)
𝐿𝑎 𝑠+R𝑎
From equation (3.7), the transfer function from the input voltage,
V(s), to the output angle,𝜃 , directly follows:
𝑉𝑖 (s)−𝑉𝑏 (𝑠)
𝜔(𝑠) = 𝐾𝑡 (3.8)
(𝐿𝑎 𝑠+R𝑎 )(𝐽𝑠+𝐵)
From the block diagram in Figure 3.2, after applying feedback for
the internal block, it is easy to see that the transfer function from the input
voltage, V(s), to the angular velocity, 𝜔, is:
𝜔(𝑠) 𝐾𝑡
= (𝐿 (3.9)
𝑉(𝑠) 𝑎 𝑠+𝑅𝑎 )(𝐽𝑠+𝐵)+𝐾𝑡 𝐾𝑏
𝜔(𝑠) 𝐾𝑡
= 2 (3.10)
𝑉(𝑠) 𝐽𝐿𝑎 𝑠 +(𝐽𝑅𝑎 +𝐵𝐿𝑎 )𝑠+(𝐵𝑅𝑎 +𝐾𝑡 𝐾𝑏 )
𝟐𝟓
𝑮(𝒔) = (3.11)
𝒔𝟐 +𝟐𝟓.𝟎𝟖𝒔+𝟑𝟑.𝟐𝟓
29
Chapter Three System Modeling And Simulation
3.3.1 PI Controller
3.3.2 PD Controller
30
Chapter Three System Modeling And Simulation
The error e(t) and the change of error ce(t) of the angular velocity is
the variable inputs of the fuzzy logic controller. The control voltage u(t) is
the variable output of the fuzzy logic controller.
Figure 3.7 and figure 3.8 shows the input values (error and change of error)
which applied in all controllers when using fuzzy controller.
33
Chapter Three System Modeling And Simulation
e\ce NL NS ZE PS PL
34
Chapter Three System Modeling And Simulation
e\ce NL NS ZE PS PL
NL PM PM PM PM PM
ZE PS PS PVS PS PS
PL PM PM PM PM PM
35
Chapter Three System Modeling And Simulation
e\ce NL NS ZE PS PL
e\ce NL NS ZE PS PL
ZE PM PL PL PVL PVL
The structure of the fuzzy auto tuning PID controller designed for
control speed of dc motor is shown in figure 3.17. its inputs are control
error (e) and the change of control error (ce). the fuzzy auto tuner block
adjusts the parameter of the incremental PID controller, and the
incremental PID controller calculates the control output.
In this way, the fuzzy tuner can satisfy the different requirements of
PID controller parameters with different (e) and (ce), and make the
controlled object possess good dynamic and static performance. when
tuning, the fuzzy tuner should adjust the value of (kp), (ki) and (kd) in the
37
Chapter Three System Modeling And Simulation
The fuzzy tuning rule sets of (kp), (ki) and (kd) are designed as
illustrated in table 3-6, 3-7 and 3-8.
e\ce NL NS ZE PS PL
e\ce NL NS ZE PS PL
NL PM PM PM PM PM
ZE PS PS PVS PS PS
PL PM PM PM PM PM
39
Chapter Three System Modeling And Simulation
e\ce NL NS ZE PS PL
ZE PM PL PL PVL PVL
For example, the rules applied in Fuzz PID as show in figure 3.22, if
e is equal to zero (NL) and change of error equal to zero (NL), then kp
equal to 26.4 (PVL), ki equal to 30 (PM) and kd equal to 5.27 (PVS).
40
CHAPTER FOUR
CHAPTER FOUR
4.1 Introduction
In this chapter, the simulation results are presented. PD, PI, PID,
FPD, FPI and Fuzzy PID are evaluated in terms of overshoot(Mp), rise
time (Tr), settling time (Ts) and steady state error. The previous parameters
can be calculated as following:
𝑀𝑝 = 𝑒 −(𝜎/𝜔𝑑)𝜋 (4.1)
𝜔
𝜋−tan−1 𝑑
−𝜎
𝑇𝑟 = (4.2)
𝜔𝑑
4
𝑇𝑠 = (4.3)
𝜗𝜔𝑛
According to figure 4.1, the system was simulated without using any
controller. In this case the step response does not reach the desired value,
rise time is too high and the steady state error is very high.
42
Chapter Four Results and Discussion
43
Chapter Four Results and Discussion
Figure 4.4: Step Response for the System using PID Controller.
44
Chapter Four Results and Discussion
Table 4-1: Comparison Between the Step Response for each Controller (PI, PD, PID).
Parameter PI PD PID
Overshoot (%) 12 8 9
Figure 4.6: Step Response for the System using FPD Controller.
45
Chapter Four Results and Discussion
Figure 4.7: Step Response for the System using FPI Controller.
Figure 4.8: Step Response for the System using FPID Controller.
46
Chapter Four Results and Discussion
Figure 4.9 shows the error response (decrease through time) when
FPID controller is used.
Table 4-2: Comparison Between the Output Responses for Controller (FPI, FPD and FPID).
CHAPTER FIVE
CONCLUSION AND RECOMMENDATIONS
5.1 Conclusion
49
Chapter Five Conclusion and Recommendations
5.2 Recommendations
50
REFERENCES
REFERENCES
[4]A. Fatah, "Design And Analysis Of Speed Control Using Hybrid Pid-Fuzzy
Controller For Induction Motors," 2015.
[9] S. B. Saat, "Dc Motor Speed Control Using Fuzzy Logic Controller," 2014.
52