Problem set — Fourier series
Problem set: Fourier series¶
Exam-style problems. Work them with a pen before touching a computer; the last two are meant to be finished numerically. Solutions and marking rubrics live with the instructor material and are deliberately not on this site.
Throughout, the course convention holds: a periodic signal of period is written with , its coefficients are , and the th harmonic’s phasor is .
Problem 1 — two waveforms, one method¶
(a) Compute the coefficients of the sawtooth ramp that rises linearly from -1 to +1 across each period. Show that every harmonic is present and that , and say which symmetry the square wave has that this one lacks.
(b) Compute the coefficients of a pulse train that equals 1 for a fraction of each period, centred on , and 0 otherwise. Show that with the normalised sinc, and locate the zeros of the envelope.
(c) Sketch both spectra. As at fixed pulse area, describe what happens to the
envelope, and say in one sentence what that implies about how much bandwidth a short pulse
needs. (You have just anticipated the central result of module 04-fourier-transform.)
Problem 2 — symmetry does the integrals¶
(a) Show that an even signal has purely real coefficients and an odd signal purely imaginary ones, using and the substitution .
(b) Prove that half-wave symmetry, , forces for all even .
(c) Classify each of the following by inspection, stating which harmonics survive and whether the coefficients are real, imaginary or neither: a square wave shifted so that it is even about ; a full-wave-rectified sine, ; a sawtooth; a pulse train of duty cycle .
(d) A signal has both half-wave symmetry and evenness. What is left, and what is the lowest harmonic that can be nonzero?
Problem 3 — Parseval and the energy budget¶
(a) Derive Parseval’s relation for a Fourier series, , using orthogonality. Say in one sentence what it means physically.
(b) Apply it to the square wave of the page and deduce .
(c) What fraction of a square wave’s power sits in the fundamental alone? In the first three nonzero harmonics? Comment on how well the ear’s impression of “a square wave” matches that budget.
(d) Relate the mean-square error of the -term partial sum to the tail , and use the decay to recover the rate quoted in the verify section.
Problem 4 — rounding the corner, numerically¶
Using wavelab.fourier (in the browser laboratory or locally):
(a) Build a square wave whose jumps have been smoothed over a width of a period —
replace each jump by a linear ramp, or by , and say which you chose.
Compute its coefficients with fourier_coefficients for .
(b) Plot against on log-log axes for each . Identify the crossover harmonic beyond which the decay steepens, and show that .
(c) Explain the result in one paragraph: a signal that is smooth on a fine scale still looks discontinuous to harmonics too coarse to resolve that scale. What does this say about the bandwidth a real amplifier needs to reproduce a real, not-quite-square, square wave?
Problem 5 — a bank of resonators as a Fourier analyser¶
Using wavelab.oscillators and wavelab.fourier:
(a) Drive an oscillator of quality factor with a square wave of repetition rate
, and sweep the resonator’s natural frequency from to
. Plot the steady-state RMS displacement against using
steady_state_response harmonic by harmonic.
(b) Confirm the peaks fall on the odd harmonics only, and that the peak heights are in the ratio once the resonance gain is divided out. Measure the response at and express it as a fraction of the response at .
(c) Cross-check one point of the sweep against a direct integration with simulate_forced, and
explain why that check is worth doing at all — what could the harmonic-sum calculation get wrong
that the integration would catch?
Problem 6 — challenge: averaging away the overshoot¶
(a) Define the Fejér sum as the average of the partial sums . Show that it can be written as a single weighted sum over harmonics, and identify the weights.
(b) Show that is the convolution of with a kernel that is non-negative everywhere, and explain why non-negativity forbids an overshoot: a weighted average with positive weights cannot exceed the largest value being averaged.
(c) Compute and for the square wave and plot both near a jump. Confirm the overshoot is gone. Then measure what it cost — compare the two at the corner of a triangle wave, and state the trade in one sentence.