AC LAB Exp.5
AC LAB Exp.5
Theory:-
Temperature Control in a Heat Exchanger
This example shows how to design feedback and feedforward compensators to regulate the
temperature of a chemical reactor through a heat exchanger.
Heat Exchanger Process
A chemical reactor called “stirring tank” is depicted below. The top inlet delivers liquid to be mixed
in the tank. The tank liquid must be maintained at a constant temperature by varying the amount
of steam supplied to the heat exchanger (bottom pipe) via its control valve. Variations in the
temperature of the inlet flow are the main source of disturbances in this process.
Feedback Control
A block diagram representation of the open-loop process is shown below.
The transfer fiction
Gp(s) = (e ^ (- 14.7s))/(21.3s + 1)
models how a change in the voltage V driving the steam valve opening affects the tank temperature
T, while the transfer function
Gd(s) = (e ^ (- 35s))/(25s + 1)
models how a change in inflow temperature affects T. To regulate the tank temperature T around.A
given setpoint Tsp, we can use the following feedback architecture to control the valve opening
(voltage V):
MATLAB Programming:-
clc
clear all
s=tf('s');
Gp=exp(-14.7*s)/(21.3*s+1);
tau=21.3000;
theta=14.7000;
Kc=0.859*(theta/tau)^(-0.977);
tauc=(tau/0.647)*(theta/tau)^0.680;
C=Kc*(1+1/(tauc*s));
Tfb=feedback(ss(Gp*C),1);
step(Tfb),grid on
title('Response to step change in temprature setpoint T_(sp)')
ylabel('Tank temprature')
margin(Gp*C), grid
OUTPUT:-
Reducing the proportional gain Ke strengthens stability at the expense of
performance.
MATLAB Programming:-
clc
clear all
s=tf('s');
Gp=exp(-14.7*s)/(21.3*s+1);
tau=21.3000;
theta=14.7000;
Kc=0.859*(theta/tau)^(-0.977);
tauc=(tau/0.647)*(theta/tau)^0.680;
C=Kc*(1+1/(tauc*s));
Tfb=feedback(ss(Gp*C),1);
step(Tfb),grid on
title('Response to step change in temprature setpoint T_(sp)')
ylabel('Tank temprature')
margin(Gp*C),grid
C1 = 0.9 * (1 + 1/(tauc*s)); % reduce Kc from 1.23 to 0.9
margin(Gp*C1), grid
step(Tfb,'b', feedback(ss(Gp*C1),1),'r')
legend('Kc = 1.23','Kc = 0.9')
OUTPUT:-
Feedforward Control
Recall that changes in inflow temperature are the main source of temperature fluctuations in the
tank. To reject such disturbances, an alternative to feedback control is the feedforward architecture
shown below:
In this configuration, the feedforward controller F uses measurements of the inflow temperature to
adjust the steam valve opening (voltage V). Feedforward control thus anticipates and preempts the
effect of inflow temperature changes.
Straightforward calculation shows that the overall transfer from temperature disturbance d to tank
temperature T is
In reality, modeling inaccuracies prevent exact disturbance rejection, but feedforward control will
help minimize temperature fluctuations due to inflow disturbances. To get a better sense of how
the feedforward scheme would perform, increase the ideal feedforward delay by 5 seconds and
simulate the response to a step change in inflow temperature.
MATLAB Programming:-
clc
clear all
s=tf('s');
Gp=exp(-14.7*s)/(21.3*s+1);
tau=21.3000;
theta=14.7000;
Kc=0.859*(theta/tau)^(-0.977);
tauc=(tau/0.647)*(theta/tau)^0.680;
C=Kc*(1+1/(tauc*s));
Tfb=feedback(ss(Gp*C),1);
step(Tfb),grid on
title('Response to step change in temprature setpoint T_(sp)')
ylabel('Tank temprature')
margin(Gp*C),grid
C1 = 0.9 * (1 + 1/(tauc*s)); % reduce Kc from 1.23 to 0.9
margin(Gp*C1), grid
step(Tfb,'b', feedback(ss(Gp*C1),1),'r')
legend('Kc = 1.23','Kc = 0.9')
Gd = exp(-35*s)/(25*s+1);
F = -(21.3*s+1)/(25*s+1) * exp(-25*s);
Tff = Gp * ss(F) + Gd; % d->T transfer with feedforward control
Step(Tff), grid
title(‘Effect of a step disturbance in inflow temperature’)
ylabel(‘Tank temperature’)
OUTPUT:-
MATLAB Programming:-
clc
clear all
s=tf('s');
Gp=exp(-14.7*s)/(21.3*s+1);
tau=21.3000;
theta=14.7000;
Kc=0.859*(theta/tau)^(-0.977);
tauc=(tau/0.647)*(theta/tau)^0.680;
C=Kc*(1+1/(tauc*s));
Tfb=feedback(ss(Gp*C),1);
step(Tfb),grid on
title('Response to step change in temprature setpoint T_(sp)')
ylabel('Tank temprature')
margin(Gp*C),grid
C1 = 0.9 * (1 + 1/(tauc*s)); % reduce Kc from 1.23 to 0.9
margin(Gp*C1), grid
step(Tfb,'b', feedback(ss(Gp*C1),1),'r')
legend('Kc = 1.23','Kc = 0.9')
Gd = exp(-35*s)/(25*s+1);
F = -(21.3*s+1)/(25*s+1) * exp(-25*s);
Tff = Gp * ss(F) + Gd; % d->T transfer with feedforward control
Step(Tff), grid
title(‘Effect of a step disturbance in inflow temperature’)
ylabel(‘Tank temperature’)
Gd.u = 'd'; Gd.y = 'Td';
Gp.u = 'V'; Gp.y = 'Tp';
F.u = 'd'; F.y = 'Vf';
C.u = 'e'; C.y = 'Vc';
Sum1 = sumblk('e = Tsp - T');
Sum2 = sumblk('V = Vf + Vc');
Sum3 = sumblk('T = Tp + Td');
Tffb = connect(Gp,Gd,C,F,Sum1,Sum2,Sum3,{'Tsp','d'},'T');
C.u = 'e'; C.y = 'V';
Tfb = connect(Gp,Gd,C,Sum1,Sum3,{'Tsp','d'},'T');
step(Tfb,'b',Tffb,'r--'), grid
title('Closed-loop response to setpoint and disturbance step change')
ylabel('Tank temperature')
legend('Feedback only','Feedforward + feedback')
OUTPUT:-
The two designs have identical performance for setpoint tracking, but the addition of feedforward
control is clearly beneficial for disturbance rejection.