0% found this document useful (0 votes)
27 views

Lab 2 - Analyze The Performance of Control System

This lab examines the performance of a closed-loop control system using a DC motor model. Students will learn to construct the system in MATLAB/Simulink and calculate key performance metrics like rise time and settling time. They will also analyze how a proportional-integral controller impacts steady-state error and response based on the input and controlled variable.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views

Lab 2 - Analyze The Performance of Control System

This lab examines the performance of a closed-loop control system using a DC motor model. Students will learn to construct the system in MATLAB/Simulink and calculate key performance metrics like rise time and settling time. They will also analyze how a proportional-integral controller impacts steady-state error and response based on the input and controlled variable.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Department of Control Engineering & Automation – FEEE – HCMUT

LAB 2

ANALYZE THE PERFORMANCE


OF CONTROL SYSTEM

I. LABORATORY OBJECTIVES
In this lab, students will examine and evaluate the performance criteria of closed-loop
control system including: percentage overshoot, steady-state error, rising time, settling time.
The model used in this lab is a DC motor controlled by a continuous controller consisting of a
proportional and an integral term. This controller is implemented using an op-amp circuit.
The proportional and integral coefficients are varied to provide different types of output
responses.
Objectives after completing this lab:
 Know how to construct and simulate continuous closed-loop control system using
MATLAB and Simulink.
 Understand the principle of continuous controller design using basic op-amp circuits.
 Know how to calculate performance criteria of a control system.

II. THEORETICAL BASIS


2.1. Closed-loop control system and performance criteria

Figure 1. Closed-loop control system

Typical closed-loop control system includes blocks illustrated in Figure 1:


- G(s): transfer function of plant model
- H(s): transfer function of output feedback sensor
- C(s): transfer function of controller
Signals denoted in Figure 1 are:
- R(s): Set point
- E(s): Error signal as input of the controller
- U(s): Output of the controller as control signal

1 / 11
Department of Control Engineering & Automation – FEEE – HCMUT

- Y(s): Output value that needs to be controlled


- YFB(s): Feedback signal
To evaluate the quality of the control system we use the following criteria: steady-
state error, percentage of overshoot, rising time, and settling time.
- Steady-state error: = ( )− ( )

Figure 2. Graph illustrated how to calculate steady-state error

- Percentage of overshoot: = 100

Figure 3. Graph illustrated how to calculate percentage of overshoot

- Settling time: is the time required for the response of a system to reach and stay within a
range about the steady-state value of size specified by absolute percentage of the steady-state
value (usually 2% or 5%).
- Rising time: is the time required for the response of a system to rise from 10% to 90% of
its steady-state value.

Figure 4. Graph illustrated how to calculate settling time and rising time

2 / 11
Department of Control Engineering & Automation – FEEE – HCMUT

2.2. Overall analysis of system performance


From the diagram of closed-loop control system described in Figure 1, the transfer
function is calculated as:
( ) ( ) ( )
=
( ) 1+ ( ) ( ) ( )
Error signal is expressed as:
( )
( )=
1+ ( ) ( ) ( )
For simplicity, we use unit feedback block with transfer function H(s) = 1.
From final value theorem of Laplace transform, we can calculate steady-state error:
( )
= ( )= ( )=
→ → → 1+ ( ) ( )
When the input is step function:
( )=  =
Where is position constant
= ( ) ( )

When the input is ramp function:
( )=  =
Where is velocity constant:
= ( ) ( )

From these above calculations, we can conclude that for step input, if the open-loop
transfer function has at least one integral term, the steady-state error will be zero. On the
other hand, for ramp input, there must be at least two integral terms in the open-loop transfer
function to eliminate steady-state error.

2.3. DC motor model and proportional-integral controller


DC motor model is briefly illustrated in Figure 5.

Figure 5. DC motor model


Model parameters include:
Ra Armature resistance
La Armature inductance
J Moment of inertia of motor shaft
b Viscous damping coefficient
KT Motor torque constant
3 / 11
Department of Control Engineering & Automation – FEEE – HCMUT

Kb Back e.m.f constant


Second-order transfer function of DC motor with voltage input U and speed output :
( s ) KT
G ( s )=  2
U ( s ) JLa s  (bLa  JRa ) s  (bRa  KT K b )

With voltage input and position output, we add a serial integral to the transfer
function G(s) above.
Note: The motor speed transfer function has second-order form and does not have an
integral, whereas the motor position transfer function has third-order form with an integral.
Because of the above properties, we can choose a simple controller to examine: the
proportional-integral PI controller. The PI controller provides an integral term for the system
to eliminate steady-state error and the two coefficients Kp, Ki can be varied to change the
quality of the transient response.

