Lab 3 - Analyze Discrete PID Controller
Lab 3 - Analyze Discrete PID Controller
LAB 3
I. LABORATORY OBJECTIVES
In this lab, students will examine the effects of parameters in discrete PID controller
on performance criteria (POT, settling times, steady-state error) in two cases: speed and
position control of DC motor.
In addition, students also investigate the effect of sampling time on the quality of the
control system.
Objectives after completing this lab:
Know how to construct and simulate control system to control the speed and position of
DC motor using discrete PID controller.
Evaluate the effects of the coefficients in discrete PID controller and the sampling time on
the system performance.
Note that these relationships are not exactly correct because KP, KI, and KD are
interdependent. Therefore, this table is only used as reference when determining KP, KI, and
KD parameters.
1/7
Department of Control Engineering & Automation – FEEE - HCMUT
IV. PREREQUISITES
4.1. Speed control of DC motor
yellow
2 magenta
ek uk
0.3s+1 Scope
Set point Zero-Order Transfer Fcn
(rpm) Discrete Hold
PID Controller
Kp
Kp
z+1
1 Ki*T/2
ek z-1
1
I
Ki uk
z-1
Kd/T
z Add
Kd D
2/7
Department of Control Engineering & Automation – FEEE - HCMUT
yellow
2 1 magenta
ek uk
0.3s+1 s
Scope
Set point Zero-Order Transfer Fcn Integrator
(rad) Discrete Hold
PID Controller
V. IN-LAB PROCEDURE
5.1. Speed control of DC motor
In this section, we will examine the effects of KP, KI, KD parameters of discrete PID
controller and the sampling time on the quality of the motor speed response.
a. Analyze the effect of KP parameter
Experimental steps:
a) Open motor_speed_ctrl.mdl file.
b) Set the Set point to 800 rpm, and KP = 0.02, KI = KD = 0, sampling time T 0.005s .
Note: When changing the sampling time, we must change T parameter in the
"Discrete PID controller" block and overall sampling time of the system (on the
Simulation -> Configuration menu).
c) Compile the model and run it.
d) Open the scope to see system response; determine POT, settling time and steady-state
error.
e) Write the results in Table 2.
f) Repeat step b) to step d) with remaining KP values in Table 2.
3/7
Department of Control Engineering & Automation – FEEE - HCMUT
4/7
Department of Control Engineering & Automation – FEEE - HCMUT
Note: When changing the sampling time, we must change T parameter in the
"Discrete PID controller" block and overall sampling time of the system (on the
Simulation -> Configuration menu).
c) Compile the model and run it.
d) Open the scope to see system response; determine POT, settling time and steady-state
error.
e) Write the results in Table 5.
f) Repeat step b) to step d) with remaining KP values in Table 5.
Table 5. Analyze the effect of KP parameter (KI = 0, KD = 0)
KP 0.005 0.05 0.1 0.2 0.5
Rising time (s)
Settling time (s)
POT (%)
Steady-state error (rpm)
5/7
Department of Control Engineering & Automation – FEEE - HCMUT
6/7
Department of Control Engineering & Automation – FEEE - HCMUT
LAB REPORT
1. From the experimental results in Section 5.1, comment on the effects of KP, KI, KD
parameters and sampling time on the performance of motor speed control system.
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
2. From the experimental results in Section 5.2, comment on the effects of KP, KI, KD
parameters and sampling time on the performance of motor position control system.
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
7/7