Category Archives: dynamic systems

Part 5: James Watt, the steam engine, and the first automatic control system

I was going to do my own version of the James Watt flyball governor, but I found a very readable, illustrated account of the life and inventions of James Watt. Here it is:

http://www.mainlesson.com/display.php?author=bachman&book=inventors&story=watt

In the picture below you can see the flyball governor, driven by the output shaft of the engine. The link from the governor to the steam valve however is not clear, but it is there.

watt steam engine

Here is a detailed view of the governor.regodis

See also the previous four posts.

 

Leave a comment

Filed under dynamic systems, engineering, flyball governor, James Watt, Uncategorized

Part 3: Computer control of real dynamic systems

Let us return to the industrial steam engine driving a range of equipment, each piece in the charge of an operator. In order to keep the factory working properly it is necessary to keep the speed of the steam engine reasonably constant, at what is called the desired output, or the set point. A human controller can achieve this fairly well, by direct observation of the speed and experience of the effect of changing the steam flow rate, but automatically? Well, James Watt solved the problem with a mechanical device (details later). We will now see how to “do it with a computer”.

steam physical
Diagram of the physical system. There will be a valve on the steam line (not shown).

steam informational
The information flow diagram. The load is not measured, and may vary.

steam controlled
Now we have a controller in the picture, fed with two pieces of information, the current speed and the desired speed. The controller can be human, mechanical or computer based. It has a set of rules to figure out the appropriate steam flow rate.

steam controlled with equations

Now we have computer control. The output of the system is measured (sampled) at regular intervals, the computer calculates the required flow rate , sends the corresponding value to the valve actuating mechanism, which holds this value until the next sampling time, when the process is repeated. Using n=1, 2, 3, ….. for the times at which the output is sampled and the controller does its bit, we have at time n the speed measure yn, the desired speed dn and the difference between them (or error in the speed), and they are used to calculate the system input xn with the formula shown in the controller box.

The equation in the steam engine box is our fairly simple first order linear system model as described in the previous post. It is a good idea to have a model of the process dynamics for many reasons (!), one of which is that we can do experiments on the whole controlled system by simulation rather than on the real thing.

Looking at the controller function (formula), xn = Adn + h(yn – dn) , it is “obvious” that if the coefficient h is zero we have direct control (no feedback), and so the value of the coefficient A must be chosen accordingly (see next post).

It is not so obvious how the choice of h affects the performance of the controlled system. To do this we observe that the complete system is described entirely by the process equation and the controller equation together, and we can eliminate the xn from the two equations to get yn+1 = ayn + k(Adn + h(yn – dn))

which rearranged is yn+1 = (a + h)yn + k(A – h)dn 

and has the SAME structure as the process equation, with a + h in place of a

In the next post, on tuning our controller, we will see how the value of the “a” coefficient affects the dynamic response of the system.

1 Comment

Filed under algebra, computer, discrete model, dynamic systems, engineering, forecasting, math, Uncategorized

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.

4 Comments

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