Design of PID CONTROLLER
Design of PID CONTROLLER
--------------------------------------------------------------------------------
Design a PID Controller to control the speed of a DC Motor Using Matlab Simulink
I . INTRODUCTION
The DC motors have been popular in the industry control area for a long time, because they have many good
characteristics, for example: high start torque characteristic, high response performance, easier to be linear
control…etc.
The speed of a DC motor is given be the relationship
V − IaRa
N=
kφ
This Equation show that the speed is dependent on the supply voltage V, the armature circuit resistance Ra, and
field flux Ф, which is produced by the field current. This paper describes the MATLAB/ SIMULINK of the DC
motor speed control method namely field resistance, armature voltage, armature resistance control method and
feedback control system for DC motor drives .
When speed control over a wide range is required, combination of armature voltage control and field flux control
is used. This combination permits the ratio of maximum to minimum speed to be 20 to 40. With closed loop
control, this range can be extended up to 200.
The parameters of the PID controller kp, ki and kd (or kp, Ti and Td) can be manipulated to produce various
response Curves from a given process as we will see later .
Fig - 1
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 .
de
u = kpe + ki ∫ edt + kd
dt
Consult with
AP,DS
Electrical system Lab-II, EE-882
--------------------------------------------------------------------------------
Fig - 2
Let Ra=Armature Resistance,
La=Armature self inductance caused by armature flux,
ia= Armature current,
if= field current,
Eb=Back EMF in armature,
V =Applied voltage,
T=Torque developed by the motor,
θ = Angular displacement of the motor shaft,
Ј =Equivalent moment of inertia of motor shaft & load referred to the motor,
B= Equivalent Coefficient of friction of motor shaft & load referred to the motor.
The DC motors are generally used in the linear range of the magnetization curve. Therefore, air gap flux Ф is
Φ ∝ if
Φ = kf i f .......... (1)
Where Kf is a constant
The torque T developed by the motor is proportional to the armature current and air gap flux i.e.
T ∝ Φ ia
T = ka Φ ia
T = kakf Φ ia
T = kia .........( 2 )
Where KT =motor toque constant
The motor back EMF being proportional to speed is given as
Eb ∝ Φω
Eb = kb ω
dθ
Eb = kb ......( 3 )
dt
Consult with
AP,DS
Electrical system Lab-II, EE-882
--------------------------------------------------------------------------------
dia
v = Raia + La + Eb ........( 4 )
dt
And thedynamic quation with moment of inertia & coefficient of friction will be
d 2θ dθ
T = J 2
+ B .......... .( 5 )
dt dt
And with load torque
d 2θ dθ
T =J + B + T L .......( 6 )
dt 2 dt
Take the laplace transform of equation of (2) ,(3), (4) and (5)
T ( s ) = KIa ( s )
Eb ( s ) = KbS θ ( s )
V ( s ) = Ia ( s )( Ra + sLa ) + Eb
V ( s ) − Eb ( s ) = Ia ( s )( Ra + sLa )
T ( s ) = ( Js 2
+ sB )θ ( s )
T ( s ) = ( Js + B ) s θ ( s )
or
T ( s ) = ( Js + B ) ω ( s )
T ( s ) = KIa ( s )
Fig- 3
Consult with
AP,DS
Electrical system Lab-II, EE-882
--------------------------------------------------------------------------------
The transfer function of DC motor speed with respect to the input voltage can be written as follows .
ω (s)
G (s) =
V (s) From equation (7) the armature inductance is very small in
KT
= ........( 7 )
( Ra + sLa )( Js + B ) + KbK T
practices, hence, the transfer function of DC motor speed to the input voltage can be simplified as Follows,
ω (s) Km
G (s) = = .......... ( 8 )
V (s) τs + 1
K T R a J
Where K m = is a motor gain and τ = is the
RaB + K b K T R a B + K b K T
For small size motor field control is advantageous because only a low power servo amplifier is
required while the armature current which is not large can be supplied from an expensive constant current
amplifier.
For large size motor it is on the whole cheaper to use armature control scheme. Further in armature
controlled motor, back emf contributes additional damping over and above that provided by load friction.
Consult with
AP,DS
Electrical system Lab-II, EE-882
--------------------------------------------------------------------------------
2 0.65 15.95 0 40
3 0.71 14.52 0 40
4 0.82 12.58 0 40
Fig- 5
So now we know that if we use a PID controller with: Kp=4,ki=1 and Kd=1; all our design requirements will be
satisfied and the response looks like
Consult with
AP,DS
Electrical system Lab-II, EE-882
--------------------------------------------------------------------------------
Fig- 6