Library / Signal processing and digital filters / DSP-09
Signal processing and digital filters
Phase change from a circular sample delay
Coefficient of bin k after delaying a periodic N-sample sequence by d whole samples (DFT shift theorem).
- Ref
- DSP-09
- Rev
- v1
- Field
- Signal processing and digital filters
- Result
- Re Y[k] [V]
Delaying a periodic N-sample sequence by d samples multiplies each DFT coefficient by e^(−i2πkd/N): a pure phase rotation that grows with k and d. The magnitude is unchanged. This is the DFT shift theorem, and it applies exactly only to a circular shift, so a finite record needs its ends handled.
Coefficient of bin k after delaying a periodic N-sample sequence by d whole samples (DFT shift theorem). The factor rotates the coefficient and keeps its magnitude. An ordinary finite record needs explicit handling of its ends. The page returns the real part; the imaginary part and magnitude are in the derived rows.
Calculator
- Imaginary part of Y[k]−2.828 V
- Magnitude of Y[k] (unchanged)4 V
- Phase rotation, −360kd/N−45 °
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.
- Delaying by 1 sample(s) rotates bin 1 by −45°, giving a real part of 2.828 V while the magnitude stays at 4 V.
- Higher bins rotate faster for the same delay, which is why a time shift shows as a linear phase slope across frequency.
Chart data as tables
Ranked variables
| Variable | Typical range | Lowest result | Highest result | Swing (V) | Local step | Change in result |
|---|---|---|---|---|---|---|
| Re X Real part of the coefficient | −100 to 100 V | −70.71 | 70.71 | 141.4 | +4 V | +100 % |
| Im X Imaginary part of the coefficient | −100 to 100 V | −67.88 | 73.54 | 141.4 | +4 V | +100 % |
| k Bin index | 0 to 1,000 | −4 | 4 | 8 | +1 | −100 % |
| d Delay | 0 to 1,000 samples | −4 | 4 | 8 | +1 samples | −100 % |
| N Transform length | 1 to 4,096 samples | −4 | 4 | 8 | +1 samples | +8.34 % |
Sweep of Delay
| Delay (samples) | Real part of the delayed coefficient (V) |
|---|---|
| 0 | 4 |
| 125 | −2.828 |
| 250 | 8.035e-14 |
| 375 | 2.828 |
| 500 | −4 |
| 625 | 2.828 |
| 750 | −1.274e-13 |
| 875 | −2.828 |
| 1,000 | 4 |
Sweep one variable
Variables and how each one contributes
Real part of the delayed coefficient
What the equation gives you. Everything else feeds it.
Real part of the coefficient
The real part of the coefficient X[k], in V. Scales the rotated coefficient in proportion. Raising it by 10 % (to 4.4) moves the result by +10 %, from 2.828 to 3.111 V.
Imaginary part of the coefficient
The imaginary part of the coefficient X[k], in V. Scales the rotated coefficient in proportion. Raising it by 10 % (to 0) moves the result by +0 %, from 2.828 to 2.828 V.
Bin index
The bin index. A higher bin rotates faster for the same delay, as its frequency is higher. Raising it by 10 % (to 1.1) moves the result by +0 %, from 2.828 to 2.828 V.
Delay
The delay, in whole samples. More delay rotates the coefficient further. Raising it by 10 % (to 1.1) moves the result by +0 %, from 2.828 to 2.828 V.
Transform length
The transform length, in samples. A longer transform makes the same delay a smaller fraction of a cycle at that bin. Raising it by 10 % (to 8.8) moves the result by +8.34 %, from 2.828 to 3.064 V.
Worked example with the values above
- Rotation angle: −2πkd/N = −2π × 1 × 1 / 8 = −0.7854 rad (−45°).
- Rotation factor: cos = 0.70711, sin = −0.70711.
- Y = X × factor, real part 2.8284 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