Exp 2 Thermal System
Exp 2 Thermal System
Exp 2 Thermal System
10
10
10
10
10
-
10
10
4
5
88/90
Page 1 of 26
Table of Contents
Abstract .......................................................................................................................................... 3
Introduction ................................................................................................................................... 4
System Description ........................................................................................................................ 5
Thermal system Description................................................................................................................... 5
Components of Thermal System ............................................................................................................ 6
Thermal system setup ............................................................................................................................. 7
Thermal System Block Diagram ............................................................................................................ 8
Engineering Drawings ............................................................................................................................ 8
Plant Response ............................................................................................................................... 9
Sensor Calibration Equation .................................................................................................................. 9
Working Range...................................................................................................................................... 10
Mathematical Modeling and Analytical Solution ..................................................................... 11
Mathematical Modeling ........................................................................................................................ 11
Analytical solution ................................................................................................................................. 13
Experimental Step response and Transfer Function Parameter Evaluation......................... 15
Step Response Test ................................................................................................................................ 16
Control System Design ................................................................................................................ 18
Control system specification................................................................................................................. 18
PI Controller design and closed loop transfer function ..................................................................... 18
Controller Parameters .......................................................................................................................... 20
Control System Implementation ................................................................................................ 21
Final tests ...................................................................................................................................... 23
Conclusion .................................................................................................................................... 25
References .................................................................................................................................... 26
Page 2 of 26
Abstract
This report will analyze a thermal system, the system components and engineering drawings will
be described to illustrate how they are connected together, and the block diagram will be explained.
The sensor calibration equation is not needed as the thermocouple sensor comes with its own input
module DAQ that includes the calibration equation. The working range of the system will be
defined by running the actuator at the minimum voltage and maximum voltage. The transfer
function of the system will be obtained and linearized by finding the modeling equation of the
system. LabVIEW program will be done to conduct an experimental open loop step response and
to estimate the system parameters. Moreover, a PI controller will be designed, and four control
parameters will be stated. The feedback closed-loop system transfer function will be governed
including the unknown parameters and the control parameters will be evaluated. The closed loop
system and the best controller parameters will be implanted in LabVIEW. Finally, the final testing
of the system will be performed.
Page 3 of 26
Introduction
Thermal systems are systems where heat is stored or transferred. Heat can be transferred from one
object to another by conduction, convection, and radiation. Conduction is the process of
transmission of energy from one particle of the medium to another with the particles being in direct
contact with each other [1]. Convection is the movement of fluid molecules from higher
temperature regions to lower temperature regions. Radiation is the process where electromagnetic
waves emitted can be absorbed, reflected, or transmitted through a colder body.
In this experiment, a dynamic thermal system will be modeled, simulated, design a controller for
it, and implement some tests on it. First, a suitable plant response test will be performed. After
that, a mathematical model will be derived for the plant. Then, a controller will be designed for
the desired requirements and performance. Next, the control system will be implemented on a
computer (using LabVIEW) and will be interfaced with the plant. Finally, the performance of the
plant will be analyzed.
Page 4 of 26
System Description
Thermal system Description
This experiment will control temperature by the thermal system connected in a closed loop (figure
1), consisting of the chamber (plant) that contains the fan (actuator), bulb as a constant heat source,
and a thermocouple to measure the temperature inside the chamber (sensor). In addition, the
amplifier that will amplifies the current and will power the motor, Data acquisition to measure
signals to the program, and finally a computer to open LabVIEW software to control and display
data. As shown in the figure below, the system, which models the actual system that is used in the
lab, consists of a closed volume, which is subjected to a constant heat flow from the heat source
qh, and controlled cooling from a stream of cold air W from the electric motor driven fan. The
walls are assumed to be perfectly insulated (i.e. no heat transfer through the wall will be
considered) [2].
Where:
• θ = Temperature • W = Volumetric flow rate
• θ! = Ambient Temperature • ρ = Density
• C = Thermal Capacitance • σ = Specific heat constant
• q" = Heater heat flow rate
Page 5 of 26
Components of Thermal System
Page 6 of 26
Thermal system setup
Figure 3 shows how the components of the thermal system are connected in the lab and the names
of each component.
Signals connection:
The thermal system is connecting all four components in a closed loop. The amplifier is
powered by a power supply of 12 VDC / 1 Amp.
First, the desired temperature value will be entered in the LabVIEW, it will transfer digital signals
to the DAQ that will convert them into analog signals, to send it as input voltage value to the fan,
however, the DAQ operates at range -10 to 10 volts and the fan operates till 10 volts, thus there is
no need to amplify the voltage, but we still need the amplifier to amplify the current since it is very
small coming from the DAQ, therefore, a follower op amp is used in this setup. Then the plant will
receive the input voltage and the fan will work. The thermocouple will transmit the signals of the
temperature readings inside the chamber as voltage. To return the feedback temperature of the
chamber, the output temperature signal in voltage will be forwarded to the input channel in DAQ,
then the reading will be shown in the LabVIEW.
Page 7 of 26
Thermal System Block Diagram
The components of the closed-loop feedback mechatronics system and how they are connected
can be seen in the block diagrams below.
Engineering Drawings
Amplifier
Computer
Chamber
DAQ
Page 8 of 26
Figure 6: Back View showing the Bulb and Thermocouple inside the Chamber
Plant Response
Sensor Calibration Equation
The calibration equation relates the input of the sensor with the output of the sensor. However, in
this experiment, a calibration equation for the thermocouple is not needed because it comes with
its own input module DAQ which already has the calibration equation built in it. Thus, the output
of the thermocouple sensor will be displayed in LabVIEW directly in degrees Celsius ˚C, not
voltage.
Sensor calibration ensures that everything is running at the best rate and producing the greatest
results. It is a technique used to verify the accuracy of a sensor or instrument by comparing it to
the standards. Reducing measurement uncertainty and ensuring that processes are accurate and
consistent are the main goals of calibration. One of the primary benefits of calibrating sensors is
that over time, mechanical components and devices will begin to exhibit symptoms of wear. As a
result, calibration is a crucial tool for ensuring that the sensors continue to work as they did on
their first day of usage.
Page 9 of 26
Working Range
Defining a working range is essential because the system can operate within this range only.
Therefore, during the tests, we need to make sure to use values within the working range to avoid
damaging the system or cause any error. In this test, the minimum voltage (dead zone), the
maximum voltage, and thus, the operating range of the system were all determined using the
following procedure:
I. Use the lowest possible input voltage that will enable the fan (actuator) to operate; this is
the minimum voltage (dead zone). Record the temperature at this voltage.
II. Continue increasing the voltage until the system gives the same output; this is the
maximum voltage. Record the temperature at this voltage.
The user should enter 10V as the maximum value and 6V as the lowest value. The fan won't turn
on at voltages lower than 6 V. Based on the working range of the temperature, we chose to operate
between 44˚C and 42˚C when conducting further tests.
LabVIEW:
1. Output DAQ: to operate the fan at the minimum voltage that is entered by the user. Add a
numeric control in the front panel.
2. Input DAQ: to read the temperature measurement from the thermocouple. Add a numeric
indicator to display the temperature in the front panel.
3. Record the thermocouple sensor outputs of minimum and maximum voltage of the fan.
Page 10 of 26
Figure 7: LabVIEW for testing the working range
Page 11 of 26
𝑚̇ = 𝜌𝑣̇ = 𝜌𝑊
The governing equation:
1
𝜃̇ = (𝑞$% − 𝑞&'( )
𝑐
(1)
𝑤ℎ𝑒𝑟𝑒 𝑞$% = 𝑞# + 𝜌𝜎𝑊𝜃! 𝑎𝑛𝑑 𝑞&'( = 𝜌𝜎𝑊𝜃
1
𝜃̇ = (𝑞 + 𝜌𝜎𝑊𝜃! − 𝜌𝜎𝑊𝜃)
𝑐 #
Starting with the linearization: for which term and why/ not linear
∅̇ = 𝜃̇
1 1 1
∅̇ = RRR
𝑞# + 𝜌𝜎(∆𝑊 + 𝑊)𝜃! − 𝜌𝜎𝑊𝜃
𝑐 𝑐 𝑐 (3)
Page 12 of 26
1 1 1 𝜌𝜎 𝜌𝜎 𝜌𝜎
∅̇ = O 𝜃̅ − 𝜌𝜎𝑊
(𝜌𝜎𝑊 O 𝜃! ) + 𝜌𝜎∆𝑊𝜃! + 𝜌𝜎𝑊𝜃! − 𝜃̅𝑊
O− O (∅) −
𝑊 𝜃̅(∆𝑊)
𝑐 𝑐 𝑐 𝐶 𝐶 𝐶
Simplifying the equation:
1 𝜌𝜎 𝜌𝜎
∅̇ = 𝜌𝜎∆𝑊𝜃! − O (∅) −
𝑊 𝜃̅ (∆𝑊)
𝑐 𝐶 𝐶
Rearrange the equation:
𝜌𝜎 𝜌𝜎
∅̇ = − 𝑊O (∅) + ∆𝑊 (𝜃 − 𝜃̅)
𝑐 !
explain yoursteps?
𝑐
𝑐 𝜃! − 𝜃
∅̇ + ∅ = ∆𝑊( )
𝜌𝜎𝑊O 𝑊O
The linearized model can be written as first order differential equation:
𝜏 ∅̇ + ∅ = 𝐾& ∆𝑊
Assuming that 𝑊 ∝ 𝑒 (𝑊 = 𝑘𝑉$% ), where 𝑉$% is the motor fan voltage, the linearized model can
be written as:
𝜏 ∅̇ + ∅ = 𝐾& 𝑉$%
- )! 0)
Where: 𝜏 = ./,
+
𝑎𝑛𝑑 𝐾& = ( ,+
)
Analytical solution
Find a response of the model:
Assume a step input = A
𝐴
∆𝑉$% (𝑠) = 𝐴 → 𝑉$% (𝑠) =
𝑠
𝐾& 𝐴 𝐾𝑜𝐴
∅(𝑠) = ∗ =
𝜏𝑠 + 1 𝑠 𝑠(𝜏𝑠 + 1)
Using partial fraction expansion:
Page 13 of 26
𝐾𝑜𝐴 𝐵 𝐶
= + → 𝐾& 𝐴 = 𝐵(𝜏𝑠 + 1) + 𝐶𝑠
𝑠(𝜏𝑠 + 1) 𝑠 𝜏𝑠 + 1
𝑊ℎ𝑒𝑛 𝑠 = 0 → 𝐵 = 𝐾& 𝐴
1
𝑊ℎ𝑒𝑛 𝑠 = − → 𝐶 = −𝜏𝐾& 𝐴
𝜏
Thus, the equation:
𝐾& 𝐴 −𝜏𝐾& 𝐴 1 𝜏
∅(𝑠) = + = 𝐾& 𝐴 ` − a
𝑠 𝜏𝑠 + 1 𝑠 𝜏𝑠 + 1
The Laplace inverse:
1
∅(𝑡) = 𝐾& 𝐴 `1 − 𝑒 02 ( a
Page 14 of 26
Experimental Step response and Transfer Function Parameter
Evaluation
The connection for open loop thermal system is shown in the figure below. First a “Numeric
Control” was added in the Block Diagram window. The “Numeric Control” will appear in the
Front Panel Window so that we can input the fan voltage. The “Numeric Control” is attached to
channel 0 output module of the DAQ which is represented by the block “DAQ Assistant”. Since
it is an output, then the signal is generated and was set on one sample on demand as generation
mode. Not to mention that since it is voltage then the signal is analog. Then a “Numeric Indicator”
was added in the Block Diagram window. The “Numeric Indicator” will appear in the Front Panel
Window so that we can view and see the temperature. The “Numeric Indicator” is connected to
channel 0 input module of the DAQ which is represented by the block “DAQ Assistant2”. Since
it is an input, then the signal is acquired and was set on continuous as generation mode in which
one reading is taken every 1 Hz thus every 1 second. Not to mention that since it is temperature
then the signal is analog. Then, both Numeric blocks are attached to “Write To Measurement File”
so that the obtained data is saved in an excel file. The data is set to save as 1 header, 1 column.
Thus, every parameter will be saved in one column. Lastly, a while loop is added in the Block
Diagram window, and it is attached to a Stop button. The Stop button is also displayed in the Front
Panel window. The purpose of the while loop is to constantly run the LabVIEW code block until
a specified condition is met.
Page 15 of 26
Step Response Test
To obtain the open loop parameters which are 𝑘& and 𝜏, a step response was given to the system
and the dynamic response of the system was recorded using the LabVIEW connection. Due to time
limitation, the test was done only one time instead of three times to take the average value for both
the gain 𝑘& and the time constant 𝜏. The test was done from the dead zone till the maximum voltage
value, from 6 volts to 10 volts. The system response obtained after shifting it is shown in the figure
below.
Step Response
𝜏
0 𝜏
0 20 40 60 80 100 120 140 160 180 200 220 240 260 280 300
-0.5
-1
Shifted Temperature (C)
-1.5
-2
0.632Vss
63.2%𝑉!!
-2.5
-3
-3.5
𝑉!! Vss
-4
-4.5
Time (s)
As show in the figure above, the temperature starts from zero because the data was shifted when
the step was given. The temperature is negative because it decreases with time due to the fan which
has a cooling effect inside the box.
Page 16 of 26
The time constant 𝜏 occurs at 63.2%𝑉33 , thus:
63.2%𝑉33 = 0.632(−3.7) = −2.3384 → 𝜏 = 41
Thus, we can represent our transfer function 𝐺(𝑠) by the block diagram shown in the Figure blow.
The 𝐺(𝑠) of the system is the representation of the real-life system. Which we can use in programs
such as MATLAB to represent our system through the simulation. The 𝐺(𝑠) which is the transfer
function is not used in the LabView, this is because we do not need to represent our system since
we are working on it directly.
Page 17 of 26
Control System Design
Control system specification
The specification for the system depends on the desired performance of the controlled system. The
definition of each specification is us following:
1. Rise time (𝑇6 ): it is the required time for to response to rise to 80% or from 10% to 90% of
the steady state value.
2. Settling time (𝑇3 ): It is the required time for the response to build up to and maintain a
steady state between 2% and 5% of its final value.
3. Steady state error (𝑒33 ): is the difference between the desired value and obtained value over
the step. It is used to determine the performance of the response and how is the value
obtained from the required value.
4. Percentage overshoot (PO%): it is the ratio between the difference between maximum
response value (overshoot) and steady state over the steady state response.
To control the temperature inside the box, Proportional Integral (PI) controller will be used. The
figure below shows the block diagram of the closed-loop feedback system and how it is reduced
to have the overall close loop transfer function.
Page 18 of 26
𝑘7
𝑐𝑜𝑛𝑡𝑟𝑜𝑙
∅; 𝑒𝑟𝑟𝑜𝑟
+ 𝑠𝑖𝑔𝑛𝑎𝑙 ∅&
+ .
+ 𝐺(𝑠)
−
𝑘$ /𝑠
𝑐𝑜𝑛𝑡𝑟𝑜𝑙
∅; 𝑒𝑟𝑟𝑜𝑟 𝑠𝑖𝑔𝑛𝑎𝑙 ∅&
+ 𝑘7 + 𝑘$ /𝑠 𝐺(𝑠)
−
∅; ∅&
+ (𝑘7 + 𝑘$ /𝑠 )𝐺(𝑠)
−
𝑘
∅; (𝑘7 + 𝑠$ )𝐺(𝑠) ∅&
𝑘
1 + (𝑘7 + 𝑠$ )𝐺(𝑠)
Figure 12: Block diagram of the closed-loop system
Page 19 of 26
𝑘7 𝑘& 𝑠 + 𝑘$ 𝑘&
𝑇(𝑠) =
𝜏𝑠 : + (1 + 𝑘7 𝑘& )𝑠 + 𝑘$ 𝑘&
Dividing the above equation by tau (𝜏) and equate the equation with the characteristic equation:
𝑘7 𝑘& 𝑠 + 𝑘$ 𝑘&
𝜏 𝜔% :
𝑇(𝑠) = =
1 + 𝑘7 𝑘& 𝑘$ 𝑘& 𝑠 : + 2𝜁𝜔% 𝑠 + 𝜔% :
𝑠: + ` 𝜏 a 𝑠 + 𝜏
We will get
1 + 𝑘7 𝑘&
2𝜁𝜔% =
𝜏
and
𝑘$ 𝑘&
𝜔%: =
𝜏
Controller Parameters
To find the controller parameters which are 𝑘7 and 𝑘$ , first, we need to find 𝜔% and 𝜁 values. 𝜔%
and 𝜁 values are obtained from the specifications as shown below:
Finding 𝜔% :
1.8
𝑇𝑟 =
𝜔%
1.8
180 = → 𝜔% = 0.01
𝜔%
Finding 𝜁:
4.6
𝑇6 =
𝜁𝜔%
4.6
360 = → ζ = 1.277777778 ≈ 1.28
𝜁(0.01)
Finding 𝑘7 :
1 + 𝑘7 𝑘&
2𝜁𝜔% =
𝜏
Substituting 𝑘& = −0.925, 𝜏 = 41, 𝜁 = 1.28 and 𝜔% = 0.01 in the above equation we will get:
1 + 𝑘7 (−0.925)
2(1.28)(0.01) =
41
→ 𝑘7 = −0.05165165165
Finding 𝑘$ :
𝑘$ 𝑘&
𝜔%: =
𝜏
Substituting 𝑘& = −0.925, 𝜏 = 41, and 𝜔% = 0.01 in the above equation we will get:
𝑘$ (−0.925)
(0.01): =
(41)
→ 𝑘$ = −0.004432432432
Page 20 of 26
Control System Implementation
All components of the system are integrated in LabView for a closed loop as shown in the previous
figure, where LabView program is used as a controller. The user will enter the desired temperature
as the input. To implement the closed in lab view, we need:
1. A numeric control in the front panel was added for the input desired temperature, and
an indicator was added for the output measured temperature.
2. For the block diagram: a while loop was added with a stop button, and they were
connected.
3. Input DAQ was added: it acquired the analog input signal (temperature) from the
thermocouple from channel 0. The mode was acquisition mode, continuous rate with 1
sample in 1 second. Input DAQ was connected to the temperature indicator.
4. A PID block was created. The set point was connected to the desired temperature. The
process variable was connected to the temperature indicator. PID gain control and
output range control were added (shown in the front panel)
5. Output DAQ was added: it generated the analog output signal (volt) from channel 0.
The mode is 1 sample on demand and continuous. Output DAQ was connected to the
output of the PID.
Page 21 of 26
6. Measurement file was added. It recorded the data in a single file, text format, one header
only, one column only, and appended. This block was connected to the desired and
measured temperature.
For the output range, since temperature is only positive, the range will be from the dead zone
(6V) to the maximum voltage (10V). For the control parameters, they will be modified in the
front panel. The Value of the proportional gain, Kp, and integral gain, ki ,will be entered, and kd
will be zero. LabView uses the PID standard form as
1
𝑐 = 𝑘7 `1 + 𝑇; 𝑠 + a
𝑇$ 𝑠
Where MATLAB uses the parallel form which is
𝑘$
𝑐 = 𝑘7 + 𝑘; 𝑠 +
𝑠
To convert the controller parameters from parallel form to standard form:
𝑘; 𝑘7
𝑘7 = 𝑘7 𝑇;(>$%) = 𝑇$(>$%) =
60𝑘7 60𝑘$
The proportional controller (Kp) reduces rise time, increases overshoot, and reduces steady state
error, but will not eliminate it. The integral controller (Ki) decreases the rise time, increases both
the overshoot and the settling time, and eliminates the steady-state error. At first, the calculated
values of Kp and Ki were inserted in the front panel. Then, we see if the results satisfy the
requirements. If they do not, Kp and Ki are modified depending on which parameter we want to
improve.
Page 22 of 26
Final tests
Minimum to Maximum (42 to 44):
• Step = 2
• 𝑉𝑠𝑠 = 1.8 °𝐶
• 0.1𝑉33 = 0.1(1.8) = 0.18 °𝐶 𝑎𝑛𝑑 0.9𝑉33 = 0.9(1.8) = 1.62 °𝐶 → 𝑇6 = 𝑇(90%) −
𝑇(10%) = 225 − 55 = 170 𝑠
• 0.98 𝑉𝑠𝑠 = (0.98)(1.8) = 1.764 °𝐶 → 𝑇3 = 229 𝑠
:..1ABCD0:
• 𝑃. 𝑂 = :
× 100 = 7.917%
|1.B0:|
• 𝑒𝑠𝑠 = :
× 100 = 10%
Both the rise time and settling time are within and satisfy the requirements. However, the
percentage overshoot and the steady state error exceeded the specified requirements as the system
has issues and it is unstable.
Page 23 of 26
Maximum to Minimum (44 to 42):
• Step = 2
• 𝑉𝑠𝑠 = −1.9 °𝐶
• 0.1𝑉33 = 0.1(−1.9) = −0.19 °𝐶 𝑎𝑛𝑑 0.9𝑉33 = 0.9(−1.9) = −1.71 °𝐶 → 𝑇6 = 𝑇(90%) −
𝑇(10%) = 308 − 31 = 277 𝑠
• 0.98 𝑉𝑠𝑠 = (0.98)(−1.9) = −1.862 °𝐶 → 𝑇3 = 325 𝑠
0:.:FDD0(0:)
• 𝑃. 𝑂 = 0:
× 100 = 10.22%
|01.G0(0:)|
• 𝑒𝑠𝑠 = :
× 100 = 5%
The rise time, settling time, and the percentage overshoot don’t meet the specified requirement as
the system is unstable. The steady state error is the only parameter met.
Due to the limited time we had to work on this experiment, we could not improve the system any
further, thus some of the specifications did not meet the desired requirements. In addition, the
system itself had some issues that lead to unstable or high error results. Some of these issues may
be that the box was not fully insulation, any friction, and slow response of the fan.
what must do to satisfy your
requiremnts
Page 24 of 26 Discuss!
Conclusion
In conclusion, this experiment's objectives were met. Heat can enter and escape the chamber due
to our thermal system. The temperature is measured by an analog sensor and converted to a digital
reading. At first, a dynamic linearized model for a thermal system could be obtained. The Taylor
series and the operating point at equilibrium were used to develop the linear mathematical model.
Next, the transfer function was converted from the s-domain to the time domain in order to arrive
at the analytical solution for the thermal system. A method for determining 𝑘 & 𝜏 for this thermal
system was also described. Furthermore, a PI controller was designed to improve the response of
the system LabVIEW was used for implementation and conduct several tests.
The rising time, settling time, percentage overshoot, and steady state were found from the response
from minimum to maximum and from maximum to minimum. For the minimum to maximum test,
both the rise time and settling time satisfy the requirements. However, the percentage overshoot
and the steady state error exceeded the specified requirements. For the maximum to minimum test,
the steady state error is the only parameter met. The rise time, settling time, and the percentage
overshoot don’t meet the specified requirement.
To improve the system, we can further modify the values for the proportional gain and the integral
gain. Unfortunately, there was not enough time to do so. Theoretically, to let the system meets the
specified requirements first we will increase the value of the proportional gain since it enhances
the transient response of the system by reducing the rise time value. Then after modifying the
transient response by increasing the proportional gain, the system may have an overshoot. Thus,
we will reduce the value of the integral gain to enhance the maximum overshoot and the settling
time values. Reducing the value of integral gain will lead to reducing the values of both overshoot
and settling time. Following this procedure will make the system meets the specified requirements.
Page 25 of 26
References
[1] "Heat Transfer - Radiation, Convection And Conduction," BYJU'S, 2020. [Online].
Available: https://byjus.com/physics/heat-transfer-conduction-convection-and-
radiation/#what-is-conduction.
[2] E. R. Hamza, "Thermal System Lab Manual".
Page 26 of 26