The Destabilising  Effects of Feedback.

Feedback is an excellent way of reducing the effects of uncertainty.  By measuring that which is to be controlled, and comparing it with a desired level, actions can be taken to reduce the error. 

The flyball or Watt’s governor is one such feedback mechanism, which throttles the supply of energy to an engine if the speed of the device is excessive.  The converse also occurs; in that if the speed drops, due for example to a load being applied, the throttle is opened and more energy (such as steam pressure) is applied.

An example of an engine with feedback speed control

The timely nature of feedback is, however, critical.  If the delay is excessive, then an instability can be induced.  A drop in speed is ignored and becomes significant before the extra energy appears.  Then the speed recovers drastically but the delay means that the energy supply is not shut off until some time after the overspeed is recognised and acted upon.

Same feedback speed control, but this time hunting due to a delay introduced between the throttle and the engine.

This is demonstrated in the second video, by placing a reservoir chamber in the  supply between the Watt’s regulator and the engine. As the speed drops, the throttle opens but the pressure relayed to the engine is delayed by the filling of the chamber.  The speed continues to drop until the pressure is built up.  Once this occurs and the speed recovers, the throttle eventually closes, but the reserve of pressure keeps the engine accelerating.  The system then overspeeds with a closed throttle that does not open again until the reserve is consumed and the speed dropped below the set point.  The cycle starts again, potentially growing in magnitude each time round.

The mathematics to describe this is as intricate as it is eloquent, but first some basics of the language.

A sine wave is the purist of time varying signals.  In music it is the perfect tone. In light, an exact colour among the rainbow.

Sine waves have the property that their rate of change is also a sine wave, and the converse, that the sum of all the values of a sine wave upto a point is also a sine wave.  The former is considered the differential, the latter the integral.  The integral of a sinewave is a delay of one quarter cycle from the original.  Its maximum is when the entire hump of the original is completed and it crosses zero to start its negative excursion. Half a cycle later this negative hump makes the integral a minimum again.

Two successive integrators thus delay the sinewave by half a cycle.  The final output is therefore the opposite of the input.

Sine wave and its two integrals.

The integral is also a representation of the amount of air in the reservoir, since this is the sum, up to a point, of all the air supplied, less the sum of all the air consumed.  The speed of the engine too is the integral of all the accelerations it has performed since it was built.

Putting this together, we could assume that (1) the acceleration of the engine is proportional to the pressure it sees and the speed of the engine is the integral of this and (2) the flow of gas into the reservoir is proportional to the speed below the desired level, and hence the pressure in the reservoir is the integral of this.  (These are simplifications for the time being.)

Should a disturbance in the speed of the engine describe a sinewave, then at a particular period of this oscillation, the two delays introduced by the two integrators will cause the formally negative feedback, where an excess of speed reduces the energy supply, to become the opposite. The delay making the additional pressure being applied at the moment the engine has the greatest speed.

The positive feedback is only consequential if the system amplifies this signal at this period of sinewave. If the feedback is small, then the oscillation will die away.  However if the amplification is more than unity, the oscillations will build up.

Further analysis of whether the system will settle or explode can be gained from a graph of how the system responds to different frequency sine waves.  This graph is known as a Bode Plot.  Named after someone called Bode. Who died not so long ago. [Hendrik Wade Bode, 1905-1982].

The plot is established by measuring the response of the open loop system to a series of sinewaves.  In our case, we would need to break the closed loop, the easiest method being to snap the belt, then feed in a sinusoidal speed signal to the Watt’s governor.   The speed of the engine would then have to be measured and the deviation sinewave recorded and the amplification and phase (delay) calculated.  This would however require a lot more experimental equipment and another long winded post.

Foreseeable Failures

The science museum in Kensington used to be a wonderful place with live demonstrations of lightening bolts across pylon insulators and hundreds of glass cased models, all fitted with a button to press to make the intricate machines wizz round.

One such box, I am sure, would have demonstrated a Watts Govenor, its massive balls swinging centrifugally spawning a lifelong fascination in feedback control.

A few years ago I purchased from the orient, a fine model of such a govenor, and after making a reciprocating wobble engine as part of a machinist training course at York Model Engineering Club, belt coupled it up and with 40psi, got it into a stable equilibrium.

Belt Driven Watts Govenor

The obvious failure mode of a belt driven speed govenor has amused me in many museums and is thus hereby demonstated in today’s slightly shoddy version of the glass case that you are currently looking through.

In the spirit of Drax

Inspired by the creative writing and sociopolitical and financial (as well as physical) reengineering of our national electricity generating heritage[1], my steam engine has undergone major work and now* burns special miniature steam coal that contains 94% less carbon than normal housecoal**.

To reflect this transformation, it now proudly sports a new coat of paint, making it amongst the greenest steam engines for miles.


Notes: *it always has. **a lump miniature steam coal only has 4g of carbon compared to housecoal’s 70g.

Miniature Steam Coal
Housecoal

[1] Drax … Our History

A Toad on the line

My earliest recollection of reading a rail accident investigation report concerned a cow and an engine called James.  The overspeed had been attributed to wooden brakes, which apparently (as the crew claimed) had been known to be defective for some time[1].

It was with this in mind that I embarked on a new project to build a brake van in 5″ gauge with working clasp brakes and mechanical force balancing. 

Armed with a far more academic work on the construction of 5″ wagons[2], and with a set of lazer cut parts [3] the project started after the 2017 show season.

Planking in real wood was to be an essential feature and; as the van was to be funded by the sale of a landrover I had converted to uncomfortably sleep in, the body was to mimic the draughty cold or stifling heat the originals were said to have been[4].  A band saw was therefore acquired and the shed built up over several years of sawing and rough carpentry.  For the doors and windows, halving joints and rebates were cut using a miniature CNC / engraving machine.  The windows were glazed with microscope slides.

Interior with lead ballast boxes[6].

Chassis

Wheel castings had become available again in this, the third decade of the 21st century so following the recipe of baking them in a coal fire, turning to rough size and pressing onto axles machined to within a fraction of a thousandth of an inch, they were finish turned between centres and trimmed to length with a fixed steady[5].

Rather nice “Timkin” axle box covers were on sale as 1″ to the foot jewelry and artistic licence justified putting them on.

Leaf springs were considered at length, but in the end coil springs were used, with wooden spring seats, CNC machined from solid.

Brakes

In order to provide a reasonable amount of brake force, the wagon would have to be heavy. So a side task of making packing cases filled with lead was put in place. [6]

The eight shoes themselves were a complicated shape so there was no real option other than to CNC them from solid wood.  The prospect of seeing smoke billowing from them, James’ style, would be worth it anyway.

Following the prototype portrayed in Hewson’s book[2], they are hung from the chassis, each on a pair of straps with turned pins held in place with split pins.  Each pair across an axle is pulled with an A frame, so that the force on each is the same.  The two A frames per axle are balanced by a torsion arm pulled by a central brake rod.  The torsion arm itself being suspended from the body on two more hanger straps.  In this way the force pulling the brake rod is (almost) equally distributed onto each of the 4 shoes on an axle.  Unfortunately, at this point, the suspension movement kicks in and as the body heaves, the brake rod displacement will change if the shoes are to remain in contact with the wheels.  One problem would be, for example, that with the brakes hard on, either loading or unloading the wagon would upset the clamp force.  The answer is compliance. The brake ‘rod’ is made as a long tension spring and wire rope so that a specific displacement at one end relates to an almost constant force at the other.  

Brake Shoe Hangers
Compensation link on hanger

At the centre of the wagon, the two brake ‘rods’ (springs) are joined, again with a torsion lever.  Unfortunately there is no force balancing, or ‘front-back brake force distribution’ to use automotive parlance.  Correctly implemented, this would of course depend on the acceleration; to prevent the rear axle locking under heavy braking.

It is the intention that the brakes could eventually be under remote control, so provision has been left for a vertical pull rod into the cabin.  This could be by pneumatic or even vacuum cylinder, or a cop out of a radio control servo.  Some sort of antilock braking (ABS) would be needed though, to prevent flat spotting of my nicely turned wheels.

The  central torsion lever also has the drive from the handwheel on the veranda.  This arm is dog clutched to the brake rods’ lever in the mechanical equivalent to the electronic OR gate we are now all familiar with.

Central torsion lever and OR clutch. The handwheel is to the left.

The handwheel itself (a nice brass casting) drives a lifting lever through a Whitworth thread.  This arm is located on, but not connected to, the hanger pivot for the rear brake compensator, just since it happened to be convenient.

Handwheel lifting arm

Track Testing

The ballast was too much,  with two boxes (each 7lb) the suspension was compressed halfway, but the bump stops were hit more than the wheels leaving the track.  Coil springs meant that there was little damping so heave and roll resonances at 1-3Hz were evident.  Well lubricated leaf springs would perhaps have been better.  

The brakes operated nicely, either gently compensating for a gradient or smoothly bringing the train (two open wagons with the rest of the ballast) to a gliding stop.

Now all I need is a 5″ gauge model of Gordon’s hill.

References:

[1] “Thomas and the breakdown train” Rev. W. Audry, (1946) … “Never mind James, it wasn’t your fault, it was those wooden brakes they gave you. We always said they were no good.”

[2] ‘Constructing 5″ Gauge Wagons’, D.Hewson, HMRS 2017.

