SlideShare a Scribd company logo
1 of 60
Download to read offline
TUNING OF DC MOTOR BY USING
PSO & PID
A project submitted in partial fulfillment of the requirement for the award
of the degree of
BACHELOR OF TECHNOLOGY
IN
ELECTRICAL ENGINEERING
Submitted by
SHATRUGHAN MAURYA (ID NO. 215505)
DIVYA PRAKASH (ID NO. 215514)
SHUBHAM KUMAR (ID NO. 215517)
Under the Supervision of
Mr. ANURAG SINGH
Assistant Professor
Department of Electrical Engineering,
Uma Nath Singh Institute of Engineering & Technology,
VEER BAHADUR SINGH PURVANCHAL UNIVERSITY,
JAUNPUR, INDIA
[2015-2019]
CERTIFICATE
This is to certify that the project entitled “Tuning of DC motor by Using PSO &
PID” submitted by Shatrughan Maurya (ID No. 215505), Divya Prakash (ID No.
215514) and Shubham Kumar (ID No. 215555) to Department of Electrical
Engineering, Uma Nath Singh Institute of Engineering and Technology, Veer
Bahadur Singh Purvanchal University, Jaunpur, is a record of bonfide research work
carried out by them under my supervision and is worthy of consideration for the
award of the degree of Bachelor of Technology in Electrical Engineering. The
embodiment of this project has not been submitted in any other University and/or
Institute for the award of the any degree.
Dr. Rajnish Bhasker Mr. ANURAG SINGH
(HEAD) (Supervisor)
Assistant Professor Assistant Professor
UNSIET, VBSPU, Jaunpur UNSIET, VBSPU, Jaunpur
Date: 04/05/2019
Place: Department of Electrical Engineering
UNSIET, VBSPU, Jaunpur
DECLARATION
We Shatrughan Maurya (ID No. 215505), Divya Prakash (ID No. 215514) and
Shubham Kumar (ID No. 215517) declare that the work presented in this project
entitled “Tuning of DC Motor by Using PSO & PID” submitted to the Department
of Electrical Engineering, in Uma Nath Singh Institute of Engineering and
Technology, Veer Bahadur Singh Purvanchal University, Jaunpur for the award of the
Bachelor of Technology degree in Electrical Engineering an original work. We have
done this research work on our own under the guidance of Mr. Satyam Kumar
Upadhyay, The data mentioned in this report have been generated during the work
and experiments are genuine. It is the result of extensive work carried out by us. We
have neither plagiarized nor submitted the same work for the award of any other
degree. In case this undertaking is found incorrect, our degree may be withdrawn
unconditionally by the University.
………………………….
SHATRUGHAN MAURYA
(ID NO. 215505)
………………………….
DIVYA PRAKASH
(ID NO. 215514)
………………………….
SHUBHAM KUMAR
(ID NO. 215517)
Date: 04/05/2019
Place: Department of Electrical Engineering
UNSIET, VBSPU, Jaunpur
ACKNOWLEDGMENT
On the submission of my report entitled “Tuning of DC Motor By Using PSO &
PID” I would like to extend my gratitude and sincere thanks to project co-coordinator,
my guide Mr. Anurag Singh (Assistant Professor), Dept. of Electrical Engineering
for her constant motivation and support during the course work..
We would also like to thank Dr. Rajnish Bhasker (Head of Department, Electrical
Engineering) for providing us with resources and facilities as and when needed.
I also deeply appreciate my parents and friends for their consistent support
throughout, without my family’s sacrifice and support, this work would not have been
possible. I would like to affirm my indebtedness to my parents and my younger sister
for care, support, and encouragement.
I would like to thank all others who have consistently encouraged me and gave me
moral support, without whose help it would be difficult to finish this project.
Last but not the least we would like to thank all the Teacher’s & Staff members of
Department of Electrical Engineering who have been very cooperative with us.
………………………….
SHATRUGHAN MAURYA
(ID NO. 215505)
………………………….
DIVYA PRAKASH
(ID NO. 215514)
………………………….
SHUBHAM KUMAR
(ID NO. 215517)
iv
ABSTRACT
A concept for the optimization of nonlinear functions using particle swarm
methodology is introduced.The evolution of several paradigms is outlined, and an
implementation of one of the paradigms is discussed. Benchmark testing of the
paradigm is described, and applications, including nonlinear function optimization
and neural network training, are proposed. The relationships between particle swarm
optimization and both artificial life and genetic algorithms are described, The use of
videos is a valuable and powerful tool which may significantly contribute to change
and improve teaching and learning methods. Lecturers can made their own videos
addressing specific topics suitable to fulfill their student’s needs. These videos can
address control engineering syllabus as well as complementary topics. This paper
proposes using video as a tool to introduce the particle swarm optimization algorithm
to students within a digital PID control simulation experiment. The experience
preliminary results and feedback received from students are quite positive. PID
Controller (Proportional Integral Derivative) was invented since 1910, but till today
still is used in industries, even though there are many kind of modern controllers like
fuzz controller and neural network controller are being developed. Performance of
PID controller is depend on on Proportional Gain (Kp), Integral Gain (Ki) and
Derivative Gain (Kd). These gains can be got by using method Ziegler-Nichols (ZN),
gain-phase margin, Root Locus, Minimum Variance dan Gain Scheduling however
these methods are not optimal to control systems that nonlinear and have highorder, in
addition, some methods relative hard. To solve those obstacles, particle swarm
optimization (PSO) algorithm is proposed to get optimal Kp, Ki and Kd. PSO is
proposed because PSO has convergent result and not require many iterations. On this
research, PID controller is applied on AVR (Automatic Voltage Regulator). Based on
result of analyzing transient, stability Root Locus and frequency response,
performance of PID controller is better than Ziegler-Nichols.
v
TABLE OF CONTENTS
CONTENT PAGE NO.
Acknowledgement iv
Abstract v
Table of Contents vi
List of Figures viii
List of Symbols & Abbreviations ix
CHAPTER 1: INTRODUCTION 1-4
1.1 Partcile Swarm Optimization 1
CHAPTER 2: REVIEW OF LITERATURE 5-8
2.1 Overview 5
CHAPTER 3: MATERIALS & METHODS 9-39
3.1 Particle Swarm Optimization(PSO) 9
3.1.1 Introduction 9-10
3.1.2 Particle Swarm Optimization Basic Issues 11
3.1.3 Simulation Experimentation Description 11-14
3.1.4 Design Of Digital PID Controller with PSO 15
3.2 Sequencing and Scheduling 16
3.2.1 Types of Scheduling 16
3.2.1.1 Single Machine Schedule 16
3.2.1.2 Flow Shop Scheduling 16
3.2.1.3 Job Shop Scheduling 17
3.3 Proportionl Integral Derivative(PID) 18
3.3.1 Introduction 18-20
3.3.2 A PID Algorithm 20
3.3.3 PID Control 20
3.3.4 Computer Implementation 21
3.3.5 Sampling, Aliasing and Antialiasing Filters 21-22
3.3.6 Proportional Control 23-25
3.3.7 Integral Control 26
3.3.8 Proportional Plus Integral (P-I) Control 27-29
3.3.9 Proportional Plus Derivative (P-D) Control 29-30
3.3.10 Proportional-Integral-Derivative (PID) control 30-32
vi
3.4 Tuning of PID Controller 33-34
3.4.1 Introduction 34-35
3.4.2 Ziegler-Nichols’ Step Response Method 36
3.4.3 Ziegler-Nichols’ Frequency Response Method 36
3.4.4 Dynamics of Processes Suitable for PID Control 36
3.4.5 Industrial PID Controller 37-38
3.4.7 Application 38-39
CHAPTER 4: RESULTS AND DISCUSSION 40-47
4.1 Source Code 40-46
4.2 Simulink 46
4.3 Graph 47
CHAPTER 5: CONCLUSSION & FUTURE SCOPE 48
5.1 Conclusions 48
5.2 Future Work 48
BIBLIOGRAPHY 49-51
vii
LIST OF FIGURE
Figure No. Figure Name Page No.
Fig. 3.1 Flow Chart of PSO 2
Fig. 3.2 Test 1: swarm with n=4, decaying in the interval [0.9,
0.4].
3
Fig. 3.3 Evolution of the best values for x1 and x2 for test 1 3
Fig. 3.4 swarm with n=4, decaying in the interval [0.9, 0.4] 11
Fig. 3.5 Test 4: swarm with n=50, Inertia weight fixed 11
Fig. 3.6 Block dia of pid controller 12
Fig. 3.7 Sampling 14
Fig. 3.8 Block Diagram of Proportional Controller 15
Fig. 3.9 Response with a Proportional Controller 15
Fig. 3.10 Integral Control 16
Fig. 3.11 Step Response with integral control system 17
Fig. 3.12 Proportional plus integral control system 18
Fig. 3.13 comparison among the transient response with P,I and
P-I control
18
Fig. 3.14 contol action wth a higher order process 20
Fig.3.15 improvement of transient response with P-D control 22
Fig. 3.16 Industrial PID contorl 22
Fig. 3.17 Close-loop step response. 25
Fig. 4.1 Block Diagram 27
Fig. 4.2 Graph 28
viii
LIST OF SYMBOL
Kp Proportional gain
Kd Derivative time
Ki Integral time
e(t) Instantaneous process error at time
SP Set point
PV Process variable
Vref Reference Voltage
Vout Output voltage
U Control signal.
E Difference between the current value and the set point.
Kc Gain for a proportional controller.
Ti Parameter that scales the integral controller.
Td Parameter that scales the derivative controller.
t Time taken for error measurement.
b Set point value of the signal, also known as bias or offset.
ix
CHAPTER 1 INTRODUCTION
Tuning of DC Motor By Using PSO & PID Page | 1
CHAPTER 1
INTRODUCTION
Current students demand new teaching and learning methodologies. Videos can be used
for different purposes, such as the following examples: i) to record classes and make them
available in an internet repository or university learning management system (Crook and
Schofield, 2017); This approach is currently used both by eLearning and classical courses;
ii) to provide short introductions addressing topics covered in classes (Rossiter, 2013).
Videos are the flipped (or inverted) classroom (FC) approach key essence (Rossiter, 2014;
Oliveira and Boaventura, 2017). In the FC, short videos can be used by students as a
preparation element for the next class, releasing class-time which can be best used to
promote students engagement and motivation with other learning activities (e.g. group
problem solving, quizzes answering, computer simulations, group critical debate, etc.).
However, videos can also be used by students to complement their learning process
whenever they feel like it and at their own pace; iii) control simulations or practical rig
demos; iv) technical training support (Starr et al., 2015). Indeed, it has been found that
videos can help in increasing student’s motivation to the learning process (Bravo et al.,
2011). Videos can also be used to provide introduction to complementary topics not
covered in industrial control and automation courses. This is the case of some Artificial
Intelligence (AI) and Machine Learning topics, which are skills highly requested in the
Internet of Things and Industry 4.0. Proportional, Integrative and Derivative (PID)
controllers are a fundamental control engineering education topic, quite relevant due to its
extensive practical use in industrial systems. This topic is transversal to different
engineering applications (Electrical, Mechanical, Chemistry, Biomedical, etc.). An
important skill to be acquire by students is how to design PID controllers. Since Ziegler
and Nichols (1942) breakthrough techniques many alternative and complementary PID
tuning and design methods have been proposed (e.g. Åström and Hägglund, 2004; Vrančić
2001; O’Dwyer A., 2006)). With the development of computer based methods, the
incorporation of optimization approaches constitute a strong alternative to design PID
controllers (Mercader et al., 2017). Optimization methods which are inspired in nature and
CHAPTER 1 INTRODUCTION
Tuning of DC Motor By Using PSO & PID Page | 2
biological (NABI) phenomena have been successfully applied to design PID controllers.
Examples of the most well-established methods are genetic algorithms (Holland, 1975),
Particle Swarm Optimization (PSO) (Kennedy and Eberhart, 1995) , differential evolution
(Storn and Price, 1995), etc. Indeed, NABI can be used as an alternative to classical design
methods. Some of their advantages are the following: they just need a cost function to guide
the search procedure; they do depend on the evaluation of derivatives or gradients; they are
independent of the type of system to be controlled and may not require any knowledge
regarding their specific dynamics. Thus considering the success popularity attained by
NABI techniques in solving a wide range engineering problems it is natural to teach this
methods in control engineering courses.
Machine scheduling problems arises in diverse areas such as flexible manufacturing
system, production planning, computer design, logistics, communication etc. A common
feature of many of these problems is that no efficient solution algorithm is known yet for
solving it to optimality in polynomial time. The classical job shop scheduling problem is
one of the most well known scheduling problems. Informally the problem can be described
as follows:
There are set of jobs and a set of machines. Each job consists of chain of operation, each
of which needs to be processed during an uninterrupted time period of a given length on
agiven machine. Each machine can process at most one operation at a time. A schedule is
an allocation of operations to time intervals of the machines. The problem is to find the
schedule of minimum length.
JSP is among the hardest combinatorial optimization problems. Because of its inherent
intractability, heurisitic procedures are an attractive alternative. Most conventional
heuristic procedures use a priority rule, which is a rule for choosing operation from
specified subset of as yet unscheduled operations.
In this project we have to study the method of Particle swarm optimization (PSO) which is
being applied to job shop scheduling case so as to get an optimum processing time.Particle
swarm optimization is the latest evolutionary optimization techniques, and it is based on
the metaphor of social interaction and communication such as bird flocking and fish
schooling. PSO does not employ the filtering operations like crossover or mutation. In this
search procedure, the members of the entire population are maintained so that the
CHAPTER 1 INTRODUCTION
Tuning of DC Motor By Using PSO & PID Page | 3
information is socially shared among individuals to direct the search towards the best
position in search space.
In a PSO algorithm, each member is called particle, and each particles has some velocity
with which it flies in the search space, which is being upgraded by the particle’s own
experience and the experience of the particle’s neighbors or particle’s experience from the
whole group, here regarded as swarm. There are two types of the PSO algorithm, namely
PSO with a global neighborhood and PSO with a local neighborhood.
According to the global neighborhood, each particle moves towards its best
previous position and towards the best particle in the whole swarm called gbest model. On
the other hand, according to the local variant so called lbest, each particle moves towards
its previous position and towards the best particle in its restricted neighborhood. Simple
concept and economic computational cost are the merits of PSO, which is a combinatorial
optimization problem technique. Job shop scheduling problem is a typical combinatorial
optimization problem, in job shop scheduling problem each and every job is not processed
through all machines in the same sequence as in flow shop scheduling problem. Here
different jobs have different sequence of operations and jobs may or may not pass through
every machine and each machine has different sequence of jobs. So it is a complex
combinatorial problem in which different kind of representation can be done but we employ
job based representation. There are several constraints on jobs and machines in job shop
scheduling problems which are as follows:
1. A job does not visit the same machine twice.
2. There are no precedence constraints among operations of different jobs.
3. Operations can not be interrupted.
4. Each machine can process only one job at a time.
5. Neither release times nor due dates are specified.
“Tuning” is the engineering work to adjust the parameters of the controller so that the
control system exhibits desired property. Currently, more than half of the controllers used
in industry are PID controllers [5]. In the past, many of these controllers were analog;
however, many of today's controllers use digital signals and computers. When a
mathematical model of a system is available, the parameters of the controller can be
explicitly determined. However, when a mathematical model is unavailable, the parameters
CHAPTER 1 INTRODUCTION
Tuning of DC Motor By Using PSO & PID Page | 4
must be determined experimentally. Controller tuning is the process of determining the
controller parameters which produce the desired output. Controller tuning allows for
optimization of a process and minimizes the error between the variable of the process and
its set point [5]. Types of controller tuning methods include the trial and error method, and
process reaction curve methods. The most common classical controller tuning methods are
the Ziegler-Nichols and Cohen-Coon methods. These methods are often used when the
mathematical model of the system is not available. The Ziegler-Nichols method can be
used for both closed and open loop systems, while Cohen-Coon is typically used for open
loop systems. A closed-loop control system is a system which uses feedback control. In an
open-loop system, the output is not compared to the input [5]. A wide range of methods
have been developed to design and tune PID controllers
CHAPTER 2 OVERVIEW
Tuning of DC Motor By Using PSO & PID Page | 5
CHAPTER 2
2.1 Overview
A concept for the optimization of nonlinear functions using particle swarm methodology
is introduced.The evolution of several paradigms is outlined, and an implementation of one
of the paradigms is discussed. Benchmark testing of the paradigm is described, and
applications, including nonlinear function optimization and neural network training, are
proposed. The relationships between particle swarm optimization and both artificial life
and genetic algorithms are described, The use of videos is a valuable and powerful tool
which may significantly contribute to change and improve teaching and learning methods.
Lecturers can made their own videos addressing specific topics suitable to fulfill their
student’s needs. These videos can address control engineering syllabus as well as
complementary topics. This paper proposes using video as a tool to introduce the particle
swarm optimization algorithm to students within a digital PID control simulation
experiment. The experience preliminary results and feedback received from students are
quite positive. PID Controller (Proportional Integral Derivative) was invented since 1910,
but till today still is used in industries, even though there are many kind of modern
controllers like fuzz controller and neural network controller are being developed.
Performance of PID controller is depend on on Proportional Gain (Kp), Integral Gain (Ki)
and Derivative Gain (Kd). These gains can be got by using method Ziegler-Nichols (ZN),
gain-phase margin, Root Locus, Minimum Variance dan Gain Scheduling however these
methods are not optimal to control systems that nonlinear and have highorder, in addition,
some methods relative hard. To solve those obstacles, particle swarm optimization (PSO)
algorithm is proposed to get optimal Kp, Ki and Kd. PSO is proposed because PSO has
convergent result and not require many iterations. On this research, PID controller is
applied on AVR (Automatic Voltage Regulator). Based on result of analyzing transient,
stability Root Locus and frequency response, performance of PID controller is better than
Ziegler-Nichols. PSO algorithm was first introduced by Eberhart and Kennedy in 1995.
The origin of the PSO terinipirasi of the behavior of a flock of birds or a school of fish
while searching for prey. Demonstrating how the Particle Swarm Optimization, to take the
example of a number of patikel (in PSO, individuals are often referred to patikel), N moving
CHAPTER 2 OVERVIEW
Tuning of DC Motor By Using PSO & PID Page | 6
together in a search space S. Each particles of i is kanidat settlement and expressed by the
vector xi. Each particle has a position and velocity and will move based on experience and
information from the social environment and the current position and the particle.
Experience particle i expressed as pi best position ever achieved by these particles.
Information from the environment is represented by particles that have the best position g,
in the collection of the particles. Sequencing is a technique to order the jobs in a particular
sequence. There are different types of sequencing which are followed in industries such as
first in first out basis, priority basis, job size basis and processing time basis etc. In
processing time basis sequencing for different sequence, we will achieve different
processing time. The sequence is adapted which gives minimum processing time. By
Scheduling, we assign a particular time for completing a particular job. The main objective
of scheduling is to arrive at a position where we will get minimum processing time.
The controller may have different structures. Different design methodologies are there for
designing the controller in order to achieve desired performance level. But the most popular
among them is Proportional-Integral-derivative (PID) type controller. In fact more than
95% of the industrial controllers are of PID type. As is evident from its name, the output
of the PID controller u(t) can be expressed in terms of the input e(t). A proportional control
system is a type of linear feedback control system Proportional control is how most drivers
control the speed of a car. If the car is at target speed and the speed increases slightly, the
power is reduced slightly, or in proportion to the error (the actual versus target speed), so
that the car reduces speed gradually and reaches the target point with very little, if any,
"overshoot", so the result is much smoother control than on-off control.In the proportional
control algorithm, the controller output is proportional to the error signal, which is the
difference between the set point and the process variable. In other words, the output of a
proportional controller is the multiplication product of the error signal and the proportional
gain. Proportional-Derivative or PD control combines proportional control and derivative
control in parallel. Derivative action acts on the derivative or rate of change of the control
error. This provides a fast response, as opposed to the integral action, but cannot
accommodate constant errors (i.e. the derivative of a constant, nonzero error is(0).
Derivatives have a phase of +90 degrees leading to an anticipatory or predictive response.
CHAPTER 2 OVERVIEW
Tuning of DC Motor By Using PSO & PID Page | 7
However, derivative control will produce large control signals in response to high
frequency control errors such as set point changes (step command) and measurement noise.
In order to use derivative control the transfer functions must be proper. This often requires
a pole to be added to the controller. The PID controller was first placed on the market in
1939 and has remained the most widely used controller in process control until today. An
investigation performed in 1989 in Japan indicated that more than 90% of the controllers
used in process industries are PID controllers and advanced versions of the PID controller.
PI controllers are fairly common, since derivative action is sensitive to measurement noise
“PID control” is the method of feedback control that uses the PID controller as the main
tool. The basic structure of conventional feedback control systems is shown in Figure,
using a block diagram representation. In this figure, the process is the object to be
controlled. The purpose of control is to make the process variable y follow the set-point
value r. To achieve this purpose, the manipulated variable u is changed at the command of
the controller. As an example of processes, consider a heating tank in which some liquid is
heated to a desired temperature by burning fuel gas. The process variable y is the
temperature of the liquid, and the manipulated variable u is the flow of the fuel gas. The
“disturbance” is any factor, other than the manipulated variable, that influences the process
variable. Figure below assumes that only one disturbance is added to the manipulated
variable. In some applications, however, a major disturbance enters the process in a
different way, or plural disturbances need to be considered. The error e is defined by e = r
– y. The compensator C(s) is the computational rule that determines the manipulated
variable u based on its input data, which is the error e in the case of Figure. The last thing
to notice about the Figure is that the process variable y is assumed to be measured by the
detector, which is not shown explicitly here, with sufficient accuracy instantaneously that
the input to the controller can be regarded as being exactly equal to y. When used in this
manner, the three element of PID produces outputs with the following nature:P element:
proportional to the error at the instant t, this is the “present” error.I element: proportional
to the integral of the error up to the instant t, which can be interpreted as the accumulation
of the “past” error.D element: proportional to the derivative of the error at the instant t,
which can be interpreted as the prediction of the “future” error. Thus, the PID controller
can be understood as a controller that takes the present, the past, and the future of the error
CHAPTER 2 OVERVIEW
Tuning of DC Motor By Using PSO & PID Page | 8
into consideration. “Tuning” is the engineering work to adjust the parameters of the
controller so that the control system exhibits desired property. Currently, more than half of
the controllers used in industry are PID controllers [5]. In the past, many of these
controllers were analog; however, many of today's controllers use digital signals and
computers. When a mathematical model of a system is available, the parameters of the
controller can be explicitly determined. However, when a mathematical model is
unavailable, the parameters must be determined experimentally. Controller tuning is the
process of determining the controller parameters which produce the desired output.
Controller tuning allows for optimization of a process and minimizes the error between the
variable of the process and its set point [5]. Types of controller tuning methods include the
trial and error method, and process reaction curve methods. The most common classical
controller tuning methods are the Ziegler-Nichols and Cohen-Coon methods. These
methods are often used when the mathematical model of the system is not available. The
Ziegler-Nichols method can be used for both closed and open loop systems, while Cohen-
Coon is typically used for open loop systems. A closed-loop control system is a system
which uses feedback control. In an open-loop system, the output is not compared to the
input [5]. A wide range of methods have been developed to design and tune PID controllers
CHAPTER 3 MATERIALS & METHODS
Tuning of DC Motor By Using PSO & PID Page | 9
CHAPTER 3
3.1 Paricle Swarm Optimization (PSO)
3.1.1 Introduction
PSO algorithm was first introduced by Eberhart and Kennedy in 1995. The origin of the
PSO terinipirasi of the behavior of a flock of birds or a school of fish while searching for
prey. Demonstrating how the Particle Swarm Optimization, to take the example of a
number of patikel (in PSO, individuals are often referred to patikel), N moving together in
a search space S. Each particles of i is kanidat settlement and expressed by the vector xi.
Each particle has a position and velocity and will move based on experience and
information from the social environment and the current position and the particle.
Experience particle i expressed as pi best position ever achieved by these particles.
Information from the environment is represented by particles that have the best position g,
in the collection of the particles, whereas, the current position of particle i is expressed by
xi (t-1). Change the speed of the particle and particle position (vi, xi) was determined based
on two equations below as follows [13].
𝒗𝒊= 𝒗𝒊 (𝒕−𝟏)+ 𝝋𝒄𝟏(𝒑𝒊−𝒙𝒊(𝒕−𝟏))+ 𝝋𝒄𝟐(𝒈−𝒙𝒊(𝒕−𝟏)) (9)
Where xi
𝒙𝒊 = 𝒙𝒊 (𝒕 − 𝟏) + 𝒗𝒊 (𝒕) (10)
Random vector φ has a value range [0,1]. Meanwhile, c1 and c2 are two positive constants
called cognitive learning and social learning. Each particel speed limited by [Vmin, Vmax]
[14].
Selection of the proper w inertia weight provides a balance between global exploration and
local exploration, so do not require many iterations in searching optimal solution. W always
decline linearly approximately ranging from 0.9 to 04 for the calculation. general inertia
weight w is set bedearing personal below .
𝒘 = 𝒘𝒎𝒂𝒙 − 𝒘𝒎𝒂𝒙−𝒘𝒘𝒊𝒏 𝒊𝒕𝒆𝒓𝒎𝒂𝒙 𝒙 𝒊𝒕𝒆𝒓 (11)
Frist step in PSO is initialization is to determine the number of iterations, the number of
population (n) inertia weight (w) and cognetif learning and social learning (c1 and c2), The
next step aroused the population in the form of a random matrix with a range of values
[0,1] that the dimension (dimensi_masalah.xn). Generation population by typing sinkaks
CHAPTER 3 MATERIALS & METHODS
Tuning of DC Motor By Using PSO & PID Page | 10
matlab rand (dimensi_masalah, n). . After that, the initialization speed and position. In this
step makes the value of the velocity and position of a particle to be equal to zero, Than
Calculate the error (Vref - Vout), The amount used in this case is a power unit (pu) are worth
one. Description 1 pu equals yout reference and a generator terminal voltage value, then
error = | 1-yout |. The next step is to calculate the value of fitness or function to be
optimized. In this paper ITAE (Integrated Time of Weighted Absolute Error) proposed,
and continue with update velocity and update position. This process contoinue till iteration
maximum. After finshing calculate till iterasi maximum, finally chek whether the result of
calculating already convergence ? if it already convergance excecute if no try again and or
change the intialtization (back to frist stap). To understand easyly, Flowchart PSO is given
at figure.
Fig.3.1 Flow Chart of PSO
CHAPTER 3 MATERIALS & METHODS
Tuning of DC Motor By Using PSO & PID Page | 11
3.1.2 Particle Swarm Optimization Basic Issues
Basic issues regarding the PSO algorithm are addressed in the experiment supporting
video. Each swarm particle is characterized by two variables, x and v, representing
respectively its position and velocity in the search space. The search space is d-
dimensional, but for simplicity of exposition particle position and velocity equations are
introduced without considering the dimension index. The new particle velocity, is
evaluated from the current velocity, corresponding to iteration t, using the following
equation: vi (t+1) = vi (t)+c1 1 ( bi (t) - xi (t) )+ c2 2 ( g(t) - xi (t) ) (4) with: b representing
particle i best position obtained until the current iteration; g representing the global best
position, which in this case considers the entire swarm; c1 and c2 are known as the
cognitive and social constants; 1 and 2 are random numbers generated in the interval [0,1].
After each particle velocity is evaluated the new particle position can be updated using: xi
(t+1) = xi (t)+ vi (t+1) (5) As in any search technique, it is important to guaranty a
compromise among a swarm exploratory behavior in initial search stage and a
specialization behavior toward the end. This compromise among exploration and
exploitation, can be obtained by incorporating a inertia weight, , in (4), as follows: vi (t+1)
= vi (t)+c1 1 ( bi (t) - xi (t) )+ c2 2 ( g(t) - xi (t) ) (6) The inertia weight is often decreased
from a higher value to a lower value along the search.
3.1.3 Simulation Experimentation Description
The experiment is organized in two parts:
1. PSO algorithm implementation and testing using a simple benchmark function
minimization problem. This stage enables the PSO key principles to be apprehended by
students and then easily adapted to design PID controllers. A video (Oliveira, 2018) was
produced by the paper author and made available to students, providing a brief introduction
to the PSO algorithm and experiment test demos that students are asked to replicate. As it
will be further described, this stage main learning objective is that students successfully
implement a simple PSO algorithm. Once the PSO is implemented, students should test the
effect of adjusting some of its heuristic parameters, namely: population size, number of
iterations per run, inertia weight, maximum velocity clamping and bounding particles
position in the search space.
CHAPTER 3 MATERIALS & METHODS
Tuning of DC Motor By Using PSO & PID Page | 12
2. PID digital controller design adapting the PSO implemented in Part 1. This requires the
PID controller implementation in the digital domain and respective control loop simulation.
Part II addresses digital controls topics which are currently well-known, and whose basics
have been introduced in section 2. Thus, the remaining of this section will be focus to
explain Part I. The simple function used to demonstrate PSO concepts is a quadratic
expression represented by: f (x1,x2) =( x1 - 50 )2 + ( x2 - 50 )2
The initial number of iterations considered per run is 70 iterations. Two swarm sizes are
considered in the PSO demos: n=4 particles and n=50 particles. Regarding the small sized
swarm (n=4), three different cases are considered regarding the particles initialization and
starting positions:  Random initialization considering the entire search space.  Random
initialization considering a corner of the search space ( e.g. range [90,100]).  Fixed
initialization, with a particle assigned to each corner of the search space. The velocity value
was clamped to a maximum absolute value of Vmax=3.33 per iteration. However, it is
pedagogical that students start the PSO simulations without limiting the maximum velocity
value. The results of running the PSO, considering a swarm with 4 particles, randomly
initializing the swarm in the entire search space, and decaying the inertia weight is
presented in Fig. 3. In this figure initial solutions are represented inside a square sign and
final solutions with a white circle. The evolution of the best values for both parameters is
illustrated in Fig. 4. The results show that all 4 particles converged to the global minimum.
Around iteration 36 the decision variables best value reached a steady-state value.
CHAPTER 3 MATERIALS & METHODS
Tuning of DC Motor By Using PSO & PID Page | 13
Fig. 3.2 Test 1: swarm with n=4, randomly initialization considering the entire search space
and decaying  in the interval [0.9, 0.4].
Fig. 3.3. Evolution of the best values for x1 and x2 for test 1 .
The results of a PSO run with four particles starting from positions initialized in the
[90,100] for both dimensions, are presented in Fig. 5 and Fig. 6. These figures illustrate
CHAPTER 3 MATERIALS & METHODS
Tuning of DC Motor By Using PSO & PID Page | 14
that the swarm could leave the initialization region towards the optimum value region.
However, this run failed to reach the optimum value in one dimension. This indicates that
more iterations would be necessary to reach the optimum value. If a constant value of
=0.4 is used keeping the same remaining test conditions the swarm is prone to stay in the
initialization corner. It is important to remark that in these tests the initial particles velocity
was set to zero and the maximum value it were allowed to change in each iteration is a low
value.The results of a test run with the four particles starting from initial positions defined
in the search space four corners are presented in Fig. 7 and Fig 8. The results obtained with
a swarm size of n=50 and a fixed inertia weight of 0.4 are presented in Fig 9 and Fig 10.
Even for this simple two dimensional function the speed of convergence tends to be
reduced as the swarm size is increased.The results of a test run with the four particles
starting from initial positions defined in the search space four corners are presented in Fig.
7 and Fig 8. The results obtained with a swarm size of n=50 and a fixed inertia weight of
0.4 are presented in Fig 9 and Fig 10. Even for this simple two dimensional function the
speed of convergence tends to be reduced as the swarm size is increased.
Fig. 3.4. Test 3: swarm with n=4, initialized in the four corners of the search space and
decaying  in the interval [0.9, 0.4]
CHAPTER 3 MATERIALS & METHODS
Tuning of DC Motor By Using PSO & PID Page | 15
.
Fig. 3.5. Test 4: swarm with n=50, initialized randomly in the entire search space. Inertia
weight fixed,
3.1.4 Design Of Digital PID Controller with PSO
In this stage students must incorporate into the PSO script an objective function to simulate
the digital control system response to a step input. While, this objective function can be
more easily implemented using Matlab functions and/or Simulink models, authors are
convinced it is pedagogical to code the feedback loop using difference equations
representing both the PI controller and plant model. The following specifications are
proposed to students as a starting point, by considering:  a FOPTD model with K=1 and
L=T=1s, using a sampling time, T=0.1s.  The absolute PID controller digital form
represented by the approximated model (1) applying the derivative action to the system
output.  A search space defined by interval [0.01 5] for the three controller gains.  Set-
point tracking performance optimization by minimizing an error based criterion such as:
IAE, ITAE or ISE when an unit step is applied to the reference input. Regarding the PSO
the following issues are proposed to be addressed as a starting point, by considering: 
particles randomly initialized in the search space with zero value for their velocity. This
means that the initial swarm is allowed to have particles representing unstable controller
settings. Students can in a later stage test informed population initialization techniques (
e.g. by using PID tuning rules). Linearly decayed inertia weight and fixed value inertia
CHAPTER 3 MATERIALS & METHODS
Tuning of DC Motor By Using PSO & PID Page | 16
weight along the search. Forcing particles to stay within the parameter search limits.
Particles generated outside the limits are clamped to the nearest parameter interval limit.
Starting by not limiting the velocity value, and then testing limiting the velocity to a
maximum absolute value per iteration (vmax).
Considering as illustrative examples the design based on the IAE and ITAE minimization,
the type of results that can be obtained and analyzed by students are presented in Fig. 11-
13. It is clear from Fig. 11 and Fig 12 that with the fixed value inertia weight, the gains
parameter variation is smaller along the search compared to the linear decayed case, thus
confirming a faster PSO convergence rate. The gain sets obtained for the IAE designs are:
[Kp=0.687, Ti=1.39, Td=0.01] both for the inertia decayed and fixed inertia cases, resulting
in IAE=2.16. For the ITAE designs are: [Kp=0.57, Ti=1.21, Td=1.89] [Kp= 0.57, Ti=1.21,
Td=2.12] for the inertia decayed and fixed inertia cases, respectively, both with ITAE=2.89
3.2 Sequencing and Scheduling
Sequencing is a technique to order the jobs in a particular sequence. There are different
types of sequencing which are followed in industries such as first in first out basis, priority
basis, job size basis and processing time basis etc. In processing time basis sequencing for
different sequence, we will achieve different processing time. The sequence is adapted
which gives minimum processing time. By Scheduling, we assign a particular time for
completing a particular job. The main objective of scheduling is to arrive at a position
where we will get minimum processing time.
3.2.1 Types of Scheduling:
Basically there are three types of scheduling:
3.2.1.1 Single Machine Schedule
Here we arrange the order of jobs in a particular machine. We achieve the best result when
the jobs are arranged in the ascending order of their processing time i.e. the job having least
processing time is put first in sequence and processed through the machine and the job
having maximum processing time is put last in sequence.
. 3.2.1.2 Flow Shop Scheduling
It is a typical combinatorial optimization problem, where each job has to go through the
processing in each and every machine on the shop floor. Each machine has same
CHAPTER 3 MATERIALS & METHODS
Tuning of DC Motor By Using PSO & PID Page | 17
sequence of jobs. The jobs have different processing time for different machines. So in this
case we arrange the jobs in a particular order and get many combinations and we choose
that combination where we get the minimum make span.
3.2.1.3 Job Shop Scheduling
It is also a typical combinatorial optimization problem, but the difference is that, here all
the jobs may or may not get processed in all the machines in the shop floor i.e. a job may
be processed in only one or two machines or a different job may have to go through the
processing in all the machine in order to get completed. Each machine has different
sequence of jobs. So it is a complex web structure and here also we choose that combination
of arrangements that will be giving the least make span.Current students demand new
teaching and learning methodologies. Videos can be used for different purposes, such as
the following examples: i) to record classes and make them available in an internet
repository or university learning management system (Crook and Schofield, 2017); This
approach is currently used both by eLearning and classical courses; ii) to provide short
introductions addressing topics covered in classes (Rossiter, 2013). Videos are the flipped
(or inverted) classroom (FC) approach key essence (Rossiter, 2014; Oliveira and
Boaventura, 2017). In the FC, short videos can be used by students as a preparation element
for the next class, releasing class-time which can be best used to promote students
engagement and motivation with other learning activities (e.g. group problem solving,
quizzes answering, computer simulations, group critical debate, etc.). However, videos can
also be used by students to complement their learning process whenever they feel like it
and at their own pace; iii) control simulations or practical rig demos; iv) technical training
support (Starr et al., 2015). Indeed, it has been found that videos can help in increasing
student’s motivation to the learning process (Bravo et al., 2011). Videos can also be used
to provide introduction to complementary topics not covered in industrial control and
automation courses. This is the case of some Artificial Intelligence (AI) and Machine
Learning topics, which are skills highly requested in the Internet of Things and Industry.
Proportional, Integrative and Derivative (PID) controllers are a fundamental control
engineering education topic, quite relevant due to its extensive practical use in industrial
systems. This topic is transversal to different engineering applications (Electrical,
Mechanical, Chemistry, Biomedical, etc.). An important skill to be acquire by students is
CHAPTER 3 MATERIALS & METHODS
Tuning of DC Motor By Using PSO & PID Page | 18
how to design PID controllers. Since Ziegler and Nichols (1942) breakthrough techniques
many alternative and complementary PID tuning and design methods have been proposed
(e.g. Åström and Hägglund, 2004; Vrančić 2001; O’Dwyer A., 2006)). With the
development of computer based methods, the incorporation of optimization approaches
constitute a strong alternative to design PID controllers (Mercader et al., 2017).
Optimization methods which are inspired in nature and biological (NABI) phenomena have
been successfully applied to design PID controllers. Examples of the most well-established
methods are genetic algorithms (Holland, 1975), particle swarm optimization (PSO)
(Kennedy and Eberhart, 1995) , differential evolution (Storn and Price, 1995), etc. Indeed,
NABI can be used as an alternative to classical design methods. Some of their advantages
are the following: they just need a cost function to guide the search procedure; they do
depend on the evaluation of derivatives or gradients; they are independent of the type of
system to be controlled and may not require any knowledge regarding their specific
dynamics. Thus considering the success popularity attained by NABI techniques in solving
a wide range engineering problems it is natural to teach this methods in control engineering
courses.
3.3 Proportionl Integral Derivative(PID)
3.3.1 Introduction
 Feedback is a very powerful concept with many useful properties
 Reduction of effects of disturbances
 Create robust linear relations
 Follow command with High Fidelity
 Robust to process variations
 But risk for instability
 Advances in control theory have given a good insight into the design problem
 PID a simple powerful form of feedback
 Apply advances in control to PID control
 Connect with the classic tradition of Ziegler and Nichols
