Sign in

How one-cycle RMS is calculated from a COMTRADE record

The window, the step, the formula and the per-unit reference SagSwell uses for the RMS trend of every channel, with a worked example and how it differs from the IEC 61000-4-30 half-cycle refresh.

Updated · SagSwell

Every sag, swell and interruption SagSwell reports starts from one calculation: the RMS value of each channel over one cycle, recomputed as the window slides along the record. This page sets out exactly how that is done, so you can check a figure by hand or explain it in a report.

The window

The window holds one cycle of samples at the nominal power frequency taken from the .cfg file (50 or 60 Hz):

N = round(fs / f0)          fs = sampling rate, f0 = nominal frequency

The sampling rate is not read from the .cfg alone. SagSwell takes the median interval between the first two thousand time stamps in the .dat file, because a .cfg that declares one rate while the time stamps say another is common enough to matter.

The step

The window moves forward by an eighth of a cycle (N / 8 samples, at least one). Each position gives one point of the RMS trend, time-stamped at the centre of its window. On very long records the step is widened so the trend has no more than about four thousand points.

The formula

For each window position, two values are computed from the same N samples xj:

True RMS         = √( (1/N) · Σ x_j² )

Fundamental RMS  = |X1| / √2,   X1 = (2/N) · Σ x_j · e^(−j·2π·f0·j/fs)

The true RMS includes every harmonic and is what the sag and swell detection uses, as IEEE 1159 and IEC 61000-4-30 do. The fundamental RMS comes from a one-cycle Fourier filter and feeds the phasors and sequence components.

A worked example

Recordfsf0N (samples)StepStep in time
22 kV feeder sample3.2 kHz50 Hz6482.5 ms
132 kV fault sample4.8 kHz50 Hz96122.5 ms
A 60 Hz relay at 16 samples/cycle960 Hz60 Hz1622.08 ms

Both sample records can be opened in SagSwell and the RMS tab compared with these figures.

Per unit: what the value is divided by

The RMS trend is shown in volts or amps and in per unit. The per-unit base is, in order of preference:

  1. A nominal declared for the channel, when one has been entered.
  2. A nominal declared for the site (for voltage channels).
  3. The median one-cycle RMS of the whole record for that channel.

The median is used rather than the opening cycles because recorders do not always trigger before the disturbance. A record triggered on the recovery opens with the voltage already low; taking the first cycles as 1.0 pu would turn the return to normal into an impossible swell of several hundred per cent. The median is the level the record spends most of its time at, so a disturbance that lasts less than half the record does not move it. A record that is mostly disturbed still needs a declared nominal, and the file check asks for one.

How this compares with IEC 61000-4-30

IEC 61000-4-30 defines Urms(1/2): the RMS over one cycle, refreshed every half cycle, and it applies hysteresis to the thresholds. SagSwell uses the same one-cycle window, refreshes it four times as often and applies no hysteresis. The magnitudes agree; the start and end of an event can differ by a fraction of a cycle, and a voltage hovering right at a threshold can split into several short events where a Class A meter reports one. SagSwell reads records; it is not a Class A instrument and does not claim to be one.

Limits worth knowing

  • The window length uses the nominal frequency. During a large frequency excursion it no longer spans exactly one cycle and the RMS ripples slightly.
  • When fs / f0 is not a whole number, N is rounded and the window is a fraction of a sample long or short.
  • A channel with nothing connected to it is recognised as dead and left out of the event detection.

The next step, turning this trend into events, is in how sags and swells are detected.

Questions people ask

How many samples are in a one-cycle RMS window?
The sampling rate divided by the power frequency, rounded to a whole number: 64 samples at 3.2 kHz on a 50 Hz system, 80 at 4.8 kHz on 60 Hz.
Why is RMS taken over one cycle rather than one sample?
RMS is a mean over time. Over less than a cycle the result depends on where the window starts on the sine wave; over exactly one cycle it does not, which is what makes it a stable measure of the voltage level.
What is the per-unit reference if no nominal voltage is entered?
The median one-cycle RMS of the whole record, channel by channel. It is the level the record spends most of its time at, so it is not thrown off by a record that starts during a disturbance. A declared nominal voltage replaces it when one is entered.
Does SagSwell follow IEC 61000-4-30?
It uses the same one-cycle window but refreshes it every eighth of a cycle instead of every half cycle, and it applies no hysteresis. Durations can therefore differ from a Class A instrument by a fraction of a cycle. SagSwell is a record viewer, not a Class A meter.

References

  • IEC 61000-4-30:2015, Testing and measurement techniques — Power quality measurement methods (Urms(1/2) definition)
  • IEEE Std 1159-2019, IEEE Recommended Practice for Monitoring Electric Power Quality

Free tools

More guides