Clock Losing Time....

Jan 29, 2015 79 Replies

You measure the frequency (or period) of the controlled signal against the frequency of the reference. Then, drive your servo to keep this "frequency difference" within your control tolerance (in a digital system, you never have infinite precision on how much you can modify your timebase).

What do you care if *your* local clock display changes some epsilon

*after* a NBS-derived radio beacon *claims* the current time has changed? All you care is that "time passes" locally at the same RATE that it does at the reference.

A PLL solution would always have your controlled signal trying to track the actual *phase* of the reference. So, any instantaneous changes in frequency in the reference disturb the controlled signal permanently (because the phase has been altered in the reference).

E.g., imagine getting zero crossings from a (50Hz -- easier math than 60) detector with individual periods of:

20, 20, 20, 20, 20, 20, 22, 20, 20, 20, 20, 20

A *locked* FLL will have some phase relationship with this reference at the beginning of this sequence. It will persist until the one "bad" cycle is encountered. Thereafter, the phase relationship will change and hold this *new* relationship (the "bad" cycle can have whatever amount of effect on the controlled FREQUENCY that you wish -- based on your filter design -- including *none*).

A PLL would see a discontinuity in phase relationship at that "bad cycle". And, as the reference is now skewed wrt the controlled signal, the PLL will ALTER THE (instantaneous) FREQUENCY of the controlled signal to bring the phase of the reference and controlled signal back into lock.

