Hi,
i could find the problem last night.
The problem was caused by the DC spike, from the analog front-end!
In my prior mail(s), i rejected this explanation .. but now i found out,
that the digital anti-alias filter is such bad quality (a simple
averaging), that the DC is folded into the receive band when decimating
samplerate!
I could fix the problem my moving the new DC filter ("-E rdc") to full
input at capture_rate. That eliminates the DC problem completely and
therefor also removes the extra noise produced on demodulation.
For being able to apply DC filter before mixing, i had to do conversion
of captured 8 bit samples to 16 bit first, before mixing up the desired
band to zero with rotate_90. Therefore i also changed rotate_90 to work
with 16 bit samples.
The above works fine with default parameters (-F 0). It does NOT work
when using option "-F 9". Could not figure out why!?
Find attached the patch file. Please consider merging it upstream.
kind regards,
Hayati
Am 18.07.2015 um 10:54 schrieb Hayati Ayguen:
Hi Murat and all others,
what i have hear is definitely NOT the DC spike coming from the analog
front-end!
Whilst my experiments, trying to get rtl_fm run on Raspi 2, i added an
option to rtl_fm to be verbose ("-v 1"). See
https://github.com/hayguen/librtlsdr
When calling rtl_fm with "-s 24000 -f 433.25M -M raw" i get following
outputs:
"capture_rate = 42 * 24000 = 1008000"
"capture_freq = freq + capture_rate / 4 = 433502000"
From capture_rate you see, that the RTL's ADC works at a samplerate of
1.008 MHz. And the RTL is parametrized to 433.502 MHz.
So, the RTL's DC is at 433.502 MHz - far away from the desired 433.25 MHz.
On digital signal preprocessing the rtl_fm mixes the desired frequency
up to baseband 0 Hz and the does low pass filtering and decimation to
the samplerate of 24 kHz.
This result is what i recorded in my previous mail and had a look with
SDR#, the screenshot.
At the moment, I had no look into the source of low pass filter. I
suppose that the DC is introduced here.
kind regards,
Hayati
Am 18.07.2015 um 08:45 schrieb Murat Tologlu:
> Dear Hayati,
>
> I am glad to see that my Debian-Jessie suggestion helped you to progress.
>
> Regarding your recent question: If I don't understand wrong, This is a well-known
problem called as DC Spike which exist more or less in all SDR receivers. . Dr. Wickert of
UCCS has an excellent laboratory note on RTL-SDR also explains this nature (see page 7) :
http://www.eas.uccs.edu/wickert/ece4670/lecture_notes/Lab6.pdf You can reach Dr.
Wickert's other DSP notes from here:
http://www.eas.uccs.edu/wickert/index.shtml
>
> DC Spike comes from analog front end of the RTL-SDR dongle and we can talk about
several solutions. First and the easiest solution is to move the center frequency a bit up
and down to avoid interference with DC spike (this is called as offset tuning). Some
hardware manufacturer claim that they manufacture better quality thus lower DC spike sdr
chips and boards. You may also consider a software "notch filter" to reduce the
DC spike !
>
> Kind regards,
> Murat
>
> -----Original Message-----
> From: osmocom-sdr [mailto:osmocom-sdr-bounces@lists.osmocom.org] On Behalf Of Hayati
Ayguen
> Sent: Saturday, July 18, 2015 2:02 AM
> To: osmocom-sdr(a)lists.osmocom.org
> Subject: rtl_fm: degraded demodulation caused by self-introduced DC !?
>
>
> Hi,
>
> after i got rtl_fm run on Raspi 2 with Debian Jessie .. now i have some additional
noise in the FM demodulated audio!
>
> With a "raw" recording (see attachment) i can see an additional carrier at
the DC frequency of the demodulated output. That corresponds to the tuned frequency (=
433.25 MHz) parametrized to rtl_fm.
> Due to calibration error, the FM carrier has some offset: ~ -1.3 kHz as visible in
screenshot.
> The DC carrier does demodulate to some distortion!
>
> Option "-E dc" does not help, cause that removes a DC in the demodulated
output. An additional option to filter DC before demodulation does help a bit .. but does
not solve the problem, which looks to be introduced earlier ..
>
> I would not have expected such a DC, cause IMHO it's produced whilst
downconversion or filtering.
> It's not the RTL dongle's DC, which should be far far away by 1/4 of the high
samplerate.
>
> Someone else seen this problem?
> Does anyone have a useful solution?
>
> kind regards,
> Hayati
>
>