The mains power supply in most countries is AC (alternating current) at 50 (e.g. Europe) or 60 (e.g. America) Hz. Many electric and electronic clocks use this not just for power, but also as the reference frequency for keeping track of the time. This 50 or 60 Hz is not perfectly stable, due to the continuously changing load of the power grid and the generator's reaction to load changes. However, it is said that on the longer term (e.g., a day or a week) the average frequency is kept very close to 50 or 60 Hz, precisely because of clocks using them. I have done some measurements on the 50 Hz mains frequency at my home in Enschede (the Netherlands), the results of which are presented below.
In the following graph, the red line, indicates the observed phase error (which is the error a mains-synchronized clock would incur), over a period of 69 days from August 13 till October 21, 2005. The green and cyan lines indicate the frequency over that same period.
There clearly is a daily fluctuation in the phase of usually about 5 seconds, but larger variations do occur, ranging over a total of about 60 seconds during the measurement period. I read somewhere that the power companies ensure that the number of cycles in one entire day is always correct, but that obviously is not the case here.
The frequency has so far rarely deviated more than 0.2 % from 50 Hz, i.e. it was almost always between 49.9 and 50.1 Hz.
The stability of a periodic signal can be characterized by its so-called Allan deviation (which is the square root of the Allan variance). This deviation is linked to a given averaging time, which is to be interpreted as the measurement duration; roughly speaking, if the Allan deviation at averaging duration 10 seconds is 10-4, this means that if you measure the frequency during 10 seconds and once more during the next 10 seconds, these measurements will differ on average by 0.01 %. Note that this does not make any statement about how accurate the frequency is: both measurements may differ significantly from the nominal value. For a more detailed explanation and definition, see this usenet posting or the entry in this glossary.
The above graph shows the Allan deviation and the so-called modified Allan deviation as found in my measurements. The relatively large deviation at very small time scales may well be due to measurement inaccuracies, noise on the mains lines, etc. However, it is clear from the graph that at small time scales, on the order of a second, the frequency is much more stable than at the order of e.g. a quarter of an hour; presumably, this is due to the mechanical inertia of the generators: they simply can't change their rotation speed quickly. For very long time scales, on the order of a day or more, the stability clearly increases again, which presumably is due to the power companies' locking the average frequency to some more stable source.
The setup for these measurements was very simple: a simple transformer to transform the 230 volts down to about 15 volts, and a resistive voltage divider which feeds this low-voltage 50 Hz sine wave into the DCD-line of an RS232-port on my PC running Linux. I modified the COM port driver in the linux kernel to produce a time stamp in the data stream every time the DCD becomes active; some user-space software removes glitches, checks for gaps in the data, and calculates the phase and frequency deviations plotted above.
The clock of the Linux-PC was synchronized using the Network Time Protocol (NTP) via the internet to (in the end) GPS' atomic clocks. The round-trip-time to the NTP server via my ADSL link was about 14 ms, so this should make the PC clock run accurate enough not to miss any mains cycles (and probably much better than that).
Unfortunately, for unknown reason the NTP synchronisation of my machine
went awry on August 27th, with ntpd applying three jumps to the PC clock
of several deci-seconds each, as well as letting the clock run several
hunderd ppm too fast or slow (according to the system log).
The data from this period has been left out of the calculation of the Allan
On September 3rd, I couldn't avoid rebooting my PC twice, which caused interruptions in the measurements of a few minutes each. Unfortunately, during such an interruption of several hundred seconds, the mains can easily lose or gain a few cycles compared to the real 50 Hz. For the total phase deviation (first graph) this does not cause a visible error, since the vertical scale has a range of 2000 cycles. However, the calculation of the Allan deviation (second graph) is disturbed, so I modified its calculation to treat the measurements before and after the interruptions as independent.
Furthermore, on September 27th NTP synchronization failed (cause unknown), which I didn't notice until October 8th, by which time my PC's clock had gained about 0.86 seconds; this has retroactively been compensated for by assuming this error had built up linearly over that period (probably a quadratic would be more accurate, but the error is insignificant on this scale).
At http://www.leapsecond.com/pages/mains/ results from a similar experiment in the USA are presented (which of course I didn't discover until after setting up my own...).
The current mains frequency in the UK can be seen at http://www.dynamicdemand.co.uk/grid.htm, and there's a graph of the last 60 minutes at http://www.nationalgrid.com/uk/Electricity/Data/Realtime/Frequency/Freq60.htm.
Note though that neither the USA nor the UK participate in the UCTE.
Comments are welcome at firstname.lastname@example.org.
Copyright © 2005-2006.
Back to my "miscellaneous" webpage.