CHAPTER 3 MATERIALS & METHODS
Tuning of DC Motor By Using PSO & PID Page | 19
In the last lesson, a brief introduction about a process control system has been given. The basic
control loop can be simplified for a single-input-single-output (SISO) system as in Fig.1. Here
we are neglecting any disturbance present in the system.
Fig.3.6 block dia of pid controller
The controller may have different structures. Different design methodologies are there for
designing the controller in order to achieve desired performance level. But the most popular
among them is Proportional-Integral-derivative (PID) type controller. In fact more than
95% of the industrial controllers are of PID type. As is evident from its name, the output
of the PID controller u(t) can be expressed in terms of the input e(t), as:
and the transfer function of the controller is given by:
The terms of the controller are defined as:
Kp= Proportional gain
Kd= Derivative time, and
Ki= Integral time.
In the following sections we shall try to understand the effects of the individual
components- proportional, derivative and integral on the closed loop response of this
system. For the sake of simplicity, we consider the transfer function of the plant as a simple
first order system without time delay as:
CHAPTER 3 MATERIALS & METHODS
Tuning of DC Motor By Using PSO & PID Page | 20
The Amazing Property of Integral Action
Consider a PI controller
Assume that there is an equilibrium with constant eDtE _ e0and constant uDtE _ u0. The
error e0 then must be zero. Proof:
Assume e0 __ 0, then
The right hand side is different from zero. Hence a contradiction unless e0 _ 0.
A controller with integral action will always give the correct steady state provided that a
steady state exists.
3.3.2 A PID Algorithm
In spite of the widespread use of PID it is only given moderate attention in education. Much
information among the manufacturers.PID control is much more than
 We have to consider
 Derivative filter
 Set point (reference)
 weigthing
 Integrator Windup
 Computer implementation
 Mode switches
 Bumpless parameter changes