[3] 17D Limited, Units 12 & 13 Via Gellia Mill, Bonsall, Matlock DE4 2AJ.

[4] “As Safe as Yesterday”; Steve Shiels, No reference available (private publication?). See the story of Consett Steel Works Railway.

[5] “Heat Shrink Wagon Wheels” wordpress post.

[6] “Lead Bricks” wordpress post.

Lead Bricks

Gravity is a wonderful thing and can be used to stick all sorts of things together.  On the workbench, a heavy weight is essential for stopping things moving about.

How well two things stick together, under the influence of a force pushing at right angles to the surface between them, is the coefficient of friction. When it comes to sticking steel wheels to steel track the coefficient can be something as low as 0.1. For an engine to provide a drawbar pull of 7lb, its weight would therefore have to be 70lb (or tons if you prefer).

Having built a brake van in 5″ gauge, there was a requirement to load it up so it could provide a reasonable drag force without its wheels locking.  Hence the requirements for some lead bricks.

These were cooked up to the usual recipe [1] with old pipe melted on the stove and poured into suitable moulds.

Lead is of course toxic and so should not be handled unprotected, or at least without washing your hands afterwards[2].  It was therefore decided to wrap the lead bricks in kitchen foil and house them in plywood boxes. These were cut on a miniature CNC machine from quarter inch ply and glued together with PVA.

The packing case effect was created by sticking strips of cardboard to the wood before painting.

Each box is 7.1/2″ x 2.1/4″ x 3″ and weighs about 7lb.

[1] “Heavyweight Cooking” 2017

[2] “Lead Poisoning”, World Health Organisation.

Curtain Knobs

The knobs purchased for the ends of the curtain poles were never going to fit. The bargain price was more important than that. The shoddy grub screw and plastic collar would have meant a professional (quick job bound to fail after a while) finish too.

The answer was to generate an internally expanding wedge with a coaxial M5 thread that the knob could screw on to.

First a hardwood dowel was turned to be a snug fit inside the tube, and a groove put round it with a parting tool to hold a rubber O ring. A 5mm hole drilled through and the button split in two.

The O ring was simply there to hold the two halves together. A countersunk screw provided the wedge action, and by tightening the nut against the thread, using two locknuts to hold it, the wedge expanded into the bore of the pipe to jam it tight No marks on the outside were therefore required.

As a variant, in order to join two tubes together, another length of the dowel was threaded M5 and screwed onto two such devices, one in each tube. The coaxial thread was recessed just before the end of the tubes which made the tightening tricky, but not impossible.

Superelevation .. or banking into a corner.

One of the beauties of measuring angles in radians (of which there are 2\pi in a full circle) rather than degrees (of which there are 360 in a circle) is that for a small angle the sine of the angle is the angle itself.
“The circumference is the radius times the radians.” This can be used to great effect in calculating the superelevation (crossfall or banking) that needs to be applied to keep a train traveller’s soup level, or a motorcycle rider ‘upright’.

A friend lent me the BR bible on such matters, the “CIVIL ENGINEERING HANDBOOK No. 3. RULES FOR SPEED OF TRAINS ON CURVES IN RELATION TO RADIUS, CANT, AND LENGTH OF TRANSITION”, July 1962. [1]

This has detailed graphs and charts as a ready rekoner on how much higher the outer rail should be laid depending on the expected speed of the train. The text is of course in the English vernacular units of inches, miles per hour and chains. Also notable is the proper use of the Oxford comma in the title.

The basic mathematics is thus:


Considering a train travelling along a circular track. In a small distance it will change direction by a small angle. If at midday it was travelling north then, some short time later it will be travelling east or west to some extent.
If it’s speed is v, and the radius of the track is R, then it will be turning at v/R radians per second. In 00 scale, if the train is running at 24 inches per second on a curve of 18″ radius, then it will be turning at 1.1/3 radians per second.
In full size, v is in mph and R is in chains (there are 80 chains in a mile), so there is also a constant to take care of, namely 80 (chains in a mile) / 3600 (seconds in an hour).  A train at 120mph on a 1600 chain curve therefore turns at (120 × 80) / (3600 × 1600) or 1/30 × 8/160 or  1/3 × 1/100 × 1/2, or 1/600 of a radian per second.
Note: this is also the yaw rate of the train, that is the speed at which a compass turns when viewed by a passenger on board. Although that would probably be noted in degrees.

\omega = \frac{v}{R}


The turning of the train imparts a new speed of the train in the direction of the new heading.  Where previously the northbound train had no speed east-westwards, it now has a speed of v times its new heading (in radians). This change in velocity means it can be considered to be accelerating at a rate of its speed times its angular velocity, this in a direction perpendicular to its motion, or centripetally – towards the centre of the circle.  The passengers are also being dragged centripetally, to stop them continuing north, and describe their outwards tendency as a centrifugal force.

