diff options
Diffstat (limited to 'gr-channels/grc')
37 files changed, 831 insertions, 1080 deletions
diff --git a/gr-channels/grc/CMakeLists.txt b/gr-channels/grc/CMakeLists.txt index c85170b4ea..a268d69380 100644 --- a/gr-channels/grc/CMakeLists.txt +++ b/gr-channels/grc/CMakeLists.txt @@ -17,7 +17,7 @@ # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -file(GLOB xml_files "*.xml") -install(FILES ${xml_files} +file(GLOB yml_files "*.yml") +install(FILES ${yml_files} DESTINATION ${GRC_BLOCKS_DIR} ) diff --git a/gr-channels/grc/channels.tree.yml b/gr-channels/grc/channels.tree.yml new file mode 100644 index 0000000000..588246defc --- /dev/null +++ b/gr-channels/grc/channels.tree.yml @@ -0,0 +1,20 @@ +'[Core]': +- Channel Models: + - channels_channel_model + - channels_channel_model2 + - channels_conj_fs_iqcorr + - channels_fading_model + - channels_dynamic_channel_model + - channels_selective_fading_model + - channels_selective_fading_model2 +- Impairment Models: + - channels_impairments + - channels_quantizer + - channels_phase_noise_gen + - channels_iqbal_gen + - channels_distortion_2_gen + - channels_distortion_3_gen + - channels_amp_bal + - channels_phase_bal + - channels_cfo_model + - channels_sro_model diff --git a/gr-channels/grc/channels_amp_bal.block.yml b/gr-channels/grc/channels_amp_bal.block.yml new file mode 100644 index 0000000000..6cefa2b581 --- /dev/null +++ b/gr-channels/grc/channels_amp_bal.block.yml @@ -0,0 +1,24 @@ +id: channels_amp_bal +label: Amplitude Balance + +parameters: +- id: alpha + label: Alpha + dtype: float + default: '0' + +inputs: +- domain: stream + dtype: complex + +outputs: +- domain: stream + dtype: complex + +templates: + imports: from gnuradio import channels + make: channels.amp_bal(${alpha}) + callbacks: + - set_alpha(${alpha}) + +file_format: 1 diff --git a/gr-channels/grc/channels_amp_bal.xml b/gr-channels/grc/channels_amp_bal.xml deleted file mode 100644 index 7e0738ec98..0000000000 --- a/gr-channels/grc/channels_amp_bal.xml +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Amplitude balance -################################################### - --> -<block> - <name>Amplitude Balance</name> - <key>channels_amp_bal</key> - <import>from gnuradio import channels</import> - <make>channels.amp_bal($alpha)</make> - <callback>set_alpha($alpha)</callback> - <param> - <name>Alpha</name> - <key>alpha</key> - <value>0</value> - <type>float</type> - </param> - <sink> - <name>in</name> - <type>complex</type> - </sink> - <source> - <name>out</name> - <type>complex</type> - </source> -</block> diff --git a/gr-channels/grc/channels_block_tree.xml b/gr-channels/grc/channels_block_tree.xml deleted file mode 100644 index 80aabaf478..0000000000 --- a/gr-channels/grc/channels_block_tree.xml +++ /dev/null @@ -1,55 +0,0 @@ -<?xml version="1.0"?> - -<!-- - Copyright 2012 Free Software Foundation, Inc. - - This file is part of GNU Radio - - GNU Radio is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - GNU Radio is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNU Radio; see the file COPYING. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, - Boston, MA 02110-1301, USA. ---> - -<!-- -################################################### -##Block Tree for GR Channel Model blocks. -################################################### - --> -<cat> - <name>[Core]</name> - <cat> - <name>Channel Models</name> - <block>channels_channel_model</block> - <block>channels_channel_model2</block> - <block>channels_conj_fs_iqcorr</block> - <block>channels_fading_model</block> - <block>channels_dynamic_channel_model</block> - <block>channels_selective_fading_model</block> - <block>channels_selective_fading_model2</block> - </cat> - <cat> - <name>Impairment Models</name> - <block>channels_impairments</block> - <block>channels_quantizer</block> - <block>channels_phase_noise_gen</block> - <block>channels_iqbal_gen</block> - <block>channels_distortion_2_gen</block> - <block>channels_distortion_3_gen</block> - <block>channels_amp_bal</block> - <block>channels_phase_bal</block> - <block>channels_cfo_model</block> - <block>channels_sro_model</block> - </cat> -</cat> - diff --git a/gr-channels/grc/channels_cfo_model.block.yml b/gr-channels/grc/channels_cfo_model.block.yml new file mode 100644 index 0000000000..daa4eb7032 --- /dev/null +++ b/gr-channels/grc/channels_cfo_model.block.yml @@ -0,0 +1,44 @@ +id: channels_cfo_model +label: CFO Model + +parameters: +- id: srate + label: Sample Rate Hz + dtype: real + default: samp_rate +- id: stdev + label: CFO Standard Deviation Hz per sample + dtype: real + default: '0.01' +- id: maxdev + label: Max CFO Bound Hz + dtype: real + default: 1e3 +- id: seed + label: Seed + dtype: int + default: '0' + +inputs: +- domain: stream + dtype: complex + +outputs: +- domain: stream + dtype: complex + +templates: + imports: from gnuradio import channels + make: |- + channels.cfo_model( + ${srate}, + ${stdev}, + ${maxdev}, + ${seed} + ) + callbacks: + - set_std_dev(${stdev}) + - set_max_dev(${maxdev}) + - set_samp_rate(${srate}) + +file_format: 1 diff --git a/gr-channels/grc/channels_cfo_model.xml b/gr-channels/grc/channels_cfo_model.xml deleted file mode 100644 index 7d44f7fe87..0000000000 --- a/gr-channels/grc/channels_cfo_model.xml +++ /dev/null @@ -1,52 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##CFO Model -################################################### - --> -<block> - <name>CFO Model</name> - <key>channels_cfo_model</key> - <import>from gnuradio import channels</import> - <make>channels.cfo_model( - $srate, - $stdev, - $maxdev, - $seed -)</make> - <callback>set_std_dev($stdev)</callback> - <callback>set_max_dev($maxdev)</callback> - <callback>set_samp_rate($srate)</callback> - <param> - <name>Sample Rate Hz</name> - <key>srate</key> - <value>samp_rate</value> - <type>real</type> - </param> - <param> - <name>CFO Standard Deviation Hz per sample</name> - <key>stdev</key> - <value>0.01</value> - <type>real</type> - </param> - <param> - <name>Max CFO Bound Hz</name> - <key>maxdev</key> - <value>1e3</value> - <type>real</type> - </param> - <param> - <name>Seed</name> - <key>seed</key> - <value>0</value> - <type>int</type> - </param> - <sink> - <name>in</name> - <type>complex</type> - </sink> - <source> - <name>out</name> - <type>complex</type> - </source> -</block> diff --git a/gr-channels/grc/channels_channel_model.block.yml b/gr-channels/grc/channels_channel_model.block.yml new file mode 100644 index 0000000000..d2e166924e --- /dev/null +++ b/gr-channels/grc/channels_channel_model.block.yml @@ -0,0 +1,56 @@ +id: channels_channel_model +label: Channel Model + +parameters: +- id: noise_voltage + label: Noise Voltage + dtype: real + default: '0.0' +- id: freq_offset + label: Frequency Offset + dtype: real + default: '0.0' +- id: epsilon + label: Epsilon + dtype: real + default: '1.0' +- id: taps + label: Taps + dtype: complex_vector + default: 1.0 + 1.0j +- id: seed + label: Seed + dtype: int + default: '0' +- id: block_tags + label: Block Tag Propagation + dtype: enum + default: 'False' + options: ['True', 'False'] + option_labels: ['Yes', 'No'] + option_attributes: + hide_block: ['', part] + hide: ${ block_tags.hide_block } + +inputs: +- domain: stream + dtype: complex + +outputs: +- domain: stream + dtype: complex + +templates: + imports: |- + from gnuradio import channels + from gnuradio.filter import firdes + make: "channels.channel_model(\n\tnoise_voltage=${noise_voltage},\n\tfrequency_offset=${freq_offset},\n\ + \tepsilon=${epsilon},\n\ttaps=${taps},\n\tnoise_seed=${seed},\n\tblock_tags=${block_tags}\n\ + )" + callbacks: + - set_noise_voltage(${noise_voltage}) + - set_frequency_offset(${freq_offset}) + - set_taps(${taps}) + - set_timing_offset(${epsilon}) + +file_format: 1 diff --git a/gr-channels/grc/channels_channel_model.xml b/gr-channels/grc/channels_channel_model.xml deleted file mode 100644 index 909301de94..0000000000 --- a/gr-channels/grc/channels_channel_model.xml +++ /dev/null @@ -1,79 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Channel Model -################################################### - --> -<block> - <name>Channel Model</name> - <key>channels_channel_model</key> - <import>from gnuradio import channels</import> - <import>from gnuradio.filter import firdes</import> - <make>channels.channel_model( - noise_voltage=$noise_voltage, - frequency_offset=$freq_offset, - epsilon=$epsilon, - taps=$taps, - noise_seed=$seed, - block_tags=$block_tags -)</make> - <callback>set_noise_voltage($noise_voltage)</callback> - <callback>set_frequency_offset($freq_offset)</callback> - <callback>set_taps($taps)</callback> - <callback>set_timing_offset($epsilon)</callback> - <param> - <name>Noise Voltage</name> - <key>noise_voltage</key> - <value>0.0</value> - <type>real</type> - </param> - <param> - <name>Frequency Offset</name> - <key>freq_offset</key> - <value>0.0</value> - <type>real</type> - </param> - <param> - <name>Epsilon</name> - <key>epsilon</key> - <value>1.0</value> - <type>real</type> - </param> - <param> - <name>Taps</name> - <key>taps</key> - <value>1.0 + 1.0j</value> - <type>complex_vector</type> - </param> - <param> - <name>Seed</name> - <key>seed</key> - <value>0</value> - <type>int</type> - </param> - <param> - <name>Block Tag Propagation</name> - <key>block_tags</key> - <value>False</value> - <type>enum</type> - <hide>$block_tags.hide_block</hide> - <option> - <name>Yes</name> - <key>True</key> - <opt>hide_block:</opt> - </option> - <option> - <name>No</name> - <key>False</key> - <opt>hide_block:part</opt> - </option> - </param> - <sink> - <name>in</name> - <type>complex</type> - </sink> - <source> - <name>out</name> - <type>complex</type> - </source> -</block> diff --git a/gr-channels/grc/channels_channel_model2.block.yml b/gr-channels/grc/channels_channel_model2.block.yml new file mode 100644 index 0000000000..f42a77c8dd --- /dev/null +++ b/gr-channels/grc/channels_channel_model2.block.yml @@ -0,0 +1,56 @@ +id: channels_channel_model2 +label: Channel Model 2 + +parameters: +- id: noise_voltage + label: Noise Voltage + dtype: real + default: '0.0' +- id: epsilon + label: Time Offset + dtype: real + default: '1.0' +- id: taps + label: Taps + dtype: complex_vector + default: 1.0 + 1.0j +- id: seed + label: Seed + dtype: int + default: '0' +- id: block_tags + label: Block Tag Propagation + dtype: enum + default: 'False' + options: ['True', 'False'] + option_labels: ['Yes', 'No'] + option_attributes: + hide_block: ['', part] + hide: ${ block_tags.hide_block } + +inputs: +- domain: stream + dtype: complex +- label: freq + domain: stream + dtype: float +- label: time + domain: stream + dtype: float + +outputs: +- domain: stream + dtype: complex + +templates: + imports: |- + from gnuradio import channels + from gnuradio.filter import firdes + make: "channels.channel_model2(\n\tnoise_voltage=${noise_voltage},\n\tepsilon=${epsilon},\n\ + \ttaps=${taps},\n\tnoise_seed=${seed},\n\tblock_tags=${block_tags}\n)" + callbacks: + - set_noise_voltage(${noise_voltage}) + - set_taps(${taps}) + - set_timing_offset(${epsilon}) + +file_format: 1 diff --git a/gr-channels/grc/channels_channel_model2.xml b/gr-channels/grc/channels_channel_model2.xml deleted file mode 100644 index 85355a1029..0000000000 --- a/gr-channels/grc/channels_channel_model2.xml +++ /dev/null @@ -1,79 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Channel Model -################################################### - --> -<block> - <name>Channel Model 2</name> - <key>channels_channel_model2</key> - <import>from gnuradio import channels</import> - <import>from gnuradio.filter import firdes</import> - <make>channels.channel_model2( - noise_voltage=$noise_voltage, - epsilon=$epsilon, - taps=$taps, - noise_seed=$seed, - block_tags=$block_tags -)</make> - <callback>set_noise_voltage($noise_voltage)</callback> - <callback>set_taps($taps)</callback> - <callback>set_timing_offset($epsilon)</callback> - <param> - <name>Noise Voltage</name> - <key>noise_voltage</key> - <value>0.0</value> - <type>real</type> - </param> - <param> - <name>Time Offset</name> - <key>epsilon</key> - <value>1.0</value> - <type>real</type> - </param> - <param> - <name>Taps</name> - <key>taps</key> - <value>1.0 + 1.0j</value> - <type>complex_vector</type> - </param> - <param> - <name>Seed</name> - <key>seed</key> - <value>0</value> - <type>int</type> - </param> - <param> - <name>Block Tag Propagation</name> - <key>block_tags</key> - <value>False</value> - <type>enum</type> - <hide>$block_tags.hide_block</hide> - <option> - <name>Yes</name> - <key>True</key> - <opt>hide_block:</opt> - </option> - <option> - <name>No</name> - <key>False</key> - <opt>hide_block:part</opt> - </option> - </param> - <sink> - <name>in</name> - <type>complex</type> - </sink> - <sink> - <name>freq</name> - <type>float</type> - </sink> - <sink> - <name>time</name> - <type>float</type> - </sink> - <source> - <name>out</name> - <type>complex</type> - </source> -</block> diff --git a/gr-channels/grc/channels_conj_fs_iqcorr.block.yml b/gr-channels/grc/channels_conj_fs_iqcorr.block.yml new file mode 100644 index 0000000000..66f9e1d3a5 --- /dev/null +++ b/gr-channels/grc/channels_conj_fs_iqcorr.block.yml @@ -0,0 +1,29 @@ +id: channels_conj_fs_iqcorr +label: Freq. Selective IQ Correction + +parameters: +- id: delay + label: Delay + dtype: int + default: '0' +- id: taps + label: Taps + dtype: complex_vector + default: '0' + +inputs: +- domain: stream + dtype: complex + +outputs: +- domain: stream + dtype: complex + +templates: + imports: from gnuradio import channels + make: channels.conj_fs_iqcorr(${delay}, ${taps}) + callbacks: + - set_delay(${delay}) + - set_taps(${taps}) + +file_format: 1 diff --git a/gr-channels/grc/channels_conj_fs_iqcorr.xml b/gr-channels/grc/channels_conj_fs_iqcorr.xml deleted file mode 100644 index 354f1a2030..0000000000 --- a/gr-channels/grc/channels_conj_fs_iqcorr.xml +++ /dev/null @@ -1,34 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Freq. Selective IQ Correction -################################################### - --> -<block> - <name>Freq. Selective IQ Correction</name> - <key>channels_conj_fs_iqcorr</key> - <import>from gnuradio import channels</import> - <make>channels.conj_fs_iqcorr($delay, $taps)</make> - <callback>set_delay($delay)</callback> - <callback>set_taps($taps)</callback> - <param> - <name>Delay</name> - <key>delay</key> - <value>0</value> - <type>int</type> - </param> - <param> - <name>Taps</name> - <key>taps</key> - <value>0</value> - <type>complex_vector</type> - </param> - <sink> - <name>in</name> - <type>complex</type> - </sink> - <source> - <name>out</name> - <type>complex</type> - </source> -</block> diff --git a/gr-channels/grc/channels_distortion_2_gen.block.yml b/gr-channels/grc/channels_distortion_2_gen.block.yml new file mode 100644 index 0000000000..f45bd06e7d --- /dev/null +++ b/gr-channels/grc/channels_distortion_2_gen.block.yml @@ -0,0 +1,24 @@ +id: channels_distortion_2_gen +label: Second Order Distortion + +parameters: +- id: beta + label: Distortion + dtype: float + default: '0' + +inputs: +- domain: stream + dtype: complex + +outputs: +- domain: stream + dtype: complex + +templates: + imports: from gnuradio import channels + make: channels.distortion_2_gen(${beta}) + callbacks: + - set_beta(${beta}) + +file_format: 1 diff --git a/gr-channels/grc/channels_distortion_2_gen.xml b/gr-channels/grc/channels_distortion_2_gen.xml deleted file mode 100644 index 5b117a9d00..0000000000 --- a/gr-channels/grc/channels_distortion_2_gen.xml +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Second Order Distortion Generator -################################################### - --> -<block> - <name>Second Order Distortion</name> - <key>channels_distortion_2_gen</key> - <import>from gnuradio import channels</import> - <make>channels.distortion_2_gen($beta)</make> - <callback>set_beta($beta)</callback> - <param> - <name>Distortion</name> - <key>beta</key> - <value>0</value> - <type>float</type> - </param> - <sink> - <name>in</name> - <type>complex</type> - </sink> - <source> - <name>out</name> - <type>complex</type> - </source> -</block> diff --git a/gr-channels/grc/channels_distortion_3_gen.block.yml b/gr-channels/grc/channels_distortion_3_gen.block.yml new file mode 100644 index 0000000000..f92677757d --- /dev/null +++ b/gr-channels/grc/channels_distortion_3_gen.block.yml @@ -0,0 +1,24 @@ +id: channels_distortion_3_gen +label: Third Order Distortion + +parameters: +- id: beta + label: Distortion + dtype: float + default: '0' + +inputs: +- domain: stream + dtype: complex + +outputs: +- domain: stream + dtype: complex + +templates: + imports: from gnuradio import channels + make: channels.distortion_3_gen(${beta}) + callbacks: + - set_beta(${beta}) + +file_format: 1 diff --git a/gr-channels/grc/channels_distortion_3_gen.xml b/gr-channels/grc/channels_distortion_3_gen.xml deleted file mode 100644 index 7bf145c27e..0000000000 --- a/gr-channels/grc/channels_distortion_3_gen.xml +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Third Order Distortion Generator -################################################### - --> -<block> - <name>Third Order Distortion</name> - <key>channels_distortion_3_gen</key> - <import>from gnuradio import channels</import> - <make>channels.distortion_3_gen($beta)</make> - <callback>set_beta($beta)</callback> - <param> - <name>Distortion</name> - <key>beta</key> - <value>0</value> - <type>float</type> - </param> - <sink> - <name>in</name> - <type>complex</type> - </sink> - <source> - <name>out</name> - <type>complex</type> - </source> -</block> diff --git a/gr-channels/grc/channels_dynamic_channel_model.block.yml b/gr-channels/grc/channels_dynamic_channel_model.block.yml new file mode 100644 index 0000000000..a18adf8780 --- /dev/null +++ b/gr-channels/grc/channels_dynamic_channel_model.block.yml @@ -0,0 +1,98 @@ +id: channels_dynamic_channel_model +label: Dynamic Channel Model + +parameters: +- id: samp_rate + label: Sample Rate Hz + dtype: real + default: samp_rate +- id: cfo_stdev + label: CFO Standard Deviation Hz per sample + dtype: real + default: '0.01' +- id: cfo_maxdev + label: Max CFO Bound Hz + dtype: real + default: 1e3 +- id: sro_stdev + label: SRO Standard Deviation Hz per sample + dtype: real + default: '0.01' +- id: sro_maxdev + label: Max SRO Bound Hz + dtype: real + default: 1e3 +- id: noise_amp + label: White Noise Amplitude + dtype: real + default: '1.0' +- id: N + label: Num Sinusoids (SoS model) + dtype: int + default: '8' +- id: fD + label: Max Doppler Freq (Hz) + dtype: real + default: '2.0' +- id: LOS + label: LOS Model + dtype: enum + options: ['False', 'True'] + option_labels: [Rayleigh/NLOS, Rician/LOS] + option_attributes: + hide_K: [all, ''] +- id: K + label: Rician factor (K) + dtype: real + default: '4.0' + hide: ${ LOS.hide_K } +- id: seed + label: Seed + dtype: int + default: '0' +- id: delays + label: PDP Delays (samp) + dtype: real_vector + default: 0.0,0.1,1.3 +- id: mags + label: PDP Magnitudes + dtype: real_vector + default: 1,0.99,0.97 +- id: ntaps + label: Num Taps + dtype: int + default: '8' + +inputs: +- domain: stream + dtype: complex + +outputs: +- domain: stream + dtype: complex + +templates: + imports: from gnuradio import channels + make: channels.dynamic_channel_model( ${samp_rate}, ${sro_stdev}, ${sro_maxdev}, + ${cfo_stdev}, ${cfo_maxdev}, ${N}, ${fD}, ${LOS}, ${K}, ${delays}, ${mags}, + ${ntaps}, ${noise_amp}, ${seed} ) + callbacks: + - set_samp_rate(${samp_rate}) + - set_sro_dev_std(${sro_stdev}) + - set_sro_dev_max(${sro_maxdev}) + - set_cfo_dev_std(${cfo_stdev}) + - set_cfo_dev_max(${cfo_maxdev}) + - set_noise_amp(${noise_amp}) + - set_doppler_freq(${fD}) + - set_K(${K}) + +documentation: |- + The dynamic channel model is a hier block consisting of the following effects: + - Dynamic Frequency Selective Fading Channel + - Dynamic Center Frequency Offset Model + - Dynamic Sample Rate Offset Model + - Additive White Gaussian Noise + + The desired power delay profile and max doppler frequency may be provided to achieve the desired Ricean or Rayleigh fading scenario. For center frequency and sample rate offset models, a gaussian random walk process is conducted for each. The single sample step variance and maximum deviation for these two processes is specified and may be modified to simulate various desired stability effects. Lastly AWGN is added to simulate a typical receiver/thermal noise floor after propagation, and the variance may be modified here as desired. + +file_format: 1 diff --git a/gr-channels/grc/channels_dynamic_channel_model.xml b/gr-channels/grc/channels_dynamic_channel_model.xml deleted file mode 100644 index d9022c5792..0000000000 --- a/gr-channels/grc/channels_dynamic_channel_model.xml +++ /dev/null @@ -1,136 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -# Dynamic Channel Model -################################################### - --> -<block> - <name>Dynamic Channel Model</name> - <key>channels_dynamic_channel_model</key> - <import>from gnuradio import channels</import> - <make>channels.dynamic_channel_model( $samp_rate, $sro_stdev, $sro_maxdev, $cfo_stdev, $cfo_maxdev, $N, $fD, $LOS, $K, $delays, $mags, $ntaps, $noise_amp, $seed )</make> - - <callback>set_samp_rate($samp_rate)</callback> - <callback>set_sro_dev_std($sro_stdev)</callback> - <callback>set_sro_dev_max($sro_maxdev)</callback> - <callback>set_cfo_dev_std($cfo_stdev)</callback> - <callback>set_cfo_dev_max($cfo_maxdev)</callback> - <callback>set_noise_amp($noise_amp)</callback> - <callback>set_doppler_freq($fD)</callback> - <callback>set_K($K)</callback> - - <param> - <name>Sample Rate Hz</name> - <key>samp_rate</key> - <value>samp_rate</value> - <type>real</type> - </param> - <param> - <name>CFO Standard Deviation Hz per sample</name> - <key>cfo_stdev</key> - <value>0.01</value> - <type>real</type> - </param> - <param> - <name>Max CFO Bound Hz</name> - <key>cfo_maxdev</key> - <value>1e3</value> - <type>real</type> - </param> - - <param> - <name>SRO Standard Deviation Hz per sample</name> - <key>sro_stdev</key> - <value>0.01</value> - <type>real</type> - </param> - <param> - <name>Max SRO Bound Hz</name> - <key>sro_maxdev</key> - <value>1e3</value> - <type>real</type> - </param> - - <param> - <name>White Noise Amplitude</name> - <key>noise_amp</key> - <value>1.0</value> - <type>real</type> - </param> - - <param> - <name>Num Sinusoids (SoS model)</name> - <key>N</key> - <value>8</value> - <type>int</type> - </param> - <param> - <name>Max Doppler Freq (Hz)</name> - <key>fD</key> - <value>2.0</value> - <type>real</type> - </param> - <param> - <name>LOS Model</name> - <key>LOS</key> - <type>enum</type> - <option> - <name>Rayleigh/NLOS</name> - <key>False</key> - <opt>hide_K:all</opt> - </option> - <option> - <name>Rician/LOS</name> - <key>True</key> - <opt>hide_K:</opt> - </option> - </param> - <param> - <name>Rician factor (K)</name> - <key>K</key> - <value>4.0</value> - <type>real</type> - <hide>$LOS.hide_K</hide> - </param> - <param> - <name>Seed</name> - <key>seed</key> - <value>0</value> - <type>int</type> - </param> - <param> - <name>PDP Delays (samp)</name> - <key>delays</key> - <value>0.0,0.1,1.3</value> - <type>real_vector</type> - </param> - <param> - <name>PDP Magnitudes</name> - <key>mags</key> - <value>1,0.99,0.97</value> - <type>real_vector</type> - </param> - <param> - <name>Num Taps</name> - <key>ntaps</key> - <value>8</value> - <type>int</type> - </param> - <sink> - <name>in</name> - <type>complex</type> - </sink> - <source> - <name>out</name> - <type>complex</type> - </source> - <doc> - The dynamic channel model is a hier block consisting of the following effects: - - Dynamic Frequency Selective Fading Channel - - Dynamic Center Frequency Offset Model - - Dynamic Sample Rate Offset Model - - Additive White Gaussian Noise - - The desired power delay profile and max doppler frequency may be provided to achieve the desired Ricean or Rayleigh fading scenario. For center frequency and sample rate offset models, a gaussian random walk process is conducted for each. The single sample step variance and maximum deviation for these two processes is specified and may be modified to simulate various desired stability effects. Lastly AWGN is added to simulate a typical receiver/thermal noise floor after propagation, and the variance may be modified here as desired. - </doc> -</block> diff --git a/gr-channels/grc/channels_fading_model.block.yml b/gr-channels/grc/channels_fading_model.block.yml new file mode 100644 index 0000000000..7e1587feb6 --- /dev/null +++ b/gr-channels/grc/channels_fading_model.block.yml @@ -0,0 +1,57 @@ +id: channels_fading_model +label: Fading Model + +parameters: +- id: N + label: Num Sinusoids (SoS model) + dtype: int + default: '8' +- id: fDTs + label: Normalized Max Doppler (fD*Ts) + dtype: real + default: 10.0/samp_rate +- id: LOS + label: LOS Model + dtype: enum + options: ['False', 'True'] + option_labels: [Rayleigh/NLOS, Rician/LOS] + option_attributes: + hide_K: [all, ''] +- id: K + label: Rician factor (K) + dtype: real + default: '4.0' + hide: ${ LOS.hide_K } +- id: seed + label: Seed + dtype: int + default: '0' + +inputs: +- domain: stream + dtype: complex + +outputs: +- domain: stream + dtype: complex + +templates: + imports: from gnuradio import channels + make: channels.fading_model( ${N}, ${fDTs}, ${LOS}, ${K}, ${seed} ) + callbacks: + - set_fDTs(${fDTs}) + - set_K(${K}) + +documentation: |- + This algorithm implements the method described in + Compact Rayleigh and Rician fading simulator based on random walk processes + A. Alimohammad S.F. Fard B.F. Cockburn C. Schlegel + 26th November 2008 + + int d_N=8; // number of sinusoids + float d_fDTs=0.01 // normalized maximum doppler frequency (f_doppler / f_samprate) + float d_K=4; // Rician factor (ratio of the specular power to the scattered power) + bool d_LOS=true; // LOS path exists? chooses Rician (LOS) vs Rayleigh (NLOS) model. + int seed=0; // noise seed + +file_format: 1 diff --git a/gr-channels/grc/channels_fading_model.xml b/gr-channels/grc/channels_fading_model.xml deleted file mode 100644 index d47f0624f1..0000000000 --- a/gr-channels/grc/channels_fading_model.xml +++ /dev/null @@ -1,75 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Fading Model -################################################### - --> -<block> - <name>Fading Model</name> - <key>channels_fading_model</key> - <import>from gnuradio import channels</import> - <make>channels.fading_model( $N, $fDTs, $LOS, $K, $seed )</make> - <callback>set_fDTs($fDTs)</callback> - <callback>set_K($K)</callback> - <param> - <name>Num Sinusoids (SoS model)</name> - <key>N</key> - <value>8</value> - <type>int</type> - </param> - <param> - <name>Normalized Max Doppler (fD*Ts)</name> - <key>fDTs</key> - <value>10.0/samp_rate</value> - <type>real</type> - </param> - <param> - <name>LOS Model</name> - <key>LOS</key> - <type>enum</type> - <option> - <name>Rayleigh/NLOS</name> - <key>False</key> - <opt>hide_K:all</opt> - </option> - <option> - <name>Rician/LOS</name> - <key>True</key> - <opt>hide_K:</opt> - </option> - </param> - <param> - <name>Rician factor (K)</name> - <key>K</key> - <value>4.0</value> - <type>real</type> - <hide>$LOS.hide_K</hide> - </param> - <param> - <name>Seed</name> - <key>seed</key> - <value>0</value> - <type>int</type> - </param> - - <sink> - <name>in</name> - <type>complex</type> - </sink> - <source> - <name>out</name> - <type>complex</type> - </source> - <doc> - This algorithm implements the method described in - Compact Rayleigh and Rician fading simulator based on random walk processes - A. Alimohammad S.F. Fard B.F. Cockburn C. Schlegel - 26th November 2008 - - int d_N=8; // number of sinusoids - float d_fDTs=0.01 // normalized maximum doppler frequency (f_doppler / f_samprate) - float d_K=4; // Rician factor (ratio of the specular power to the scattered power) - bool d_LOS=true; // LOS path exists? chooses Rician (LOS) vs Rayleigh (NLOS) model. - int seed=0; // noise seed - </doc> -</block> diff --git a/gr-channels/grc/channels_impairments.block.yml b/gr-channels/grc/channels_impairments.block.yml new file mode 100644 index 0000000000..ccbdff9f45 --- /dev/null +++ b/gr-channels/grc/channels_impairments.block.yml @@ -0,0 +1,60 @@ +id: channels_impairments +label: HW Impairments + +parameters: +- id: phase_noise_mag + label: Phase Noise Mag. + dtype: float + default: '0' +- id: magbal + label: IQ Mag. Imbalance + dtype: float + default: '0' +- id: phasebal + label: IQ Phase. Imbalance + dtype: float + default: '0' +- id: q_ofs + label: Quadrature Offset + dtype: float + default: '0' +- id: i_ofs + label: Inphase Offset + dtype: float + default: '0' +- id: freq_offset + label: Frequency Offset + dtype: float + default: '0' +- id: gamma + label: Second Order Distortion + dtype: float + default: '0' +- id: beta + label: Third Order Distortion + dtype: float + default: '0' + +inputs: +- domain: stream + dtype: complex + +outputs: +- domain: stream + dtype: complex + +templates: + imports: from gnuradio import channels + make: channels.impairments(${phase_noise_mag}, ${magbal}, ${phasebal}, ${q_ofs}, + ${i_ofs}, ${freq_offset}, ${gamma}, ${beta}) + callbacks: + - set_phase_noise_mag(${phase_noise_mag}) + - set_magbal(${magbal}) + - set_phasebal(${phasebal}) + - set_q_ofs(${q_ofs}) + - set_i_ofs(${i_ofs}) + - set_freq_offset(${freq_offset}) + - set_gamma(${gamma}) + - set_beta(${beta}) + +file_format: 1 diff --git a/gr-channels/grc/channels_impairments.xml b/gr-channels/grc/channels_impairments.xml deleted file mode 100644 index 12ee65c740..0000000000 --- a/gr-channels/grc/channels_impairments.xml +++ /dev/null @@ -1,76 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Impairments Model -################################################### - --> -<block> - <name>HW Impairments</name> - <key>channels_impairments</key> - <import>from gnuradio import channels</import> - <make>channels.impairments($phase_noise_mag, $magbal, $phasebal, $q_ofs, $i_ofs, $freq_offset, $gamma, $beta)</make> - <callback>set_phase_noise_mag($phase_noise_mag)</callback> - <callback>set_magbal($magbal)</callback> - <callback>set_phasebal($phasebal)</callback> - <callback>set_q_ofs($q_ofs)</callback> - <callback>set_i_ofs($i_ofs)</callback> - <callback>set_freq_offset($freq_offset)</callback> - <callback>set_gamma($gamma)</callback> - <callback>set_beta($beta)</callback> - <param> - <name>Phase Noise Mag.</name> - <key>phase_noise_mag</key> - <value>0</value> - <type>float</type> - </param> - <param> - <name>IQ Mag. Imbalance</name> - <key>magbal</key> - <value>0</value> - <type>float</type> - </param> - <param> - <name>IQ Phase. Imbalance</name> - <key>phasebal</key> - <value>0</value> - <type>float</type> - </param> - <param> - <name>Quadrature Offset</name> - <key>q_ofs</key> - <value>0</value> - <type>float</type> - </param> - <param> - <name>Inphase Offset</name> - <key>i_ofs</key> - <value>0</value> - <type>float</type> - </param> - <param> - <name>Frequency Offset</name> - <key>freq_offset</key> - <value>0</value> - <type>float</type> - </param> - <param> - <name>Second Order Distortion</name> - <key>gamma</key> - <value>0</value> - <type>float</type> - </param> - <param> - <name>Third Order Distortion</name> - <key>beta</key> - <value>0</value> - <type>float</type> - </param> - <sink> - <name>in</name> - <type>complex</type> - </sink> - <source> - <name>out</name> - <type>complex</type> - </source> -</block> diff --git a/gr-channels/grc/channels_iqbal_gen.block.yml b/gr-channels/grc/channels_iqbal_gen.block.yml new file mode 100644 index 0000000000..5b424761c1 --- /dev/null +++ b/gr-channels/grc/channels_iqbal_gen.block.yml @@ -0,0 +1,29 @@ +id: channels_iqbal_gen +label: IQ Imbalance Generator + +parameters: +- id: mag + label: Magnitude + dtype: float + default: '0' +- id: phase + label: Phase + dtype: float + default: '0' + +inputs: +- domain: stream + dtype: complex + +outputs: +- domain: stream + dtype: complex + +templates: + imports: from gnuradio import channels + make: channels.iqbal_gen(${mag}, ${phase}) + callbacks: + - set_magnitude(${mag}) + - set_phase(${phase}) + +file_format: 1 diff --git a/gr-channels/grc/channels_iqbal_gen.xml b/gr-channels/grc/channels_iqbal_gen.xml deleted file mode 100644 index 9cb267adec..0000000000 --- a/gr-channels/grc/channels_iqbal_gen.xml +++ /dev/null @@ -1,34 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##IQ Imbalance Generator -################################################### - --> -<block> - <name>IQ Imbalance Generator</name> - <key>channels_iqbal_gen</key> - <import>from gnuradio import channels</import> - <make>channels.iqbal_gen($mag, $phase)</make> - <callback>set_magnitude($mag)</callback> - <callback>set_phase($phase)</callback> - <param> - <name>Magnitude</name> - <key>mag</key> - <value>0</value> - <type>float</type> - </param> - <param> - <name>Phase</name> - <key>phase</key> - <value>0</value> - <type>float</type> - </param> - <sink> - <name>in</name> - <type>complex</type> - </sink> - <source> - <name>out</name> - <type>complex</type> - </source> -</block> diff --git a/gr-channels/grc/channels_phase_bal.block.yml b/gr-channels/grc/channels_phase_bal.block.yml new file mode 100644 index 0000000000..70244cffeb --- /dev/null +++ b/gr-channels/grc/channels_phase_bal.block.yml @@ -0,0 +1,24 @@ +id: channels_phase_bal +label: Phase Balance + +parameters: +- id: alpha + label: Alpha + dtype: float + default: '0' + +inputs: +- domain: stream + dtype: complex + +outputs: +- domain: stream + dtype: complex + +templates: + imports: from gnuradio import channels + make: channels.phase_bal(${alpha}) + callbacks: + - set_alpha(${alpha}) + +file_format: 1 diff --git a/gr-channels/grc/channels_phase_bal.xml b/gr-channels/grc/channels_phase_bal.xml deleted file mode 100644 index ce17ab79ab..0000000000 --- a/gr-channels/grc/channels_phase_bal.xml +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Phase balance -################################################### - --> -<block> - <name>Phase Balance</name> - <key>channels_phase_bal</key> - <import>from gnuradio import channels</import> - <make>channels.phase_bal($alpha)</make> - <callback>set_alpha($alpha)</callback> - <param> - <name>Alpha</name> - <key>alpha</key> - <value>0</value> - <type>float</type> - </param> - <sink> - <name>in</name> - <type>complex</type> - </sink> - <source> - <name>out</name> - <type>complex</type> - </source> -</block> diff --git a/gr-channels/grc/channels_phase_noise_gen.block.yml b/gr-channels/grc/channels_phase_noise_gen.block.yml new file mode 100644 index 0000000000..1310caad89 --- /dev/null +++ b/gr-channels/grc/channels_phase_noise_gen.block.yml @@ -0,0 +1,29 @@ +id: channels_phase_noise_gen +label: Phase Noise Generator + +parameters: +- id: noise_mag + label: Noise Magnitude + dtype: float + default: '0' +- id: alpha + label: Alpha + dtype: float + default: '0.1' + +inputs: +- domain: stream + dtype: complex + +outputs: +- domain: stream + dtype: complex + +templates: + imports: from gnuradio import channels + make: channels.phase_noise_gen(${noise_mag}, ${alpha}) + callbacks: + - set_noise_mag(${noise_mag}) + - set_alpha(${alpha}) + +file_format: 1 diff --git a/gr-channels/grc/channels_phase_noise_gen.xml b/gr-channels/grc/channels_phase_noise_gen.xml deleted file mode 100644 index 852b4c9966..0000000000 --- a/gr-channels/grc/channels_phase_noise_gen.xml +++ /dev/null @@ -1,34 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Phase Noise Generator -################################################### - --> -<block> - <name>Phase Noise Generator</name> - <key>channels_phase_noise_gen</key> - <import>from gnuradio import channels</import> - <make>channels.phase_noise_gen($noise_mag, $alpha)</make> - <callback>set_noise_mag($noise_mag)</callback> - <callback>set_alpha($alpha)</callback> - <param> - <name>Noise Magnitude</name> - <key>noise_mag</key> - <value>0</value> - <type>float</type> - </param> - <param> - <name>Alpha</name> - <key>alpha</key> - <value>0.1</value> - <type>float</type> - </param> - <sink> - <name>in</name> - <type>complex</type> - </sink> - <source> - <name>out</name> - <type>complex</type> - </source> -</block> diff --git a/gr-channels/grc/channels_quantizer.block.yml b/gr-channels/grc/channels_quantizer.block.yml new file mode 100644 index 0000000000..68fcf50299 --- /dev/null +++ b/gr-channels/grc/channels_quantizer.block.yml @@ -0,0 +1,24 @@ +id: channels_quantizer +label: Quantizer + +parameters: +- id: bits + label: Bits + dtype: int + default: '16' + +inputs: +- domain: stream + dtype: float + +outputs: +- domain: stream + dtype: float + +templates: + imports: from gnuradio import channels + make: channels.quantizer(${bits}) + callbacks: + - set_bits(${bits}) + +file_format: 1 diff --git a/gr-channels/grc/channels_quantizer.xml b/gr-channels/grc/channels_quantizer.xml deleted file mode 100644 index 57bed74ee7..0000000000 --- a/gr-channels/grc/channels_quantizer.xml +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Quantization -################################################### - --> -<block> - <name>Quantizer</name> - <key>channels_quantizer</key> - <import>from gnuradio import channels</import> - <make>channels.quantizer($bits)</make> - <callback>set_bits($bits)</callback> - <param> - <name>Bits</name> - <key>bits</key> - <value>16</value> - <type>int</type> - </param> - <sink> - <name>in</name> - <type>float</type> - </sink> - <source> - <name>out</name> - <type>float</type> - </source> -</block> diff --git a/gr-channels/grc/channels_selective_fading_model.block.yml b/gr-channels/grc/channels_selective_fading_model.block.yml new file mode 100644 index 0000000000..9898ee75ab --- /dev/null +++ b/gr-channels/grc/channels_selective_fading_model.block.yml @@ -0,0 +1,87 @@ +id: channels_selective_fading_model +label: Frequency Selective Fading Model + +parameters: +- id: N + label: Num Sinusoids (SoS model) + dtype: int + default: '8' +- id: fDTs + label: Normalized Max Doppler (fD*Ts) + dtype: real + default: 10.0/samp_rate +- id: LOS + label: LOS Model + dtype: enum + options: ['False', 'True'] + option_labels: [Rayleigh/NLOS, Rician/LOS] + option_attributes: + hide_K: [all, ''] +- id: K + label: Rician factor (K) + dtype: real + default: '4.0' + hide: ${ LOS.hide_K } +- id: seed + label: Seed + dtype: int + default: '0' +- id: delays + label: PDP Delays (samp) + dtype: real_vector + default: 0.0,0.1,1.3 +- id: mags + label: PDP Magnitudes + dtype: real_vector + default: 1,0.99,0.97 +- id: ntaps + label: Num Taps + dtype: int + default: '8' + +inputs: +- domain: stream + dtype: complex + +outputs: +- domain: stream + dtype: complex + +templates: + imports: from gnuradio import channels + make: channels.selective_fading_model( ${N}, ${fDTs}, ${LOS}, ${K}, ${seed}, ${delays}, + ${mags}, ${ntaps} ) + callbacks: + - set_fDTs(${fDTs}) + - set_K(${K}) + +documentation: |- + int d_N=8; // number of sinusoids used to simulate gain on each ray + float d_fDTs=0.01 // normalized maximum doppler frequency (f_doppler / f_samprate) + float d_K=4; // Rician factor (ratio of the specular power to the scattered power) + bool d_LOS=true; // LOS path exists? chooses Rician (LOS) vs Rayleigh (NLOS) model. + int seed=0; // noise seed + int ntaps; // Number of FIR taps to use in selective fading model + + These two vectors comprise the Power Delay Profile of the signal + float_vector delays // Time delay in the fir filter (in samples) for each arriving WSSUS Ray + float_vector mags // Magnitude corresponding to each WSSUS Ray + + If using a LOS model, the first delay and mag should correspond with the LOS component + + References: + + The flat-fading portion of the algorithm implements the following + Compact Rayleigh and Rician fading simulator based on random walk processes + A. Alimohammad S.F. Fard B.F. Cockburn C. Schlegel + 26th November 2008 + + The frequency selective extension of the block roughly implements + A Low-Complexity Hardware Implementation of Discrete-Time + Frequency-Selective Rayleigh Fading Channels + F. Ren and Y. Zheng + 24-27 May 2009 + + Implementation by Tim O'Shea + +file_format: 1 diff --git a/gr-channels/grc/channels_selective_fading_model.xml b/gr-channels/grc/channels_selective_fading_model.xml deleted file mode 100644 index c9b89a0da9..0000000000 --- a/gr-channels/grc/channels_selective_fading_model.xml +++ /dev/null @@ -1,109 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Frequency Selective Fading Model -################################################### - --> -<block> - <name>Frequency Selective Fading Model</name> - <key>channels_selective_fading_model</key> - <import>from gnuradio import channels</import> - <make>channels.selective_fading_model( $N, $fDTs, $LOS, $K, $seed, $delays, $mags, $ntaps )</make> - <callback>set_fDTs($fDTs)</callback> - <callback>set_K($K)</callback> - <param> - <name>Num Sinusoids (SoS model)</name> - <key>N</key> - <value>8</value> - <type>int</type> - </param> - <param> - <name>Normalized Max Doppler (fD*Ts)</name> - <key>fDTs</key> - <value>10.0/samp_rate</value> - <type>real</type> - </param> - <param> - <name>LOS Model</name> - <key>LOS</key> - <type>enum</type> - <option> - <name>Rayleigh/NLOS</name> - <key>False</key> - <opt>hide_K:all</opt> - </option> - <option> - <name>Rician/LOS</name> - <key>True</key> - <opt>hide_K:</opt> - </option> - </param> - <param> - <name>Rician factor (K)</name> - <key>K</key> - <value>4.0</value> - <type>real</type> - <hide>$LOS.hide_K</hide> - </param> - <param> - <name>Seed</name> - <key>seed</key> - <value>0</value> - <type>int</type> - </param> - <param> - <name>PDP Delays (samp)</name> - <key>delays</key> - <value>0.0,0.1,1.3</value> - <type>real_vector</type> - </param> - <param> - <name>PDP Magnitudes</name> - <key>mags</key> - <value>1,0.99,0.97</value> - <type>real_vector</type> - </param> - <param> - <name>Num Taps</name> - <key>ntaps</key> - <value>8</value> - <type>int</type> - </param> - <sink> - <name>in</name> - <type>complex</type> - </sink> - <source> - <name>out</name> - <type>complex</type> - </source> - <doc> - int d_N=8; // number of sinusoids used to simulate gain on each ray - float d_fDTs=0.01 // normalized maximum doppler frequency (f_doppler / f_samprate) - float d_K=4; // Rician factor (ratio of the specular power to the scattered power) - bool d_LOS=true; // LOS path exists? chooses Rician (LOS) vs Rayleigh (NLOS) model. - int seed=0; // noise seed - int ntaps; // Number of FIR taps to use in selective fading model - - These two vectors comprise the Power Delay Profile of the signal - float_vector delays // Time delay in the fir filter (in samples) for each arriving WSSUS Ray - float_vector mags // Magnitude corresponding to each WSSUS Ray - - If using a LOS model, the first delay and mag should correspond with the LOS component - - References: - - The flat-fading portion of the algorithm implements the following - Compact Rayleigh and Rician fading simulator based on random walk processes - A. Alimohammad S.F. Fard B.F. Cockburn C. Schlegel - 26th November 2008 - - The frequency selective extension of the block roughly implements - A Low-Complexity Hardware Implementation of Discrete-Time - Frequency-Selective Rayleigh Fading Channels - F. Ren and Y. Zheng - 24-27 May 2009 - - Implementation by Tim O'Shea - </doc> -</block> diff --git a/gr-channels/grc/channels_selective_fading_model2.block.yml b/gr-channels/grc/channels_selective_fading_model2.block.yml new file mode 100644 index 0000000000..1506c03fbc --- /dev/null +++ b/gr-channels/grc/channels_selective_fading_model2.block.yml @@ -0,0 +1,100 @@ +id: channels_selective_fading_model2 +label: Frequency Selective Fading Model2 + +parameters: +- id: N + label: Num Sinusoids (Stochastic SoS model + delay drift) + dtype: int + default: '8' +- id: fDTs + label: Normalized Max Doppler (fD*Ts) + dtype: real + default: 0.2/samp_rate +- id: LOS + label: LOS Model + dtype: enum + options: ['False', 'True'] + option_labels: [Rayleigh/NLOS, Rician/LOS] + option_attributes: + hide_K: [all, ''] +- id: K + label: Rician factor (K) + dtype: real + default: '4.0' + hide: ${ LOS.hide_K } +- id: seed + label: Seed + dtype: int + default: '0' +- id: delays + label: PDP Delays (in samps) + dtype: real_vector + default: 1.0,1.9,2.7 +- id: delay_std + label: PDP Delay StdDev (per samp) + dtype: real_vector + default: 1e-4,1e-4,1e-4 +- id: delay_maxdev + label: PDP Delay Max-Dev (per samp) + dtype: real_vector + default: 0.5,0.7,0.9 +- id: mags + label: PDP Magnitudes + dtype: real_vector + default: 1,0.95,0.8 +- id: ntaps + label: Num Taps + dtype: int + default: '8' + +inputs: +- domain: stream + dtype: complex + +outputs: +- domain: stream + dtype: complex +- domain: message + id: taps + optional: true + +templates: + imports: from gnuradio import channels + make: channels.selective_fading_model2( ${N}, ${fDTs}, ${LOS}, ${K}, ${seed}, + ${delays}, ${delay_std}, ${delay_maxdev}, ${mags}, ${ntaps} ) + callbacks: + - set_fDTs(${fDTs}) + - set_K(${K}) + +documentation: |- + int d_N=8; // number of sinusoids used to simulate gain on each ray + float d_fDTs=0.01 // normalized maximum doppler frequency (f_doppler / f_samprate) + float d_K=4; // Rician factor (ratio of the specular power to the scattered power) + bool d_LOS=true; // LOS path exists? chooses Rician (LOS) vs Rayleigh (NLOS) model. + int seed=0; // noise seed + int ntaps; // Number of FIR taps to use in selective fading model + + These two vectors comprise the Power Delay Profile of the signal + float_vector delays // Time delay in the fir filter (in samples) for each arriving WSSUS Ray + float_vector mags // Magnitude corresponding to each WSSUS Ray + + If using a LOS model, the first delay and mag should correspond with the LOS component + + References: + + The flat-fading portion of the algorithm implements the following + Compact Rayleigh and Rician fading simulator based on random walk processes + A. Alimohammad S.F. Fard B.F. Cockburn C. Schlegel + 26th November 2008 + (Alogrithm III) + ( with a novel addition of time delay tap random walk ) + + The frequency selective extension of the block roughly implements + A Low-Complexity Hardware Implementation of Discrete-Time + Frequency-Selective Rayleigh Fading Channels + F. Ren and Y. Zheng + 24-27 May 2009 + + Implementation by Tim O'Shea + +file_format: 1 diff --git a/gr-channels/grc/channels_selective_fading_model2.xml b/gr-channels/grc/channels_selective_fading_model2.xml deleted file mode 100644 index 1e1ea3a70c..0000000000 --- a/gr-channels/grc/channels_selective_fading_model2.xml +++ /dev/null @@ -1,128 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Frequency Selective Fading Model -################################################### - --> -<block> - <name>Frequency Selective Fading Model2</name> - <key>channels_selective_fading_model2</key> - <import>from gnuradio import channels</import> - <make>channels.selective_fading_model2( $N, $fDTs, $LOS, $K, $seed, $delays, $delay_std, $delay_maxdev, $mags, $ntaps )</make> - <callback>set_fDTs($fDTs)</callback> - <callback>set_K($K)</callback> - <param> - <name>Num Sinusoids (Stochastic SoS model + delay drift)</name> - <key>N</key> - <value>8</value> - <type>int</type> - </param> - <param> - <name>Normalized Max Doppler (fD*Ts)</name> - <key>fDTs</key> - <value>0.2/samp_rate</value> - <type>real</type> - </param> - <param> - <name>LOS Model</name> - <key>LOS</key> - <type>enum</type> - <option> - <name>Rayleigh/NLOS</name> - <key>False</key> - <opt>hide_K:all</opt> - </option> - <option> - <name>Rician/LOS</name> - <key>True</key> - <opt>hide_K:</opt> - </option> - </param> - <param> - <name>Rician factor (K)</name> - <key>K</key> - <value>4.0</value> - <type>real</type> - <hide>$LOS.hide_K</hide> - </param> - <param> - <name>Seed</name> - <key>seed</key> - <value>0</value> - <type>int</type> - </param> - <param> - <name>PDP Delays (in samps)</name> - <key>delays</key> - <value>1.0,1.9,2.7</value> - <type>real_vector</type> - </param> - <param> - <name>PDP Delay StdDev (per samp)</name> - <key>delay_std</key> - <value>1e-4,1e-4,1e-4</value> - <type>real_vector</type> - </param> - <param> - <name>PDP Delay Max-Dev (per samp)</name> - <key>delay_maxdev</key> - <value>0.5,0.7,0.9</value> - <type>real_vector</type> - </param> - <param> - <name>PDP Magnitudes</name> - <key>mags</key> - <value>1,0.95,0.8</value> - <type>real_vector</type> - </param> - <param> - <name>Num Taps</name> - <key>ntaps</key> - <value>8</value> - <type>int</type> - </param> - <sink> - <name>in</name> - <type>complex</type> - </sink> - <source> - <name>out</name> - <type>complex</type> - </source> - <source> - <name>taps</name> - <type>message</type> - <optional>1</optional> - </source> - <doc> - int d_N=8; // number of sinusoids used to simulate gain on each ray - float d_fDTs=0.01 // normalized maximum doppler frequency (f_doppler / f_samprate) - float d_K=4; // Rician factor (ratio of the specular power to the scattered power) - bool d_LOS=true; // LOS path exists? chooses Rician (LOS) vs Rayleigh (NLOS) model. - int seed=0; // noise seed - int ntaps; // Number of FIR taps to use in selective fading model - - These two vectors comprise the Power Delay Profile of the signal - float_vector delays // Time delay in the fir filter (in samples) for each arriving WSSUS Ray - float_vector mags // Magnitude corresponding to each WSSUS Ray - - If using a LOS model, the first delay and mag should correspond with the LOS component - - References: - - The flat-fading portion of the algorithm implements the following - Compact Rayleigh and Rician fading simulator based on random walk processes - A. Alimohammad S.F. Fard B.F. Cockburn C. Schlegel - 26th November 2008 - (Alogrithm III) - ( with a novel addition of time delay tap random walk ) - - The frequency selective extension of the block roughly implements - A Low-Complexity Hardware Implementation of Discrete-Time - Frequency-Selective Rayleigh Fading Channels - F. Ren and Y. Zheng - 24-27 May 2009 - - Implementation by Tim O'Shea - </doc> -</block> diff --git a/gr-channels/grc/channels_sro_model.block.yml b/gr-channels/grc/channels_sro_model.block.yml new file mode 100644 index 0000000000..8da9a5b25b --- /dev/null +++ b/gr-channels/grc/channels_sro_model.block.yml @@ -0,0 +1,44 @@ +id: channels_sro_model +label: SRO Model + +parameters: +- id: srate + label: Sample Rate Hz + dtype: real + default: samp_rate +- id: stdev + label: SRO Standard Deviation Hz per sample + dtype: real + default: '0.01' +- id: maxdev + label: Max SRO Bound Hz + dtype: real + default: 1e3 +- id: seed + label: Seed + dtype: int + default: '0' + +inputs: +- domain: stream + dtype: complex + +outputs: +- domain: stream + dtype: complex + +templates: + imports: from gnuradio import channels + make: |- + channels.sro_model( + ${srate}, + ${stdev}, + ${maxdev}, + ${seed} + ) + callbacks: + - set_std_dev(${stdev}) + - set_max_dev(${maxdev}) + - set_samp_rate(${srate}) + +file_format: 1 diff --git a/gr-channels/grc/channels_sro_model.xml b/gr-channels/grc/channels_sro_model.xml deleted file mode 100644 index 63752aaefd..0000000000 --- a/gr-channels/grc/channels_sro_model.xml +++ /dev/null @@ -1,52 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##SRO Model -################################################### - --> -<block> - <name>SRO Model</name> - <key>channels_sro_model</key> - <import>from gnuradio import channels</import> - <make>channels.sro_model( - $srate, - $stdev, - $maxdev, - $seed -)</make> - <callback>set_std_dev($stdev)</callback> - <callback>set_max_dev($maxdev)</callback> - <callback>set_samp_rate($srate)</callback> - <param> - <name>Sample Rate Hz</name> - <key>srate</key> - <value>samp_rate</value> - <type>real</type> - </param> - <param> - <name>SRO Standard Deviation Hz per sample</name> - <key>stdev</key> - <value>0.01</value> - <type>real</type> - </param> - <param> - <name>Max SRO Bound Hz</name> - <key>maxdev</key> - <value>1e3</value> - <type>real</type> - </param> - <param> - <name>Seed</name> - <key>seed</key> - <value>0</value> - <type>int</type> - </param> - <sink> - <name>in</name> - <type>complex</type> - </sink> - <source> - <name>out</name> - <type>complex</type> - </source> -</block> |