Dealing with these issues is a good introduction to practical implementation of any control
algorithm.
3.3.3 PID Control
CHAPTER 3 MATERIALS & METHODS
Tuning of DC Motor By Using PSO & PID Page | 21
1. Introduction
2. Derivative Filter
3. Set Point Weighting
4. Integrator Windup
5. Computer Implementation
6. Tuning
7. Summary
3.3.4 Computer Implementation
Practically all control systems are today implemented using computers. We will briefly
discuss some aspects of this. AD and DA converters are needed to connect sensors and
actuators to the computer. A clock is also needed to synchronize the operations. We will
discuss
 Sampling and aliasing
 A basic algorithm
 Converting differential equations to difference equations
 Wordlength issues
 Bumpless parameter changes
3.3.5 Sampling, Aliasing and Antialiasing Filters
FIG.3.7 Sampling
Samples of signals of different frequencies may be identical
 Nyquist frequency = (Sampling frequency)/2
 To represent a continuous signal uniquely from its samples the
continuous signal cannot have frequencies above the Nyqyist frequency which which is
half the Nyquist frequency Antialiasing filters that reduce the frequency content above the
CHAPTER 3 MATERIALS & METHODS
Tuning of DC Motor By Using PSO & PID Page | 22
Nyquist frequency is essential.
A Basic Algorithm
The following operations are executed by the computer.
1. Wait for clock interrupt
2. Convert setpoint r and process output y to numbers
3. Compute control signal u
4. Convert control signal to analog value
5. Update variables in control algorithm
6. Go to step 1
Desirable to make time between 1 and 4 as short as possible.
Defer as much as possible of the computations to step 5.
The Proportional Part
No approximation required!
CHAPTER 3 MATERIALS & METHODS
Tuning of DC Motor By Using PSO & PID Page | 23
3.3.6 Proportional control
With the proportional control action only, the closed loop system looks like:
Fig 3.8. Block Diagram of Proportional Controller
Now the closed loop transfer function can be expressed as:
CHAPTER 3 MATERIALS & METHODS
Tuning of DC Motor By Using PSO & PID Page | 24
Fig 3.9. Response with a Proportional Controller
From eqn. (5) and Fig. 2, it is apparent that:
1. The time response improves by a factor
2. There is a steady state offset between the desired response and the output response =
This offset can be reduced by increasing the proportional gain; but that may also cause
increase oscillations for higher order systems. The offset, often termed as “steady state
CHAPTER 3 MATERIALS & METHODS
Tuning of DC Motor By Using PSO & PID Page | 25
error” can also be obtained from the error transfer function and the error function e(t) can
be expressed in terms of the Laplace transformation form:
Using the final value theorem, the steady state error is given by:
Often, the proportional gain term, Kp is expressed in terms of “Proportional Band”. It is
inversely proportional to the gain and expressed in percentage. For example, if the gain is
2, the proportional band is 50%. Strictly speaking, proportional band is defined as the
%error to move the control valve from fully closed to fully opened condition. However,
the meaning of this statement would be clear to the reader afterwards.
A proportional control system is a type of linear feedback control system Proportional
control is how most drivers control the speed of a car. If the car is at target speed and the
speed increases slightly, the power is reduced slightly, or in proportion to the error (the
actual versus target speed), so that the car reduces speed gradually and reaches the target
point with very little, if any, "overshoot", so the result is much smoother control than on-
off control.In the proportional control algorithm, the controller output is proportional to the
error signal, which is the difference between the set point and the process variable. In other
words, the output of a proportional controller is the multiplication product of the error
signal and the proportional gain. This can be mathematically expressed as
Pout = Kpe(t)
Where
Pout: Output of the proportional controller
Kp: Proportional gain
e(t): Instantaneous process error at time 't'. e(t) = SP − PV
SP: Set point
PV: Process variable
With increase in Kp :
 Response speed of the system increases.
CHAPTER 3 MATERIALS & METHODS
Tuning of DC Motor By Using PSO & PID Page | 26
 Overshoot of the closed-loop system increases.
 Steady-state error decreases. but with high Kp value, closed-loop system becomes
