CS452 - Real-Time Programming - Fall 2009

Lecture 28 - Control


Feedback Control

Control Concepts

  1. System to be controlled
  2. Time-dependent variables to be controlled
  3. Control parameters
  4. Objectives (goals)
  5. Control algorithm

Fundamental Problem is Noise

We try to set the velocity as we wish,

How do we tame noise?

  1. Measure the real position, y(t), as often as we can
  2. Modify the velocity to reduce y(t) - x(t), the difference of the desired position from the real one.
  3. Example: v(t) = B(t-t0) - C(y(t) - x(t))

Suppose we can measure continuously and instantaneously. Then

This looks pretty good, BUT

There is always a Time Lag

At time t, we really know y(t-D), where D is an inevitable time lag. Now what happens?

  1. u(t) = d(y(t) - x(t)) / dt = - C(y(t-D) - x(t)). This is pretty intractable.
  2. However, we should know the lag, or the average lag, or whatever, and we can solve
  3. d(y(t) - x(t)) / dt = - C(y(t-D) - x(t-D))
  4. Hypothesize a solution of the form exp( -zt ) and solve for z
  5. z = C exp( zD ) or log(z) = zD + log(C)
  6. Sometimes there is no real solution

The solution is Predictive Control

Change step 3 to

  1. d(y(t) - x(t)) / dt = - C(y(t-D) + Dv(t) - x(t)), which is close to

    d(y(t) - x(t)) / dt = - C(y(t) - x(t))

  2. And we are back to a solution we like.

There are whole textbooks about different ways of doing predictive control; there are whole journals with articles describing new ways of doing predictive control.

Using predictive a little loosely, predictive control is what you are doing.

The Transputer: a Second Generation Offshoot

Use many co-operating, medium capability microCPUs to do a big job.

Problem is communication

Comminication requires either

The transputer was an early, now vanished, example of the latter

Occam 2

Basic idea

  1. processes (tasks)
  2. channels
  3. time

Combining processes

  1. sequential
  2. conditional
  3. looping
  4. parallel
  5. alternation


  1. input
    channel ? variable
  2. output
    channel ! value // the value of a variable or the result of an procedure
  3. input & output provide synchronization


The Result

You can write a type-safe server, BUT

Program structure is more static than is allowed in your system.

This might be a good thing.

Return to: