[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] io_type configuration for uhd.single_usrp_source
From: |
Nick Foster |
Subject: |
Re: [Discuss-gnuradio] io_type configuration for uhd.single_usrp_source |
Date: |
Thu, 21 Jul 2011 10:35:32 -0700 |
On Thu, 2011-07-21 at 11:28 -0400, Yan Nie wrote:
> > well, sizeof(complex<short>) == sizeof(float), which means gnuradio will
> > let you connect those blocks, but that definitively wont work.
> >
> > For the UHD source, use COMPLEX_FLOAT32. For the FIR filter, use complex
> > input.
> >
> > gnuradio-companion might help you a lot:
> > http://en.wikipedia.org/wiki/GNU_Radio_Companion
>
> I appreciate your reply. I changed the io type for UHD source and type of the
> input for FIR filter, and got them matched, which leads the final result to
> the right direction, but still not quite right. It is just a simple trial to
> detect a 100kHz sinusoid signal and down convert the frequency to 1kHz. I am
> expecting a 1kHz sinusoid wave from plotting, but it only gave some irregular
> oscillation at the beginning. I am still confused that what could be the
> problem here?
>
> u2=uhd.single_usrp_source(device_addr="addr=192.168.10.2",io_type=uhd.io_type_t.COMPLEX_FLOAT32,num_channels=1)
> u2.set_samp_rate(250e3)
> treq = uhd.tune_request(freq)
> tr = u2.set_center_freq(self.treq)
> decim_coeffs = gr.firdes.low_pass(1.0,
> 5e3, #sampling frequency
> 2e3, #cutoff frequency
> .1e3,
> gr.firdes.WIN_BLACKMAN)
> decim_filter = gr.fir_filter_ccf(1,decim_coeffs)
> dst = gr.file_sink(gr.sizeof_gr_complex,filename)
> connect(self._u2, self.decim_filter,self.dst)
Yan,
Why is your filter sampling frequency 5kHz, when your USRP sample rate
is 250kHz?
--n
>
>
> Thank you so much for your help
>
> with thanks,
> Yan
>
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio