-1
$\begingroup$

I'm capturing an RF signal transmitted at 433.8MHz, with a bandwidth of about 50KHz. My goal is to be able to save it as a .wav file.

I'm using an RTL-SDR dongle and a software named HDSDR, where I set the input sample frequency to 3.2MHz and the output sample frequency to 192MHz. In this case, when I open the .wav file in Audacity, I see the waveform is correct.

Then, I'm trying to do the same using another software called GNU Radio where you develop your own system by adding each block involved in the processing. In order to get a good sync (so I try to match my HDSDR signal with the recorded here), I have to set the input sample frequency to 2MHz and the output sample frequency to 192KHz.

However, there are some other blocks in the demodulation process which parameters are not shown in HDSDR so I'm obtaining a signal with pulse lengths that don't match the correct one (the one get by HDSDR).

  1. The first block I've got is Rational Resampler, where I set a decimation factor of 10 and an interpolation factor of 1.

  2. Then, we've got the AM Demodulator, where I set a channel rate of 200K, audio decimation factor od 1, passband at 10K and stop frequency at 11K. I don't fully understand this block so it's possible the problem is here.

  3. Then I've got an LPF with a sample rate of 200K, cutoff frequency of 70K, transition width of 1K, Hamming window and beta=6.76.

  4. And then there are some gain factors and the wav file converter with a sample rate of 192K and 16 bits per sample.

It'd be great if someone could explain me if the values at the Ration Resampler, AM Demodulator and LPF blocks make sense.

$\endgroup$
  • 1
    $\begingroup$ In your second paragraph, do you mean 192 _k_Hz? What is the passband bandwidth of the AM signal? Is it AM DSB-LC or DSB-SC? Why are you using different sampling rates in HDSDR and gnuradio? Have you connected a time sink block to the input of the WAV file sink to see if the signal peaks are close to 1 and -1? Please add this information to your question. $\endgroup$ – MBaz Apr 8 '18 at 16:23
1
$\begingroup$

I don't know the "wav file converter" block (and if it is part of mainline GNU Radio, I probably should).

My guess is you're just using a WAV file sink - which is fine, but it doesn't do any resampling! You feed in samples, and it just writes them to a wav with a header that says it's 192 kS/s. But: this signal is not effectively sampled at 192 kS/s, but at 200!

You should set the wav file sink's sample rate to the actual sample rate. Or: You'd need to add another resampler to generate the 192 kS/s out of your 200 kS/s stream - or, really, pick a much lower typical sampling rate (22.05 kS/s, 44.1, 48), as your signal doesn't even contain anything above your AM demod's cutoff, so that such a high audio rates simply are a waste of space.

Side note: can't reproduce here, since no access to PC, but: I don't see why a 70 kHz cutoff LPF after a 11 kHz cutoff should do anything.

$\endgroup$
  • $\begingroup$ Thank you so much, I'll try the re-sampler then...although now I'mm getting a good signal sync with GNURadio but then when I transmit that signal with my Raspberry Pi and record it again with HDSDR, I get a longer signal! Any clue why this could be happening? $\endgroup$ – Contact-us Behind The Sciences Apr 9 '18 at 8:45
  • $\begingroup$ Exactly because you're missing the resampler. $\endgroup$ – Marcus Müller Apr 9 '18 at 9:51
  • $\begingroup$ In that case, I'm happy to have helped! I'd be delighted if you could thus accept or upvote. $\endgroup$ – Marcus Müller Apr 10 '18 at 13:44
  • $\begingroup$ I accepted as answer, as I couldn't upvote because of my low score :D $\endgroup$ – Contact-us Behind The Sciences Apr 11 '18 at 6:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.