Your Equation

Library / Signal processing and digital filters / DSP-08

Signal processing and digital filters

Mean square from two-sided DFT coefficients

Mean-square value of the record from the magnitudes of all N unnormalised DFT bins, with DC retained.

Ref
DSP-08
Rev
v1
Field
Signal processing and digital filters
Result
ms [V²]

Parseval’s theorem for the unnormalised DFT states that Σ|x[n]|² = (1/N)Σ|X[k]|², so the mean square of the record is Σ|X[k]|²/N². Only the bin magnitudes matter. Keep the DC bin to include the mean, and use all N bins, including those above N/2.

Mean-square value of the record from the magnitudes of all N unnormalised DFT bins, with DC retained. This is Parseval’s theorem for this convention, and it has no sample-interval factor. Only the bin magnitudes matter.

Calculator

Solve for
V²
18
V
0100
V
0100
V
0100
V
0100
V
0100
V
0100
V
0100
V
0100
  • RMS value, √(mean square)0.7071 V
  • Power in the DC bin, |X₀|²/N²0 V²
  • Power excluding the mean (variance)0.5 V²

What drives the result

Each variable is moved across its typical range while the others stay at the values above. The longest bar is the key driver.

Mean square (V²) current value 0.5 V²
|X0Magnitude of bin 0Key driver
626
|X1Magnitude of bin 1
0.25625
|X2Magnitude of bin 2
626
|X3Magnitude of bin 3
0.25625
NNumber of bins
01
|X4Magnitude of bin 4
|X5Magnitude of bin 5
|X6Magnitude of bin 6
|X7Magnitude of bin 7
  • The record has a mean square of 0.5 V², an RMS value of 0.7071 V.
  • 0 % of the power is in the DC bin; the rest is the variance of the fluctuating part.
Chart data as tables

Ranked variables

VariableTypical rangeLowest resultHighest resultSwing (V²)Local stepChange in result
|X0 Magnitude of bin 00 to 100 V0.5625.5625+10%0 %
|X1 Magnitude of bin 10 to 100 V0.25625.3625+10%+10.5 %
|X2 Magnitude of bin 20 to 100 V0.5625.5625+10%0 %
|X3 Magnitude of bin 30 to 100 V0.25625.3625+10%+10.5 %
N Number of bins1 to 8 011+1 −36 %
|X4 Magnitude of bin 40 to 100 V0.50.50+10%0 %
|X5 Magnitude of bin 50 to 100 V0.50.50+10%0 %
|X6 Magnitude of bin 60 to 100 V0.50.50+10%0 %
|X7 Magnitude of bin 70 to 100 V0.50.50+10%0 %

Sweep of Magnitude of bin 1

Magnitude of bin 1 (V)Mean square (V²)
00.25
12.510.02
2539.31
37.588.14
50156.5
62.5244.4
75351.8
87.5478.8
100625.3

Sweep one variable

Mean square (V²)Hover, touch, or use the arrow keys on the chart
0100200300400500600 020406080100 Magnitude of bin 1 (V) now 0.5

Variables and how each one contributes

ms

Mean square

Result · V²

What the equation gives you. Everything else feeds it.

N

Number of bins

· typical 1 to 8

The number of bins, up to 8. Divides the squared sum by N², so more bins for the same magnitudes means a lower mean square. Raising it by 10 % (to 4.4) moves the result by +0 %, from 0.5 to 0.5 V².

|X0

Magnitude of bin 0

V · typical 0 to 100

The magnitude of bin 0, in V. Adds its square to the total. Raising it by 10 % (to 0) moves the result by +0 %, from 0.5 to 0.5 V².

|X1

Magnitude of bin 1

V · typical 0 to 100

The magnitude of bin 1, in V. Adds its square to the total. Raising it by 10 % (to 2.2) moves the result by +10.5 %, from 0.5 to 0.5525 V².

|X2

Magnitude of bin 2

V · typical 0 to 100

The magnitude of bin 2, in V. Adds its square to the total. Raising it by 10 % (to 0) moves the result by +0 %, from 0.5 to 0.5 V².

|X3

Magnitude of bin 3

V · typical 0 to 100

The magnitude of bin 3, in V. Adds its square to the total. Raising it by 10 % (to 2.2) moves the result by +10.5 %, from 0.5 to 0.5525 V².

|X4

Magnitude of bin 4

V · typical 0 to 100

The magnitude of bin 4, in V. Adds its square to the total. Raising it by 10 % (to 0) moves the result by +0 %, from 0.5 to 0.5 V².

|X5

Magnitude of bin 5

V · typical 0 to 100

The magnitude of bin 5, in V. Adds its square to the total. Raising it by 10 % (to 0) moves the result by +0 %, from 0.5 to 0.5 V².

|X6

Magnitude of bin 6

V · typical 0 to 100

The magnitude of bin 6, in V. Adds its square to the total. Raising it by 10 % (to 0) moves the result by +0 %, from 0.5 to 0.5 V².

|X7

Magnitude of bin 7

V · typical 0 to 100

The magnitude of bin 7, in V. Adds its square to the total. Raising it by 10 % (to 0) moves the result by +0 %, from 0.5 to 0.5 V².

Worked example with the values above

  1. Sum of squared magnitudes: 0² + 2² + 0² + 2² = 8 V².
  2. N² = 16.
  3. Mean square = 8 / 16 = 0.5 V².

Assumptions and limits

  • Forward transform with a negative exponent and no scale factor; inverse transform divides by N.
  • A record that is treated as one period of a periodic sequence, indexed from zero.

Common mistakes

  • Mixing the forward and inverse sign conventions or the 1/N factor.
  • Forgetting that DFT bins above N/2 stand for negative frequencies.
  • Reading phase without noting the time origin of the record.

Statistics and uncertainty

The DFT relations here are exact for the stated conventions, so the only uncertainty is in the data. In floating point, results match direct summation to about 1e−15 relative for short records, and the main risk is a sign or scale-convention mismatch with another tool.

Where it is used

  • Checking FFT output by direct summation on a short record.
  • Understanding shifts, scaling and power conservation in the frequency domain.

Maths you need

  • Complex exponential: e^{iθ} = cos θ + i sin θ
  • DFT pair: forward without a scale factor, inverse divides by N
  • Periodic extension: the DFT treats a record as repeating forever

Related formulas

Practise this formula