Accuracy and stability of the 50 Hz mains frequency

Update about the February 2018 anomaly is here.

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.

Phase and frequency deviation

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.

Stability

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.

Measurement setup

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 deviation.

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).

The power company's view

On short term (seconds to hours), several mechanisms are employed that continuously try to keep the frequency as close as possible to 50.0000 Hz, but that do not consider the phase (i.e., clock error).

As long as the deviation between the true time and the time indicated by a mains-driven clock is less than 20 seconds, observed at 8 o'clock in the morning, no further measures are taken.

When that deviation exceeds 20 seconds, a correction is scheduled: during the next day (from midnight to midnight) frequency regulators in the entire zone will be set to 10 mHz higher or lower than the normal 50.0000 Hz. Ideally, this results in a correction of 17.28 seconds.

The above should normally keep the deviation within about 30 seconds. Only if the deviation exceeds 60 seconds are larger corrections than 10 mHz allowed.

Links

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.