Analysis: Mains Power Quality – Voltage, Frequency & Crest Factor (10-19 May 2018)

A little more than two weeks ago, I was sitting at home in front of my computer going about my business as usual, when suddenly … the lights flicker, everything around me made an intermittent 50Hz buzz like morse code and the computer stops functioning entirely. Less than two seconds later, the computer’s automatically restarting and everything seems to be back to normal, aside from some lost work.

Whatever it was, it seems that something somewhere nearby has faulted rather spectacularly. After checking that none of our own breakers had tripped and none of our equipment had spontaneously exploded or vapourized, I took a peek outside and nothing seemed untoward.

If I was living in a neighbourhood with overhead wiring, this might not be unusual – a tree branch falling across wires, a car into a power pole, wire clashes in extreme wind or wildlife getting cooked between the lines causing some arcing would cause the symptoms experienced. But in this case, we have underground wiring throughout the whole neighbourhood, so maybe someone dug through a cable somewhere nearby? Could be a possibility with some level of housing construction nearby as well as NBN underground HFC network preparation going on at the moment.

That got me thinking – I haven’t analyzed the mains power in my present location, so what is the mains here like anyway? Would there be any interesting time-based patterns, especially with local solar generation? Or would there be any interesting cross-correlation patterns? I was curious.


Throughout the period of 10/05/2018 through to 19/05/2018, I connected my Tektronix PA1000 Power Analyzer to the incoming mains from an ordinary GPO inside the house, which is served by Endeavour Energy. Using PWRVIEW running on a Windows 10 computer, I recorded the Voltage (Volts RMS), Frequency (Hz) and Crest Factor at maximum resolution approximately one second intervals throughout this period. The data was exported to an Excel spreadsheet for further analysis.

A total of 842,198 data points were recorded in this time, resulting in an Excel workbook of about 130MiB. A 604,616 data point subset comprising of the readings between 11/05/2018 to 17/05/2018 was used for weekly average trend analysis. Further graphs were made on 10-minute averaging which were based on taking the mean of 600 consecutive readings.

Based on the datasheet, the PA1000 is specified for a worst case (in this scenario) voltage error of about 0.43V and frequency error of 0.05Hz. No accuracy figures were available for crest factor. The operating temperature throughout the experiment was maintained within instrument limits.

Results and Analysis

General Statistics

Overall, the general statistics on the recorded data were as follows.

MEAN  245.4681 50.00089  1.377924
STDEV 1.753048 0.061127  0.0051
MAX   253.96   50.285    1.8858
MIN   236.90   49.758    1.3642
RANGE 17.06    0.527     0.5216

The mean voltage can be seen to be about 245.5V, which is a little higher than the 240V which was the official nominal voltage prior to the 230V harmonization, but still below the 253V (230V+10%) high limit. With a standard deviation of just 1.75V, the voltage regulation is quite good, although in its maximum, it did hit the high limit.

Frequency was pretty much spot-on, with quite a bit of range reflecting network operating responses and one-off measurement errors possibly due to noise around the zero-crossing.

Crest factor was lower than the ideal 1.414, reflecting the common trend towards flattening of the peaks of sine waves thanks to the widespread use of switch-mode converters. The range for crest factor was also quite high, suggesting many potential high spike readings due to noise.

All Data Graphs

One of the first questions I had was whether there was a correlation between locally observed voltage and frequency. While frequency can be measured and reflects the energy balance between generation and load, voltage also reflects the load to some degree but in a more localized way (primarily resistive losses in the local distribution network). As a result of regulating devices (e.g. tap-changing transformers), I didn’t expect that there would be any relation and the data seems to support this with a very low R^2 value, implying only a very slight correlation.

The next question I had was to do with the line voltage – what is the probability of observing a given voltage on the line. By grouping into 0.2V bins and plotting a probability density function, it seems that it roughly follows a symmetrical bell curve, although with two closely spaced peaks. Given this result, I think plotting a cumulative density function might be more instructive.

With the CDF, it seems that the middle probability corresponds to 245.25V, with the voltage staying between 243.0V and 247.5V in 90% of the time.

Repeating the same thing with frequency instead, grouped in 0.01Hz bins shows again something quite close to a symmetrical bell curve, with a slight left skew and a few spikes.

We operate at 50Hz in Australia, and the middle probability seems to correspond to 49.992Hz or thereabouts which is extremely close – the difference is less than the instrument’s guaranteed error margin! The frequency seems to stay between 49.91Hz and 50.072Hz for 90% of the time.

