# Extracting and storing certain parameters from continuous IQ data

**URL:** <https://www.ruby-forum.com/t/extracting-and-storing-certain-parameters-from-continuous-iq-data/234535>\
**Category:** GNU Radio\
**Created:** [March 11, 2015, 10:26pm UTC](https://www.ruby-forum.com/t/extracting-and-storing-certain-parameters-from-continuous-iq-data/234535 "2015-03-11T22:26:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [March 11, 2015, 10:26pm UTC](https://www.ruby-forum.com/t/extracting-and-storing-certain-parameters-from-continuous-iq-data/234535/1 "2015-03-11T22:26:19Z")

</div>

Hello everyone,

So I was trying to capture continuous IQ data from my USRP N200, and  
this  
needs to be done for about a week, but because the amount of data is  
ginormous, that’s doesn’t seem feasible at all. Instead, what I’m now  
thinking of doing is processing the data in gnuradio companion in real  
time  
and just extracting certain parameters from the processed data, for  
instance, I would like to detect if there’s a signal present or not, at  
what time was the signal detected, what’s the maximum amplitude of the  
signal, how long did the signal last etc, and just store those pieces of  
information in a file.

Are there any pre-existing blocks that I may use for this purpose? If  
not,  
can someone please guide me as to how to accomplish this task?

This is what my flow graph looks like at the moment:  
[http://imgur.com/a/O2gXi](http://imgur.com/a/O2gXi)

Thank you,

Best,  
Ali

---

<div class="post-metadata">

**Author:** ![alirose](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/bc79bd/32.png) [@alirose](https://www.ruby-forum.com/u/alirose)\
**Post date:** [March 11, 2015, 10:37pm UTC](https://www.ruby-forum.com/t/extracting-and-storing-certain-parameters-from-continuous-iq-data/234535/2 "2015-03-11T22:37:13Z")

</div>

Hey,

I can’t tell you how you should do this. I can tell you that you will  
need  
to get comfortable with tags and probably messages to achieve these  
things  
you want. If you haven’t already, check out the gnuradio tutorial on  
programming topics to get started. They do a pretty good job explaining  
it  
there.  
[http://gnuradio.org/redmine/projects/gnuradio/wiki/Guided\_Tutorial\_Programming\_Topics](http://gnuradio.org/redmine/projects/gnuradio/wiki/Guided_Tutorial_Programming_Topics)

For example, suppose you only wanted to store a certain stream of data  
after a preamble was detected. You could use a ‘correlate and sync -  
tag’  
block to adds tags at the start of your data to the stream and then feed  
this into a ‘tagged file sink’ block which will only put the portion  
after  
the tag into the file. You want a lot more functionality then this, but  
this could get you going in the right direction.

Rich

---

<div class="post-metadata">

**Author:** ![alirose](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/bc79bd/32.png) [@alirose](https://www.ruby-forum.com/u/alirose)\
**Post date:** [March 11, 2015, 10:50pm UTC](https://www.ruby-forum.com/t/extracting-and-storing-certain-parameters-from-continuous-iq-data/234535/3 "2015-03-11T22:50:41Z")

</div>

You can also use probes to bring out the data asynchronously from the  
flow  
which you can then process in Python. For example, you could probe at a  
10  
Hz rate, then have your Python script log those values to a file, or  
trigger  
some other event. I have an example here where it probes the signal  
level  
every second and logs it with GPS data:

> **[GitHub - madengr/drive\_test: RF drive test application using Ettus USRP +...](https://github.com/madengr/drive_test)**
>
> RF drive test application using Ettus USRP + GPSDO, GNU Radio, and Google Maps

Lou

Ali R. wrote

> signal, how long did the signal last etc, and just store those pieces of  
> Best,  
> Ali
> 
> * * *
> 
> Discuss-gnuradio mailing list

> Discuss-gnuradio@

> [Discuss-gnuradio Info Page](https://lists.gnu.org/mailman/listinfo/discuss-gnuradio)

–  
View this message in context:  
[http://gnuradio.4.n7.nabble.com/Extracting-and-storing-certain-parameters-from-continuous-IQ-data-tp52645p52647.html](http://gnuradio.4.n7.nabble.com/Extracting-and-storing-certain-parameters-from-continuous-IQ-data-tp52645p52647.html)  
Sent from the GnuRadio mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![alirose](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/bc79bd/32.png) [@alirose](https://www.ruby-forum.com/u/alirose)\
**Post date:** [March 11, 2015, 10:59pm UTC](https://www.ruby-forum.com/t/extracting-and-storing-certain-parameters-from-continuous-iq-data/234535/4 "2015-03-11T22:59:04Z")

</div>

Hey Rich,

That’ll definitely give me a good start, thank you so much! I’ll check  
it  
out.

Best,  
Ali

On Wed, Mar 11, 2015 at 4:35 PM, Richard B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![alirose](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/bc79bd/32.png) [@alirose](https://www.ruby-forum.com/u/alirose)\
**Post date:** [March 12, 2015, 12:10am UTC](https://www.ruby-forum.com/t/extracting-and-storing-certain-parameters-from-continuous-iq-data/234535/5 "2015-03-12T00:10:12Z")

</div>

I saw from your other thread that you were channelizing and decimating,  
and I  
assume you are logging this to disk for extended periods. I’m doing a  
similar thing here:

> **[GitHub - madengr/nbfm\_rec: Multi-channel narrow-band FM recorder for GNU...](https://github.com/madengr/nbfm_rec)**
>
> Multi-channel narrow-band FM recorder for GNU Radio

Although I’m not using a channelizer, only because there is no band plan  
for  
what I was recording. Anyway, the blocking squelch may also be useful  
for  
you with a file sink.

With the probing, you should be able to use that to dynamically name the  
files, amongst other things.

Lou

Ali R. wrote

> Hey Lou,
> 
> That’s a very interesting approach, I’ll look into your example as well.  
> Thank you very much!
> 
> Best,  
> Ali

–  
View this message in context:  
[http://gnuradio.4.n7.nabble.com/Extracting-and-storing-certain-parameters-from-continuous-IQ-data-tp52645p52651.html](http://gnuradio.4.n7.nabble.com/Extracting-and-storing-certain-parameters-from-continuous-IQ-data-tp52645p52651.html)  
Sent from the GnuRadio mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![alirose](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/bc79bd/32.png) [@alirose](https://www.ruby-forum.com/u/alirose)\
**Post date:** [March 11, 2015, 11:03pm UTC](https://www.ruby-forum.com/t/extracting-and-storing-certain-parameters-from-continuous-iq-data/234535/6 "2015-03-11T23:03:16Z")

</div>

Hey Lou,

That’s a very interesting approach, I’ll look into your example as well.  
Thank you very much!

Best,  
Ali
