Fast Settling PLL Multiplier

Phase Lock Loops have long been used for clock recovery, fixed frequency multiplication, reducing clock jitter, frequency synthesis, FM modulation / demodulation, and other tasks.  The basic PLL consists of a Phase/Frequency Detector, loop filter, and Voltage Controlled Oscillator whose output is fed back to the detector through an optional digital frequency divider.  When the loop locks to the input frequency, the output frequency is equal to the input frequency times the divider ratio.

Direct Digital Synthesis circuits have supplanted PLLs in many synthesizer roles but the PLL has the advantages of cost, simplicity, and the ability to maintain constant phase lock to the source.  RCA application note ICAN-6101 describes the use of a CD4046 Phase-Locked-Loop IC as the heart of a 3 digit 1KHz to 1MHz synthesizer.  Note that for synthesizer applications it is necessary to use the Frequency detector PC2 rather than the simple Phase detector, PC1.  The biggest issue with this circuit is that the loop damping factor varies with the square root of the loop gain which is the product of the PFD and VCO gains divided by the division ratio.  The PFD gain is in volts per Hz and the VCO gain is in Hz per volt so the loop gain is dimensionless.  At high division ratios, i.e. high frequencies, the loop is under damped and is over damped at low frequencies.  This is a trace of a standard PLL synthesizer  VCO control input switching between 3KHz and 1.024MHz.

Note that the response at the high frequency end is oscillatory and highly under damped with a settling time of about 200 milliseconds.  The low frequency response is highly over damped with a similar settling time.  The loop filter constants were chosen to equalize settling times.  Improving either degrades the other.  This circuit uses a CD74HC4046 for a faster VCO at 5 volts.  Unlike the CD4046, the HC4046 VCO has a limited common mode range at the VCOin pin and is normally only capable of a  5 to 1 frequency ratio.  To get ratios of 300 to 1 or higher there is a simple workaround.

By grounding the VCOin pin and applying the VCO signal as a sinking current source to the frequency offset input the full range of the VCO is available down to essentially zero Hz.  R6 raises the low frequency voltage enough to avoid Vos problems with U2. R3 and R4 limit the Q1 common mode range to keep it under the pin 12 bias point.

The RCA application note suggests switching in different loop filter components for different frequency ranges but this doesn’t really fix the problem and is less practical with digital control.  Traditional PLL loops have linear VCO gains.  This is essential for applications such as FM modulator / demodulators.   The main insight here is that the settling time is determined by the loop gain at the target voltage.  The gain at other voltages is not relevant.  If, as the division ratio increases, the VCO gain could be increased, the two would cancel and the damping factor would be constant, allowing simple loop compensation.  The solution is an exponential VCO gain response with a low gain at low frequencies (low VCO input voltage) and high gain at high frequencies.

The exponential VCO gain is 4.5KHz per volt at 1KHz and 4.5MHz per volt at 1MHz.  One thousand times higher gain at one thousand times the frequency.  The question arises as to how to make such a VCO.  The obvious solution is to use the Vbe versus Ic relation of silicon junction transistors.

The 470 ohm resistors protect the transistors in case of fault or overload.  The diodes are Schottkys.  R provides a phase lead to the integrator to compensate for the propagation delay of the Schmitt gate at high frequencies.  The matched pair HFA3096 transistors have a gain-bandwidth product of 8GHz which precludes ordinary breadboarding due to parasitic oscillation.  A lower speed design was used for this implementation.

This circuit generated the gain graph above.  Q1 is sufficient for the exponential function.  As this is only needed for loop stabilization the Vbe temperature coefficient is irrelevant.  Note that the loop compensation filter capacitor is one fifth the size of the linear VCO circuit above.  The 3KHz to 1.024MHz step response of this circuit is:

The settling time for both transitions is 900uS and, when zoomed in, both edges are critically damped at high and low frequency.

