Chirp Signal Simulator
Linear Chirp Signal
A chirp is a sinusoidal signal whose frequency changes continuously with time. In a linear chirp, the instantaneous frequency changes linearly.
$$f(t)=f_{start}+kt,\qquad
k=\frac{f_{end}-f_{start}}{T}$$
where:
- \(f_{start}\) = starting frequency (Hz)
- \(f_{end}\) = ending frequency (Hz)
- \(T\) = chirp duration (seconds)
- \(k\) = chirp rate (Hz/s)
The phase of the chirp signal is obtained by integrating frequency:
$$\phi(t)=2\pi\left(f_{start}t+\frac{k}{2}t^2\right)$$
$$s(t)=\sin\left(2\pi
\left(f_{start}t+\frac{k}{2}t^2\right)\right)$$
For a down-chirp, frequency decreases with time:
$$s(t)=\sin\left(2\pi
\left(f_{end}t-\frac{k}{2}t^2\right)\right)$$
Understanding the Spectrogram
A spectrogram shows how the frequency components of a signal change with time. It is obtained by applying FFT on short overlapping sections of the signal.
| Element | Meaning |
|---|---|
| X-axis | Time (seconds). Each column represents one short analysis window. |
| Y-axis | Frequency (Hz). Each row represents an FFT frequency bin. |
| Color | Magnitude of frequency component. Brighter color means stronger signal energy. |
$$\text{Spectrogram}(t,f)
=
\left|\mathrm{STFT}\{s(t)\}\right|$$
In this simulator:
- Window size = 64 samples
- Hop size = 32 samples
- FFT is calculated for each window
- The frequency magnitude is displayed as a heatmap
Interpretation
Up-Chirp: The bright line moves upward because frequency increases with time.
Down-Chirp: The bright line moves downward because frequency decreases with time.