Assuming I have a baseband recording of 8 bit IQ samples at 2.4MSps centered on an FM station is it correct to say that after low pass-filtering the complex signal to 240KHz, taking discrete derivative of phase and computing the envelope of the result this envelope should be the baseband audio signal?
Will this approach work for FM stereo?
I'm trying to confirm that my understanding is correct in Octave based on IQ samples recorded from RTL-SDR tuned to an FM station, but I'm getting white noise.
pkg load signal; % 2.4MSps IQ baseband signal of an FM station from RTL-SDR recorded in SDR# samples = audioread("C:\\Users\\remote\\Downloads\\sdrsharp-x86\\SDRSharp_20191228_175834Z_101200000Hz_IQ.wav", "native"); csamples = arrayfun(@complex,samples(:,1),samples(:,2)); % low pass filter and decimate to get 480KSps (240KHz Widband FM) csamples_filtered = decimate(csamples, 5); % descrete derivatives of phase filtered_derivative = conv(angle(csamples_filtered), [-1,1]); % center amplitude around 0 filtered_derivative = filtered_derivative - (max(filtered_derivative)+min(filtered_derivative)); % rectify, low pass filter and decimate to get the envelope (48 KSps) envelope = decimate(sqrt(filtered_derivative.*filtered_derivative), 10); % scale to 0..255 sound_normalized = sound_normalized * (255/max(envelope)); player = audioplayer(sound_normalized, 48000, 8); play(player);
The FFT plot of the original data in csamples (centered on Fc) corresponds to spectrum that is shown in SDR Sharp I recorded it in (and listened to the station), so I think the input data is good.