III. PREREQUISITES
3.1 Simulate controller for DC motor model
In this lab, we will examine the quality of the closed-loop control system as described
in Figure 6. This model allows us to change the number of integrals in the open-loop transfer
function to change the steady-state error and to vary the coefficients of the controller to create
different types of output response.
In Figure 6:
- SW_R selects step input or ramp input.
- SW_Y selects controlled variable: speed or position.

Figure 6. Closed-loop control model of DC motor for performance analysis

Assume the second-order transfer function of the motor has the form:
( )=
+ +1
The proportional-integral controller has the form:
( )= +

4 / 11
Department of Control Engineering & Automation – FEEE – HCMUT

* Step input
 Speed control, P controller: open-loop transfer function doesn’t have an integral
1
= = → =
→ + +1 1+
 When increasing Kp the steady-state error decreases, but the poles of the system move
away from the real axis so that the system response oscillates more and has higher overshoot.
 Speed control, PI controller: open-loop transfer function has an integral

= + → =0
→ + +1
Adding an integral and a zero causes the root locus to be pushed to the right of the
complex plane so that the system is less stable. The system has steady-state error of 0;
however, if Ki is large, the system is less stable.
 Position control, P controller: open-loop transfer function has an integral
1
= =∞→ =0
→ + +1

 when there is an integral, steady-state error is equal to 0.


 Position control, PI controller: open-loop transfer function has two integrals
1
( ) ( )= +
+ +1
=0
 steady-state error is equal to 0, transient response is improved.

* Ramp input
 Speed control, P controller: open-loop transfer function doesn’t have integral term
= =0→ =∞
→ + +1
 The system output doesn’t follow reference input.
 Speed control, PI controller: open-loop transfer function doesn’t have integral term
1
= + =0→ =
→ + +1
 Steady-state error decreases when Ki increases. When Ki is too large, the system is
unstable.
 Position control, P controller: open-loop transfer function doesn’t have integral term
1 1
= =0→ =
→ + +1
 Steady-state error decreases when Kp increases.
 Position control, PI controller: open-loop transfer function has one integral term
1
= + =∞→ =0
→ + +1
5 / 11
Department of Control Engineering & Automation – FEEE – HCMUT

From these above arguments, students build closed-loop control system to control DC
motor using proportional-integral controller in MATLAB Simulink, as shown in Figure 7.

Figure 7. Simulink model to control motor position/speed

For K = 100, a = 0.05, b = 1.5, students build Simulink model, run simulation and
calculate performance criteria for the cases in Table 1 and Table 2. Save data and plot output
responses.

Table 1. Step input


Experiment Speed control SP=800 rpm Position control SP=1000°
P controller PI controller P controller PI controller

Criterion Kp=0.2, Ki=0 Kp=0.2, Ki=1 Kp=0.005,Ki=0 Kp=0.005,Ki=0.0001


Settling time (s)
Rising time (s)
POT (%)
Steady-state
error

Table 2. Ramp input


Experiment Speed control SP=0800 rpm in Position control
10s SP=01000° in 20s
P controller PI controller P controller PI controller
Criterion
Kp=0.5, Ki=0 Kp=0.5, Ki=0.5 Kp=0.01, Ki=0 Kp=0.01, Ki=0.001

Steady-state error

3.2. Op-amp circuit

Figure 8 shows op-amp circuit from which students can calculate controller coefficients
including proportional, integral, derivative terms. In this lab, we will only use proportional
and integral terms. Full PID controller will be experimented with in Lab 3.

6 / 11
Department of Control Engineering & Automation – FEEE – HCMUT

a. Present the principle diagrams and formulas of the following basic amplifiers: non-
inverting amplifier, inverting amplifier, buffer, addition, integration, and differential.
b. Specify the formula for calculating Kp, Ki, and Kd in the op-amp circuit in Figure 8.

IV. LAB DESCRIPTION


The lab consists of two experiments: Experiment 1 examines the quality of continuous
controller in MATLAB Simulink. Here the control period is reduced to T = 1ms in order to
simulate continuous system. In Experiment 2, students will conduct the same analysis as in
Experiment 1 but the controller is implemented by op-amp circuit (Figure 10). Analog input
sampling period and analog output holding period is 1ms in order to simulate continuous
system. Refer to the instructions in Section 3/ Lab 1 on how to use the MATLAB software to
communicate with the card through LPT port.
Figure 9 describes continuous PID controller box, which is simplified version of op-
amp circuit implementing PID controller in Figure 8, where:
 Rp, Cd, Ri, Ci are resistors and capacitors that can be changed to fine-tune Kp, Ki,
Kd.
 POWER: turn ON the switch to supply power to the circuit.
 SW1: turn ON the switch to enable proportional-derivative terms.
 SW2: turn ON the switch to enable derivative term.

