summaryrefslogtreecommitdiff
path: root/gr-digital/examples/demod/ber_simulation.grc
diff options
context:
space:
mode:
authorTom Rondeau <trondeau@vt.edu>2013-01-15 15:00:24 -0500
committerTom Rondeau <trondeau@vt.edu>2013-01-15 15:00:24 -0500
commit5be31c3d79015beeabdd98ebf1c0152ae6caac8c (patch)
treee1d678b4b3dbb5b45c8ca43dfbd5d88451da66c4 /gr-digital/examples/demod/ber_simulation.grc
parent0c0473d51e2c4a4275a88db562791561288e8c15 (diff)
parente1e632469905f8c4b5f0d35c988744c77cf6a227 (diff)
Merge branch 'master' into next
Conflicts: gr-digital/examples/demod/ber_simulation.grc gr-digital/examples/demod/digital_freq_lock.grc gr-digital/examples/demod/pam_sync.grc gr-digital/examples/demod/pam_timing.grc
Diffstat (limited to 'gr-digital/examples/demod/ber_simulation.grc')
-rw-r--r--gr-digital/examples/demod/ber_simulation.grc456
1 files changed, 261 insertions, 195 deletions
diff --git a/gr-digital/examples/demod/ber_simulation.grc b/gr-digital/examples/demod/ber_simulation.grc
index 9f67504b5a..98c1f3d22d 100644
--- a/gr-digital/examples/demod/ber_simulation.grc
+++ b/gr-digital/examples/demod/ber_simulation.grc
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='ASCII'?>
<flow_graph>
- <timestamp>Thu Dec 27 13:06:26 2012</timestamp>
+ <timestamp>Tue Jan 15 14:59:58 2013</timestamp>
<block>
<key>options</key>
<param>
@@ -92,78 +92,69 @@
</param>
</block>
<block>
- <key>wxgui_numbersink2</key>
+ <key>import</key>
<param>
<key>id</key>
- <value>wxgui_numbersink2</value>
+ <value>import</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>type</key>
- <value>float</value>
- </param>
- <param>
- <key>title</key>
- <value>BER</value>
- </param>
- <param>
- <key>units</key>
- <value>%</value>
- </param>
- <param>
- <key>samp_rate</key>
- <value>samp_rate</value>
+ <key>import</key>
+ <value>import math</value>
</param>
<param>
- <key>min_value</key>
- <value>0.0</value>
+ <key>_coordinate</key>
+ <value>(18, 373)</value>
</param>
<param>
- <key>max_value</key>
- <value>1.0</value>
+ <key>_rotation</key>
+ <value>0</value>
</param>
+ </block>
+ <block>
+ <key>variable_slider</key>
<param>
- <key>factor</key>
- <value>100</value>
+ <key>id</key>
+ <value>EbN0</value>
</param>
<param>
- <key>decimal_places</key>
- <value>4</value>
+ <key>_enabled</key>
+ <value>True</value>
</param>
<param>
- <key>ref_level</key>
- <value>0</value>
+ <key>label</key>
+ <value>Eb/N0 (dB)</value>
</param>
<param>
- <key>number_rate</key>
- <value>15</value>
+ <key>value</key>
+ <value>10</value>
</param>
<param>
- <key>peak_hold</key>
- <value>False</value>
+ <key>min</key>
+ <value>-10</value>
</param>
<param>
- <key>average</key>
- <value>False</value>
+ <key>max</key>
+ <value>200</value>
</param>
<param>
- <key>avg_alpha</key>
- <value>0</value>
+ <key>num_steps</key>
+ <value>211</value>
</param>
<param>
- <key>show_gauge</key>
- <value>False</value>
+ <key>style</key>
+ <value>wx.SL_HORIZONTAL</value>
</param>
<param>
- <key>win_size</key>
- <value></value>
+ <key>converver</key>
+ <value>float_converter</value>
</param>
<param>
<key>grid_pos</key>
- <value>1, 0, 1, 1</value>
+ <value></value>
</param>
<param>
<key>notebook</key>
@@ -171,30 +162,30 @@
</param>
<param>
<key>_coordinate</key>
- <value>(791, 228)</value>
+ <value>(311, 309)</value>
</param>
<param>
<key>_rotation</key>
- <value>180</value>
+ <value>0</value>
</param>
</block>
<block>
- <key>import</key>
+ <key>variable</key>
<param>
<key>id</key>
- <value>import</value>
+ <value>const</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>import</key>
- <value>import math</value>
+ <key>value</key>
+ <value>(digital.constellation_bpsk(), digital.constellation_qpsk(), digital.constellation_8psk())</value>
</param>
<param>
<key>_coordinate</key>
- <value>(18, 373)</value>
+ <value>(116, 310)</value>
</param>
<param>
<key>_rotation</key>
@@ -202,45 +193,38 @@
</param>
</block>
<block>
- <key>variable</key>
+ <key>random_source_x</key>
<param>
<key>id</key>
- <value>const</value>
+ <value>random_source_x</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>value</key>
- <value>digital.qpsk_constellation()</value>
- </param>
- <param>
- <key>_coordinate</key>
- <value>(116, 310)</value>
+ <key>type</key>
+ <value>byte</value>
</param>
<param>
- <key>_rotation</key>
+ <key>min</key>
<value>0</value>
</param>
- </block>
- <block>
- <key>variable</key>
<param>
- <key>id</key>
- <value>samp_rate</value>
+ <key>max</key>
+ <value>const[const_type].arity()</value>
</param>
<param>
- <key>_enabled</key>
- <value>True</value>
+ <key>num_samps</key>
+ <value>10000000</value>
</param>
<param>
- <key>value</key>
- <value>100e3</value>
+ <key>repeat</key>
+ <value>True</value>
</param>
<param>
<key>_coordinate</key>
- <value>(16, 308)</value>
+ <value>(17, 125)</value>
</param>
<param>
<key>_rotation</key>
@@ -248,10 +232,10 @@
</param>
</block>
<block>
- <key>wxgui_scopesink2</key>
+ <key>analog_noise_source_x</key>
<param>
<key>id</key>
- <value>wxgui_scopesink2_0</value>
+ <value>analog_noise_source_x</value>
</param>
<param>
<key>_enabled</key>
@@ -262,60 +246,20 @@
<value>complex</value>
</param>
<param>
- <key>title</key>
- <value>"Constellation: "+str(const.arity()) + "-PSK"</value>
- </param>
- <param>
- <key>samp_rate</key>
- <value>samp_rate</value>
- </param>
- <param>
- <key>v_scale</key>
- <value>0</value>
- </param>
- <param>
- <key>v_offset</key>
- <value>0</value>
- </param>
- <param>
- <key>t_scale</key>
- <value>0</value>
- </param>
- <param>
- <key>ac_couple</key>
- <value>False</value>
- </param>
- <param>
- <key>xy_mode</key>
- <value>True</value>
- </param>
- <param>
- <key>num_inputs</key>
- <value>1</value>
- </param>
- <param>
- <key>win_size</key>
- <value></value>
- </param>
- <param>
- <key>grid_pos</key>
- <value>2, 0, 1, 1</value>
- </param>
- <param>
- <key>notebook</key>
- <value></value>
+ <key>noise_type</key>
+ <value>analog.GR_GAUSSIAN</value>
</param>
<param>
- <key>trig_mode</key>
- <value>gr.gr_TRIG_MODE_AUTO</value>
+ <key>amp</key>
+ <value>1.0 / math.sqrt(2.0 * const[const_type].bits_per_symbol() * 10**(EbN0/10))</value>
</param>
<param>
- <key>y_axis_label</key>
- <value>Counts</value>
+ <key>seed</key>
+ <value>42</value>
</param>
<param>
<key>_coordinate</key>
- <value>(623, 228)</value>
+ <value>(16, 224)</value>
</param>
<param>
<key>_rotation</key>
@@ -342,7 +286,7 @@
</param>
<param>
<key>bits_per_symbol</key>
- <value>const.bits_per_symbol()</value>
+ <value>const[const_type].bits_per_symbol()</value>
</param>
<param>
<key>_coordinate</key>
@@ -354,54 +298,45 @@
</param>
</block>
<block>
- <key>variable_slider</key>
+ <key>variable</key>
<param>
<key>id</key>
- <value>EbN0</value>
+ <value>samp_rate</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>label</key>
- <value>Eb/N0 (dB)</value>
- </param>
- <param>
<key>value</key>
- <value>10</value>
- </param>
- <param>
- <key>min</key>
- <value>-10</value>
- </param>
- <param>
- <key>max</key>
- <value>200</value>
+ <value>100e3</value>
</param>
<param>
- <key>num_steps</key>
- <value>211</value>
+ <key>_coordinate</key>
+ <value>(16, 308)</value>
</param>
<param>
- <key>style</key>
- <value>wx.SL_HORIZONTAL</value>
+ <key>_rotation</key>
+ <value>0</value>
</param>
+ </block>
+ <block>
+ <key>variable</key>
<param>
- <key>converver</key>
- <value>float_converter</value>
+ <key>id</key>
+ <value>const_type</value>
</param>
<param>
- <key>grid_pos</key>
- <value></value>
+ <key>_enabled</key>
+ <value>True</value>
</param>
<param>
- <key>notebook</key>
- <value></value>
+ <key>value</key>
+ <value>1</value>
</param>
<param>
<key>_coordinate</key>
- <value>(311, 309)</value>
+ <value>(18, 428)</value>
</param>
<param>
<key>_rotation</key>
@@ -409,38 +344,42 @@
</param>
</block>
<block>
- <key>random_source_x</key>
+ <key>variable_static_text</key>
<param>
<key>id</key>
- <value>random_source_x</value>
+ <value>variable_static_text_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>type</key>
- <value>byte</value>
+ <key>label</key>
+ <value>Constellation Type</value>
</param>
<param>
- <key>min</key>
- <value>0</value>
+ <key>value</key>
+ <value>{0: 'BPSK', 1: 'QPSK', 2: '8-PSK'}[const_type] + " - Change const_type for different constellation types!"</value>
</param>
<param>
- <key>max</key>
- <value>const.arity()</value>
+ <key>converver</key>
+ <value>str_converter</value>
</param>
<param>
- <key>num_samps</key>
- <value>10000000</value>
+ <key>formatter</key>
+ <value>None</value>
</param>
<param>
- <key>repeat</key>
- <value>True</value>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value></value>
</param>
<param>
<key>_coordinate</key>
- <value>(17, 125)</value>
+ <value>(422, 311)</value>
</param>
<param>
<key>_rotation</key>
@@ -451,7 +390,7 @@
<key>digital_chunks_to_symbols_xx</key>
<param>
<key>id</key>
- <value>digital_chunks_to_symbols_xx_0</value>
+ <value>digital_chunks_to_symbols_xx</value>
</param>
<param>
<key>_enabled</key>
@@ -467,7 +406,7 @@
</param>
<param>
<key>symbol_table</key>
- <value>const.points()</value>
+ <value>const[const_type].points()</value>
</param>
<param>
<key>dimension</key>
@@ -479,7 +418,7 @@
</param>
<param>
<key>_coordinate</key>
- <value>(284, 70)</value>
+ <value>(251, 141)</value>
</param>
<param>
<key>_rotation</key>
@@ -487,22 +426,30 @@
</param>
</block>
<block>
- <key>digital_constellation_decoder_cb</key>
+ <key>blocks_add_xx</key>
<param>
<key>id</key>
- <value>digital_constellation_decoder_cb_0</value>
+ <value>blocks_add_xx</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>constellation</key>
- <value>const.base()</value>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>num_inputs</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
</param>
<param>
<key>_coordinate</key>
- <value>(622, 164)</value>
+ <value>(510, 166)</value>
</param>
<param>
<key>_rotation</key>
@@ -510,10 +457,10 @@
</param>
</block>
<block>
- <key>blocks_add_xx</key>
+ <key>wxgui_scopesink2</key>
<param>
<key>id</key>
- <value>blocks_add_xx</value>
+ <value>wxgui_scopesink2_0</value>
</param>
<param>
<key>_enabled</key>
@@ -524,16 +471,60 @@
<value>complex</value>
</param>
<param>
- <key>num_inputs</key>
- <value>2</value>
+ <key>title</key>
+ <value>"Constellation: "+str(const[const_type].arity()) + "-PSK"</value>
</param>
<param>
- <key>vlen</key>
+ <key>samp_rate</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>v_scale</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>v_offset</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>t_scale</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ac_couple</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>xy_mode</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>num_inputs</key>
<value>1</value>
</param>
<param>
+ <key>win_size</key>
+ <value></value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value>2, 0, 1, 1</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value></value>
+ </param>
+ <param>
+ <key>trig_mode</key>
+ <value>gr.gr_TRIG_MODE_AUTO</value>
+ </param>
+ <param>
+ <key>y_axis_label</key>
+ <value>Counts</value>
+ </param>
+ <param>
<key>_coordinate</key>
- <value>(469, 210)</value>
+ <value>(702, 229)</value>
</param>
<param>
<key>_rotation</key>
@@ -541,10 +532,10 @@
</param>
</block>
<block>
- <key>analog_noise_source_x</key>
+ <key>wxgui_numbersink2</key>
<param>
<key>id</key>
- <value>analog_noise_source_x_0</value>
+ <value>wxgui_numbersink2</value>
</param>
<param>
<key>_enabled</key>
@@ -552,23 +543,98 @@
</param>
<param>
<key>type</key>
- <value>complex</value>
+ <value>float</value>
</param>
<param>
- <key>noise_type</key>
- <value>analog.GR_GAUSSIAN</value>
+ <key>title</key>
+ <value>BER</value>
</param>
<param>
- <key>amp</key>
- <value>1.0/math.sqrt(2.0 * const.bits_per_symbol() * 10*(EbN0/10))</value>
+ <key>units</key>
+ <value>%</value>
</param>
<param>
- <key>seed</key>
- <value>-42</value>
+ <key>samp_rate</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>min_value</key>
+ <value>0.0</value>
+ </param>
+ <param>
+ <key>max_value</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>factor</key>
+ <value>100</value>
+ </param>
+ <param>
+ <key>decimal_places</key>
+ <value>4</value>
+ </param>
+ <param>
+ <key>ref_level</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>number_rate</key>
+ <value>15</value>
+ </param>
+ <param>
+ <key>peak_hold</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>average</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>avg_alpha</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>show_gauge</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>win_size</key>
+ <value></value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value>1, 0, 1, 1</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value></value>
</param>
<param>
<key>_coordinate</key>
- <value>(16, 224)</value>
+ <value>(852, 229)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>180</value>
+ </param>
+ </block>
+ <block>
+ <key>digital_constellation_decoder_cb</key>
+ <param>
+ <key>id</key>
+ <value>digital_constellation_decoder_cb_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>constellation</key>
+ <value>const[const_type].base()</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(701, 165)</value>
</param>
<param>
<key>_rotation</key>
@@ -588,44 +654,44 @@
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>random_source_x</source_block_id>
- <sink_block_id>gr_throttle</sink_block_id>
+ <source_block_id>digital_chunks_to_symbols_xx</source_block_id>
+ <sink_block_id>blocks_add_xx</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>blocks_add_xx</source_block_id>
- <sink_block_id>wxgui_scopesink2_0</sink_block_id>
+ <source_block_id>analog_noise_source_x</source_block_id>
+ <sink_block_id>blocks_add_xx</sink_block_id>
<source_key>0</source_key>
- <sink_key>0</sink_key>
+ <sink_key>1</sink_key>
</connection>
<connection>
- <source_block_id>digital_constellation_decoder_cb_0</source_block_id>
- <sink_block_id>blks2_error_rate</sink_block_id>
+ <source_block_id>random_source_x</source_block_id>
+ <sink_block_id>gr_throttle</sink_block_id>
<source_key>0</source_key>
- <sink_key>1</sink_key>
+ <sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>blocks_add_xx</source_block_id>
- <sink_block_id>digital_constellation_decoder_cb_0</sink_block_id>
+ <source_block_id>random_source_x</source_block_id>
+ <sink_block_id>digital_chunks_to_symbols_xx</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>random_source_x</source_block_id>
- <sink_block_id>digital_chunks_to_symbols_xx_0</sink_block_id>
+ <source_block_id>blocks_add_xx</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>digital_chunks_to_symbols_xx_0</source_block_id>
- <sink_block_id>blocks_add_xx</sink_block_id>
+ <source_block_id>blocks_add_xx</source_block_id>
+ <sink_block_id>digital_constellation_decoder_cb_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>analog_noise_source_x_0</source_block_id>
- <sink_block_id>blocks_add_xx</sink_block_id>
+ <source_block_id>digital_constellation_decoder_cb_0</source_block_id>
+ <sink_block_id>blks2_error_rate</sink_block_id>
<source_key>0</source_key>
<sink_key>1</sink_key>
</connection>