Library / Signal processing and digital filters / DSP-02
Signal processing and digital filters
Sample of a linear frequency sweep
Value at time t of a linear chirp of peak amplitude A that starts at f0 and sweeps at k hertz per second.
- Ref
- DSP-02
- Rev
- v1
- Field
- Signal processing and digital filters
- Result
- x(t) [V]
A linear chirp has instantaneous frequency f0 + kt, and the phase is the integral of frequency: 2π(f0 t + kt²/2). The quadratic term makes the phase grow faster as the frequency rises. For a sampled sweep, evaluate at t = n/fs and keep the highest swept frequency below fs/2.
Value at time t of a linear chirp of peak amplitude A that starts at f0 and sweeps at k hertz per second. The instantaneous frequency is f0 + kt and the quadratic phase term is its integral. Evaluate at t = n/fs for samples, and keep the swept band below Nyquist.
Calculator
- Instantaneous frequency, f₀ + kt8 Hz
- Phase accumulated, f₀t + kt²/20.975 cycles
- Extra phase from the sweep alone, kt²/20.225 cycles
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.
- At t = 0.15 s the instantaneous frequency has swept from 5 Hz to 8 Hz, and the signal value is 0.9991 V.
- The sweep adds 0.225 cycles of phase beyond a steady 5 Hz tone, so a tone-based phase estimate would be wrong here.
Chart data as tables
Ranked variables
| Variable | Typical range | Lowest result | Highest result | Swing (V) | Local step | Change in result |
|---|---|---|---|---|---|---|
| A Peak amplitude | 0.001 to 100 V | 9.991e-4 | 99.91 | 99.91 | +10% | +10 % |
| φ Initial phase | −3.142 to 3.142 rad | −0.9986 | 0.9991 | 1.998 | +0.12566370600000001 rad | −1.33 % |
| t Time | 0 to 10 s | −0.9889 | 0.9991 | 1.988 | +10% | −31.1 % |
| k Sweep rate | −1,000 to 1,000 Hz/s | −0.9801 | 0.9991 | 1.979 | +40 Hz/s | −196 % |
| f0 Start frequency | 0 to 1,000 Hz | −0.04291 | 0.9991 | 1.042 | +10% | −12.8 % |
Sweep of Time
| Time (s) | Signal value (V) |
|---|---|
| 0 | 0.9801 |
| 1.25 | 0.8335 |
| 2.5 | 0.9801 |
| 3.75 | −0.8335 |
| 5 | 0.9801 |
| 6.25 | 0.8335 |
| 7.5 | 0.9801 |
| 8.75 | −0.8335 |
| 10 | 0.9801 |
Sweep one variable
Variables and how each one contributes
Signal value
What the equation gives you. Everything else feeds it.
Peak amplitude
The peak amplitude, in V. Scales the signal in direct proportion. Raising it by 10 % (to 1.1) moves the result by +10 %, from 0.9991 to 1.099 V.
Start frequency
The start frequency at t = 0, in Hz. A higher start frequency raises the phase at any later time. Raising it by 10 % (to 5.5) moves the result by −12.8 %, from 0.9991 to 0.8707 V.
Sweep rate
The sweep rate, in Hz per second. A faster sweep raises the quadratic phase term and the end frequency. Raising it by 10 % (to 22) moves the result by −1.6 %, from 0.9991 to 0.9831 V.
Time
The time since the start of the sweep, in s. Moves along the sweep; the frequency has risen by kt. Raising it by 10 % (to 0.165) moves the result by −31.1 %, from 0.9991 to 0.6887 V.
Initial phase
The initial phase, in radians. Shifts the whole waveform. Raising it by 10 % (to 0.22) moves the result by −0.106 %, from 0.9991 to 0.998 V.
Worked example with the values above
- Frequency term: f₀t = 5 × 0.15 = 0.75 cycles.
- Sweep term: kt²/2 = 20 × 0.0225 / 2 = 0.225 cycles.
- x = A cos[2π × 0.975 + 0.2] = 0.99908 V.
Assumptions and limits
- Uniform sampling at a fixed, known rate with a clean, stable clock unless the page names a jitter term.
- Ideal, linear converters and a signal that stays inside full scale.
Common mistakes
- Using a frequency above fs/2, which aliases to a different baseband frequency.
- Mixing hertz with radians per second or rad/sample.
- Counting jitter or quantisation as the only noise source and forgetting thermal and clock noise.
Statistics and uncertainty
Real converters add offset, gain error, nonlinearity and thermal noise to the ideal quantisation and jitter limits, so a measured SNR is typically 3 dB to 10 dB below the ideal figure. Treat these formulas as upper bounds on performance.
Where it is used
- Generating test signals and predicting what a converter can resolve.
- Choosing a sampling rate, a bit depth and a clock source for an acquisition chain.
Maths you need
- Sampling theorem: a signal bandlimited below fs/2 is fully described by its samples
- Decibel: dB = 20 log₁₀ of an amplitude ratio
- Nyquist frequency: half the sampling rate