Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
32 views

Lab 4 - Control Time-Delay System

This document describes a lab experiment on controlling the temperature of an oven using a PID controller. Students will first analyze the oven's time delay system to determine its mathematical model and parameters. They will then design a PID controller using the Ziegler-Nichols method to control the oven's temperature. The objectives are to understand how to model and simulate a long time-delay system like an oven, and to identify the oven model in order to design an appropriate PID controller. Students will collect temperature data from heating the real oven, analyze its response to determine the gain, time delay and time constant, and then simulate P, PI, and PID controllers to evaluate their performance at controlling the oven temperature.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views

Lab 4 - Control Time-Delay System

This document describes a lab experiment on controlling the temperature of an oven using a PID controller. Students will first analyze the oven's time delay system to determine its mathematical model and parameters. They will then design a PID controller using the Ziegler-Nichols method to control the oven's temperature. The objectives are to understand how to model and simulate a long time-delay system like an oven, and to identify the oven model in order to design an appropriate PID controller. Students will collect temperature data from heating the real oven, analyze its response to determine the gain, time delay and time constant, and then simulate P, PI, and PID controllers to evaluate their performance at controlling the oven temperature.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Department of Control Engineering & Automation – FEEE – HCMUT

LAB 4

CONTROL TIME-DELAY SYSTEM


I. LABORATORY OBJECTIVES
In this lab, students will analyze a time-delay system which is an oven and design
a PID controller using the Ziegler-Nichols method for this object. Temperature
controllers are very popular and widely used in industry. Accurate temperature control
with small overshoot and steady-state error is essential and determines the quality of
the product to be heated.
Based on the results obtained from the time response, students will find the
mathematical model of the oven: the gain, the delay time and the time constant of the
oven. After finding the oven model, students will design a PID controller using
Ziegler-Nichols method to control its temperature.
Objectives after completing this lab:
 Know how to construct and simulate control system for a long time-delay object
which is an oven.
 Identify the model of the oven from the time response in order to design PID
controller using Ziegler-Nichols method.

II. THEORETICAL BASIS


2.1. Mathematical model of the oven
The oven input is alternating voltage of 220VAC supplying power for the heat
resistance wire and the oven output is the temperature inside the oven. To establish the
transfer function of the oven, we must examine the differential equation describing the
temperature-energy relations. This is a complex problem if we want to accurately
describe nonlinear characteristics of the system. An important feature of the oven
object is its thermal inertia. The oven temperature will increase gradually when
supplied with energy. The more slowly the oven temperature increases, the greater the
time constant of the oven is.
The transfer function of the oven is approximated as:
Y ( s ) Ke T1s
G(s)   (1)
U ( s) T2 s  1
where:
 K: gain coefficient
 T1 : time delay
 T2 : time constant
 u (t ) : supply voltage for the oven (unit: V)
 y (t ) : oven temperature (unit: OC).

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

To apply to the linear system, Taylor's expansion of Equation 1 gives


approximated transfer function as follows:
Y (s) K
G ( s)   (2)
U ( s ) T1s  1T2 s  1
2.2. Find the parameters of the oven model by experiment
In this section, we will apply Ziegler - Nichols method to find the parameters of
the oven. When supplying voltage U to the oven, the temperature y(t) in the oven
increases with time and reaches a stable value y xl as described in Figure 1.
At the inflection point I of the curve y(t), the tangent passing through I will cut
the line y  y (0) and the line y  y xl . K , T1 and T2 in (2) are determined as
described in Figure 1 and K is calculated according to the following formula:
y xl  y (0)
K (3)
U
where y (0) is the initial temperature of the oven when it is not supplied with voltage
( y (0) is also the temperature of the environment)

Figure 1. Time response of output y(t) when voltage U is supplied


2.3. Temperature control using Ziegler – Nichols method
The PID controller diagram for the oven is shown in Figure 2. The transfer
function of the PID controller with the parameters given by Ziegler-Nichols method is
as follows:
1
PID( s )  K p (1   Td s ) (4)
Ti s
i) P controller: K p  T2 / (T1K ), Ti  , Td  0
2/8
Department of Control Engineering & Automation – FEEE – HCMUT

ii) PI controller: K p  0.9T2 / (T1K ), Ti  3.3T1 , Td  0

iii) PID controller: K p  1.2T2 / (T1K ), Ti  2T1 , Td  0.5T1

Figure 2. Structure of PID controller


III. MÔ TẢ THÍ NGHIỆM
3.1. Phần cứng
The hardware block diagram is shown in Figure 4. The PC104CARD board is
the central hardware in the experiments. ALTERA's FPGA based PC104CARD board
is capable of communicating with computer via the MATLAB / Simulink / Real-time
Windows Target software, the board has the following features:
 PWM: 4 PWM channels with resolution 0.1% (~ 10bit).
 ADC: 4 12-bit ADC inputs, 1 input is used to read voltage signal from
temperature sensor.
 Communicate with computer through printer port using EPP standard.
The oven used in this lab has rated voltage of 220VAC/1000W, uses K-type
temperature sensor. The temperature display of Autonics (code TZN4W - A4S) has
the function of reading temperature from the temperature sensor and convert it to
voltage signal. A schematic representation of the system hardware is shown in Figure
3, where:
 Voltage applied to the motor at the output of the SSR (Solid-State Relay) is
