0% found this document useful (0 votes)
12 views9 pages

Exp 5

Uploaded by

shahzaib.hasnain
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)
12 views9 pages

Exp 5

Uploaded by

shahzaib.hasnain
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/ 9

EE 361: Feedback Control Systems

Experiment # 5
Control of an HVAC-like thermal system

Date: / / 2023 Section:

Lab Report 5 Requirements


These are the questions/exercises from the handout that have to be answered in the lab
report:

- [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.

A home thermostat system is an example of a closed control loop: it constantly assesses


the current room temperature and controls a heater and/or air conditioner to increase or
decrease the temperature according to user-defined settings. A simple (low-cost, cheap)
thermostat merely switches the heater or air conditioner either on or off, and temporary
overshoot and undershoot of the desired average temperature is expected. A more ex-
pensive thermostat, on the other hand, varies the amount of heat or cooling provided by
the heater or cooler, depending on the difference between the required temperature (the
”set point”) and the actual temperature. This minimizes the overshoot or undershoot.
One such controller is a PID controller.1

In this experiment the thermal system is assumed to be a Single-Input-Single-Output


(SISO) plant. The controlled output is always the chamber temperature Tc , and the con-
trol input is either the heater or fan voltage, depending on whether the chamber needs a
rise or fall in 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.

Figure 1: Strategy for on-off control

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.

Figure 2: Block diagram of the system during PID control

1.2 Connection of the Arduino Board to Thermal System


In this lab, there are various exercises using on-off control and PID control. For this, the
Arduino board must be properly connected to the thermal system.

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.

Figure 3: Connection of analog and digital terminals

Figure 4: Switch for fan on-off

4
Figure 5: Switch for main AC power

1.3 Temperature Sensor


As mentioned before, we are using LM35 as the temperature sensor. LM35 is an inte-
grated circuit sensor that can be used to measure temperature with an electrical output
proportional to the temperature (in degree Celsius). The scale factor is .01V /o C. LM35
does not require any external calibration or trimming, and maintains an accuracy of
±0.4o C at room temperature and ±0.8o C over a range of 0o C to +100o C.

1.4 On-off Control Strategy


In the on-off control strategy, we are simply switching the bulb in an on or off state
through a solid state relay (SSR)2 . When we provide 0V to the system, it turns off the
bulb, and when we apply 5V to the system, the bulb turns on. You can review the On-Off
control strategy illustrated in Figure-1.

1.5 Rise and Fall Time of the System


To determine the rise and fall time of the system, the thermal system can be operated
in the on-off control mode. For this purpose, apply the step input to the system after
building the block diagram shown in Figure-6.

Note: The value of gain at the output of Analog Input block is 100/1023.

1.5.1 Rise Time of the System


As the response of the thermal system is normally slow, it will take about 150 sec to
achieve steady state (70o C to 75o C). Hence, when calculating the rise time, run the
system for a minimum of 150 sec. Recall the system identification technique we used to
calculate τm in Exp. 4 (motor position control), and apply the same technique here to
measure the rise time.

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

1.5.2 Fall Time of the System (Natural)


If we let the thermal system cool down naturally, the fall time should be larger then the
rise time. Before calculating the fall time, bring the temperature of the thermal system
to room temperature. To calculate the fall time, apply the step input with the shape
shown in Figure-7.

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.

1.5.3 Fall Time of the System (Forced)


In this thermal system, there is an option to turn on the fan manually. In the previous
section, we calculated the natural fall time of the system; now we will calculate the fall
time when the fan is ON. It is obvious that the temperature will decrease more rapidly
as compared to the natural response.
Again apply the same step input to the system as shown in Figure-7. However, after 150
sec, as soon as the input falls to zero, switch on the fan manually. You will observe a
rapid fall in temperature.

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

1.6 On-Off Control


In this section, we will use Simulink to build a model and maintain the temperature at
15o C. The general block diagram of the on-off controller is shown in Figure-8. Run the
simulation for a minimum of 500 sec.

Figure 8: General Block diagram of On-off controller

Exercise-4: Build the Simulink model to implement the on-off control strategy. Save
this Simulink model in your lab report.

Exercise-5: Save the on-off control response 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.

1.8 PID Control Strategy


To apply the control using PID, operate the thermal system in the analog mode and
connect the ground of the Arduino board to the analog ground of the thermal system.
To clearly see the overshoot and the different transient responses, run each simulation
for at least 250 sec. The block diagram employing the PID control strategy is shown in
Figure-9. We are inverting the output from PID because the analog circuitry built in
the kit has a control strategy opposite to that of the digital control (recall the inverse
relation between the PID controller and the lamp power mentioned above).

Note: The value of gain at the input of PWM block is 255.

Figure 9: General block diagram of PID controller

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.

You might also like