E101 LAB 3

Report
E102 LAB
Temperature Control of Heated
Block
Temperature Controller
Specifications
Design, simulate and test a control system for
temperature control of a heater block to satisfy the
following specifications:
1. Heat the block from room temperature to 60C in
less than three minutes with less than 1C
overshoot and zero steady state error.
2. While operating at 60C, the control system must
recover from a step disturbance in voltage input to
the heater in less than two minutes with zero
steady state error.
Test Facility P2381 (45-1-23)
Heater and Sensor Board
Power Amp
Power Op Amp
Data Acquisition
Terminal Block
4 wires
go to
breadboard
Data Acquisition
Ground (green)
Temperature
output (blue)
6V supply (red)
Volt input
(white)
MATLAB Interface
Testing and Data Acquisition with Real Time Windows Target (RTWT)
A. Connection Setup
1.
Ensure the board is connected to ground(green), the 6V power supply (red), the temperature
signal output (blue) and the voltage input (white) as described in the previous slides.
2. Check that the power amp is connected with the banana plugs to the HP DC power supply (+/20V and common).
3. Turn on power supply and check that it is reading 20V and about 0.05A.
B. Computer Setup
1.
Log on to either ENG-ECF-2 or ENG-ECF-13 in the test facility
User Name e102lab
Password e102lab
2.
Open E102Lab on the desktop.
3.
Open heatercontrolmodel.mdl
heatercontrol.mdl
0
w
Manual
Switch 1
1
wstep
du /dt
0
0
r
60
D
Derivative
Analog
Output
10
Manual
Switch
rstep
P
in1
out
in2
1
s
Anti -Windup Integrator
Analog
Input
Analog Input
National Instruments
PCI-6014 [auto]
Saturation
Analog Output
National Instruments
PCI-6014 [auto]
0
I
1/.032
oC /V
Scope
Testing and Data Acquisition with Real Time Windows Target (RTWT)
C. Controller Design and Test
1.
Open heatercontrol.mdl. Set the setpoint manual switch to 0. Set the disturbance manual
switch to 0. Enter your controller design values for P, I and D. Open Scope block
2.
Choose menu Simulation=>Connect to Target. The MATLAB workspace will show
“Model heatercontrol loaded”
3.
Choose menu Simulation=>Start Real Time Code.
The Scope block should display the control voltage input and the temperature output sampled
at 1 s intervals. After about a minute to record ambient temperature, set the setpoint input switch
to 60C. You should see the step voltage input on the scope and the DC power supply will register
about 0.5A as the heating block switches on. As the control takes effect, the power supply will
show a decreasing power input . Record the data until the output reaches steady state (about 5
minutes if your control design is working) *
*RTWT is a bit buggy and occasionally crashes or sends you undecipherable error messages without any reason. Just restart the computer if
this happens. It usually gets over its bad behavior.
In the unlikely event that you get the following error message “checksum mismatch: Target code needs to be rebuilt”,
choose menu Tools=>Real-Time Workshop=>Build Model. The command window will fill up with verbosity until you see
“Successful Completion of Real Time Workshop build procedure”. Then continue with connecting to target as before.
Testing and Data Acquisition with Real Time Windows Target (RTWT)
C. Controller Design and Test (cont.)
4.
Without changing the setpoint, set the disturbance manual switch to 1. You should see the
voltage input drop on the scope and the power input drop from the power supply. Continue
recording the data until the control system has recovered from the disturbance (about 2 minutes
if your control design is working)*
5.
On completing the disturbance test, set both the manual switches back to 0. Choose menu
Simulation =>Stop Real Time Code. Your results will be stored in TemperatureVoltData
in the MATLAB workspace.
6.
Save your experimental results. (You may like to run the m-file TempVoltexport.m which
creates a text file controldata.txt that you can save)
7.
Switch off the power supply and log out.
*Your time limit for running the total simulation is 1500s (25 min). After this all your recorded data in the MATLAB workspace is lost
and the simulation starts recording data again starting at time 0.
Optional: Build your own
board
E102 Lab Kit
1 Solderless Breadboard
with wire leads
22k Resistor
10k Resistor
LM324 Quad OpAmp chip
LM35 Temperature Sensor
10 Ohm Aluminum Housed
Resistor Heating Block
Nut/bolt
Circuit Diagram
LM35
Vout  0.01T
Vcc Gnd Vout
o
(T C)
LM324
Assembly 1
Solder leads to 10 ohm
resistor
Attach LM35 sensor
to back of resistor
QuickTime™ and a
TIFF (Uncompressed) decompressor
are needed to see this picture.
QuickTime™ and a
TIFF (Uncompressed) decompressor
are needed to see this picture.
Assembly 2
Bend sensor
pins and
connect to
board
Final Assembly
Connect
temperature
sensor and op
amp

similar documents