discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] Re: debug freezing


From: Markus Feldmann
Subject: [Discuss-gnuradio] Re: debug freezing
Date: Fri, 08 May 2009 10:04:39 +0200
User-agent: Mozilla-Thunderbird 2.0.0.19 (X11/20090103)

Josh Blum schrieb:
Markus,

I really believe that the gui is not freezing. What you see is a result of the fact the the peak detect outputs a binary 1 or 0 signal.

Connect the peak detect to a char_to_float block, and then to a numbersink. Setup the numbersink for a min of 0 and a max of 1. The numbersink will clearly show what state the peak detector is in. Make sure to include a throttle somewhere.
Still done. It doesnt matter which graphical sinnk i use.
Only the <gr_peak_detector_xb_0> works with all one.
I have tried about 20 combinations, with different sinks, like
number sink, file sink, scope sink, with throttle, without throttle,
different connections.
The <gr_peak_detector2_fb_0> doesnt work correctly.

Take a look at the source code for peak detect, perhaps the comments, or the implementation can help you to figure out what the parameters like threshold or alpha mean. Also, add a few printfs to the work method, to verify what the block is outputting, and if its really freezing/stopped working.
Ok i will do this.

Thanks for your answer and help. I still read the comments in the Header
and sources, but if i understand this correctly than it should not
produce peaks by setting TH factor Rise to 10e15 for example. So i think
there should be a second Bug or i misunderstood something.

Do you think a peak detector should find peaks if it gets a noise
signal and it is setted up with TH factor Rise by 10e15 ?

I add to files:
peakdetector_LF_RX_08.grc --> works not (gr_peak_detector2_fb_0)
peakdetector_LF_RX_13.grc --> works (gr_peak_detector_xb_0)

regards markus

