Professional Documents
Culture Documents
F F F F F F − = + − − = − = ε
F F F F F F − = + − − = − = ε
492
Lecture Notes 2: Simulating the Shower Process
the shower process is simple enough that we can simulate its operation
Over the past decade our tools for simulating processes have greatly improved. In particular, we
can predict how the process will behave under dynamic conditions: startup, disturbance, and
shutdown. Dynamic simulation can aid in specifying the control scheme and may catch potential
operating problems.
For the shower, we do not need a complex computer code – we can derive and solve a decent
equation set by hand. We will do this simulation to illustrate
• a simple control algorithm
• how the process behavior was indicated by the RGA and DC tools
ε( t ) = SP − CV( t ) (2-1)
Error is the difference between the desired value of CV, called the set point SP, and CV. Of
course, CV might wander around with passing time, and so error would, as well. If CV is at the
set point, the error is zero; should CV be disturbed, the error might be positive or negative. The
error is the input to the control algorithm.
MV( t ) = BC + K C ε( t ) (2-2)
ε F = Fsp − F
= Fsp − Fr − F + Fr (2-3)
= Fsp' − F'
By introducing our reference value Fr into the definition, we see that the error is also the
difference between two deviation variables. In many cases, of course, we would take the set
point value Fsp to be the same as our reference value, so that Fsp′ is identically zero. However,
εF
ε*F = = Fsp*' − F*' (2-4)
∆F
If we pair CV flow and MV hot water, the controller algorithm (2-2) is now written in these
dimensionless terms.
The magnitude of the gain KCF* may be increased to provide more aggressive controller action.
For example, a gain of 1 means that a 10% error will motivate a 10% change in manipulated
variable. Increasing the gain to 2 produces a 20% change in MV. Notice that the bias in (2-2)
has been absorbed into the deviation variables. When error εF* is zero, no change is made to Fh,
so Fh*′ is zero.
εT
ε*T = = Tsp*' − T *' (2-6)
∆T
In contrast to the flow controller, KCT* should be negative, so that the controller will respond to
an increase in temperature (εT* < 0) by increasing the cold flow Fc.
∆Fh * *' ∆F
F*' =
∆F
( ) (
K CF Fsp − F*' + c K *CT Tsp*' − T *'
∆F
) (2-8)
Now we have some rearrangement to do: we must express these two equations so that the outputs
(F*′ T*′) are functions of inputs (disturbances Th*′ Tc*′ and set points Fsp*′ Tsp*′). We can do this
by
• solving the MB (2-8) for F*′
• substituting F*′ into the EB (2-9) and solving that for T*′
• substituting T*′ back into the MB and solving again for F*′
⎧⎡ ∆Fh * ∆F ∆F 1 ⎤ ⎡ ∆F ⎤ ⎫
⎪⎢ K CF + c h K *CF K *CT (Tcr − Thr )⎥ Fsp*' + ⎢ c K *CT ⎥ Tsp*' ⎪
⎪⎣ ∆F ∆F ∆T Fr ⎦ ⎣ ∆F ⎦ ⎪1
F*' = ⎨ ⎬ (2-10)
⎪+ ⎡− ∆Fc ∆Th Fhr K * ⎤ T *' + ⎡− ∆Fc ∆Tc Fcr K * ⎤ T *' ⎪D
⎪ ⎢ CT ⎥ h ⎢ CT ⎥ c ⎪
⎩ ⎣ ∆F ∆T Fr ⎦ ⎣ ∆F ∆T Fr ⎦ ⎭
where
∆Fh * ∆F 1 ∆F ∆F 1
D = 1+ K CF + c K *CT (Tcr − Tr ) + c h K *CF K *CT (Tcr − Thr ) (2-12)
∆F ∆T Fr ∆F ∆T Fr
these equations represent a different system: the original piping plus controllers
That is why they are more complicated than our original M&EB. The first thing we notice,
perhaps, is that temperature disturbances affect the flow rate! Of course, this is due to the
feedback structure, which begins turning valves when either the flow or temperature departs
from set point. We notice, as well, that changing either set point affects both controlled
variables.
These interactions may not in themselves be bad. However, looking at the equations in more
detail will show that a persistent change in either inlet temperature – such that Th*′ or Tc*′ remains
non-zero – will cause both F*′ and T*′ to remain non-zero. Thus our controllers are not satisfying
our original operating objectives of keeping the shower at the set point!
This inability to return to set point is a property of proportional control; it is known as “offset”.
Offset also occurs for a change in set point: the controlled variables cannot attain the new desired
values. Offset can be reduced by increasing the controller gain. It can be eliminated by a more
sophisticated controller algorithm, but that is the subject of 10.450.
This is a good time to recall that our model regards all input changes as being immediately
transmitted to the output. Hence, equations (2-10) through (2-12) can describe a steady state, but
they also describe time-varying behavior, even though time does not appear explicitly.
no temperature control – turn KCT* down to zero (open the temperature loop)
The material balance (2-10) becomes
∆Fh *
K CF
F =
*' ∆F Fsp*' (2-13)
∆F
1 + h K *CF
∆F
Without the temperature controller, there is no mechanism for temperature disturbances to affect
the flow. A set point change will never be fully achieved (offset), but increasing the gain KCF*
makes the approach closer. The energy balance (2-11) becomes
∆Fh Thr − Tr *
K CF
∆T Fr ∆T F ∆T F
T =
*'
Fsp*' + h hr Th*' + c cr Tc*' (2-14)
∆F ∆T Fr ∆T Fr
1 + h K *CF
∆F
Temperature disturbances affect the shower temperature without interference from the flow
controller. A set point change in shower flow will affect the temperature by an amount that
increases with the controller gain. Hence, attempting to reduce flow offset will increasingly
disturb temperature.
no flow control – turn KCF* down to zero (open the flow loop)
The balances become
where
∆Fc 1 *
D = 1+ K CT (Tcr − Tr ) (2-17)
∆T Fr
As controller gain is increased, the outlet temperature is less affected by inlet temperature
disturbances. Correspondingly, temperature set point changes are more faithfully followed.
Once again, however, increased gain means that the flow is increasingly affected by both
disturbances and temperature set point changes.
and
Tr = Thr (2-19)
∆Fh * ∆Fc *
K CF K CT
F*' = ∆F Fsp*' + ∆F Tsp*'
∆Fh * ⎛ ∆Fh * ⎞⎛ ∆Fc Tcr − Tr * ⎞
1+ K CF ⎜1 + K CF ⎟⎜⎜1 + K CT ⎟⎟
∆F ⎝ ∆F ⎠⎝ ∆T Fr ⎠
(2-20)
∆F ∆Th *
− c K CT
+ ∆F ∆T Th*'
⎛ ∆Fh * ⎞⎛ ∆Fc Tcr − Tr * ⎞
⎜1 + K CF ⎟⎜⎜1 + K CT ⎟⎟
⎝ ∆F ⎠⎝ ∆T Fr ⎠
The flow (2-20) can be made to approach set point by increasing KCF*. Increasing KCF* also
helps to suppress the effects of temperature set point and disturbance changes on flow. The flow
controller gain has no effect on the outlet temperature (2-21). Increasing KCT* improves
temperature set point response and suppresses the effect of disturbances.
Reducing loop interaction, as directed by the RGA results, certainly improves the control
response! In this limiting case, we seem to be able to increase controller gains arbitrarily without
ill effect. If we are sufficiently curious, we can check out the opposite limiting case.
⎧⎡ ∆T F ⎛ ∆F ⎞⎤ ⎡ ∆T F ⎛ ∆F ⎞⎤ ⎫ 1
T *' = ⎨⎢ h hr ⎜1 + h K *CF ⎟⎥ Th*' + ⎢ c cr ⎜1 + h K *CF ⎟⎥ Tc*' ⎬ (2-23)
⎩⎣ ∆T Fr ⎝ ∆F ⎠⎦ ⎣ ∆T Fr ⎝ ∆F ⎠⎦ ⎭ D
where
∆Fh * ∆F 1 ∆F ∆F 1
D = 1+ K CF + c K *CT (Tcr − Tr ) + c h K *CF K *CT (Tcr − Thr ) (2-24)
∆F ∆T Fr ∆F ∆T Fr
1 1 ⎛ ∆Fh * ⎞ Th*'
T *' = ⎜1 + K CF ⎟ [∆Th Fhr + ∆Tc Fcr ] (2-26)
∆T Fr ⎝ ∆F ⎠ D
1 1 ⎛ ∆Fh * ⎞ Th*'
T *' = ⎜1 + K CF ⎟ [∆Th Fhr − ∆Tc Fcr ] (2-28)
∆T Fr ⎝ ∆F ⎠ D
For the first case, in which disturbances move in the same direction, the term in brackets is
larger, which implies a larger offset in the controlled variables. Thus the case identified by DC
as the most costly to mitigate also shows the worst control response.
• Using the linear system, we computed the RGA to explore pairing of CV and MV.
• We also computed DC to identify the most severe disturbance conditions.
• Upon choosing a control algorithm, we added controller equations to the system model
and computed the system response under control.
final message
• The next step would be the detailed design – pipe sizes, and so forth – which will be
beyond our scope. Of course, we could have gone straight to detailed design after
computing the steady-state reference conditions. However, some transient screening
tools applied in the early stages may save you from designing a fine-looking steady-state
that would be an operating disaster.
For example, we could redefine our manipulated variables. We add a total flow control
valve, directed by the flow measurement. Then we use a ratio controller to set hot and
cold proportions. The controller algorithms are standard and non-specific to our
particular process. (Perhaps you have seen showers in which you set temperature by
rotating a valve handle and set flow by adjusting the shower nozzle. There is usually
insignificant interaction between the two manipulations.)
Fh T h F T
FT
Fc T c
Fh T h F T
FT
Fc T c
Thus we can do better than the simple two-loop control scheme we proposed in the
beginning. The RGA has allowed us to recognize this in the preliminary design stage,
before we committed too much money on something that wouldn’t work.
• The shower is a simple system, so we could analyze the whole problem with math. We
will next go to a more complicated system for which analytic solutions are impractical,
even if possible. However, we will follow the same design scheme, with the same
intentions, even if we use different tools to get the job done.
nomenclature
BC bias; the value of MV when the controlled variable is at its set point
abbreviations
CV “controlled variable”, a system output that we wish to maintain at a set point value
DC “disturbance cost”
DV “disturbance variable”, a system input that we have no influence over
MV “manipulated variable”, a system input that we may adjust for our purposes
RGA “relative gain array”
SP “set point”, the desired value of the controlled variable
subscripts
c cold water supply stream
F pertaining to the flow controller
h hot water supply stream
r a reference operating condition around which we derive a linear approximation
sp set point value of controlled variable F or T
T pertaining to the temperature controller
superscripts
′ indicates a deviation variable; i.e., the physical variable minus a reference value
*
indicates a scaled variable; i.e., variable has been divided by its operating range