Time Series and Discrete Processes, continued

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.5gt2

will it hit the hoop dydan
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.

watt steam engine
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 vn.

Then the model of the process  is vn+1 = avn + kun, where un 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)
vn+1 = avn + kun

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

Advertisements

4 Comments

Filed under discrete model, dynamic systems, engineering, forecasting, math, math apps, time series, Uncategorized

4 responses to “Time Series and Discrete Processes, continued

  1. 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 !)

  2. See the explanation in reply to xiousgeonz above.

My wordpress emails suddenly disappeared last night ??????

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s