Chirp Signal Spectrogram
Generate a frequency sweep and watch its time–frequency picture, computed with a real STFT.
What a chirp is — and how the spectrogram is made
A chirp is a signal whose instantaneous frequency changes over time. For the linear sweep the phase is
with chirp rate
so the instantaneous frequency traces a straight line on the time–frequency plane. Exponential sweeps spend equal time per octave (the workhorse of audio measurement), while quadratic sweeps accelerate as — handy for radar-style waveforms.
The spectrogram here is a Short-Time Fourier Transform: the signal is cut into Hann-windowed segments (75% overlap), each segment is FFT'd, and the magnitudes are painted as columns. The window length sets the trade-off you can experiment with live: a long window gives fine frequency resolution but smears time; a short window localizes time () but blurs frequency. That trade-off is the uncertainty principle of signal processing — no window setting beats it, you only choose where to pay. Zoom into the trace and the waveform view switches from an envelope to the actual oscillations, so you can watch the period shrink as the sweep climbs.