Dear Gnuradio enthusiasts,

Short version:
Does someone have a good approach to average a specific (but large) number
of vectors together element-wise with the exactly same relative weight? Say
I want the two vectors [1,2,3,3] and [1,2,3,4] coming one after another
giving the output [1,2,3,3.5] - is there any block available that does this
and if so: how? (In reality I will have many more vectors and elements
though).

Long version:
I'm building an application for radio astronomy using Gnuradio and the
USRP. I think I have hit a point where I have to write my own custom blocks
for gnuradio to accomplish what I want, but before I dive into that I want
to ask you as well if you have already solved this current problem of mine.
I have tried to google this extensively and gotten closer and closer but
without finding exactly what I need. I have played with the
Gnuradio-companion and find it very helpful. I have some python experience
but not much C++, hence my hesitation to dive into the custom block writing
before I made sure no-one has already solved this.

The grand plan is as follows:
1) Use an USRP to recieve a signal, I know how.
2) Divide the stream of samples into vectors, I know how.
3) Take the FFT of the vectors one by one, I know how.
4) Average the vectors coming from the FFT together element-wise. I don't
know how.
5) Save the averaged vector to a file, I know how.

What I cannot solve is step 4: I need to take the N vectors (each of size
M) coming from the FFT-block and sum them together element-wise to produce
one vector of size M.

I found Jonathan Corgans interesting reply to a similar question on "How to
integrate a vector signal" at
http://lists.gnu.org/archive/html/discuss-gnuradio/2007-04/msg00146.htmlwhere
Jonathan advises to use the gr.single_pole_iir_filter_xx block with a
parameter 0<alpha <1. It seems to me that such an approach works well if
one wants to average "a couple" of vectors, and also if you want to apply
weights to the averaging. But, if I want to average Exactly say 1027
vectors together with Exactly the same weight to all of them, it seems to
me that I cannot use the single_pole_iir_filter. Am I mistaken? At least I
have not managed to make it do what I want. Perhaps this is the solution
and I'm just confused by the signal processing language which I'm not used
to yet (I have a more theoretical physics/math background).

I found Jonathan Corgans entries from 2006 on vector addition in Gnuradio,
http://lists.gnu.org/archive/html/patch-gnuradio/2006-06/msg00002.html and
I can use the adder in Gnuradio companion. So, in principle I could split
my vectors in N streams, convert each stream to a vector again, feed them
to a vector adder with N inputs and then get the output I want. But it
seems suboptimal to have to deal with this splitting step to N inputs. I
just want to add the vectors element-wise.

I found the simple_ra package which claims to do things for radio astronomy
very similar to what I want to do (
https://www.cgran.org/wiki/simple_ra#ProjectDescription). But, the
unfortunately I have not found any extensive documentation of the code and
I have not yet managed to understand if I can extract a solution to my
problem from there. To use part of the simple_ra package functionality as a
black-box is unfortunately no option since I have similar projects in mind
if I solve this one, but they would not be related to radio astronomy.

Hence my question: Does someone have a good approach to average a specific
(but large) number of vectors together element-wise with the exactly same
relative weight? Say I want the two vectors [1,2,3,3] and [1,2,3,4] coming
one after another giving the output [1,2,3,3.5] - is there any block
available that does this and if so: how?

Best regards,
Eskil Varenius
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to