A simple function has an input, call it x, and an output, f(x). Sometimes the input is t, for time, and the output is the value f(t), observed at time t. With such a function, or process, we can look at what happened in the past, but we cannot know for certain what will happen in the future. Of course, we may have a (mathematical) model of the process, which allows us to make predictions about the future. These processes are “simple”, insofar as the future behaviour depends only on the value of the time variable.

An example is the height of a projectile, s(t) = ut – 0.5gt^{2}

Borrowed from dy/dan “Will it hit the hoop?”

Far more interesting are what I shall call “dynamic” processes, in which the future behaviour depends on how the process output got to its current value (at time now!). This implies that in the simplest case the rate of change of the process output is involved.

This is an early industrial static steam engine, designed by James Watt. The input is steam flow, the output is the rotational speed of the flywheel.

An example is a DC (direct current) electric motor driving a load. The way its speed changes over time depends not only on the voltage applied, but also on the speed at the moment (now).

This setup can be modeled by a simple first order differential equation, but since computers came along it became clear that a simpler model using difference equations would do the job as well.

Let time be seen as equally spaced points, labeled …n-1, n, n+1, … and the speed of the motor at time n be v_{n}.

Then the model of the process is v_{n+1} = av_{n} + ku_{n}, where u_{n} is the voltage input at time n. The values of a and k are to be determined from theoretical or observed behaviour of the motor.This model is very good if we choose to keep the input voltage constant for the duration of the time interval.

Now for the amusing bit. I had taught business students about exponentially weighted averages numerous times previous to my sabbatical year studying control systems, and when I finally became happy with the discrete models as described above I realized in one of those moments that don’t happen very often that the equations were THE SAME in both cases. A bit of rewriting needed !

ewma(n) = (1-k)*ewma(n-1) + k*x(n)

v_{n+1} = av_{n} + ku_{n}

Next post will look at feedback and computer control of dynamic systems.

### Like this:

Like Loading...

*Related*

How will you rewrite?

Making those connections between lots of “simpler” operations and one more sophisticated ones is interesting…

1: ewma(n) = (1-k)*ewma(n-1) + k*x(n)

2: v(n+1) = av(n) + ku(n)

WordPress comment section doesn’t like subscripts, so write eqn 2 with ()

Don’t need such a long name for ewma so call it just a and get

a(n) = (1-k)*a(n-1) + k*x(n)

These equations are not about absolute time, only relative time, so we can rewrite this as

a(n+1) = (1-k)*a(n) + k*x(n+1)

Finally, and it looks like a fix but isn’t, define y(n) = x(n+1), this is ok as in the ewma case we are combining the current ewma value with the new x value to get the new ewma (prediction).

So we get

a(n+1) = (1-k)*a(n) + k*y(n)

which is basically the same equation as v(n+1) = av(n) + ku(n)

(just a few stars missing !)

Simple is always good, though I may need simpler. 🙂 I do so love to follow your thoughts!

See the explanation in reply to xiousgeonz above.