Your Equation

Library / Signal processing and digital filters / DSP-07

Signal processing and digital filters

One sample from a full complex spectrum

Sample n of the inverse DFT, built from all N bins (up to 8 here) in normal DFT order, each as real and imaginary parts.

Ref
DSP-07
Rev
v1
Field
Signal processing and digital filters
Result
Re x[n] [V]

The inverse DFT rebuilds sample n as the average of the bins, each rotated by e^(i2πkn/N): x[n] = (1/N) Σ X[k]e^(i2πkn/N). It needs all N bins in normal order. A real record has conjugate-symmetric bins, so the imaginary part of the result is zero. The page returns the real part.

Sample n of the inverse DFT, built from all N bins (up to 8 here) in normal DFT order, each as real and imaginary parts. The inverse divides by N and pairs with the forward convention of the previous entry. A real record needs conjugate-symmetric bins. The page returns the real part.

Calculator

Solve for
V
18
07
V
−100100
V
−100100
V
−100100
V
−100100
V
−100100
V
−100100
V
−100100
V
−100100
V
−100100
V
−100100
V
−100100
V
−100100
V
−100100
V
−100100
V
−100100
V
−100100
  • Imaginary part of x[n]2.449×10−16 V
  • Magnitude of x[n]1 V
  • Mean of the record, X[0]/N0 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.

Real part of the sample (V) current value −1 V
Re X0Real part of bin 0Key driver
−2624
Re X1Real part of bin 1
−25.524.5
Re X2Real part of bin 2
−2624
Re X3Real part of bin 3
−25.524.5
NNumber of bins
1
nSample index
1
Im X3Imaginary part of bin 3
−1−1
Im X2Imaginary part of bin 2
−1−1
Im X1Imaginary part of bin 1
−1−1
Re X4Real part of bin 4
Re X5Real part of bin 5
Re X6Real part of bin 6
Re X7Real part of bin 7
Im X0Imaginary part of bin 0
Im X4Imaginary part of bin 4
Im X5Imaginary part of bin 5
Im X6Imaginary part of bin 6
Im X7Imaginary part of bin 7
  • Sample 2 of the rebuilt record is −1 V, with an imaginary part of 2.449×10−16 V.
  • The imaginary part is zero, so these bins are conjugate-symmetric and describe a real signal.
Chart data as tables

Ranked variables

VariableTypical rangeLowest resultHighest resultSwing (V)Local stepChange in result
Re X0 Real part of bin 0−100 to 100 V−262450+4 V−100 %
Re X1 Real part of bin 1−100 to 100 V−25.524.550+4 V+100 %
Re X2 Real part of bin 2−100 to 100 V−262450+4 V−100 %
Re X3 Real part of bin 3−100 to 100 V−25.524.550+4 V+100 %
N Number of bins1 to 8 −112+1 −80 %
n Sample index0 to 7 −112+1 −100 %
Im X3 Imaginary part of bin 3−100 to 100 V−1−11.843e-14+4 V+4.44e-14 %
Im X2 Imaginary part of bin 2−100 to 100 V−1−11.232e-14+4 V−2.22e-14 %
Im X1 Imaginary part of bin 1−100 to 100 V−1−16.217e-15+4 V0 %
Re X4 Real part of bin 4−100 to 100 V−1−10+4 V0 %
Re X5 Real part of bin 5−100 to 100 V−1−10+4 V0 %
Re X6 Real part of bin 6−100 to 100 V−1−10+4 V0 %
Re X7 Real part of bin 7−100 to 100 V−1−10+4 V0 %
Im X0 Imaginary part of bin 0−100 to 100 V−1−10+4 V0 %
Im X4 Imaginary part of bin 4−100 to 100 V−1−10+4 V0 %
Im X5 Imaginary part of bin 5−100 to 100 V−1−10+4 V0 %
Im X6 Imaginary part of bin 6−100 to 100 V−1−10+4 V0 %
Im X7 Imaginary part of bin 7−100 to 100 V−1−10+4 V0 %

Sweep of Sample index

Sample indexReal part of the sample (V)
01
0.875−6.123e-17
1.75−1
2.6251.837e-16
3.51
4.3751
5.25−1.194e-15
6.125−1
7−4.596e-16

Sweep one variable

Real part of the sample (V)Hover, touch, or use the arrow keys on the chart
−1−0.500.51 0246 Sample index now −1

Variables and how each one contributes

Re x[n]

Real part of the sample

Result · V

What the equation gives you. Everything else feeds it.

N

