-
Notifications
You must be signed in to change notification settings - Fork 51
Demodulation modes
- use 192ksps sample rate for an incoming bandwidth of 192kHz
- collect I & Q integer samples from the QSD
- I & Q convert to float
- demodulate FM with atan2 (I_old * I - Q * Q_old, I_old * Q - I * Q_old)
- now we got the MPX wideband FM spectrum with the MONO signal (L+R) from 0-15kHz, the pilot tone carrier at 19kHz, the L-R signal in DSB without carrier around 38kHz etc.
- 2-pole IIR BPF (Q = 1000) at 19kHz to extract the 19kHz pilot tone
- rectify the 19kHz pilot tone [if(tone < 0) tone = -tone ;-)]
- eliminate DC with a one pole high pass filter
- 2-pole IIR BPF (Q = 1000) at 38kHz to form the double frequency pilot tone (now at 38kHz)
- mix the MPX signal with the 38kHz pilot tone, which should still be in phase with the original audio
- --> now we have got the L-R signal in baseband!
- multiply the L-R signal with a "stereo factor" which is a user choosable value for stereo separation of the audio output
- IIR LPF 15kHz of the L-R signal
- Right channel = L+R signal MINUS L-R signal
- Left channel = L+R signal PLUS L-R signal
- perform deemphasis on both channels (simple exponential averager with alpha = 50µsec)
- DONE
I was very happy to see that this even works with such a "slow" MCU like the Teensy microcontroller at 192ksps sample rate without decimation!
DEMOD_AM1
E(t) = sqrt(I * I + Q * Q) with arm function --> moving average DC removal --> lowpass IIR 2nd order
- 43.44% processor use
- excellent sound when tuned exactly to carrier
DEMOD_AM2
E(t) = sqrtf(I * I + Q * Q) --> highpass IIR 1st order for DC removal --> lowpass IIR 2nd order
- 43.12% processor use
- excellent sound when tuned exactly to carrier
DEMOD_AM3
E(t) = sqrt(I * I + Q * Q) --> highpass IIR 1st order for DC removal --> no lowpass
- 42.18% processor use
- excellent sound when tuned exactly to carrier
DEMOD_AM_AE1
E(n) = |I| + |Q| --> moving average DC removal --> lowpass 2nd order IIR
- 42.78% processor use
- very good sound when tuned exactly to carrier, slight hiss
- wobbling sound with strong carrier signals
DEMOD_AM_AE2
E(n) = |I| + |Q| --> highpass IIR 1st order for DC removal --> lowpass 2nd order IIR
- 41.07% processor use
- very good sound when tuned exactly to carrier, slight hiss
- wobbling sound with strong carrier signals
DEMOD_AM_AE3
E(n) = |I| + |Q| --> highpass IIR 1st order for DC removal --> NO lowpass
- 40.18% processor use
- very good sound when tuned exactly to carrier, slight hiss
- wobbling sound with strong carrier signals
DEMOD_AM_ME1
E(n) = alpha * max [I, Q] + beta * min [I, Q] --> moving average DC removal --> lowpass 2nd order IIR
- 43.48% processor use
- excellent sound when tuned exactly to carrier
DEMOD_AM_ME2
E(n) = alpha * max [I, Q] + beta * min [I, Q] --> highpass 1st order DC removal --> lowpass 2nd order IIR
- 41.63% processor use
- excellent sound when tuned exactly to carrier
DEMOD_AM_ME3
E(n) = alpha * max [I, Q] + beta * min [I, Q] --> highpass 1st order DC removal --> NO lowpass
- 40.67% processor use
- excellent sound when tuned exactly to carrier
The only two methods for AM demodulation that proved useful in terms of audio fidelity were: DEMOD_AM_ME2 and DEMOD_AM2. All others could not compete and were thus eliminated from the choice of AM demodulators in the Teensy Convolution SDR. Especially approximate envelope detection was not at all usable for AM audio.
To be written . . .