These kinds of frequency multipliers are useful for synchronous sampling of repetitive signals such as FFT analysis of variable speed rotating equipment at varying resolutions.  While FFTs usually are preceded by a windowing  function to avoid asynchronous artifacts, these functions broaden spectral lines and reduce the spectrum resolution.  With the ability to select FFT sampling rates that are, for instance, 256, 1024, or 4096 times a repetitive signal with a phase locked sampling clock, the requirements for  windowing functions can be reduced or even eliminated.  This enables trading between resolution and data processing overhead for optimized real-time monitoring.

Please leave any comments using the post in my comments category.



Multiprocessor or multitasking systems need a mechanism to coordinate inter-processor or inter-task communication.  In shared memory architectures the lowest level parts of this mechanism are usually called semaphores.  These can be used to request a resource such as I/O.  Typically this is a memory location that is tested to see if the resource is free and then set to lock out other actors.  Unfortunately an interrupt or separate processor might intervene between the test and set.  Some, but not all, processors have implemented test-and-set instructions that cannot be interrupted.  This protects against other tasks but the test-and-set instruction must also work with dual port memory and cache systems to hold off other processors.  The main problem is allowing multiple actors simultaneous write access to the same memory location.  Various solutions have been tried.  Some years ago, the UNOS operating system developed by Charles River Data Systems implemented eventcounts for low level signaling.  These 32 bit objects could only be incremented, preventing some of the problems with test-and-set semaphores.

For real-time industrial control a much more robust solution is necessary that satisfies a set of requirements.  1. Semaphores must be deterministic without the possibility of race conditions or ambiguity.  2. The solution must not require special processor features to allow portability.  3. Each semaphore is an entire smallest memory object that is written with a single memory cycle, usually an 8 bit byte or alternately 16 bit word for pure 16 bit memories.  4. Semaphores are provided in Query (Q) / Response (R) pairs. 5. Only one client actor may write a Q semaphore and only a single different server actor may write the associated R semaphore.  6. Each resource, be it a memory buffer, I/O, master state machine, or other is under the control of a single actor.  7. Enough distinct Q/R pairs are allocated to each client/server channel to unambiguously control all transactions.  8. At system configuration, and later as needed, semaphore pairs are assigned to client/server channels to establish the required communication channels.  9. Different processors or tasks may be servers for different resources.  10. Query and Response actions are performed in a single memory cycle.

As an example, when a channel is inactive, Qa and Ra are equal.  The specific value is irrelevant.  The client compares Qa and Ra.  If they are equal, the client may place a Query to request access to a resource such as a shared memory buffer by writing the logical complement of Ra into Qa.  When the resource becomes available the server copies Qa into Ra which signals the client that the buffer is available for reading and writing.  When the client finishes its data/control access it sends a query to Qb by writing the complement of Rb to it.  This signals the server that the client is finished with the buffer.  The server copies the Qb to the respective Rb to signal that it has regained control of the resource.  Note that this last is useful as otherwise the client might think the buffer is already requestable since Qa = Ra.  Bidirectional control transmissions may be passed from the server back to the client using additional Qc/Rc, Qn/Rn, … semaphores where Q is the server side.

Alternately, the above transaction could be

Client: [Qa = not Ra] ->

Server: [Qc = not Rc] ->

Client: Access …  -> [Rc = Qc] ->

Server: [Ra = Qa]

Note that in either case, the source of the query always sets the semaphore pair to a different value and the responder to the query always sets the semaphore pair to the same value.  In other words, an actor is not allowed to change its mind.  An abort request must be handled by a separate Q/R pair.  This is absolutely necessary for deterministic behavior.

This strategy works well in main memory for separate tasks and threads, shared memory for multiprocessors, and in hardware for handshaking to control communication buffers.

Please leave any comments using the post in my comments category.

Knurling on a Small Lathe

First a short note on lathe safety.  Modern industrial CNC lathes and machining centers have comprehensive safety systems including guards and light curtains.  Hobby and bench lathes are a completely different animal.  While a table saw or band saw will take off fingers, carelessness with a lathe will kill you.  Do not wear long sleeves or jewelry to include rings, bracelets, wristwatches, or necklaces.  Do not wear gloves.  Do not wear a tie, Bolo, or scarf.  Tie your hair back if it’s long.  Do not wrap crocus or emery cloth around your fingers to polish a moving part.  If you’ve had a drink, put off the lathe work until tomorrow.  Operating a lathe requires continuous attention, concentration, and clear judgement.  If you are interrupted or distracted, disengage the feed and step away from the lathe before turning to address the issue.