Figure 8. Op-amp circuit implementing PID controller

7 / 11
Department of Control Engineering & Automation – FEEE – HCMUT

Figure 9. Simplified op-amp circuit implementing PID controller.

Figure 10. Block diagram of continuous control system using op-amp circuit

V. IN-LAB PROCEDURE
5.1 Analyze performance of control system using continuous block in
MATLAB/Simulink
Experimental steps:
a) Open the motor_cont_ctrl0.mdl Simulink file
8 / 11
Department of Control Engineering & Automation – FEEE – HCMUT

b) In the Simulink file, for each experiment in the table, perform the following steps in
accurate order: select step input or ramp input SW_R  set setpoint value  select
speed control or position control mode using SW_Y  set the coefficients {Kp, Ki}
c) Compile the model and run it.
d) Open the scope to see system response and calculate performance criteria.
e) Write the results in Table 3.
f) Save the image of the system response to compare it with images of other cases.
g) Repeat step b) to step d) with remaining values in Table 3 and Table 4.

Table 3. Step input


Experiment Speed control SP=800 rpm Position control SP=1000°
P controller PI controller P controller PI controller
Kp=0.2, Ki=0 Kp=0.2, Ki=0.5 Kp=0.02, Ki=0 Kp=0.02,Ki=0.005
Criterion
Settling time (s)
Rising time (s)
POT (%)
Steady-state error

Table 4. Ramp input


Experiment Speed control Position control
SP=0800v/p in 10s SP=01000° in 20s
P controller PI controller P controller PI controller
Kp=0.2, Ki=0 Kp=0.2, Kp=0.03, Ki=0 Kp=0.03, Ki=0.01
Criterion Ki=0.5

Steady-state error

5.2 Analyze performance of control system using op-amp circuit


Experimental steps:
a) Open motor_cont_ctrl1.mdl MATLAB Simulink file.
b) On PID control box using the op-amp circuit: turn OFF POWER, SW2 and SW1
switches; remove all R, C if present on the circuit.
c) In the Simulink file, for each experiment in the table, perform the following steps in
accurate order: select step input or ramp input SW_R  set setpoint value  select
speed control or position control mode using SW_Y.
d) On the PID control box using op-amp circuit: attach the components {Rp, Ri, Ci} to
the box according to values in the table. Note: attach the capacitor with correct
polarity order as shown in Fig 9.
e) Compile the Simulink model.
f) Turn ON POWER and SW1 switches. Turn ON SW2 switch if integral term is used.
9 / 11
Department of Control Engineering & Automation – FEEE – HCMUT

g) Run the model.


h) Open the scope to see system response and calculate performance criteria.
h) Write the results in Table 5 and Table 6.
i) Repeat step b) to step h) with remaining values in Table 5 and Table 6.
Table 5. Step input
Experiment Speed control SP=800 rpm Position control SP=1000°
P controller PI controller P controller PI controller
Rp=5k Rp=5k Rp=30k Rp=30k
Ri=2k,Ci=10u Ri=30k, Ci=10u
Criterion
Settling time (s)
Rising time (s)
POT (%)
Steady-state error

Table 6. Ramp input


Experiment Speed control Position control
SP=0800v/p in 10s SP=01000° in 20s
P controller PI controller P controller PI controller
Rp=5k Rp=5k Rp=10k Rp=10k

Criterion Ri=2k,Ci=10u Ri=30k, Ci=47u


Steady-state error

10 / 11
Department of Control Engineering & Automation – FEEE – HCMUT

LAB REPORT

Full name: Group: Date:

1. From the simulated results in Table 1 and Table 2, evaluate steady-state errors in all
cases. Comment on the forms of output responses.
...............................................................................................................................................
...............................................................................................................................................
...............................................................................................................................................
...............................................................................................................................................
...............................................................................................................................................
...............................................................................................................................................
...............................................................................................................................................
...............................................................................................................................................
...............................................................................................................................................
2. From the experimental results in Table 3 and Table 4, evaluate steady-state errors in all
cases. Comment on the forms of output responses. Compare with simulated results in
Table 1 and Table 2.
...............................................................................................................................................
...............................................................................................................................................
...............................................................................................................................................
...............................................................................................................................................
...............................................................................................................................................
...............................................................................................................................................
3. From the experimental results in Table 5 and Table 6, evaluate steady-state errors in all
cases. Comment on the forms of output responses. Compare with simulated results in
Table 1 and Table 2.
...............................................................................................................................................
...............................................................................................................................................
...............................................................................................................................................
...............................................................................................................................................
...............................................................................................................................................

11 / 11

You might also like