# A question about the necessity of the observer in control theory

I am major in mathematics and also a beginner in control theory. I have a question about the necessity of observer in control theory. Take a linear system as an example, for state variable $$x(t)$$ governed by $$x'(t)=Ax+Bu,\quad x(0)=x_0, \tag {00}$$ where $$A,B$$ are constant matrix, we hope to choose a suitable control function $$u(t)$$ (input signal) to make the solution $$x(t)$$ converges to zero as time goes to infinity. We can choose $$u(t)=Kx(t)$$ so that the eigenvalues of $$A+BK$$ all have negative real parts.

Now here comes a conception "observer". In practice, we cannot measure $$x(t)$$ at every time $$t$$, so it is unrealistic to select the input signal $$u(t)$$ as $$Kx(t).$$ We need an observer to remedy this. Assume there is a sensor measuring the value of output $$y(t)=Cx(t)+Du(t), \tag 0$$ then we can construct a Luenberger observer $$\hat{x}'(t)=A\hat{x}+Bu+L(y-\hat{y}),\quad \hat{y}=C\hat{x}+Du, \quad \hat{x}'(0)=\hat{x}_0,\quad (1)$$ With appropriately chosen matrix $$L,$$ it can be proved that $$\hat{x}-x$$ converges to zero. Finally we choose $$u(t)=K\hat{x}(t).$$

My question is, in pratice, how do we know the value $$\hat{x}(t)$$? We need to bring $$u(t)=K\hat{x}(t)$$ into (1) and numerically compute the ODE, right? Why not we just numerically compute the system $$x'(t)=(A+BK)x(t),\quad x(0)=x_0,\quad (2)$$ and choose the signal $$u(t)=Kx(t)$$ at each time? Here $$x(t)$$ is the numerical solution of (2).

• Likely better on the maths stack. Apr 6 at 10:01
• @Solar Mike - nah, this is a standard topic in state space control Apr 6 at 13:48

## 2 Answers

I think that you haven't gotten your head wrapped around just how much you don't know when you're building a control system.

You're not just ignorant of all of the states in $$\mathbf x(t)$$. You're also ignorant of the exact system behavior, and your system is almost certainly nonlinear. The true model of your system is something like

$$\dot{\mathbf x}(t) = f(\mathbf x(t), \mathbf u(t), t)\\ \mathbf y(t) = g(\mathbf x(t), \mathbf u(t), t) \tag a$$

where $$f$$ and $$g$$ are only ever known approximately, and the real state of the system is of infinite dimension.

So when you come up with your (00) and (0), they are only approximations of the actual system. You work hard to make them good approximations, but that's the best you can do.

My question is, in practice, how do we know the value $$\hat{x}(t)$$?

By computing (1) online. You make an observer out of op-amps or computer code, you feed it $$u(t)$$ and your measured $$y(t)$$, and you take the computed $$\hat {\mathbf x}(t)$$ as your state.

We need to bring $$u(t)=K\hat{x}(t)$$ into (1) and numerically compute the ODE, right?

Well, either numerically or with some continuous-time mechanism, which -- if it's done at all -- is usually an electronic circuit these days.

Why not we just numerically compute the system (2) and choose the signal $$u(t)=Kx(t)$$ at each time?

For two reasons: first, your model is inaccurate, as I pointed out above. Second, because a real system also has noise. In the language of (00) and (0), a more correct model would be

$$\dot {\mathbf x}(t) = \mathbf A \mathbf x(t) + \mathbf B u(t) + \mathbf w(t)\\ \mathbf y(t) = \mathbf C \mathbf x(t) + \mathbf D u(t) + \mathbf v(t) \tag b$$

where $$\mathbf w(t)$$ and $$\mathbf v(t)$$ are disturbance signals. In general, $$\mathbf w(t)$$ and $$\mathbf v(t)$$ have unknown properties, but in practice you study the physical system and try to model $$\mathbf w(t)$$ and $$\mathbf v(t)$$ behaviorally, to guide the best observer design.

Your (2) is basically an observer that's operating in open loop, without feedback. Because your system model is, of necessity, inaccurate, your observer is going to be inaccurate. On top of this, most useful system models include at least one step of integration*. Such models are not BIBO stable, nor are models of plants that are outright unstable.

So -- you need feedback to overcome state errors due to disturbance, to keep the observer stable (else the error will grow without bound), and to compensate from the fact that the starting state is not known.

The reason that you are being presented with this incomplete system model is (probably) because this is your first course in state-space dynamic systems theory, and if you get everything dumped on you all at once, your head will explode.

You'll come out of this class (or this section of the class) with the fundamentals of observer theory. From there, you can progress to answering the question "but what is the optimal observer?" (answer: Kalman filters and their derivatives), and possibly the questions "but how do I deal with the fact that my model is only approximate?" (answer: robust control and robust observers) and "but how do I deal with the fact that every system in the real world is nonlinear?" (answer: nonlinear control theory).

Before you can answer any of those three questions, though, you need a firm grounding in what you're getting now -- which, in typical academic fashion, seems to be presented as if it is the be-all, end-all.

* as a way of modeling a constant disturbance, if nothing else.

• another excellent exposition! -NN Apr 6 at 17:56
• Thank you very much for your vivid and detailed explanation! Apr 7 at 6:25

Here is some terminology that might help.

The system whose dynamics are being modeled is called the plant. Its condition at any time is tracked via its state variables. Observations of its output are called samples or signals. If the laplace transform of the dynamical system is known, it is then possible to construct a feedback signal using those observations which are processed via a second set of dynamics so that when the resulting error signal is summed with the inputs to the dynamical system, the system can be driven to the desired output state. That second set of processing dynamics and its sampling point and summing point is called the feedback loop.

I recommend you get hold of a copy of System Dynamics: A Unified Approach by Karnopp and Rosenberg, which teaches all this stuff in an easily-followed way.

• Thank you for your help and recommendations! Apr 7 at 6:42