This got me curious as to what the crest factor (which describes the peak-to-average ratio of the waveform) was doing in relation to the two variables of voltage and frequency. The plot seems to show that the crest factors are mostly in a big blob towards 1.38, but in the middle, seems to exhibit some pockets of higher crest factor values. This plot itself is deceptive, as you might see later, as there are quite a lot more points towards the centre of the plot where a given voltage occurs more frequently – so to see a larger spread in crest factor values towards the middle could be expected.

Crest factor versus frequency was quite a surprise too – it shows clustering again with some banding due to the limited resolution in the frequency axis, but there are now three distinct “pillars” where crest factors increase – one at low frequency, one at high frequency and one around nominal frequency. This all becomes reasonable when we consider the weekly trend graphs presented in the following section.

Weekly Trend Graphs

Using a seven day subset of the data, it was possible to overlay all seven days into a single graph to try and identify daily recurring patterns.

Looking at voltage, it seems every day has its own pattern, and while there are ups and downs, it’s not clear exactly that there is any significant trend. There is, however, a strange occurrence on the 15th, where in the evening, the voltage seemed anomalously high for a few hours.

The overlay frequency graph shows that there is just about no great pattern at all – every day shows very similar variance.

The crest factor graph, however, shows a few clear temporal patterns of interest. Notably the spikes in crest factor are distributed around the day, but generally lie at 28 minutes and 58 minutes past the hour. This gives us a clear sign that the crest factor spikes seem to be a response to off-peak power switching, commanded by K22/Decabit switches. This matches what is known from measuring the schedule in the past. But outside those spikes, there is a sort of “wave” going on which repeats each day.

Noting that the graphs are a bit haphazard overlaid, I decided to average the results from each second across all days of the week and plot the averaged data instead. On top of this, I added a three-minute running average trend-line to the data to see if any trends could be made clearer.

The voltage trend graph only shows a subtle voltage depression in the middle of the day, but hardly anything significant. In the morning at about 6:10am, the voltage falls, and just before 7am, it peaks again, which seems to be one of the major voltage excursions of the day. This happens in reverse around 6pm, but even then, the change is only about 3V. In the evenings, the voltage recovers at around 8pm.

The spikes go up and down, but on the whole, it’s practically balanced around 50Hz, so nothing particularly interesting here.

The crest factor graph confirms the overlay results – there is a nice “wave” pattern going on, with spikes at the off-peak switching times. The range of variation in crest factor at each time is actually quite low compared to the other measured parameters. I suppose the three-legged scatter plot with frequency can be explained by the idea that this off-peak switching is scheduled to power up devices when the grid has excess energy at night for storage (i.e. when frequency is high), or turn them off at times of high loading (i.e. when frequency is low), with other times switching occurring at neutral frequency purely due to timing requirements.

I decided to take it one step further and average into 10-minute time intervals to see what the resulting graph might look like.

The subtle voltage trend has been slightly clarified with the dip around 6am remaining, but also new dips near 10am, 4:30pm, 6pm appearing. A noticeable upward movement is seen around 8pm.

Frequency remains rather random in its trend, but with a more noticeable rise in frequency around 6:30am-7:00am.

For crest factor, this had the effect of smoothing out most of the day-time spikes, giving us a nice look at the “roller coaster” type curve. I suppose it correlates well with the productive daytime power usage – e.g. all those computers being used, along with industrial processes may be responsible for the crest factor reduction.


Through leaving my Tektronix PA1000 to continuously sample the mains supply, I discovered that the voltage here is actually quite stable, and slightly on the high side (as seems to be the norm). There is only a very subtle daily voltage trend, whereas the frequency seems to be largely uncorrelated with voltage or time, implying good local voltage regulation. The crest factor measurements were most surprising, showing spikes around off-peak power switching events and having a noticeable trend throughout the day with the crest factor dipping in the middle of the day and again towards midnight and 4am. The crest factor seems to peak around 7am and again at about 6pm, which may reflect a difference in types of loads connected to the grid.

About lui_gough

I'm a bit of a nut for electronics, computing, photography, radio, satellite and other technical hobbies. Click for more about me!
This entry was posted in Electronics and tagged , , , . Bookmark the permalink.

One Response to Analysis: Mains Power Quality – Voltage, Frequency & Crest Factor (10-19 May 2018)

  1. Power system nerd says:

    If you’re interested in the power system, the debate about Australia’s frequency is a hot topic at the moment, with lots of discussion about how its done now and how it should be done into the future. Apparently the frequency band was much tighter in 2001 than it is today;
    see here for a graph and someone’s opinion on why

Error: Comment is Missing!