Hello,
At the transmitting end, I have defined a sine wave using:
gr.sig_source_c(sampling_freq, gr.GR_SIN_WAVE, baseband_freq, … )
Such that: sampling_freq = 16 * baseband_freq
When I send this to file_sink, I see correctly 16 samples from peak to
peak. However, when I transmit this using ‘usrp sink’ and receive at the
other end, I see about 32 samples from peak to peak… double what I
expected. What is happening?
Jonathan Shan
Jonathan Shan wrote:
When I send this to file_sink, I see correctly 16 samples from peak to
peak. However, when I transmit this using ‘usrp sink’ and receive at the
other end, I see about 32 samples from peak to peak… double what I
expected. What is happening?
What do you have the transmitter interpolation and receiver decimation
set to?
–
Johnathan C.
Corgan Enterprises LLC
http://corganenterprises.com
On Thu, 22 Mar 2007, Johnathan C. wrote:
Jonathan Shan wrote:
When I send this to file_sink, I see correctly 16 samples from peak to
peak. However, when I transmit this using ‘usrp sink’ and receive at the
other end, I see about 32 samples from peak to peak… double what I
expected. What is happening?
What do you have the transmitter interpolation and receiver decimation
set to?
interp_rate = 64, decim_rate = 16.
I saw the formulas
usb_sample_rate1 = 64e6 / decim_rate
usb_sample_rate2 = 128e6 / interp_rate
Using current values, usb_rate1 = 2 * usb_rate2. I’m assuming… to
get the correct sampling freq, usb_sample_rate at both ends should be
same?
Jonathan Shan
Jonathan Shan wrote:
get the correct sampling freq, usb_sample_rate at both ends should be
same?
Correct.
–
Johnathan C.
Corgan Enterprises LLC
http://corganenterprises.com
On Mar 22, 2007, at 5:11 PM, Jonathan Shan wrote:
other end, I see about 32 samples from peak to peak… double what I
expected. What is happening?
What do you have the transmitter interpolation and receiver
decimation
set to?
interp_rate = 64, decim_rate = 16.
FWIW:
16 samples per cycle and interp = 64 (2MSps over the USRP) means
sinwave freq = 2MSps/16 = 125kHz
32 samples per cycle and decim = 16 (4MSps over the USRP) means
sinwave freq = 4MSps/32 = 125kHz
On Thu, Mar 22, 2007 at 02:14:05PM -0700, Johnathan C. wrote:
Using current values, usb_rate1 = 2 * usb_rate2. I’m assuming… to
get the correct sampling freq, usb_sample_rate at both ends should be
same?
Correct.
And it would be better to use the
u.adc_rate() and
u.dac_rate()
methods to retrieve the rates than to hard code them.
Eric