<?xml version='1.0' encoding='ASCII'?>
<flow_graph>
  <timestamp>Thu May  7 12:43:22 2009</timestamp>
  <block>
    <key>options</key>
    <param>
      <key>id</key>
      <value>peakdetector_LF_RX_08</value>
    </param>
    <param>
      <key>_enabled</key>
      <value>True</value>
    </param>
    <param>
      <key>title</key>
      <value>USRP Peakdetector Test</value>
    </param>
    <param>
      <key>author</key>
      <value>Example</value>
    </param>
    <param>
      <key>description</key>
      <value>Tests to analyse how the Peak Detector works.</value>
    </param>
    <param>
      <key>window_size</key>
      <value>1280, 1024</value>
    </param>
    <param>
      <key>generate_options</key>
      <value>wx_gui</value>
    </param>
    <param>
      <key>category</key>
      <value>Custom</value>
    </param>
    <param>
      <key>realtime_scheduling</key>
      <value></value>
    </param>
    <param>
      <key>_coordinate</key>
      <value>(10, 10)</value>
    </param>
    <param>
      <key>_rotation</key>
      <value>0</value>
    </param>
  </block>
  <block>
    <key>variable_slider</key>
    <param>
      <key>id</key>
      <value>freq</value>
    </param>
    <param>
      <key>_enabled</key>
      <value>True</value>
    </param>
    <param>
      <key>label</key>
      <value>frequency</value>
    </param>
    <param>
      <key>value</key>
      <value>1e6</value>
    </param>
    <param>
      <key>min</key>
      <value>1e6</value>
    </param>
    <param>
      <key>max</key>
      <value>11e6</value>
    </param>
    <param>
      <key>num_steps</key>
      <value>290</value>
    </param>
    <param>
      <key>style</key>
      <value>wx.SL_HORIZONTAL</value>
    </param>
    <param>
      <key>converver</key>
      <value>float_converter</value>
    </param>
    <param>
      <key>grid_pos</key>
      <value></value>
    </param>
    <param>
      <key>_coordinate</key>
      <value>(13, 511)</value>
    </param>
    <param>
      <key>_rotation</key>
      <value>0</value>
    </param>
  </block>
  <block>
    <key>variable_slider</key>
    <param>
      <key>id</key>
      <value>gain_usrp_source</value>
    </param>
    <param>
      <key>_enabled</key>
      <value>True</value>
    </param>
    <param>
      <key>label</key>
      <value>Gain Usrp Source</value>
    </param>
    <param>
      <key>value</key>
      <value>0</value>
    </param>
    <param>
      <key>min</key>
      <value>0</value>
    </param>
    <param>
      <key>max</key>
      <value>20</value>
    </param>
    <param>
      <key>num_steps</key>
      <value>100</value>
    </param>
    <param>
      <key>style</key>
      <value>wx.SL_HORIZONTAL</value>
    </param>
    <param>
      <key>converver</key>
      <value>float_converter</value>
    </param>
    <param>
      <key>grid_pos</key>
      <value>4, 1, 2, 1</value>
    </param>
    <param>
      <key>_coordinate</key>
      <value>(151, 499)</value>
    </param>
    <param>
      <key>_rotation</key>
      <value>0</value>
    </param>
  </block>
  <block>
    <key>variable</key>
    <param>
      <key>id</key>
      <value>samp_rate</value>
    </param>
    <param>
      <key>_enabled</key>
      <value>True</value>
    </param>
    <param>
      <key>value</key>
      <value>64e6/decim</value>
    </param>
    <param>
      <key>_coordinate</key>
      <value>(30, 703)</value>
    </param>
    <param>
      <key>_rotation</key>
      <value>0</value>
    </param>
  </block>
  <block>
    <key>variable</key>
    <param>
      <key>id</key>
      <value>decim</value>
    </param>
    <param>
      <key>_enabled</key>
      <value>True</value>
    </param>
    <param>
      <key>value</key>
      <value>256</value>
    </param>
    <param>
      <key>_coordinate</key>
      <value>(35, 632)</value>
    </param>
    <param>
      <key>_rotation</key>
      <value>0</value>
    </param>
  </block>
  <block>
    <key>gr_char_to_float</key>
    <param>
      <key>id</key>
      <value>gr_char_to_float_0</value>
    </param>
    <param>
      <key>_enabled</key>
      <value>True</value>
    </param>
    <param>
      <key>_coordinate</key>
      <value>(694, 51)</value>
    </param>
    <param>
      <key>_rotation</key>
      <value>0</value>
    </param>
  </block>
  <block>
    <key>gr_complex_to_real</key>
    <param>
      <key>id</key>
      <value>gr_complex_to_real_0</value>
    </param>
    <param>
      <key>_enabled</key>
      <value>True</value>
    </param>
    <param>
      <key>vlen</key>
      <value>1</value>
    </param>
    <param>
      <key>_coordinate</key>
      <value>(192, 240)</value>
    </param>
    <param>
      <key>_rotation</key>
      <value>0</value>
    </param>
  </block>
  <block>
    <key>wxgui_scopesink2</key>
    <param>
      <key>id</key>
      <value>wxgui_scopesink2_0</value>
    </param>
    <param>
      <key>_enabled</key>
      <value>True</value>
    </param>
    <param>
      <key>type</key>
      <value>float</value>
    </param>
    <param>
      <key>title</key>
      <value>Scope Plot after Peak Detector</value>
    </param>
    <param>
      <key>samp_rate</key>
      <value>samp_rate</value>
    </param>
    <param>
      <key>v_scale</key>
      <value>0</value>
    </param>
    <param>
      <key>t_scale</key>
      <value>25e-6</value>
    </param>
    <param>
      <key>ac_couple</key>
      <value>False</value>
    </param>
    <param>
      <key>xy_mode</key>
      <value>False</value>
    </param>
    <param>
      <key>num_inputs</key>
      <value>2</value>
    </param>
    <param>
      <key>grid_pos</key>
      <value></value>
    </param>
    <param>
      <key>_coordinate</key>
      <value>(1141, 186)</value>
    </param>
    <param>
      <key>_rotation</key>
      <value>0</value>
    </param>
  </block>
  <block>
    <key>gr_peak_detector2_fb</key>
    <param>
      <key>id</key>
      <value>gr_peak_detector2_fb_0</value>
    </param>
    <param>
      <key>_enabled</key>
      <value>True</value>
    </param>
    <param>
      <key>threshold_factor_rise</key>
      <value>0.5</value>
    </param>
    <param>
      <key>look_ahead</key>
      <value>2</value>
    </param>
    <param>
      <key>alpha</key>
      <value>1</value>
    </param>
    <param>
      <key>_coordinate</key>
      <value>(410, 27)</value>
    </param>
    <param>
      <key>_rotation</key>
      <value>0</value>
    </param>
  </block>
  <block>
    <key>usrp_simple_source_x</key>
    <param>
      <key>id</key>
      <value>usrp_simple_source_x</value>
    </param>
    <param>
      <key>_enabled</key>
      <value>True</value>
    </param>
    <param>
      <key>type</key>
      <value>complex</value>
    </param>
    <param>
      <key>format</key>
      <value></value>
    </param>
    <param>
      <key>which</key>
      <value>0</value>
    </param>
    <param>
      <key>decimation</key>
      <value>decim</value>
    </param>
    <param>
      <key>frequency</key>
      <value>freq</value>
    </param>
    <param>
      <key>lo_offset</key>
      <value>float('inf')</value>
    </param>
    <param>
      <key>gain</key>
      <value>gain_usrp_source</value>
    </param>
    <param>
      <key>side</key>
      <value>B</value>
    </param>
    <param>
      <key>rx_ant</key>
      <value>RXA</value>
    </param>
    <param>
      <key>hb_filters</key>
      <value></value>
    </param>
    <param>
      <key>_coordinate</key>
      <value>(2, 274)</value>
    </param>
    <param>
      <key>_rotation</key>
      <value>0</value>
    </param>
  </block>
  <block>
    <key>wxgui_fftsink2</key>
    <param>
      <key>id</key>
      <value>wxgui_fftsink2</value>
    </param>
    <param>
      <key>_enabled</key>
      <value>True</value>
    </param>
    <param>
      <key>type</key>
      <value>complex</value>
    </param>
    <param>
      <key>title</key>
      <value>FFT Plot</value>
    </param>
    <param>
      <key>samp_rate</key>
      <value>64e6/decim</value>
    </param>
    <param>
      <key>baseband_freq</key>
      <value>freq</value>
    </param>
    <param>
      <key>y_per_div</key>
      <value>10</value>
    </param>
    <param>
      <key>y_divs</key>
      <value>10</value>
    </param>
    <param>
      <key>ref_level</key>
      <value>70</value>
    </param>
    <param>
      <key>fft_size</key>
      <value>512*2</value>
    </param>
    <param>
      <key>fft_rate</key>
      <value>20</value>
    </param>
    <param>
      <key>peak_hold</key>
      <value>False</value>
    </param>
    <param>
      <key>average</key>
      <value>True</value>
    </param>
    <param>
      <key>avg_alpha</key>
      <value>0</value>
    </param>
    <param>
      <key>grid_pos</key>
      <value></value>
    </param>
    <param>
      <key>_coordinate</key>
      <value>(556, 321)</value>
    </param>
    <param>
      <key>_rotation</key>
      <value>0</value>
    </param>
  </block>
  <connection>
    <source_block_id>usrp_simple_source_x</source_block_id>
    <sink_block_id>gr_complex_to_real_0</sink_block_id>
    <source_key>0</source_key>
    <sink_key>0</sink_key>
  </connection>
  <connection>
    <source_block_id>gr_peak_detector2_fb_0</source_block_id>
    <sink_block_id>gr_char_to_float_0</sink_block_id>
    <source_key>0</source_key>
    <sink_key>0</sink_key>
  </connection>
  <connection>
    <source_block_id>gr_complex_to_real_0</source_block_id>
    <sink_block_id>gr_peak_detector2_fb_0</sink_block_id>
    <source_key>0</source_key>
    <sink_key>0</sink_key>
  </connection>
  <connection>
    <source_block_id>gr_char_to_float_0</source_block_id>
    <sink_block_id>wxgui_scopesink2_0</sink_block_id>
    <source_key>0</source_key>
    <sink_key>0</sink_key>
  </connection>
  <connection>
    <source_block_id>gr_complex_to_real_0</source_block_id>
    <sink_block_id>wxgui_scopesink2_0</sink_block_id>
    <source_key>0</source_key>
    <sink_key>1</sink_key>
  </connection>
  <connection>
    <source_block_id>usrp_simple_source_x</source_block_id>
    <sink_block_id>wxgui_fftsink2</sink_block_id>
    <source_key>0</source_key>
    <sink_key>0</sink_key>
  </connection>