Number of bins

· typical 1 to 8

The number of bins used, up to 8. Sets the divisor and the angle step 2π/N of the rotation. Raising it by 10 % (to 4.4) moves the result by +0 %, from −1 to −1 V.

n

Sample index

· typical 0 to 7

The sample index to rebuild. Selects which time sample is computed; the result repeats every N samples. Raising it by 10 % (to 2.2) moves the result by +0 %, from −1 to −1 V.

Re X0

Real part of bin 0

V · typical −100 to 100

The real part of bin 0, in V. Adds to the sample through cos(2π0n/N). Raising it by 10 % (to 0) moves the result by +0 %, from −1 to −1 V.

Re X1

Real part of bin 1

V · typical −100 to 100

The real part of bin 1, in V. Adds to the sample through cos(2π1n/N). Raising it by 10 % (to 2.2) moves the result by +5 %, from −1 to −1.05 V.

Re X2

Real part of bin 2

V · typical −100 to 100

The real part of bin 2, in V. Adds to the sample through cos(2π2n/N). Raising it by 10 % (to 0) moves the result by +0 %, from −1 to −1 V.

Re X3

Real part of bin 3

V · typical −100 to 100

The real part of bin 3, in V. Adds to the sample through cos(2π3n/N). Raising it by 10 % (to 2.2) moves the result by +5 %, from −1 to −1.05 V.

Re X4

Real part of bin 4

V · typical −100 to 100

The real part of bin 4, in V. Adds to the sample through cos(2π4n/N). Raising it by 10 % (to 0) moves the result by +0 %, from −1 to −1 V.

Re X5

Real part of bin 5

V · typical −100 to 100

The real part of bin 5, in V. Adds to the sample through cos(2π5n/N). Raising it by 10 % (to 0) moves the result by +0 %, from −1 to −1 V.

Re X6

Real part of bin 6

V · typical −100 to 100

The real part of bin 6, in V. Adds to the sample through cos(2π6n/N). Raising it by 10 % (to 0) moves the result by +0 %, from −1 to −1 V.

Re X7

Real part of bin 7

V · typical −100 to 100

The real part of bin 7, in V. Adds to the sample through cos(2π7n/N). Raising it by 10 % (to 0) moves the result by +0 %, from −1 to −1 V.

Im X0

Imaginary part of bin 0

V · typical −100 to 100

The imaginary part of bin 0, in V. Adds to the sample through −sin(2π0n/N). Raising it by 10 % (to 0) moves the result by +0 %, from −1 to −1 V.

Im X1

Imaginary part of bin 1

V · typical −100 to 100

The imaginary part of bin 1, in V. Adds to the sample through −sin(2π1n/N). Raising it by 10 % (to 0) moves the result by +0 %, from −1 to −1 V.

Im X2

Imaginary part of bin 2

V · typical −100 to 100

The imaginary part of bin 2, in V. Adds to the sample through −sin(2π2n/N). Raising it by 10 % (to 0) moves the result by +0 %, from −1 to −1 V.

Im X3

Imaginary part of bin 3

V · typical −100 to 100

The imaginary part of bin 3, in V. Adds to the sample through −sin(2π3n/N). Raising it by 10 % (to 0) moves the result by +0 %, from −1 to −1 V.

Im X4

Imaginary part of bin 4

V · typical −100 to 100

The imaginary part of bin 4, in V. Adds to the sample through −sin(2π4n/N). Raising it by 10 % (to 0) moves the result by +0 %, from −1 to −1 V.

Im X5

Imaginary part of bin 5

V · typical −100 to 100

The imaginary part of bin 5, in V. Adds to the sample through −sin(2π5n/N). Raising it by 10 % (to 0) moves the result by +0 %, from −1 to −1 V.

Im X6

Imaginary part of bin 6

V · typical −100 to 100

The imaginary part of bin 6, in V. Adds to the sample through −sin(2π6n/N). Raising it by 10 % (to 0) moves the result by +0 %, from −1 to −1 V.

Im X7

Imaginary part of bin 7

V · typical −100 to 100

The imaginary part of bin 7, in V. Adds to the sample through −sin(2π7n/N). Raising it by 10 % (to 0) moves the result by +0 %, from −1 to −1 V.

Worked example with the values above

  1. Rotation per bin: angle 2πkn/N = 2π × k × 2 / 4 for k = 0 to 3.
  2. Sum of the rotated bins divided by N = 4: real −1, imaginary 2.4493×10−16.
  3. x[2] = −1 V (real part).

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