One-cycle DFT harmonic decomposition with windowing strategies, THD calculation, and true RMS computation for power quality and protection assessment.
In Detego
Harmonic analysis decomposes a periodic waveform into its constituent frequency components. Detego uses a one-cycle Discrete Fourier Transform (DFT) to compute the magnitude and phase angle of each harmonic order up to the 25th (by default). DC offset is removed before computation, and an order-dependent windowing strategy is applied to minimize spectral leakage.
Each harmonic result includes: harmonic order, frequency, magnitude (RMS), peak magnitude, percentage of the fundamental, and phase angle. These quantities are essential for CT saturation detection, transformer inrush identification, and power quality assessment.
Harmonic spectrum of a typical 6-pulse rectifier load showing characteristic 5th and 7th harmonics. THD (Total Harmonic Distortion) quantifies the total non-fundamental content relative to the fundamental.
The one-cycle DFT evaluates the Fourier coefficient at a specific harmonic order by correlating the signal with sine and cosine basis functions of the corresponding frequency. The window length equals exactly one cycle of the fundamental frequency, which ensures that the fundamental and all its integer harmonics are orthogonal within the window.
DFT coefficient for harmonic order k
Where
DC offset is removed before the DFT by subtracting the mean of the one-cycle window from each sample. This prevents the DC component from leaking into the fundamental and harmonic magnitudes, which is particularly important for fault current waveforms that contain significant decaying DC offset.
Spectral leakage occurs when the signal frequency does not perfectly match the DFT bin frequency. In power systems, the actual system frequency may deviate slightly from nominal (49.95 Hz instead of 50.0 Hz), causing the DFT window to not contain an exact integer number of cycles for higher harmonics. Detego applies a different window function for each harmonic order to optimize the accuracy-resolution tradeoff:
| Order | Window | Rationale |
|---|---|---|
| 0 (DC) | None (simple mean) | DC is computed as the arithmetic mean of the window. No windowing is needed because DC has no frequency to leak. |
| 1 (Fundamental) | Rectangular | The one-cycle window is exactly matched to the fundamental frequency, so the rectangular window provides maximum frequency resolution with zero leakage for the fundamental component. |
| 2-25 | Hanning | Higher harmonics are more sensitive to frequency deviation because the window-to-period ratio increases. The Hanning window suppresses side-lobe leakage at the cost of slightly wider main lobes. |
Hanning window function
Where
Hanning Amplitude Correction
The DC component (harmonic order 0) is computed as the arithmetic mean of all samples in the one-cycle window, before any windowing is applied. It represents the average offset of the waveform from zero and is reported with zero phase angle.
In fault recordings, a significant DC component typically indicates a decaying DC offset from an asymmetrical fault inception angle. The DC component is included in the harmonic detail table and contributes to the true RMS calculation, but is excluded from THD computation (THD only considers orders 2 and above relative to the fundamental).
The harmonic analysis engine enforces several limits to ensure valid results:
THD quantifies the total harmonic content of a waveform relative to the fundamental. It is expressed as a percentage and is the standard metric used in power quality standards (IEEE 519, IEC 61000-3-6) to assess waveform distortion.
Total Harmonic Distortion
Where
THD is undefined when H₁ = 0 (no fundamental component). In this case, Detego reports THD as 0%.
The true RMS of a signal can be reconstructed from its harmonic spectrum using Parseval's theorem. This provides an independent verification of the sliding-window RMS calculation and accounts for all frequency components including DC and harmonics.
True RMS from harmonic components
Where
For a pure sinusoid with no harmonics and no DC offset, true RMS equals H₁. Any harmonic content increases the true RMS above the fundamental.
For each harmonic order, Detego computes and reports:
| Field | Unit | Description |
|---|---|---|
| Order | -- | Integer harmonic order (0 = DC, 1 = fundamental, 2 = 2nd, ...) |
| Frequency | Hz | |
| Magnitude | A or V (RMS) | RMS magnitude of this harmonic component |
| Peak Magnitude | A or V (peak) | RMS magnitude |
| Percentage | % | |
| % True RMS | % | — percentage of the true RMS rather than the fundamental, useful when the fundamental is small or absent |
| Angle | degrees | Phase angle relative to the start of the DFT window |
In addition to the snapshot spectrum at the cursor position, Detego provides a Harmonic Extraction computed signal (created via the Compute Tab) that isolates a single harmonic order from a channel as a continuous time-domain waveform. It uses a sliding one-cycle DFT to track the selected harmonic throughout the entire recording.
Two output modes are available:
See Basic Operations — Harmonic Extraction for the full mathematical treatment.
Current transformer saturation produces distinctive harmonic signatures that can be detected through harmonic analysis:
CT Saturation Indicator
Transformer magnetizing inrush current has a characteristic harmonic profile that differential relays use to distinguish inrush from internal faults:
2nd harmonic restraint criterion
Where
Transformer overexcitation (overvoltage or under-frequency operation that drives the core into saturation) produces a different harmonic profile than inrush:
5th harmonic restraint criterion
Where
Harmonic analysis is the foundation of power quality assessment per IEEE 519 and IEC 61000-3-6. These standards define limits for individual harmonic magnitudes and total harmonic distortion based on the voltage level and the ratio of short-circuit current to load current.
| Standard | Scope | Key Limits |
|---|---|---|
| IEEE 519 | Current and voltage harmonics at PCC | Voltage THD < 5% (below 69 kV); individual harmonic < 3% |
| IEC 61000-3-6 | Emission limits for MV/HV systems | Planning levels vary by voltage level and harmonic order; uses compatibility levels for assessment |
Harmonic Sources in COMTRADE Recordings
The following table summarizes the characteristic harmonic profiles for common power system phenomena:
| Phenomenon | Dominant Harmonics | H2/H1 Ratio | Key Indicator |
|---|---|---|---|
| CT saturation | 2nd, 4th (even) | 15-40% | Waveform asymmetry + elevated even harmonics |
| Transformer inrush | 2nd, 3rd | 30-70% | Very high 2nd harmonic with decaying magnitude |
| Overexcitation | 3rd, 5th (odd) | < 10% | High odd harmonics, low 2nd harmonic |
| 6-pulse rectifier | 5th, 7th, 11th, 13th | < 5% | Characteristic harmonics at |
| Internal fault | Low harmonics | < 15% | Clean fundamental with minimal distortion (absent CT saturation) |
The K-Factor quantifies the additional heating effect of harmonics on transformers. It is used per IEEE C57.110 to determine transformer derating when supplying non-linear loads. A K-Factor of 1 indicates a pure sinusoidal load; higher values indicate progressively more harmonic heating.
K-Factor
Where
K = 1 for a pure sinusoid. K-rated transformers are available for K = 4, 9, 13, 20, 30, 40, and 50.
K-Factor Severity
Crest factor is the ratio of peak value to RMS value. For a pure sinusoid, crest factor is exactly . Harmonic distortion and waveform clipping change the crest factor, providing insight into waveform shape without requiring full spectral analysis.
Crest Factor
Where
Detego extracts the 2nd, 3rd, and 5th harmonic ratios as named metrics because these specific orders are the primary indicators used in protection and power quality diagnostics:
Visualizing Harmonic Ratios Over Time
The even harmonic ratio measures the proportion of total harmonic energy carried by even-order harmonics. In normal power systems, even harmonics are negligible because symmetrical waveforms produce only odd harmonics. An elevated even harmonic ratio indicates waveform asymmetry, which is characteristic of CT saturation.
Even Harmonic Ratio
Where
Used in combination with H2/H1 > 10% to distinguish CT saturation (even ratio > 30%) from transformer inrush (predominantly 2nd harmonic only).
IEEE 519-2014 defines voltage distortion limits at the point of common coupling (PCC). Detego checks individual harmonic magnitudes and total THD against these limits based on the selected voltage class. Non-compliant harmonics are highlighted in the spectrum chart and detail table.
| Voltage Class | Individual Harmonic | THD Limit |
|---|---|---|
| ≤ 69 kV | 3.0% | 5.0% |
| 69 kV – 161 kV | 1.5% | 2.5% |
| > 161 kV | 1.0% | 1.5% |
Voltage Class
The Trend view computes harmonic metrics at each cycle throughout the recording, displaying THD%, H2/H1%, and H5/H1% as time-series traces on the chart. Behind the scenes, K-Factor, Crest Factor, and fundamental magnitude are also computed at each cycle point and available in the underlying trend data. This reveals how harmonic content evolves during fault events, motor starting, transformer energization, and other transient conditions.
Performance