a = \omega v =  \frac{v^2}{R}

The centripetal acceleration has to be generated by a lateral force. A train ‘pottering’ round a 12c radius viaduct [2]
at 30 mph would have an angular velocity of (30×80)/(3600 ×12) or 1/18 of a radian per second and a lateral acceleration of this times 30 x (80 x 66/3600) — the speed expressed in feet per second– or 44/18 feet per second per second (‘/s/s). [2]
On the basis that a 1lb force (lbf) accelerates a 1lb mass by 32’/s/s, if the train weighed 100tons it would take 100 × 20 × 112 × (44/18) / 32 or … 224,000 x 11/144 pounds of lateral thrust [3].

This is also the same force that would be needed to pull it up an 11 in 144 gradient,  so if the rails are set with this amount of crossfall (on 4′ 8.1/2″ track that would be one rail about 4″ higher than the other) then the train’s tendency to fall to one side is exactly balanced by its tendency to swerve outwards on the curve.

The chart from the BR handbook gives 4.1/2″

Note that in all this the mass/ weight of the train has the same effect in both arguments, a train of twice the weight would require twice the force, but the slopes would be the same. So the weight becomes irrelevant in the debate over superelevation.  The crossfall for neutral steering only therefore depends on the speed and the radius of the curve.

To experimentally validate this, a circle of Hornby 2nd radius track was set up and a plate made with three spirit level vials set at nominally 0, 5% and 10% inclination.

These were calibrated on a surface table, set level with a scanning laser. With the plate 1.500″ wide, the height difference to align the bubbles was measured with a digital height gauge. The vials actually measured 5.65% and 11% crossfall.

At these crossfalls, the train would have to travel at about 20 and 27.1/2 “/s. This would make a lap time of 5.7 and 4.1s for each of the inclined vials to appear level.

With centre vial balanced  a lap time of 5.68s was recorded.
With the third vial balanced a lap time of  4.58s was recorded.

[1] British Transport Commission, British Railways, CIVIL ENGINEERING HANDBOOK No. 3, July 1962
links to pdfs of part 1 ; part 2 ; part 3

[2] Railscot entry on Glenfinnan Viaduct

[3] There are 66 feet in a chain which is 1/80 of a mile.

[4] There are 20 hundredweight (cwt) of 112lb in a ton.

Field Control

An engraving tool gave up the ghost and donated its body to science; and has been languishing in the motor mortuary for some time. It is a series wound brushed DC motor, normally connected to 250VAC. I had plans to use it as the main generator on a miniature petrol genset.

The field windings each take 500mA at 12V, or 250mA in series, so would make a nice load for some sort of arduino controller. Unfortunately the armature was wound for a high voltage and has a resistance of 60ohms or so.

Rigging it up on the lathe and I could get it to spin at 4300rpm. At this speed though, the power I put into the field was more than that which could be drawn off the armature!

A hypothetical speed of 34,000rpm would be needed to get much out of it.

More details on the google spreadsheet.

Centrifugal Pump

Continuing the theme of centrifugality (to forward reference a post I haven’t finished yet) I dusted off a box of castings that had been bought for me the Christmas before last. These were the pump kit supplied by Cringle Engineering[1]. The kit contains 3 aluminium castings; a brass impeller; a driveshaft and bearings, and some extras to make the flanges and pully. M3 nuts and studding are also supplied.

The whole lot went together like a metal puzzle with bits being machined to hold the parts only to be machined off again later. Much fiddling and fettleing later –more details in [2]– and a pump emerged with pipes to draw water from a copper tank, and deliver it back at a higher level. A motor from a defunct detailing sander provided the motion and after a couple of hours running-in it delivers about 8oz in 10s against a 12″ head [3].

[1] Cringle Engineering Pump Kit

[2] GoogleDoc on Details of construction

[3] Video on youtube

Temperantal Lawnmower

Towards the end of the season, the least environmentally friendly member of the mechanical family decided that it wasn’t going to drink the new 10% bioethanol petrol that some ecoacademic has decided will save the planet. Even tempting it with tastes of fuel additive from Screwfix or a dram of nitromethane that I had had in the shed since my model glow plug engine days didn’t help. In the end, only throttling it with my thumb as a manual choke would keep it running.

After a jetwash spa treatment, and a quick look over its tappets and spark plug, the carburetor was dismantled and found to be growing a green algae, possibly fed on a diet of alcohol and grass cuttings.

Cleaning all this out didn’t help much and it wasn’t till I openend out the main jet orifice from 0.5mm dia to 0.6 that it would successfully run and cut the lawn.

I still blame the alcohol though.