I am creating a new gnu radio block for decomposing the signal using
haar
wavelet decompostion and includes the option of number of levels of
decompostion.
In order to write the code, how should i set the set_history or forecast
function because in order to produce output the input signal should be
processed as a whole rather than in chunks.
On Tue, Oct 22, 2013 at 11:10:54PM -0700, Bharat Mukkala wrote:
I am creating a new gnu radio block for decomposing the signal using haar
wavelet decompostion and includes the option of number of levels of
decompostion.
In order to write the code, how should i set the set_history or forecast
function because in order to produce output the input signal should be
processed as a whole rather than in chunks.
This seems to be a case of set_output_multiple() rather than forecast()
(the i/o ratio is still a constant, right?).
MB
–
Karlsruhe Institute of Technology (KIT)
Communications Engineering Lab (CEL)
the i/o ratio is 1 since the number of input items is same the number of
output items, but while processing we use the whole signal but not a
single
element while calculating the output elements, i have doubt in figuring
out
how to tell that to gnuradio,my idea is that, can i set_output_multiple
to
ninput_items_required and then do processing.
thank you
On Wed, Oct 23, 2013 at 03:23:36AM -0700, Bharat Mukkala wrote:
the i/o ratio is 1 since the number of input items is same the number of
output items, but while processing we use the whole signal but not a single
element while calculating the output elements, i have doubt in figuring out
how to tell that to gnuradio,my idea is that, can i set_output_multiple to
ninput_items_required and then do processing.
thank you
You can only set_output_multiple before work starts, usually in the
constructor. So you set_output_multiple such that you can process the
entire signal at once, and make your block a gr::sync_block.
MB
–
Karlsruhe Institute of Technology (KIT)
Communications Engineering Lab (CEL)
On Wed, Oct 23, 2013 at 7:47 AM, Martin B. (CEL) [email protected] wrote:
entire signal at once, and make your block a gr::sync_block.
MB
Bharat,
Have you looked at the wavelet_ff block in gr-wavelet? It might do
what you want already or is at least close.
Also, since a wavelet is very much like a decimating fir filter, I’m
not sure output_multiple is the right thing to do. I think setting the
history for the length of the wavelet coefficients should be adequate.
Check out my overview of the scheduler for some details on what
history does:
its true that setting the history to length of coefficients work, but
when we
go for more than 1 level of decomposition, the output from previous
level
will be used , so how can is use the output again ?
i have another doubt , if we set the size of each element in the input
signature to be 4sizeof(float) and size of each output element to be
4sizeof(float) in a gr::sync_block, then in the work function , how
each
element will be handled, (is it like 4 input items of size float), also
please tell me how to use them.
thank you
On Wed, Oct 23, 2013 at 1:33 PM, Bharat Mukkala [email protected] wrote:
its true that setting the history to length of coefficients work, but when we
go for more than 1 level of decomposition, the output from previous level
will be used , so how can is use the output again ?
Seems to me like you’ll need to keep that state inside the object.
i have another doubt , if we set the size of each element in the input
signature to be 4sizeof(float) and size of each output element to be
4sizeof(float) in a gr::sync_block, then in the work function , how each
element will be handled, (is it like 4 input items of size float), also
please tell me how to use them.
thank you
Look at some of the other blocks where a vector length is specified.
gr-blocks/lib/float_to_short_impl.cc might be a good one to look at.
The vlen used here means that each item is of size vlen times the size
of a float (on the input stream). If vlen=4, each item is composed of
4 floats. So if ‘float in = (float)input_items[0]’, then it has a
length of ninput_items[0]*4. You can index the array from 0 to
(ninput_items[0]*4 - 1).
i got a new problem… when i am working with signals, i converted them
to
vectors using stream to vectors, then the vectors are given as input to
my
block (since my block has an input as vectors of fixed length) , then
processing is done on the vector, output is also a vector … but the
problem
is that there is delay in processing the each vector… and i declared my
i/o
signature as follows:
when is plot the output, it is not exactly delay because some unwanted
plot
is occurring and again my ouput is being plotted… i can post my code
if u
need it…