# What is the rate(sampling) of the impulse response using usrp\_sounder.py?

**URL:** <https://www.ruby-forum.com/t/what-is-the-rate-sampling-of-the-impulse-response-using-usrp-sounder-py/154997>\
**Category:** GNU Radio\
**Created:** [December 5, 2008, 11:43pm UTC](https://www.ruby-forum.com/t/what-is-the-rate-sampling-of-the-impulse-response-using-usrp-sounder-py/154997 "2008-12-05T23:43:19Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![bruh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/df705f/32.png) [@bruh](https://www.ruby-forum.com/u/bruh)\
**Post date:** [December 5, 2008, 11:43pm UTC](https://www.ruby-forum.com/t/what-is-the-rate-sampling-of-the-impulse-response-using-usrp-sounder-py/154997/1 "2008-12-05T23:43:19Z")

</div>

Hey all,

I am using usrp\_sounder.py to see channel impulse response. I used just  
the  
default parameters(length=4095) using:

usrp\_sounder.py -t -f 2.40e9 -v  
usrp\_sounder.py -t -f 2.40e9 -v -F 1st\_Record.dat

1. could someone tell me what the sampling rate of the recorded  
impulse  
response recorded will be?
2. on which parameters will the sampling rate depend?
3. and if I contine the sounding for some time and stop, does it mean i  
will  
have N different impulse responses or N\*4095 samples ? -Thanks

Bruhtesfa

---

<div class="post-metadata">

**Author:** ![bruh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/df705f/32.png) [@bruh](https://www.ruby-forum.com/u/bruh)\
**Post date:** [December 6, 2008, 7:46pm UTC](https://www.ruby-forum.com/t/what-is-the-rate-sampling-of-the-impulse-response-using-usrp-sounder-py/154997/2 "2008-12-06T19:46:35Z")

</div>

On Fri, 2008-12-05 at 23:42 +0100, Bruhtesfa E. wrote:

> I am using usrp\_sounder.py to see channel impulse response. I used  
> just the default parameters(length=4095) using:
> 
> usrp\_sounder.py -t -f 2.40e9 -v  
> usrp\_sounder.py -t -f 2.40e9 -v -F 1st\_Record.dat
> 
> 1. could someone tell me what the sampling rate of the recorded  
> impulse response recorded will be?

The impulse response bins are separated by 1/32MHz, or 31.25 ns.

> 1. on which parameters will the sampling rate depend?

This is fixed. The sounder transmitter sends a repeating PN sequence at  
32 Mchips/sec. The receiver correlates the received data against all  
possible offsets of the PN sequence and outputs the resulting  
correlation vector.

> 1. and if I contine the sounding for some time and stop, does it mean  
> i will have N different impulse responses or N\*4095 samples ? -Thanks

You will have a repeating sequence of impulse responses of length 4095  
samples, corrupted by noise. You may coherently sum these to reduce  
noise, however, the gr-sounder receiver does _not_ perform any  
frequency/phase synchronization, so the vectors will need  
post-processing if you want to do this.

-Johnathan

---

<div class="post-metadata">

**Author:** ![bruh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/df705f/32.png) [@bruh](https://www.ruby-forum.com/u/bruh)\
**Post date:** [December 6, 2008, 9:09pm UTC](https://www.ruby-forum.com/t/what-is-the-rate-sampling-of-the-impulse-response-using-usrp-sounder-py/154997/3 "2008-12-06T21:09:45Z")

</div>

Johnathan C. wrote:

> On Fri, 2008-12-05 at 23:42 +0100, Bruhtesfa E. wrote:
> 
> > I am using usrp\_sounder.py to see channel impulse response. I used  
> > just the default parameters(length=4095) using:
> > 
> > usrp\_sounder.py -t -f 2.40e9 -v  
> > usrp\_sounder.py -t -f 2.40e9 -v -F 1st\_Record.dat
> > 
> > 1. could someone tell me what the sampling rate of the recorded  
> > impulse response recorded will be?
> 
> The impulse response bins are separated by 1/32MHz, or 31.25 ns.

but, does the USB support this much sampling rate of 32 MHZ?

Also on simple gnu radio user manual, about gnuradio sounder it says :  
“The sounder uses a custom FPGA bitstream that is able to generate and  
receive a sounder waveform across a full 32 MHz wide swath of RF  
spectrum; the waveform generation and impulse response processing occur  
in logic in the USRP FPGA and not in the host PC. This avoids the USB  
throughput bottleneck entirely.”

This implies that the processed impulse response that goes to the USB is  
of lower sampling rate than 32MHZ. or no? please correct me if i am  
wrong.

Thanks!

Bruhtesfa

---

<div class="post-metadata">

**Author:** ![bruh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/df705f/32.png) [@bruh](https://www.ruby-forum.com/u/bruh)\
**Post date:** [December 6, 2008, 9:26pm UTC](https://www.ruby-forum.com/t/what-is-the-rate-sampling-of-the-impulse-response-using-usrp-sounder-py/154997/4 "2008-12-06T21:26:55Z")

</div>

On Sat, Dec 6, 2008 at 12:09 PM, Bruhtesfa E.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> but, does the USB support this much sampling rate of 32 MHZ?

No.

> Also on simple gnu radio user manual, about gnuradio sounder it says :  
> “The sounder uses a custom FPGA bitstream that is able to generate and  
> receive a sounder waveform across a full 32 MHz wide swath of RF  
> spectrum; the waveform generation and impulse response processing occur  
> in logic in the USRP FPGA and not in the host PC. This avoids the USB  
> throughput bottleneck entirely.”
> 
> This implies that the processed impulse response that goes to the USB is  
> of lower sampling rate than 32MHZ. or no? please correct me if i am  
> wrong.

The custom FPGA code performs the correlation in the USRP. The  
algorithm is a sequential correlator that processes an entire PN code  
sequence per impulse reponse lag time. So the data rate coming out of  
the USRP is 64 Msps (ADC rate) divided by 8190 samples per PN sequence  
(default degree of 12), or about 7.8 ksps. Since each record is 4095  
samples long, this outputs a full impulse response record about twice  
a second.

The impulse response record still represents the original 32 Mchip/sec  
correlation, so in your received data, each sample represents a lag of  
about 31.25 ns.

-Johnathan

---

<div class="post-metadata">

**Author:** ![bruh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/df705f/32.png) [@bruh](https://www.ruby-forum.com/u/bruh)\
**Post date:** [December 16, 2008, 5:26pm UTC](https://www.ruby-forum.com/t/what-is-the-rate-sampling-of-the-impulse-response-using-usrp-sounder-py/154997/5 "2008-12-16T17:26:39Z")

</div>

Johnathan C. wrote:

> The custom FPGA code performs the correlation in the USRP. The  
> algorithm is a sequential correlator that processes an entire PN code  
> sequence per impulse reponse lag time. So the data rate coming out of  
> the USRP is 64 Msps (ADC rate) divided by 8190 samples per PN sequence  
> (default degree of 12), or about 7.8 ksps. Since each record is 4095  
> samples long, this outputs a full impulse response record about twice  
> a second.
> 
> The impulse response record still represents the original 32 Mchip/sec  
> correlation, so in your received data, each sample represents a lag of  
> about 31.25 ns.
> 
> -Johnathan

Thank you for the replies Johnathan!!!

But, i still get some problems when i experiment with it.

My objective is to measure impulse response of a room and extract  
information on the movement of people inside the room.

1. I tried to monitor the impulse response of the room for 5 sec. So,  
according to the discussion above(i.e since the FPGA computes impulse  
response of length 4095,32MHZ in 0.5sec), I will have 10 impulse  
response vectors in 5sec. But when i set { samples = 10 \*  
self.\_length\*\*2 in usrp\_sounder\_rx.py } and run the code, it takes about  
160 seconds to complete. So, I am confused. Does the recorded impulse  
response correspond to 5sec or 160sec?

2. As, expected there is frequency offset on the received impulse  
response. what can i do to synchronize transmitter and receiver  
daughter boards? Thanks!

Bruhtesfa

---

<div class="post-metadata">

**Author:** ![bruh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/df705f/32.png) [@bruh](https://www.ruby-forum.com/u/bruh)\
**Post date:** [December 16, 2008, 10:07pm UTC](https://www.ruby-forum.com/t/what-is-the-rate-sampling-of-the-impulse-response-using-usrp-sounder-py/154997/6 "2008-12-16T22:07:36Z")

</div>

On Tue, Dec 16, 2008 at 8:26 AM, Bruhtesfa E.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> My objective is to measure impulse response of a room and extract  
> information on the movement of people inside the room.

As I had mentioned earlier, this will be difficult, as the time  
resolution of the sounder impulse response will be on the order of  
30-60 ft. You might be able to use that; it depends on how you  
process it.

> 1. I tried to monitor the impulse response of the room for 5 sec. So,  
> according to the discussion above(i.e since the FPGA computes impulse  
> response of length 4095,32MHZ in 0.5sec), I will have 10 impulse  
> response vectors in 5sec. But when i set { samples = 10 \*  
> self.\_length\*\*2 in usrp\_sounder\_rx.py } and run the code, it takes about  
> 160 seconds to complete. So, I am confused. Does the recorded impulse  
> response correspond to 5sec or 160sec?

I don’t understand how you’ve modified the script to collect 5 seconds  
of data.

> 1. As, expected there is frequency offset on the received impulse  
> response. what can i do to synchronize transmitter and receiver  
> daughter boards? Thanks!

You will need to use a stable time reference like a GPSDO on both the  
transmitter and receiver.

-Johnathan

---

<div class="post-metadata">

**Author:** ![bruh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/df705f/32.png) [@bruh](https://www.ruby-forum.com/u/bruh)\
**Post date:** [December 17, 2008, 10:44am UTC](https://www.ruby-forum.com/t/what-is-the-rate-sampling-of-the-impulse-response-using-usrp-sounder-py/154997/7 "2008-12-17T10:44:43Z")

</div>

Johnathan C. wrote:

> On Tue, Dec 16, 2008 at 8:26 AM, Bruhtesfa E.  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > 1. I tried to monitor the impulse response of the room for 5 sec. So,  
> > according to the discussion above(i.e since the FPGA computes impulse  
> > response of length 4095,32MHZ in 0.5sec), I will have 10 impulse  
> > response vectors in 5sec. But when i set { samples = 10 \*  
> > self.\_length\*\*2 in usrp\_sounder\_rx.py } and run the code, it takes about  
> > 160 seconds to complete. So, I am confused. Does the recorded impulse  
> > response correspond to 5sec or 160sec?
> 
> I don’t understand how you’ve modified the script to collect 5 seconds  
> of data.

In the python code usrp\_sounder\_rx.py the number of impulse response  
vectors is set to 100 by default. I have seen that from the statement (  
samples = 100 \* self.\_length\*\*2) in class usrp\_sounder\_rx(gr.top\_block).  
I have also experiment with it.Then,I see by reading the file in matlab  
that it really records 100 impulse response vectors or 100\*4095 sampled  
values.

In my case, I want to use PN code of degree 12 and 32MHZ chip rate.And  
this takes 4095\*4095/32MHZ=0.5sec to record a single impulse response  
vector (according to our previous discussion). Now, If I want to monitor  
the room for 5sec, I need 5sec/0.5sec=10 impulse response vectors.

So, I modified the PN code degree, chip rate and number of impulse  
response vectors in usrp\_sounder\_rx.py. To change the number of impulse  
response vectors to 10, I just used (samples = 10 \* self.\_length**2)  
instead of the default (samples = 100 \* self.\_length**2)in the code.

But, When I run the code, it takes about 160sec to complete instead of  
the expected 5sec.

So, I get confused? Is there a mistake I made ?  
or, is there any factor that can delays the computation and recording of  
a single impulse response vector slower than 4095\*4095/32MHZ?

> > 1. As, expected there is frequency offset on the received impulse  
> > response. what can i do to synchronize transmitter and receiver  
> > daughter boards? Thanks!
> 
> You will need to use a stable time reference like a GPSDO on both the  
> transmitter and receiver.

Is there any method of synchronization by just wiring the transmit and  
receive daughter boards together?

Thanks for your help!  
Bruhtesfa
