discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] gr::blocks::peak_detector2_fb un reproducible beh


From: Ludwig Stephan (CR/AEH4)
Subject: Re: [Discuss-gnuradio] gr::blocks::peak_detector2_fb un reproducible behavior
Date: Fri, 12 Dec 2014 16:29:48 +0000

Hello,

a short update before the weekend:
I was not able to hunt down the problem of non-reproducibility, but another one.

I had an input signal, which had its max. value as the first value getting over 
the (very high) threshold. This value is not taken as the peak, but any second 
but largest value within the look_ahead window.
The reason for that is that in line 73ff. of peak_detect_fb_impl.cc 
d_peak_val/d_peak_ind are not set, but only with the next iteration, then 
starting from line 84f (because any value > -inf).

A suitable test case for the qa_peak_detector2.py file has input vectors
data = [0, 0, 10, 3, 4, 5, 6, 7, 8, 9, 
                5, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]
expected_result = (0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
                        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)

One could change line 73ff. like this
d_peak_val =  iptr[i];
d_peak_ind = I;

but, then there remains a problem with this test case:
data = [10, 0, 1, 3, 4, 5, 6, 7, 8, 9, 
                5, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]
expected_result = (1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)

The first run of work() will output 0 items, if the look_ahead window is larger 
than noutput_items (=the amount of _in_put items), and the assert(noutput_items 
>= 2) hurts. Subsequent calls of work() will output 0 items as long as the 
amount of regarded items is smaller than the window length.

Can anybody imagine/explain, why this whole thing stalls? Do you have any ideas 
how to get out of this miserable position?

Thank you for any help.

Best regards

 Stephan Ludwig

-- 
Robert Bosch GmbH
Corporate Sector Research & Advance Engineering, Communication Technology 
(CR/AEH4) 
Renningen
70465 Stuttgart
GERMANY
www.bosch.com

Tel. +49(711)811-8809
Fax +49(711)811-1052
Mobile +49(172)5630639
address@hidden

Registered Office: Stuttgart, Registration Court: Amtsgericht Stuttgart, HRB 
14000; 
Chairman of the Supervisory Board: Franz Fehrenbach; Managing Directors: Dr. 
Volkmar Denner, 
Dr. Stefan Asenkerschbaumer, Dr. Rolf Bulander, Dr. Stefan Hartung, Dr. Dirk 
Hoheisel, Christoph Kübel, 
Uwe Raschke, Wolf-Henning Scheider, Dr. Werner Struth, Peter Tyroller





reply via email to

[Prev in Thread] Current Thread [Next in Thread]