# Feedback in State Models

Developing Models for Kalman Filters

Some systems, though linear and stable, are difficult to keep within
a safe and normal operating range. Other systems are inherently unstable,
and without continuous action to keep them under control, the state tends
to explode to infinity. ^{[1]} Feedback control
is often used to tame poorly behaved systems like these, to keep the state
stable and bounded. But when this happens, the system responses are a
combination of the system AND its applied controls.

There are two things that you can do when you have feedback present.

- Explicitly and separately represent the feedback terms.
- Fold the effects of the feedback into the model.

## Extended model

Suppose you start with a known model in the usual discrete state form, as we discussed in the preceding installment.

$$\begin{array}{c}{x}^{k+1}=\phantom{\rule{1em}{0ex}}A\xb7{x}^{k}+B\xb7{u}^{k}\\ {y}^{k}=\phantom{\rule{1em}{0ex}}C\xb7{x}^{k}\end{array}$$You can use one or more of the observed output values for producing feedback. Since we are considering linear systems, we will propose a feedback that is some linear combination of the output variables, representable using matrix notation.

$${f}^{k}=\phantom{\rule{1em}{0ex}}F\xb7{y}^{k}$$ This can now be used as the input `u`

Actually,
since linear systems are additive, we can use the feedback ^{k}.*
in addition* to the existing input. The new feedback input will
couple into the state equations by increasing or decreasing the previous
values of the input variables, so we can show the effects as being coupled
into the system through the `B`

matrix, just like any other
inputs. We show a minus sign, since a stabilizing feedback is typically negative.

## Model with feedback folded in

If you need to make frequent adjustments to feedback gains, the explicit form above is probably what you want. But sometimes a fixed stabilizing feedback is always present, and it is advantageous to make the model as simple as possible using some mathematical substitutions to consolidate.

$${x}^{k+1}=\phantom{\rule{1em}{0ex}}A\xb7{x}^{k}+B\xb7{u}^{k}-B\xb7F\xb7C\xb7{x}^{k}$$ $${x}^{k+1}=\phantom{\rule{1em}{0ex}}\left(A-B\xb7F\xb7C\right)\xb7{x}^{k}+B\xb7{u}^{k}$$ Now define the matrix `G`

.

When this notation is substituted into the state equation system, it is clear that the result is a modified state equation system, the same as the original form but with a modified state transition matrix.

$$\begin{array}{c}{x}^{k+1}=\phantom{\rule{1em}{0ex}}G\xb7{x}^{k}+B\xb7{u}^{k}\\ {y}^{k}=\phantom{\rule{1em}{0ex}}C\xb7{x}^{k}\end{array}$$ What can be done linearly can be undone linearly. If you know
what the feedback is, and you develop a model that incorporates the
feedback, you can "unfold" the feedback effects to recover the
original `A`

matrix.

## Coming next

This installment found that feedback transformed the behavior of the state transition equations but did not change the structure of the dynamic state transition equations. In future installments, we will consider other useful transformations, but we have enough information now to begin thinking about the practical side of evaluating a working model.

Footnotes: