You can find many accounts of the history of feedback control in books, articles, and online. Some will go back to Greek and Arab antiquity to identify proportional feedback in water clocks, wind mills, advancing to the industrial revolution and the Watt governor. In virtually all of those accounts the feedback loop involves continuous-time signals. So I find it interesting that there is device that man has been using for millennia that requires a discrete-time feedback algorithm and integral action for its operation. That device is a balance scale.

Weight measurement is a key part of human life, and it is easy to find detailed explanations of how scales and other weight measuring devices work. In all such accounts, much of the discussion is geared toward the *device* and not much to the *algorithm* required to run the device. Yet, a balance scale and its human operator are actively engaged in a feedback control algorithm. It is not *automatic control*, since the algorithm is run by a human rather than by the device. Yet, the algorithm is essentially proportional control. That it works is a result of integral action. Here’s how it goes.

Start by placing an unknown but constant weight to be estimated, $\bar{y}$, on, say, the left plate, and zero weights, $y(0) = 0$, on the right plate. A scale will compare both weights and generate an *error signal*

$$e(0) = \bar{y} – y(0)$$

which will be presented to a human operator as, for example, the deflection of a needle. Based on that error, the human decides to add or remove weights from the right plate. A good policy here is to add weights in a way that is proportional to the error, say

$$u(0) = K e(0), \quad K > 0.$$

A positive $K$ here means that weight is *added to* or *removed from* the right plate according the *sign* of $e$. Because the plate is just accumulating the weights

$$y(1) = y(0) + u(0).$$

At this point the operator waits for the scale to reach equilibrium and produce another measurement, $e(1) = \bar{y} – y(1)$, and the operation is repeated until the error is zeroed.

The above discrete-time algorithm can be summarized as follows:

$$y(k+1)=y(k) + u(k), \quad u(k) = K e(k), \quad e(k) = \bar{y} – y(k).$$

The “open-loop system” is the plate, that is the discrete-time integrator

$$y(n) = y(0) + \sum_{k=0}^{n-1} u(k).$$

Regarding *convergence* of the algorithm note that

$$

\begin{aligned}

y(k+1) &= y(k) + u(k) \\

&= y(k) + K e(k)\\

&= (1 – K) y(k) + K \bar{y}

\end{aligned}

$$

As discussed in another post the above recursion will converge if

$$|1-K| < 1$$

which puts a limit on how large the gain $K$ can be. Add or remove weights too quickly and the scale will go unstable! And also on how small, the obvious observation that $K$ cannot be zero. Upon convergence, $y(k+1)=y(k)=\tilde{y}$, so that

$$

\tilde{y} = (1 – K) \tilde{y} + K \bar{y}

\quad \implies \quad

\tilde{y} = \bar{y}.

$$

In other words, thanks to integral action, the amount of weight on the right plate will be exactly the weight $\bar{y}$ one sought to estimate. See Sections 2.8 and 4.1 for more.

The description above essentially follows from the standard closed-loop diagram in Fig. 4.2 in which $G$ is an integrator and the system is run in discrete-time, as opposed to continuous-time. As such, many of the virtues and sins of the balance scale can be interpreted as in Chapter 4.

It’s main virtue is the above convergence property, thanks to integral action. Another virtue is its robustness to variations in the gravitational field. Because both plates are subject to the same gravitational field the balance will produce a zero error when their masses are equal regardless of the value of the gravity. Different gravity values have the effect of changing the loop *gain*, whose effect in the algorithm is well understood and can be evaluated by calculating the *gain margin* discussed in Chapter 6. The scale is also largely insensitive to temperature changes. A practical implication of these properties is that the reference weights can be calibrated at any location and do not need to be *recalibrated* on-site. Indeed one may still find balance scales been used to measure small masses in pharmacies and jewelers.

In order to identify some sins, consider input disturbances $w$ and $v$ as in Fig. 4.11. As it turns out, it is very easy to tamper with a balance scale by way of introducing measurement disturbances: plates that look identical but have different weights, a fulcrum that is not centered correctly, operating on windy conditions, etc. As discussed in Section 4.6, such measurement biases are impossible to correct for and is the reason why balance scales have largely been replaced by other types of devices, for instance, spring scales, in which weight is measured against spring deflections, even though those devices might need local calibration and are more sensitive to temperature variations.

As for input disturbances, note that $w$ acts *before* the integrator, that is before putting the masses on the plate. Because of that, a constant disturbance signal $w$ is likely not to be present. One possible yet unlikely situation would be that of a scale in which a plate is replaced by a liquid receptacle with marks that gets filled with water or other liquid to balance the other plate. A leak in that receptacle would be represented as one such constant input disturbance.

On the other hand, it is very likely that a human operator will not be able to produce weights, that is the signal $u$, that are exactly proportional to the error signal $e$. In that case, $w$ can be thought of as the “operator error” in producing the “control signal” $u$. Amazingly, even in this case, there is something to be said about the convergence of the balance scale! We will leave that to a future post.

## One thought on “Balance scales and integral action. Part I”