</flow_graph>
<?xml version='1.0' encoding='ASCII'?>
<flow_graph>
  <timestamp>Wed May  6 15:45:50 2009</timestamp>
  <block>
    <key>variable_slider</key>
    <param>
      <key>id</key>
      <value>freq</value>
    </param>
    <param>
      <key>_enabled</key>
      <value>True</value>
    </param>
    <param>
      <key>label</key>
      <value>frequency</value>
    </param>
    <param>
      <key>value</key>
      <value>1e6</value>
    </param>
    <param>
      <key>min</key>
      <value>1e6</value>
    </param>
    <param>
      <key>max</key>
      <value>11e6</value>
    </param>
    <param>
      <key>num_steps</key>
      <value>290</value>
    </param>
    <param>
      <key>slider_length</key>
      <value>400</value>
    </param>
    <param>
      <key>slider_type</key>
      <value>horizontal</value>
    </param>
    <param>
      <key>grid_pos</key>
      <value></value>
    </param>
    <param>
      <key>_coordinate</key>
      <value>(13, 511)</value>
    </param>
    <param>
      <key>_rotation</key>
      <value>0</value>
    </param>
  </block>
  <block>
    <key>variable_slider</key>
    <param>
      <key>id</key>
      <value>gain_usrp_source</value>
    </param>
    <param>
      <key>_enabled</key>
      <value>True</value>
    </param>
    <param>
      <key>label</key>
      <value>Gain Usrp Source</value>
    </param>
    <param>
      <key>value</key>
      <value>0</value>
    </param>
    <param>
      <key>min</key>
      <value>0</value>
    </param>
    <param>
      <key>max</key>
      <value>20</value>
    </param>
    <param>
      <key>num_steps</key>
      <value>100</value>
    </param>
    <param>
      <key>slider_length</key>
      <value>200</value>
    </param>
    <param>
      <key>slider_type</key>
      <value>vertical</value>
    </param>
    <param>
      <key>grid_pos</key>
      <value>4, 1, 2, 1</value>
    </param>
    <param>
      <key>_coordinate</key>
      <value>(151, 499)</value>
    </param>
    <param>
      <key>_rotation</key>
      <value>0</value>
    </param>
  </block>
  <block>
    <key>variable</key>
    <param>
      <key>id</key>
      <value>samp_rate</value>
    </param>
    <param>
      <key>_enabled</key>
      <value>True</value>
    </param>
    <param>
      <key>value</key>
      <value>64e6/decim</value>
    </param>
    <param>
      <key>_coordinate</key>
      <value>(30, 703)</value>
    </param>
    <param>
      <key>_rotation</key>
      <value>0</value>
    </param>
  </block>
  <block>
    <key>variable</key>
    <param>
      <key>id</key>
      <value>decim</value>
    </param>
    <param>
      <key>_enabled</key>
      <value>True</value>
    </param>
    <param>
      <key>value</key>
      <value>256</value>
    </param>
    <param>
      <key>_coordinate</key>
      <value>(35, 632)</value>
    </param>
    <param>
      <key>_rotation</key>
      <value>0</value>
    </param>
  </block>
  <block>
    <key>wxgui_scopesink2</key>
    <param>
      <key>id</key>
      <value>wxgui_scopesink2_0</value>
    </param>
    <param>
      <key>_enabled</key>
      <value>True</value>
    </param>
    <param>
      <key>type</key>
      <value>float</value>
    </param>
    <param>
      <key>title</key>
      <value>Scope Plot after Peak Detector</value>
    </param>
    <param>
      <key>samp_rate</key>
      <value>samp_rate</value>
    </param>
    <param>
      <key>v_scale</key>
      <value>0</value>
    </param>
    <param>
      <key>t_scale</key>
      <value>25e-6</value>
    </param>
    <param>
      <key>ac_couple</key>
      <value>False</value>
    </param>
    <param>
      <key>xy_mode</key>
      <value>False</value>
    </param>
    <param>
      <key>num_inputs</key>
      <value>2</value>
    </param>
    <param>
      <key>grid_pos</key>
      <value></value>
    </param>
    <param>
      <key>_coordinate</key>
      <value>(1141, 186)</value>
    </param>
    <param>
      <key>_rotation</key>
      <value>0</value>
    </param>
  </block>
  <block>
    <key>usrp_simple_source_x</key>
    <param>
      <key>id</key>
      <value>usrp_simple_source_x</value>
    </param>
    <param>
      <key>_enabled</key>
      <value>True</value>
    </param>
    <param>
      <key>type</key>
      <value>complex</value>
    </param>
    <param>
      <key>format</key>
      <value></value>
    </param>
    <param>
      <key>which</key>
      <value>0</value>
    </param>
    <param>
      <key>decimation</key>
      <value>decim</value>
    </param>
    <param>
      <key>frequency</key>
      <value>freq</value>
    </param>
    <param>
      <key>gain</key>
      <value>gain_usrp_source</value>
    </param>
    <param>
      <key>side</key>
      <value>B</value>
    </param>
    <param>
      <key>rx_ant</key>
      <value>RXA</value>
    </param>
    <param>
      <key>hb_filters</key>
      <value></value>
    </param>
    <param>
      <key>_coordinate</key>
      <value>(2, 274)</value>
    </param>
    <param>
      <key>_rotation</key>
      <value>0</value>
    </param>
  </block>
  <block>
    <key>wxgui_fftsink2</key>
    <param>
      <key>id</key>
      <value>wxgui_fftsink2</value>
    </param>
    <param>
      <key>_enabled</key>
      <value>True</value>
    </param>
    <param>
      <key>type</key>
      <value>complex</value>
    </param>
    <param>
      <key>title</key>
      <value>FFT Plot</value>
    </param>
    <param>
      <key>samp_rate</key>
      <value>64e6/decim</value>
    </param>
    <param>
      <key>baseband_freq</key>
      <value>freq</value>
    </param>
    <param>
      <key>y_per_div</key>
      <value>10</value>
    </param>
    <param>
      <key>ref_level</key>
      <value>70</value>
    </param>
    <param>
      <key>fft_size</key>
      <value>512*2</value>
    </param>
    <param>
      <key>fft_rate</key>
      <value>20</value>
    </param>
    <param>
      <key>peak_hold</key>
      <value>False</value>
    </param>
    <param>
      <key>average</key>
      <value>True</value>
    </param>
    <param>
      <key>avg_alpha</key>
      <value>0</value>
    </param>
    <param>
      <key>grid_pos</key>
      <value></value>
    </param>
    <param>
      <key>_coordinate</key>
      <value>(556, 321)</value>
    </param>
    <param>
      <key>_rotation</key>
      <value>0</value>
    </param>
  </block>
  <block>
    <key>options</key>
    <param>
      <key>id</key>
      <value>peakdetector_LF_RX_13</value>
    </param>
    <param>
      <key>_enabled</key>
      <value>True</value>
    </param>
    <param>
      <key>title</key>
      <value>USRP Peakdetector Test</value>
    </param>
    <param>
      <key>author</key>
      <value>Example</value>
    </param>
    <param>
      <key>description</key>
      <value>Tests to analyse how the Peak Detector works.</value>
    </param>
    <param>
      <key>window_size</key>
      <value>1280, 1024</value>
    </param>
    <param>
      <key>generate_options</key>
      <value>wx_gui</value>
    </param>
    <param>
      <key>category</key>
      <value>Custom</value>
    </param>
    <param>
      <key>realtime_scheduling</key>
      <value></value>
    </param>
    <param>
      <key>_coordinate</key>
      <value>(10, 10)</value>
    </param>
    <param>
      <key>_rotation</key>
      <value>0</value>
    </param>
  </block>
  <block>
    <key>gr_complex_to_real</key>
    <param>
      <key>id</key>
      <value>gr_complex_to_real_0</value>
    </param>
    <param>
      <key>_enabled</key>
      <value>True</value>
    </param>
    <param>
      <key>vlen</key>
      <value>1</value>
    </param>
    <param>
      <key>_coordinate</key>
      <value>(192, 240)</value>
    </param>
    <param>
      <key>_rotation</key>
      <value>0</value>
    </param>
  </block>
  <block>
    <key>gr_char_to_float</key>
    <param>
      <key>id</key>
      <value>gr_char_to_float_0</value>
    </param>
    <param>
      <key>_enabled</key>
      <value>True</value>
    </param>
    <param>
      <key>_coordinate</key>
      <value>(694, 51)</value>
    </param>
    <param>
      <key>_rotation</key>
      <value>0</value>
    </param>
  </block>
  <block>
    <key>gr_peak_detector_xb</key>
    <param>
      <key>id</key>
      <value>gr_peak_detector_xb_0</value>
    </param>
    <param>
      <key>_enabled</key>
      <value>True</value>
    </param>
    <param>
      <key>type</key>
      <value>float</value>
    </param>
    <param>
      <key>threshold_factor_rise</key>
      <value>0.5</value>
    </param>
    <param>
      <key>threshold_factor_fall</key>
      <value>0.5</value>
    </param>
    <param>
      <key>look_ahead</key>
      <value>2</value>
    </param>
    <param>
      <key>alpha</key>
      <value>1</value>
    </param>
    <param>
      <key>_coordinate</key>
      <value>(412, 33)</value>
    </param>
    <param>
      <key>_rotation</key>
      <value>0</value>
    </param>
  </block>
  <connection>
    <source_block_id>usrp_simple_source_x</source_block_id>
    <sink_block_id>gr_complex_to_real_0</sink_block_id>
    <source_key>0</source_key>
    <sink_key>0</sink_key>
  </connection>
  <connection>
    <source_block_id>gr_char_to_float_0</source_block_id>
    <sink_block_id>wxgui_scopesink2_0</sink_block_id>
    <source_key>0</source_key>
    <sink_key>0</sink_key>
  </connection>
  <connection>
    <source_block_id>gr_complex_to_real_0</source_block_id>
    <sink_block_id>wxgui_scopesink2_0</sink_block_id>
    <source_key>0</source_key>
    <sink_key>1</sink_key>
  </connection>
  <connection>
    <source_block_id>usrp_simple_source_x</source_block_id>
    <sink_block_id>wxgui_fftsink2</sink_block_id>
    <source_key>0</source_key>
    <sink_key>0</sink_key>
  </connection>
  <connection>
    <source_block_id>gr_complex_to_real_0</source_block_id>
    <sink_block_id>gr_peak_detector_xb_0</sink_block_id>
    <source_key>0</source_key>
    <sink_key>0</sink_key>
  </connection>
  <connection>
    <source_block_id>gr_peak_detector_xb_0</source_block_id>
    <sink_block_id>gr_char_to_float_0</sink_block_id>
    <source_key>0</source_key>
    <sink_key>0</sink_key>
  </connection>
</flow_graph>

reply via email to

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