Professional Documents
Culture Documents
1
Speed Control of DC Servo Motor using PID
Controller Based on MATLAB
SUBMITTED TO
CENTURION UNIVERSITY OF TECHNOLOGY AND MANGEMENT
PARALAKHEMUNDI
SUBMITTED BY SUPERVISED BY
Manvendra Kumar singh Mr.k.dhananjay Rao
120101EER039 Assistance professor EEE
Branch: - EEE CUTM, Paralakhemundi
2
CENTURION UNIVERSITY OF TECHNOLOGY AND
MANAGEMENT
DEPARTMENT:-ELECTRICAL & ELECTRONICS ENGINEERING
CERTIFICATE
This is to certify that the project report entitled SPEED CONTROL OF
DC SERVO MOTOR USING PID CONTROLLER that is being submitted by
Manvendra Kumar singh for the award of the Degree of Bachelor of
Technology in Electrical and Electronics Engineering to the
CENTURION UNIVERSITY is a record of bonafide work carried out by
him under my guidance and supervision.
3
Abstract
This paper is to design PID controller to supervise and control the speed
response of the DC servo motor and MATLAB program is used for
calculation and simulation PID controllers are widely used in a industrial
plants because of their simplicity and robustness. Industrial processes
are subjected to variation in parameters and parameter perturbations.
We are choosing PID parameters and discussed
4
INTRODUCTION
Electrical motor servo systems are indispensable in modern industries.
Servomotors are used in a variety of applications in industrial
electronics and robotics that includes precision positioning as well as
speed control Servomotors use feedback controller to control the
speed or the position, or both. The basic continuous feedback
controller is PID controller which possesses good Performance.
However is adaptive enough only with flexible tuning. Although many
advanced control techniques such as self-tuning control, model
reference Adaptive control, sliding mode control and fuzzy control have
been proposed to improve system performances, the conventional
PI/PID controllers are still dominant in majority of real-world servo
systems . To implement a PID controller the proportional gain KP, the
integral gain KI and the derivative gain KD must be determined
carefully. Many approaches have been developed to determine PID
controller parameters for single input single output (SISO) systems.
5
Mathematical Modeling of Armature
Controlled DC Servo Motor
DC Servo Motor
The motors which are utilized as DC servo motors, generally have
separate DC source for field winding and armature winding. The
control can be archived either by controlling the field current or
armature current. Field control has some specific advantages over
armature control and on the other hand armature control has also
some specific advantages over field control. Which type of control
should be applied to the DC servo motor, is being decided
depending upon its specific applications.
6
MODELING
A DC servo motor is used in a control system where an appreciable
amount of shaft power is required. The DC servo motors are either
armature-controlled with fixed field, or field-controlled with fixed
armature current.
DC servo motors used in instrument employ a fixed permanent-magnet
field, and the control signal is applied to the armature terminals.
= Kf If
7
Torque produced is proportional to product of flux and armature
current
Tm Ia
Tm = Km Ia
Tm = Km*Kf* If* Ia ..(2)
Back emf is directly proportional to shaft velocity (wn) as flux is
constant
()
n
Eb n (s)
()
Eb = Kb (3)
Apply KVL to armature circuit
La +RaIa + Ea = Ea
Taking a lapalas transfer function
(Ra + sLa)*Ia(s) + Eb(s) = Ea(s)
()()
Ia(s) = (4)
+
()()
Ia(s) = +
Now
Tm = Km*Kf* Ia*If(s)
Tm = Km*Kf* If*(()()
+
)(5)
8
Here shaft torque Tm is used for driving load against the inertia
and frictional Torque
2
Tm = Jm + (6)
2
Taking lapalas transfer function
Tm(s) = Jm 2 () + () .(7)
Equating equation (5&7)of Tm
Since If is neglected
()
=[ + ( 2 + )]()
+ +
()
=
() + ( 2 + )( + )
Where KmKf = Km
()
=
() + ( 2 + )( + )
()
=
()
+ ( + 1) (1 + )
Where = motor time constant
= Armature time constant
() (1 + )(1 + )
=
()
1+
(1 + )(1 + )
9
G(s) = (1+)(1+)
H(s) = Kb*S
Parameter Value
From Equation the relationship between the angular position and the
1
speed can be found by multiplying the angular position by . Our major
10
concern on this research is the proper control of the angular speed of the
motor; since the angular speed is the part that suffers the most from the
non-linear ties. The angular non-linear effect on the angular position
1
tends to be less due to the term used to derive it , which adds an integral
effect or filter effect to this part. Figure 2 shows the block diagram which
represents the servomotor system using MATLAB SIMULINK
12
CONTROLLER
The combination of proportional, integral and derivative control action
is called PID control action. PID controllers are commonly used to
regulate the time-domain behavior of many different types of dynamic
plants. These controllers are extremely popular because they can
usually provide good closed-loop response characteristics. Consider the
feedback system architecture that is shown in Fig. 1 where it can be
assumed that the plant is a DC motor whose speed must be accurately
regulated.
The PID controller is placed in the forward path, so that its output
becomes the voltage applied to the motor's armature the feedback
signal is a velocity, measured by a tachometer .the output velocity
signal C (t) is summed with a reference or command signal R (t) to form
the error signal e (t). Finally, the error signal is the input to the
PID controller.
= + +
13
PROPORTIONAL CONTROL:
The proportional part of PID examines the magnitude of the error and it
reacts proportionally. A large error receives a large response. For
example, if there is a large temperature error, the fuel valve would be
opened a lot. On the other hand, a small error receives a small response.
In mathematical term, the proportional term (Pout) is expressed as:
Pout = Kp*e
Where:
Pout: Proportional portion of controller output
Kp : Proportional gain
e : Error signal,
e = Set-point Process Variable
The following figure illustrates a proportional control and shows that
there is always a steady state error in proportional control. The error
will decrease with increasing gain, but the tendency towards oscillation
will also increase
14
There are issues with proportional control only. One of them is that
proportional control cannot compensate very small errors (these errors
are also known as offset.) Another issue is that it cannot adjust its output
based on the rate of change in the measured variable. Proportional
controllers only respond to the magnitude of the error, not to its rate of
change.
INTEGRAL CONTROL:
To address the first issue with the proportional control, integral control
attempts to correct small error (offset). Integral examines the error over
time and increases the importance of even a small error over time.
Integral is equal to error multiplied by the time the error has persisted.
A small error at time zero has zero importance. A small error at time 10
has an importance of 10 times error. In this manner, integral increases
the response of the system to a given error over time until it is corrected.
Integral can also be adjusted and the adjustment is called the reset rate.
Reset rate is a time factor. The shorter the reset rate the quicker the
correction of an error. However, too short a reset rate can cause erratic
performance. In hardware-based systems, the adjustment can be done
by a potentiometer changing the time constant of a RC circuit. Most of
todays applications use software based control such as PLC module in
which the engineer changes the parameter of reset rate. The
mathematical expression of an integral-only controller ( Iout) is:
15
Where:
Iout: Integral portion of controller output
Ti: Integral time, or reset time
Ki: Integral gain
e : Error signal, e = Set-point Process Variable
DERIVATIVE CONTROL:
The derivative part of the control output attempts to look at the rate of
change in the error signal. Derivative will cause a greater system
response to a rapid rate of change than to a small rate of change. In
other words, if a systems error continues to rise, the controller must not
be responding with sufficient correction. Derivative senses this rate of
change in the error and provides a greater response. Derivative is
adjusted as a time fact or and therefore is also called rate time. It is
essential that too much derivative should not be applied or it can cause
overshoot or erratic control. In mathematical term, the derivative term
(Dout) is expressed as:
Where:
Dout: Derivative portion of controller output
Td: Derivative time
Kd: Derivative gain
e : Error signal, e = Set-point Process Variable
16
Transfer function for PID is:
1
C(s)=Kp (1+ + Td s)
The proportional control (Kp) is used so that the control signal u(t)
responds to the error immediately. But the error is never reduced
to zero and an o mffset error is inherently present. To remove
the offset error the integral control action ( ) is used. The
Derivative control (Td) is used to damped out oscillations in the
process response. By tuning the gains of the PID controller and
producing the optimum response using trial and error method.
17
TUNNING OF PID
The second part of setting a PID is to tune or choose the numerical value
of the PID parameters. PID controllers are tuned in terms of P, I and D.
Tuning the control gains may result in the following improvement of
response:
Proportional gain (Kp): Larger proportional gain typically means faster
response, since the larger the error, the larger the proportional term
compensation. However, an excessively large proportional gain may
result in process instability and oscillation.
Integral gain (Ki): Larger integral gain implies steady-state errors are
eliminated faster. However, the tradeoff may be a larger overshoot,
since any negative error integrated during transient response must be
integrated away by positive error before steady state can be reached.
Derivative gain (Kd): Larger derivative gain decreases overshoot but
slow down transient response and may lead to instability due to signal
noise amplification in the differentiation of the error.
The following table lists some common tuning methods and their
advantages and disadvantages. The choice of method will mostly
depend on whether or not the loop can be taken offline for tuning, and
the response time of the system. If the system can be taken offline, the
best tuning method often involve s subjecting the system to a step
change in input, measuring the output as a function of time, and using
this response to determine the control parameters. Manual tuning
methods can be quite inefficient, especially if the loops have response
times on the order of minutes or longer.
18
Ziegler-Nichols (ZN) Method
In this Paper frequency response method is discussed for tuning the PID
controller.
19
The S-shaped curves may be characterized by two constant delay time
L and time constant Tthe delay time and time constant are
determined by drawing a tangent line at the inflection point of the S-
shaped curved and determining the intersection of the tangent with the
time axis and line C(t) = K as shown in figure.
The table gives the value of Kp, Ki and Kd for step response plant.
Controller Kp Ki Kd
P T/L Infinite 0
PI 0.9*(T/L) L/0.3 0
PID 1.2*(T/L) 2L 0.5L
The table shows Ziegler Nichols Tuning Rules Based on step response of
plant
()
The transfer function may approximated by first order system with
()
a transport lag as for
()
=
() 1+
20
Ziegler and Nichols suggested to set the value of Kp, Ki and Kd
according to the formula shown in table. The PID control tuned by the
Ziegler Nichols rules gives
1
G(s) = Kp*[1+ +Kd S]
1
G(s) = 1.2* [1 + + 0.5
2
1 2
(+)
G(s) = 0.6*T
Control type Kp Ki Kd
P 0.5Kcr infinite 0
PI 0.45Kcr (1/0.2)Pcr 0
PID 0.6Kcr 0.5Pcr 0.125Pcr
The table shows Ziegler-Nichols Tuning Rules based on critical Gain Kcr
and critical Pcr
21
The PID controlled tuned by the continuous cycling method of Ziegler-
Nichols method gives
1
G(s) = KP*[1+ + ]
1
G(s) = 0.6*Kcr*[1+ + 0.125 ]
0.5
4 2
(+)
G(s) = 0.075*Kcr*Pcr*
Thus the PID controller has a pole at the origin and double zeros at s =
4
=
+(1+ )(1+ )
Kp Ti Td
7.92 0.2118403678 0.05296009194
22
Simulink Model Of DC Servo Motor Control
Without PID:
23
With PID:
24
Comparison with PID and without PID:
25
CONCLUSION:
This thesis presents study on MATLAB based real-time control
implementation of the DC servo motor using PID controller.
So, the need for a closed loop control system was realized.
For different values of KP, Ki and Kd were implemented & various
response were found. It was observed that the speed output of the
closed loop control system successfully tracks the reference.
Thus, the different controller i.e. PI, PD&PID were implemented &the
response for different controller were successfully observed.
26