# Retrofaction tutorial

[From Bruce Abbott (960131.1630 EST)]

Now that we have a new term -- retrofaction -- to replace the term
"control," we will need to rewrite our tutorials accordingly. I thought I'd
take a stab at it.

An advantage of the new term is that it allows the term "control" to be used
as in EAB. There, to control is to influence or determine the state of a
variable. I will use "control" in that sense here.

THE RETROFACTION SYSTEM

A prototypical retrofaction system is diagrammed below:

r
>
p = k1*i p v e a = k2*e
+-->[ if ]--------->[comp]--------->[ af ]--+
> e = r-p |
i | i = a'-d' a' a' = k3*a | a
+---------------[rfv]<-------[ ef ]---------+
^
d' = k4*d | d'
d ----->[ df ]-----+

In the diagram, rfv is the retrofacted variable and d is the disturbance
variable. The disturbance variable produces an effect on the rfv through
the disturbance function df, whose output is d'. In the absence of
retrofaction, the disturbance would exert strong control over the the value
of the rfv. The effect of d on rfv is given by d'. The disturbance effect
combines with the environmental effect of action, a', to control the state
of the retrofacted variable. This then becomes the input (i) to the
retrofaction input function (if), which converts the input into the
retrofacted perception signal (p). The parameter k1 is the retrofaction
input fraction (or input gain).

The retrofacted perception signal is subtracted from the retrofaction
reference signal (r) in the comparator to produce the error signal (e). The
error signal in turn controls the retrofaction action (a) via the
retrofaction action function (af); the parameter k2 is called the
retrofaction action fraction (or output gain); it determines the magnitude
of action (output) produced by a given magnitude of error signal. The
action affects the state of an environmental variable a' via the
retrofaction feedback function (ef), also called the environment function;
the parameter k3 determines how much effect (a') the action will have on the
retrofacted variable.

For the purpose of the present analysis, all variables will be assumed to
exert their effects simultaneously around the loop. For all variables
within the loop, it is easy to see that each variable both controls and is
controlled by every other variable in the loop, including itself.

We can analyze this diagram into two parts; one part the "system" and the
other the "environment." The system consists of everything on the top part
of the diagram, beginning at the input function and ending at the action
function. The remainder of the diagram lies in the environment of the
system. From these two parts we can derive two functions. The retrofaction
forward function (forward system function) shows how the input variable
controls the action variable (assuming a constant reference). In this
example it is:

(1) a = (r - k1*i)*k2.

The retrofaction feedback function (environment function) shows how the
action variable controls the input variable (assuming a constant disturbance):

(2) i = k3*a - k4*d.

However, both a and i are dependent variables. What is needed are equations
for predicting both a and i from the values of the independent variables (r
and d) and the paramater values. These equations can be derived by
substitution. Substituting the right side of Equation 2 for i in Equation 1
gives:

k2*r + k1*k2*k4*d
(3) a = -----------------.
1 + k1*k2*k3

Substituting the right side of Equation 1 for a in Equation 2 gives:

k2*k3*r - k4*d
(4) i = --------------
1 + k1*k2*k3

The term k1*k2*k3 is the product of all the gains around the loop and is
termed the retrofaction fraction, otherwise known as loop gain or system
sensitivity. The higher the loop gain, the better the retrofaction, in the
sense that the retrofacted variable is retrofacted closer to its
retrofaction reference value. In fact, the ability of the disturbance to
control the retrofacted variable will be only 1/(1 + k1*k2*k3) of its effect
in the absence of retrofaction. Retrofaction progressively reduces the
control exerted on the retrofacted variable by the disturbance as the loop
gain increases; At high gain the rfv can seem almost immune to the
disturbance, so long as the system can produce sufficient action to
compensate for the disturbance effect on the rfv.

Equations (3) and (4) give the equilibrium (steady-state) values for a and
i; more sophisticated analyses are required to describe the dynamic behavior
of the system. Also, much more complex systems are possible, including
those with nonlinear components (all the component functions given in this
example were linear).

Sometimes analysts will unwittingly solve Equation 2 for a, yielding:

i + k4*d
(5) a = --------.
k3

The equation seems to show how input controls output through the mediation
of the system, but in reality it only describes the environment. It is in
fact the inverse environment function (or inverse retrofaction feedback
function) and does not describe the system at all.

I hope I've been able to clarify an otherwise murky subject. If I've made
any glaring errors, I'm _confident_ that they will be pointed out to me in
short order!

[Note: Terms like "retrofaction feedback fraction" are very new (I just
invented them) and currently in use only by the most "in" of the "in" crowd,
so if you want yourself to be understood by lesser mortals I would strongly
recommend using the older terms, such as loop gain, input function, and the
like until you are sure you have joined the ranks of the retrofaction
faction. (In fact, I suspect that cooler heads will prevail and my proposed
new terms will be subjected to some much-deserved ridicule and soundly
rejected, so I suggest taking a firm wait-and-see attitude for now.) For