Knurling on a lathe is usually performed with a push type toothed roller tool as shown in figure 1.  The tool is pushed into the rotating part using the cross-slide.  This works fairly well on 12 – 14 inch and larger lathes.  Scaled down versions are traditionally supplied with smaller 6 and 7 inch lathes.  Figure 1 illustrates the tool supplied with the 6 inch Atlas lathe.  Using Atlas as an example, the 6 inch lathe looks just like the 12 inch, only scaled down.  The problem here is that a 6 inch lathe is not adequate to press regular knurls into harder materials like steel or brass.  The lantern tool holder and the cross-slide are simply not strong enough.  While it looks like it ought to work,  for proportional cross sections, a 12 inch lathe is 8 times stiffer and stronger in bending and 16 times stiffer and stronger in twisting than a 6 inch.  On YouTube, mrpete222 (tubalcain) has videos (#333-#336 ) about making a new 6 inch Atlas cross-slide to replace a broken one that obviously had too much force applied to the tool post.  I speak as someone who has broken a 6 inch Atlas/Craftsman lantern, although not while knurling.  The one in figure 1 is a slightly beefed up O1 replacement tempered to RC50.

Figure 1

Another problem with push type knurlers is that the stock has to be strong enough to resist bending under the knurling force and may need to be supported with a live center or steady rest.

A solution to both problems is the pinch style knurler shown in figure 2.  In this style the part is trapped between an upper and lower roller.  Depending upon the model, the diameter is adjustable from 1 or 2 inches down to zero.  Since all the knurl force is due to the pinch between rollers there are no unbalanced forces against the work piece or the tool holder.  This allows knurls on unsupported long parts without difficulty.  The cross-slide simply centers the knurl wheels on the part and the carriage travel is used to make longer knurls.   As a result deep knurls on steel are easily produced even on the smallest lathes.  The remaining difficulty is that to start the knurl, the work piece needs to be turning while the clamping knob is tightened to the desired depth.   On short parts to be knurled near the chuck the small clearance between the spinning chuck and the hand adjust knob creates a major safety problem.  Figure 2 shows a stock tool.

Figure 2

Here is the solution I came up with for my lathe.  A 3 inch extension of the clamp knob moves my hand far enough from the chuck for comfort.  I am not suggesting that you do this, just reporting on my solution to a perceived hazard.

Figure 3

I used a through tapped spacer from McMaster-Carr for the thread as I didn’t have a deep hole M6 tap and didn’t feel like counter boring all the way from the top.

This is pretty mundane but now there’s one less thing for me to worry about.  By the way, the 0XA quick change tool holder as shown works well on the Atlas 6 inch.  Cutoffs are WAY better.  You will need to cut rabbets on the plate that comes with the tool holder as can be seen in figure 2.  A single piece of steel the thickness of the T-slot is not strong enough for a solid tool holder lock-down.  It flexes and doesn’t have enough thread engagement.

Please leave comments using the post in my comments category.

Staying alive on Venus

The most hostile place in the entire solar system that it is possible to land on is the surface of Venus.  The airless sun-baked surface of the Moon only gets to 260°F during daylight.  The surface of Mercury, closest to the Sun, peaks at 801°F.  But the surface of Venus is at 872°F both day and night with a corrosive atmospheric at a pressure of 1350 psi or 93 times the Earth’s.  The Russians, famed for rugged equipment, have landed probes on Venus at least 11 times.  The record for lander survival was set by Venera 13 on March 1, 1982, at 2 hours and 7 minutes.  Venus survival is so difficult that NASA is soliciting outside ideas with their Venus Rover Design Competition.  They are looking for ways to control and maneuver rovers without computers or electronics.  The main problem is that modern electronic devices cannot stand this kind of heat and die completely at 400°F or so.  It is completely infeasible to try to refrigerate the sensitive electronics and sensors because of the power requirements and the very high thermal gradient any refrigeration system would have to fight through. Not just the semiconductors and processors, but even current insulation and substrates, will not work at anywhere near these temperatures.  Nor will ordinary power sources.  Any lander will be accompanied by one or more orbiters that can receive information if it can be gathered.  Some creative ideas involve radar reflective panels that can be moved mechanically to change the lander albedo to signal data to an orbiter.  Others involve purely mechanical means for using extended probes to steer around holes and obstacles.

If you assume a pressure vessel, so the internal parts of the lander can be maintained at low or zero pressure to eliminate corrosion issues, the remaining problem is temperature.  While 872°F exceeds the working temperature of most engineering technology, this environment is actually within the reach of the amateur.  A typical self-cleaning kitchen oven runs at 900°F for a 4+ hour cycle.  Not as fancy as NASA’s Venus Surface Simulator but useful for testing magnets, bearings, insulators, and mechanisms.  One proposed solution to the power source problem is a windmill.  While the average wind speed on Venus is only 3 MPH, the air density is 93 times higher than on Earth, providing plenty of power for a windmill.  The main problems are bearings and power transfer.  There are hybrid ceramic and carbon sleeve bearings which are rated for these temperatures although not these pressures in this atmosphere.  Magnetic bearings eliminate friction and corrosion issues.  Unfortunately, the current top magnet material, Neodymium-Iron-Boron, loses its magnetism at such temperatures.  The next best, Samarium-Cobalt, has some high temperature versions that will only lose part of their strength.  These can be preconditioned at temperature and then used.  The older ALNICO 9 is able to work at Venus temperatures but starts out with about 1/3 the strength of Samarium-Cobalt.  It’s not clear which of an ALNICO or SmCo solution would be lighter and/or smaller.  Power could be transferred into the pressure vessel through a magnetic coupler consisting of a permanent magnet rotor surrounding an internal stator/generator separated by a nonmagnetic stainless steel cup in the wall of the pressure vessel. The overall idea is to figure out how to accomplish the science goals with technology that can operate at 872°F.

While NASA is looking into silicon carbide semiconductors, there are other possibilities.  One possibility is old tech: vacuum tubes.  In 1959 RCA invented the nuvistor, an advanced 0.4”x0.8” subminiature metal/ceramic vacuum tube.  While the kinds of glass subminiature tubes used in the AN/PRC-6 “walkie-talkie” radio might work at these temperatures, the nuvistor technology would be a better starting point.  One interesting feature was the RCA “dark cathode” that operated 630 degrees cooler than standard filaments.  The reduced heater operating temperature resulted in greatly increased tube life and reliability.  Starting at Venus temperatures would significantly reduce filament power.  More advanced materials might allow a Venus ambient temperature cathode without heater power.  The main problem is thermionic emission leakage from the grid, which limited the maximum temperature for the nuvistor.  In an advanced design, vacuum depositing a silicon dioxide film on the grid might produce an analog of an insulated gate, suppressing grid leakage.  There are metal-ceramic transmitter tubes like the 4CX150 that could be used as a starting point for developing high-temperature transmitter finals.  Circuit connections would need to be welded rather than soldered.  Most components would need to be rethought since traditional insulators will not work.  Capacitors could be air, glass, mica, or suitable ceramics.  Resistors could be metal film on ceramic or wire-wound on ceramic cores.  Inductors would be printed on ceramic laminated substrates or air-wound on ceramic spacers.  This is mostly existing radio technology.

One application would be small instrument packages that could be dropped in large numbers, consisting of a few simple sensors, a vacuum tube transmitter, and a solid electrolyte battery.  These are batteries already in use by the military.  They are extremely rugged and are completely solid and inactive at room temperature.  They are intended to run at temperatures in the Venus range where the electrolyte melts and becomes active.  Normally these batteries are actuated by pyrotechnic charges in artillery shells, rockets, or such but they could be part of a constellation of small Venus probes reporting temperature, seismic activity, or other data over wide areas for a limited time.  They would easily survive a multi-year space flight prior to insertion.  Multiple waves of probes could be used for longer data sets.

A long-term lander with a wind power source could support a wider range of sensors over a longer time frame.  With a method to generate high enough voltages and development of a high temperature photo cathode, it should be possible to use an image or line orthicon to transmit spectra.  Sapphire, ALON, or quartz windows would allow light sensing and slow-scan imaging.  Decades of television before the 1960’s demonstrated that this is well within the range of tube technology.  Mechanical scanning from an even earlier era is another possibility.  With magnetic bearings in a vacuum environment the scanner power consumption could be very low.  An idea brought up by various people is that you don’t need a computer or controller on the surface; you just need a receiver and transmitter in the lander with a control computer in the orbiter or orbiters.  Kind of like a really expensive drone.

Although NASA is looking into making processor chips out of silicon carbide, a non-trivial task, for over a decade computers were designed with vacuum tubes.  All logic functions, nand, nor, register, etc, can be handled by tubes, which in modern guise could be very small and very low powered compared to the best of the tube era, the nuvistor. While the original tube computers were monsters, they needed to run fast to solve major problems in a reasonable amount of time.  You don’t need much of a computer to miss a rock or transmit some data.  Specifically, a one-bit architecture like the PDP-8/S, WANG 500, or Motorola MC14500B with a little memory can compute anything with a minimum of physical hardware.  While it would be slow, it would minimize size and power consumption while providing adequate control for the lander.  A high temperature version of the Mercury computer program store could be a possibility here.

Please leave comments using the post in my comments category.

A23 Panel Mount Battery Holder

If you decide to use an A23 battery (small cylindrical 12V) in a project you will discover that there are no A23 panel mount holders available.  If you don’t want to open your enclosure to change batteries, here’s a suggestion.  The A23 fits in a Bussmann HPF fuse holder but is slightly too short.  You can use a 3/8″ (or 100 mm) diameter brass disk,  0.280″ (or 7.1mm) long, dropped into the panel side of the holder to extend the back contact.    Insert the negative end of the battery into the cap where it is held by friction and screw in the cap with the battery positive end against the brass spacer.  The internal spring will compress about 0.035″ as the cap is screwed in to maintain battery contact.  The Bussmann terminal labeled “LINE” will then be the +12 terminal.

Bussmann makes variants of the HPF holder for non-standard fuses that still require a (shorter) brass spacer but the plain HPF is the most common and easiest to find. had by far the best price for these I could locate.

Please leave comments using the post in my comments category.

Reinstalling screws into plastic

We live in a world of plastic consumer goods held together with screws.  These are thread-forming screws with sharp threads that cut threads into unthreaded holes in the molded plastic parts with the intention of never being removed.  Unfortunately sometimes removal is necessary for repair or, increasingly, simply to replace batteries in inexpensive goods.  The problem is that simply screwing the fasteners back in cuts new threads each time, destroying the integrity of the plastic threads and the strength of the joint.  All is not lost, however:

There is a technique to reinstall thread-forming screws without damage.  Place the screw at the start of the hole on the end of your screwdriver.  Using the tips of your fingers loosely on the shaft of the screwdriver, turn it backwards, i.e. counterclockwise, with only the weight of the screwdriver pushing on the screw.  Since the screw is turning backwards the sharp threads will not cut into the plastic.  Turn until you feel or hear a light click – immediately stop.  This means that the screw thread has dropped into the start of the original plastic thread channel.  Now turn the shaft gently forwards, clockwise, to make sure the screw threads slide in smoothly.  If so,  run the screw in.  Do not over torque it.  When you feel it bottom out, stop turning.  That will be firm enough for most plastic assemblies.  If it does not turn easily or feel smooth,  back off and turn backwards feeling for the click and try again.  Some screws are called double lead or hi-lo and have two thread heights.  In that case you will get two clicks, one lighter and one harder.  The harder click is the proper thread channel.  In general it is a good idea to turn backwards at least a full to turn to find the most definite click.  This can also make the best of an already compromised hole.

This works as well for reinstalling wood screws without damaging the threads in the wood.

While I’ve done this for decades, I was reminded that it is not a universally known technique while working on my Dyson vacuum.  These are pricey vacuums with the subassemblies held together internally with screws that you really want to be careful with.  The subassemblies themselves snap to each other.  Dyson only sells subassemblies on their web site that can be replaced without removing and replacing screws.   As all I needed were beater bars and not the entire floor head I kept looking.  I found the smaller parts I needed at for much less than the assembly cost.  After carefully removing the old parts and installing the new screwed on parts without damage I realized why Dyson only sold snap-on parts to consumers but sold smaller parts to dealers.  They did not want consumers to inadvertently  damage their units trying to repair them, but assumed repair shops would know how to do this safely.

Hence this post.  I hope it helps you with future plastic and wood repairs.

Please leave comments using the post in my comments category.

Carriage Indicator

One shortcoming of older small lathes is the lack of a carriage travel calibration unlike on the cross slide.  An X-axis DRO solves this problem but they are not made specifically for older lathes and are often difficult to adapt as the bed and saddle castings did not envision them.  The compound may be used for small, precise X-axis moves but the travel is limited and the compound angle must be indicated in for accurate work.  Older lathes like the Atlas/Craftsman do not have a parallel surface on the compound which makes this quite difficult.  When using the milling attachment which does have a Z-axis dial, there is no alternative as it replaces the compound.  The simplest solution is to use a 1″ or 2″ dial indicator but it is often difficult to mount appropriately using regular indicator holder hardware.  Here is a simple, inexpensive solution:

An adequate magnetic base is under $16 at Amazon or Shars.  The rest of this can probably come from your scrap bin.

This is simply an “L” shaped piece of 1/4″ aluminum with an 8mm hole for the bolt and washer attaching it to the magnetic base and a pinned-in 1/4″ stud to attach and tension the indicator with a nylon lock nut.  The back of the stud is flush with the back of the plate.  In addition to the washer under the nut as shown, there is another washer on the stud under the indicator to provide clearance for the plunger travel past the vertical plate.  Note that the narrow leg is about 1/16″ below the bed so the indicator can sit squarely to be aligned with the carriage travel.  This design works best on flat bed lathes like the Atlas series but can be adapted to others.

The spambots are getting out of hand :  Please leave comments using the post in my comments category. 🙂

Spilled Tea

I like Japanese food.  When you ask for hot tea at most of the Japanese restaurants I go to they bring you a cup and a small cast iron teapot with a flat top on the spout.

For a long time, no matter how careful I was, after pouring the first cup there was always a puddle of tea on the table.   Being still more careful made it worse.  I couldn’t even tell where the tea was coming from.  I’ve never been particularly graceful but how hard can it be?  Tip the pot and the tea pours into the cup.

I eventually figured out what was going on.  As the cup filled up I was tilting the pot back gradually, reducing the flow in anticipation of a full cup.  At some point the velocity and inertia of the flowing tea was too small to overcome molecular attraction for the spout and since bottom of the spout ran downhill, the tea ran along the underside of the spout and ran off at the bottom of the pot.  My view was blocked by the teapot so I couldn’t see it happen.

To an engineer this was obviously a design flaw.  The fix was to shape the end of the spout so that tea will always pour out away from the pot and not down the outside of the spout.

Yet many teapot spouts, western and eastern, behave like the first illustration.   Since the time of the Greeks and Romans better spout designs  have appeared on pitchers, beakers,  amphoras and ewers.  Note that on the following pitcher, while the spout does not turn down at rest, it will point down whenever liquid is being poured.

While the flat top teapot spout is bad engineering,  people are good at compensating.  I never noticed until later watching British TV shows on Amazon.  A tea service seems to appear in at least one scene of every British mystery  or police procedural.  British actresses, who have been pouring tea very precisely since they were little girls, automatically snap their wrist back slightly to abruptly cut off the flow as the cup fills, avoiding a spill.

In summary, either (1) this is a major world-wide design flaw requiring mass recalls and government action at the highest levels or (2) since there already is a perfectly good work-around, if you’re not a klutz, it may fall squarely in the Irrelevant Tech category.

Automated attacks produce automated defenses:  Please leave comments using the post in my comments category.

Chopped PID Control of Processes with Delay

For nearly 100 years PID controllers have been the standard for feedback control of a wide range of processes including autopilots, automotive cruise control, industrial heating, servo positioning, and motor speed control.   PID stands for Proportional-Integral-Derivative, also called Span-Reset-Rate in earlier times.  The PID controller reads the process variable, PV, such as temperature or position to be controlled.  The value is compared to a setpoint, SP, and use to calculate a control variable, CV, such as heater power or motor voltage to drive the process toward the setpoint.  PID controllers are “tuned” by adjusting three internal constants.  Ideally the tuning should allow close control of the process.  A properly tuned controller should bring the process up to the desired setpoint quickly and settle smoothly to the desired value without overshoot.  A controller that is too aggressively tuned will slew the process too hard and overshoot, then try to bring that process back, undershooting, and continue to oscillate around the setpoint.  A controller that is too conservatively tuned will react sluggishly and slowly approach the desired value, perhaps never reaching it.

PID works well for ordinary processes but has a problem controlling processes with a significant delay compared to the process response time constant.  An exotic example would be a remotely controlled lunar rover.  It may be able to turn in 1 second but nothing will be seen for 3 seconds and any error will take 3 seconds to change.  Imagine a simple earth based direction control where the rover hunts back and forth around the desired direction, tacking one way for 3 seconds and then the other for 3 seconds.  If a standard PID controller is tuned conservatively enough to eliminate the hunting it will be very sluggish compared to the potential speed of the overall controlled process.  A more familiar example is adjusting a bathroom shower.  If it’s too cold you turn down the cold faucet, but nothing happens for few seconds.  If you keep turning the cold down while waiting the water will end up too hot.  Then you start turning the cold back up and when the water at the shower head hits the right temperature it is already too cold coming up the pipe.  The problem here is that the temperature can be changed much faster than you can find out about it.  A human quickly hits upon the solution:  make a small adjustment, wait a bit, make another small adjustment, wait, and repeat until the temperature is correct.

Modern computerized process control uses strategies such as the Smith predictor which uses a mathematical model of the process to predict in advance what the process will do after the delay or System Inversion which uses a model of both the process and the controller for an improved future prediction.  These require a priori mathematical computer models of the process and controller.

Long before such sophistication existed there was a surprisingly robust technique called chopped or pulsed PID.  This basically emulates the human shower algorithm by chopping the PID controller on and off repeatedly.   This is still useful when a simpler solution is desired or when there is limited knowledge of the process model, as is usually the case.

The PID is first turned on briefly.  While ON the PID operates normally, driving the process toward the desired result.

The PID control is then turned off for a time approximating the process delay.  While OFF the proportional and derivative terms sample the error normally but have no other effect beyond keeping track of the rate of change.  If the integral gain is nonzero, the internal integral term is held unchanged.  If the process is integrating such as position control, the control variable is turned off (zeroed) while the PID is off.  If the process is a normal lag such as temperature or speed control, the control variable is held unchanged while the PID is off.

This adds two more constants to the existing three for PID.  The off time should approximate the delay, longer is more conservative, shorter is more aggressive.  An on time less than the process time constant exclusive of delay is more conservative and longer is less conservative.  Neither is particularly critical and the control scheme is quite robust.  When tuned properly, chopped PID responds and settles much more quickly and stably than standard PID for a process with delay.

Processes that involve pure delay include: fluid flow in pipes where the source is heated or cooled but the pipe outlet temperature is sensed, speed of light delay for control of satellites, pneumatic instrumentation and control systems where small pressure changes have to propagate through long thin tubes, and control over computer networks where there can be significant processing and/or communication delays.

Integrating Sampler

The standard point or impulse sampler that converts a continuous signal to a discrete data sequence has been well understood since 1924 thanks to Harry Nyquist.   It is often assumed that the impulse sampler is the only way to create a discrete sequence.  There are other sampling strategies that may have advantages in some applications.  Here is an example of one.