You are on page 1of 179

SIMULATION AND CONTROL OF HEAT EXCHANGERS

USING ARTIFICIAL NEURAL NETWORKS


A Dissertation
Submitted to the Graduate School
of the University of Notre Dame
in Partial Ful llment of the Requirements
for the Degree of
Doctor of Philosophy
in Mechanical Engineering
by
Gerardo C. Daz, B.S., M.S.

Mihir Sen, Director


Department of Aerospace and Mechanical Engineering
Notre Dame, Indiana
March 2000

SIMULATION AND CONTROL OF HEAT EXCHANGERS


USING ARTIFICIAL NEURAL NETWORKS
Abstract
by
Gerardo C. Daz
The design of thermal systems usually requires the prediction of heat transfer rates
of heat exchangers under prescribed operating conditions. Due to the complexity of
these thermal components, conventional steady-state modeling approaches, such as
correlations, provide predictions with large uncertainties. These are not only due to
experimental errors but also to the information compression process in which several
assumptions are used. For control purposes, furthermore, dynamic simulations are
needed for which only a limited number of models are available. We apply arti cial
neural networks (ANNs) to the simulation of the steady and dynamic behaviors of
heat exchangers, as well as to the control of uid temperatures. The experiments
were carried out in a heat exchanger test facility. The ANN predictions are obtained
using information about the ow rates and inlet temperatures of both uids in the
heat exchanger. Numerical tests show the feasibility of the method and experimental
comparison with conventional correlations prove the ANN to be more accurate.

Gerardo C. Daz
Dynamic prediction is also addressed with analytic and experimental evidence
of excellent predicting characteristics of the ANNs. Using dynamic modeling, ANNs
are used in conjunction with internal model control to perform non-adaptive and
adaptive control of the air temperature leaving a single-row water-to-air n-tube
heat exchanger. Stability constraints are included in the training of the ANNs.
The closed-loop system is considered as a nonlinear iterative map and its stability is analyzed numerically and veri ed experimentally. Reduction in the energy
consumption is added as one of the tasks of the neurocontroller.
Finally, the delay e ects involved in the thermal system due to sensor location
are analyzed. Analytical and experimental comparisons with conventional on-o
control are performed and model predictive control using ANNs to simulate the
physical plant is used to improve the performance of the conventional on-o control
scheme in the presence of delay. It is shown how the system remains within the
dead band of the on-o control system with the use of an ANN predictive model.

DEDICATION

To Kathy, my parents, and Our Lady of Notre Dame du Lac for their constant
support and help during the development of this dissertation.

ii

CONTENTS
TABLES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

vi

FIGURES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
ACKNOWLEDGEMENTS . . . . . . . . . . . . . . . . . . . . . . . . . . .

xi

NOMENCLATURE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xii
CHAPTER 1: INTRODUCTION . . . . . . . . . . . . .
1.1 Simulation of heat exchangers . . . . . . . . . .
1.2 Control of thermal systems . . . . . . . . . . . .
1.3 Arti cial neural networks and thermal systems .
1.4 Delay e ects in dynamical systems . . . . . . .

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

1
2
3
3
4

CHAPTER 2: PROBLEM DESCRIPTION . . . . . . . . . .


2.1 Use of the heat transfer coecient . . . . . . . . . . .
2.2 Conventional heat exchanger analysis . . . . . . . .
2.3 Error introduced by bulk temperature . . . . . . . .
2.4 Dynamic prediction and control of a heat exchanger .
2.5 Experimental facility . . . . . . . . . . . . . . . . . .
2.6 Objectives of this dissertation . . . . . . . . . . . . .

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

6
6
8
10
15
15
17

CHAPTER 3: STEADY-STATE SIMULATION . . . . . . .


3.1 Arti cial neural networks analysis . . . . . . . . . .
3.1.1 Normalization . . . . . . . . . . . . . . . . .
3.1.2 Network con guration . . . . . . . . . . . .
3.1.3 Feedforward . . . . . . . . . . . . . . . . . .
3.1.4 Backpropagation . . . . . . . . . . . . . . .
3.1.5 Training . . . . . . . . . . . . . . . . . . . .
3.1.6 Testing . . . . . . . . . . . . . . . . . . . . .
3.2 System identi cation: algebraic equations . . . . . .
3.3 Heat transfer rate using arti cial neural networks .
3.3.1 One-dimensional conduction . . . . . . . . .
3.3.2 Convection with one heat transfer coecient

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

20
22
23
23
24
24
25
29
29
30
30
31

iii

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

3.3.3 Convection with two heat transfer coecients . . . . . . . . 34


3.3.4 Single-row n-tube heat exchanger . . . . . . . . . . . . . . 36
3.4 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
CHAPTER 4: TIME-DEPENDENT SIMULATION . . . . .
4.1 Arti cial neural networks analysis: training . . . . .
4.2 System identi cation: analytical . . . . . . . . . .
4.2.1 First order linear equation . . . . . . . . . .
4.2.2 Second order linear equation . . . . . . . . .
4.2.3 Nonlinear rst order equation . . . . . . . .
4.2.4 Di erential equations with forcing functions
4.3 System identi cation: experimental . . . . . . . . .
4.3.1 Experimental setup . . . . . . . . . . . . . .
4.3.2 Dynamic simulations . . . . . . . . . . . . .
4.4 Conclusions . . . . . . . . . . . . . . . . . . . . . .

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

47
49
50
51
51
52
53
54
54
54
58

CHAPTER 5: CONTROL OF FLUID TEMPERATURE .


5.1 Conventional control . . . . . . . . . . . . . . . .
5.1.1 PID control structure . . . . . . . . . . . .
5.1.2 Control variable selection . . . . . . . . . .
5.2 Application to an experimental facility . . . . . .
5.3 Neurocontrol . . . . . . . . . . . . . . . . . . . .
5.4 Conclusions . . . . . . . . . . . . . . . . . . . . .

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

64
65
65
66
67
71
76

CHAPTER 6: STABILIZATION OF CONTROL SYSTEM


6.1 Neurocontroller as an iterated map . . . . . . . . .
6.2 Stability analyses . . . . . . . . . . . . . . . . . . .
6.2.1 Open-loop control with single neuron . . . .
6.2.2 Open-loop control with 2-1-1 neural network
6.2.3 Open-loop control with 2-5-1 neural network
6.3 Training with stabilization . . . . . . . . . . . . . .
6.4 Experimental results . . . . . . . . . . . . . . . . .
6.4.1 Test facility . . . . . . . . . . . . . . . . . .
6.4.2 Open-loop control . . . . . . . . . . . . . . .
6.4.3 Closed-loop control . . . . . . . . . . . . . .
6.5 Conclusions . . . . . . . . . . . . . . . . . . . . . .

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

79
81
82
84
85
92
92
98
99
99
100
103

CHAPTER 7: ADAPTIVE CONTROL . . . . . . .


7.1 Neurocontrol . . . . . . . . . . . . . . . .
7.1.1 Internal model control . . . . . . .
7.1.2 Adaptive control . . . . . . . . . .
7.1.3 Simultaneous minimization criteria
7.2 Development of controller . . . . . . . . .
7.2.1 Single adaptation criterion . . . . .
7.2.2 Two adaptation criteria . . . . . .

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

105
106
106
107
108
109
109
111

iv

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

7.2.3 Adaptation criteria with optimization routine


7.3 Experimental veri cation . . . . . . . . . . . . . . . .
7.3.1 Change in the set point . . . . . . . . . . . . .
7.3.2 Disturbance rejection . . . . . . . . . . . . . .
7.3.3 Energy consumption . . . . . . . . . . . . . .
7.4 Conclusions . . . . . . . . . . . . . . . . . . . . . . .
CHAPTER 8: EFFECT OF DELAY . . . . . . . . . .
8.1 Delay equations and their applications . . . .
8.2 One-dimensional model . . . . . . . . . . . . .
8.3 Heat exchanger control . . . . . . . . . . . . .
8.3.1 Proportional control with delay . . . .
8.3.2 On-o control . . . . . . . . . . . . .
8.4 Experimental results . . . . . . . . . . . . . .
8.4.1 Proportional control . . . . . . . . . .
8.4.2 Proportional-integral-derivative control
8.4.3 On-o control . . . . . . . . . . . . . .
8.5 Conclusions . . . . . . . . . . . . . . . . . . .

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

112
115
116
116
121
124

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

125
127
128
128
129
131
135
135
137
138
146

CONCLUSIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
RECOMMENDATIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
REFERENCES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151

TABLES
3.1 Comparison of heat transfer rates predicted by di erent con gurations. 40
3.2 Values of the weights for con guration 4-2-1. . . . . . . . . . . . . . 42
3.3 Values of the biases for con guration 4-2-1. . . . . . . . . . . . . . . 42
5.1 Types of control and controlling variables. . . . . . . . . . . . . . . 66
6.1 2-1-1 neural network, initial and nal weights and biases and nal
spectral radii. Cases A and B are without and C is with stabilization. 89
8.1 Functional equations and di erential-di erence equations, t , t and
t > 0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
0

vi

