Amplitude modulation is a useful introduction to how a baseband message changes a carrier and how a receiver recovers that message. In conventional AM with carrier,
[
s(t) = A_c,[1 + \mu m_n(t)]\cos(2\pi f_c t),
]
where the normalized message satisfies |m_n(t)| ≤ 1. Keeping 0 ≤ μ ≤ 1 avoids overmodulation for envelope detection.
Generate the signal
1 | fs = 100e3; |
The sample rate must comfortably exceed twice the highest generated frequency.
Envelope detection
1 | analyticSignal = hilbert(am); |
The Hilbert-transform method is an analytical envelope detector. A physical diode detector introduces ripple, thresholds, and an RC time-constant tradeoff.
Coherent demodulation
1 | mixed = 2 * am .* carrier; |
Coherent detection requires carrier frequency and phase alignment. The FIR filter introduces group delay that should be compensated before waveform comparison.
Noise and spectrum analysis
Add controlled white noise with a documented signal-to-noise ratio, then run both demodulators and compare mean-squared error or output SNR. Plot a properly scaled FFT or use periodogram to show the carrier at fc and sidebands at fc ± fm.
This simulation demonstrates principles, not a complete radio receiver. Real systems also face bandwidth limits, oscillator error, nonlinear stages, fading, interference, automatic gain control, and filtering constraints.