Let’s now take another look at the problem we introduced here in this post. The problem was that of finding a suitable discrete-time controller when the system being controlled is fast to reach steady-state so that it can be modeled as the single delay
$$y(t) = G u(t – \tau), \quad \tau > 0.$$
As seen before, a proportional control is not a good solution in this case. So what is the “simplest” controller one could think of in a situation like that? Of course it will be a dynamic controller! We will go about constructing one such dynamic controller in the rest of this post.
One might say, how about a controller that “predicts” the future? Something like
$$u(t) = K e(t), \quad e(t) = \bar{y}(t) – y(t + \tau).$$
Such a controller would produce the closed-loop system
$$y(t) = G u(t – \tau) = G K e(t – \tau) = G K \bar{y}(t-\tau) – G K y(t)$$
thus cancelling the delay and leading to
$$y(t) = \frac{G K}{1 + G K} \bar{y}(t-\tau)$$
The above formula for $y$ is similar to what one would expect to see if not for the delay.
However, in spite of what some politicians might say, it is not always easy to anticipate the future, and such a solution would not be implementable or realizable, much in the same way that transfer-functions which are not proper are not implementable, as discussed in Chapter 5. Anticipating the future here is closely related to differentiating a signal in continuous-time.
So here is an alternative idea. From the point of view of the controller, a prediction of the the output can be made based on the value of $u$ alone. The best prediction for the value of the output $y$ based on $u$ is the signal
$$\hat{y}(t) = \hat{G} u(t-\tau),$$
where $\hat{G}$ is a controller’s estimate of the system gain $G$. In the next paragraphs we will assume that $\hat{G} = G$. We will analyze the effect of mismatches in another post.
If $\hat{G} = G$, or at least close enough, why not design a controller based on the “error signal”
$$e(t) = \bar{y}(t) – \hat{y}(t + \tau)?$$
The problem is of course that such controller would be in open-loop since $\hat{y}(t + \tau) = G u(t)$ is a function of $u$ alone. Instead, consider the following clever alternative based on the prediction error
$$\hat{e}(t) = \bar{y}(t) – \hat{y}(t + \tau) – (y(t) -\hat{y}(t))$$
which is now function of the measurement $y(t)$, hence feedback. If the predictions $\hat{y}(t)$ and $\hat{y}(t + \tau)$ match $y(t)$ and $y(t + \tau)$ then $\hat{e}(t)$ effectively becomes the anticipated error mentioned at the beginning of the post. But most importantly, $\hat{e}(t)$ does not make use of future measurements, which would be impossible, but of future predictions based on the values of $u(t)$ and $u(t – \tau)$, which are available at the controller at time $t$. A controller designed based on $\hat{e}$ is know as a Smith Predictor. You can learn more about the predictor for continuous-time models by working problems 4.11 through 4.14 in Chapter 4. I find the block-diagrams corresponding to the solution to these problems very interesting.
So back to controller design, perhaps the simplest controller one can think of that uses $\hat{e}$ is the proportional controller
$$u(t) = K \hat{e}(t).$$
So what does that lead to in closed-loop? Just plug in the controller to calculate the closed-loop prediction error
$$\begin{aligned}
\hat{e}(t) &= \bar{y}(t) – \hat{y}(t + \tau) – y(t) + \hat{y}(t) \\
&= \bar{y}(t) – G u(t) – y(t) + G u(t-\tau) \\
&= \bar{y}(t) – G u(t) \\
&= \bar{y}(t) – G K \hat{e}(t)
\end{aligned}$$
which is such that
$$\hat{e}(t) = \frac{1}{1 + G K} \bar{y}(t)$$
The above proportional Smith predictor is stabilizing for any $K \neq G^{-1}$ since
$$u(t)= K \hat{e}(t) = \frac{K}{1 + G K} \bar{y}(t)$$
and
$$y(t) = G K \hat{e}(t-\tau) = \frac{G K}{1 + G K} \bar{y}(t-\tau)$$
are all bounded if $\bar{y}(t)$ is bounded. Moreover, it shows that $y(t)$ will track $\bar{y}(t-\tau)$ when $K$ is large. What else could one expect?
Note that the Smith predictor has somehow recovered the behavior of the proportional controller as if the system had no delays. However, do not forget that all of the above conclusions come with the assumption that $\hat{G} = G$.
Putting it all together, it is possible to derive a formula for the Smith predictor, which, by the way, is well defined even if $\hat{G}\neq G$. Indeed, since
$$u(t) = K \hat{e}(t)= \hat{G} K u(t-\tau) – \hat{G} K u(t) + K (\bar{y}(t) -y(t)) $$
the Smith predictor in this simple case is the dynamic controller
$$u(t) = \frac{\hat{G} K}{1 + \hat{G} K} u(t-\tau) + \frac{K}{1 + \hat{G} K}(\bar{y}(t) -y(t)).$$
If you did not think that was surprising hold on because there’s more! As mentioned earlier, everything is well defined as long as $\hat{G} K \neq 1$. That includes very large values of $K$. With large values of $K$ and $\hat{G}=G$ one gets not only stability but asymptotic tracking if $\bar{y}(t) = \bar{y}$, $t \geq 0$, is a constant. But contrary to a standard proportional controller, in which large $K$’s produce large outputs in response to measurement error, taking the limit as $K \rightarrow \infty$ leads to the perfectly fine dynamic controller
$$u(t) = u(t-\tau) + \hat{G}^{-1} (\bar{y}(t) -y(t))$$
which is nothing but a discrete-time version of a simple integrator with gain $\hat{G}^{-1}$! Calculate the above recursion starting at $t = 0$ to obtain
$$u(k \tau) = u(0) + \hat{G}^{-1} \sum_{i=1}^{k} (\bar{y}(i \tau)-y(i \tau))$$
to identify a summer, the discrete-time version of an integrator.
That pure integral control would be the solution to such a problem with large delays was to me a complete surprise. Indeed, it goes against much of the reasoning one would go to analyse delay systems in continuous-time! An integrator adds phase to the loop transfer-function which leads to small phase-margins (see Section 7.7) and hence fragility in the presence of large delays. That integral control also works even if $\hat{G} \neq G$ will be the subject of another post.
One thought on “Is a proportional controller right for you? Ask your control engineer! Part II”