Exp 5
Exp 5
Experiment # 5
Control of an HVAC-like thermal system
- [1.5.1] Exercise-1: Measure the rise time of the system, and give the response in
your lab report.
- [1.5.2] Exercise-2: Measure the natural fall time of the system, and give the
response in your lab report.
- [1.5.3] Exercise-3: Measure the forced fall time of the system, and give the re-
sponse in your lab report.
- [1.6] Exercise-4: Build the Simulink model in Figure-8 to implement the on-off
control strategy. Save this Simulink model in your lab report.
- [1.6] Exercise-5: Save the on-off control response in your lab report.
- [1.8] Exercise-6: Build the Simulink model in Figure-9 to implement the PID
control strategy, and save this model in your lab report. Use the PID Controller
block directly.
- [1.8] Exercise-7: Implement the following PID controllers on the thermal system
to maintain the temperature at 10o C, and save the response of the system with
each controller in your lab report: Kp = 1, Ki = 0.1, Kd = 0; Kp = 1.5, Ki = 0.5,
Kd = 0.2; and Kp = 2, Ki = 1.0, Kd = 0.5.
- [1.8] Exercise-8: What is the order of the system with the PID controller? Derive
the transfer function for the PID controller for bonus points.
- [1.8] Exercise-9: Calculate the steady state error and the percentage overshoot
from the responses of the previous exercises, and save them in your lab report.
1
Instructions
Follow the instructions stated below:
1. All the exercises in this lab handout are to be evaluated by instructors. After
getting a result, ask the instructor to evaluate them.
2. Please save all your graphs by taking screen shots in a word file with the exercise
numbers mentioned.
3. After the lab, you (all members of a group) have to upload the above mentioned
word file into the drop box on LMS with the name of that file as LabX-Y-N.pdf (X
is the experiment number, Y is the day e.g. Friday (Mor) or Friday (Eve), and N
is the name of student).
4. Take care of the lab equipment handed over to you during the lab.
1 Introduction
Temperature control is a process whereby the change in temperature of a particular space
(and the objects collectively within it) is measured or otherwise detected, and the passage
of heat energy into or out of the space is adjusted to achieve a desired average temperature.
The thermal system open loop chamber transfer function, Gc (s), i.e. input voltage with
respect to chamber temperature, can be modeled by a first order plant:
K
Gc (s) = (1)
τc s + 1
Here,
τc = Chamber open loop time constant,
K = Chamber open loop steady state gain.
1
www.wikipedia.org/wiki/T emperature − control
2
1.1 Description of the Overall System
In this experimental setup of a thermal control system, the plant consists of a cylindrical
glass tube, which is a chamber where the temperature is required to be observed and
controlled. The temperature sensor that we will be using is LM35. The actuator in this
thermal system is the AC filament lamp (for heating purpose) and DC fan (for cooling
purpose). The actuators are powered by electronic circuits to interpret control signals.
We have two control strategies to test for this setup in the lab:
• On-Off control
• PID control
During on-off control, the relay switches the actuator to put the AC bulb on or off. The
block diagram of the system during on-off control is shown in Figure-1.
During PID control, the AC filament lamp voltage is derived by a power electronic circuit
in which we control the RMS (root mean square) value of the AC voltage. This is achieved
by controlling the firing angle to vary the Vo depending upon the Vref supplied from the
computer. The block diagram of the system during PID control implementation is shown
in Figure-2.
3
Note: When operating the Arduino Board in an on-off control strategy, connect the
digital ground to the system. In a similar way, while implementing the PID controller,
only connect the analog ground of the Arduino Board to the thermal system.
CAUTION : If both the grounds (analog / digital) are connected at the same
time, it may cause unnecessary noise added to the system.
There is a switch on the thermal kit that operates the system in either the on-off or
the continuous (PID) control strategy. This switch must be properly positioned during
the experiments. The digital and analog terminals along with the switch are shown in
Figure-3. The fan control switch and the main power switch are also shown in Figure-4
and Figure-5 respectively.
4
Figure 5: Switch for main AC power
Note: The value of gain at the output of Analog Input block is 100/1023.
Exercise-1: Measure the rise time of the system, and give the response in your lab
report.
2
A solid state relay (SSR) is an electronic switching device in which a small control signal controls a
larger load current or voltage
5
Figure 6: Block Diagram for the step input
Now calculate the fall time using the method employed in Exp. 4.
Exercise-2: Measure the fall time of the system, and give the response in your lab
report.
Exercise-3: Measure the fall time of the system, and give the response in your lab report.
6
Figure 7: Step input to the system to calculate the fall time
Exercise-4: Build the Simulink model to implement the on-off control strategy. Save
this Simulink model in your lab report.
7
1.7 PID Control
When we add the PID controller to our feedback loop, the output (due to the nature of
the PID controller) becomes continuous. We use this continuous signal as a reference,
Vref , in our electronic circuit (as shown in Figure-2), to generate the pulses. These pulses
are further used for phase angle firing, which will in turn control the AC power sent to
the bulb. When the output of the PID is zero, the bulb will be continually on at 100%
power since the firing angle is zero, and vice versa (notice the inverse relation between
the PID output and the lamp power).
Note: As the PWM output of the Arduino board is unipolar and limited between 0V
and 5V, make sure to always use the saturation block before the PWM block for analog
output applications in Simulink.
Exercise-6: Build the Simulink model to implement the PID control strategy, and save
this model in your lab report. Use the PID Controller block directly.
Exercise-7: Implement the following PID controllers on the thermal system to maintain
the temperature at 10o C, and save the response of the system with each controller in
8
your lab report:
(1) Kp = 1, Ki = 0.1, Kd = 0
(2) Kp = 1.5, Ki = 0.5, Kd = 0.2
(3) Kp = 2, Ki = 1.0, Kd = 0.5
Exercise-8: What is the order of the system with the PID controller? Derive the trans-
fer function for the PID controller for bonus points.
Exercise-9: Calculate the steady state error and the percentage overshoot from the
responses of the previous exercises, and save them in your lab report.