unstable.
3.3.7 Integral Control
If we consider the integral action of the controller only, the closed loop system for the
same process is represented by the block diagram as shown in Fig. 3.
Fig 3.10. Integral Control
Proceeding in the same way as in eqn. (4), in this case, we obtain,
From the first observation, it can be seen that with integral controller, the order of the
closed loop system increases by one. This increase in order may cause instability of the
closed loop system, if the process is of higher order dynamics. In a proportional control of
a plant whose transfer function doesn‟t possess an integrator 1/s, there is a steady-state
error, or offset, in the response to a step input. Such an offset can be eliminated if integral
controller is included in the system. In the integral control of a plant, the control signal, the
output signal from the controller, at any instant is the area under the actuating error signal
curve up to that instant. But while removing the steady-state error, it may lead to oscillatory
response of slowly decreasing amplitude or even increasing amplitude, both of which is
usually undesirable [5].
CHAPTER 3 MATERIALS & METHODS
Tuning of DC Motor By Using PSO & PID Page | 27
So the major advantage of this integral control action is that the steady state error due to
step input reduces to zero. But simultaneously, the system response is generally slow,
oscillatory and unless properly designed, sometimes even unstable. The step response of
this closed loop system with integral action is shown in Fig. 4.
Fig 3.11 Step Response with integral control system
3.3.8 Proportional Plus Integral (P-I) Control
In control engineering, a PI Controller (proportional-integral controller) is a feedback
controller which drives the plant to be controlled by a weighted sum of the error (difference
between the output and desired set-point) and the integral of that value. It is a special case
of the PID controller in which the derivative (D) part of the error is not used. The PI
controller is mathematically denoted as: With P-I controller the block diagram of the closed
loop system with the same process is given in Fig..
CHAPTER 3 MATERIALS & METHODS
Tuning of DC Motor By Using PSO & PID Page | 28
Fig 3.12 Proportional plus integral control system
It is evident from the above discussions that the P-I action provides the dual advantages of
fast response due to P-action and the zero steady state error due to I-action. The error
transfer function of the above system can be expressed as:.
In the same way as in integral control, we can conclude that the steady state error would
be zero for P-I action. Besides, the closed loop characteristics equation for P-I action is:
from which we can obtain, the damping constant as:
whereas, for simple integral control the damping constant is:
Comparing these two, one can easily observe that, by varying the term K
p
, the damping
constant can be increased. So we can conclude that by using P-I control, the steady state
error can be brought down to zero, and simultaneously, the transient response can be
improved. The output responses due to (i) P, (ii) I and (iii) P-I control for the same plant
can be compared from the sketch shown in Fig. 6.
CHAPTER 3 MATERIALS & METHODS
Tuning of DC Motor By Using PSO & PID Page | 29
Fig 3.13 comparison among the transient response with P,I and P-I control
3.3.9 Proportional Plus Derivative (P-D) Control
Proportional-Derivative or PD control combines proportional control and derivative
control in parallel. Derivative action acts on the derivative or rate of change of the control
error. This provides a fast response, as opposed to the integral action, but cannot
accommodate constant errors (i.e. the derivative of a constant, nonzero error is(0).
Derivatives have a phase of +90 degrees leading to an anticipatory or predictive response.
However, derivative control will produce large control signals in response to high
frequency control errors such as set point changes (step command) and measurement noise.
In order to use derivative control the transfer functions must be proper. This often requires
a pole to be added to the controller
The transfer function of a P-D controller is given by:
With the increase of Td
Overshoot tends to be smaller
Slower rise time but similar settling time
CHAPTER 3 MATERIALS & METHODS
Tuning of DC Motor By Using PSO & PID Page | 30
Fig 3.14 contol action wth a higher order process
The step responses of this process with P and P-D controllers are compared in Fig.8.
Fig 3.15 improvement of transient response with P-D control
3.3.10 Proportional-Integral-Derivative (PID) control
The PID controller was first placed on the market in 1939 and has remained the most widely
used controller in process control until today. An investigation performed in 1989 in Japan
indicated that more than 90% of the controllers used in process industries are PID
controllers and advanced versions of the PID controller. PI controllers are fairly common,
since derivative action is sensitive to measurement noise “PID control” is the method of
feedback control that uses the PID controller as the main tool. The basic structure of
CHAPTER 3 MATERIALS & METHODS
Tuning of DC Motor By Using PSO & PID Page | 31
conventional feedback control systems is shown in Figure, using a block diagram
representation. In this figure, the process is the object to be controlled. The purpose of
control is to make the process variable y follow the set-point value r. To achieve this
purpose, the manipulated variable u is changed at the command of the controller. As an
example of processes, consider a heating tank in which some liquid is heated to a desired
temperature by burning fuel gas. The process variable y is the temperature of the liquid,
and the manipulated variable u is the flow of the fuel gas. The “disturbance” is any factor,
other than the manipulated variable, that influences the process variable. Figure below
assumes that only one disturbance is added to the manipulated variable. In some
applications, however, a major disturbance enters the process in a different way, or plural
disturbances need to be considered. The error e is defined by e = r – y. The compensator
C(s) is the computational rule that determines the manipulated variable u based on its input
data, which is the error e in the case of Figure.
The last thing to notice about the Figure is that the process variable y is assumed to be
measured by the detector, which is not shown explicitly here, with sufficient accuracy
instantaneously that the input to the controller can be regarded as being exactly equal to y.
When used in this manner, the three element of PID produces outputs with the following
nature:P element: proportional to the error at the instant t, this is the “present” error.I
element: proportional to the integral of the error up to the instant t, which can be interpreted
as the accumulation of the “past” error.D element: proportional to the derivative of the
error at the instant t, which can be interpreted as the prediction of the “future” error. Thus,
the PID controller can be understood as a controller that takes the present, the past, and the
future of the error into consideration. The transfer function Gc(s) of the PID controller is :
It is clear from above discussions that a suitable combination of proportional, integral and
derivative actions can provide all the desired performances of a closed loop system.
Thetransfer function of a P-I-D controller is given by:
CHAPTER 3 MATERIALS & METHODS
Tuning of DC Motor By Using PSO & PID Page | 32
The order of the controller is low, but this controller has universal applicability; it can be
used in any type of SISO system, e.g. linear, nonlinear, time delay etc. Many of the MIMO
systems are first decoupled into several SISO loops and PID controllers are designed for
each loop. PID controllers have also been found to be robust, and that is the reason, it finds
wide acceptability for industrial processes. However, for proper use, a controller has to be
tuned for a particular process; i.e. selection of P,I,D parameters are very important and
process dependent. Unless the parameters are properly chosen, a controller may cause
instability to the closed loop system. The method of tuning of P,I,D parameters would be
taken up in the next lesson.
It is not always necessary that all the features of proportional, derivative and integral
actions should be incorporated in the controller. In fact, in most of the cases, a simple P-I
structure will suffice. A general guideline for selection of Controller mode, as suggested
by Liptak [1], is given below. PID controller is an automatic controller that compares the
actual value of the output of a system at the desired price and generates a control signal to
minimize the error value [7]. As the name implies PID controller consists of three basic
types, namely controller proportional, integral and derivative that can be used separately
or together depending on what we need. Each controller has characteristic
respectively.Characteristics of a proportional controller is determined by Kp (Constant
Proportional) [8]. Kp value is too small to generate a response rise time is slow, increase
the value of Kp will increase the response faster, but when the value of Kp is too large will
create an oscillating output. Characteristics of the integral controller can improve response
while eliminating the steady-state error, but the selection of Ki (Integral Constants) which
may cause high transient response, which can cause system instability. Selection of very
high Ki can also cause the output to oscillate. Characteristics of derivative controllers
cannot work alone because it is improve the transient response with an error predicting
what will happen. Selection of the value of Kd (constant Derivative) is appropriate can
improve system stability and reduce overshoot
CHAPTER 3 MATERIALS & METHODS
Tuning of DC Motor By Using PSO & PID Page | 33
3.4 Tuning of PID controller
3.4.1 Introduction
“Tuning” is the engineering work to adjust the parameters of the controller so that the
control system exhibits desired property. Currently, more than half of the controllers used
in industry are PID controllers [5]. In the past, many of these controllers were analog;
however, many of today's controllers use digital signals and computers. When a
mathematical model of a system is available, the parameters of the controller can be
explicitly determined. However, when a mathematical model is unavailable, the parameters
must be determined experimentally. Controller tuning is the process of determining the
controller parameters which produce the desired output. Controller tuning allows for
optimization of a process and minimizes the error between the variable of the process and
its set point [5]. Types of controller tuning methods include the trial and error method, and
process reaction curve methods. The most common classical controller tuning methods are
the Ziegler-Nichols and Cohen-Coon methods. These methods are often used when the
mathematical model of the system is not available. The Ziegler-Nichols method can be
used for both closed and open loop systems, while Cohen-Coon is typically used for open
loop systems. A closed-loop control system is a system which uses feedback control. In an
open-loop system, the output is not compared to the input [5]. A wide range of methods
have been developed to design and tune PID controllers
Special methods for PID controllers
Application of general techniques for control system design like pole placement that you
have learned in the class.The methods differ with respect to
Models
Model acquisition
Criteria
Design techniques We will present a selection
CHAPTER 3 MATERIALS & METHODS
Tuning of DC Motor By Using PSO & PID Page | 34
Where,
u is the control signal.
e is the difference between the current value and the set point.
Kc is the gain for a proportional controller.
Ti is the parameter that scales the integral controller.
Td is the parameter that scales the derivative controller.
t is the time taken for error measurement.
b is the set point value of the signal, also known as bias or offset.
3.4.2 Ziegler-Nichols’ Step Response Method
It has been observed that step responses of many processes to which PID controllers are
applied have monotonically increasing characteristics as shown in Figures a and b, so most
traditional design methods for PID controllers have been developed implicitly assuming
this property. However, there exist some processes that exhibit oscillatory responses to step
inputs. Two tuning methods were proposed by Ziegler and Nichols in 1942 and have been
widely utilized either in the original form or in modified forms. One of them, referred to
as Ziegler–Nichols‟ ultimate sensitivity method, is to determine the parameters as given in
Table 1 using the data Kcr and Tcr obtained from the ultimate sensitivity test. The other,
referred to as Ziegler–Nichols‟ step response method, is to assume the model FOPDT and
to determine the parameters of the PID controller as given in Table 2 using the parameters
R and L of FOPDT which are determined from the step response test.
Ziegler-Nichols ultimate sensitivity test
CHAPTER 3 MATERIALS & METHODS
Tuning of DC Motor By Using PSO & PID Page | 35
Switch controller to manual.
Make a step in the control variable.
Log process output. Normalize the curve so that it corresponds to a unit step.
Determine intercepts of tangent with steepest slope i.e. parameters a and L. The
controller parameters are obtained from a table.
Data: apparent time delay L and intercept a. Controller parameters are given by
Parameter Tp is an estimate of the response time of the closed loop system.
CHAPTER 3 MATERIALS & METHODS
Tuning of DC Motor By Using PSO & PID Page | 36
3.4.3 Ziegler-Nichols’ Frequency Response Method
 Switch the controller to pure proportional.
 Adjust the gain so that the closed loop system is at the stability boundary.
 Determine the gain ku (the ultimate gain) and the period Tu (the ultimate period) of
the oscillation.
 Suitable controller parameters are obtained from a table.
Properties
 + Easy to explain and use
 + Very common
 The closed loop system obtained too oscillatory _ 02. Part of the criterion (quarter
amplitude damping)
 Too large overshoot
 Sensitive to process variations Large scope for improvements.More process
information needed
3.4.4 Dynamics of Processes Suitable for PID Control
CHAPTER 3 MATERIALS & METHODS
Tuning of DC Motor By Using PSO & PID Page | 37
3.4.5 Industrial PID Controller
The order of the controller is low, but this controller has universal applicability; it can be
used in any type of SISO system, e.g. linear, nonlinear, time delay etc. Many of the MIMO
systems are first decoupled into several SISO loops and PID controllers are designed for
each loop. PID controllers have also been found to be robust, and that is the reason, it finds
wide acceptability for industrial processes. However, for proper use, a controller has to be
tuned for a particular process; i.e. selection of P,I,D parameters are very important and
process dependent. Unless the parameters are properly chosen, a controller may cause
instability to the closed loop system. The method of tuning of P,I,D parameters would be
taken up in the next lesson.
It is not always necessary that all the features of proportional, derivative and integral
actions should be incorporated in the controller. In fact, in most of the cases, a simple P-I
structure will suffice. A general guideline for selection of Controller mode, as suggested
by Liptak [1], is given below.A box, not an algorithm
 Auto-tuning functionality:
 pre-tune
 self-tune
CHAPTER 3 MATERIALS & METHODS
Tuning of DC Motor By Using PSO & PID Page | 38
 Manual/cascade mode switch
 Bumpless transfer between different modes, setpoint ramp
 Loop alarms
 Networked or serial port
Fig3.16.Industrial PID contorl
3.4.7 Application
In the early history of automatic process control the PID controller was implemented as a
mechanical device. These mechanical controllers used a lever, spring and a mass and were
often energized by compressed air. These pneumatic controllers were once the industry
standard [5]. Electronic analog controllers can be made from a solid-state or tube amplifier,
a capacitor and a resistance. Electronic analog PID control loops were often found within
more complex electronic systems, for example, the head positioning of a disk drive, the
power conditioning of a power supply, or even the movement-detection circuit of a modern
seismometer. Nowadays, electronic controllers have largely been replaced by digital
controllers implemented with microcontrollers or FPGAs. Most modern PID controllers in
industry are implemented in programmable logic controllers (PLCs) or as a panel-mounted
CHAPTER 3 MATERIALS & METHODS
Tuning of DC Motor By Using PSO & PID Page | 39
digital controller. Software implementations have the advantages that they are relatively
cheap and are flexible with respect to the implementation of the PID algorithm
Fig 3.17 Close-loop step response.
CHAPTER 4 RESULTS AND DISCUSSION
Tuning of DC Motor By Using PSO & PID Page | 40
CHAPTER 4
4.1 SOURCE CODE
%% Initialization
clear
clc
n = 20; % Size of the swarm " no of birds "
bird_setp =50; % Maximum number of "birds steps"
dim = 3; % Dimension of the problem
c2 =1.2; % PSO parameter C1
c1 = 0.12; % PSO parameter C2
w =0.9; % pso momentum or inertia
fitness=0*ones(n,bird_setp);
%-----------------------------%
% initialize the parameter %
%-----------------------------%
R1 = rand(dim, n);
R2 = rand(dim, n);
current_fitness =0*ones(n,1);
CHAPTER 4 RESULTS AND DISCUSSION
Tuning of DC Motor By Using PSO & PID Page | 41
%------------------------------------------------%
% Initializing swarm and velocities and position %
%------------------------------------------------%
current_position =1*abs((rand(dim, n)-0.5));
velocity = .3*randn(dim, n) ;
local_best_position = current_position ;
%-------------------------------------------%
% Evaluate initial population %
%-------------------------------------------%
for i = 1:n
current_fitness(i) = tracklsqpid(current_position(:,i));
end
local_best_fitness = current_fitness ;
[global_best_fitness,g] = min(local_best_fitness) ;
for i=1:n
globl_best_position(:,i) = local_best_position(:,g) ;
CHAPTER 4 RESULTS AND DISCUSSION
Tuning of DC Motor By Using PSO & PID Page | 42
end
%-------------------%
% VELOCITY UPDATE %
%-------------------%
velocity = w *velocity + c1*(R1.*(local_best_position-current_position)) +
c2*(R2.*(globl_best_position-current_position));
%------------------%
% SWARMUPDATE %
%------------------%
current_position = current_position + velocity ;
%------------------------%
% evaluate a new swarm %
%------------------------%
%% Main Loop
iter = 0 ; % Iterations’counter
while ( iter < bird_setp )
CHAPTER 4 RESULTS AND DISCUSSION
Tuning of DC Motor By Using PSO & PID Page | 43
iter = iter + 1;
for i = 1:n
current_fitness(i) = tracklsqpid(current_position(:,i)) ;
end
for i = 1 : n
if current_fitness(i) < local_best_fitness(i)
local_best_fitness(i) = current_fitness(i);
local_best_position(:,i) = current_position(:,i) ;
end
end
[current_global_best_fitness,g] = min(local_best_fitness);
if current_global_best_fitness < global_best_fitness
global_best_fitness = current_global_best_fitness;
for i=1:n
globl_best_position(:,i) = local_best_position(:,g);
CHAPTER 4 RESULTS AND DISCUSSION
Tuning of DC Motor By Using PSO & PID Page | 44
end
end
velocity = w *velocity + c1*(R1.*(local_best_position-current_position)) +
c2*(R2.*(globl_best_position-current_position));
current_position = current_position + velocity;
fprintf('********************** The value of iteration iter %3.0f
************************n', iter );
end % end of while loop its mean the end of all step that the birds move it
xx=fitness(:,bird_setp);
[Y,I] = min(xx);
current_position(:,I)
Kp=abs(current_position(1,I))
Ki=abs(current_position(2,I))
Kd=abs(current_position(3,I))
CHAPTER 4 RESULTS AND DISCUSSION
Tuning of DC Motor By Using PSO & PID Page | 45
%peak_overshoot=max(yout)-1;
% stepinfo(Sp(:,2),Sp(:,1))
function F = tracklsq(pid)
% Track the output of optsim to a signal of 1
% Variables a1 and a2 are shared with RUNTRACKLSQ
Kp = pid(1);
Ki = pid(2);
Kd = pid(3);
fprintf('The value of interation Kp= %3.0f, Ki= %3.0f, Kd= %3.0f n',
pid(1),pid(2),pid(3));
% Compute function value
simopt = simset('solver','ode45','SrcWorkspace','Current','DstWorkspace','Current');
% Initialize sim options
[tout,xout,yout] = sim('PSO_motor_test11',[0 20],simopt);
e=yout-1 ; % compute the error
sys_overshoot=max(yout)-1; % compute the overshoot
CHAPTER 4 RESULTS AND DISCUSSION
Tuning of DC Motor By Using PSO & PID Page | 46
alpha=5;beta=5;
F=e2*beta+sys_overshoot*alpha;
end
4.2 SIMULATION MODEL
Fig.17.-Block Diagram
CHAPTER 4 RESULTS AND DISCUSSION
Tuning of DC Motor By Using PSO & PID Page | 47
4.3 GRAPH
Fig.18.Graph
CHAPTER 5 CONCLUSSION & FUTURE SCOPE
Tuning of DC Motor By Using PSO & PID Page | 48
CHAPTER 5
5.1CONCLUSION
A PSO based experiment to design digital PID controllers has been reported. The
experiment was conducted in the first semester of 2017-2018, within a digital control
course to the 4th year electrical engineering and computers degree (5 years course). The
PSO algorithm was introduced to students by providing a video explaining the
algorithm bare bone dynamics, as well as presenting some test results. These tests
regard the minimization of a simple function, and students are expected to implement
the PSO algorithm and be able to replicate similar results. The results obtained in
practical classes indicated that students could successfully implement a PSO algorithm
and replicate the proposed tests. Perception and practical sensibility regarding the
principal PSO adjustable heuristic parameters was gained. This PSO learning stage,
allowed a fast transition from the benchmark function optimization to the PID digital
controller optimization. Different aspects regarding the digital PID control
implementation were implemented and tested allowing students to acquire skills in two
domains: artificial intelligence and control engineering. The feedback received from
students and the author perception regarding student’s enthusiasm in classes was quite
positive. Students were quite surprised with the effectiveness obtained with the PSO
algorithm. Moreover, it was clearly demonstrated by this experience that in the same
way students progressed from a simple two decision variables function optimization
problem to designing digital PID controllers, they can solve more complex control
engineering and other domains problems.
5.2 FUTURE SCOPE
 Algorithm for finding both optimal location and rating of System should be
designed by using PSO.
 The optimal ratings of Sytem can be analysed by using advanced optimization
techniques.
 Simultaneous placement of multiple System and their ratings for voltage
profile improvement should be developed using PSO.
BIBLIOGRAPHY
Tuning of DC Motor By Using PSO & PID Page | 50
BIBLIOGRAPHY
[1]K. H. A. K. H. Ang, G. Chong, and Y. L. Y. Li, “PID control system analysis, design, and
technology,” IEEE Trans. Control Syst. Technol., vol. 13, no. 4, pp. 559–576, 2005.
[2] Y.-B. W. Y.-B. Wang, X. P. X. Peng, and B.-Z. W. B.-Z. Wei, “A new particle swarm
optimization based auto-tuning of PID controller,” 2008 Int. Conf. Mach. Learn. Cybern., vol.
4, no. July, pp. 12–15, 2008.
[3] S. Panda, B. K. Sahu, and P. K. Mohanty, “Design and performance analysis of PID
controller for an automatic voltage regulator system using simplified particle swarm
optimization,” IET J. Franklin Inst., vol. 349, no. 8, pp. 2609–2625, 2012.
[4] Z.-L. L. Gaing, “A Particle Swarm Optimization Approach for Optimum Design of PID
Controller in AVR System,” IEEE Trans. Energy Convers., vol. 19, no. 2, pp. 384–391, 2004.
[5] D. D. B. Selvabala, “Real-coded genetic algorithm and fuzzy logic approach for real-time
tuning of proportional – integral – derivative controller in automatic voltage regulator system,”
vol. 3, no. February, pp. 641–649, 2009.
[6] Saadat, H. (1999). Power Stability Analysis. Third Edition. Mcgraw-Hill:New York
[7] Ogata, Katsuhiko. (1985). Teknik Kontrol Automatik Jilid 1. Alih Bahasa oleh Edi Laksono.
Jakarta: Erlangga.
[8] C. Wong, S. Li, and H. Wang, “Optimal PID Controller Design for AVR System,” vol. 12,
no. 3, pp. 259–270, 2009.
[9] B. K. Sahu, P. K. Mohanty, and N. Mishra, “system using Pattern Search algorithm,” IEEE
Int. Conf. Power Electron. Device Energy Syst. 2012, 2012.
[10] N. Madinehi, K. Shaloudegi, M. Abedi, and H. A. Abyaneh, “Optimum design of PID
controller in AVR system using intelligent methods,” 2011 IEEE PES Trondheim PowerTech
Power Technol. a Sustain. Soc. POWERTECH 2011, pp. 1–6, 2011.
[11] Kimiyaghalam, A., & Ashouri, A. (2008). Advanced Particle Swarm Optimization-Based
PID Controller Parameter Tuning. Proceedings Ofthe 12th IEEE International Multitopic
Conference, 429–435.
[12] J. C. J. Cao and B. C. B. Cao, “Design of Fractional Order Controllers Based on Particle
Swarm Optimization,” 2006 1ST IEEE Conf. Ind. Electron. Appl., pp. 775–781, 2006.
[13] Purnomo, H. (2014). Cara Mudah Belajar Metode Optimasi Methahuirstik Menggunakan
Matlab. Gave Media : Yogyakarta.
[14] M. R. AlRashidi and M. E. El-Hawary, “A Survey of Particle Swarm Optimization
Applications in Electric Power Systems,” IEEE Trans. Evol. Comput., vol. 13, no. 4, pp. 1–6,
2009.
[15]Kennedy, J. and Eberhart, R. C. Particle swarm optimization. Proc. IEEE int'l conf. on
neural networks Vol. IV, pp. 1942-1948. IEEE service center, Piscataway, NJ, 1995.
BIBLIOGRAPHY
Tuning of DC Motor By Using PSO & PID Page | 51
[16] Eberhart, R. C. and Kennedy, J. A new optimizer using particle swarm theory.
Proceedings of the sixth international symposium on micro machine and human
science pp. 39-43. IEEE service center, Piscataway, NJ, Nagoya, Japan, 1995.
[17] Eberhart, R. C. and Shi, Y. Particle swarm optimization: developments, applications and
resources. Proc. congress on evolutionary computation 2001 IEEE service center, Piscataway,
NJ., Seoul, Korea., 2001.
[18] Eberhart, R. C. and Shi, Y. Evolving artificial neural networks. Proc. 1998 Int'l Conf. on
neural networks and brain pp. PL5-PL13. Beijing, P. R. China, 1998.
[19] Eberhart, R. C. and Shi, Y. Comparison between genetic algorithms and particle swarm
optimization. Evolutionary programming vii: proc. 7th ann. conf. on
evolutionary conf., Springer-Verlag, Berlin, San Diego, CA., 1998.
[20] Shi, Y. and Eberhart, R. C. Parameter selection in particle swarm optimization.
Evolutionary Programming VII: Proc. EP 98 pp. 591-600. Springer-Verlag, New
York, 1998.
[21] Shi, Y. and Eberhart, R. C. A modified particle swarm optimizer. Proceedings of the
[22] IEEE International Conference on Evolutionary Computation pp. 69-73. IEEE Press,
Piscataway, NJ, 1998
[23] N. Rokbani and A M Alimi. "IK-PSO, PSO Inverse Kinematics Solver with Application
to Biped Gait Generation.lnternational", Journal of Computer Applications, vol 58, number
(22)., pp: 33-39, November 2012.
[24] Y. Shi, and R. Eberhart. "A modified particle swarm optimizer". In Proc of the 1998 IEEE
World Congress on Computational Intelligence and IEEE International Conference on
Evolutionary Computation, pp: 69-73, 1998 .
[25] M. Dorigo, M. Birattari, and T. Stutzle. "Ant colony optimization.", IEEE Computational
Intelligence Magazine (2006), 28-39, 2006.
[26] M. Reimann, and M. Laumanns. "A hybrid aco algorithm for the capacitated minimum
spanning tree problem." Proceedings of first international workshop on hybrid metaheuristics.
2004.
[27] Taibi, E.-G. Taxonomy of hybrid metaheuristics. Journal of heuristics, vol. 8, no 5, pp :
541-564,2002.
[28] W. Elloumi, N. Rokbani and AM. Alimi, " Ant supervised by PSO", . In Proc of
International symposium on Computational Intelligence and Intelligent Informatics, pp: 161-
166,2009.
[29] N. Rokbani, A L. Momasso, and A M. Alimi, "AS-PSO, Ant Supervised by PSO Meta-
heuristic with Application to TSP". Proceedings Engineering & Technology-Vol, 4, pp: 148-
152, 2013.
BIBLIOGRAPHY
Tuning of DC Motor By Using PSO & PID Page | 52
[30] N.Rokbani, E. Benbousaada, B. Ammar, B., & AM. Alimi. "Biped robot control using
particle swarm optimization". In IEEE International Conference on Systems Man and
Cybernetics (SMC), pp. 506-512, 2010.
[31] N. Rokbani, AM. Alimi, and B. Ammar. "Architectural Proposal for a Robotized
Intelligent humanoid, IZiman". In IEEE International Conference on Automation and
Logistics,pp : 1941-1946, 2007.
[10] N. Rokbani, and A M. Alimi. "Inverse Kinematics Using Particle Swarm Optimization, A
Statistical Analysis". Procedia Engineering, Elsevier, 2013.
[32] M. Aghaabbasloo,M . Azarkaman and M.E. Salehi,. "Biped robot joint trajectory
generation using PSO evolutionary algorithm". In Al & Robotics and 5th RoboCup Iran Open
International Symposium (RIOS), pp : 1-6,2013.
[33] N. Rokbani, Boussada, E. B., BA Cherif, and A M. Alimi. "From gaits to ROBOT, A
Hybrid methodology for A biped Walker". In Proc of Cia war 2009, Vol. 12, pp. 685-692,2009.
[34] M.E.H Pedersen and A J Chipperfield, "SimplifYing particle swarm optimization". In
Applied Soft Computing, volume 10, Issue 2,M arch 2010, pp. 618-628, Elsevier.
[35] Abdelbar, Ashraf M., Suzan Abdelshahid, and Donald C. Wunsch. "Fuzzy PSO: a
generalization of particle swarm optimization." Neural Networks, 2005. lJCNN'05.
Proceedings. 2005 IEEE International Joint Conference on. Vol. 2. IEEE, 2005.

More Related Content

What's hot

Guia laboratorio 1 de electrónica nueva
Guia laboratorio 1 de electrónica nuevaGuia laboratorio 1 de electrónica nueva
Guia laboratorio 1 de electrónica nuevaRodolfo Edison Ccuno
 
Speed control of Three phase Induction motor using AC voltage regulator
Speed control of Three phase Induction motor using AC voltage regulatorSpeed control of Three phase Induction motor using AC voltage regulator
Speed control of Three phase Induction motor using AC voltage regulatorShivagee Raj
 
Starting method of induction motors
Starting method of induction motorsStarting method of induction motors
Starting method of induction motorsGurkirat Singh
 
Lag lead compensator design in frequency domain 7th lecture
Lag lead compensator design in frequency domain  7th lectureLag lead compensator design in frequency domain  7th lecture
Lag lead compensator design in frequency domain 7th lectureKhalaf Gaeid Alshammery
 
Unit-2 Three Phase controlled converter
Unit-2 Three Phase controlled converter Unit-2 Three Phase controlled converter
Unit-2 Three Phase controlled converter johny renoald
 
Design and Analysis of DC-DC Bidirectional Converter for Vehicle to Grid Appl...
Design and Analysis of DC-DC Bidirectional Converter for Vehicle to Grid Appl...Design and Analysis of DC-DC Bidirectional Converter for Vehicle to Grid Appl...
Design and Analysis of DC-DC Bidirectional Converter for Vehicle to Grid Appl...PranayJagtap5
 
Speed control of dc motor using matlab
Speed control of dc motor using matlabSpeed control of dc motor using matlab
Speed control of dc motor using matlabShridhar kulkarni
 
Speed control of IM using Space Vector Modulation
Speed control of IM using Space Vector ModulationSpeed control of IM using Space Vector Modulation
Speed control of IM using Space Vector ModulationAsif Jamadar
 
Power power electronics (solution manual) by M.H.Rashid.pdf
Power power electronics (solution manual) by M.H.Rashid.pdfPower power electronics (solution manual) by M.H.Rashid.pdf
Power power electronics (solution manual) by M.H.Rashid.pdfGabrielRodriguez171709
 
STATE-SPACE AVERAGING METHOD
STATE-SPACE AVERAGING METHOD STATE-SPACE AVERAGING METHOD
STATE-SPACE AVERAGING METHOD Slobodan Cuk
 
9789811006234 c2
9789811006234 c29789811006234 c2
9789811006234 c2Wael_helal
 

What's hot (20)

Two Quadrant chopper
Two Quadrant chopperTwo Quadrant chopper
Two Quadrant chopper
 
DC Generators
DC GeneratorsDC Generators
DC Generators
 
Z bus building algorithm
Z bus building algorithmZ bus building algorithm
Z bus building algorithm
 
Guia laboratorio 1 de electrónica nueva
Guia laboratorio 1 de electrónica nuevaGuia laboratorio 1 de electrónica nueva
Guia laboratorio 1 de electrónica nueva
 
Speed control of Three phase Induction motor using AC voltage regulator
Speed control of Three phase Induction motor using AC voltage regulatorSpeed control of Three phase Induction motor using AC voltage regulator
Speed control of Three phase Induction motor using AC voltage regulator
 
Starting method of induction motors
Starting method of induction motorsStarting method of induction motors
Starting method of induction motors
 
Lag lead compensator design in frequency domain 7th lecture
Lag lead compensator design in frequency domain  7th lectureLag lead compensator design in frequency domain  7th lecture
Lag lead compensator design in frequency domain 7th lecture
 
Unit-2 Three Phase controlled converter
Unit-2 Three Phase controlled converter Unit-2 Three Phase controlled converter
Unit-2 Three Phase controlled converter
 
Dc generator
Dc generatorDc generator
Dc generator
 
Design and Analysis of DC-DC Bidirectional Converter for Vehicle to Grid Appl...
Design and Analysis of DC-DC Bidirectional Converter for Vehicle to Grid Appl...Design and Analysis of DC-DC Bidirectional Converter for Vehicle to Grid Appl...
Design and Analysis of DC-DC Bidirectional Converter for Vehicle to Grid Appl...
 
Speed control of dc motor using matlab
Speed control of dc motor using matlabSpeed control of dc motor using matlab
Speed control of dc motor using matlab
 
Vfd theory
Vfd theoryVfd theory
Vfd theory
 
Plc y reles
Plc y relesPlc y reles
Plc y reles
 
Speed control of IM using Space Vector Modulation
Speed control of IM using Space Vector ModulationSpeed control of IM using Space Vector Modulation
Speed control of IM using Space Vector Modulation
 
Power power electronics (solution manual) by M.H.Rashid.pdf
Power power electronics (solution manual) by M.H.Rashid.pdfPower power electronics (solution manual) by M.H.Rashid.pdf
Power power electronics (solution manual) by M.H.Rashid.pdf
 
STATE-SPACE AVERAGING METHOD
STATE-SPACE AVERAGING METHOD STATE-SPACE AVERAGING METHOD
STATE-SPACE AVERAGING METHOD
 
Induction machines
Induction machinesInduction machines
Induction machines
 
Speed control of dc motors
Speed control of dc motors Speed control of dc motors
Speed control of dc motors
 
Lec # 03 equivalent circuit of a synchronous generator
Lec # 03 equivalent circuit of a synchronous generatorLec # 03 equivalent circuit of a synchronous generator
Lec # 03 equivalent circuit of a synchronous generator
 
9789811006234 c2
9789811006234 c29789811006234 c2
9789811006234 c2
 

Similar to TUNING OF DC MOTOR BY USING PSO & PID

IMPROVED MPPT METHOD TO INCREASE ACCURACY & SPEED IN PHOTOVOLTAIC UNDER VARIA...
IMPROVED MPPT METHOD TO INCREASE ACCURACY & SPEED IN PHOTOVOLTAIC UNDER VARIA...IMPROVED MPPT METHOD TO INCREASE ACCURACY & SPEED IN PHOTOVOLTAIC UNDER VARIA...
IMPROVED MPPT METHOD TO INCREASE ACCURACY & SPEED IN PHOTOVOLTAIC UNDER VARIA...Naimesh Rama
 
Solar Colony: Designing and Economics of Rooftop Solar PV System
Solar Colony: Designing and Economics of Rooftop Solar PV SystemSolar Colony: Designing and Economics of Rooftop Solar PV System
Solar Colony: Designing and Economics of Rooftop Solar PV SystemAbhishek Desai
 
BE_Project_Blackbook
BE_Project_BlackbookBE_Project_Blackbook
BE_Project_BlackbookAkshay Bhirud
 
DESIGN AND DEVELOPMENT OF SOLAR CHARGE CONTROLLER WITH SUN TRACKING
DESIGN AND DEVELOPMENT OF SOLAR CHARGE CONTROLLER WITH SUN TRACKINGDESIGN AND DEVELOPMENT OF SOLAR CHARGE CONTROLLER WITH SUN TRACKING
DESIGN AND DEVELOPMENT OF SOLAR CHARGE CONTROLLER WITH SUN TRACKINGChukka Nikhil Chakravarthy
 
sample project report (2).docx
sample project report (2).docxsample project report (2).docx
sample project report (2).docxDrFROSTFIRExR
 
DFIG control of WECS using indirect matrix converter
DFIG control of WECS using indirect matrix converter DFIG control of WECS using indirect matrix converter
DFIG control of WECS using indirect matrix converter Kuldeep Behera
 
Training manual for engineers on solar pv system
Training manual for engineers on solar pv systemTraining manual for engineers on solar pv system
Training manual for engineers on solar pv systemDeepak Kumar
 
sub-synchronous interactions between type 3 wind turbine using fuzzy logic
sub-synchronous interactions between type 3 wind turbine using fuzzy logicsub-synchronous interactions between type 3 wind turbine using fuzzy logic
sub-synchronous interactions between type 3 wind turbine using fuzzy logicDharma Teja
 
NBA - laboratories
NBA -  laboratoriesNBA -  laboratories
NBA - laboratoriesSHIMI S L
 
Final Year Project Report
Final Year Project ReportFinal Year Project Report
Final Year Project ReportNeel Patel
 
AIR BAG CRASH USING MEMS
AIR BAG CRASH USING MEMS AIR BAG CRASH USING MEMS
AIR BAG CRASH USING MEMS Ganesh Gani
 
AN EXPERIMENTAL DESIGN & ANALYSIS OF PORTABLE USB POWERED THERMO ELECTRIC COOLER
AN EXPERIMENTAL DESIGN & ANALYSIS OF PORTABLE USB POWERED THERMO ELECTRIC COOLERAN EXPERIMENTAL DESIGN & ANALYSIS OF PORTABLE USB POWERED THERMO ELECTRIC COOLER
AN EXPERIMENTAL DESIGN & ANALYSIS OF PORTABLE USB POWERED THERMO ELECTRIC COOLERPranavNavathe
 

Similar to TUNING OF DC MOTOR BY USING PSO & PID (20)

IMPROVED MPPT METHOD TO INCREASE ACCURACY & SPEED IN PHOTOVOLTAIC UNDER VARIA...
IMPROVED MPPT METHOD TO INCREASE ACCURACY & SPEED IN PHOTOVOLTAIC UNDER VARIA...IMPROVED MPPT METHOD TO INCREASE ACCURACY & SPEED IN PHOTOVOLTAIC UNDER VARIA...
IMPROVED MPPT METHOD TO INCREASE ACCURACY & SPEED IN PHOTOVOLTAIC UNDER VARIA...
 
Solar Colony: Designing and Economics of Rooftop Solar PV System
Solar Colony: Designing and Economics of Rooftop Solar PV SystemSolar Colony: Designing and Economics of Rooftop Solar PV System
Solar Colony: Designing and Economics of Rooftop Solar PV System
 
BE_Project_Blackbook
BE_Project_BlackbookBE_Project_Blackbook
BE_Project_Blackbook
 
DESIGN AND DEVELOPMENT OF SOLAR CHARGE CONTROLLER WITH SUN TRACKING
DESIGN AND DEVELOPMENT OF SOLAR CHARGE CONTROLLER WITH SUN TRACKINGDESIGN AND DEVELOPMENT OF SOLAR CHARGE CONTROLLER WITH SUN TRACKING
DESIGN AND DEVELOPMENT OF SOLAR CHARGE CONTROLLER WITH SUN TRACKING
 
sample project report (2).docx
sample project report (2).docxsample project report (2).docx
sample project report (2).docx
 
final report
final reportfinal report
final report
 
PIR based security system
PIR based security systemPIR based security system
PIR based security system
 
Front
FrontFront
Front
 
DFIG control of WECS using indirect matrix converter
DFIG control of WECS using indirect matrix converter DFIG control of WECS using indirect matrix converter
DFIG control of WECS using indirect matrix converter
 
Solar tracking system - content
Solar tracking system - contentSolar tracking system - content
Solar tracking system - content
 
Training manual for engineers on solar pv system
Training manual for engineers on solar pv systemTraining manual for engineers on solar pv system
Training manual for engineers on solar pv system
 
Simulation of Automatic speed control DC Drive
Simulation of Automatic speed control DC DriveSimulation of Automatic speed control DC Drive
Simulation of Automatic speed control DC Drive
 
sub-synchronous interactions between type 3 wind turbine using fuzzy logic
sub-synchronous interactions between type 3 wind turbine using fuzzy logicsub-synchronous interactions between type 3 wind turbine using fuzzy logic
sub-synchronous interactions between type 3 wind turbine using fuzzy logic
 
Final Report Content
Final Report ContentFinal Report Content
Final Report Content
 
NBA - laboratories
NBA -  laboratoriesNBA -  laboratories
NBA - laboratories
 
B.Tech Thesis
B.Tech ThesisB.Tech Thesis
B.Tech Thesis
 
THESIS
THESISTHESIS
THESIS
 
Final Year Project Report
Final Year Project ReportFinal Year Project Report
Final Year Project Report
 
AIR BAG CRASH USING MEMS
AIR BAG CRASH USING MEMS AIR BAG CRASH USING MEMS
AIR BAG CRASH USING MEMS
 
AN EXPERIMENTAL DESIGN & ANALYSIS OF PORTABLE USB POWERED THERMO ELECTRIC COOLER
AN EXPERIMENTAL DESIGN & ANALYSIS OF PORTABLE USB POWERED THERMO ELECTRIC COOLERAN EXPERIMENTAL DESIGN & ANALYSIS OF PORTABLE USB POWERED THERMO ELECTRIC COOLER
AN EXPERIMENTAL DESIGN & ANALYSIS OF PORTABLE USB POWERED THERMO ELECTRIC COOLER
 

More from Indian Institute of Technology Guwahati

More from Indian Institute of Technology Guwahati (15)

Operation and Control of Inductive Wireless Power Transfer
Operation and Control of Inductive Wireless Power Transfer Operation and Control of Inductive Wireless Power Transfer
Operation and Control of Inductive Wireless Power Transfer
 
CUK CONVERTER.pdf
CUK CONVERTER.pdfCUK CONVERTER.pdf
CUK CONVERTER.pdf
 
Three_Phase_Inverter_in_120_mode.pdf
Three_Phase_Inverter_in_120_mode.pdfThree_Phase_Inverter_in_120_mode.pdf
Three_Phase_Inverter_in_120_mode.pdf
 
Flyback Converter.pdf
Flyback Converter.pdfFlyback Converter.pdf
Flyback Converter.pdf
 
Buck converter.pdf
Buck converter.pdfBuck converter.pdf
Buck converter.pdf
 
Boost Converter simulation model.pdf
Boost Converter simulation model.pdfBoost Converter simulation model.pdf
Boost Converter simulation model.pdf
 
Buck Boost Converter with simulation model.pdf
Buck Boost Converter with simulation model.pdfBuck Boost Converter with simulation model.pdf
Buck Boost Converter with simulation model.pdf
 
ZERO TURNING RADIUS STRETCHER (ZTRS)
ZERO TURNING RADIUS STRETCHER (ZTRS)ZERO TURNING RADIUS STRETCHER (ZTRS)
ZERO TURNING RADIUS STRETCHER (ZTRS)
 
DLW Electrical Engineering industrial training Report
DLW Electrical Engineering industrial training Report DLW Electrical Engineering industrial training Report
DLW Electrical Engineering industrial training Report
 
Automatic street light based on vehicles movement report
Automatic street light based on vehicles movement reportAutomatic street light based on vehicles movement report
Automatic street light based on vehicles movement report
 
UPQC ppt main
UPQC ppt mainUPQC ppt main
UPQC ppt main
 
Power quality improvement using UPQC
Power quality improvement using UPQCPower quality improvement using UPQC
Power quality improvement using UPQC
 
Automatic road light based on vehicles movement
Automatic road light based on vehicles movementAutomatic road light based on vehicles movement
Automatic road light based on vehicles movement
 
An overview of FACTS devices
An overview of FACTS devicesAn overview of FACTS devices
An overview of FACTS devices
 
DLW Electrical Engineering industrial training slides
DLW Electrical Engineering industrial training slidesDLW Electrical Engineering industrial training slides
DLW Electrical Engineering industrial training slides
 

Recently uploaded

Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 

Recently uploaded (20)

Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 

TUNING OF DC MOTOR BY USING PSO & PID

  • 1. TUNING OF DC MOTOR BY USING PSO & PID A project submitted in partial fulfillment of the requirement for the award of the degree of BACHELOR OF TECHNOLOGY IN ELECTRICAL ENGINEERING Submitted by SHATRUGHAN MAURYA (ID NO. 215505) DIVYA PRAKASH (ID NO. 215514) SHUBHAM KUMAR (ID NO. 215517) Under the Supervision of Mr. ANURAG SINGH Assistant Professor Department of Electrical Engineering, Uma Nath Singh Institute of Engineering & Technology, VEER BAHADUR SINGH PURVANCHAL UNIVERSITY, JAUNPUR, INDIA [2015-2019]
  • 2. CERTIFICATE This is to certify that the project entitled “Tuning of DC motor by Using PSO & PID” submitted by Shatrughan Maurya (ID No. 215505), Divya Prakash (ID No. 215514) and Shubham Kumar (ID No. 215555) to Department of Electrical Engineering, Uma Nath Singh Institute of Engineering and Technology, Veer Bahadur Singh Purvanchal University, Jaunpur, is a record of bonfide research work carried out by them under my supervision and is worthy of consideration for the award of the degree of Bachelor of Technology in Electrical Engineering. The embodiment of this project has not been submitted in any other University and/or Institute for the award of the any degree. Dr. Rajnish Bhasker Mr. ANURAG SINGH (HEAD) (Supervisor) Assistant Professor Assistant Professor UNSIET, VBSPU, Jaunpur UNSIET, VBSPU, Jaunpur Date: 04/05/2019 Place: Department of Electrical Engineering UNSIET, VBSPU, Jaunpur
  • 3. DECLARATION We Shatrughan Maurya (ID No. 215505), Divya Prakash (ID No. 215514) and Shubham Kumar (ID No. 215517) declare that the work presented in this project entitled “Tuning of DC Motor by Using PSO & PID” submitted to the Department of Electrical Engineering, in Uma Nath Singh Institute of Engineering and Technology, Veer Bahadur Singh Purvanchal University, Jaunpur for the award of the Bachelor of Technology degree in Electrical Engineering an original work. We have done this research work on our own under the guidance of Mr. Satyam Kumar Upadhyay, The data mentioned in this report have been generated during the work and experiments are genuine. It is the result of extensive work carried out by us. We have neither plagiarized nor submitted the same work for the award of any other degree. In case this undertaking is found incorrect, our degree may be withdrawn unconditionally by the University. …………………………. SHATRUGHAN MAURYA (ID NO. 215505) …………………………. DIVYA PRAKASH (ID NO. 215514) …………………………. SHUBHAM KUMAR (ID NO. 215517) Date: 04/05/2019 Place: Department of Electrical Engineering UNSIET, VBSPU, Jaunpur
  • 4. ACKNOWLEDGMENT On the submission of my report entitled “Tuning of DC Motor By Using PSO & PID” I would like to extend my gratitude and sincere thanks to project co-coordinator, my guide Mr. Anurag Singh (Assistant Professor), Dept. of Electrical Engineering for her constant motivation and support during the course work.. We would also like to thank Dr. Rajnish Bhasker (Head of Department, Electrical Engineering) for providing us with resources and facilities as and when needed. I also deeply appreciate my parents and friends for their consistent support throughout, without my family’s sacrifice and support, this work would not have been possible. I would like to affirm my indebtedness to my parents and my younger sister for care, support, and encouragement. I would like to thank all others who have consistently encouraged me and gave me moral support, without whose help it would be difficult to finish this project. Last but not the least we would like to thank all the Teacher’s & Staff members of Department of Electrical Engineering who have been very cooperative with us. …………………………. SHATRUGHAN MAURYA (ID NO. 215505) …………………………. DIVYA PRAKASH (ID NO. 215514) …………………………. SHUBHAM KUMAR (ID NO. 215517) iv
  • 5. ABSTRACT A concept for the optimization of nonlinear functions using particle swarm methodology is introduced.The evolution of several paradigms is outlined, and an implementation of one of the paradigms is discussed. Benchmark testing of the paradigm is described, and applications, including nonlinear function optimization and neural network training, are proposed. The relationships between particle swarm optimization and both artificial life and genetic algorithms are described, The use of videos is a valuable and powerful tool which may significantly contribute to change and improve teaching and learning methods. Lecturers can made their own videos addressing specific topics suitable to fulfill their student’s needs. These videos can address control engineering syllabus as well as complementary topics. This paper proposes using video as a tool to introduce the particle swarm optimization algorithm to students within a digital PID control simulation experiment. The experience preliminary results and feedback received from students are quite positive. PID Controller (Proportional Integral Derivative) was invented since 1910, but till today still is used in industries, even though there are many kind of modern controllers like fuzz controller and neural network controller are being developed. Performance of PID controller is depend on on Proportional Gain (Kp), Integral Gain (Ki) and Derivative Gain (Kd). These gains can be got by using method Ziegler-Nichols (ZN), gain-phase margin, Root Locus, Minimum Variance dan Gain Scheduling however these methods are not optimal to control systems that nonlinear and have highorder, in addition, some methods relative hard. To solve those obstacles, particle swarm optimization (PSO) algorithm is proposed to get optimal Kp, Ki and Kd. PSO is proposed because PSO has convergent result and not require many iterations. On this research, PID controller is applied on AVR (Automatic Voltage Regulator). Based on result of analyzing transient, stability Root Locus and frequency response, performance of PID controller is better than Ziegler-Nichols. v
  • 6. TABLE OF CONTENTS CONTENT PAGE NO. Acknowledgement iv Abstract v Table of Contents vi List of Figures viii List of Symbols & Abbreviations ix CHAPTER 1: INTRODUCTION 1-4 1.1 Partcile Swarm Optimization 1 CHAPTER 2: REVIEW OF LITERATURE 5-8 2.1 Overview 5 CHAPTER 3: MATERIALS & METHODS 9-39 3.1 Particle Swarm Optimization(PSO) 9 3.1.1 Introduction 9-10 3.1.2 Particle Swarm Optimization Basic Issues 11 3.1.3 Simulation Experimentation Description 11-14 3.1.4 Design Of Digital PID Controller with PSO 15 3.2 Sequencing and Scheduling 16 3.2.1 Types of Scheduling 16 3.2.1.1 Single Machine Schedule 16 3.2.1.2 Flow Shop Scheduling 16 3.2.1.3 Job Shop Scheduling 17 3.3 Proportionl Integral Derivative(PID) 18 3.3.1 Introduction 18-20 3.3.2 A PID Algorithm 20 3.3.3 PID Control 20 3.3.4 Computer Implementation 21 3.3.5 Sampling, Aliasing and Antialiasing Filters 21-22 3.3.6 Proportional Control 23-25 3.3.7 Integral Control 26 3.3.8 Proportional Plus Integral (P-I) Control 27-29 3.3.9 Proportional Plus Derivative (P-D) Control 29-30 3.3.10 Proportional-Integral-Derivative (PID) control 30-32 vi
  • 7. 3.4 Tuning of PID Controller 33-34 3.4.1 Introduction 34-35 3.4.2 Ziegler-Nichols’ Step Response Method 36 3.4.3 Ziegler-Nichols’ Frequency Response Method 36 3.4.4 Dynamics of Processes Suitable for PID Control 36 3.4.5 Industrial PID Controller 37-38 3.4.7 Application 38-39 CHAPTER 4: RESULTS AND DISCUSSION 40-47 4.1 Source Code 40-46 4.2 Simulink 46 4.3 Graph 47 CHAPTER 5: CONCLUSSION & FUTURE SCOPE 48 5.1 Conclusions 48 5.2 Future Work 48 BIBLIOGRAPHY 49-51 vii
  • 8. LIST OF FIGURE Figure No. Figure Name Page No. Fig. 3.1 Flow Chart of PSO 2 Fig. 3.2 Test 1: swarm with n=4, decaying in the interval [0.9, 0.4]. 3 Fig. 3.3 Evolution of the best values for x1 and x2 for test 1 3 Fig. 3.4 swarm with n=4, decaying in the interval [0.9, 0.4] 11 Fig. 3.5 Test 4: swarm with n=50, Inertia weight fixed 11 Fig. 3.6 Block dia of pid controller 12 Fig. 3.7 Sampling 14 Fig. 3.8 Block Diagram of Proportional Controller 15 Fig. 3.9 Response with a Proportional Controller 15 Fig. 3.10 Integral Control 16 Fig. 3.11 Step Response with integral control system 17 Fig. 3.12 Proportional plus integral control system 18 Fig. 3.13 comparison among the transient response with P,I and P-I control 18 Fig. 3.14 contol action wth a higher order process 20 Fig.3.15 improvement of transient response with P-D control 22 Fig. 3.16 Industrial PID contorl 22 Fig. 3.17 Close-loop step response. 25 Fig. 4.1 Block Diagram 27 Fig. 4.2 Graph 28 viii
  • 9. LIST OF SYMBOL Kp Proportional gain Kd Derivative time Ki Integral time e(t) Instantaneous process error at time SP Set point PV Process variable Vref Reference Voltage Vout Output voltage U Control signal. E Difference between the current value and the set point. Kc Gain for a proportional controller. Ti Parameter that scales the integral controller. Td Parameter that scales the derivative controller. t Time taken for error measurement. b Set point value of the signal, also known as bias or offset. ix
  • 10. CHAPTER 1 INTRODUCTION Tuning of DC Motor By Using PSO & PID Page | 1 CHAPTER 1 INTRODUCTION Current students demand new teaching and learning methodologies. Videos can be used for different purposes, such as the following examples: i) to record classes and make them available in an internet repository or university learning management system (Crook and Schofield, 2017); This approach is currently used both by eLearning and classical courses; ii) to provide short introductions addressing topics covered in classes (Rossiter, 2013). Videos are the flipped (or inverted) classroom (FC) approach key essence (Rossiter, 2014; Oliveira and Boaventura, 2017). In the FC, short videos can be used by students as a preparation element for the next class, releasing class-time which can be best used to promote students engagement and motivation with other learning activities (e.g. group problem solving, quizzes answering, computer simulations, group critical debate, etc.). However, videos can also be used by students to complement their learning process whenever they feel like it and at their own pace; iii) control simulations or practical rig demos; iv) technical training support (Starr et al., 2015). Indeed, it has been found that videos can help in increasing student’s motivation to the learning process (Bravo et al., 2011). Videos can also be used to provide introduction to complementary topics not covered in industrial control and automation courses. This is the case of some Artificial Intelligence (AI) and Machine Learning topics, which are skills highly requested in the Internet of Things and Industry 4.0. Proportional, Integrative and Derivative (PID) controllers are a fundamental control engineering education topic, quite relevant due to its extensive practical use in industrial systems. This topic is transversal to different engineering applications (Electrical, Mechanical, Chemistry, Biomedical, etc.). An important skill to be acquire by students is how to design PID controllers. Since Ziegler and Nichols (1942) breakthrough techniques many alternative and complementary PID tuning and design methods have been proposed (e.g. Åström and Hägglund, 2004; Vrančić 2001; O’Dwyer A., 2006)). With the development of computer based methods, the incorporation of optimization approaches constitute a strong alternative to design PID controllers (Mercader et al., 2017). Optimization methods which are inspired in nature and
  • 11. CHAPTER 1 INTRODUCTION Tuning of DC Motor By Using PSO & PID Page | 2 biological (NABI) phenomena have been successfully applied to design PID controllers. Examples of the most well-established methods are genetic algorithms (Holland, 1975), Particle Swarm Optimization (PSO) (Kennedy and Eberhart, 1995) , differential evolution (Storn and Price, 1995), etc. Indeed, NABI can be used as an alternative to classical design methods. Some of their advantages are the following: they just need a cost function to guide the search procedure; they do depend on the evaluation of derivatives or gradients; they are independent of the type of system to be controlled and may not require any knowledge regarding their specific dynamics. Thus considering the success popularity attained by NABI techniques in solving a wide range engineering problems it is natural to teach this methods in control engineering courses. Machine scheduling problems arises in diverse areas such as flexible manufacturing system, production planning, computer design, logistics, communication etc. A common feature of many of these problems is that no efficient solution algorithm is known yet for solving it to optimality in polynomial time. The classical job shop scheduling problem is one of the most well known scheduling problems. Informally the problem can be described as follows: There are set of jobs and a set of machines. Each job consists of chain of operation, each of which needs to be processed during an uninterrupted time period of a given length on agiven machine. Each machine can process at most one operation at a time. A schedule is an allocation of operations to time intervals of the machines. The problem is to find the schedule of minimum length. JSP is among the hardest combinatorial optimization problems. Because of its inherent intractability, heurisitic procedures are an attractive alternative. Most conventional heuristic procedures use a priority rule, which is a rule for choosing operation from specified subset of as yet unscheduled operations. In this project we have to study the method of Particle swarm optimization (PSO) which is being applied to job shop scheduling case so as to get an optimum processing time.Particle swarm optimization is the latest evolutionary optimization techniques, and it is based on the metaphor of social interaction and communication such as bird flocking and fish schooling. PSO does not employ the filtering operations like crossover or mutation. In this search procedure, the members of the entire population are maintained so that the
  • 12. CHAPTER 1 INTRODUCTION Tuning of DC Motor By Using PSO & PID Page | 3 information is socially shared among individuals to direct the search towards the best position in search space. In a PSO algorithm, each member is called particle, and each particles has some velocity with which it flies in the search space, which is being upgraded by the particle’s own experience and the experience of the particle’s neighbors or particle’s experience from the whole group, here regarded as swarm. There are two types of the PSO algorithm, namely PSO with a global neighborhood and PSO with a local neighborhood. According to the global neighborhood, each particle moves towards its best previous position and towards the best particle in the whole swarm called gbest model. On the other hand, according to the local variant so called lbest, each particle moves towards its previous position and towards the best particle in its restricted neighborhood. Simple concept and economic computational cost are the merits of PSO, which is a combinatorial optimization problem technique. Job shop scheduling problem is a typical combinatorial optimization problem, in job shop scheduling problem each and every job is not processed through all machines in the same sequence as in flow shop scheduling problem. Here different jobs have different sequence of operations and jobs may or may not pass through every machine and each machine has different sequence of jobs. So it is a complex combinatorial problem in which different kind of representation can be done but we employ job based representation. There are several constraints on jobs and machines in job shop scheduling problems which are as follows: 1. A job does not visit the same machine twice. 2. There are no precedence constraints among operations of different jobs. 3. Operations can not be interrupted. 4. Each machine can process only one job at a time. 5. Neither release times nor due dates are specified. “Tuning” is the engineering work to adjust the parameters of the controller so that the control system exhibits desired property. Currently, more than half of the controllers used in industry are PID controllers [5]. In the past, many of these controllers were analog; however, many of today's controllers use digital signals and computers. When a mathematical model of a system is available, the parameters of the controller can be explicitly determined. However, when a mathematical model is unavailable, the parameters
  • 13. CHAPTER 1 INTRODUCTION Tuning of DC Motor By Using PSO & PID Page | 4 must be determined experimentally. Controller tuning is the process of determining the controller parameters which produce the desired output. Controller tuning allows for optimization of a process and minimizes the error between the variable of the process and its set point [5]. Types of controller tuning methods include the trial and error method, and process reaction curve methods. The most common classical controller tuning methods are the Ziegler-Nichols and Cohen-Coon methods. These methods are often used when the mathematical model of the system is not available. The Ziegler-Nichols method can be used for both closed and open loop systems, while Cohen-Coon is typically used for open loop systems. A closed-loop control system is a system which uses feedback control. In an open-loop system, the output is not compared to the input [5]. A wide range of methods have been developed to design and tune PID controllers
  • 14. CHAPTER 2 OVERVIEW Tuning of DC Motor By Using PSO & PID Page | 5 CHAPTER 2 2.1 Overview A concept for the optimization of nonlinear functions using particle swarm methodology is introduced.The evolution of several paradigms is outlined, and an implementation of one of the paradigms is discussed. Benchmark testing of the paradigm is described, and applications, including nonlinear function optimization and neural network training, are proposed. The relationships between particle swarm optimization and both artificial life and genetic algorithms are described, The use of videos is a valuable and powerful tool which may significantly contribute to change and improve teaching and learning methods. Lecturers can made their own videos addressing specific topics suitable to fulfill their student’s needs. These videos can address control engineering syllabus as well as complementary topics. This paper proposes using video as a tool to introduce the particle swarm optimization algorithm to students within a digital PID control simulation experiment. The experience preliminary results and feedback received from students are quite positive. PID Controller (Proportional Integral Derivative) was invented since 1910, but till today still is used in industries, even though there are many kind of modern controllers like fuzz controller and neural network controller are being developed. Performance of PID controller is depend on on Proportional Gain (Kp), Integral Gain (Ki) and Derivative Gain (Kd). These gains can be got by using method Ziegler-Nichols (ZN), gain-phase margin, Root Locus, Minimum Variance dan Gain Scheduling however these methods are not optimal to control systems that nonlinear and have highorder, in addition, some methods relative hard. To solve those obstacles, particle swarm optimization (PSO) algorithm is proposed to get optimal Kp, Ki and Kd. PSO is proposed because PSO has convergent result and not require many iterations. On this research, PID controller is applied on AVR (Automatic Voltage Regulator). Based on result of analyzing transient, stability Root Locus and frequency response, performance of PID controller is better than Ziegler-Nichols. PSO algorithm was first introduced by Eberhart and Kennedy in 1995. The origin of the PSO terinipirasi of the behavior of a flock of birds or a school of fish while searching for prey. Demonstrating how the Particle Swarm Optimization, to take the example of a number of patikel (in PSO, individuals are often referred to patikel), N moving
  • 15. CHAPTER 2 OVERVIEW Tuning of DC Motor By Using PSO & PID Page | 6 together in a search space S. Each particles of i is kanidat settlement and expressed by the vector xi. Each particle has a position and velocity and will move based on experience and information from the social environment and the current position and the particle. Experience particle i expressed as pi best position ever achieved by these particles. Information from the environment is represented by particles that have the best position g, in the collection of the particles. Sequencing is a technique to order the jobs in a particular sequence. There are different types of sequencing which are followed in industries such as first in first out basis, priority basis, job size basis and processing time basis etc. In processing time basis sequencing for different sequence, we will achieve different processing time. The sequence is adapted which gives minimum processing time. By Scheduling, we assign a particular time for completing a particular job. The main objective of scheduling is to arrive at a position where we will get minimum processing time. The controller may have different structures. Different design methodologies are there for designing the controller in order to achieve desired performance level. But the most popular among them is Proportional-Integral-derivative (PID) type controller. In fact more than 95% of the industrial controllers are of PID type. As is evident from its name, the output of the PID controller u(t) can be expressed in terms of the input e(t). A proportional control system is a type of linear feedback control system Proportional control is how most drivers control the speed of a car. If the car is at target speed and the speed increases slightly, the power is reduced slightly, or in proportion to the error (the actual versus target speed), so that the car reduces speed gradually and reaches the target point with very little, if any, "overshoot", so the result is much smoother control than on-off control.In the proportional control algorithm, the controller output is proportional to the error signal, which is the difference between the set point and the process variable. In other words, the output of a proportional controller is the multiplication product of the error signal and the proportional gain. Proportional-Derivative or PD control combines proportional control and derivative control in parallel. Derivative action acts on the derivative or rate of change of the control error. This provides a fast response, as opposed to the integral action, but cannot accommodate constant errors (i.e. the derivative of a constant, nonzero error is(0). Derivatives have a phase of +90 degrees leading to an anticipatory or predictive response.
  • 16. CHAPTER 2 OVERVIEW Tuning of DC Motor By Using PSO & PID Page | 7 However, derivative control will produce large control signals in response to high frequency control errors such as set point changes (step command) and measurement noise. In order to use derivative control the transfer functions must be proper. This often requires a pole to be added to the controller. The PID controller was first placed on the market in 1939 and has remained the most widely used controller in process control until today. An investigation performed in 1989 in Japan indicated that more than 90% of the controllers used in process industries are PID controllers and advanced versions of the PID controller. PI controllers are fairly common, since derivative action is sensitive to measurement noise “PID control” is the method of feedback control that uses the PID controller as the main tool. The basic structure of conventional feedback control systems is shown in Figure, using a block diagram representation. In this figure, the process is the object to be controlled. The purpose of control is to make the process variable y follow the set-point value r. To achieve this purpose, the manipulated variable u is changed at the command of the controller. As an example of processes, consider a heating tank in which some liquid is heated to a desired temperature by burning fuel gas. The process variable y is the temperature of the liquid, and the manipulated variable u is the flow of the fuel gas. The “disturbance” is any factor, other than the manipulated variable, that influences the process variable. Figure below assumes that only one disturbance is added to the manipulated variable. In some applications, however, a major disturbance enters the process in a different way, or plural disturbances need to be considered. The error e is defined by e = r – y. The compensator C(s) is the computational rule that determines the manipulated variable u based on its input data, which is the error e in the case of Figure. The last thing to notice about the Figure is that the process variable y is assumed to be measured by the detector, which is not shown explicitly here, with sufficient accuracy instantaneously that the input to the controller can be regarded as being exactly equal to y. When used in this manner, the three element of PID produces outputs with the following nature:P element: proportional to the error at the instant t, this is the “present” error.I element: proportional to the integral of the error up to the instant t, which can be interpreted as the accumulation of the “past” error.D element: proportional to the derivative of the error at the instant t, which can be interpreted as the prediction of the “future” error. Thus, the PID controller can be understood as a controller that takes the present, the past, and the future of the error
  • 17. CHAPTER 2 OVERVIEW Tuning of DC Motor By Using PSO & PID Page | 8 into consideration. “Tuning” is the engineering work to adjust the parameters of the controller so that the control system exhibits desired property. Currently, more than half of the controllers used in industry are PID controllers [5]. In the past, many of these controllers were analog; however, many of today's controllers use digital signals and computers. When a mathematical model of a system is available, the parameters of the controller can be explicitly determined. However, when a mathematical model is unavailable, the parameters must be determined experimentally. Controller tuning is the process of determining the controller parameters which produce the desired output. Controller tuning allows for optimization of a process and minimizes the error between the variable of the process and its set point [5]. Types of controller tuning methods include the trial and error method, and process reaction curve methods. The most common classical controller tuning methods are the Ziegler-Nichols and Cohen-Coon methods. These methods are often used when the mathematical model of the system is not available. The Ziegler-Nichols method can be used for both closed and open loop systems, while Cohen- Coon is typically used for open loop systems. A closed-loop control system is a system which uses feedback control. In an open-loop system, the output is not compared to the input [5]. A wide range of methods have been developed to design and tune PID controllers
  • 18. CHAPTER 3 MATERIALS & METHODS Tuning of DC Motor By Using PSO & PID Page | 9 CHAPTER 3 3.1 Paricle Swarm Optimization (PSO) 3.1.1 Introduction PSO algorithm was first introduced by Eberhart and Kennedy in 1995. The origin of the PSO terinipirasi of the behavior of a flock of birds or a school of fish while searching for prey. Demonstrating how the Particle Swarm Optimization, to take the example of a number of patikel (in PSO, individuals are often referred to patikel), N moving together in a search space S. Each particles of i is kanidat settlement and expressed by the vector xi. Each particle has a position and velocity and will move based on experience and information from the social environment and the current position and the particle. Experience particle i expressed as pi best position ever achieved by these particles. Information from the environment is represented by particles that have the best position g, in the collection of the particles, whereas, the current position of particle i is expressed by xi (t-1). Change the speed of the particle and particle position (vi, xi) was determined based on two equations below as follows [13]. 𝒗𝒊= 𝒗𝒊 (𝒕−𝟏)+ 𝝋𝒄𝟏(𝒑𝒊−𝒙𝒊(𝒕−𝟏))+ 𝝋𝒄𝟐(𝒈−𝒙𝒊(𝒕−𝟏)) (9) Where xi 𝒙𝒊 = 𝒙𝒊 (𝒕 − 𝟏) + 𝒗𝒊 (𝒕) (10) Random vector φ has a value range [0,1]. Meanwhile, c1 and c2 are two positive constants called cognitive learning and social learning. Each particel speed limited by [Vmin, Vmax] [14]. Selection of the proper w inertia weight provides a balance between global exploration and local exploration, so do not require many iterations in searching optimal solution. W always decline linearly approximately ranging from 0.9 to 04 for the calculation. general inertia weight w is set bedearing personal below . 𝒘 = 𝒘𝒎𝒂𝒙 − 𝒘𝒎𝒂𝒙−𝒘𝒘𝒊𝒏 𝒊𝒕𝒆𝒓𝒎𝒂𝒙 𝒙 𝒊𝒕𝒆𝒓 (11) Frist step in PSO is initialization is to determine the number of iterations, the number of population (n) inertia weight (w) and cognetif learning and social learning (c1 and c2), The next step aroused the population in the form of a random matrix with a range of values [0,1] that the dimension (dimensi_masalah.xn). Generation population by typing sinkaks
  • 19. CHAPTER 3 MATERIALS & METHODS Tuning of DC Motor By Using PSO & PID Page | 10 matlab rand (dimensi_masalah, n). . After that, the initialization speed and position. In this step makes the value of the velocity and position of a particle to be equal to zero, Than Calculate the error (Vref - Vout), The amount used in this case is a power unit (pu) are worth one. Description 1 pu equals yout reference and a generator terminal voltage value, then error = | 1-yout |. The next step is to calculate the value of fitness or function to be optimized. In this paper ITAE (Integrated Time of Weighted Absolute Error) proposed, and continue with update velocity and update position. This process contoinue till iteration maximum. After finshing calculate till iterasi maximum, finally chek whether the result of calculating already convergence ? if it already convergance excecute if no try again and or change the intialtization (back to frist stap). To understand easyly, Flowchart PSO is given at figure. Fig.3.1 Flow Chart of PSO
  • 20. CHAPTER 3 MATERIALS & METHODS Tuning of DC Motor By Using PSO & PID Page | 11 3.1.2 Particle Swarm Optimization Basic Issues Basic issues regarding the PSO algorithm are addressed in the experiment supporting video. Each swarm particle is characterized by two variables, x and v, representing respectively its position and velocity in the search space. The search space is d- dimensional, but for simplicity of exposition particle position and velocity equations are introduced without considering the dimension index. The new particle velocity, is evaluated from the current velocity, corresponding to iteration t, using the following equation: vi (t+1) = vi (t)+c1 1 ( bi (t) - xi (t) )+ c2 2 ( g(t) - xi (t) ) (4) with: b representing particle i best position obtained until the current iteration; g representing the global best position, which in this case considers the entire swarm; c1 and c2 are known as the cognitive and social constants; 1 and 2 are random numbers generated in the interval [0,1]. After each particle velocity is evaluated the new particle position can be updated using: xi (t+1) = xi (t)+ vi (t+1) (5) As in any search technique, it is important to guaranty a compromise among a swarm exploratory behavior in initial search stage and a specialization behavior toward the end. This compromise among exploration and exploitation, can be obtained by incorporating a inertia weight, , in (4), as follows: vi (t+1) = vi (t)+c1 1 ( bi (t) - xi (t) )+ c2 2 ( g(t) - xi (t) ) (6) The inertia weight is often decreased from a higher value to a lower value along the search. 3.1.3 Simulation Experimentation Description The experiment is organized in two parts: 1. PSO algorithm implementation and testing using a simple benchmark function minimization problem. This stage enables the PSO key principles to be apprehended by students and then easily adapted to design PID controllers. A video (Oliveira, 2018) was produced by the paper author and made available to students, providing a brief introduction to the PSO algorithm and experiment test demos that students are asked to replicate. As it will be further described, this stage main learning objective is that students successfully implement a simple PSO algorithm. Once the PSO is implemented, students should test the effect of adjusting some of its heuristic parameters, namely: population size, number of iterations per run, inertia weight, maximum velocity clamping and bounding particles position in the search space.
  • 21. CHAPTER 3 MATERIALS & METHODS Tuning of DC Motor By Using PSO & PID Page | 12 2. PID digital controller design adapting the PSO implemented in Part 1. This requires the PID controller implementation in the digital domain and respective control loop simulation. Part II addresses digital controls topics which are currently well-known, and whose basics have been introduced in section 2. Thus, the remaining of this section will be focus to explain Part I. The simple function used to demonstrate PSO concepts is a quadratic expression represented by: f (x1,x2) =( x1 - 50 )2 + ( x2 - 50 )2 The initial number of iterations considered per run is 70 iterations. Two swarm sizes are considered in the PSO demos: n=4 particles and n=50 particles. Regarding the small sized swarm (n=4), three different cases are considered regarding the particles initialization and starting positions:  Random initialization considering the entire search space.  Random initialization considering a corner of the search space ( e.g. range [90,100]).  Fixed initialization, with a particle assigned to each corner of the search space. The velocity value was clamped to a maximum absolute value of Vmax=3.33 per iteration. However, it is pedagogical that students start the PSO simulations without limiting the maximum velocity value. The results of running the PSO, considering a swarm with 4 particles, randomly initializing the swarm in the entire search space, and decaying the inertia weight is presented in Fig. 3. In this figure initial solutions are represented inside a square sign and final solutions with a white circle. The evolution of the best values for both parameters is illustrated in Fig. 4. The results show that all 4 particles converged to the global minimum. Around iteration 36 the decision variables best value reached a steady-state value.
  • 22. CHAPTER 3 MATERIALS & METHODS Tuning of DC Motor By Using PSO & PID Page | 13 Fig. 3.2 Test 1: swarm with n=4, randomly initialization considering the entire search space and decaying  in the interval [0.9, 0.4]. Fig. 3.3. Evolution of the best values for x1 and x2 for test 1 . The results of a PSO run with four particles starting from positions initialized in the [90,100] for both dimensions, are presented in Fig. 5 and Fig. 6. These figures illustrate
  • 23. CHAPTER 3 MATERIALS & METHODS Tuning of DC Motor By Using PSO & PID Page | 14 that the swarm could leave the initialization region towards the optimum value region. However, this run failed to reach the optimum value in one dimension. This indicates that more iterations would be necessary to reach the optimum value. If a constant value of =0.4 is used keeping the same remaining test conditions the swarm is prone to stay in the initialization corner. It is important to remark that in these tests the initial particles velocity was set to zero and the maximum value it were allowed to change in each iteration is a low value.The results of a test run with the four particles starting from initial positions defined in the search space four corners are presented in Fig. 7 and Fig 8. The results obtained with a swarm size of n=50 and a fixed inertia weight of 0.4 are presented in Fig 9 and Fig 10. Even for this simple two dimensional function the speed of convergence tends to be reduced as the swarm size is increased.The results of a test run with the four particles starting from initial positions defined in the search space four corners are presented in Fig. 7 and Fig 8. The results obtained with a swarm size of n=50 and a fixed inertia weight of 0.4 are presented in Fig 9 and Fig 10. Even for this simple two dimensional function the speed of convergence tends to be reduced as the swarm size is increased. Fig. 3.4. Test 3: swarm with n=4, initialized in the four corners of the search space and decaying  in the interval [0.9, 0.4]
  • 24. CHAPTER 3 MATERIALS & METHODS Tuning of DC Motor By Using PSO & PID Page | 15 . Fig. 3.5. Test 4: swarm with n=50, initialized randomly in the entire search space. Inertia weight fixed, 3.1.4 Design Of Digital PID Controller with PSO In this stage students must incorporate into the PSO script an objective function to simulate the digital control system response to a step input. While, this objective function can be more easily implemented using Matlab functions and/or Simulink models, authors are convinced it is pedagogical to code the feedback loop using difference equations representing both the PI controller and plant model. The following specifications are proposed to students as a starting point, by considering:  a FOPTD model with K=1 and L=T=1s, using a sampling time, T=0.1s.  The absolute PID controller digital form represented by the approximated model (1) applying the derivative action to the system output.  A search space defined by interval [0.01 5] for the three controller gains.  Set- point tracking performance optimization by minimizing an error based criterion such as: IAE, ITAE or ISE when an unit step is applied to the reference input. Regarding the PSO the following issues are proposed to be addressed as a starting point, by considering:  particles randomly initialized in the search space with zero value for their velocity. This means that the initial swarm is allowed to have particles representing unstable controller settings. Students can in a later stage test informed population initialization techniques ( e.g. by using PID tuning rules). Linearly decayed inertia weight and fixed value inertia
  • 25. CHAPTER 3 MATERIALS & METHODS Tuning of DC Motor By Using PSO & PID Page | 16 weight along the search. Forcing particles to stay within the parameter search limits. Particles generated outside the limits are clamped to the nearest parameter interval limit. Starting by not limiting the velocity value, and then testing limiting the velocity to a maximum absolute value per iteration (vmax). Considering as illustrative examples the design based on the IAE and ITAE minimization, the type of results that can be obtained and analyzed by students are presented in Fig. 11- 13. It is clear from Fig. 11 and Fig 12 that with the fixed value inertia weight, the gains parameter variation is smaller along the search compared to the linear decayed case, thus confirming a faster PSO convergence rate. The gain sets obtained for the IAE designs are: [Kp=0.687, Ti=1.39, Td=0.01] both for the inertia decayed and fixed inertia cases, resulting in IAE=2.16. For the ITAE designs are: [Kp=0.57, Ti=1.21, Td=1.89] [Kp= 0.57, Ti=1.21, Td=2.12] for the inertia decayed and fixed inertia cases, respectively, both with ITAE=2.89 3.2 Sequencing and Scheduling Sequencing is a technique to order the jobs in a particular sequence. There are different types of sequencing which are followed in industries such as first in first out basis, priority basis, job size basis and processing time basis etc. In processing time basis sequencing for different sequence, we will achieve different processing time. The sequence is adapted which gives minimum processing time. By Scheduling, we assign a particular time for completing a particular job. The main objective of scheduling is to arrive at a position where we will get minimum processing time. 3.2.1 Types of Scheduling: Basically there are three types of scheduling: 3.2.1.1 Single Machine Schedule Here we arrange the order of jobs in a particular machine. We achieve the best result when the jobs are arranged in the ascending order of their processing time i.e. the job having least processing time is put first in sequence and processed through the machine and the job having maximum processing time is put last in sequence. . 3.2.1.2 Flow Shop Scheduling It is a typical combinatorial optimization problem, where each job has to go through the processing in each and every machine on the shop floor. Each machine has same
  • 26. CHAPTER 3 MATERIALS & METHODS Tuning of DC Motor By Using PSO & PID Page | 17 sequence of jobs. The jobs have different processing time for different machines. So in this case we arrange the jobs in a particular order and get many combinations and we choose that combination where we get the minimum make span. 3.2.1.3 Job Shop Scheduling It is also a typical combinatorial optimization problem, but the difference is that, here all the jobs may or may not get processed in all the machines in the shop floor i.e. a job may be processed in only one or two machines or a different job may have to go through the processing in all the machine in order to get completed. Each machine has different sequence of jobs. So it is a complex web structure and here also we choose that combination of arrangements that will be giving the least make span.Current students demand new teaching and learning methodologies. Videos can be used for different purposes, such as the following examples: i) to record classes and make them available in an internet repository or university learning management system (Crook and Schofield, 2017); This approach is currently used both by eLearning and classical courses; ii) to provide short introductions addressing topics covered in classes (Rossiter, 2013). Videos are the flipped (or inverted) classroom (FC) approach key essence (Rossiter, 2014; Oliveira and Boaventura, 2017). In the FC, short videos can be used by students as a preparation element for the next class, releasing class-time which can be best used to promote students engagement and motivation with other learning activities (e.g. group problem solving, quizzes answering, computer simulations, group critical debate, etc.). However, videos can also be used by students to complement their learning process whenever they feel like it and at their own pace; iii) control simulations or practical rig demos; iv) technical training support (Starr et al., 2015). Indeed, it has been found that videos can help in increasing student’s motivation to the learning process (Bravo et al., 2011). Videos can also be used to provide introduction to complementary topics not covered in industrial control and automation courses. This is the case of some Artificial Intelligence (AI) and Machine Learning topics, which are skills highly requested in the Internet of Things and Industry. Proportional, Integrative and Derivative (PID) controllers are a fundamental control engineering education topic, quite relevant due to its extensive practical use in industrial systems. This topic is transversal to different engineering applications (Electrical, Mechanical, Chemistry, Biomedical, etc.). An important skill to be acquire by students is
  • 27. CHAPTER 3 MATERIALS & METHODS Tuning of DC Motor By Using PSO & PID Page | 18 how to design PID controllers. Since Ziegler and Nichols (1942) breakthrough techniques many alternative and complementary PID tuning and design methods have been proposed (e.g. Åström and Hägglund, 2004; Vrančić 2001; O’Dwyer A., 2006)). With the development of computer based methods, the incorporation of optimization approaches constitute a strong alternative to design PID controllers (Mercader et al., 2017). Optimization methods which are inspired in nature and biological (NABI) phenomena have been successfully applied to design PID controllers. Examples of the most well-established methods are genetic algorithms (Holland, 1975), particle swarm optimization (PSO) (Kennedy and Eberhart, 1995) , differential evolution (Storn and Price, 1995), etc. Indeed, NABI can be used as an alternative to classical design methods. Some of their advantages are the following: they just need a cost function to guide the search procedure; they do depend on the evaluation of derivatives or gradients; they are independent of the type of system to be controlled and may not require any knowledge regarding their specific dynamics. Thus considering the success popularity attained by NABI techniques in solving a wide range engineering problems it is natural to teach this methods in control engineering courses. 3.3 Proportionl Integral Derivative(PID) 3.3.1 Introduction  Feedback is a very powerful concept with many useful properties  Reduction of effects of disturbances  Create robust linear relations  Follow command with High Fidelity  Robust to process variations  But risk for instability  Advances in control theory have given a good insight into the design problem  PID a simple powerful form of feedback  Apply advances in control to PID control  Connect with the classic tradition of Ziegler and Nichols
  • 28. CHAPTER 3 MATERIALS & METHODS Tuning of DC Motor By Using PSO & PID Page | 19 In the last lesson, a brief introduction about a process control system has been given. The basic control loop can be simplified for a single-input-single-output (SISO) system as in Fig.1. Here we are neglecting any disturbance present in the system. Fig.3.6 block dia of pid controller The controller may have different structures. Different design methodologies are there for designing the controller in order to achieve desired performance level. But the most popular among them is Proportional-Integral-derivative (PID) type controller. In fact more than 95% of the industrial controllers are of PID type. As is evident from its name, the output of the PID controller u(t) can be expressed in terms of the input e(t), as: and the transfer function of the controller is given by: The terms of the controller are defined as: Kp= Proportional gain Kd= Derivative time, and Ki= Integral time. In the following sections we shall try to understand the effects of the individual components- proportional, derivative and integral on the closed loop response of this system. For the sake of simplicity, we consider the transfer function of the plant as a simple first order system without time delay as:
  • 29. CHAPTER 3 MATERIALS & METHODS Tuning of DC Motor By Using PSO & PID Page | 20 The Amazing Property of Integral Action Consider a PI controller Assume that there is an equilibrium with constant eDtE _ e0and constant uDtE _ u0. The error e0 then must be zero. Proof: Assume e0 __ 0, then The right hand side is different from zero. Hence a contradiction unless e0 _ 0. A controller with integral action will always give the correct steady state provided that a steady state exists. 3.3.2 A PID Algorithm In spite of the widespread use of PID it is only given moderate attention in education. Much information among the manufacturers.PID control is much more than  We have to consider  Derivative filter  Set point (reference)  weigthing  Integrator Windup  Computer implementation  Mode switches  Bumpless parameter changes Dealing with these issues is a good introduction to practical implementation of any control algorithm. 3.3.3 PID Control
  • 30. CHAPTER 3 MATERIALS & METHODS Tuning of DC Motor By Using PSO & PID Page | 21 1. Introduction 2. Derivative Filter 3. Set Point Weighting 4. Integrator Windup 5. Computer Implementation 6. Tuning 7. Summary 3.3.4 Computer Implementation Practically all control systems are today implemented using computers. We will briefly discuss some aspects of this. AD and DA converters are needed to connect sensors and actuators to the computer. A clock is also needed to synchronize the operations. We will discuss  Sampling and aliasing  A basic algorithm  Converting differential equations to difference equations  Wordlength issues  Bumpless parameter changes 3.3.5 Sampling, Aliasing and Antialiasing Filters FIG.3.7 Sampling Samples of signals of different frequencies may be identical  Nyquist frequency = (Sampling frequency)/2  To represent a continuous signal uniquely from its samples the continuous signal cannot have frequencies above the Nyqyist frequency which which is half the Nyquist frequency Antialiasing filters that reduce the frequency content above the
  • 31. CHAPTER 3 MATERIALS & METHODS Tuning of DC Motor By Using PSO & PID Page | 22 Nyquist frequency is essential. A Basic Algorithm The following operations are executed by the computer. 1. Wait for clock interrupt 2. Convert setpoint r and process output y to numbers 3. Compute control signal u 4. Convert control signal to analog value 5. Update variables in control algorithm 6. Go to step 1 Desirable to make time between 1 and 4 as short as possible. Defer as much as possible of the computations to step 5. The Proportional Part No approximation required!
  • 32. CHAPTER 3 MATERIALS & METHODS Tuning of DC Motor By Using PSO & PID Page | 23 3.3.6 Proportional control With the proportional control action only, the closed loop system looks like: Fig 3.8. Block Diagram of Proportional Controller Now the closed loop transfer function can be expressed as:
  • 33. CHAPTER 3 MATERIALS & METHODS Tuning of DC Motor By Using PSO & PID Page | 24 Fig 3.9. Response with a Proportional Controller From eqn. (5) and Fig. 2, it is apparent that: 1. The time response improves by a factor 2. There is a steady state offset between the desired response and the output response = This offset can be reduced by increasing the proportional gain; but that may also cause increase oscillations for higher order systems. The offset, often termed as “steady state
  • 34. CHAPTER 3 MATERIALS & METHODS Tuning of DC Motor By Using PSO & PID Page | 25 error” can also be obtained from the error transfer function and the error function e(t) can be expressed in terms of the Laplace transformation form: Using the final value theorem, the steady state error is given by: Often, the proportional gain term, Kp is expressed in terms of “Proportional Band”. It is inversely proportional to the gain and expressed in percentage. For example, if the gain is 2, the proportional band is 50%. Strictly speaking, proportional band is defined as the %error to move the control valve from fully closed to fully opened condition. However, the meaning of this statement would be clear to the reader afterwards. A proportional control system is a type of linear feedback control system Proportional control is how most drivers control the speed of a car. If the car is at target speed and the speed increases slightly, the power is reduced slightly, or in proportion to the error (the actual versus target speed), so that the car reduces speed gradually and reaches the target point with very little, if any, "overshoot", so the result is much smoother control than on- off control.In the proportional control algorithm, the controller output is proportional to the error signal, which is the difference between the set point and the process variable. In other words, the output of a proportional controller is the multiplication product of the error signal and the proportional gain. This can be mathematically expressed as Pout = Kpe(t) Where Pout: Output of the proportional controller Kp: Proportional gain e(t): Instantaneous process error at time 't'. e(t) = SP − PV SP: Set point PV: Process variable With increase in Kp :  Response speed of the system increases.
  • 35. CHAPTER 3 MATERIALS & METHODS Tuning of DC Motor By Using PSO & PID Page | 26  Overshoot of the closed-loop system increases.  Steady-state error decreases. but with high Kp value, closed-loop system becomes unstable. 3.3.7 Integral Control If we consider the integral action of the controller only, the closed loop system for the same process is represented by the block diagram as shown in Fig. 3. Fig 3.10. Integral Control Proceeding in the same way as in eqn. (4), in this case, we obtain, From the first observation, it can be seen that with integral controller, the order of the closed loop system increases by one. This increase in order may cause instability of the closed loop system, if the process is of higher order dynamics. In a proportional control of a plant whose transfer function doesn‟t possess an integrator 1/s, there is a steady-state error, or offset, in the response to a step input. Such an offset can be eliminated if integral controller is included in the system. In the integral control of a plant, the control signal, the output signal from the controller, at any instant is the area under the actuating error signal curve up to that instant. But while removing the steady-state error, it may lead to oscillatory response of slowly decreasing amplitude or even increasing amplitude, both of which is usually undesirable [5].
  • 36. CHAPTER 3 MATERIALS & METHODS Tuning of DC Motor By Using PSO & PID Page | 27 So the major advantage of this integral control action is that the steady state error due to step input reduces to zero. But simultaneously, the system response is generally slow, oscillatory and unless properly designed, sometimes even unstable. The step response of this closed loop system with integral action is shown in Fig. 4. Fig 3.11 Step Response with integral control system 3.3.8 Proportional Plus Integral (P-I) Control In control engineering, a PI Controller (proportional-integral controller) is a feedback controller which drives the plant to be controlled by a weighted sum of the error (difference between the output and desired set-point) and the integral of that value. It is a special case of the PID controller in which the derivative (D) part of the error is not used. The PI controller is mathematically denoted as: With P-I controller the block diagram of the closed loop system with the same process is given in Fig..
  • 37. CHAPTER 3 MATERIALS & METHODS Tuning of DC Motor By Using PSO & PID Page | 28 Fig 3.12 Proportional plus integral control system It is evident from the above discussions that the P-I action provides the dual advantages of fast response due to P-action and the zero steady state error due to I-action. The error transfer function of the above system can be expressed as:. In the same way as in integral control, we can conclude that the steady state error would be zero for P-I action. Besides, the closed loop characteristics equation for P-I action is: from which we can obtain, the damping constant as: whereas, for simple integral control the damping constant is: Comparing these two, one can easily observe that, by varying the term K p , the damping constant can be increased. So we can conclude that by using P-I control, the steady state error can be brought down to zero, and simultaneously, the transient response can be improved. The output responses due to (i) P, (ii) I and (iii) P-I control for the same plant can be compared from the sketch shown in Fig. 6.
  • 38. CHAPTER 3 MATERIALS & METHODS Tuning of DC Motor By Using PSO & PID Page | 29 Fig 3.13 comparison among the transient response with P,I and P-I control 3.3.9 Proportional Plus Derivative (P-D) Control Proportional-Derivative or PD control combines proportional control and derivative control in parallel. Derivative action acts on the derivative or rate of change of the control error. This provides a fast response, as opposed to the integral action, but cannot accommodate constant errors (i.e. the derivative of a constant, nonzero error is(0). Derivatives have a phase of +90 degrees leading to an anticipatory or predictive response. However, derivative control will produce large control signals in response to high frequency control errors such as set point changes (step command) and measurement noise. In order to use derivative control the transfer functions must be proper. This often requires a pole to be added to the controller The transfer function of a P-D controller is given by: With the increase of Td Overshoot tends to be smaller Slower rise time but similar settling time
  • 39. CHAPTER 3 MATERIALS & METHODS Tuning of DC Motor By Using PSO & PID Page | 30 Fig 3.14 contol action wth a higher order process The step responses of this process with P and P-D controllers are compared in Fig.8. Fig 3.15 improvement of transient response with P-D control 3.3.10 Proportional-Integral-Derivative (PID) control The PID controller was first placed on the market in 1939 and has remained the most widely used controller in process control until today. An investigation performed in 1989 in Japan indicated that more than 90% of the controllers used in process industries are PID controllers and advanced versions of the PID controller. PI controllers are fairly common, since derivative action is sensitive to measurement noise “PID control” is the method of feedback control that uses the PID controller as the main tool. The basic structure of
  • 40. CHAPTER 3 MATERIALS & METHODS Tuning of DC Motor By Using PSO & PID Page | 31 conventional feedback control systems is shown in Figure, using a block diagram representation. In this figure, the process is the object to be controlled. The purpose of control is to make the process variable y follow the set-point value r. To achieve this purpose, the manipulated variable u is changed at the command of the controller. As an example of processes, consider a heating tank in which some liquid is heated to a desired temperature by burning fuel gas. The process variable y is the temperature of the liquid, and the manipulated variable u is the flow of the fuel gas. The “disturbance” is any factor, other than the manipulated variable, that influences the process variable. Figure below assumes that only one disturbance is added to the manipulated variable. In some applications, however, a major disturbance enters the process in a different way, or plural disturbances need to be considered. The error e is defined by e = r – y. The compensator C(s) is the computational rule that determines the manipulated variable u based on its input data, which is the error e in the case of Figure. The last thing to notice about the Figure is that the process variable y is assumed to be measured by the detector, which is not shown explicitly here, with sufficient accuracy instantaneously that the input to the controller can be regarded as being exactly equal to y. When used in this manner, the three element of PID produces outputs with the following nature:P element: proportional to the error at the instant t, this is the “present” error.I element: proportional to the integral of the error up to the instant t, which can be interpreted as the accumulation of the “past” error.D element: proportional to the derivative of the error at the instant t, which can be interpreted as the prediction of the “future” error. Thus, the PID controller can be understood as a controller that takes the present, the past, and the future of the error into consideration. The transfer function Gc(s) of the PID controller is : It is clear from above discussions that a suitable combination of proportional, integral and derivative actions can provide all the desired performances of a closed loop system. Thetransfer function of a P-I-D controller is given by:
  • 41. CHAPTER 3 MATERIALS & METHODS Tuning of DC Motor By Using PSO & PID Page | 32 The order of the controller is low, but this controller has universal applicability; it can be used in any type of SISO system, e.g. linear, nonlinear, time delay etc. Many of the MIMO systems are first decoupled into several SISO loops and PID controllers are designed for each loop. PID controllers have also been found to be robust, and that is the reason, it finds wide acceptability for industrial processes. However, for proper use, a controller has to be tuned for a particular process; i.e. selection of P,I,D parameters are very important and process dependent. Unless the parameters are properly chosen, a controller may cause instability to the closed loop system. The method of tuning of P,I,D parameters would be taken up in the next lesson. It is not always necessary that all the features of proportional, derivative and integral actions should be incorporated in the controller. In fact, in most of the cases, a simple P-I structure will suffice. A general guideline for selection of Controller mode, as suggested by Liptak [1], is given below. PID controller is an automatic controller that compares the actual value of the output of a system at the desired price and generates a control signal to minimize the error value [7]. As the name implies PID controller consists of three basic types, namely controller proportional, integral and derivative that can be used separately or together depending on what we need. Each controller has characteristic respectively.Characteristics of a proportional controller is determined by Kp (Constant Proportional) [8]. Kp value is too small to generate a response rise time is slow, increase the value of Kp will increase the response faster, but when the value of Kp is too large will create an oscillating output. Characteristics of the integral controller can improve response while eliminating the steady-state error, but the selection of Ki (Integral Constants) which may cause high transient response, which can cause system instability. Selection of very high Ki can also cause the output to oscillate. Characteristics of derivative controllers cannot work alone because it is improve the transient response with an error predicting what will happen. Selection of the value of Kd (constant Derivative) is appropriate can improve system stability and reduce overshoot
  • 42. CHAPTER 3 MATERIALS & METHODS Tuning of DC Motor By Using PSO & PID Page | 33 3.4 Tuning of PID controller 3.4.1 Introduction “Tuning” is the engineering work to adjust the parameters of the controller so that the control system exhibits desired property. Currently, more than half of the controllers used in industry are PID controllers [5]. In the past, many of these controllers were analog; however, many of today's controllers use digital signals and computers. When a mathematical model of a system is available, the parameters of the controller can be explicitly determined. However, when a mathematical model is unavailable, the parameters must be determined experimentally. Controller tuning is the process of determining the controller parameters which produce the desired output. Controller tuning allows for optimization of a process and minimizes the error between the variable of the process and its set point [5]. Types of controller tuning methods include the trial and error method, and process reaction curve methods. The most common classical controller tuning methods are the Ziegler-Nichols and Cohen-Coon methods. These methods are often used when the mathematical model of the system is not available. The Ziegler-Nichols method can be used for both closed and open loop systems, while Cohen-Coon is typically used for open loop systems. A closed-loop control system is a system which uses feedback control. In an open-loop system, the output is not compared to the input [5]. A wide range of methods have been developed to design and tune PID controllers Special methods for PID controllers Application of general techniques for control system design like pole placement that you have learned in the class.The methods differ with respect to Models Model acquisition Criteria Design techniques We will present a selection
  • 43. CHAPTER 3 MATERIALS & METHODS Tuning of DC Motor By Using PSO & PID Page | 34 Where, u is the control signal. e is the difference between the current value and the set point. Kc is the gain for a proportional controller. Ti is the parameter that scales the integral controller. Td is the parameter that scales the derivative controller. t is the time taken for error measurement. b is the set point value of the signal, also known as bias or offset. 3.4.2 Ziegler-Nichols’ Step Response Method It has been observed that step responses of many processes to which PID controllers are applied have monotonically increasing characteristics as shown in Figures a and b, so most traditional design methods for PID controllers have been developed implicitly assuming this property. However, there exist some processes that exhibit oscillatory responses to step inputs. Two tuning methods were proposed by Ziegler and Nichols in 1942 and have been widely utilized either in the original form or in modified forms. One of them, referred to as Ziegler–Nichols‟ ultimate sensitivity method, is to determine the parameters as given in Table 1 using the data Kcr and Tcr obtained from the ultimate sensitivity test. The other, referred to as Ziegler–Nichols‟ step response method, is to assume the model FOPDT and to determine the parameters of the PID controller as given in Table 2 using the parameters R and L of FOPDT which are determined from the step response test. Ziegler-Nichols ultimate sensitivity test
  • 44. CHAPTER 3 MATERIALS & METHODS Tuning of DC Motor By Using PSO & PID Page | 35 Switch controller to manual. Make a step in the control variable. Log process output. Normalize the curve so that it corresponds to a unit step. Determine intercepts of tangent with steepest slope i.e. parameters a and L. The controller parameters are obtained from a table. Data: apparent time delay L and intercept a. Controller parameters are given by Parameter Tp is an estimate of the response time of the closed loop system.
  • 45. CHAPTER 3 MATERIALS & METHODS Tuning of DC Motor By Using PSO & PID Page | 36 3.4.3 Ziegler-Nichols’ Frequency Response Method  Switch the controller to pure proportional.  Adjust the gain so that the closed loop system is at the stability boundary.  Determine the gain ku (the ultimate gain) and the period Tu (the ultimate period) of the oscillation.  Suitable controller parameters are obtained from a table. Properties  + Easy to explain and use  + Very common  The closed loop system obtained too oscillatory _ 02. Part of the criterion (quarter amplitude damping)  Too large overshoot  Sensitive to process variations Large scope for improvements.More process information needed 3.4.4 Dynamics of Processes Suitable for PID Control
  • 46. CHAPTER 3 MATERIALS & METHODS Tuning of DC Motor By Using PSO & PID Page | 37 3.4.5 Industrial PID Controller The order of the controller is low, but this controller has universal applicability; it can be used in any type of SISO system, e.g. linear, nonlinear, time delay etc. Many of the MIMO systems are first decoupled into several SISO loops and PID controllers are designed for each loop. PID controllers have also been found to be robust, and that is the reason, it finds wide acceptability for industrial processes. However, for proper use, a controller has to be tuned for a particular process; i.e. selection of P,I,D parameters are very important and process dependent. Unless the parameters are properly chosen, a controller may cause instability to the closed loop system. The method of tuning of P,I,D parameters would be taken up in the next lesson. It is not always necessary that all the features of proportional, derivative and integral actions should be incorporated in the controller. In fact, in most of the cases, a simple P-I structure will suffice. A general guideline for selection of Controller mode, as suggested by Liptak [1], is given below.A box, not an algorithm  Auto-tuning functionality:  pre-tune  self-tune
  • 47. CHAPTER 3 MATERIALS & METHODS Tuning of DC Motor By Using PSO & PID Page | 38  Manual/cascade mode switch  Bumpless transfer between different modes, setpoint ramp  Loop alarms  Networked or serial port Fig3.16.Industrial PID contorl 3.4.7 Application In the early history of automatic process control the PID controller was implemented as a mechanical device. These mechanical controllers used a lever, spring and a mass and were often energized by compressed air. These pneumatic controllers were once the industry standard [5]. Electronic analog controllers can be made from a solid-state or tube amplifier, a capacitor and a resistance. Electronic analog PID control loops were often found within more complex electronic systems, for example, the head positioning of a disk drive, the power conditioning of a power supply, or even the movement-detection circuit of a modern seismometer. Nowadays, electronic controllers have largely been replaced by digital controllers implemented with microcontrollers or FPGAs. Most modern PID controllers in industry are implemented in programmable logic controllers (PLCs) or as a panel-mounted
  • 48. CHAPTER 3 MATERIALS & METHODS Tuning of DC Motor By Using PSO & PID Page | 39 digital controller. Software implementations have the advantages that they are relatively cheap and are flexible with respect to the implementation of the PID algorithm Fig 3.17 Close-loop step response.
  • 49. CHAPTER 4 RESULTS AND DISCUSSION Tuning of DC Motor By Using PSO & PID Page | 40 CHAPTER 4 4.1 SOURCE CODE %% Initialization clear clc n = 20; % Size of the swarm " no of birds " bird_setp =50; % Maximum number of "birds steps" dim = 3; % Dimension of the problem c2 =1.2; % PSO parameter C1 c1 = 0.12; % PSO parameter C2 w =0.9; % pso momentum or inertia fitness=0*ones(n,bird_setp); %-----------------------------% % initialize the parameter % %-----------------------------% R1 = rand(dim, n); R2 = rand(dim, n); current_fitness =0*ones(n,1);
  • 50. CHAPTER 4 RESULTS AND DISCUSSION Tuning of DC Motor By Using PSO & PID Page | 41 %------------------------------------------------% % Initializing swarm and velocities and position % %------------------------------------------------% current_position =1*abs((rand(dim, n)-0.5)); velocity = .3*randn(dim, n) ; local_best_position = current_position ; %-------------------------------------------% % Evaluate initial population % %-------------------------------------------% for i = 1:n current_fitness(i) = tracklsqpid(current_position(:,i)); end local_best_fitness = current_fitness ; [global_best_fitness,g] = min(local_best_fitness) ; for i=1:n globl_best_position(:,i) = local_best_position(:,g) ;
  • 51. CHAPTER 4 RESULTS AND DISCUSSION Tuning of DC Motor By Using PSO & PID Page | 42 end %-------------------% % VELOCITY UPDATE % %-------------------% velocity = w *velocity + c1*(R1.*(local_best_position-current_position)) + c2*(R2.*(globl_best_position-current_position)); %------------------% % SWARMUPDATE % %------------------% current_position = current_position + velocity ; %------------------------% % evaluate a new swarm % %------------------------% %% Main Loop iter = 0 ; % Iterations’counter while ( iter < bird_setp )
  • 52. CHAPTER 4 RESULTS AND DISCUSSION Tuning of DC Motor By Using PSO & PID Page | 43 iter = iter + 1; for i = 1:n current_fitness(i) = tracklsqpid(current_position(:,i)) ; end for i = 1 : n if current_fitness(i) < local_best_fitness(i) local_best_fitness(i) = current_fitness(i); local_best_position(:,i) = current_position(:,i) ; end end [current_global_best_fitness,g] = min(local_best_fitness); if current_global_best_fitness < global_best_fitness global_best_fitness = current_global_best_fitness; for i=1:n globl_best_position(:,i) = local_best_position(:,g);
  • 53. CHAPTER 4 RESULTS AND DISCUSSION Tuning of DC Motor By Using PSO & PID Page | 44 end end velocity = w *velocity + c1*(R1.*(local_best_position-current_position)) + c2*(R2.*(globl_best_position-current_position)); current_position = current_position + velocity; fprintf('********************** The value of iteration iter %3.0f ************************n', iter ); end % end of while loop its mean the end of all step that the birds move it xx=fitness(:,bird_setp); [Y,I] = min(xx); current_position(:,I) Kp=abs(current_position(1,I)) Ki=abs(current_position(2,I)) Kd=abs(current_position(3,I))
  • 54. CHAPTER 4 RESULTS AND DISCUSSION Tuning of DC Motor By Using PSO & PID Page | 45 %peak_overshoot=max(yout)-1; % stepinfo(Sp(:,2),Sp(:,1)) function F = tracklsq(pid) % Track the output of optsim to a signal of 1 % Variables a1 and a2 are shared with RUNTRACKLSQ Kp = pid(1); Ki = pid(2); Kd = pid(3); fprintf('The value of interation Kp= %3.0f, Ki= %3.0f, Kd= %3.0f n', pid(1),pid(2),pid(3)); % Compute function value simopt = simset('solver','ode45','SrcWorkspace','Current','DstWorkspace','Current'); % Initialize sim options [tout,xout,yout] = sim('PSO_motor_test11',[0 20],simopt); e=yout-1 ; % compute the error sys_overshoot=max(yout)-1; % compute the overshoot
  • 55. CHAPTER 4 RESULTS AND DISCUSSION Tuning of DC Motor By Using PSO & PID Page | 46 alpha=5;beta=5; F=e2*beta+sys_overshoot*alpha; end 4.2 SIMULATION MODEL Fig.17.-Block Diagram
  • 56. CHAPTER 4 RESULTS AND DISCUSSION Tuning of DC Motor By Using PSO & PID Page | 47 4.3 GRAPH Fig.18.Graph
  • 57. CHAPTER 5 CONCLUSSION & FUTURE SCOPE Tuning of DC Motor By Using PSO & PID Page | 48 CHAPTER 5 5.1CONCLUSION A PSO based experiment to design digital PID controllers has been reported. The experiment was conducted in the first semester of 2017-2018, within a digital control course to the 4th year electrical engineering and computers degree (5 years course). The PSO algorithm was introduced to students by providing a video explaining the algorithm bare bone dynamics, as well as presenting some test results. These tests regard the minimization of a simple function, and students are expected to implement the PSO algorithm and be able to replicate similar results. The results obtained in practical classes indicated that students could successfully implement a PSO algorithm and replicate the proposed tests. Perception and practical sensibility regarding the principal PSO adjustable heuristic parameters was gained. This PSO learning stage, allowed a fast transition from the benchmark function optimization to the PID digital controller optimization. Different aspects regarding the digital PID control implementation were implemented and tested allowing students to acquire skills in two domains: artificial intelligence and control engineering. The feedback received from students and the author perception regarding student’s enthusiasm in classes was quite positive. Students were quite surprised with the effectiveness obtained with the PSO algorithm. Moreover, it was clearly demonstrated by this experience that in the same way students progressed from a simple two decision variables function optimization problem to designing digital PID controllers, they can solve more complex control engineering and other domains problems. 5.2 FUTURE SCOPE  Algorithm for finding both optimal location and rating of System should be designed by using PSO.  The optimal ratings of Sytem can be analysed by using advanced optimization techniques.  Simultaneous placement of multiple System and their ratings for voltage profile improvement should be developed using PSO.
  • 58. BIBLIOGRAPHY Tuning of DC Motor By Using PSO & PID Page | 50 BIBLIOGRAPHY [1]K. H. A. K. H. Ang, G. Chong, and Y. L. Y. Li, “PID control system analysis, design, and technology,” IEEE Trans. Control Syst. Technol., vol. 13, no. 4, pp. 559–576, 2005. [2] Y.-B. W. Y.-B. Wang, X. P. X. Peng, and B.-Z. W. B.-Z. Wei, “A new particle swarm optimization based auto-tuning of PID controller,” 2008 Int. Conf. Mach. Learn. Cybern., vol. 4, no. July, pp. 12–15, 2008. [3] S. Panda, B. K. Sahu, and P. K. Mohanty, “Design and performance analysis of PID controller for an automatic voltage regulator system using simplified particle swarm optimization,” IET J. Franklin Inst., vol. 349, no. 8, pp. 2609–2625, 2012. [4] Z.-L. L. Gaing, “A Particle Swarm Optimization Approach for Optimum Design of PID Controller in AVR System,” IEEE Trans. Energy Convers., vol. 19, no. 2, pp. 384–391, 2004. [5] D. D. B. Selvabala, “Real-coded genetic algorithm and fuzzy logic approach for real-time tuning of proportional – integral – derivative controller in automatic voltage regulator system,” vol. 3, no. February, pp. 641–649, 2009. [6] Saadat, H. (1999). Power Stability Analysis. Third Edition. Mcgraw-Hill:New York [7] Ogata, Katsuhiko. (1985). Teknik Kontrol Automatik Jilid 1. Alih Bahasa oleh Edi Laksono. Jakarta: Erlangga. [8] C. Wong, S. Li, and H. Wang, “Optimal PID Controller Design for AVR System,” vol. 12, no. 3, pp. 259–270, 2009. [9] B. K. Sahu, P. K. Mohanty, and N. Mishra, “system using Pattern Search algorithm,” IEEE Int. Conf. Power Electron. Device Energy Syst. 2012, 2012. [10] N. Madinehi, K. Shaloudegi, M. Abedi, and H. A. Abyaneh, “Optimum design of PID controller in AVR system using intelligent methods,” 2011 IEEE PES Trondheim PowerTech Power Technol. a Sustain. Soc. POWERTECH 2011, pp. 1–6, 2011. [11] Kimiyaghalam, A., & Ashouri, A. (2008). Advanced Particle Swarm Optimization-Based PID Controller Parameter Tuning. Proceedings Ofthe 12th IEEE International Multitopic Conference, 429–435. [12] J. C. J. Cao and B. C. B. Cao, “Design of Fractional Order Controllers Based on Particle Swarm Optimization,” 2006 1ST IEEE Conf. Ind. Electron. Appl., pp. 775–781, 2006. [13] Purnomo, H. (2014). Cara Mudah Belajar Metode Optimasi Methahuirstik Menggunakan Matlab. Gave Media : Yogyakarta. [14] M. R. AlRashidi and M. E. El-Hawary, “A Survey of Particle Swarm Optimization Applications in Electric Power Systems,” IEEE Trans. Evol. Comput., vol. 13, no. 4, pp. 1–6, 2009. [15]Kennedy, J. and Eberhart, R. C. Particle swarm optimization. Proc. IEEE int'l conf. on neural networks Vol. IV, pp. 1942-1948. IEEE service center, Piscataway, NJ, 1995.
  • 59. BIBLIOGRAPHY Tuning of DC Motor By Using PSO & PID Page | 51 [16] Eberhart, R. C. and Kennedy, J. A new optimizer using particle swarm theory. Proceedings of the sixth international symposium on micro machine and human science pp. 39-43. IEEE service center, Piscataway, NJ, Nagoya, Japan, 1995. [17] Eberhart, R. C. and Shi, Y. Particle swarm optimization: developments, applications and resources. Proc. congress on evolutionary computation 2001 IEEE service center, Piscataway, NJ., Seoul, Korea., 2001. [18] Eberhart, R. C. and Shi, Y. Evolving artificial neural networks. Proc. 1998 Int'l Conf. on neural networks and brain pp. PL5-PL13. Beijing, P. R. China, 1998. [19] Eberhart, R. C. and Shi, Y. Comparison between genetic algorithms and particle swarm optimization. Evolutionary programming vii: proc. 7th ann. conf. on evolutionary conf., Springer-Verlag, Berlin, San Diego, CA., 1998. [20] Shi, Y. and Eberhart, R. C. Parameter selection in particle swarm optimization. Evolutionary Programming VII: Proc. EP 98 pp. 591-600. Springer-Verlag, New York, 1998. [21] Shi, Y. and Eberhart, R. C. A modified particle swarm optimizer. Proceedings of the [22] IEEE International Conference on Evolutionary Computation pp. 69-73. IEEE Press, Piscataway, NJ, 1998 [23] N. Rokbani and A M Alimi. "IK-PSO, PSO Inverse Kinematics Solver with Application to Biped Gait Generation.lnternational", Journal of Computer Applications, vol 58, number (22)., pp: 33-39, November 2012. [24] Y. Shi, and R. Eberhart. "A modified particle swarm optimizer". In Proc of the 1998 IEEE World Congress on Computational Intelligence and IEEE International Conference on Evolutionary Computation, pp: 69-73, 1998 . [25] M. Dorigo, M. Birattari, and T. Stutzle. "Ant colony optimization.", IEEE Computational Intelligence Magazine (2006), 28-39, 2006. [26] M. Reimann, and M. Laumanns. "A hybrid aco algorithm for the capacitated minimum spanning tree problem." Proceedings of first international workshop on hybrid metaheuristics. 2004. [27] Taibi, E.-G. Taxonomy of hybrid metaheuristics. Journal of heuristics, vol. 8, no 5, pp : 541-564,2002. [28] W. Elloumi, N. Rokbani and AM. Alimi, " Ant supervised by PSO", . In Proc of International symposium on Computational Intelligence and Intelligent Informatics, pp: 161- 166,2009. [29] N. Rokbani, A L. Momasso, and A M. Alimi, "AS-PSO, Ant Supervised by PSO Meta- heuristic with Application to TSP". Proceedings Engineering & Technology-Vol, 4, pp: 148- 152, 2013.
  • 60. BIBLIOGRAPHY Tuning of DC Motor By Using PSO & PID Page | 52 [30] N.Rokbani, E. Benbousaada, B. Ammar, B., & AM. Alimi. "Biped robot control using particle swarm optimization". In IEEE International Conference on Systems Man and Cybernetics (SMC), pp. 506-512, 2010. [31] N. Rokbani, AM. Alimi, and B. Ammar. "Architectural Proposal for a Robotized Intelligent humanoid, IZiman". In IEEE International Conference on Automation and Logistics,pp : 1941-1946, 2007. [10] N. Rokbani, and A M. Alimi. "Inverse Kinematics Using Particle Swarm Optimization, A Statistical Analysis". Procedia Engineering, Elsevier, 2013. [32] M. Aghaabbasloo,M . Azarkaman and M.E. Salehi,. "Biped robot joint trajectory generation using PSO evolutionary algorithm". In Al & Robotics and 5th RoboCup Iran Open International Symposium (RIOS), pp : 1-6,2013. [33] N. Rokbani, Boussada, E. B., BA Cherif, and A M. Alimi. "From gaits to ROBOT, A Hybrid methodology for A biped Walker". In Proc of Cia war 2009, Vol. 12, pp. 685-692,2009. [34] M.E.H Pedersen and A J Chipperfield, "SimplifYing particle swarm optimization". In Applied Soft Computing, volume 10, Issue 2,M arch 2010, pp. 618-628, Elsevier. [35] Abdelbar, Ashraf M., Suzan Abdelshahid, and Donald C. Wunsch. "Fuzzy PSO: a generalization of particle swarm optimization." Neural Networks, 2005. lJCNN'05. Proceedings. 2005 IEEE International Joint Conference on. Vol. 2. IEEE, 2005.