FIGURES
2.1 Simpli ed model of a heat exchanger. . . . . . . . . . . . . . . . . .
2.2 Channel used for numerical comparison. . . . . . . . . . . . . . . .
2.3 Nondimensional velocity and temperature pro les for x = 2 mm. -.constant properties; { temperature dependent. . . . . . . . . . . . .
2.4 Ratio between heat transfer rates. (a) local values; (b) average values.
2.5 Picture of the experimental facility. . . . . . . . . . . . . . . . . . .
2.6 Experimental setup. (a) wind tunnel; (b) heat exchanger. . . . . . .

7
11

3.1 Arti cial neural network. . . . . . . . . . . . . . . . . . . . . . . . .


3.2 E ect of di erent starting conditions on the standard deviation for
con guration 4-5-5-1. For reference straight line A has slope of 1=2.
The di erent symbols correspond to di erent starting conditions. .
3.3 Variation of the standard deviation for di erent network con gurations.
3.4 Simulation of y = x . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.5 Laminar ow convection with one heat transfer coecient. Straight
line is Q_ ANN = Q_ . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.6 Turbulent ow convection with one heat transfer coecient. Straight
line is Q_ ANN = Q_ . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.7 Combined laminar and turbulent ow with one heat transfer coecient. Straight line is Q_ ANN = Q_ . . . . . . . . . . . . . . . . . . . .
3.8 Two heat transfer coecients. Straight line is Q_ ANN = Q_ . . . . . .
3.9 Maximum error as a function of the number of cycles for con guration
4-5-2-1-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.10 Ratio of heat transfer rates Ri for run i.  4-5-5-1; + 4-5-1-1. . .
3.11 Steady-state predictions. (a) inputs and output; (b) comparison
with measurements; correlations; + ANN (4-5-5-1); dotted lines
are 10% deviations. . . . . . . . . . . . . . . . . . . . . . . . . . .

23

vii

12
13
16
19

27
28
29
33
34
35
37
39
41
44

4.1 Two training methods for dynamic problems. . . . . . . . . . . . . .


4.2 First order di erential equation. x_ + x = 0; x(0) = 7:5; | exact; - ANN (2-5-5-1). . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.3 Second order di erential equation. x + 3x_ + x = 0; x(0) = 16;
x_ (0) = 20; | exact; - - ANN (3-5-5-1). . . . . . . . . . . . . . . .
4.4 First order nonlinear di erential equation. x_ + x = 0; x(0) = 1:075;
| numerical; - - ANN (2-5-5-1). . . . . . . . . . . . . . . . . . . . .
4.5 First order nonlinear di erential equation with forcing function. x_ +
x = y (t); x(0) = 0:5. . . . . . . . . . . . . . . . . . . . . . . . . . .
4.6 Forcing function approximated by step functions. . . . . . . . . . .
4.7 First order nonlinear di erential equation with di erent forcing functions: x_ + x = y(t). (a) y(t) = 0:5 + 0:2t; (b) y(t) = 0:5 0:2t; (c)
y (t) = 0:2( 0:5 + t); and (d) y (t) = 0:4 sin(5t); | numerical; - - ANN.
4.8 ANN used for prediction of transient experimental data from a thermal system. | experiment; - - ANN (4-5-5-2). . . . . . . . . . . . .
4.9 Information at previous instants. (a) training a system ofa order n;
(b) response of HX treated as system of di erent orders; Tout is normalized and s is the sample number. . . . . . . . . . . . . . . . . .
4.10 ANN (3-5-5-2) prediction for a cooling process. . . . . . . . . . . . .
4.11 ANN (3-5-5-2) prediction for ramp function. . . . . . . . . . . . . .
4.12 ANN (3-5-5-2) prediction for change in air mass ow rate. . . . . .

49

5.1
5.2
5.3
5.4

69
70
71

Inlet air disturbance. . . . . . . . . . . . . . . . . . . . . . . . . . .


Control action for inlet air disturbance. . . . . . . . . . . . . . . . .
Water ow rate disturbance rejection. . . . . . . . . . . . . . . . . .
w for di erent mass ow rates
Nonlinear relation between m_ a and Tout
of water. 0.260 kg/s; 4 0.200 kg/s;  0.65 kg/s. . .
5.5 General IMC structure plus integral control. . . . . . . . . . . . . .
5.6 Change in the setpoint temperature. | ANN; - - PID; -.- PI. . . .
5.7 Disturbance rejection. | ANN; - - PID . . . . . . . . . . . . . . . .

51
52
53
54
55
56
57
59
60
61
62

72
73
77
78

6.1 Neurocontrollers. (a) open loop; (b) closed loop. . . . . . . . . . . . 83


6.2 Single neuron, stable behavior without oscillations.  ; = 0:1; w ;; =
0:1; w ;; = 0:5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
21

21
11

viii

21
12

6.3 Single neuron, stable behavior with oscillations.  ; = 0:1; w ;; =


0:1; w ;; = 5:0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
6.4 Single neuron, unstable behavior.  ; = 0:1; w ;; = 0:1; w ;; = 10:0. 88
6.5 2-1-1 network, case A. . . . . . . . . . . . . . . . . . . . . . . . . . 90
6.6 2-1-1 network, case B. . . . . . . . . . . . . . . . . . . . . . . . . . 91
6.7 2-5-1
network.
y i vs. y i for stable (D) and unstable (E) maps;
i
i
y = y line shown for reference. . . . . . . . . . . . . . . . . . . . 93
6.8 2-5-1 network, unstable open-loop control system. . . . . . . . . . . 94
6.9 2-1-1 network error contours. Thick line is e = 0; abc error minimization alone; abd error minimization with spectral radius reduction;
inset shows zig-zag path. . . . . . . . . . . . . . . . . . . . . . . . . 96
6.10 2-1-1 network spectral radius contours. Thick line is e = 0; abc
error minimization alone; abd error minimization with spectral radius
reduction; inset shows zig-zag path. . . . . . . . . . . . . . . . . . . 97
6.11 2-1-1 network, case C. . . . . . . . . . . . . . . . . . . . . . . . . . 98
6.12 Dependence of spectral radius on operating conditions, open-loop
control. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
6.13 Performance of controllers C and C , closed-loop control. . . . . . 103
21
12

21

21
11

21

21
12

21
11

+1

+1

7.1 Adaptive control scheme. . . . . . . . . . . . . . . . . . . . . . . . . 107


7.2 Tracking of a dynamical system by an ANN. (a) adaptation for target
error  5 %; (b) adaptation for target error  1 %; | numerical
solution; - - ANN prediction. . . . . . . . . . . . . . . . . . . . . . . 110
7.3 Result
of using a 2-4-1 ANN as an iterated map. i is the time index;
y i is the output. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
7.4 Simultaneous optimization criteria. . . . . . . . . . . . . . . . . . . 114
a set point. . . . . . . . . . . . . . . . 115
7.5 Response to change in the Tout
7.6 Response to water-side disturbance. . . . . . . . . . . . . . . . . . . 118
7.7 Response to air-side disturbance; gradual reduction of the inlet air
area. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
7.8 Response to air-side disturbance; sudden reduction of the inlet air area.120
7.9 Energy consumption surface E (va ; m_ w ). . . . . . . . . . . . . . . . . 122
7.10 Application of energy minimization routine. . . . . . . . . . . . . . 123
+1

ix

8.1
8.2
8.3
8.4
8.5
8.6
8.7
8.8
8.9
8.10
8.11
8.12
8.13

PID controller acting on a system with delay. . . . . . . . . . . . .


E ect of increasing delay with constant proportional gain. Kp = 3. .
E ect of increasing proportional gain with constant delay. = 0:2. .
System response to on-o control without delay. . . . . . . . . . . .
System response to on-o control with delay. . . . . . . . . . . . . .
E ect of delay. (a) amplitude vs. delay; (b) period vs. delay. . . . .
Model predictive control using ANNs. | ANN model with on-o
control; - - conventional on-o control. . . . . . . . . . . . . . . . .
Proportional control with di erent gains. (a) Kp = 0:033; (b) Kp =
0:1; (c) Kp = 20. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Slopes of temperature vs. time for di erent values of air speed. - cooling process; | heating process. . . . . . . . . . . . . . . . . . .
Comparison between experiments and simulations. 4 experiments;
-o- model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Measured value of the delay. -4- heating; -o- cooling. . . . . . . . .
Comparison of on-o control schemes. - - conventional control; |
control with ANN model. . . . . . . . . . . . . . . . . . . . . . . . .
Opening and closing of valve
for on o control. - - nondimensional
a
m_ w ; | nondimensional Tout . . . . . . . . . . . . . . . . . . . . . .

126
129
130
131
132
133
135
136
139
140
142
144
145

ACKNOWLEDGEMENTS
I would like to express my most sincere gratitude to my advisor Dr. Mihir Sen for
his direction of this dissertation. His interest in the academic as well as the personal
aspects of my training during my doctoral studies has helped me to nd knowledge,
attitude towards life, and friendship.
I would also like to express my gratitude to my co-advisor Dr. K. T. Yang for his
valuable contribution during the development of this work. I want to thank Dr.
Robert Nelson and Dr. Steven Skaar for their interest in my research.
Many thanks to Rod McClain and Kevin Peters for their constant assistance with
all the aspects of the setup of the experimental facility.
I also want to give thanks to Kathy and all the members of my family for their love,
support and encouragement during this time. I also thank Kathy's parents for all
their good wishes.
I want to thank my friends here at Notre Dame, the ones that remain here and the
ones that have already left, for making this period such an extraordinary experience
in my life.
Finally, I would like to acknowledge the nancial support of BRDG-TNDR and the
Organization of American States for the development of this dissertation.

xi

NOMENCLATURE
A
a
Ai ; Ao
C
c
D
E
e
F

F
f
f (t)
g
g (x)
h
I
i

(i; j )
J
Kp
k

transverse area for conduction [m ]


parameter of the analytical model
inner and outer heat transfer areas [m ]
ANN controller
speci c heat [J/kg K]
tube inner diameter [m]
power consumed [kW]
error
robustness lter
mapping function
function for model of plant
time dependent forcing function
function for controller
activation function
heat transfer coecient [W/m K]
integral control
discrete time index
j th node of ith layer
Jacobian matrix of linearized map
proportional gain
thermal conduction coecient [W/mK]
2

xii

L
m_
mi
m
M
M
M
M1
M2
n
n
n
N

Nu
P
P

Pr
Q_
Q_ ANN
Q_ cor
q
Ri
R
r

Re
tj

length of duct [m]


mass ow rate [kg/s]
number of nodes in ith layer
number of components for control variable
total number of runs in Chapter 3
ANN model of the plant in Chapter 5 and 7
mass of the lumped model in Chapter 8
number of training runs
number of test runs
total number of ANN layers in Chapter 3
order of the ANN approximation in Chapter 4
number of components for controlled variable in Chapter 6
total number of cycles for training
Nusselt number
perimeter of duct in Chapter 3 [m]
real process or plant in Chapter 4
Prandtl number
heat transfer rate between uids [W]
heat transfer rate predicted by ANN [W]
heat transfer rate predicted by power-law correlations [W]
nondimensional heat transfer rate
_ Q_ ANN for run i
= Q=
average of Ri over all test runs
spectral radius of Jacobian matrix
Reynolds number
known target output at node (n; j )
xiii

t
T
Tref
T1
U
U
u

u
V
v
k;l
wi;j

wi;jk;l
x0
xi;j
x(t)
x
yi;j
y
y

time [s]
time step [s]
temperature [ C]
reference temperature [ C]
Temperature after steady-state is reached
overall heat transfer coecient in Chapter 3 [W/m K]
ow velocity in Chapter 6
components of the map
mapping vector
average velocity of uid [m/s]
air speed
synaptic weight between nodes (i; j ) and (k; l)
correction to weight wi;jk;l
initial condition
input to node (i; j )
variable in di erential equation
control variable
output from node (i; j )
controlled variable
reference value of controlled variable
2

Greek symbols

i;j



delay
error for node (i; j )
n eciency in Chapter 3
relaxation parameter in Chapter 6
xiv



k
k

i;j




d
i



learning rate in Chapter 3


eigenvalue in Chapter 8
= @f=uik
= @g=uik
kinematic viscosity of uid [m /s]
bias of node (i; j )
nondimensional temperature
standard deviation over all runs
adjustable constant in Chapter 3
nondimensional time in Chapter 8
derivative controller time constant
integral controller time constant
nondimensional time step
2

Subscripts and superscripts


1
2
a
c
h
in
l
on
o
out
u

maxinum value of 
minimum value of 
air side
cold uid
hot uid
inlet
lower bound of dead band
on for on-o control
o for on-o control
outlet
upper bound of dead band
xv

w
wall

water side
wall

xvi

CHAPTER 1
INTRODUCTION
Heat exchangers, HXs, are common devices used to transfer heat between di erent
uids. Although there is a large amount of information about their steady state
behavior, it was not until the last decade that dynamic models started to appear in
the literature. Because HXs have a combination of complex geometry and nonlinear
dynamic behavior, most of the models that are available rely on assumptions and
simpli cations that disagree with the real conditions of operation. Even for steadystate predictions some assumptions such as constant property values, constant heat
transfer coecient, and similarity conditions, a ect the prediction of HXs with
errors that can be as large as 25%. If the nal purpose of a designer is to predict
and control accurately a thermal component such as a HX, a more precise model is
de nitely needed.
Arti cial neural networks, ANNs, have been studied intensively for a few decades
and have provided an option for modeling complex systems. Their ability to identify
and simulate the steady state and dynamic behavior of systems has also been used
as a tool for approaching control problems. Some applications of ANNs include
modeling of the behavior of HXs and some work has also been done to control
these devices using ANNs as a model for the physical plant. ANNs have excellent
characteristics for simulating complex physical behavior. It is possible to train
them to predict steady-state and dynamic behaviors. Thus, it seems reasonable to
1

apply them to HXs to analyze their behavior accurately and possibly use them as
controllers of complex thermal components.
Very easily found in nature, delay e ects are an important issue in thermal
systems. Since it is not easy to locate sensors inside heat exchangers, or close to
combustion chambers, and in many systems there is a thermal inertia a ecting the
measurements of air speeds and temperature, delay e ects are to be considered in
the simulation are control of physical systems. The e ects of delay in a controlled
thermal system can go from reduced levels of performance to actual instability of
the closed loop system depending on the control scheme being used.
The idea of this work is to use ANNs to simulate the components for which
there is no accurate analytic model due to the complexity of the physics involved.
The presence and e ects of di erent phenomena such as aging, delay, nonlinearities,
and thermal inertia are to be considered to build a model that is robust and also
has adaptive characteristics that can reduce the actual errors in the prediction and
control of thermal systems.
The following literature review is divided into four topics that are relevant to
our discussion. The cited references relate to simulation of HXs, control of HXs,
ANNs and thermal components, and e ect of delay in thermal systems.
1.1 Simulation of heat exchangers
Most of the information available for HXs relates to the experimentally obtained
overall heat transfer coecient (Kakac et al., 1981; Ros et al., 1995) or their experimentally measured dynamic behavior (Alcock et al., 1997; Gauthier et al., 1992).
Many of the models used to describe the dynamics of heat exchangers rely on
assumptions that oversimplify the problem so that some of the physics are not
considered (Cohen and Johnson, 1956; Mozley, 1956; Lees and Hougen, 1956; Thal2

Larsen, 1960). Our main concern is related to the HVAC industry, and we will use
the example of the n-tube water to air type. There are di erent approaches for
modeling this kind of heat exchanger. Some analytical models neglect the e ect
of the heat conduction through the ns (Gartner and Harrison, 1965); others, consider nite di erences with small values of the heat capacity of the solid wall, or
central di erences with a large value of the same quantity (Yamashita et al., 1978).
Some authors use the Laplace transform to obtain the two-dimensional transient
temperature distributions of the core wall and both uids (Spiga and Spiga, 1987;
Spiga and Spiga, 1988; Spiga and Spiga, 1992). Also, the use of a method in which
the heat exchanger is divided into small, geometrically simple parts, called basic
elements, is used by Kabelac (1989).
1.2 Control of thermal systems
The control problem for this kind of equipment has been approached at di erent
levels. Assuming the dynamic behavior of a heat exchanger as a linear system,
PID controllers have been designed for controlling it (Famularo, 1987; Buonopane,
1991; Yang et al., 1995; Taylor, 1996; Luyben and Luyben, 1997). More elaborate
controllers such as an approximate linearizing feedback with an observer-based uncertainty estimator have been proposed (Alvarez-Ramirez et al., 1997). Feedback
linearization has also been applied by Rahman and Devanathan (1995). Chen et al.
(1999) used an adaptive single neuron to control a nonlinear and open-loop unstable
model of a continuous stirred tank reactor.
1.3 Arti cial neural networks and thermal systems
It is known that feedforward arti cial neural networks can approximate continuous
functions, up to a desired degree of accuracy, if they include nonlinear activation
3

functions (Yoshifusa, 1995). After the appearance of suitable learning algorithms


(Rumelhart et al., 1986), ANNs became a growing area of research that has covered
di erent aspects of system identi cation, pattern recognition, simulation and control
(Haykin, 1994; Skapura, 1996; Warwick et al., 1992; Irwin et al., 1995; Narendra
and Parthasarathy, 1990; Hunt et at., 1992; Psichogios and Ungar, 1991; Miller
et al., 1990; Werner, 1996). Thermal systems have also been studied with this
technique; for instance, the simulation of steady state problems in heat exchangers
cover the prediction of the heat transfer coecient (Jambunathan et al., 1996),
Nusselt number (Thibault and Grandjean, 1991), or heat transfer rates (Daz et
al., 1996; Pacheco-Vega et al., 2000). Also, the design of di erent kinds of thermal
equipment has been approached by Lavric et al. (1994) and Lavric et al. (1995).
Bittanti and Piroddi (1997) applied ANNs for simulating the behavior of a liquidsaturated steam heat exchanger and they also implemented a neural controller for
this equipment.
There is some work related to HVAC systems and ANNs; for example, some
authors have studied building energy consumption (Kreider et al., 1995), some
others have determined the delay time for a HVAC system subject to a control
action in the form of a step function (Huang, 1994), and others have applied neural
networks for the identi cation and control of particular cases of HVAC or hydronic
systems (Ahmed et al., 1996; Ding and Wong, 1990; Kawashima et al., 1996; Curtiss
et al., 1996).
1.4 Delay e ects in dynamical systems
There is an extensive literature of delay in dynamical systems. Delay di erential
equations are a part of an area called functional di erential equations. Functional
di erential equations are di erential equations in which the dependent variable and
4

its derivatives are evaluated at di erent values of the independent variable (Hale
and Lunel, 1993).
There are mathematical aspects of delay equations, such as stability and chaotic
behavior (Hale and Sternberg, 1988), that are of interest in practical applications.
Delay equations have been used in a variety of di erent elds, such as biomedical engineering (Cavalanti and Belardinelli, 1996; Courtemanche et al., 1996) and
economics (Bogataj and Cibej, 1994). However, the literature contains few applications to thermal systems. One exception is in the area of heat exchangers that
have been studied by Gorecki et al. (1989) and Huang et al. (1991), among others.
Zhang and Nelson (1992) also modeled the e ect of a variable-air-volume ventilating system on a building using delay, and Saman and Mahdi (1996) analyzed
pipe and uid temperature variations due to ow. There are several authors that
have analyzed the e ects of time delay in thermal systems and process control. In
the frequency domain formulation, the delay is expressed as an exponential term
(Harriot 1983; Rohrs et al., 1993). Shilling (1963) provides a concise description of
the delay e ects in process dynamics. Brogan (1974) presents the representation
of time delay in state space formulation and its extension to discrete time systems.
Finally, Ogunnaike and Ray (1994) provide a extensive explanation of the e ects
of delay in process control. Their chapter describes representations of delay such
as Pade approximations and it also provides examples of applications to thermal
systems.

CHAPTER 2
PROBLEM DESCRIPTION
One of the main goals of the Hydronics group at the University of Notre Dame
is the steady-state and dynamic simulation as well as the control of heating and
cooling coils. The current research involves analytical, numerical and experimental
work towards the better understanding of the physics involved in HXs, as well as the
improvement of the current prediction models for static and transient behavior. The
present chapter describes the diculties involved in the analysis of HXs from the
rst principles perspective, and it also refers to common practices such as the use of
correlations for obtaining heat transfer rates. The advantages and disadvantages of
correlations are stated and the possibility of improvement of the prediction of heat
transfer rates by means of arti cial neural networks is also discussed.
2.1 Use of the heat transfer coecient
The steady-state analysis of HXs is commonly performed using heat transfer correlations that rely on the prediction of the heat transfer coecient, h, obtained from
the Nusselt number as a function of the Reynolds and Prandtl numbers as well
as some correction factors that account for changes in the properties due to temperature variations. Thus, the use of the heat transfer coecient and its accurate
prediction is crucial for obtaining the corresponding values of heat transfer rate.
6

However, the use of h involves some assumptions that do not totally represent the
physics of the heating or cooling coils.
Let us examine a simpli ed model of a HX in which a plate separates the two
uids that are exchanging heat between each other as shown in Fig. 2.1.
Tc

Twc

Tw

Th

Figure 2.1. Simpli ed model of a heat exchanger.


The heat ux per unit of time can be obtained as follows
q_00 =

@T
k = hc (Twc
@y wall

Tc ) = hh (Th

Twh )

(2.1)

where hc and hh stand for the heat transfer coecients for the cold and hot uid,
respectively. The heat transfer coecient exists only if @T@y jwall is proportional to the
di erence between the wall and bulk temperature of each uid, as is shown in Eq.
2.1. Thus, a similarity condition between the temperature pro les has to be valid
to satisfy this statement. However, in an actual HX there are a number of physical
phenomena that work against the concept of similarity of temperature pro les. The
next section describes the conventional heat transfer analysis of a HX and presents
7

the reasons why many of the assumptions used to work with correlations are not
valid and reduce the accuracy of the heat transfer rate predictions.
2.2 Conventional heat exchanger analysis
As is found in the literature, the traditional method of obtaining values of the heat
transfer rate of a thermal component is by means of a correlation of the form:
Nu = F (Re; P r)

(2.2)
where Nu, Re, and P r are the Nusselt, Reynolds and Prandtl numbers respectively,
and F is a function. The form of the correlation can vary substantially, the power
law being one of the most common relations used, e.g.
Nu = aReb P rc

(2.3)
where a, b, and c are constants to be determined. Because the viscosity of many
uids vary signi cantly due to changes in temperature, it is common to add a
correction term to Eq. 2.3. Thus the expression becomes


 d
w

(2.4)
where  and w are the values of the viscosity of the uid evaluated at the bulk
and wall temperature, respectively, and d is another constant to be determined.
Finally the heat transfer rate is obtained using a relation of the form
Nu = aReb P rc

Q_ 00 = hT

(2.5)
where this heat transfer rate per unit of area may be local or global depending
on the correlation and the de nition of T that is being used. The heat transfer
coecient can be local or global.
8

There are many aws in this approach and some of the most relevant ones are
mentioned here. In this approach it is assumed that a similarity condition is valid for
the velocity and temperature pro les. Some of the reasons why this assumption is
not valid in a HX are: the existence of hydrodynamic and thermal entrance regions,
secondary ows in the tube bends, complex vortex structures in the neighborhood of
the tube- n junctions, heat conduction along tube walls, natural convection within
the tubes and between ns, temperature dependence of uid properties like the
viscosity. Strictly speaking there are far too many nondimensional uid, ow, thermal and geometrical parameters in the problem for correlations to be accurate.
Assuming relations between the Nusselt, Reynolds and Prandtl numbers only oversimpli es the problem so that the resulting predictions have a large uncertainty
which are not due to measurement error but to information compaction through
correlations. Correlations in terms of Reynolds and Prandtl numbers appear to
have the advantage that predictions can be easily made for uids other than those
used in the original experiments. The price for this is a lack of precision in the
predictions. There are several reasons for this. One is that any correlation chosen,
e.g. power-laws, will not accurately represent the actual phenomena due to the use
of limited number of parameters. Another is the uncertainty due to the property
variations with temperature which must be considered twice, once when obtaining
the correlations from experimental data and next when using them for predictions
for a particular application. This is an important source of error especially when
the uids used for the former are di erent from the latter.
Incropera and De Witt (1990) state that errors as large as 25% may be incurred
by using correlations. Most of this error is said to be due to experimental uncertainty in the measurements. In Section 2.3 we provide a comparison between the
heat transfer obtained numerically, i.e. with no experimental error, using constant
9

and temperature dependent properties. It is shown that even though there is no


experimental error involved, the traditional method of obtaining heat transfer rates
cannot predict the heat transfer rate, accurately.
2.3 Error introduced by bulk temperature
In this section we provide arguments that support the use of ANNs instead of the
standard method of correlating the Nusselt, Reynolds and Prandtl numbers. The
main idea is that obtaining the heat transfer rate, Q_ , out of a correlation in which
the values of the properties are evaluated at a certain average temperature, such
as the bulk or the lm temperature, introduces an error in the calculations. As in
general the correlations are obtained experimentally, the error obtained is considered
to be due to the uncertainty in the measurements. By means of a numerical code we
obtain values of Q_ for ow between two parallel plates. To obtain values of Q_ , we
set di erent values for the inlet and wall temperatures. The results show that if we
correlate the Nusselt number as a function of the Reynolds and Prandtl numbers,
we still obtain a signi cant error that is not due to experimental uncertainties.
A nite-di erence code was written in C-language to solve for the hydrodynamics
and the heat transfer rates between two parallel plates. The inlet temperature, Te,
is larger than the wall temperature, Twall . The code solves for the velocity and the
temperature elds considering two di erent cases, i.e., constant and temperature
dependent properties. A comparison between the results obtained by each approach
is performed. The simulation using constant values for the properties relates to the
use of a correlation in which the properties are evaluated at an average temperature.
The temperature dependent simulation relates to the real case in which properties
such as viscosity vary signi cantly with respect to temperature. The dimensions
of the 2D channel are 20 mm wide and 200 mm long as shown in Fig. 2.2. The
10

200 mm
y

20 mm

Figure 2.2. Channel used for numerical comparison.


uid considered is water. The Reynolds and Prandtl numbers at the entrance are
134 and 3.6, respectively. The inlet and the wall temperature are Te = 90C and
Twall = 10 C, respectively. The grid used has 20  100 nodes in the y and x
directions, respectively. The results of the numerical analysis show that after
running the code with the same initial conditions, the velocity pro les between the
two cases are slightly di erent. This can be observed in Fig. 2.3 for x = 2 mm.
Thus, the temperature pro les also di er slightly, a ecting the slope of temperature
with respect to y near the wall. As the heat transfer rate is obtained using
Q_ 00 = k

dT
dy

(2.6)

where the temperature gradient is evaluated at the wall, then any change in the
gradient of temperature will change the value of Q_ 00 obtained. Fig. 2.4 shows the
comparison of the ratios of heat transfer rates.
It can be seen on Fig. 2.4(a) that the local value of Q_ 00var =Q_ 00const is close to unity
when x is small and then decreases as x ! 1. Figure 2.4(b) shows the ratio
between heat transfer rates that are computed as follows
11

1.4
1.2

Velocity

1
0.8
0.6
0.4
0.2
0

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

y
1.4
1.2

Temperature

1
0.8
0.6
0.4
0.2
0

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

Figure 2.3. Nondimensional velocity and temperature pro les for x = 2 mm. -.constant properties; { temperature dependent.

12

1
0.9

Q
var (x)
Qconst
(x)

0.8
0.7
0.6
0.5
0.4
0.3

0.5

1.5

2
x

2.5

3.5 4
(a)

0.5

1.5

2
x

2.5

3.5

0.99

Q
var
Qconst

( (

0.98
0.97
0.96
0.95
0.94
0.93

(b)

Figure 2.4. Ratio between heat transfer rates. (a) local values; (b) average values.

13

Q_ 00var
Q_ 00const

_ ()
_ ()

R x 00
1
xR 0 Qvar  d
x 00
1
x 0 Qconst  d

(2.7)

As was mentioned in the case of local heat transfer rates, the ratio of the average
values is also less than unity as x ! 1. This means that the heat transfer rate
is overpredicted by about 7 % with respect to its real value. The reason why the
local ratios of heat transfer rates at x > 2 are lower than 0.5 while the ratios of
average values are close to 0.93 is that at larger x values the local heat transfer
rates decrease considerably. Thus, their values might di er signi cantly but they
are still small. On the other hand, the contribution of the local heat transfer rates
for x > 2 to the average value of heat rates is small so that the ratio of the average
heat transfer rates is not in uenced much by these values.
Analyzing these results we can state that when we use some type of average
temperature to obtain values of Q_ from a correlation, we are evaluating the local
heat transfer rates with the same values of the properties and this introduces an
error that is not related to experimental uncertainty. Thus, we see that a large part
of the error involved in a heat transfer correlation is not due to the uncertainty of
the measurements but is due to the use of constant values of the properties in the
determination of Q_ 00.
On the other hand, we do not have to evaluate the properties of the uid when
we are working with ANNs. We just provide the values of the inputs to the network
that describe the process entirely and the ANN provides the result of heat transfer
rate. However, it is not straightforward to choose the inputs to the ANN, we need
to provide the variables that completely describe the process.

14

2.4 Dynamic prediction and control of a heat exchanger


The previous sections have concentrated in the steady-state analysis of HXs. In
these sections it was shown that many assumptions are usually made for obtaining
the predictions of the heat transfer rate of a heat exchanger.
The situation is even more complicated for dynamic simulations. As described in
Section 1.1 there are not many dynamic models for predicting the behavior of HXs
during transients. Most of the models currently available also rely in assumptions
that do not describe accurately the physics involved. Moreover, during the operation
of a HX there are e ects such as aging and fouling that modify the characteristics
of the HX with respect to time. Thus, the dynamic models have to be able to adapt
to the current characteristics of the thermal component.
This is an important issue if our purpose is to control the performance of a
HX. If the dynamic model is not accurate enough, the controller will not be able
to provide a satisfactory response of the thermal system. Moreover, if the model
of the thermal system does not capture accurately the physics involved, diculties
such as poor tracking and disturbance rejection or even instability can a ect the
behavior of the entire system.
Thus, the characteristics of the model and controller that we are seeking are
very demanding. In Section 2.6 we present the main goals and relevance of this
dissertation in the context of heat transfer, dynamical systems, control theory and
arti cial neural networks.
2.5 Experimental facility
The experiments were conducted in a variable-speed wind tunnel facility shown in
Fig. 2.5. It is also schematically shown in Fig. 2.6. Hot water and room-temperature
air were used as the in-tube and over-tube uids, respectively. The motion of the
15

Figure 2.5. Picture of the experimental facility.


air in the tunnel is due to a blower that is controlled by a variable speed drive that
can be operated manually or automatically from a personal computer. There is a
honeycomb upstream and another downstream of the heat exchanger to straighten
the ow. A PID-controlled electrical resistance heater raises the water temperature. The water ow rate is measured by a turbine ow meter. Type T isolated
thermocouples are used for sensing the air and water temperature. Because the
inlet air is close to the room temperature, only one thermocouple is used for this
purpose, while the average reading of ve thermocouples is used for the outlet air
temperature. The air speed is measured using a Pitot tube, located upstream of the
heat exchanger, that is connected to a di erential pressure transducer. A computerized data acquisition system collects the experimental data. The data acquisition
board can obtain measurements of up to 16 di erent channels, simultaneously. The
data acquisition board receives information about inlet and outlet temperatures of
16

both the air and water side, the mass ow rate of water, the air speed and the
time at which the measurements were taken. This information can be stored in
a le de ned by the user. We use a nominal 18 in.  24 in. type T water coil
single-row water-to-air n-tube heat exchanger manufactured by Trane. It has a
single water-side circuit which goes back and forth twelve times across the face of
the heat exchanger. The water ow rate is modi ed by an electronic valve so that
the percentage of opening can be controlled as desired from a personal computer.
LabVIEW is used to acquire and send data to the experimental system and an
interface built in C language, performs the desired control action.
2.6 Objectives of this dissertation
Research that involve interdisciplinary areas is becoming essential for the development and improvement of new and existing technologies. The analysis provided in
the previous sections allows us to recognize some areas of the heat transfer theory
in which new developments and applications can be accomplished by using techniques that belong to other areas of research. Steady-state and dynamic prediction
of compact heat exchangers as well as their control are de nitively some areas in
which improvement can be achieved with respect to the conventional techniques.
The aim of this work is to provide a new method of prediction of heat transfer
rates for HXs that can be used for steady-state and dynamic simulations and even for
control purposes, improving at the same time, the accuracy of the prediction with a
computational time for which on-line adaptation and control of the thermal system
can still be achieved. Arti cial neural networks are used to address these objectives.
The advantages and disadvantages of this methodology for its application to thermal
systems are also provided.
17

The relevance of this project is that it will provide the thermal systems designer
with a new tool for predicting HX behavior more accurately, simplifying the information compression problem, providing also adaptive characteristics to the model
that can be easily inserted in a closed-loop control scheme.

18

(a)

Tin

mw

Tin

Tout

ma

Tout

(b)

Figure 2.6. Experimental setup. (a) wind tunnel; (b) heat exchanger.

19

CHAPTER 3
STEADY-STATE SIMULATION
In Chapter 2, the motivation of this dissertation was introduced. One of the aspects
mentioned was that the steady-state prediction of HXs currently lacks accuracy
mainly due to the use of correlations that are based in assumptions that are not
always realistic. This chapter addresses one of the objectives of this project, i.e. the
application of ANNs to the prediction of steady-state heat transfer rates in thermal
systems.
In the design of thermal systems, predicting the heat transfer rate of heat exchangers under prescribed operating conditions is necessary. For a given device
exchanging heat between two uids, the heat transfer rate depends on the ow
rates and the inlet temperatures of each uid. Currently, most calculations are
done on the basis of manufacturers' data for speci c uids that give the heat transfer rate as a function of the two ow rates and the two inlet temperatures. This
is a four-variable function and dicult to represent completely. In principle the
functional relation depends on the geometry of the heat exchanger, the materials
with which it is made, the surface conditions, the uids used, etc. The relationship
completely characterizes the heat exchanger and is the information that must be
transferred in some form from the manufacturer to the design engineer.
It would be advantageous to be able to compress the information in the heat
transfer rate function from which it can later be accurately recovered. For instance,
20

if the internal and external heat transfer coecients are provided, the heat transfer
for any ow rate, inlet temperature, or uid can be easily determined. The situation
is complicated by the fact that the heat transfer coecients vary considerably with
ow rates and uid properties. Dimensional analysis can reduce the number of
variables to the internal and external Nusselt (or Stanton) numbers as functions
of the corresponding Reynolds and Prandtl numbers. If such correlations could
be determined from experimental measurements, an acceptable procedure could be
devised. In practice, without accurate tube wall temperature measurements, it is
dicult to separate the experimentally determined overall thermal resistance into
its internal and external components. Furthermore, property variations, especially
the variation of liquid viscosity, make any correlation obtained highly dependent on
uid temperatures. Procedures that take this variation into account, become very
complex and potentially lose generality. In any case the user of the information,
the system designer, is usually interested only in the heat transfer rate, and not
in intermediate variables such as the heat transfer coecients. For this purpose a
straightforward interpolation of the original experimental data would probably be
more useful, but would be inconvenient.
The arti cial neural network technique o ers an alternative approach to the
problem of information compression for heat exchangers. It is a procedure that
is usually used for predicting the response of a physical system that cannot be
easily modeled mathematically. The network is rst \trained" by experimentally
obtained input-output sets of data, after which it can be used for prediction. The
manufacturer can train a network using the experimental data; the constants or
parameters of the trained network can then be transferred to the user who can
calculate the performance of the heat exchanger under any other ow rate or inlet
temperature conditions.
21

The goal of the present chapter is to represent heat exchangers using ANNs.
The procedure used to set up and train the network is described rst. Then a series
of problems of increasing complexity are formulated to facilitate understanding.
These problems are: one-dimensional conduction, convection with one heat transfer
coecient, convection with two heat transfer coecients, and single-row n-tube
heat exchanger. Arti cial data bases are generated for the rst three problems.
Finally, an experimental data base will be used for the fourth problem and the
results of the ANN analysis are presented. The contents of this chapter have been
published in Daz et al. (1999).
3.1 Arti cial neural networks analysis
An ANN, schematically shown in Figure 3.1, consists of a series of layers, each with
a number of nodes. The rst and last layers are the input and output layers, respectively. In a fully connected network, all nodes are connected to all nodes of the
previous and following layers; this is typical of networks that use the backpropagation algorithm even though there are more general ways of connecting the nodes
between the di erent layers.
For the present study a network program was written in FORTRAN 77 using
a feedforward con guration and the backpropagation algorithm for adjustment of
weights, both standard techniques (Haykin, 1994). Here we will provide a very brief
description of the procedure. We will assume that available data consist of M runs.
Of these M will be used for training and M for testing as explained below. Each
run is a single experiment providing a number of values of the physical variables for
that run; these may be, for example, the inlet and outlet temperatures, ow rates
and heat transfer rate.
1

22

node number
#
- Hv w ;; j=1
A@HH w ;
A@ HH;
- v AA@@ wHj;;
j=2
A @
- v AA @R
j=3
A w ;;
A
...
A
AA
U
v
j = li
21
11

12
11

13
11

14
11

layer number !

i=1

A@HH
A@ HH
j
v AA@@ H
A @
A @R
v
AA
A
...
A
AA
U
vH

-* v 

 


 v 
 v 

...




v -

i=2

i=n

Figure 3.1. Arti cial neural network.


3.1.1 Normalization
We normalize all physical variables used by the ANN to con ne them between
certain limits. Depending on the type of activation function used, the normalization
can result in a range [ 1; 1] or [0; 1]. For the sigmoid activation function it is the
latter; however, because it is dicult to reach the extremes, one usually normalizes
the data in the range [0.15,0.85].
3.1.2 Network con guration
Choices must be made regarding the number of hidden layers and the number of
nodes in each layer of the ANN. Some authors (see, for example, Thibault and
Grandjean, 1991) present studies of the e ect of varying these parameters. There
are also techniques, such as evolutionary programming (Angeline et al., 1994), that
can be used to optimize con gurations. Here we will simply choose di erent con gurations and analyze their e ect.
23

3.1.3 Feedforward
We introduce the following notation: (i; j ) is the j th node in the ith layer, xi;j is
its input, yi;j is its output, i;j is its bias, and wii;j ;k is the synaptic weight between
nodes (i 1; k) and (i; j ). The total number of layers, including input and output
layers, is n, and the number of nodes in the ith layer is mi . The input information
is propagated forward through the network; m values enter the network and mn
leave.
The relation between the output of node (i 1; k) in one layer and the input of
node (i; j ) in the following layer is
1

xi;j = i;j +

m
i 1
X
k=1

wii;j1;k yi

;k

(3.1)

Furthermore, the relation between the input and output of the same node (i; j ) is
yi;j = g (xi;j )

(3.2)

where g(x) is called the activation function. A commonly-used activation function


is the sigmoid
1
(3.3)
g (x) =
1+e x

the only exception being in the rst layer where g(x) = x. There are other forms
of the sigmoidal function that can be used, one of the most general being
1
g (x) =
(3.4)
1 + e x=
Skapura (1996) presents a description of the di erent formulations of the sigmoid
function and also shows other activation functions that can also be used.
3.1.4 Backpropagation
Training of the network consists of changing the weights until the output values
di er little from known target values. This is done here through a backpropagation
24

method described by Rumelhart et al. (1986). First, for a sigmoidal activation


function the error is quanti ed at the output layer by
n;j = (tj

yn;j ) yn;j

(1

yn;j )

(3.5)

where tj is the target output for the node (n; j ). After calculating all the n;j we
move back to the (n 1)th layer. Here we do not have a target output to compare
with, so the error is de ned for the nodes in this layer as
n

;j = yn

;j

(1

yn

;j )

mn
X
l=1

n;l wnn;l 1;j

(3.6)

Having computed the errors for all the nodes of the (n 1)th layer, we move back
to the (n 2)th layer using an expression similar to the above, and so forth all the
way to the second.
Now that we have all the values of i;j , we compute the change in the weights
and the bias using
wii;j ;k =
i;j =
1

 i;j yi
 i;j

;k

(3.7)
(3.8)

where  is the learning rate that is used to scale down the degree of change made
to the connections. The larger the learning rate, the faster the net will learn, but
the chances of the ANN being unable to reach the desired output are also greater.
For the current work we have chosen a value of  = 0:4 which appears to work well.
At the end of one cycle of the backpropagation procedure we have, on using the
corrections above, an updated set of values of the weights. We train the network
for as many cycles as we need to obtain the target error that ts our needs.
3.1.5 Training
Of the total number of runs, M are used for training. We nd that it is best if
these data contain the minimum and the maximum of the entire data base. To
1

25

begin we assign starting values to the weights and to the biases. These values may
be either positive or negative and, in general, are taken to be less than unity in
absolute value. The backpropagation algorithm (Rumelhart et al., 1986) is applied
to this set of training data for adjusting the values of the weights and biases. In
order to stop the process of training the network, a certain criterion must be chosen
for which we use the percentage error between the heat rate predicted by the ANN,
Q_ ANN , and the one supplied by the training set of data, Q_ . This means that we
need to convert from the normalized output of the network to the actual values of
heat transfer rate with its corresponding units.
For quanti cation purposes, we de ne
Q_
(3.9)
Ri = _
QANN
for i = 1; : : : ; M , where Q_ is the dimensional heat rate obtained experimentally or
by means of a known relation, and Q_ ANN is the dimensional heat rate predicted by
the ANN. With this de nition in mind, we can also write the standard deviation of
Ri as
v
u M1
uX (Ri R)
=t
(3.10)
1

i=1

M1

where R is the average of Ri over all the runs used for training.  is also useful as
a measure of convergence.
We analyze the network 4-5-5-1 (four layers with 4, 5, 5, and 1 nodes respectively) as a typical con guration. The di erent starting conditions for the weights
and biases were obtained in a random fashion. Figure 3.2 shows  as a function
of the number of training cycles N . Each curve is for a di erent set of starting
conditions. We observe that the starting conditions do not make much di erence
after about 50; 000 cycles, and that   N = approximately for large N . For this
reason we have assumed that a training period of 100; 000 cycles is adequate.
1 2

26

10

10

10

10

10

Figure 3.2. E ect of di erent starting conditions on the standard deviation for
con guration 4-5-5-1. For reference straight line A has slope of 1=2. The di erent
symbols correspond to di erent starting conditions.
We also compare di erent network con gurations, speci cally 4-5-1, 4-5-5-1, 45-5-5-1, and 4-4-1. Figure 3.3 shows that the rst three behave in a similar way,
while 4-4-1 learns up to a certain point after which  remains almost constant.
Calculations were also performed with 4-1-1, 4-2-1 and 4-3-1, but the results showed
that they had the same trend as 4-4-1, but with  leveling o at higher values.
It is important to mention that the nal weights obtained after training are not
unique and di erent starting values of the weights may lead to di erent outcomes.
One of the most common ways of initializing the weights for the ANN is to assign
27

10

4-5-5-1

4-4-1
4-5-5-5-1
4-5-1

10

10

10

10

Figure 3.3. Variation of the standard deviation for di erent network con gurations.
them small random values. This does not guarantee that the backpropagation
method will converge to the values of the weights for which  is a global minimum.
Also, the network may take a long time to reach the desired level of error because the
initial distribution of weights might be very di erent from the nal one. Wessels and
Barnard (1992), Drago and Ridella (1992) and Lehtokangas et al. (1995) present
other methods for determining an initial distribution of the values of the weights so
that the network converges faster and avoids local minima.

28

100
90
80

ANN
Numerical

70
60

50
40
30
20
10
0
0

10

Figure 3.4. Simulation of y = x .


2

3.1.6 Testing
Of the total data set, M runs are used for testing. Testing consists of using the
ANN with weights and biases found from the training process and then trying them
out with the test data. The results can be shown as plots of Q_ ANN vs. Q_ as well as
the ratio of heat rates Ri vs. the run number i.
2

3.2 System identi cation: algebraic equations


This section shows the results of using ANNs to model a simple algebraic function.
It helps us to check out the accuracy of ANN simulations, and the correctness of
the code. Fig. 3.4 presents the results obtained for the function y = x . We rst
train the ANN by supplying a series of values of x and y to it, which correspond to
the relation given by the governing equation. Then the ANN is used to predict y
for di erent values of x. The exact and the predicted curves are both shown in the
gure.
2

29

3.3 Heat transfer rate using arti cial neural networks


3.3.1 One-dimensional conduction
This is the simplest heat transfer problem possible by which we attempt an identi cation of the network constants with variables traditionally used in heat transfer.
The governing equation for one-dimensional conduction through a wall is
Q_ =

kA
T
L 1

T2

(3.11)

where Q_ is the heat transfer rate, k is the thermal conductivity, A is the transverse
area, L is the thickness of the wall, and T and T are the temperatures on either
side of it. If we take kA=L to be constant, we can think of the function Q_ (T ; T )
from equation (3.11) as representing a plane in three-dimensional space.
Since there are no nonlinearities present, we want to look rst at ANNs with
a linear activation function g(x). If we consider the simplest network of the form
2-1-1, we are able to write
1

Q_ = 3;1 + w23;;11 2;1 + w12;;11T1 + w12;;21 T2

(3.12)

Comparing equations (3.11) and (3.12), we get


3;1 + w23;;11 2;1
w23;;11 w12;;11
w23;;11 w12;;21

= 0
= kA
L
= kA
L

(3.13)
(3.14)
(3.15)

We see that the weights are not unique though there is a certain relationship between
them. Furthermore, on taking w ;; = 1, the weights w ;; and w ;; are related to the
system parameter kA=L.
We can also choose an ANN with more nodes and obtain similar results. For
example, a 2-2-1 network with a linear activation function also shows the same
31
21

21
11

30

21
12

behavior: the weights are nonunique and show physical signi cance for a special
case. The degrees of freedom for the choice of system constants, however, increase
with the size of the network. Indeed, the larger ANNs contain the smaller ones as
special cases but, for this linear problem, do no better in representing the function
Q_ (T ; T ).
We have been able to successfully use ANNs with linear activation functions
because Q_ (T ; T ) is a plane. Modi cation of the weights in such an ANN produce
rotation and/or translation of the plane. The function Q_ (T ; T ) is not a plane
if k = k(T ), and the activation function can no longer be linear for an accurate
representation of the surface.
As an example we can assume the thermal conductivity to be a linear function
of the temperature, so that
1

k(T ) = k0 + k1 (T

Tref )

(3.16)

where k and k are constants. Q_ (T ; T ) is then a quadratic function. It is found


that, even with quadratic activation functions, it is not possible to nd physical
meanings for the weights of the network. In fact, it is dicult to relate even the
constant k above with a tangible physical entity. For nonlinear problems, both the
thermal conductivity and the constants in the ANN take mathematical meanings
only. For this reason, in the following nonlinear problems we will use the sigmoid
activation function which works well with nonlinear problems, but will disregard
the question of physical meanings for the network constants.
0

3.3.2 Convection with one heat transfer coecient


We now consider the simplest forced convection problem of ow in a duct with
constant wall temperature. The heat transfer is controlled by a single parameter,
the convection heat transfer coecient between the uid and the wall h, which
31

essentially characterizes the heat transfer behavior of the duct. If we assume that h
does not vary along the length of the duct, we can obtain an analytical expression
for the heat transfer rate Q_ . An energy balance shows that
Q_ = mc
_ (Tin

Twall )

exp

hP L
mc
_

(3.17)

where Tin is the inlet temperature, Twall is the wall temperature, m_ is the mass ow
rate, c is the speci c heat, P is the cross-sectional perimeter of the duct, and L
is its length. We will assume that we run tests in which we vary only Tin, Twall ,
and m_ , the other parameters being held constant. Thus Q_ (Tin; Twall ; m_ ) is a curved
surface in four-dimensional space.
We generate an arti cial data base using equation (3.17) and known heat transfer
coecients for duct ow. For laminar ow the Nusselt number Nu = 3:66, and for
turbulent ow we use Dittus-Boelter correlation (Incropera and DeWitt, 1990)
Nu = 0:023 Re = Pr :
4 5

04

(3.18)

where Re and Pr are the Reynolds and Prandtl numbers respectively. The critical
Reynolds number for transition is taken to be 2300, the diameter of the duct is
0:05 m, and the uid properties are those of air. Data are generated in the range
230 < Re < 23044; for laminar ow M = 142 and M = 46, while for turbulent ow
M = 277 and M = 91 were chosen. The ANN is trained using these arti cial data
and then the predictions of the trained network are compared with the analytical
results. First we do the problem for laminar ow data alone, then for turbulent
ow alone, and nally for both cases combined. A con guration 3-5-5-1 is used
for which the inputs are the mass ow rate, the inlet temperature, and the wall
temperature; the output is the heat transfer rate. For laminar ow, Figure 3.5
shows the relationship between Q_ ANN and Q_ . It is found that, although there are
errors of about 6:81%, in general it is less than 2%. For turbulent ow, Figure 3.6
1

32

20
18
16

QANN

[W]

14
12
10
8
6
4
2
0
0

10

12

14

16

18

20

Q [W]

Figure 3.5. Laminar ow convection with one heat transfer coecient. Straight line
is Q_ ANN = Q_ .
shows a behavior that is very similar. There is only one run with an error larger
than 5:8%, but in general the error is less than 1:5%. Most of the larger errors are
for runs in which the heat transfer rate is small, making the percentage error large.
If we combine the two ow regimes and train the network, the results obtained are
worse as shown in Figure 3.7. Large errors are observed for low values of the heat
transfer rate. Good agreement is obtained, however, for turbulent ow with large
values of Q_ . Thus, this simple exercise shows that separating laminar and turbulent
ow data helps us to obtain better heat transfer predictions.

33

300

QANN [W]

250

200

150

100

50

0
0

50

100

150

200

250

300

Q [W]

Figure 3.6. Turbulent ow convection with one heat transfer coecient. Straight
line is Q_ ANN = Q_ .
3.3.3 Convection with two heat transfer coecients
We move closer to reality with forced convection in a duct with external ns and a
known outside temperature. There are two heat transfer coecients, one inside and
another outside the duct. The data for training the ANN and testing its predictions
are, for the moment, still generated arti cially. If water is the in-tube and air the
over-tube uid, the heat transfer rate is a function of four variables, i.e. the two
inlet temperatures Tinw and Tina , and the two mass ow rates m_ w and m_ a . Thus,
Q_ (Tinw ; Tina ; m_ w ; m_ a ) is a surface in ve-dimensional space.
34

300

QANN [W]

250

200

150

100

50

0
0

50

100

150

200

250

300

Q [W]

Figure 3.7. Combined laminar and turbulent ow with one heat transfer coecient.
Straight line is Q_ ANN = Q_ .
Taking the inner and outer heat transfer coecients, hi and ho respectively, to
be constant along the length of the heat exchanger tube, we can show that
Q_ = m_ w cw (Tinw

where

Tina

) 1 exp

1 = 1 + 1
UA
h A h A
o

i i

o o

UP L
m_ w cw



(3.19)
(3.20)

is the inner and Ao the outer heat transfer area, U is the overall heat transfer
coecient, P is the perimeter of the duct, L is its length, and  is the n eciency.
The heat transfer rate has been taken proportional to the di erence between the
local temperature of the water and Tina .
Ai

35

Arti cial data are generated by using the inner and outer power-law correlations
of Zhao (1995) for the same heat exchanger that will be analyzed in the following
section. These are
1

 Nua

= 0:1368 Rea: Pra= for 200 < Rea < 700


Nuw = 0:01854 Rew: Prw: for 800 < Rew < 4:5  10
0 585

0 752

(3.21)
(3.22)

1 3

03

where Pr is the Prandtl number; the Reynolds and Nusselt numbers are de ned as
Rea = Va ; Rew = Vw D ; Nua = hko ; Nuw = hkiD
a

(3.23)

is the average uid velocity,  is the uid kinematic viscosity, is the spacing
between ns, D is the tube inner diameter, and k is the uid thermal conductivity.
The values of the properties were taken to be constant.
The results obtained for the con guration 4-5-5-1, trained with M = 160 and
tested with M = 38, are presented in Figure 3.8. In this case, the inputs to the
ANN were Tinw ; Tina ; m_ w ; and m_ a ; the output was Q_ ANN . The maximum error is
1.25%, but for most of the data the error is within 0.7%. The average ratio of
heat transfer rates is R = 1:00062 with a standard deviation of  = 4:816  10 .
V

3.3.4 Single-row n-tube heat exchanger


Up to this point, we have applied ANNs to problems in which the training and
testing data were generated arti cially by means of smooth functions. One of the
strengths of ANNs is that they are able to nd characteristic patterns on a given set
of data. This is exactly what we need when dealing with experimental data in which
there are always measurement errors involved. A real heat exchanger, furthermore,
1 We

better.

have modi ed the constants obtained in that thesis slightly to t the experimental data

36

500
450
400

[W]

350

ANN

300
250
200
150
100
50
0
0

50

100

150

200

250

300

350

400

450

500

[W]

Figure 3.8. Two heat transfer coecients. Straight line is Q_ ANN = Q_ .


cannot be represented exactly by simpli ed correlations of the type used before.
Thus it is important to test ANNs with actual measurements.
(a) Experimental generation of data

The experimental facility utilized was described in Section 2.5 and is shown in
Fig. 2.6. Since the control capabilities were not needed, the C language/LabVIEW
interface was not used. A total of M = 259 runs were made of which M = 197
were for training and M = 62 for testing.
For purposes of analysis, the raw experimental data obtained are converted to
values for the mass ow rates, m_ a and m_ w , the inlet temperatures, Tina and Tinw , and
a and T w , for both uids. The heat transfer rate, Q_ , can
outlet temperatures, Tout
out
1

37

be determined from the measured temperatures by


Q_

= m_ w cw (Tinw
a
= m_ a ca (Tout

w )
Tout

Tina )

(3.24)
(3.25)

Since the air and water sides give slightly di erent Q_ (within 10%) an average value
is used.
Data from 75% of the runs are randomly selected for training the ANN. The
remaining 25% of the runs are used for testing the predictions of the trained network
using the weights determined during training. For testing, the network takes the
input variables m_ a , m_ w , Tina and Tinw and returns the corresponding heat transfer
rate Q_ ANN ; the actual experimental value Q_ is also known for these input variables.
(b) Analysis of data

As an example we rst choose the con guration 4-5-2-1-1. The input variables to
the network are m_ a , m_ w , Tina , and Tinw ; the output is Q_ ANN . To obtain a satisfactory
level of error in the prediction of the heat transfer rate, the algorithm needs to
perform several cycles to adjust the weights and biases. As mentioned before, it
was decided that a reasonable level of error is obtained by training the network
for 100; 000 cycles. In particular, this network lets us observe very clearly the
behavior of the error during the training period. Figure 3.9 shows the variation of
the maximum error with respect to the number of learning cycles for the training
data.
The performance of the trained network is evaluated by comparing its prediction
with the data set aside for testing. The average value of Ri is found to be R =
1:00212 with a standard deviation of  = 0:017 and a maximum error of 7:88%.
To examine the e ect of network con guration, we test 14 di erent con gurations
using the same sets of data for training and testing. The values of R and the
38

90
80
70
60
50
40
30
20
10
0
0
1

39

9
4

10
x 10

standard deviation  are shown in Table 3.1. The network con guration with R
closest to unity is 4-1-1-1, while 4-5-5-1 is the one with smallest . Thus we can
have at least two di erent criteria for the selection of an optimal con guration,
though in either case the error and the scatter are small. The con guration 4-1-1-1
has a much larger standard deviation with respect to the others so that instead of
choosing this network we will consider con guration 4-5-1-1, which has a value of R
that is also very close to unity but with a smaller standard deviation. We compare
the performance of 4-5-5-1 and 4-5-1-1 in more detail. Figure 3.10 shows Ri for
individual runs. Although, 4-5-1-1 has the second best R, it is observed that there
are some points in which the prediction di ers from the experiment by more than
14%. The 4-5-5-1 network, on the other hand, has errors con ned to less than 3.7%.

Figure 3.9. Maximum error as a function of the number of cycles for con guration
4-5-2-1-1.

Error [%]

Table 3.1. Comparison of heat transfer rates predicted by di erent con gurations.
Con guration
4-1-1
4-2-1
4-5-1
4-1-1-1
4-2-1-1
4-5-1-1
4-5-2-1
4-5-5-1
4-1-1-1-1
4-5-1-1-1
4-5-2-1-1
4-5-5-1-1
4-5-5-2-1
4-5-5-5-1

1.02373
0.98732
0.99796
1.00065
0.96579
1.00075
1.00400
1.00288
0.95743
0.99481
1.00212
1.00214
1.00397
1.00147

0.266
0.084
0.018
0.265
0.089
0.035
0.018
0.015
0.258
0.032
0.017
0.016
0.019
0.022

It is also observed that no matter how many layers the network has, the prediction has a large standard deviation if all hidden layers contain just one node.
Without considering these three cases of hidden layers with just one node, the different con gurations overpredict the heat transfer rates with an average error of
only 0.33%.
We can also study the e ect of the normalization used for the variables. Considering the network 4-5-5-1 which has the smallest standard deviation, a computation
using a di erent normalization range of [0:05; 0:95] was run. The number of cycles
used was the same as before, i.e. N = 100; 000. The results show that R = 1:00063
and  = 0:016, which can be compared to the values in Table 3.1. There is thus
only a 6.6% di erence in  on changing the normalization range. Once the network
has been trained for a given heat exchanger by the manufacturer, the information
can be transferred to the user as a set of weights and biases. Since a table for a
large con guration would occupy more space, we show, as an example, in Tables
3.2 and 3.3 this data in columnar form for the small con guration 4-2-1.
40

1.15

1.1

1.05

10

20

30

41

40

50

60

70

The description, training and operation of ANNs are available in many recent
texts (Haykin, 1994). Input and output data have to be supplied to the network
so that it can be trained by using an algorithm that can adjust its internal weights
and biases. It can be shown that multilayer networks are universal approximators
capable of approximating any measurable function to any desired degree of accuracy (Hornik, 1989; Tikhomirov, 1991). This statement has to be understood in
the context of approximation of functions of several variables by means of a superposition of functions of one variable. The existence of these functions of one

(c) Comparison with heat transfer correlations

The user can write a computer code that will read this data le and be able to
predict the performance of the device for any other ow rate or inlet temperature
within the range tested.

Figure 3.10. Ratio of heat transfer rates Ri for run i.  4-5-5-1; + 4-5-1-1.

0.85
0

0.9

0.95

Ri

Table 3.2. Values of the weights for con guration 4-2-1.


k;l
wi;j

i j k l

1 1 2 1 8.744
1 1 2 2 0.401
1 2 2 1 1.321
1 2 2 2 1.120
1 3 2 1 0.772
1 3 2 2 1.356
1 4 2 1 0.303
1 4 2 2 0.223
2 1 3 1 7.741
2 2 3 1 8.576
Table 3.3. Values of the biases for con guration 4-2-1.
i j

i;j

2 1
2 2
3 1

1.574
2.474
1.848

variable, or activation functions, has been proved mathematically, but there is no


systematic method for their construction. On the other hand, if we choose a priori
a certain type of activation function, such as sigmoidal functions, we are only able
to approximate a function of several variables with an error that depends on the
number of parameters of the ANN utilized. The error decreases following a power
law relation (Barron, 1993; Dingankar, 1999).
For our choice of activation functions, i.e. sigmoidal, the variables to and from
the ANN are normalized to be within a [0.15,0.85] range. The backpropagation
algorithm (Rumelhart et al., 1986) is one of the most common learning methods
used to train ANNs and it was used throughout this chapter.
In the steady state, the ANN predicts the heat rate under given conditions. The
steady state heat transfer rate, Q_ , was determined from the measured temperatures
in a similar way as in Section 3.3.4.
42

An ANN, shown schematically in Fig. 3.11(a), was trained with m_ a , m_ w , Tina


and Tinw as inputs and Q_ as output. Figure 3.11(b) shows a comparison between
the heat transfer rates obtained with the ANN, Q_ ANN , and those measured, Q_ .
Predictions obtained with a heat transfer correlation, Q_ cor , that was found earlier
for the same HX (Zhao, 1995) are also included. It is observed that the ANN
prediction is superior to the correlation.
3.4 Conclusions
The problem of prediction of heat-exchanger performance is one of transfer of manufacturer's test data to a designer in suitably compact form so as to be accurate
enough for calculations. There are many ways in which this can be done. For example, the information can be compressed as two heat transfer correlations, one for
the inside and another for the outside, as in equations (3.21) and (3.22); the other
extreme is to transfer the entire test data for interpolation. ANNs lie somewhere
in the middle; they have the accuracy comparable to the latter while the information being transferred consists only of the synaptic weights and nodal biases of the
trained network. A comparison between the ANN prediction, Q_ ANN , and that from
the correlations, Q_ cor , is shown in Figure 3.11. The network is seen to give better
predictions with a smaller scatter. The correlation was speci cally developed from
experimental data for this heat exchanger and the methodology utilized is given by
Zhao (1995).
The results of tests with arti cial data for both one and two heat transfer coecients appear to indicate that the ANNs work just as well as the governing equations
(3.17) and (3.19) themselves. However, there are assumptions that have been used
in deriving these equations which are not quite valid. The principal weakness is the
existence and constancy of heat transfer coecients. Existence of a heat transfer
43

ma
.

.
Q

mw
T ina
T inw

(a)

10000

[W]

9000
8000

Qcor

5000

ANN

6000

7000

4000
3000
2000
1000
0
0

1000

2000

3000

4000

5000

6000

7000

8000

9000

[W]

(b)

Figure 3.11. Steady-state predictions. (a) inputs and output; (b) comparison with
measurements; correlations; + ANN (4-5-5-1); dotted lines are 10% deviations.

44

coecient, as has been long known, depends on similarity in temperature pro les.
The heat transfer at a wall actually depends on the local temperature gradient at
the wall which will be proportional to the di erence between the temperature of the
wall and the bulk temperature of the uid if and only if the temperature pro les
are always similar. For a heat exchanger this has to hold for both uids and under
all conditions of ow rates and temperatures. Furthermore, the heat transfer coef cient, if it exists, has been assumed to be a constant along the length of the heat
exchanger tubes. There are several reasons why the above condition does not hold
for an actual heat exchanger. These reasons have been discussed in Section 2.2.
Under these circumstances the ANN approach is an attractive alternative. We
have shown that it works well for heat exchangers. We have shown this not only
for data arti cially generated from equations but also for experimental data from
a compact heat exchanger. The errors in prediction using a trained ANN are comparable to measurement errors. The precision is much better than from simpli ed
correlations and is comparable to direct transfer of the entire test data. It is also
seen that we can obtain the heat transfer rates directly from the information of the
mass ow rates and inlet temperatures instead of using them to obtain the heat
transfer coecients.
The usefulness of the ANN approach is that it basically allows us to predict
the behavior of a given heat exchanger without need for an accurate mathematical
model of the details of the process. With processes involved that cannot be modeled
exactly using rst principles, the ANN is an e ective means for the transfer of
information from the manufacturers' laboratory to the design engineer who would
like to use test data for application. All that would have to be transferred are
the weights and biases corresponding to a particular heat exchanger. The designer
simply reads these values into his or her own network and is quickly in a position to
45

make accurate predictions of the thermal behavior of the heat exchanger. However,
one of the advantages of a using a correlation is that with the use of Reynolds and
Prandtl numbers we can generalize easily for other kinds of uids, even though we
may have more scattering of the results.
The question of physical meaning of the weights and biases of the network has
also been addressed in this chapter. It was found that for the simplest heat transfer
problem possible, the values of the weights and biases of a simple network with linear
activation functions are related to each other and to the expression kA=L. For more
complex problems where the thermal conductivity is a function of the temperature,
higher order activation functions are needed to represent the nonlinear surface. For
these cases, it is found that there is no physical meaning related to the parameters
of the ANN.

46

CHAPTER 4
TIME-DEPENDENT SIMULATION
The previous chapter describes the application of ANNs to steady-state prediction
of heat transfer rates for compact HXs. Another objective of this work is to obtain
a dynamic model of the behavior of HXs during transients. This chapter deals with
the extension of the steady-state predictions using ANNs to the dynamic prediction
of HXs.
As was mentioned in Section 1.1, most simulations of heat exchangers and other
components of thermal systems have concentrated on their steady-state behaviors
for heat rate predictions which are required for system design. The dynamic response of these devices, however, is also very important if these devices are to be
controlled in any way. For example, a hot water heat exchanger may be required to
provide heated air at a pre-set temperature that does not change even though the
incoming air or the water may vary in either ow rate or temperature.
Heat exchangers are extremely complex devices for which the prediction of their
operation from rst principles is virtually impossible. There are a large number of
phenomena associated with ow and heat transfer that are perhaps simple to solve
singly, but when combined result in a system that is impossible to identify. Dynamic
predictions are, of course, harder and it was not until recently that dynamical models started to appear in the literature (Spiga and Spiga, 1992; Kabelac 1989; Roetzel
and Xuan, 1999). Most of them, in order to make the problem more tractable, rely
47

on assumptions and simpli cations that are not totally realistic (Thal-Larsen, 1960;
Gartner and Harrison, 1965; Yamashita et al. 1978). The results thus are qualitative rather that quantitatively exact. Some of the most common assumptions
are: lumped thermal conditions, constant uid properties, constant heat transfer
coecients, constant ow rates, complete transverse mixing in the ow, negligible heat conduction in the wall, negligible heat conduction through the ns, and
negligible heat capacity of the wall (Roetzel and Xuan, 1999). The models that
include more physics are usually in the form of partial di erential equations and
their time-dependent solutions are computationally intensive and are not suitable
for real time control purposes. Another diculty is that the performance of a typical HX slowly changes over time due to such factors as fouling that changes the
heat transfer characteristics of surfaces.
Arti cial neural networks have been used in recent years to avoid the problems
associated with deterministic approaches, and have been shown to approximate
nonlinear functions up to any desired level of accuracy (Hecht-Nielsen, 1987). They
are also less sensitive to noise and incomplete information than other approaches
such as empirical models and correlations. In recent years the technique has been
applied to many thermal problems (Sen and Yang, 2000), including the prediction of
the dynamic behavior of heat exchangers (Bittanti and Piroddi, 1997; Ayoubi, 1997;
Daz et al., 2000a). The advantage of using ANNs to simulate thermal processes is
that, after they are trained, they represent a quick and reliable way of predicting
their performance. They can also be continuously updated. Thus, if we apply this
technique to the problem of simulation and control of HXs, we obtain an accurate
prediction with a short computational time for the simulation which can be used in
an ecient real-time control scheme.
48

t
x(t)
f(t)
(a)

x(t-t)
x(t)
f(t)
(b)

Figure 4.1. Two training methods for dynamic problems.


4.1 Arti cial neural networks analysis: training
For control purposes, it is not enough to have steady-state predictions, since the
process is really time-dependent. It is thus of interest to extend the capabilities of
the ANN technique to dynamic simulations. This can be done in two di erent ways
as shown in Figs. 4.1. In the rst we train the ANN in the same way that we train
it for steady state problems, except that time t is included as an additional input
variable. The other method di ers with respect to the rst one in the fact that no
explicit information about time is provided to the network; the variables involved
in the problem are presented at time t t as an input to the network and the
output corresponds to the variables at time t. The capabilities of an ANN trained
for dynamic predictions purposes are illustrated in the next sections with analytic
and experimental examples.
49

4.2 System identi cation: analytical


Consider an initial value problem of the form
dx
+ g(x)
dt

= y(t)
x(0) = xI

(4.1)
(4.2)

where t is time, x is the unknown variable, and y(t) is a known forcing function.
Let us assume for the moment that y(t) is a step function, i.e. y(t) = 0 for
t < 0, and y(t) = yF for t  0. The solutions of equations (4.1) and (4.2) can be
simulated by using a combination of two ANNs, As and Ad. The rst one, As, is
trained to predict the initial and nal steady states, xI and xF , which are solutions
of
g(xI ) = 0
g(xF ) = yF

(4.3)
(4.4)

If we normalize the transient solution as


z(t) = xx(t) xxI
F
I

we have 0  z(t)  1. The second ANN, Ad, is trained to predict the transient
behavior of z(t) from 0 to 1. There are two di erent ways of handling time in
training an ANN for a dynamic problem:
(i) use t and xI as inputs and x(t) as the output, or
(ii) use x(t) as input, and x(t + t) a small interval later as the output.
Both are equivalent, but the second is much less computationally intensive, and
is hence more useful for practical applications.
We can show that this procedure can be applied to di erent types of linear and
nonlinear di erential equations.
50

4.2.1 First order linear equation

0.2

0.4

0.6

x_ + x = 0

0.8

1.2

1.4

1.6

1.8

(4.5)

with the initial condition x(0) = x . We supply 5 di erent exact solutions, train for
70,000 cycles and then use the method to predict another solution. The exact and
predicted solutions can be seen in Fig. 4.2 where they are practically indistinguishable.
8

1
0

4.2.2 Second order linear equation


x + 3x_ + x = 0

51

(4.6)

If the ANN procedure is to accurately simulate thermal systems, it should be


able to work with nonlinear equations also.

with the initial conditions x(0) = x and x_ (0) = x . We supply 15 di erent exact
solutions and train again for 70,000 cycles. The results of a prediction can be seen
in Fig. 4.3.
1

Figure 4.2. First order di erential equation. x_ + x = 0; x(0) = 7:5; | exact; - ANN (2-5-5-1).

x(t)

16

14

12

10

2
0

0.5

4.2.3 Nonlinear rst order equation


As an example we take

1.5

x_ + x2 = y (t)
0

52

2.5

with the initial condition x(0) = x .


We consider two cases:
(a) y(t) = 0: We provide 3 di erent known solutions and train for 5,000 cycles. The
results of a prediction can be seen in Fig. 4.4.
(b) y(t) is a step function with yF = 0:2: Fig. 4.5 shows the di erent stages in
the solution. Figure 4.5(a) is the numerical solution of the di erential equation for
di erent xI . Figure 4.5(b) shows xF as a function of xI , data that are used to train
As. Figure 4.5(c) is the same transient data as in Fig. 4.5(a), but as z(t); these data
are used to train Ad. Figure 4.5(d) provides a comparison between the numerical
solution and the one predicted by the trained networks.

(4.7)

Figure 4.3. Second order di erential equation. x + 3x_ + x = 0; x(0) = 16; x_ (0) =
20; | exact; - - ANN (3-5-5-1).

x(t)

1.2

1.1

0.9

0.8

0.7

0.6

0.5

0.4

0.3

0.2
0

0.5

1.5

53

2.5

3.5

So far we have only considered step forcing functions, though in reality we must be
able to predict the behavior of a nonlinear system for any general function. This is
achieved by breaking the function into small steps that follow the curve. Though
other approximations can be used, we have chosen the one which has the same area
below it as the actual function; an example is seen in Fig. 4.6.
With this in mind, the ANNs can be trained with small steps for the forcing
function y(t) of equation (4.7). Both positive and negative steps are included so
that any kind of behavior, either increasing or decreasing, can be simulated. Figure
4.7 shows the results of simulation for four di erent forcing functions. The results of
the ANN compare very well to the numerical solutions of the di erential equation.

4.2.4 Di erential equations with forcing functions

Figure 4.4. First order nonlinear di erential equation. x_ + x = 0; x(0) = 1:075; |


numerical; - - ANN (2-5-5-1).

x(t)

3.5

4.5
5

1.1

2.5

1.4

(a)

2.5
3

3.5
4

4.5
5

0.9

1.5

1.2

0.5

1.5

0.8

0.5 1

0.8

0.6

0.4
0.2
0

1
0.9

0.7

0.8

0.6

0.5

0.4

0.2

0.3

0.1
0

(c)

54

0.7

0.5

0.6

0.4
0

1.2

0.6

0.8

0.4

0.2
0
1.5

xI

(b)

2.5 3
3.5 4
4.5 5

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

0.5 1

(d)

The dynamic ANN developed in Section 4.2 is now used to predict the behavior of
the HX. The inputs to the network are m_ a , m_ w , Tina and Tinw and the outputs are
w and T a .
Tout
out
Due to experimental restrictions, we are able to change only the air ow rate,
the inlet water temperature by means of varying the fan speed and the heater

4.3.2 Dynamic simulations

The experimental setup is the same used for steady-state predictions and described
in Section 2.5. Time-dependent information regarding the air and water mass ow
rates, m_ a and m_ w respectively, the air and water inlet temperatures, Tina and Tinw
a and T w respectively,
respectively, and the air and water outlet temperatures, Tout
out
are stored.

4.3 System identi cation: experimental


4.3.1 Experimental setup

Figure 4.5. First order nonlinear di erential equation with forcing function. x_ +x =
y (t); x(0) = 0:5.

xF
x(t)

x(t)
z(t)

1.5

0.5

0.5

1.5

2.5

55

3.5

4.5

temperature setting, respectively. The ANN is trained with experimental data of


the system subject to small step functions in Tinw , and then the system behavior is
predicted by supplying a di erent change in Tinw .
Two di erent experiments are designed to test the ANN. In the rst one, we train
the network with step functions in m_ w and Tinw , simultaneously. This is achieved
by shutting down the inlet water ow rate while raising the temperature of the
mass of water owing through the heater. After a desired temperature has been
reached, we open the valve restoring the water ow rate through the HX. The rst
method described above for training networks is applied to make a prediction which
w curve is due
is compared with a measurement in Fig. 4.8. The rst dip in the Tout
to the presence of the mass of water that was located within the HX when the water
w is due to the same mass of water but
ow was shut down. The second dip in Tout
after going through one lap in the water circuit. As its initial temperature was close
to Tina , the heater is not able to raise its temperature to the desired value after only
one lap of the water circuit. However, good predictions are achieved for both the
water and air side of the HX.

Figure 4.6. Forcing function approximated by step functions.

1.5

0.5

y(t)

1.2

1.2

0.48

0.49

0.5

0.8

(a)

t 0.8

(c)

0.6

0.6

0.51

0.4

0.59

0.2

0.4

0.58
0.57
0.56
0.55

0.54

0.52

0.53

0.51
0.5

0.525
0.52
0.515
0.51

0.505

0.5

0.49

0.495

0.485
0.48
0.2

1.4

1.4

56

0.47

0.46

0.44

0.45
0.43
0.42
0.41
0

0.55

0.6
0.5
0.45
0.4

0.35

0.2

0.25

0.3

0.15
0.1
0

0.2

0.2

0.4

0.4

0.6

0.8

0.8

(b)

(d)

0.6
1

1.2

1.2

1.4

1.4

A second experiment is designed so that three of the four input variables for a
HX, i.e. the mass ow rates of water and air and the inlet air temperature, are
kept constant; the inlet water temperature is changed in small increments of 6 C
from 32C to 65C. To test the system, three di erent experiments with di erent
forcings are performed:
(i) The system is brought to 60C and then the heater is turned o .
(ii) An increasing Tinw is provided manually to approximate a ramp.
(iii) The mass ow rate of air is increased and then decreased to values greater or
lower than the one for which the network is trained.
As the information provided to the ANN has to be normalized, the utilization of
the rst training method imposes a restriction in the length of time of the processes
to be simulated. Thus, the second training method gives us more exibility and
therefore is used for the rest of the simulations in this work. One important aspect
that has to be considered when modeling the dynamics of a system is its order. We

tions: x_ + x2 = y(t). (a) y(t) = 0:5 + 0:2t; (b) y(t) = 0:5


y (t) = 0:2( 0:5 + t); and (d) y (t) = 0:4 sin(5t); | numerical; - - ANN.

Figure 4.7. First order nonlinear di erential equation with di erent forcing func0:2t; (c)

x(t)
x(t)

x(t)
x(t)

w
Tout
a

45

40

35

30

25

20

15

34

32

30

28

26

24

22
0

50

50

100

100

150

150

57

200

200

250

250

300

300

350

350

400

400

have to provide values of the relevant variables at previous instants in time. This
is because the ANN is simulating a di erential equation of unknown order. The
higher the order, the larger the number of previous instants for which information
must be provided as inputs. Enough past information at previous instants in time
that is appropriate for the actual order of the system must be provided, as shown in
Fig. 4.9(a) where n is the order of the system. This is experimentally veri ed in Fig.
a for increasing assumed order
4.9(b) which shows time-dependent predictions of Tout
of the system. In each experiment the air speed was decreased in ve small steps

Figure 4.8. ANN used for prediction of transient experimental data from a thermal
system. | experiment; - - ANN (4-5-5-2).

Tout

and then similarly increased in small steps. Both the experimental measurements
and the ANN predictions are shown; the temperature is in normalized units and
the time is in terms of the sample number s. The prediction is seen to improve as
we go from n = 1 to n = 2, but there is little observable di erence between n = 2
and n = 3. These measurements indicate that the order of the system, if one has to
choose an integer, is probably two and it is not necessary to assume a higher value.
The predictions, seen in Figs. 4.10 and 4.11, compare well with experiments for
the rst two. On the other hand, the results for a change in the air ow rate,
as shown in Fig. 4.12, indicate that the ANN has some diculties predicting the
behavior of the system, although it follows the general trend. This is because the
ANN was trained keeping m_ w constant and in this particular experiment its value
was modi ed.
4.4 Conclusions
Previous work demonstrated the usefulness of the arti cial neural network technique
for the prediction of the steady-state behavior of heat exchangers. In the present
chapter this technique is extended to the prediction of the dynamic behavior of a
thermal system which consists of a heat exchanger working between a closed hot
water and an open air loop. It is seen that ANNs are able to model analytical
and experimental dynamical systems. Numerical tests were presented to show that
ANNs can predict well the dynamics of linear and nonlinear di erential equations.
Also, two di erent training methods were described. Both training methods predicted transient behaviors accurately but the implicit time approach was chosen due
to the exibility that it gives to handle large values of the time variable. Due to
the excellent characteristics of generalization, the ANN predicted with a reasonable
level of error the disturbance provided to our experimental facility. ANNs prove to
58

x(t-t)
x(t-2t)

x(t)

x(t-nt)
f(t-t)
(a)
0.9

0.9

0.9

0.8

0.8

0.8

0.7

0.7

0.7

Experiments

0.6

Experiments

0.6

Experiments

Tout

0.6
0.5

0.5

0.5

0.4

0.4

0.4

0.3

0.3

0.3

0.2

0.2

0.2

0.1
0

ANN

ANN
100

200

n=1

300

0.1
400 0

ANN

100

200

n=2

300

0.1
400 0

100

200

300

s 400

n=3

(b)

Figure 4.9. Information at previous instants. (a) training a system of order n; (b)
a is normalized and s is the
response of HX treated as system of di erent orders; Tout
sample number.

59

65

60

55

Water outlet temperature


50

45

Experiments
ANN

Experiments
ANN

40

35

Air outlet temperature


30

25

100

200

300

400

500

Figure 4.10. ANN (3-5-5-2) prediction for a cooling process.

60

600

55

Water outlet temperature


50

Experiments
ANN
45

40

35

Air outlet temperature


Experiments
ANN

30

50

100

150

200

Figure 4.11. ANN (3-5-5-2) prediction for ramp function.

61

250

55

Water outlet temperature


50

Experiments
ANN
45

40

Experiments
ANN

35

Air outlet temperature


30

50

100

150

200

250

Figure 4.12. ANN (3-5-5-2) prediction for change in air mass ow rate.

62

be a powerful tool to obtain models of physical phenomena that are too complex to
model from rst principles using a relatively short computational time.

63

CHAPTER 5
CONTROL OF FLUID TEMPERATURE
We have analyzed so far the steady-state and dynamic simulation of HXs using
ANNs. The ultimate goal of this dissertation is to implement a controller that can
improve the performance of conventional controllers that are operating at conditions in which their performance is poor. This chapter introduces the concept of
neurocontrol and its application to thermal systems.
There are several schemes that have been proposed for the neural control of nonlinear systems (Gutierrez et. al, 1998; Narendra and Parthasarathy, 1990; Blazina
and Bolf, 1997; Jeanette et al., 1998). One of these is a method called internal
model control (IMC) (Hunt and Sbarbaro, 1991; Nahas et al., 1992; Abe et al.
1994). This technique has been used for a variety of problems in di erent areas
due to its excellent characteristics of robustness and stability (Morari and Za riou,
1989). The IMC technique using ANNs consists of training a network to learn the
dynamics of a process, after which another ANN is trained to learn the inverse dynamics so that it can be used as a nonlinear controller (Hunt and Sbarbaro, 1991;
Bath and Macavoy, 1990).
In this work, we use the combined advantages of ANNs and IMC to generate
an ecient real-time control scheme for a HX installed in a test facility. The HX
transfers heat from water to air, and the objective is to control a single output
variable, the outlet air temperature, by changing a single input variable, the air
64

speed. The system consists of the HX and the entire water- and air- ow subsystems.
The results of the neural control are compared with those of standard PI and PID
techniques. The contents of this chapter have been written up for publication in
Daz et al. (2000b).
5.1 Conventional control
The literature concerning conventional control systems applied to thermal problems
is very extensive. However, there are some techniques that have been predominantly
used in industrial problems due to the large experience and understanding of the
way that these techniques work in real problems. On-o control is a simple but
reliable control scheme but since it works within a dead band, it is not suitable for
accurate tracking of a reference value. Its use in industry is limited to the level of
precision needed. One of the most common control systems used in industry is the
proportional-integral-derivative, PID, control (Kiong et al., 1999). The objective of
this chapter is to apply this technique to our experimental facility so that we can
determine the advantages and disadvantages of its use.
5.1.1 PID control structure
Each part of a PID control can be applied individually to a certain problem. The
combination of the three types of control can be written as :
O(t) = Kp

Z t
de(t) 
1
e(t)dt + 
e(t) +

i

dt

(5.1)

where O(t) is the control output, e(t) is the error, Kp is the proportional constant,
i is the integral time constant and d is the derivative time constant.

65

5.1.2 Control variable selection


The di erent ways of applying a PID control action can be combined with the
a by
di erent control variables that can be used. In our case we want to modify Tout
modifying the air speed inside the wind tunnel. Thus, we can choose as our control
variable the voltage of the variable speed drive, V1, the voltage of the pressure
transducer, V2, the frequency of the variable speed drive, f , or the mass ow rate
inside the wind tunnel, m_ a . Therefore, we can write a matrix with all the possible
choices as is shown in Table 8.1.
Table 5.1. Types of control and controlling variables.
P I D P I P D DI P ID

V1
V2
f
m_ a
Each one of these variables will a ect the system in a di erent way. For instance
a change in V1 can be obtained in a very short time because it only depends on the
the output voltage on the D/A board. The same behavior can be obtained if we
use the frequency at the variable speed drive, but now we need a certain correlation
between f and V1. This may introduce a small error depending on how accurate
the correlation is. On the other hand if we choose to control the system with V2
then it is necessary to have a relationship between V2 and V1, because we still need
to generate an input to the variable speed drive. Unlike the relation between V1
and f , the correlation between V1 and V2 is going to be nonlinear, so that a larger
error can be introduced. Now if we decide to use m_ a as the control variable, we
need a calibration between the air speed of the air and the voltage at the pressure
66

transducer because we are still sensing the signal from this device. Moreover, we
need a correlation between V1 and m_ a . This may also introduce an error to the
controlled system. The main di erence between controlling with either V1 or f , or
with V2 or m_ a is that the rst two variables do not have a large inertia so that
they can be changed very fast simulating a step change. On the other hand, the air
owing through the wind tunnel has a certain inertia so that changes in V2 or m_ a
are going to be slower.
5.2 Application to an experimental facility
A conventional proportional-integral, PI, control is implemented as part of a LabVIEW code. This enables us to test the behavior of the system when controlled by
a well-known technique. It also allows us to nd the problems related to the use of
PI control. A PI control is also implemented as a C-language subroutine. This lets
us validate the C/LabVIEW code interface node, CIN, by comparing the results
with the ones obtained with LabVIEW subroutines. The tests were performed in
the heat exchanger test facility described in Section 2.5.
The control action was initially implemented as a proportional control law of
the form:
a
m_ a = K Tout

(5.2)

It was observed that an o set value was obtained with respect to the reference
temperature whenever a disturbance was introduced. This behavior is in agreement
with the theory. Thus, in order to obtain complete disturbance rejection, an integral
control law was added to the proportional one. The theory, computer simulations
and initial experimental tests show that the error between the desired temperature
and the measured one, e ! 0 as t ! 1, where t is time. A series of tests were
67

designed to test how well the system rejects disturbances in the variables that do
not appear explicitly in the model, i.e. m_ w , Tinw , wind tunnel intake area and Tina ,
respectively. A sample rate of 200 samples per second was selected and 100 samples
were taken and averaged every time. The D/A board used is capable of handling
voltages in the range [ 5; 5] volts, but only non-negative voltages were used. As the
variable speed drive that controls the fan rpm utilizes voltages in the range [0; 10]
volts, an ampli er that doubled the output voltage was connected between these
two devices. Eight di erent channels were recorded in a le that includes time, m_ w ,
the air speed, both inlet and outlet temperatures, and a reference temperature.
The rst test was related to disturbance rejection of the inlet water temperature.
The linear model was originally obtained by setting the water heater set point
at 110F, but then the set point was moved to 125F and then to 95F. It was
a was kept at the
noticed that the system adjusted the air speed such that Tout
desired temperature of 33C. A second test blocked three quarters of the air intake
area of the wind tunnel. The controller increased the frequency, and thus the air
speed, from 20.2 Hz to 22.4 Hz. Again the desired temperature was maintained at
33C.
A third test was conducted in which the objective was to induce a disturbance
in Tina . A heated plate was located at the inlet part of the wind tunnel. In order to
enhance the heat transfer rate a lattice was placed on the top of the heated plate
so that the inlet air was heated in a more uniform way. The device was able to
a was kept almost constant by the
raise the inlet air temperature by 8C but Tout
control system. Figure 5.1 shows the behavior of both air temperatures. Due to the
thermal inertia it took a long time for the heated plate to produce the 8 degrees
of temperature rise, so the system was subject to a change in temperature that
approximates a ramp change. To test the control system subject to a step change,
68

Disturbance Rejection with PI control (LabView)


40

Air outlet Temp.

Air Temperatures [oC]

38

36

34

Air heater
removed.

32

30

28

26

Air inlet Temp.


24

22

20

500

1000

1500

2000

2500

3000

time [s]

Figure 5.1. Inlet air disturbance.


the heated plate was turned o and it was removed from the intake part of the wind
tunnel. This action generated a step change that can also be seen in Fig. 5.1.
It can be seen that the step change in temperature produced a larger e ect on
a but at the end, the control system took the temperature back to its desired
Tout
value. On the other hand, the change in the control action is shown in Fig. 5.2.
The last test performed studied the behavior of the system subject to a disturbance in the water ow rate. Figure 5.3a shows the change in m_ w and Fig. 5.3b
a .
shows Tout
A few problems were encountered with the use of PI control. First the values of
the constants for the proportional and integral control had to be chosen. However,
these constants do not always work well depending on the range of air speeds that
we are using. This means that we would need to adjust the constants manually or
by means of an adaptive algorithm depending on the range of velocities that we are
working with.
69

35

Air Speed x 30
30

25
Inlet air Temp.

20

15

10

500

1000

1500
time [s]

2000

2500

3000

Figure 5.2. Control action for inlet air disturbance.


Another problem found is that the integral action introduces a delay in the
control action when the setpoint is changed. This is because the error starts accumulating at a rate that depends on the value of i, so that when the system reaches
the new setpoint, there is still some error left due to the integral part of the control
so that the control system continues to generate a control action of the same sign as
before. This situation generates an oscillation of the system outlet air temperature
of an amplitude that depends on the values of both Kp and i and the dynamics of
the system at that new state. Finally, it is observed that the linear model of the
plant works well for a certain range of m_ a . For most of the air speed range, the
a so that the control action follows this rule. But
greater the air speed the lower Tout
as the system starts working at the low range of m_ a , there is a point in which the
a
delay time of the system changes considerably so that if we need to increase Tout
the control system will try to reduce the speed more and more, but then it is going
to take longer for the heated air to get to the point where the outlet temperature
70

mw [kg/s]

0.25
0.2

0.15
0.1

0.050

100

200

300

400

500

600

700

800

900

1000

t [s]

(a)

Tout [ C]

32.2
32
31.8
31.6
31.4
31.20

100

200

300

400

500

(b)

600

700

800

900

1000

t [s]

Figure 5.3. Water ow rate disturbance rejection.


measurement is taken. Thus, the performance of the control scheme is a ected.
Therefore, a di erent type of control scheme is needed if we want to be able to
work in the whole range of air velocities.
5.3 Neurocontrol
The main objective of this research is the control of thermal components. We will
begin by controlling an analytical model of a plant, so that the control algorithm
can be designed and tested. Then we will replace the analytical model with an ANN
and study the behavior of the controller on this plant.
a . This can be achieved by
Now we proceed to design an algorithm to control Tout
controlling one or more of the variables m_ w , m_ a , Tinw , and Tina . In this work we con ne
ourselves to a single-input-single-output system, and for ease of experimentation
we have chosen m_ a as the control variable while keeping the others xed. The
a is nonlinear and complicated. Strictly speaking
relationship between m_ a and Tout
71

it is a solution of a partial di erential equation in space and time. Some idea of


the nonlinearity of this equation can be obtained by looking at the steady state, for
which a heat balance gives
a = 1 Q_ + T a
Tout
in
m_ a ca
where Q_ is the heat rate which also depends on m_ a . Figure 5.4 shows the measured
a (m
function Tout
_ a ) for di erent m_ w . The slope of the curve changes considerably with
m_ a indicating that the sensitivity of the system depends on the operating point.
42
40

a
Tout [ C]

38
36
34
32
30
28
26
0

0.2

0.4

0.6

0.8

1.2

1.4

ma [kg/s]
w for di erent mass ow rates of
Figure 5.4. Nonlinear relation between m_ a and Tout
water. 0.260 kg/s; 4 0.200 kg/s;  0.65 kg/s.

There are other diculties that increase the complexity of the nonlinear control
problem. First, the system that we are controlling includes not only the HX but
72

also its associated hardware, i.e. fan, pump, PID-controlled heater and measuring
instruments such as a water ow meter and a pressure transducer. Second, there
a since it
is a delay between what happens at the HX and the measurements of Tout
takes a while for the air to ow from the HX to the point of measurement. As the air
speed slows down this delay is longer and it is harder to control the air temperature.
Finally, there is a gradual change in the HX characteristics due to fouling e ects.
ANNs are very well suited for these tasks because they can be taught to learn the
response of the system.
(a) ANNs with IMC

IMC consists of having a model of a plant M in parallel with the real system
P , as shown in Fig. 5.5. The di erence between the outputs of P and M is used
as the feedback for a controller C that is located in the forward path of the control
scheme. The training procedure of such a control system using ANNs has two steps.

I
+

Reference

+
F

+
C

Figure 5.5. General IMC structure plus integral control.


73

 We rst train an ANN to learn the dynamics of the process by providing

known input and output data sets. This is M .

 Then, another ANN is trained to learn the inverse dynamics of the process

and to function as a nonlinear controller C . It is trained to invert the model


M instead of trying to learn the inverse dynamics of the actual process. By
training in this way we make sure that we invert the steady state gain of the
model so that the o set can be eliminated.

For our experiments, we trained the plant model M with information related to
a and m
Tout
_ a . These data were obtained by taking measurements of the system subject to small increments in the setpoint temperature. The controller C is obtained
by using a synthetic signal which is the desired value of the air speed. This signal is
a which is then supplied as the input to
supplied to M to give a certain value of Tout
the controller. The training algorithm adjusts the weights of C to reduce the error
between the synthetic signal and the controller output.
Since the ANNs only provide an approximation to the behavior of the actual
plant, we used a one parameter lter F , following the suggestion of Nahas et al.
(1992), preceding the controller in the forward path to account for plant-model
mismatch. An integral control path I was also added in parallel with F to help
obtain an o set-free controlling action. There are two constants that have to be
chosen by trial and error, the rst for the integral controller and the other for the
lter.
As a large percentage of the controllers that are currently being used correspond
to proportional-integral and proportional-integral-derivative schemes, standard PI
and PID controllers were used to compare the performance with the ANN controller.
This was through a general purpose LabVIEW subroutine implementing a PID
74

controller based in the relations developed by Shinskey (1988). The derivative


action can be shut down by means of setting the corresponding constant equal to
zero. In this way, the same algorithm is used for both the PI and PID controlling
schemes. The two di erent tests that were conducted are described below.
(b) Comparison with PID: step change in setpoint

The rst test was designed to observe the performance of the controller subject
a . The system was
to a step change in the value of the setpoint temperature Tout
taken up to a point in which the outlet air temperature was near 32C. The controller was turned on and we waited for 40 seconds until the temperature remained
within a band of 0:1C. The setpoint was then increased to 36C. Both controllers
performed well and behaved in a similar way when controlling the system at large
values of air speed. However, on approaching the lower end of air speeds, the system
became very hard to control for two reasons. One is the e ect of the delay involved,
a to m
and the other is the high sensitivity of Tout
_ a at low air speeds. This test brings
the system from a very easy-to-control point at 32C to a hard-to-control state at
36C. The results are shown in Fig. 5.6. It is seen that, although the ANN controller
has a slightly larger overshoot, it presents less oscillations and it is able to bring
the system to a stable condition. On the other hand, both PI and PID controllers
oscillate signi cantly more and are not able to bring the system to a steady state,
a within 36  0:1 C by constantly adjusting the air speed. Thus, the
but keep Tout
ANN controller uses less energy and is more stable by keeping the system steady
instead of generating an oscillatory controlling action.
(c) Comparison with PID: disturbance rejection

We now analyze the disturbance rejection capabilities of the control system. In


this test a disturbance is applied to the plant in the form of a pulse in the following
75

way. Once the system is at steady state operation, we shut down completely one of
the valves on the water side for a short time. Once again, we test the controllers at
a = 36 C and a low air speed. The PI
a state that is hard to control, i.e. with Tout
controller showed the worst performance and is left out of the comparison shown
in Fig. 5.7. Figure 5.7(a) shows the change in the water ow rate which is the
disturbance itself; the water ow is shut down between t = 40 s and t = 70 s.
After the disturbance pulse, the controller brings the system back to steady state.
a and m
Figures 5.7(b) and (c) show the change in Tout
_ a , respectively. Once again
it is seen that the PID is not able to bring the system to a steady state condition
while the oscillations of the ANN controller are quickly damped out. It is seen in
Fig. 5.7(c) that the PID controller, in trying to control the temperature, generates
an oscillatory air speed.
5.4 Conclusions
In Chapter 4, ANNs were used to model dynamic behavior of a heat exchanger
testing facility. In this chapter the dynamic ANN was then used, in conjunction
with internal model control, to control the temperature of the air coming out of
the heat exchanger. The tests showed that the present technique performed better
than conventional PI and PID control in certain cases.
Neural networks are powerful tools for thermal control. They can be trained
to simulate the behavior of a dynamical system and they are adaptive. In the
present work the network was trained o -line, but in the following chapters online training will be incorporated to enable continuous learning and adaptation to
changing conditions.

76

36.4

ANN

PID

a
Tout [ C]

36.2
36
35.8
35.6

PI

35.4

100 120 140 160 180 200 220 240 260 280 300

t [s]
36.5
36
35.5
35

a
Tout [ C]

34.5

ANN
PID
PI

34

33.5
33

32.5
32
31.5

50

100

150

t [s]

200

250

300

350

Figure 5.6. Change in the setpoint temperature. | ANN; - - PID; -.- PI.

77

mw [kg/s]

300
200
100
0

50

100

150

200

t [s]

250

300

350

400

300

350

400

300

350

400

(a)

a
Tout [ C]

36.5
36

35.5
35

34.5
0

50

100

150

200

250

t [s]
(b)

m a [kg/s]

0.5
0.4
0.3
0.2
0.1

50

100

150

200

250

t [s]
(c)

Figure 5.7. Disturbance rejection. | ANN; - - PID

78

CHAPTER 6
STABILIZATION OF CONTROL SYSTEM
In Chapter 5 we described the development and application of neurocontrol to
HXs. The neurocontrol scheme performed better than PID control at low air speed
operating conditions. However, no information was given about the stability of the
controller. This chapter analyses this topic.
Thermal systems are intrinsically nonlinear in that the temperature to be controlled and the control signal do not bear a linear relationship with each other.
Furthermore, the characteristics of the system may change over time and its dynamics are often unknown. These diculties can be overcome by using arti cial
neural networks. Their insensitivity to noise and incomplete information make them
suitable for modeling experimental systems for which measurement data are available. Also they can be re-trained at any given time so that the model of the thermal
system can be adapted and the controller can be adjusted whenever needed.
The \static" ANN described above was extended in Chapter 4 to predict dynamic processes in which the variables change with time. Again, the network is
trained using known time dependence of the variables for given initial conditions.
The trained network can predict the variables for any other initial condition. The
dynamic ANN can be used for control purposes. The control system was experimentally tested in the heat exchanger test facility shown if Fig. 2.5.
79

Though the neurocontroller functioned properly, there was no assurance that it


always would. A control system has to be stable. From a practical perspective,
this is especially important for a system that is allowed to change over time, like
a controller based on ANNs. The digital control system, as will be shown later,
can be represented by a nonlinear map between previous instants in time and the
present. To achieve control, the set point should be a xed point of the map that is
locally attracting. This is a necessary condition but not sucient, since there may
be other stable xed points that are also locally attracting. Furthermore, unlike a
linear system, the stability characteristics of a nonlinear control system vary over
the operating range of the controller. For these reasons it is important that there
be some protection against instability built into the training of the neural network
while it works to minimize the target error.
Some stability analyses of neurocontrollers have been performed by previous
authors. Jin at al. (1993) studied the training problem in discrete-time dynamic
neural networks following the dynamic backpropagation algorithm of Pineda (1987)
by modi cation of the learning rate. Hrycej (1995) looked at the existence of xed
points in neurocontrollers representing nonlinear di erential systems and analyzed
the e ect of feedback and feedforward on the control system. Delgado (1998) used
a describing function technique to present the stability analysis of closed-loops systems with a linear plant and a neurocontroller. Taking a di erent perspective on the
problem, we will consider the control system as an iterated map. To understand the
relation between the behavior of the system and its characteristics, we will study
some simple networks rst. A training technique that incorporates stabilization
along with error minimization will be developed, and the method will be tested on
the control of temperature of air coming out of a heat exchanger. The contents of
this chapter have been submitted for review in Daz et al. (2000c).
80

6.1 Neurocontroller as an iterated map


For a static ANN, the input and output variables are time-independent. In a digitally controlled time-dependent system, however, the variables are functions of time
which are sampled periodically with a constant time interval t. Here we are interested in a control methodology that brings the single-input-single-output thermal
system to a given steady state. We are thus interested in a single variable to be
controlled, y(t), and a single control variable, x(t), where t is time. A trained ANN
can be used to predict yi = y((i + 1)t) knowing yi = y(it) if the system satis es an unknown di erential equation of rst order. If the equation is of higher
order, one can, in principle, include sucient time-derivatives of a vector version
of y(t) to reduce all scalar equations in its components to rst order. In practice
this is dicult since analog signals corresponding to derivatives may not be readily
available. However, a nite di erence approximation of the derivatives shows that,
provided t is small enough, this is equivalent to adding information about y at
previous instants in time, i.e. yi , yi , etc., as many as needed. Previous values
of xi = x(t) may also be needed for systems of higher order. A memory unit, which
is part of the computerized control system, stores yi and xi to provide information
on previous instants to the ANN.
Figure 6.1(a) schematically shows an open-loop control system for which the
control variable xi is known. The number of inputs and outputs of the ANN are
not the same. Though this is not a problem for a neural network, it is awkward for
stability analysis. For this purpose a vector u of dimension n will be de ned such
that on the input side of the ANN ui = (yi n ; yi n ; : : : ; yi ; yi), and on the
output side ui = (yi n ; yi n ; : : : ; yi; yi ).
+1

+1

+1

+2

+3

+1

81

+2

The overall e ect of the control system is that of a nonlinear map


ui = F(ui )

(6.1)

+1

For closed-loop operation, a controller generates the control variable x(t), as shown
in Fig. 6.1(b). The controller is modeled by
and the ANN by

xi = g (y i; y i 1; : : : ; xi 1 ; xi 2 ; : : : ; y  )

(6.2)

y i+1 = f (y i; y i 1; : : : ; xi ; xi 1 ; xi 2 ; : : :)

(6.3)

where y is a reference value of the controlled variable. Once again the map represented by equation (6.1) applies where ui = (yi n ; yi n ; : : : ; yi ; yi; xi m ; xi m
: : : ; xi ; xi ).
Consider the nonlinear map (6.1) for open-loop control, or a similar map obtained by using equations (6.2) and (6.3) in closed-loop control. The xed points
u map to themselves and are hence solutions of u = F(u). A nonlinear map can
have more than one xed point with di erent stability characteristics. To study the
stability of a given xed point, the map is linearized around it to get
+1

+2

+1

+2

ui

+1

u = J (ui u)

(6.4)

where J is the Jacobian of F evaluated at the xed point. The spectral radius of
J, denoted by r, is the largest of the absolute values of its eigenvalues. If r < 1,
the images of the map converge to the xed point and it is stable; otherwise it is
unstable (Hale and Kocak, 1991).
6.2 Stability analyses
In this section, the behavior of neural networks is analyzed, going progressively from
simple to more complex con gurations. The simple ones are addressed analytically,
82

yi
y i-1
Memory

y i+1

xi

ANN

xi
x i-1

(a)

yi
y i-1
ANN

x i-1
x i-2

y i+1

xi

Memory

yi
y i-1
Controller

x i-1
x i-2

y*

(b)

Figure 6.1. Neurocontrollers. (a) open loop; (b) closed loop.

83

while the more complex are numerically computed. In the latter case the Jacobians
were calculated using second order accurate numerical derivatives, and the spectral
radii were found using the implicit double-shifted QR algorithm of the EVCRG
routine in the IMSL library. For validation, the results of the numerical code
for the 2-1-1 network below were compared with the analytical solution, and the
spectral radii from both methods were found to be identical.
1

6.2.1 Open-loop control with single neuron


As ANNs are composed of a system of neurons connected together to build a network, the stability of one of these is rst analyzed. Consider two inputs to the
neuron, yi and x, where x is a control parameter that is kept constant, and an
output, yi . There are two synaptic weights, w ;; and w ;; , and only one bias,  ; .
De ning ui = (yi; yi ), we get the map
21
11

+1

21
12

21

+1

ui1+1
ui2+1

where

f (ui2) =

1+e

= ui
= f (ui )

(6.5)
(6.6)

i
2;1 +w12;;11 ui2 +w12;;21 x)

(6.7)

The xed point of this map is (u ; u ) where u = u and u = f (u ). Depending


on the weights there may be more than one xed point. The Jacobian at the xed
point is
2
3
0 1 7
J = 64
(6.8)
5
0 
where k = @f=@uik ; the overbar indicates that the derivative is evaluated at the
xed point. In this simple case  is the slope of the curve represented by equation
1

1 Bristol

Technology Inc., Version 3.1.

84

(6.6). We have  = w ;; e (1 + e ) , where =  ; + w ;; u + w ;; x. The


eigenvalues of J are 0 and  so that the spectral radius is r = j j.
The xed point is stable if r < 1. The key to stability is equation (6.6) which
can be linearized to ui u =  (ui u ). Thus, for 0 <  < 1, each u will
be successively close to u and on the same side of it. If, however, 1 <  < 0,
then u will oscillate around u as it approaches. The sign of  is determined by
the sign of w ;; . There are two possible dynamic behaviors that can be found if the
xed point is unstable: the system may oscillate around the xed point, or it may
drift to another xed point that is stable but undesirable.
Figures 6.2, 6.3 and 6.4 show di erent behaviors depending on w ;; . w ;; and
 ; have been kept constant. In each gure, the upper graph shows y i vs. i, the
center one yi vs. yi , and the lowest r vs. i. In Figs. 6.2 and 6.3 the spectral radius
is less than unity and the xed point is stable. In Fig. 6.2, w ;; is positive and less
than unity so that there is monotonic convergence, while it is negative in Fig. 6.3
leading to oscillations. For Fig. 6.4, r > 1 so that the xed point is not stable.
Since w ;; < 0, an initial condition near it wanders away in an oscillatory fashion,
ending up eventually in constant amplitude oscillations. Thus, the stability of a
map of the type of equations (6.5) and (6.6) and the nature of its behavior around a
xed point depends on the value and sign of  , which is a function of the synaptic
weights and biases.
21
11

21
11

21

+1
2

21
12

21
11

21
11

21
12

+1
2

21

+1
2

21
12

21
12

6.2.2 Open-loop control with 2-1-1 neural network


One of the simplest ANN is one with two input neurons, one hidden layer with
one neuron, and a single output neuron, i.e. a 2-1-1 structure. Unlike the previous
example, this can be trained. One set of data, y = x with x = 0:7 was provided to
the ANN. It was trained using a gradient method (Pierre, 1986) which minimizes
2

85

0.66
yi+1

0.64
0.62
0.6 0

10

15

20

25
i

0.66

30

35

40

45

50

yi+1

0.64
0.62

0.60.6
0.122

0.65

0.7

0.75 i
y

0.8

0.85

0.9

0.95

0.12
0.118
0.116
0.1140

10

15

20

25
i

30

35

Figure 6.2. Single neuron, stable behavior without oscillations.


0:1; w ;; = 0:5.
21
11

86

40

2;1

45

50

= 0:1; w ;; =
21
12

yi+1

0.8
0.6
0.4
0.2
0

yi+1

0
0.8

10

15

20

25
i

30

35

40

45

50

0.8

0.9

45

50

0.6
0.4
0.2
0

0
1.5

0.1

0.2

0.3

0.4 i
y

0.5

0.6

0.7

1
0.5
0

10

15

20

25
i

30

35

40

Figure 6.3. Single neuron, stable behavior with oscillations.  ; = 0:1; w ;; = 0:1;
w ;; = 5:0.
21

21
11

87

21
12

yi+1

0.8
0.6
0.4
0.2
0

yi+1

0
0.8

10

15

20

25

30

35

40

45

50

0.8

0.9

45

50

0.6
0.4
0.2
0

0.1

0.2

0.3

0.4
yi

0.5

0.6

0.7

2
1
0

10

15

20

25

30

35

40

Figure 6.4. Single neuron, unstable behavior.  ; = 0:1; w ;; = 0:1; w ;; = 10:0.


21

88

21
12

21
11

the error e = (y y) , where y is the target value and y is the prediction of the
ANN.
Writing ui = (yi; yi ) again, the map is represented by equations (6.5) and
(6.6), where
#
"
w23;;11
(6.9)
f (ui ) = 1 + e 3;1 1+e
1
2

+1

and

+ w ;; ui + w ;; x. The spectral radius is r = j j, where  =


w ;; w ;; e e (1 + e ) (1 + e ) and =  ; + w ;; =(1 + e ).
The stability of the map depends on the trained weights and biases, which in
turn depend on the initial values used during training. In Table 6.1, runs A and B
show the initial and nal weights and biases of the network and the nal spectral
radii of the Jacobian of the maps that result from training with two di erent sets
of initial weights and biases. The error in each case is zero. It can be seen that
di erent initial weights and biases may lead to di erent values after training.
31
21

2;1

21
11

21
11

21
12

31

31
21

Table 6.1. 2-1-1 neural network, initial and nal weights and biases and nal spectral
radii. Cases A and B are without and C is with stabilization.
A Initial
Final
B Initial
Final
C Initial
Final

w12;;11
0:5
0:4981
9:0
8:781
9:0
1:261

w12;;21
0:7
0:7026
9:0
9:311
9:0
6:281

w23;;11
0:3
0:2774
9:0
8:945
9:0
8:936

89

2;1
0:1
0:1038
0:1
0:5450
0:1
3:783

3;1
0:1
0:1545
0:1
0:4925
0:1
8:862

|{
0:0084
|{
1:0991
|{
0:1068

yi+1

0.4902
0.49

0.4898
0.4896 0

10

15

20

25
i

30

35

40

45

50

0.45

0.5

45

50

yi+1

0.4902
0.49

0.4898

r 10 4

0.48960.1

0.15

0.2

0.25

0.3
yi

5.9

0.35

0.4

5.89
5.88
5.87 0

10

15

20

25
i

30

35

40

Figure 6.5. 2-1-1 network, case A.


Even though the static predictions of the two networks are perfect and identical, their dynamic responses and stability characteristics in a control system are
di erent. Figure 6.5 shows the time-dependent behavior of the network for case A.
The system is stable at the prescribed xed point and yi ! y as i ! 1. Once
the xed point is predicted correctly, the spectral radius takes the value obtained
in the training process. On the other hand, Fig. 6.6 shows the output of the same
ANN con guration but now using the weights for case B. The xed point is not
stable, and the long-time behavior of the map is seen to be oscillatory around it
with constant amplitude.
90

yi+1

0.8
0.6
0.4
0.2

10

15

20

25
i

yi+1

30

35

40

45

50

0.8
0.6
0.4
0.2
0.1
3

0.2

0.3

0.4

yi

0.5

0.6

0.7

0.8

2
1
0

10

15

20

25
i

30

35

Figure 6.6. 2-1-1 network, case B.

91

40

45

50

6.2.3 Open-loop control with 2-5-1 neural network


This is trained using a gradient method by providing only one set of data to the
network, i.e. y = x with x = 0:7. The inputs to the ANN are y and x and the
output is y. The network is trained starting from two di erent initial weights and
biases. In both cases, call them D and E, the error is reduced by training to zero,
but the spectral radii converge to 0.0915 and 1.069, respectively. The ANN is now
used as an open-loop controller as in Fig. 6.1(a). Figure 6.7 shows yi = f (yi) for
both sets of weights where the xed points are determined by the intersection of the
curve with the yi = yi line. For case D there is only one xed point. It is stable
since the absolute value of its slope at the xed point is less than unity as indicated
by its intersection with the yi = yi line. On the other hand, for case E there
are three xed points, two stable and one unstable. The network is trained to the
unstable xed point and the behavior of the open-loop control system is indicated
in Fig. 6.8. The system goes to the unstable xed point, yi = 0:49, and then
moves away to a stable one, yi = 0:72. The spectral radius at the second xed
point is r = 0:847. Though it is stable, the prediction of the ANN is incorrect since
the xed point is not the one that it was trained for.
2

+1

+1

+1

+1

+1

6.3 Training with stabilization


It is seen that training may produce an ANN with good static prediction but which
is unstable in dynamic operation as a control system. To counteract this we propose a training method to drive the ANN to weights and biases that also guarantee
the stability of the desired xed point. In this method the usual error minimization is made to alternate with a stabilization procedure. Whenever, during error

92

0.75
0.7

y i+1

0.65
0.6
0.55

i
yi+1= y

0.5
0.45
0.4
0.35
0.3
0.25
0.3

0.4

0.5

0.6

0.7

0.8

yi

Figure 6.7. 2-5-1 network. yi vs. yi for stable (D) and unstable (E) maps; yi = yi
line shown for reference.
+1

+1

93

0.8
0.7

Stable fixed point

y i+1

0.6
0.5

Unstable fixed point

0.4
0.3
0.2
0.1
0

20

40

60

80

100

120

140

160

180

Figure 6.8. 2-5-1 network, unstable open-loop control system.

94

200

minimization, it is found that r > 1 the weights are modi ed according to


wi;jk;l =

@r
k;l
@wi;j

(6.10)

where wi;jk;l is the correction to the weight wi;jk;l, and  is a relaxation parameter
(taken here to be 0.1). This is a rst-order gradient formula for reduction of r. A
tolerance criterion, r < 0:5 say, can be set with which we are comfortable about the
stability of the controller. Once this condition is met, we can resume minimization
of the error.
This procedure is tested with the simple 2-1-1 network discussed before with
open-loop control. The errors during training can be calculated as functions of the
three weights, w ;; , w ;; and w ;; , and two biases,  ; and  ; . To show it as a
surface, one weight and two of the biases have been xed so that the error, e, and
spectral radius, r, can be shown as functions of weights w ;; and w ;; . Figures
6.9 and 6.10 show the contours of e(w ;; ; w ;; ) and r(w ;; ; w ;; ).
The thick
line in both gures corresponds to e = 0 which is the goal of the training. There
are in nitely many r, some greater than and some smaller than unity, that have
e = 0. A stable, trained network can be obtained by moving towards the e = 0
line, alternating with reduction in r. We begin with initial weights corresponding
to point a in both gures. The lines abc indicate the path that would be taken by a
gradient error minimization procedure alone. At the end we would have e = 0 and
r = 1:39. However, if we employ the training procedure with stabilization, at point
b where r = 0:5, the process of reduction of r begins. When r  0:5, the algorithm
goes back to the minimization of e. This leads to a zig-zag path bd back and forth
around r = 0:5. The nal values at d are e = 0 and r = 0:43 indicating a stable
open-loop control system.
21
11

21
12

31
21

21

31

21
11

21
11

95

31
21

21
11

31
21

31
21

14
0.
600 0300
25 14

03

00

b
a

0.09

0037

10

0.0

w2131

0.

0.

06

00

25

150

12
w11

10

15

Figure 6.9. 2-1-1 network error contours. Thick line is e = 0; abc error minimization
alone; abd error minimization with spectral radius reduction; inset shows zig-zag
path.

96

d
51

3
.59

c
0

483

0.1

1.0

83
1.4

31
w21

38

b
a

10

15
0

12
w11

10

15

Figure 6.10. 2-1-1 network spectral radius contours. Thick line is e = 0; abc error
minimization alone; abd error minimization with spectral radius reduction; inset
shows zig-zag path.

97

yi+1

0.7
0.6
0.5
0.4

10

15

20

25
i

30

35

40

45

50

0.15

0.2

0.25

0.3

0.35
yi

0.4

0.45

0.5

0.55

0.6

10

15

20

25
i

30

35

40

45

50

yi+1

0.7
0.6
0.5

0.4
0.1
1
0.5
0

Figure 6.11. 2-1-1 network, case C.


The results of training the ANN, using the same initial values as in case B, but
with stabilization, is shown as row C in Table 6.1. With this set of weights and
biases, the open-loop control system is now stable and the desired xed point is
reached. Figure 6.11 shows the behavior of the system that has been stabilized and
can be compared to Fig. 6.6 which was not.
6.4 Experimental results
We will now test the techniques that have been developed on a neurocontroller used
to regulate the temperature of air coming out of a heat exchanger. The ANNs used
98

in the control system had a 6-10-5-1 con guration. The variables were sampled
by the computer at a time interval of t around one second; this is fast enough
compared to the time rates of change in the heat exchanger. It has been previously shown that the heat exchanger tested was well represented dynamically by
information from two previous instants in time, as explained in Section 4.3.2.
6.4.1 Test facility
The experiments were conducted in the variable-speed wind tunnel facility described
in Section 2.5. The purpose of the control is to adjust the air speed, U , to get a
desired temperature of the air leaving the heat exchanger, Tairout. For this to be
in
a single-input-single-output system, the parameters m_ water and Twater
were kept
constant during the experiments. The data of interest in the experiment are m_ air
and Tairout at di erent instants of time t.
6.4.2 Open-loop control
It is known that for linear systems, the spectral radius is constant throughout the
entire operating region, while for nonlinear systems this may not be the case. Measurements under open-loop conditions were made to con rm this. These consisted of
the variable to be controlled, y(t) = Tairout (t), for step changes in the control variable,
x(t) = U (t). y i ; y i ; y i; xi ; xi ; xi were used as inputs and y i as output to
train an ANN. The vector in the map in Eq. (6.1) is de ned as ui = (yi ; yi ; yi).
The training data were used to iterate the map until a xed point was reached.
xi ; xi ; xi are kept xed for each particular data set. The map is
2

+1

ui1+1
ui2+1
ui3+1

= ui
= ui
= f (ui ; ui ; ui )
2

99

(6.11)
(6.12)
(6.13)

with a Jacobian matrix

6
6
6
6
4

7
7
7
7
5

0 1 0
J= 0 0 1
1 2 3

(6.14)

At this point the spectral radius of the map was computed for that particular
data set. This was repeated with each measured set of values. Figure 6.12 shows
the results of the spectral radius for di erent xed points in y = Tairout, showing that
r varies considerably over the operating range of the test facility. This suggests that
the control system should be closely monitored for the spectral radius and stabilized
as done in the following section. Operation for which r > 1 cannot be obtained in
experiments.
6.4.3 Closed-loop control
The control strategy used for closed-loop operation is based on internal model control as described in Section 5.3a. In the experiments, the plant model, M , was
air (t) and x(t) = U (t). The data were
trained with information related to y(t) = Tout
obtained by taking measurements of the system subject to small increments in the
set point temperature.
The controller obeys the relationship
and the model

xi = g (xi 2 ; xi 1 ; y i 2; y i 1; y i; Tref )

(6.15)

y i+1 = f (xi 2 ; xi 1 ; xi ; y i 2; y i 1; y i)

(6.16)

air . Thus, the map


where x(t) = U (t). Tref is the desired set point temperature of Tout
is

100

1
0.98

Spectral radius

0.96
0.94
0.92
0.9
0.88
0.86
0.84
0.82
30

32

34

36

38

40

42

out

Tair [ C]

Figure 6.12. Dependence of spectral radius on operating conditions, open-loop


control.

101

ui1+1
ui2+1
ui3+1
ui4+1
ui5+1

= ui
= g(ui ; ui ; ui ; ui ; ui ; Tref )
= ui
= ui
= f (ui ; ui ; g(ui ; ui ; ui ; ui ; ui ; Tref ); ui ; ui ; ui )
2

(6.17)
(6.18)
(6.19)
(6.20)
(6.21)

where ui = (xi ; xi ; yi ; yi ; yi). Equation (6.18) must be computed before


equation (6.21). The Jacobian of this map is
2

J=

6
6
6
6
6
6
6
6
6
6
6
4

0 1 0 0 0
1 2 3 4 5

0 0 0 1 0
0 0 0 0 1
1 2 3 4 5

3
7
7
7
7
7
7
7
7
7
7
7
5

(6.22)

where k = @g=uik .
To illustrate the di erence between stable and unstable behaviors of the system,
two di erent controllers, C and C with r < 1 and r > 1 respectively, were trained.
The weights for the stable controller were found using the stabilization algorithm
proposed here. The unstable controller was found by using equation (6.10), but
with a negative sign in the right side to drive the weights in a direction that makes
the controller unstable. The reference temperature was chosen to be Tref = 34:0 C.
air as
The ow rates and temperatures in the test facility were rst adjusted to get Tout
close to Tref as possible, and then the controller was turned on. Figure 6.13 shows
air oscillates a
the response of the two controllers. For the stable controller C , Tout
few times but eventually goes to Tref . On the other hand, for otherwise identical
conditions, controller C takes the system to the maximum air speed, Umax , where
it remains without accomplishing the control task.
1

102

35
34.5

C1

34

out

Tair [ C]

33.5
33
32.5
32
31.5
31

C2

30.5
30

50

100

150

200

250

300

350

400

t [s]

Figure 6.13. Performance of controllers C and C , closed-loop control.


1

6.5 Conclusions
It is important that the training procedures of neural networks used in controllers be
such that the system is stable. This is especially true if the network is left to itself to
learn of changes in system characteristics. This happens in thermal systems which
evolve over time either due to fouling or changes in hardware. Indeed one advantage
of ANNs used for this purpose is that they can adapt to changing conditions.
The stability of a thermal open- or closed-loop neurocontroller is determined by
the spectral radius of the Jacobian of the map that governs the process. This is
easily determined for small networks, but requires numerical computation for more
realistic con gurations. A training algorithm for networks is proposed here that can
nd a set of weights and biases that reduces the target error to a minimum but for
which the control system is also stable. This technique was tested on the control
103

of the air temperature coming out of a water-air heat exchanger. The experiments
show the di erence between the performance of a stable controller that used this
training procedure and an unstable controller that could not achieve the desired
control objective.

104

CHAPTER 7
ADAPTIVE CONTROL
Now that we have analyzed the stability of neurocontrollers we can retrain them online to adapt to changing conditions of the thermal system. This chapter describes
the application of adaptive neurocontrollers to HXs.
Most thermal systems present nonlinear dynamical characteristics that make
them dicult to control. Heat exchangers are one of these thermal components
that present nonlinear behavior mainly due to complicated hydrodynamics and
temperature dependence of uid properties (Sen and Yang, 1999). Because of these
complexities the dynamics of HXs are dicult to model using rst principles. This
is not because the individual phenomena that play a role in the dynamics are not
understood, but when they are all combined, the result is a complex system that is
not easy to compute numerically. In fact, most of the information that is presently
known about HXs is in the form of correlations that predict the steady state heat
transfer. On the other hand, even though numerical simulations based on simplifying assumptions may be an alternative, they are usually time consuming and thus
not suitable for real time control purposes. Furthermore, there is need of a model
that can adjust to the changes in the thermal system over time such as the those
due to fouling in a HX.
It has been shown that an ANN after training, even though its steady-state predictions may be accurate, may be unstable when used as part of a control system.
105

Thus, since in this work we are interested in the on-line adaptation of an ANN
controller, we will train the ANNs to be used as neurocontrollers not only by minimizing the target error but also increasing the stability of the resulting controller.
In addition, in order to handle the optimality conditions that may be imposed on
the control, we will minimize a third criterion that in general can be user-de ned.
As a speci c example that may be useful, we will minimize the use of energy in the
thermal system, though any other criterion can be used instead. The contents of
this chapter have been submitted for review in Daz et al. (2000d).
7.1 Neurocontrol
There are several control schemes that use ANNs as the dynamic model and/or the
controller of a physical system (Hunt et al., 1992). As in Chapter 5, we have chosen
to use the internal model control approach because of its good characteristics of
adaptiveness, robustness and stability. Thus, the main objective is to show the
excellent adaptive characteristics of neurocontrollers applied to thermal systems.
For stability purposes, the behavior of the closed-loop controller was treated as a
nonlinear map that is iterated in time. The ANNs in the previous chapters were
all trained o -line before use; the present is directed towards on-line adaptation of
the ANN for optimum performance. The ANN is trained while it is performing its
control function.
7.1.1 Internal model control
In this section we apply the internal model control scheme described in Section 5.3a
to our heat exchanger test facility. The idea is to perform adaptive control using
the excellent characteristics of robustness and stability of IMC.
In our experiments with a single-row air-water n-tube heat exchanger we trained
M and C with information related to the outlet air temperature from the heat
106

Desired
performace

Parameter
Adaptation

Reference
Controller

Plant

Figure 7.1. Adaptive control scheme.


a , and the air speed, v , while keeping the inlet air and water temexchanger, Tout
a
peratures and the water ow rate constant. These data were obtained by making
measurements of the system subject to small increments in the setpoint temperature.

7.1.2 Adaptive control


Adaptive control consists of automatically adjusting in real time the parameters of a
controller so that a desired level of performance of a control system is achieved when
the parameters of the process being controlled are unknown or vary with respect
to time. The way to evaluate the performance of a control system is by selecting
an index that will be compared with its desired value, and the di erence will be
fed back to activate the process of adaptation. The di erence between conventional
and adaptive control schemes is that the former reacts to disturbances acting upon
the controlled variables and the latter to disturbances acting upon the parameters
of the process (Landau et al., 1998). Figure 7.1 shows the schematic of an adaptive
controller.
107

In the present case, the adaptation is achieved by modifying the weights and
biases of the two neural networks, M and C , respectively. The adaptation is performed if and when a certain level of performance of the control system has not
been achieved. It is done by carrying out single additional training cycles until the
performance criteria are matched.
There are some issues relating to the di erent time scales involved in the problem
that have to be addressed here. For instance, the plant has its own time scale for
changes in its variables, and possibly more than one. On the other hand, the
controller acts on actuators that have their own particular reaction time. Finally,
if we want to implement an adaptive system, we need to know how long M and C
take to nish the adaptation process. Thus, if the adaptation period is long enough
so that the physical system deviates from the desired set point in a signi cant way,
we need a back-up controller that will keep the system as close as possible to the
set point until the adaptation is completed. In our experiments, the time scale of
the adaptation process is the largest, that of the physical system intermediate, and
the reaction time of the actuator smallest. Thus, we use a PID controller to keep
the system under control until the ANN adapts to the new operating characteristics
of the plant. Because the plant may have a very di erent behavior because of its
new characteristics, the PID controller keeps the system close to the set point. The
constants of the PID controller are chosen for a certain behavior of the plant which
may not be suitable for the system after the disturbance is applied; thus we only
use it until the ANN controller has learned the new behavior.
7.1.3 Simultaneous minimization criteria
One of the purposes of training an ANN is to minimize the target error between some
known output and the prediction of the ANN with respect to a certain input. Since
108

this may produce a dynamically unstable control system, we must continuously


check the stability of the closed loop system when training the ANN. As mentioned
in Chapter 6, the stability is checked by obtaining the spectral radius, r, of the
Jacobian matrix of the map; r < 1 indicates stability.
As we modify the parameters of the ANN with respect to the target error and
the spectral radius, we can simultaneously consider other optimality criteria also.
For instance, we can nd a cost function corresponding to the energy consumption
for the particular plant being used and we can drive the system to an operating
point where we achieve the desired temperature, obtain at the same time a stable
controller, and also get to use the minimum amount of energy needed. If there are
other functions that are needed to be minimized or maximized simultaneously, they
can be treated in the same way.
7.2 Development of controller
The techniques for adaptive training of the ANN will be developed using numerical
simulations. Di erent numbers of adaptation criteria will be considered.
7.2.1 Single adaptation criterion
We start with a simple example in which we track the behavior of a nonlinear
dynamical system described by y_ + ay = x(t), where x(t) is a forcing function
taken to be x(t) = sin(t), and a is a system parameter. The value of a is 1 for
t 2 [0; 25] and a = 4 for t 2 (25; 50]. A 2-5-1 ANN, i.e. one with an input layer
with two input values, a hidden layer with ve nodes and an output layer with one
output value, is used to learn the behavior of the dynamical system. At a certain
instant the parameter a of the system is modi ed and the ANN is expected to adapt
until it learns the new behavior of the system. The inputs to the ANN are yi and
xi and the output is y i , where i is the discrete time index.
3

+1

109

i
yi ; y ANN

1
0.5
0

0.5
1

10

15

20

25

30

35

40

50

(a)
1
i
yi ; y ANN

45

0.5
0

0.5
1

10

15

20

25

(b)

30

35

40

45

50

Figure 7.2. Tracking of a dynamical system by an ANN. (a) adaptation for target
error  5 %; (b) adaptation for target error  1 %; | numerical solution; - - ANN
prediction.

110

Figures 7.2(a) and (b) show the results of tracking the output compared with
the numerical solution. In Figure 7.2(a) the adaptation process is turned on for
errors larger than ve percent. It is seen that the overall behavior of the system is
captured by the ANN but there are still some discrepancies close to the maximum
values of the function. In Figure 7.2(b) the ANN is adapted for errors larger than
one percent. It is seen that the prediction is much closer to the numerical, but the
program takes 20% longer to run. Thus if we are performing an on-line adaptation
there is a compromise between the error obtained and the length of the adaptation
period.
7.2.2 Two adaptation criteria
We now examine the adaptation of ANNs using two criteria: one for accuracy in
prediction and the other for stability. In this example we train a 2-4-1 neural
network to learn the xed point of the di erential equation y_ + y = x , where x
is a constant, and y(0) = x . This can be implemented with an ANN by providing
only one set of values as the training data, i.e. input yi = 0:49 and xi = 0:7 and
output yi = 0:49. First we train the ANN for reduction of target error, and once
this is less than 10 , we train it for stability.
From the stability perspective, we view the ANN as an iterated map, i.e. we
supply the input values xi and yi and we obtain an output. This output becomes
the input for the next iteration of the map. The value of xi remains constant and
the values of yi iterate. The spectral radius of the Jacobian matrix of the map, r,
is calculated to determine the stability.
We rst train the ANN to make sure that r > 1 with a target error less than
10 , and then we use the ANN as a dynamical system. As we expect, the system
is unstable. In order to stabilize it at the correct xed point, we modify the weights
2

+1

111

and biases of the ANN until r is suciently less than unity (we chose r < 0:9 as a
suciency criterion). We use a gradient descent method to modify the weights and
biases of the ANN. As the target error might increase due to the fact that we are
training in the direction of decreasing r, we need to retrain the ANN to reduce the
target error again. Thus there is an alternating process of training with respect to
the two di erent criteria until we obtain the desired value of the target error with
r < 1. Figure 7.3 shows the behavior of the dynamical system during this training
process. The parameters of the ANN chosen make r = 4:7 so that it is unstable to
the iterative process. Thus the system goes from the yi = 0:49 at i = 0 for which
the error was zero to the point a at i = 50. This xed point is stable with r < 1,
but is not the state that is desired. So we turn on the adaptation routine for the
reduction of r to below unity along with reduction of error to bring the system back
to point b where yi = 0:49. This occurs at about i = 77. Thus it takes about 27
iterations for the system to stabilize at the desired xed point.
There is a need for a back-up controller that will keep the system close to the
set point when either the controller or the model of the plant is going through the
adaptation process with respect to any of the chosen criteria. The process described
in this section can also be used to modify the parameters of the ANN controller
with respect to several adaptation criteria.
7.2.3 Adaptation criteria with optimization routine
We develop now a third example showing the use of adaptive rules for driving a
dynamical system composed by an ANN to a desired xed point. We train an ANN
with the function y = 1=x with x 2 [0:1; 10]. Each point of this curve is a xed
point of the ANN. The inputs of the ANN are yi and xi and the output is yi .
We select an initial condition within the given range of the variables. We check the
+1

112

1
0.9
0.8

0.7

0.5

i+1

0.6

0.4
0.3
0.2
0.1
00

20

40

60

80

100

120

140

160

180

200

i
Figure 7.3. Result of using a 2-4-1 ANN as an iterated map. i is the time index;
y i is the output.
+1

113

0
2

zi

4
6
8
10
0
2
4
6
8

10

10

yi

Figure 7.4. Simultaneous optimization criteria.


stability of the system and the target error, but we want at the same time to drive
the system to the maximum of the unrelated function z = x(1 x)y(1 y). For
this purpose we apply a gradient ascend method to modify the current values of xi
and yi so that the dynamical system maximizes z. Figure 7.4 shows the behavior of
the system during this process in (x; y; z) space. It moves from the initial condition
along the given curve until it nds the maximum of the function z.

114

Tout [ C]

34.5
34

33.5
33

32.5
0

20

40

60

80

100

120

140

160

180

200

t [s]

va [m/s]

3.5
3

2.5
2

1.5
0

20

40

60

80

100

120

140

160

180

200

t [s]
a set point.
Figure 7.5. Response to change in the Tout

7.3 Experimental veri cation


We will use the ANN training technique described above to control the temperature
of air coming out of a heat exchanger. The experimental setup consists of a variable
speed wind tunnel facility shown and described in Section 2.5.

115

7.3.1 Change in the set point


a . Figure 7.5
This test corresponds to a sudden change in the setpoint value of Tout
a
shows the results of this experiment. The curve on the top shows the values of Tout
and that on the bottom shows the values of va . The experiment consists of turning
on the controller at an outlet air temperature close to 34C. If the adaptation
criteria are not matched, i.e. stability and target error, then the controller starts an
adaptation process to let a PID controller keep the physical plant as close as possible
to the setpoint temperature until the adaptation criteria are matched. It is possible
to see that during approximately the rst 30 seconds of the test, the controller is
adapting and then it stabilizes the plant at the desired setpoint temperature. At
t = 70 s, we change the set point to 33 C. The controller detects an abrupt change in
target error and starts another adaptation process. During this adaptation period,
the PID controller takes over again and tries to keep the system close to the set
point. At approximately t = 90 s the neurocontroller regains control of the system
and stabilizes it at the new set point. It is observed that va increases about 50%.

7.3.2 Disturbance rejection


The response of the controller to two di erent kinds of disturbances were determined.
(a) Water-side disturbance

The testing procedure is similar to the case of change in the set point. We turn
on the controller and it adapts until the adaptation criteria are matched. The initial oscillations are mainly due to the action of a PID controller that controls the
system while the neurocontroller adapts. It reacts to an arbitrary initial condition
of the system that might not be exactly at the set point temperature. The neuroa = 34 C, at which point we apply a
controller then keeps the system close to Tout
116

disturbance which consists of shutting o the water. Figure 7.6 shows the results
of this experiment.
The rst 50 s is under the action of PID control, after which the neurocontroller
takes over. At t = 100 s we shut the water ow rate for a period of 30 s. The
neurocontroller works until t = 110 s at which point it hands the control action to
PID while it is itself adapting. At t = 130 s the water ow resumes. Meanwhile,
the PID has tried to keep the reference temperature by reducing va to its minimum
a without the water ow. Adaptation
possible value but is unable to maintain Tout
of the neurocontroller is complete around t = 170 s after which it takes over the
w during the
control action. The graph also shows the water outlet temperature Tout
same period. Between t = 100 s and t = 130 s there is no water ow so that the
thermocouple reading remains constant. When water ow is resumed the cold water
that was stagnant inside the HX ows past the thermocouple followed by the hot
w can be seen. The
water that was stagnant in the heater; the resulting blip in Tout
temperature oscillations are due to these portions of cold and hot water repeatedly
passing by the thermocouple while circulating within the closed loop. It is observed
that va has a similar oscillatory behavior.
(b) Air-side disturbance

We now perform perhaps the most dicult test for the controller by reducing
the inlet air area of the wind tunnel representing a structural change in the thermal
system. We do this in two ways, once gradually and then suddenly.
Figure 7.7 shows the results of the gradual reduction. The rst 30 s is under PID
control, and the neurocontroller gains control of the system at that point. From
t = 100 s until t = 220 s we gradually block the inlet area until there is only one-half
of the initial area left. As this happens, the neurocontroller increases va to keep
the system at 34C. There is a point at approximately t = 190 s where the ANN
117

34.5
34

a
Tout

[ C]

35

33.5
33

50

100

150

200

250

300

350

400

450

500

t [s]
3

va [m/s]

2.5
2

1.5
1

0.5

50

100

150

200

250

300

350

400

450

500

t [s]

w
Tout

[ C]

50
48
46
44
42
40

50

100

150

200

250

300

350

400

450

t [s]

Figure 7.6. Response to water-side disturbance.

118

500

34.5

a
Tout

[ C]

35

34

33.5

50

100

150

200

250

300

350

400

450

50

100

150

200

250

300

350

400

450

t [s]

va [m/s]

5
4
3
2
1
0

t [s]
Figure 7.7. Response to air-side disturbance; gradual reduction of the inlet air area.

119

35.5

Tout [ C]

35

34.5

34

33.5
33

50

100

150

200

250

300

350

t [s]

va [m/s]

4.5
4
3.5
3
2.5
2
1.5
1

50

100

150

200

250

300

350

t [s]
Figure 7.8. Response to air-side disturbance; sudden reduction of the inlet air area.
model is not able to characterize the system and an adaptation process begins; the
neurocontroller adapts until about t = 260 s. After it has learned, the new relation
a and v takes over the control action to stabilize the system. It is
between Tout
a
observed that there are some oscillations of the temperature between t = 330 s and
a nally settles down to the set point.
t = 390 s but Tout
To further test the adaptive ability of the controller, the previous experiment is
repeated but with suddenly blocking one-half the inlet air area. We let the controller
120

a = 34 C and then block the inlet. The controller


keep the system stable at Tout
adapts until it is able to return the system to the same outlet air temperature.
Figure 7.8 shows the results obtained for this test. For the rst 50 s the controller
adapts until it learns the behavior of the system and then it keeps it stable at 34C.
At t = 150 s, the inlet area is blocked and we let the controller adapt until it learns
the new characteristics of the system. It is seen that va increases approximately
50%. Finally at about t = 240 s, the neurocontroller regains the control of the plant
and stabilizes the system at the set point.

7.3.3 Energy consumption


In order to minimize the energy consumption of the system we determined the main
components that use energy in the experimental facility. These turn out to be the
hydraulic pump, the fan and the electric heater. We took measurements of voltage
and current for these three components and determined the amount of energy used
by each one of them. Di erent operating points of m_ w and m_ a were chosen for
taking the measurements and the results indicated that the electric heater was the
thermal component that used the most energy. Thus we use the measurements
taken from this component to develop a surface with E = E (m_ w ; m_ a), where E is
the power consumed. Figure 7.9 shows the corresponding surface. As expected the
lower m_ w and m_ a the lower the use of energy.
We use this surface now to nd the value of the energy for each sampled measurement during the operation of the system and to determine the direction of
minimal use of energy. We let the controller drive the system in this direction. If
the controller senses that the system is behaving in a di erent way, it will adapt to
the new characteristics of the system.

121

E [kW]

0.35
0.3
0.25
0.2
0.15
0.1
3

0.05
2.5

0.1
2

va [m/s]

0.15
1.5

0.2
1

0.25
0.5 0.3

mw [kg/s]

Figure 7.9. Energy consumption surface E (va ; m_ w ).

122

Tout [ C]

34.4
34.2

34

33.8
33.60

50

100

150

200

250

t [s]

va [m/s]

3
2.5
2

1.5
10

50

100

150

200

250

t [s]
Figure 7.10. Application of energy minimization routine.

123

In addition to the the two previous adaptation criteria for the weights and biases
of the ANNs, i.e. low target error and stable operation, we add the third which is
the minimization of energy consumption. We let the controller stabilize the system
a = 34 C and then turn on training using the third criterion. Figure 7.10
at Tout
shows the results obtained. The controller is supposed to keep the system stable
a . The minimization of energy routine reduces the m
at the same Tout
_ w so that the
controller has to reduce m_ a . The disturbance is not strong enough to make the
controller detect a change in the system characteristics so no adaptation is needed,
and the system is successfully kept at the set point value.
7.4 Conclusions
It has been shown that ANNs are a powerful technique to model and control nonlinear systems. They can be trained to give small errors in prediction and a stable
closed-loop feedback control operation. However, one of the main advantages of
ANNs is that they are easy to adapt such that their parameters are being modi ed
on-line. We have shown how this can be done minimizing some other index, such
as energy consumption, at the same time. The neurocontroller built using an IMC
scheme was able to control the experimental facility and adapt to its new conditions for disturbances in the air and water ow rates. The ANN controller was also
able to learn and control the plant behavior for a change in the set point of the
temperature. The methodology is fairly general; the same procedure can be used,
for example, for the adaptive and stable control of other thermal systems while at
the same time minimizing the energy used.

124

CHAPTER 8
EFFECT OF DELAY
At the end of Chapter 5 it is shown that neurocontrol outperforms PID at low
ranges of air speed. This is so because there is a physical phenomenon that becomes
important at these operating conditions. This phenomenon is the e ect of delay.
This chapter analyses the e ect of delay in thermal systems and implements control
schemes that can overcome this diculty.
In most thermal systems it is assumed that the future state is determined by
the present. These systems are usually modeled by ordinary or partial di erential
equations. With this approach the modeling of thermal systems such as networks
of heating and cooling ducts with pumps, valves, heat exchangers and other components becomes very complicated. Some simpli cation is achieved by considering
the advection of the temperature eld so that the temperature at one point depends on the history of that at another. This leads to interesting dynamics that
should be taken into account in designing a thermal control system. We can observe
some of these dynamics if we consider the performance of a PID controller acting
on a thermal system. Figure 8.1 shows the behavior of the experimental facility
shown in Fig. 2.6 subject to the e ect of delay. The gure on the top shows the
air outlet temperature and the bottom gure shows the air speed obtained with the
fan. Due to the e ect of the delay involved in the system, the controller is not
able to maintain a steady-state temperature. It lowers m_ a until the thermocouple
125

44

Tout [ C]

43
42

41
40
39
38
0

50

100

150

200

250

300

350

400

450

Air speed [m/s]

t [s]
3
2.5
2
1.5
1
0.5
0

50

100

150

200

250

300

350

400

450

t [s]

Figure 8.1. PID controller acting on a system with delay.


located at the end of the wind tunnel measures a temperature above the reference
value. During this period the mass of air that went through the HX gained a higher
temperature that is going to be measured some instants later by the thermocouple.
When the air speed is raised the hot mass of air is measured by the thermocouple
and the controller increases the m_ a signi cantly. Then the air temperature is lowered below the reference value and the controller lowers the air speed again. The
delay e ect becomes important again and the cycle is repeated. The system does
not go unstable because the fan can only work within some air speed range so that
the control action will not grow unbounded.
This is the kind of problem that is going to be addressed in this chapter. We will
focus on the simulation and control of the HX experimental facility shown in Fig.
2.6 but now considering the delay e ects. Although this is a particular problem,
it shares the essential characteristics of many other thermal processes in which the
delay e ect is present. A common feature of these problems is the nite time that
126

Table 8.1. Functional equations and di erential-di erence equations, t , t and t


> 0.
0

Type of equation

Algebraic
Ordinary di erential
Partial di erential
Integral
Integro-di erential
Retarded (delay)
Advanced
Neutral
Mixed

Example
x(2t) = 0:5 [x(t) + t]
x(t) = x_ (t=3) x(t 2)
@u = @u + u(x; t t )
0
@t
@xR
x(t) R= tt+1 k(s)x(s)ds
x_ (t) = tt r a(t u)g (x(u)) du
x(t) = x_ (t t1 ) x(t t2 )
y_ (t) = y (t + t0 )
x_ (t) C x_ (t t0 ) Dx(t t0 ) = 0
x_ (t) + Ax(t t0 ) + Bx(t + t0 ) = 0

a uid takes to traverse the length of a duct or a wind tunnel. Delay, of course, is
of signi cance only in the dynamics of time-dependent systems.
8.1 Delay equations and their applications
There are systems whose behavior depends signi cantly on past events or on some
other function of the present state. These are modeled by functional equations in
which the unknown function occurs with di erent arguments. An extensive literature on functional equations exists (see, for example, Hale and Lunel, 1993 and
Kuczma, 1968); some examples are given in the upper half of Table 8.1. A special
case of these equations is di erence equations (Bellman and Cooke, 1963), in which
the unknown function is evaluated at arguments of the form (t + constant ). The
equation may be algebraic or di erential. Di erential-di erence equations can be
classi ed, as shown in the lower half of Table 8.1, based on the sign of the constant.
We are interested here in delay equations (Driver, 1997; Gorecki et al., 1989) which
occur frequently in the analysis of thermal systems. In these the equation expresses
some derivative of the unknown function evaluated at one instant in terms of its
lower order derivatives, if any, at the same or earlier instants.
127

8.2 One-dimensional model


A simple lumped model (Sen, 2000) that allows us to analyze the e ects of delay
in a system can be considered as a body that gains heat by means of a heat source
Q(t) or loses heat to the surroundings at T1 when there is no heat source present
Mc

dT
dt

+ hA(T

T1 ) = Q(t)

(8.1)

where T (0) = Ti .
We nondimensionalize temperature, time and the heat transfer rate


=
q ( ) =


Tmax
hAt
Mc

Tmin
Tmin
Q

hA(Ti

T1 )

(8.2)
(8.3)
(8.4)

where Tmax and Tmin are the maximum and minimum temperatures that the system
can reach.
Thus the governing equation becomes
d
d

+  = q( )

(8.5)

where (0) = 1.
This simple one-dimensional model is used in the next sections to address problems of control of a system in which there is a delay e ect involved.
8.3 Heat exchanger control
The main goal of this chapter is to be able to control a system overcoming the delay
e ects. Here we present some numerical simulations and experimental results that
show that we can use techniques such as ANNs to obtain a desired performance of
a system.
128

0.9
0.8
0.7
0.6

0.5

0.4
0.3
0.2
0.1
0
0.10

=0.0
=0.5
=1.0
0.5

1.5

2.5

3.5

4.5

Figure 8.2. E ect of increasing delay with constant proportional gain. Kp = 3.


8.3.1 Proportional control with delay
A simple form of controlling a thermal system is by using a proportional control
scheme. We are going to assume that the sensor measures the temperature of the
body with a certain delay. Thus if we want to control the temperature of the system
we obtain the following relation
d
d

+  = Kp(s

 (

))

(8.6)

where is the delay involved. The solution of the equation is given by


 = ((0)

Kp s 
K
)
e + ps
1 + Kp
1 + Kp

(8.7)

where  satis es the transcendental equation


 + 1 + Kp e

=0

(8.8)

The results of the simulations show signi cant changes in the behavior of the
system when the delay e ect is considered. Figure 8.2 shows the e ect of increasing
129

1.2
1

Kp=10

0.8

0.6

Kp=5

0.4
0.2
0

Kp=1

0.2
0.4
0

0.2

0.4

0.6

0.8

1.2

1.4

1.6

1.8

Figure 8.3. E ect of increasing proportional gain with constant delay. = 0:2.
the delay in a proportional control scheme with constant gain, Kp = 3. The
curve with = 0 shows a typical rst order system transient behavior due to a step
function in the reference temperature. Since we are using proportional control with
a relatively low gain, there is an o set with respect to the reference temperature
s = 0:4. It is observed that as we increase the value of the delay, the system
becomes oscillatory for = 0:5, and nally unstable for = 1:0. Thus as the delay
increases Kp has to be decreased to maintain the stability of the system. This can
also be seen if we make an approximation of the eigenvalue  for small values of .
1 + Kp + :::
=
(8.9)
1 Kp
Figure 8.3 shows the e ect of increasing the proportional gain Kp at a constant
delay value of = 0:2. This plot validates the results obtained for the relation
between and Kp in proportional control.
130

=1
u

off

on

=0

Figure 8.4. System response to on-o control without delay.


8.3.2 On-o control
Another common control scheme for thermal systems is on-o control. In this
scheme the temperature is kept within a band characterized by an upper temperature u and a lower temperature l . If the measured temperature is below l the
heat source is turned on until the measured temperature is higher than u. The
frequency of oscillations of the temperature depends on the width of the dead band.
Thus, the governing equation becomes
(
1 on
d
+
=
(8.10)
d
0 o
Figure 8.4 shows the behavior of a thermal system when there is no delay involved. It is observed that the temperature uctuates between u and l and the
maximum and minimum temperatures are given by the steady-state value of the
temperature if the heat source is left on or o for a long period of time, respectively.
The total period of oscillations is
p = on + off

131

(8.11)

=1

1
u
1

2
l

=0

Figure 8.5. System response to on-o control with delay.


It can be shown that

on = ln

and
off

Thus

p = ln

1
1

l
u

(8.12)

= ln u

(8.13)

u (1 l )
l (1 u )

(8.14)

If we add the delay e ect, the amplitude and the period are modi ed. Figure
8.5 shows the new variables involved. It can be shown that
e 1
(8.15)
= ln l
l 1
1 + (u 1)e
= ln
(8.16)

1

Thus the total period now is given by:


0
0
p = on
+ off
+ 2 + 1 + 2

132

(8.17)

1 - 2

1
0.9
0.8
0.7
0.6
0.5
0.4
0.3

(a)

14
12
10
8
6
4
2
0

(b)

Figure 8.6. E ect of delay. (a) amplitude vs. delay; (b) period vs. delay.
or

u (1 l )(l e 1)(1 + (u 1)e )


+ 2
(8.18)
l (1 u )(l 1)
are the values of on and off for = 0 given in equations 8.12

p = ln

where on and off


and 8.13, respectively.
In order to obtain the amplitude of oscillations, 
0

1
2

= l e
= 1 + (u 1)e

2 , it can be shown that

(8.19)
(8.20)

(a) Numerical simulations

Using the model developed we analyze the e ect the delay acting on an on-o
control scheme. Figure 8.6(a) shows the variation of the amplitude,   , with
1

133

respect to the value of . For this example, u and l were chosen as 0:7 and 0:3,
respectively. It is observed that at = 0,   = u l . As the value of
is increased the amplitude increases with a negative exponent until it reaches the
maximum temperature di erence of the system. Figure 8.6(b) shows that the period
of the oscillation is proportional to the value of the delay. The period when = 0
corresponds to the system oscillating between u and l . It is also observed that the
closed loop is always stable independently of the value of .
1

(b) Model predictive control using arti cial neural networks

The last section determined that in the presence of delay, a system subject to
on-o control will oscillate with an amplitude larger than the desired dead band.
In order to keep the system within the desired temperatures we make use of model
predictive control. We model the behavior of the system by using an ANN that
predicts the values of the temperature units of time ahead. In this way the delay
involved in the measurement is cancelled and the system stays between the desired
temperature limits. The delay of the system is measured by taking the di erence
in time between the instant that the temperature measurement crosses the u (l )
and the instant in time in which  ( ) is reached.
The ANN used was a 2-5-5-1 for which the inputs were (  ), ( ) and the
output was ( +  ), where  is a small increment in time. The system model
is given by Eq. 8.10.
Figure 8.7 shows the comparison of the on-o control acting with and without
the ANN predictive model. The delay used was = 0:5, and u = 0:7 and l = 0:2.
It is observed that the ANN model allows the on-o action to occur so that the
system can stay within the dead band. On the other hand the conventional on-o
control shows a larger amplitude with a corresponding larger period of oscillation.
1

134

0.9
0.8
0.7

0.6
0.5
0.4
0.3
0.2
0.1

10

15

Figure 8.7. Model predictive control using ANNs. | ANN model with on-o
control; - - conventional on-o control.
8.4 Experimental results
Our main goal in this chapter is to be able to improve the performance of on-o
controllers in real thermal systems in the presence of delay. Therefore we apply the
concepts developed in the previous sections of this chapter to our experimental testing facility and compare the results obtained with the simulations. There are some
issues involved in the experimental facility that are not present in the simulations
performed. Some of them are nonlinearities, thermal inertia, delay in the reaction
of the actuators, just to mention a few. This means that now the controllers will
have to overcome all this diculties in order to match the desired performance.
8.4.1 Proportional control
a
We start by applying proportional control to drive the outlet air temperature Tout
coming out of our wind tunnel. We used a built-in subroutine of LabVIEW. We

135

42.5

42

42

42

41.5

41.5

41.5

41

41

41

40.5

40.5

40.5

40

40

40

39.5

39.5

39.5

Tout [ C]

42.5

39 0

100 200

300

39

42.5

100 200

300

39 0

100 200

300

v a [m/s]

t [s]
2.5

2.5

2.5

1.5

1.5

1.5

0.5

0.5

0.5

00

100 200

300

100 200

300

00

100 200

300

t [s]
(a)

(b)

(c)

Figure 8.8. Proportional control with di erent gains. (a) Kp = 0:033; (b) Kp = 0:1;
(c) Kp = 20.
tested several values of the proportional gain and analyzed the results.
Figure 8.8 shows the behavior of the experimental facility subject to proportional
a =
control with di erent values of the gain Kp. The reference temperature was Tout
a and the plots of the bottom show
40C. The plots on the top show the value of Tout
the air speed, va . It is seen how the proportional controller with small or large gains
is not able to maintain the system at a constant air outlet temperature. The outlet
temperature oscillates and deviates from the reference value in as much as 2C. It
is also observed how va also oscillates with the corresponding increase in the energy
consumption and wear of the actuators. Although in Fig. 8.8(a) the magnitude
of the oscillations seems to be decreasing, the e ect of having a low proportional
136

gain implies that the o set will be large so that the reference temperature is not
reached. On the other hand, Figures 8.8(b) and 8.8(c) show that as the air speed
increases because of the higher gain, the system is cooled down to a value lower
than the reference temperature and the temperature oscillates between higher and
lower values of the reference temperature.
Thus, this type of control scheme does not perform well in the presence of delay.
The system does not go unstable because the actuators have only a range of speeds
that can be reached so that the control action cannot become unbounded.
8.4.2 Proportional-integral-derivative control
The addition of integral and derivative action to the controller is analyzed in this
section. This is done because PID controllers are one of the most common type
of controlling schemes used in the process industry. Figure 8.1 shows the behavior
of the experimental facility subject to PID control. In this experiment Kp = 0:1,
i = 0:1 and d = 0:07 and were obtained according to the optimum controller
a = 40 C.
settings described in Shinskey (1988). The reference temperature was Tout
It is seen that the integral and derivative action do not improve the behavior of the
controller with respect to the proportional controller analyzed before.
It can be stated then that PID controllers do not behave well when there is a
signi cant change in the characteristics of a system. The presence of delay modi es
the behavior of the system in an important manner. This is mainly because PID
reacts to changes in the value of the error with respect to the reference temperature.
There is no model used that can provide an air speed that corresponds to a certain
temperature so the controller will only react to changes in the system. If the changes
are measured a long time after they have occurred, the control action is applied at
an inappropriate instant and the performance of the system is diminished.
137

8.4.3 On-o control


In this section we apply on-o control to the our experimental facility. We study
the e ects of delay due to slow air speeds and also the delay introduced by the slow
reaction of some of the actuators such as the electronic valve used to control the
water ow rate, m_ w .
(a) Comparison with analytical model

As we mentioned before there are physical phenomena present in the experimental facility that were not considered in the simple model derived in Section 8.3.2.
However, we want to compare the results of the simulations with the experiments so
that we can have an idea of how close our predictions can be with a simple model.
Since now we want to apply on-o control to our experimental facility, the air
speed is no longer our control variable. The air speed will modify the value of the
delay but we will use the water mass ow rate m_ w as the source of heat to our
system. In this way and for di erent values of va we test the on-o control by
opening or shutting down the electronic valve that modi es m_ w .
As we need to compare the results of experiments and simulations, we need to obtain the values of the parameters that allow us to nondimensionalize the equations.
First we obtain Tmax and Tmin in Eq. 8.2 so that we can generate the nondimensional
temperatures.
We also need to obtain the value of the dimensional quantity hA=Mc in Eq.
8.3. We performed several tests to obtain these quantities. At di erent values of
va we closed the valve 100% and let the system stabilize. When the temperature
becomes constant we open the valve 50% of its range and we let the system get to
steady-state. After the system was at steady state at its maximum value Tmax we
shut down the valve and waited until the temperature stabilizes at Tmin . We took
138

3
2.5

Ln(|T(t)-T |)

2
1.5
1

0.5
0

0.5
1
1.5
2

100

200

300

400

500

600

Figure 8.9. Slopes of temperature vs. time for di erent values of air speed. - cooling process; | heating process.
a for six di erent values of v .
measurements of the transient values of Tout
a
Since the governing equation of the model is given by

hAt
hA
)
exp(
)
T (t) T1 = C exp(
Mc
Mc

we can obtain the values of hA=Mc by plotting the slopes of ln(jT (t)

(8.21)
T1 j) vs. t.

Figure 8.9 shows the results obtained for the di erent tests performed. It is
seen how opening the valve has a di erent time constant than closing the valve,
the latter being slower. This is mainly because of the slow reaction of the valve.
When the valve is shut down the outlet air temperature is close to the environment
temperature. A slight opening of the valve lets a mass of water at the temperature
a starts increasing almost instantly.
of the heater to ow through the HX and Tout
139

18

16

16

Amplitude [ C]

Amplitude [ C]

18
14
12
10
8
6
4
20

40

60

80

14
12
10
8
6
4
200

100

300

1200

500

1000

Q [W]

Period [s]

600

300
200
20

500

600

(c) Period [s]

(a) Delay [s]

400

400

800
600

40

60

(b)

80

100

Delay [s]

400
0.4

0.6

0.8

(d)

va [m/s]

Figure 8.10. Comparison between experiments and simulations. 4 experiments; -omodel.


On the other hand, the e ect of closing the valve is not really felt until the valve
is almost entirely closed, since at that point there is almost no ux of water going
through the HX and only the energy stored in the mass of water that remains in
the HX is removed.
With the normalization parameters we compare the experimental and simulation
results. Figure 8.10 shows the comparison using dimensional quantities. Figure
8.10(a) shows that the model overpredicts the amplitude of oscillations of the temperature. Figure 8.10(b) shows that the period is also overpredicted by the model
but it follows the general trend. The di erence can be best seen in Fig. 8.10(c) where
amplitude is plotted against the period. Thus, this model does not give an accurate
140

prediction of the experimental facility. Figure 8.10(d) shows the experimental value
of the average heat transfer rate during a period at di erent air speeds. It is observed how it follows a certain trend and there are no abrupt changes in the curve
as it is seen in the plot of period vs. delay at high values of va . The experiments
were performed twice and the same behavior was observed so that the change in
the behavior is not due experimental error.
The main di erences between the testing facility and the model are the nonlinearities involved in the thermal system, the thermal inertia of the HX, the change
of the value of the uid properties with respect to temperature, the delay in the
reaction of the actuators, and the fact that in the model the delay was considered to
be the same for heating and cooling. In Section 8.3.2 we explained the way in which
the delay was being measured but Fig. 8.11 shows that the delay measured is not
the same when heating than when cooling. This can be explained if we consider
that as we increase the air speed the maximum temperature (heating) reached by
the system being controlled by an on-o scheme decreases approaching the upper
bound of the dead band until it is no longer possible to reach this temperature. At
this point the delay measured on the maximum temperature tends to zero. On the
other hand, the minimum temperature (cooling) reached by the system approaches
the lower bound of the dead band, from below, as the air speed is increased but
it never reaches this temperature. If the air speed is increased further the minimum temperature will decrease again because of the larger heat transfer rate that
is acting. Thus, the system behaves in an asymmetric way with respect to the dead
band. This is because of the way that we are measuring the delay, the air speed
is not the only variable a ecting . We are measuring the combination of di erent
physical phenomena that a ect the reaction of the thermal system to changes in
the variables.
141

100
90
80

Delay [s]

70
60
50
40
30
20
10

0.3

0.4

0.5

0.6

0.7

0.8

0.9

Air speed [m/s]

Figure 8.11. Measured value of the delay. -4- heating; -o- cooling.

142

Therefore, the model would need include more of the physics of the thermal
system in order to provide a better prediction of the amplitude and period of the
oscillations. Thus, if we want to be able to predict the behavior of the system in
order to perform model predictive control using the on-o scheme, we would need
to improve our model. An alternative is to use ANNs to simulate the behavior of
the system and then use this model to control the thermal system.
(b) Model predictive control using arti cial neural networks

In the last section we showed how a simple model of the system with delay did
not give accurate results. Numerical methods can provide an accurate prediction
but they are time consuming and therefore, not suitable for control purposes.
In this section we use ANNs to provide a model of the system that predicts
its behavior considering the delay e ects. The procedure and network structure
used is similar to the one used in Section 8.3.2. Figure 8.12 shows the results of
on-o control with and without the ANN model. The dashed line corresponds to
the conventional scheme and the solid line corresponds to the scheme using the
prediction of the ANN model. It is observed how the system controlled with a
model remains within the dead band also shown in the gure. The asymmetric
behavior of the system with respect to the dead band is also observed.
Due to the fact that with the ANN model we can predict the behavior of the
thermal system to cancel the delay e ect, we can send a controlling action to the
actuators at the time when it is really needed. This fact can be shown in Fig. 8.13
in which the non dimensional values of temperature and water ow rate are shown
together for both of the tested control schemes. The solid line corresponds to the
nondimensional temperature and the dashed line to the nondimensional water ow
rate. Figure 8.13(a) shows the instant in which the valve is opened and closed for
143

40
39
38

a
Tout [ C]

37
36
35
34
33
32
31
30

100

200

300

400

500

600

700

800

900

1000

t [s]

Figure 8.12. Comparison of on-o control schemes. - - conventional control; |


control with ANN model.

144

0.9

0.9

0.8

0.8

0.7

0.7

0.6

0.6

0.5

0.5

0.4

0.4

0.3

0.3

0.2

0.2

0.1

0.1

300

400

500

600

700

200

250

300

t [s]

350

400

t [s]

(a)

(b)

Figure 8.13. Opening and closing of valve for on o control. - - nondimensional


a .
m_ w ; | nondimensional Tout
the conventional on-o controller. Figure 8.13(b) shows the same information for
the controller using a model. It is observed that for the conventional case, the valve
is opened or closed after the system crosses the bounds of the dead band. On the
other hand, the ANN model allows the controller to open and close the valve before
the system reaches the bounds of the dead band so that it stays within the desired
temperatures.

145

8.5 Conclusions
The problem of control of a thermal system in the presence of delay e ects is
analyzed in this chapter. A simple lumped model is used to show the change in the
dynamics of a system when a delay term is added to the equations. It is shown that
to maintain the closed-loop stability of a proportional control scheme acting on the
model, the proportional gain has to be made smaller as the delay term acting on
the system is increased. It is also shown that the amplitude grows with a negative
exponential rate and the period increases with the delay value. The results obtained
with the model are validated using proportional and proportional-integral-derivative
control schemes applied to our heat exchanger testing facility.
On-o control is also tested. First we expand the simple lumped model to
account for on-o control with and without delay. It is found that the controller is
always stable independently of the value of the delay. The simulations show that the
amplitude and period of the oscillations increase with larger values of the delay term.
Model predictive control is used to obtain the temperature of the system subject to
delay e ects. The model used is an arti cial neural network and once it is trained it
is used to help the controller to keep the system within the bounds of the dead band.
It is shown how the dynamic system stays within the dead band when the ANN
model is used. The numerical simulations are validated by applying model predictive
control to the experimental facility. Once again the controller with the ANN model
is able to maintain the experimental facility within the desired temperature range.
Conventional on-o control fails to match the desired performance as the amplitude
of oscillations of the temperature is larger than the dead band.

146

CONCLUSIONS
This work has presented the application of the arti cial neural networks technique
to problems of simulation and control of thermal components. The goal of the
dissertation was to provide a new tool to analyze and control thermal systems that
in general are too complex to be analyzed in terms of rst principles considering
also a relatively short computational time that will allow to perform control tasks
with the models used. The idea of this work is to provide a tool that can be used
as an alternative to conventional techniques, or as a complement for the analysis
already performed with the more traditional techniques. In the case where ANNs
can provide an improvement of the predictions with conventional tools, their use
is encouraged. However, the understanding of the physics involved in a particular
phenomenon being studied should always be the rst step taken. If there is a
certain phenomenon that is not well understood, ANNs can provide an excellent
way of obtaining a model.
This work has shown that ANNs are able to predict steady-state and dynamic
behavior of heat exchangers. Analytic and numerical tests are provided to show
important issues such as accuracy of the prediction, e ect of variation of the ANN
parameters, performance of neurocontrollers and stability of closed loop systems
that contain ANNs as plant models and controllers of physical systems. The analytic results are also validated in a real testing facility. It is found that the theory
developed and the analytic results match well with the experimental results obtained. Comparison with respect to standard control techniques such as PID and
147

on-o controllers are also provided. It is shown that in general, ANNs can be used
with excellent results at operating conditions in which the conventional control
schemes are inadequate.

148

RECOMMENDATIONS
Through out the development of this dissertation, many issues about ANNs and its
application to thermal systems are addressed. However, there are many questions
that still have to be answered in the context ANNs, heat transfer and controls. In
this section we provide some possible recommendations for future work.
There are many issues about arti cial neural networks that are not completely understood yet. Although there are some studies that analyze the storage capacity of ANNs it would be interesting to perform a detailed analysis of what are the main advantages or disadvantages
of having more hidden layers in a ANN. Also, the issue of how many nodes
per layers should be used to represent a certain set of data is still a question
to be answered. Although in this work we perform some tests with di erent
normalization ranges it is not clear what range of normalization should be
used to train a network. During the training process a learning rate has to
be chosen for backpropagation or conventional gradient descent algorithms.
Di erent analysis have been done that include adaptiveness of this parameter.
The possibility of nding an optimal value of this parameter should also be
analyzed in order to reduce the learning process period without harming the
accuracy and convergence of the algorithm.

Arti cial neural networks

Heat exchangers

Although, some work has been done in this area, the optimization of the HX geometry can still be pursued by using ANNs. The in149

formation about a n spacing, tube arrangements, number of rows, etc., can


be supplied to an ANN so that maximum values of heat transfer rates can be
sought depending on the values of these physical parameters. The information
obtained from a few HXs can be used to interpolate between these values and
predict the heat transfer rates of HXs with parameters in between the ones
for which there are measurements available. This methodology will reduce
the costs of manufacturing many HXs with di erent values of the physical
parameters.


Thermal control The control of di erent thermal components interacting in a

thermal system is another application that would be worth testing. Hydrodynamic components such as the action of pumps, valves, fans, ow meters
can also be studied together to analyze the in uence of this devices in the
behavior of HXs. The comparison between training an ANN to simulate and
control the characteristics of the overall thermal system and the simulation
and control of each component of the system separately, would provide some
insight of how to use the ANN control capabilities.
Finally, the application to the problem of prediction and
control of thermal networks in which a variety of thermal components are
connected together is the natural next step in the use of ANNs in heat transfer
problems.
Thermal networks

150

REFERENCES
Abe, N., Seki, K. and Kanoh, M., 1994. Internal model control for single tubular heat exchanger system, Proceedings of IECON, International Conference on
Industrial Electronics, Control and Instrumentation, Vol. 2, pp. 1165{1170.
Afgan, N. and Carvalho, M. 1998. Con uence-based expert system for the detection
of heat exchanger fouling. Heat Transfer Engineering. Vol. 19, No. 2, pp. 28{35.
Ahmed, O., Mitchell, J.W., Klein, S.A., 1996. Application of general regression
neural network (GRNN) in HVAC process identi cation and control. ASHRAE
Transactions. Vol. 102, No. 1, pp. 1{10.
Alcock, J.-L., Webb, D.R., Botsch, T.W., and Stephan, K., 1997. An experimental
investigation of the dynamic behavior of a shell-and-tube condenser. International Journal of Heat and Mass Transfer. Vol. 40, No. 17, pp. 4129{4135.
Alvarez-Ramirez, J., Cervantes, I., and Femat, R., 1997. Robust controllers for a
heat exchanger. Ind. Eng. Chem. Res. Vol. 36, pp. 382{388.
Angeline, P.J., Saunders, G.M., and Pollack, J.B. 1994. Complete induction of
recurrent neural networks. In The Third Annual Conference on Evolutionary
Programming. Eds. A.V. Sebald, L.J. Fogel, World Scienti c, Singapore.
Ayoubi, M., 1997. Dynamic multi-layer perceptron networks: application to the
nonlinear identi cation and predictive control of a heat exchanger, Applications
of Neural Adaptive Control Technology, World Scienti c Series in Robotics and
Intelligent Systems, Vol. 17, pp. 205{230.
151

Bagby, G. and Cormier, R.A. 1989. Heat exchanger expert system. In Proceedings
of the ASME Computers in Engineering Division. pp. 461-467, ASME, New
York, NY.
Barron, A.R., 1993. Universal approximation bounds for superpositions of a sigmoidal function, IEEE Transactions on Information Theory, Vol. 39, No. 3, pp.
930-945.
Bath, N. and Macavoy, T.J., 1990. Use of neural nets for dynamical modeling and
control of chemical process, Computers and Chemical Engineering, Vol. 14, pp.
573{583.
Bellman, R. and Cooke, K.L., 1963. Di erential- Di erence Equations, New York,
Academic Press.
Bittanti, S. and Piroddi, L., 1997. Nonlinear identi cation and control of a heat
exchanger: A neural network approach. J. Franklin Inst. Vol. 334B, No. 1, pp.
135{153.
Blazina, A. and Bolf, N., 1997. Neural network-based feedforward control of twostage heat exchange process, Proceedings of the IEEE International Conference
on Systems, Man and Cybernetics, Vol. 1, pp. 25{29.
Bogataj, L. and Cibej, J.A., 1994. Perturbations in living stock and similar biological inventory systems, International Journal of Production Economics, Vol. 35,
No. 1-3, pp. 233{239.
Brogan, W.L., 1974. Modern control theory, Quantum Publishers, New York.
Buonopane, R.A., 1991. Computer data acquisition and process control for undergraduate heat exchanger experiments. ASEE Annual Conference Proceedings.
pp. 1546{1551.

152

Cavalcanti, S. and Belardinelli, E., 1996. Modeling of cardiovascular variability using a di erential delay equation, IEEE Transactions on Biomedical Engineering,
Vol. 43,No. 10, pp. 982{989.
Chen, C.T, Hwu, J, and Chang W.D., 1999. Nonlinear process control based on
using an adaptive single neuron. J. Chin. Inst. Chem. Engrs., Vol. 30, No. 2,
pp. 141-149.
Cohen, W.C., and Johnson, E.F., 1956. Dynamic characteristics of double-pipe
heat exchangers. Industrial and Engineering Chemistry. pp. 1031{1034.
Courtemanche, M., Keener, J.P. and Glass, L., 1996. Delay equation representation of pulse circulation on a ring in excitable media, SIAM Journal on Applied
Mathematics, Vol. 56, No. 1, pp. 119{142.
Curtiss, P.S., Shavit, G., and Kreider, J.F., 1996. Neural networks applied to
buildings-A tutorial and case studies in prediction and adaptive control. ASHRAE
Transactions. Vol. 102, No. 1, pp. 1{5.
Delgado, A., 1998. Stability analysis of neurocontrol systems using a describing
function, Proceedings of 1998 IEEE International Joint Conference on Neural
Networks, IEEE World Congress on Computational Intelligence, Vol. 3, pp. 2126{
2130.
Daz, G. , Yanes, J., Sen, M., Yang, K.T., and McClain, R.L., 1996. Analysis of data
from single-row heat exchanger experiments using an arti cial neural network,
Proceedings of the ASME Fluids Engineering Division, International Mechanical
Engineering Congress and Exhibition, Atlanta, GA, FED-Vol. 242, American
Society of Mechanical Engineering, New York, NY, pp. 45{52.
Daz, G., Sen, M., Yang, K.T. and McClain, R.L., 1999. Simulation of heat
exchanger performance by arti cial neural networks, International Journal of
HVAC&R Research, Vol. 5, No. 3, pp. 195{208.
153

Daz, G., Sen, M., Yang, K.T. and McClain, R.L., 2000a. Use of arti cial neural
networks for temperature control, 4th ISHMT/ASME Heat and Mass Transfer
Conference, Pune,India, Jan. 5{7.
Daz, G., Sen, M., Yang, K.T. and McClain, R.L., 2000b. Dynamic prediction and
control of heat exchangers using arti cial neural networks, submitted for review.
Daz, G., Sen, M., Yang, K.T. and McClain, R.L., 2000c. Stabilization of thermal
neurocontrollers, submitted for review.
Daz, G., Sen, M., Yang, K.T. and McClain, R.L., 2000d. Adaptive neurocontrol of
heat exchangers, submitted for review.
Dingankar, A.T., 1999. The unreasonable e ectiveness of neural network approximation. IEEE Transactions on Automatic Control. Vol. 44, No. 11, pp. 2043{
2044.
Drago, G.P., and Ridella, S. 1992. Statistically controlled activation weight initialization (SCAWI). IEEE Transactions on Neural Networks. Vol. 3, No. 4, pp.
627{631.
Ding, Y., and Wong, K.V., 1990. Control of a simulated dual-temperature hydronic
system using a neural network approach. ASHRAE Transactions. pp. 727{732.
Driver, R.D., 1977. Ordinary and Delay Di erential Equations, Springer-Verlag,
New York.
Famularo, J.R., 1987. A computer-controlled heat exchange experiment. Chemical
Engineering Education. pp. 84{88.
Gartner, J.R., and Harrison, H.L, 1965. Dynamic characteristics of water-to-air
cross ow heat exchangers. Transactions of ASHRAE. Vol. 71, pp. 212{223.
Gauthier, D., Flamant, G., and Bonvin, D., 1992. Dynamic behavior of a perforatedplate multistage uidized-bed heat exchanger. Chemical Engineering and Processing. Vol. 31, pp. 349{361.
154

Gorecki, H., Fuksa, S., Grabowski, P. and Korytowski, A., 1989. Analysis and
Synthesis of Time Delay Systems, John Wiley & Sons, Chichester.
Gutierrez, L.B., Lewis, F.L. and Lowe, J.A., 1998. Implementation of a neural
network tracking controller for a single exible link: comparison with PD and
PID controllers, IEEE Transactions on Industrial Electronics, Vol. 45, No. 2, pp.
307{318.
Hale, J. and Kocak, H., 1991. Dynamics and bifurcations. Springer-Verlag, New
York.
Hale, J.K. and Sternberg, N., 1988. Onset of chaos in di erential delay equations,
Journal of Computational Physics, Vol. 77, pp. 221{239.
Hale, J.K. and Lunel, S.M., 1993. Introduction to Functional Di erential Equations,
Springer-Verlag, New York.
Harriot, P., 1983. Process control, McGraw-Hill Co., New York.
Haykin, S., 1994. Neural Networks, A Comprehensive Foundation, Macmillan College Publ. Co., New York.
Hecht-Nielsen, R., 1987. Kolmogorov's mapping neural network existence theorem,
1st International Conference on Neural Networks, IEEE, pp. III/11{13.
Hornik, K., 1989. Multilayer feedforward networks are universal approximators,
Neural Networks, Vol. 2, pp. 359{366.
Huang, G., Nie, L., Zhao, Y., Yang, W., Wu, Q., and Liu, J., 1991. Temperature
control system of heat exchangers. An application of DPS theory, Lecture Notes
in Control & Information Sciences, Vol. 159, pp. 68{76.
Huang, S.-H., Nelson, R.M., 1994. Delay time determination using an arti cial
neural network. ASHRAE Transactions. Vol. 100, No. 1, pp. 831{840.
Hunt, K.J. and Sbarbaro, D., 1991. Neural networks for nonlinear model control,
IEE Proceedings-D, Vol. 138, No. 5, pp. 431{438.
155

Hunt, K.J., Sbarbaro, D., Zbikowski, R., and Gawthrop, P.J., 1992. Neural Networks for control systems - A survey Automatica. Vol. 28, No. 6, pp. 1083{1112.
Hrycej, T., 1995. Stability and equilibrium points in neurocontrol, Proceedings of
1995 IEEE International Conference on Neural Networks, Vol. 1, pp. 617{621.
Incropera F., and De Witt, D., 1990. Fundamentals of Heat and Mass Transfer.
3rd Ed., John Wiley & Sons, New York.
Irwin, G.W., Warwick, K., and Hunt, K.J., 1995. Neural Network Applications in
Control. Short Run Press Ltd., Exeter.
Jambunathan, K., Hartle, S.L., Ashforth-Frost, S., and Fontama, V.N., 1996. Evaluating convective heat transfer coecients using neural networks. International
Journal of Heat and Mass Transfer. Vol. 39, Vol. 11, pp. 2329-2332.
Jeanette, E., Assawamartbunlue, K., Curtiss, P. and Kreider, J.F., 1998. Experimental results of a predictive neural network HVAC controller, ASHRAE Transactions, Vol. 104, No. 2, pp. 192{197.
Jin, L., Gupta, M. and Nikiforuk, P., 1993. Stable dynamic backpropagation using constrained learning rate algorithm, Proceedings of 1993 International Joint
Conference on Neural Networks, Vol. 1, pp. 2654{2657.
Kabelac, S., 1989. The transient response of nned cross ow heat exchangers.
International Journal of Heat and Mass Transfer. Vol. 32, No. 6, pp. 1183{
1189.
Kakac, S., Bergles, A.E., Mayinger, F., 1981. Heat exchangers: thermal-hydraulic
fundamentals and design, Hemisphere Pub. Corp, Washington, D.C.
Kawashima, M., Dorgan, C.E., and Mitchell, J.W., 1996. Optimizing system control
with load prediction by neural networks for and ice-storage system. system using
a neural network approach. ASHRAE Transactions. Vol. 102, No. 1, pp. 1169{
1178.
156

Kiong T.K., Quing-Guo, W., Chieh, H.C., and Hagglund, T., 1999. Advances in
PID control, Springer, London.
Kreider, J.F., Claridge, D.E., Curtiss, P., Dodier, R., Haberl, J.S., Krarti, M., 1995.
Building energy use prediction and system identi cation using recurrent neural
networks. Journal of Solar Energy Engineering. Vol. 117, pp. 161{166.
Kuczma, M., 1968. Functional Equations in a Single Variable, PWN-Polish Scienti c Publishers, Warsaw.
Landau, I.D., Lozano, R., and M'Saad, M., 1998. Adaptive control, Springer-Verlag,
London.
Lavric, E.-D., Lavric, V., Muntean, O., and Danciu, E., 1994. Auto-organising
algorithm for design of n heat exchanger. Revue Roumaine de Chimie. Vol.
39, No. 11, pp. 1241{1256.
Lavric, D., Lavric, V., Woinaroschy, A., and Danciu, E., 1995. Designing n heat
exchanger with a neural network. Revue Roumaine de Chimie. Vol. 40, No. 6,
pp. 561{565.
Lees, S., and Hougen, J.O., 1956. Pulse testing a model heat exchange process.
Industrial and Engineering Chemistry. Vol. 48, No. 6, pp. 1064{1068.
Lehtokangas, M., Saarinen, J., and Kaski, K. 1995. Initializing weights of a multilayer perceptron network by using the orthogonal least squares algorithm. Neural
Computation. Vol. 7, pp. 982-999.
Luyben, M.L., and Luyben, W.L., 1997. Essentials of Process Control McGraw-Hill
Companies, Inc., New York.
Miller, W.T., Sutton, R.S., Werbos, P.J., 1990. Neural Networks for Control, The
MIT Press, Cambridge.
Morari, M. and Za riou, E., 1989. Robust Process Control, Prentice-Hall.
157

Mozley, J. M., 1956. Predicting dynamics of concentric pipe heat exchangers. Industrial Engineering Chemistry. pp. 1035{1041.
Nahas, E.P., Henson, M.A. and Seborg, D.E., 1992. Nonlinear internal model control strategy for neural network models, Computers in Chemical Engineering,
Vol. 16, No. 12, pp. 1039{1057.
Narendra, K.S., and Parthasarathy, K., 1990. Identi cation and control of dynamical systems using neural networks. IEEE Transactions on Neural Networks.
Vol. 1, No. 1, pp. 4{27.
Ogunnaike, B.A., and Ray, W.H., 1994. Process dynamics, modeling, and control,
Oxford University Press, New York.
Pacheco-Vega, A., Daz, G., Sen, M., Yang, K.T. and McClain, R.L., 2000. Heat
rate predictions in humid air-water heat exchangers using correlations and neural
networks, submitted for review.
Pierre, D.A., 1986. Optimization Theory with Applications, Dover Publications,
Inc., New York.
Pineda, F., 1987. Gereralization of back-propagation to recurrent neural networks,
Physical Review Letters, Vol. 59, No. 19, pp. 2229{2232.
Psichogios, D., and Ungar, L.H., 1991. Direct and indirect model based control
using arti cial neural networks. Ind. Eng. Chem. Res. Vol. 30, pp. 2564{2573.
Rahman, F., and Devanathan, R., 1995. Feedback linearisation of a heat exchanger.
Systems and Control Letters. Vol. 26, pp. 203{209.
Roetzel, W. and Xuan, Y., 1999. Dynamic Behaviour of Heat Exchangers, WIT
Press, Boston.
Rohrs, C.E., Melsa, J.L., and Schultz, D.G., 1993. Linear Control Systems. McGrawHill, Inc., New York.
158

Ros, S., Jallut, C., Grillot, J.M., and Amblard, M., 1995. A transient-state technique for the heat transfer coecient measurement in a corrugated plate heat
exchanger channel based on frequency response and residence time distribution.
International Journal of Heat and Mass Transfer. Vol. 38, No. 7, pp. 1317{1325.
Rumelhart, D.E., Hinton. G.E., and Williams, R.J., 1986. Learning internal representations by error propagation , in Parallel Distributed Processing: Explorations
in the Microstructures of Cognition, Vol. 1, MIT Pres, Cambridge, MA.
Saman, N. and Mahdi, H., 1996. Analysis of the delay hot/cold water problem,
Energy, Vol. 21, No. 5, pp. 395{400.
Sen, M., 2000. Intermediate Heat Transfer notes. Department of Aerospace &
Mechanical Engineering, University of Notre Dame.
Sen, M. and Yang, K.T., 2000, Applications of arti cial neural networks and genetic algorithms in thermal engineering, CRC Handbook of Thermal Engineering,
Section 4.24, (editor) F. Kreith, pp. 620{661.
Shilling, G.D., 1963. Process dynamics and control, Holt, Rinehart and Winston,
New York.
Shinskey, F.G., 1988. Process-Control Systems. Application, Design, and Tuning
McGraw-Hill Companies, 3rd Ed., New York.
Skapura, D. M., 1996. Building Neural Networks. ACM Press, Addison-Wesley
Publishing Company, New York.
Spiga, G., and Spiga, M., 1987. Two-dimensional transient solutions for cross ow
heat exchangers with neither gas mixed. Journal of Heat Transfer. Vol. 109,
pp. 281{286.
Spiga, M., and Spiga, G., 1988. Transient temperature elds in cross ow heat
exchangers with nite wall capacitance. Journal of Heat Transfer. Vol. 110, pp.
49{53.
159

Spiga, M., and Spiga, G., 1992. Step response of the cross ow heat exchanger with
nite wall capacitance. International Journal of Heat and Mass Transfer. Vol.
35, No. 2, pp. 559{565.
Taylor, J.G., 1996. Neural Networks and their applications. John Wiley and Sons,
Chichester.
Thal-Larsen, H., 1960. Dynamics of heat exchangers and their models. Transactions
of ASME, Journal of Basic Engineering. pp. 489{504.
Thibault, J., and Grandjean, B., 1991. A neural network methodology for heat
transfer data analysis. International Journal of Heat and Mass Transfer. Vol.
34, No. 8, pp. 2063{2070.
Tikhomirov, V. M., 1991. Selected Works of A.N. Kolmogorov. Vol. 1, Kluwer
Academic Publishers, Dordrecht.
Warwick, K, Irwin, G.W., and Hunt, K.J., 1992. Neural networks for control and
systems Short Run Press Ltd., Exeter.
Werner, B., 1996. International Workshop on Neural Networks for Identi cation,
Control, Robotics, and Signal/Image Processing , Venice, IEEE Computer Society Press, CA.
Wessels L., and Barnard, E. 1992. Avoiding false local minima by proper initialization of connections. IEEE Transactions on Neural Networks. Vol. 3, No. 6, pp.
899-905.
Yamashita, H., Izumi, R., and Yamaguchi, S., 1978. Analysis of the dynamic characteristics of cross- ow heat exchangers with both uids unmixed. Bulletin of
the JSME. Vol. 21, No. 153, pp. 479{485.
Yang, X., Yang, G., and Wang, Y., 1995. Plate heat exchanger temperature computer control system. Heat and Mass Transfer. Vol. 30, pp. 279{282.
160

Yoshifusa, I., 1995. Approximation capability of layered neural networks with sigmoid units on two layers. Neural Computation. Vol. 7, pp. 982{999.
Zhang, Z. and Nelson, R.M., 1992. Parametric analysis of a building space conditioned by a VAV system, ASHRAE Transactions, Vol. 98, No. 1, pp. 43{48.
Zhao, X., 1995. Performance of a Single-Row Heat Exchanger at Low In-Tube
Flow Rates, M.S. Thesis, Department of Aerospace and Mechanical Engineering,
University of Notre Dame, Notre Dame, Indiana.

161

You might also like