equal to TPWM * 220 / 1000 (V), where TPWM is the duty cycle of the pulse in
0.1% unit (0 – 1000). The period of the pulse is 2s.
 The temperature of the oven has a range of (0 – 200oC) corresponding to the
current range of (4-20mA) or corresponds to the voltage range (0.4 - 2VDC)
read by ADC1 channel.
 Control period and sampling time is chosen as T = 1s.

Figure 3. Hardware connection diagram of the lab


3/8
Department of Control Engineering & Automation – FEEE – HCMUT

3.2. Phần mềm


The software used in this lab is MATLAB/Simulink/Real-time Windows
Target. Real-time Windows Target tool allows Simulink to connect to external
hardware and run in real time. In order to compile and run Simulink model connected
with the external hardware, student must perform the following steps:
 Create or open a Simulink model as in Figure 4.
 Go to the Simulation -> Configuration menu, select Solver to configure
the Simulation time and Solver Options as shown in Figure 5.
 Go to the Tools menu -> Real-Time Workshop -> Build Model (or left-
click on the Incremental Build icon) to compile the model.
 After the model is compiled successfully, go to the Simulation ->
Connect To Target menu (or left-click on the Connect To Target icon) to
connect the Simulink model to external hardware.
 Go to Simulation menu -> Run (or click on Run icon) to run the model.

Run Connect To Target Incremental Build

Figure 4. Simulink model connecting to hardware

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

Figure 5. Configure simulation parameters

IV. PREREQUISITES
4.1. Analyze oven model and find parameters of the oven
To successfully carry out this laboratory, students need to read the theoretical
basis section carefully and perform simulations on the computer.
Construct Simulink diagram to analyze the output response of the oven model
as shown in Figure 6. In the diagram, the oven has the transfer function as in (5).
Output data is displayed in the Scope and is saved to the Workspace for plotting the
output response. After simulation, the output response has the form shown in Figure 7.

100
G(s)  (5)
(50s  1)(120 s  1)

Figure 6. Diagram used to analyze output response of the oven

5/8
Department of Control Engineering & Automation – FEEE – HCMUT

Figure 7. Output response

a) Create Simulink file as described in Figure 6.


b) Set applied voltage to U = 0.3. Set sampling time T = 0.1s and simulation time
to 700s.
c) Run the simulation.
d) Open the Scope to see output response. Plot output response according to y
variable saved in Workspace (The plot should have the form described in
Figure 7).
e) Determine the inflection point I and plot the tangent crossing point I to find K ,
T1 and T2 (see guidance in Section 2.2).

4.2. PID control using Ziegler – Nichols method


Based on the parameters of the oven found in Section 4, we construct the P, PI,
PID controller according to the formula (4) as shown in Figure 8. The setpoint
temperature is r(t) = 100.
Run simulation. Open the Scope too see output response, determine POT,
settling time and steady-state error of output signal y(t). Comment on the performance
of the control system for each controller: P, PI, PID. Which is the best controller?
Why?

Figure 8. PID control diagram for the oven


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

V. IN-LAB PROCEDURE
5.1. Find parameters of the oven
Experimental steps:
a) Open temp_response.mdl file.
b) Set applied voltage to U = 220*0.25 (V). Set simulation time to 1600s.
c) Compile the model and run it.
d) Run temp_plot.m file to plot the output response. Based on the graph,
determine the inflection point I and draw a tangent through I. Find K , T1 and
T2 ; fill in Table 1.
Note: After finishing step c, students must shut down the oven, open the oven door,
and used the fan to cool down the oven before conducting the next experiment.
Table 1. K , T1 , T2 values

K T1 (s) T2 (s)

5.2. PID control using Ziegler – Nichols method


Based on the values of K , T1 and T2 calculated above; students write the
transfer function of PID controller to Table 2:
Table 2. Transfer functions of PID controllers

 K p / Ti  
Controller PID( s )  K p 
s
 K pTd  s
P
PI
PID

Experimental steps:
a) Open temp_pid_ctrl.mdl file.
b) Set the parameters of P controller calculated in Table 2 for the "Discrete PID
Controller" block. Set the sampling time to T = 1s and the simulation time to
1800s.
c) Compile the model and run it.
d) Repeat step b) and step c) for PID controller and write the results in Table 3.
Table 3. Performance criteria of the two control systems
Controller Settling time (s) POT (%) Steady-state error (oC)

P
PID

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

LAB REPORT
Full name: Group: Date:

1. From the data in Table 1, write the transfer function of the oven according to (1)?
...............................................................................................................................................
...............................................................................................................................................
...............................................................................................................................................
...............................................................................................................................................
...............................................................................................................................................
...............................................................................................................................................
2. From experimental results in Section 5.2, comment on the performance of the
control system for each controller: P, PID. Which is the best controller? Why?
...............................................................................................................................................
...............................................................................................................................................
...............................................................................................................................................
...............................................................................................................................................
...............................................................................................................................................
...............................................................................................................................................
...............................................................................................................................................
...............................................................................................................................................
...............................................................................................................................................
...............................................................................................................................................
...............................................................................................................................................
...............................................................................................................................................

8/8

You might also like