LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Resample Waveforms (single shot) VI. Bug in normalized bandwidth?

I resample signal from 400 kHz to 44.1 kHz. I set normalized bandwidth = 0.0001 and listen my signal with great quality at 60 dB rejection.
If  0.5 <= normalized bandwidth <= inf, I listen bad sound. And why I have no error at normalized bandwidth > 1?
LabView 2013 32bit.

0 Kudos
Message 1 of 9
(3,258 Views)

Hey can you post your code?  It would also help to see the waveform plots of your original waveform and your resampled waveform, as well as an explanation of why you think the results are incorrect.

------------------------------------------------------------------------------------------

Jon F.
Technical Support Engineer
National Instruments
0 Kudos
Message 2 of 9
(3,201 Views)

@AirFrantz wrote:

Hey can you post your code?


Of course. This is my model: http://forums.ni.com/ni/attachments/ni/170/889263/1/FM_demodulation.vi

0 Kudos
Message 3 of 9
(3,145 Views)

Unfortunately I don't have MT or SMT installed, but I see you are taking an FM signal, demodulating and resampling it, and outputting to a speaker.  Could you add an indicator to the output waveform of the resampling vi so that we could get an idea of what it looks like in the cases above (correct behavior vs. bad)?

------------------------------------------------------------------------------------------

Jon F.
Technical Support Engineer
National Instruments
0 Kudos
Message 4 of 9
(3,105 Views)

Yes, I demodulate signal from FM radiostation. I/Q samples from USRP have Fs = 400 kHz, after I resample signal to 44100 Hz. Resample is needed to antialiasing filter.FM_spectrum.jpg

I want to listen mono-signal, one has Fmax = 15 kHz, i.e. 15/44.1 = 0.34. I set normalized bandwidth = 0.34 in Resample Waveforms and rejection = 60 dB. Am I right? These are the antialising filter parameters? If I set bandwidth = 1e-6, I listen same good signal. How is this possible at this rejection?

 

In the other case I resample signal to 96 kHz. Bandwidth = 15/96 = 0.15, I listen good signal. At bandwidth = 0.47 I listen good signal (it's strangely, because Fm = 0.47*96 = 45.2 kHz). But if I set bandwidth >= 0.49, I listen bad signal (only jerks).

 

Bandwidth = 0.47, good sinal

 Resamp_1.jpg

 

Bandwidth = 0.49, bad signal

 

Resamp_2.jpg

 

I think that the normalized bandwidth can take values from 0 to 1 (bandwidth/Fs_new). But if I set normalized bandwidth > 1, I have no error. It's very  strangely.

 

0 Kudos
Message 5 of 9
(3,095 Views)

The normalized bandwidth and rejection are parameters for the FIR interpolation filter for reconstruction, not the anti-aliasing filter for downsampling.

 

This is not my best subject, so please feel free to correct me if I'm wrong.

------------------------------------------------------------------------------------------

Jon F.
Technical Support Engineer
National Instruments
0 Kudos
Message 6 of 9
(3,041 Views)

Thanks!

Yes, I incorrectly wrote. For example, for 44.1 kHz anti-aliasing would have a cut-off frequency of 22.05 kHz, i.e. bandwidth = 2*22.05 = 44.1 kHz, i.e. normalized bandwidth = 1. I don't understand discription Resample Waveforms block: normalized bandwidth specifies the fraction of the new sampling rate that is not attenuated. The default is 0.4536. What is the allowable range?

Here, I have not found the answer: http://www.ni.com/white-paper/3979/en/#toc5.

 

P.S. I think I understood. This block can't resample from 400 kHz to 44.1 kHz. It is for small range, as in example (44.1 to 48 and vice versa).

0 Kudos
Message 7 of 9
(3,029 Views)

I was also very surprised that you could choose a value greater than 1 for the bandwidth.  I don't think it has to do with the large range, I played around with this vi with a sine wave and found it would work when going from 400k to 44k.  I'm going to have to look into what exactly the bandwidth parameter is and why you would be seeing this behavior.  Hopefully I'll have something on Monday for you.

------------------------------------------------------------------------------------------

Jon F.
Technical Support Engineer
National Instruments
0 Kudos
Message 8 of 9
(2,996 Views)

Thanks! I'll wait for your answer.

0 Kudos
Message 9 of 9
(2,975 Views)