[Because, Heaven forbid, we wouldn't want our time display to now be a fixed 0.1 seconds skewed wrt that radio reference -- instead of the fraction of a second that it had been previously! If you were a PLL, you *would*! And, would undertake extra control actions to rid yourself of this "abomination"]

As to "exactly how": my most recent implementation feeds "LFC events" ostensibly sourced from an ISR (ick!) or hardware timer capture (less real-time impact on the system) to a low priority process that infers the LFC frequency from these "measurements" (assume the local timebase is stable in the short term). From this, the "time per jiffy" is computed and updated. That, in turn, drives the "wall clock" time.

[Changes to the jiffy frequency are handled very carefully > ]

To accommodate lost cycles, line noise, etc. (actual banes are determined by the LFC hardware implementation and *it's* vulnerabilities), I interpose another module that examines the event stream from the ISR (etc.) and tweeks it to apply some commonsense to the signals. E.g., two events separated by

1ms probably represent noise. *One* of them should be elided (but, should it be the *first*? or the second??). Because this module can see the events before -- AND AFTER -- it can more intelligently decide which event to elide (though, "on average", either would yield the same long term result -- but NOT instantaneously!).

Likewise, the module can inject LFC events IN THEIR ABSENCE retroactively. I.e., it need not inject an event *now* because it believes there SHOULD have been an LFC event "now". Rather, it can afford to wait for *future* events and then "backfill" the missing events -- in essence, rewriting history to keep the control loop running smoothly. I.e., I can have a lengthy dropout -- many LFC cycles "go missing" -- and, AFTER the LFC comes back, I can synthesize the LFC events that WOULD HAVE been generated and feed them into the event queue -- instead of trying to decide "gee, an LFC event *should* have occurred NOW.... and NOW... and NOW, again..."

[Just because events are occurring -- or expected to occur -- at a particular rate, doesn't mean they *have* to occur equidistant in time! So, my servo doesn't get updated for an extra 5 LFC cycles (of the 24hr*60min*60sec*60Hz that occur in a daily interval)... As long as I compensate for that in the calculations... Why make a hard real-time issue out of something that can be softened, considerably, and, as such, made more resilient?]

At the same time, you run a similar loop against the RTC (which you keep to maintain time over power outages). You typically have LESS precision interacting with the RTC (it's notion of time isn't as precise as the timebase against which you have been capturing LFC events). So, you need to take measures to remove the "slop" in the data from the RTC (because it is being updated at a relatively slow rate wrt your high precision timebase and you ideally want to see when it's notion of "the current time" actually comes into effect -- when it's internal counters are updated).

Using the long term LFC as a reference, you compute a correction factor for the RTC's oscillator. You then make this a persistent value. And, periodically, update a persistent snapshot of "last known time that system was running".

All of these data are then used to compensate for the accumulated RTC errors that occurred while the device was powered *off*. If the device has been in the same general environment for that time, the same sort of "error" persists in the internal time tracking for the RTC. So, you get results that mimic those of the run-time correction algorithm (WITHOUT the "run time")

The algorithm that I use to accurately distribute time across the network is a refinement of all of this -- multiple levels of servos trying to keep lots of different devices "in agreement" to a very fine level of precision (which need not have any relationship to the "time" that

*you* see on your wall clock)

Of course they are.

The master clock is in one location. All generators in an area are frequency locked by virtue of them all being connected to the same grid. The error signal between "real time" and "clock time", which is part of something called ACE (area control error) gets turned into raise and lower commands for individual generators. When a generator has its power set point increased, it raises the system frequency microscopically, which then eventually minimizes the accumulated time error (assuming you were running slow).

At each generator, it's actually easy. When you bring a synchronous generator online to a big bus, you first adjust the turbine steam valve to spin it up to match the bus frequency, or a little high, then adjust the field to match the bus voltage. At the instant the phases match, close the breaker. If you do it right, the breaker stays closed!

Then open the turbine steam throttle more to get the power transfer that you want, and simultaneously adjust the generator field to tweak the power factor.

You can do all that by hand; I've done it bringing up a turbogenerator on a ship, and it's easy once somebody shows you how.

If there's no motive drive available (no steam) all you can do (after you somehow spin it up) is tweak the field current. The generator free-wheels on the bus and becomes a "rotating capacitor", handy for system PF correction. Makes sense from a COE standpoint: no mechanical power in/out means that the machine must look mostly reactive to the bus.

The big problem is to trim the entire grid to be on-time longterm, which must be a cooperative effort. I don't know how that is done.

John Larkin Highland Technology, Inc picosecond timing laser drivers and controllers jlarkin att highlandtechnology dott com http://www.highlandtechnology.com

Why does that seem so impossible. I think that is a lot easier than a flock of birds turning in unison or a school of fish swimming in lock step.

Rick

Think about that. If every station is following the grid, then the grid will vary all over the map. There has to be a way to set each station from the reference, not the grid.

Each station will monitory the grid to determine how well they are matching it and I expect they will accommodate short term variations. But the station has to exert some influence on the grid, meaning it will have some residual delta in phase as the grid varies from the reference.

Rick

TL;DR - I can talk long enough to put any listener to sleep even if I don't really understand the things I'm talking about.

Rick

a synchronous motor works, and the only difference between a generator and a synchronous motor is the direction of power flow.

umop apisdn

given a stroboscope, or other phase compoarison method, I can't see it being any harder than merging with freeway traffic,

umop apisdn

The rules of physics will lock all generators in sync (barring extreme events). The total power injected to the grid, minus the load being pulled out, determines how quickly the grid will accelerate or decelerate. Each generator has a governor (regulator) which has a setting called "droop". As the system frequency goes up, the governor will reduce the generator's power output, and vice versa. This could be considered a P term in a PID controller. The I term comes from comparing the "master clock" (WWVB or GPS) to the one that has been running from the line frequency (note that time is the integral of frequency). When either the frequency or time error exceeds a dead band, a central facility sends out raise or lower pulses to certain generators (those on AGC, or automatic generation control), and those units gradually push the system frequency up or down to slowly null out the time or frequency error.

Are you saying this is how the power system works or how it could work? I'd like to see a reference as I have not been able to find one.

BTW, you didn't explain what "droop" is or how it is used.

Rick

This IS how it works. Droop is a gain setting for how much the power set point varies as the frequency varies. Typical droop settings are around

10%, so for a 100 MW generator, the unit would swing 100 MW of output over a 6Hz (10%) change in frequency. Droop acts to increase the generator output as the frequency drops (negative feedback).

For references, Google "generator droop control", "AGC generator" or "area control error".

Check this out...

formatting link

Rick

Nice. That gives a good overview of all the major AC interconnections and also points out (by omission) the non-interconnected areas.

Okay, thanks for the antiquated technology reminiscence but the really big stuff is now required by law to feed into these super high voltage DC transmission corridors to be distributed, electronically chopped and stepped down for local distribution.

If it wasn't for all that "antiquated technology", you'd be freezing in the dark. Don't take infrastructure lightly.

Most individual generators still work just like I described, connected and disconnected to an AC bus to other generators. They mostly have automatic controls, and if you are competent to click a mouse and have a controller do all the understanding for you, enjoy.

John Larkin Highland Technology, Inc picosecond timing laser drivers and controllers jlarkin att highlandtechnology dott com http://www.highlandtechnology.com

I think you need to use transparent shipping tape.

If you use duct tape you can't read the display when you are setting the oven controls.

Jeff

Jeffry Wisnia (W1BSV + Brass Rat '57 EE) The speed of light is 1.8*10^12 furlongs per fortnight.

Maybe that is what led to the one I have that is programmed for DST. I have another, and older, one that is just like it but sets itself from the time code. It has a bug so that on the evening of the DST change it moves back 1 hour then corrects itself over night. I figured that whoever designed it took the quick fix way and just programmed it in.

Bill

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required