Dear Gnuradio enthusiasts,
Does someone have a good approach to average a specific (but large)
of vectors together element-wise with the exactly same relative weight?
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
and if so: how? (In reality I will have many more vectors and elements
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
for gnuradio to accomplish what I want, but before I dive into that I
to ask you as well if you have already solved this current problem of
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
but not much C++, hence my hesitation to dive into the custom block
before I made sure no-one has already solved this.
The grand plan is as follows:
- Use an USRP to recieve a signal, I know how.
- Divide the stream of samples into vectors, I know how.
- Take the FFT of the vectors one by one, I know how.
- Average the vectors coming from the FFT together element-wise. I
- 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
M) coming from the FFT-block and sum them together element-wise to
one vector of size M.
I found Jonathan Corgans interesting reply to a similar question on “How
integrate a vector signal” at
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
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
me that I cannot use the single_pole_iir_filter. Am I mistaken? At least
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
to yet (I have a more theoretical physics/math background).
I found Jonathan Corgans entries from 2006 on vector addition in
I can use the adder in Gnuradio companion. So, in principle I could
my vectors in N streams, convert each stream to a vector again, feed
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
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
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
black-box is unfortunately no option since I have similar projects in
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
(but large) number of vectors together element-wise with the exactly
relative weight? Say I want the two vectors [1,2,3,3] and [1,2,3,4]
one after another giving the output [1,2,3,3.5] - is there any block
available that does this and if so: how?