aboutsummaryrefslogtreecommitdiffstats
path: root/simulation/QAM_Fading
diff options
context:
space:
mode:
authorsara <sara.halter@gmx.ch>2021-12-14 18:57:29 +0100
committersara <sara.halter@gmx.ch>2021-12-14 18:57:29 +0100
commit75edb689e503769dcb1ab228e4a59ea2e0cf8d9e (patch)
treea964fa58a8a4044e0c10b75a2cd6a165cedeca6d /simulation/QAM_Fading
parentAvoid sending EVERY sample over UDP (diff)
downloadFading-75edb689e503769dcb1ab228e4a59ea2e0cf8d9e.tar.gz
Fading-75edb689e503769dcb1ab228e4a59ea2e0cf8d9e.zip
BER block angepasst
Diffstat (limited to '')
-rwxr-xr-xsimulation/QAM_Fading/qam_fading.py7
-rw-r--r--simulation/QAM_Fading/qam_fading_frequency_selectiv.grc207
2 files changed, 27 insertions, 187 deletions
diff --git a/simulation/QAM_Fading/qam_fading.py b/simulation/QAM_Fading/qam_fading.py
index 56a3847..cc1bd08 100755
--- a/simulation/QAM_Fading/qam_fading.py
+++ b/simulation/QAM_Fading/qam_fading.py
@@ -76,7 +76,7 @@ class qam_fading(gr.top_block, Qt.QWidget):
##################################################
# Variables
##################################################
- self.sps = sps = 2
+ self.sps = sps = 4
self.nfilts = nfilts = 32
self.excess_bw = excess_bw = 350e-3
self.timing_loop_bw = timing_loop_bw = 2 * 3.141592653589793 / 100
@@ -91,8 +91,7 @@ class qam_fading(gr.top_block, Qt.QWidget):
self.eq_ntaps = eq_ntaps = 15
self.eq_mod = eq_mod = 1
self.eq_gain = eq_gain = .01
- self.const = const = digital.constellation_calcdist([-1-1j, -1+1j, 1+1j, 1-1j], [0, 1, 3, 2],
- 4, 1).base()
+ self.const = const = digital.constellation_qpsk().base()
self.chn_taps = chn_taps = [1.0 + 0.0j, ]
##################################################
@@ -467,7 +466,7 @@ class qam_fading(gr.top_block, Qt.QWidget):
self.digital_constellation_decoder_cb_0 = digital.constellation_decoder_cb(const)
self.digital_cma_equalizer_cc_0_0 = digital.cma_equalizer_cc(eq_ntaps, eq_mod, eq_gain, 2)
self.digital_cma_equalizer_cc_0 = digital.cma_equalizer_cc(eq_ntaps, eq_mod, eq_gain, 2)
- self.channels_selective_fading_model_0 = channels.selective_fading_model( 8, ((2*fc*1e9)/(3*10e8))/samp_rate, False, 4, 0, (0,1.8), (1,0.12), 8 )
+ self.channels_selective_fading_model_0 = channels.selective_fading_model( 8, ((2*fc*1e9)/(3*10e8))/samp_rate, False, 4, 21, (0,1.8), (1,0.12), 8 )
self.channels_channel_model_0 = channels.channel_model(
noise_voltage=noise_volt,
frequency_offset=freq_offset,
diff --git a/simulation/QAM_Fading/qam_fading_frequency_selectiv.grc b/simulation/QAM_Fading/qam_fading_frequency_selectiv.grc
index 02948d2..109a74d 100644
--- a/simulation/QAM_Fading/qam_fading_frequency_selectiv.grc
+++ b/simulation/QAM_Fading/qam_fading_frequency_selectiv.grc
@@ -54,7 +54,7 @@ blocks:
rot_sym: '4'
soft_dec_lut: None
sym_map: '[0, 1, 3, 2]'
- type: calcdist
+ type: qpsk
states:
bus_sink: false
bus_source: false
@@ -127,11 +127,11 @@ blocks:
label: fc
min_len: '200'
orient: Qt.Horizontal
- rangeType: int
+ rangeType: float
start: '0'
step: '1'
- stop: '1000000000'
- value: '1'
+ stop: '10'
+ value: '2.4'
widget: counter_slider
states:
bus_sink: false
@@ -243,7 +243,7 @@ blocks:
id: variable
parameters:
comment: ''
- value: '2'
+ value: '4'
states:
bus_sink: false
bus_source: false
@@ -411,28 +411,9 @@ blocks:
bus_sink: false
bus_source: false
bus_structure: null
- coordinate: [464, 324.0]
+ coordinate: [480, 356.0]
rotation: 0
state: enabled
-- name: blocks_throttle_0_0
- id: blocks_throttle
- parameters:
- affinity: ''
- alias: ''
- comment: ''
- ignoretag: 'True'
- maxoutbuf: '0'
- minoutbuf: '0'
- samples_per_second: samp_rate
- type: byte
- vlen: '1'
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [240, 204.0]
- rotation: 0
- state: bypassed
- name: blocks_unpack_k_bits_bb_0
id: blocks_unpack_k_bits_bb
parameters:
@@ -522,20 +503,20 @@ blocks:
coordinate: [648, 316.0]
rotation: 0
state: enabled
-- name: channels_selective_fading_model2_0
+- name: channels_selective_fading_model2_1
id: channels_selective_fading_model2
parameters:
- K: '5.1'
+ K: '4.0'
LOS: 'False'
N: '8'
affinity: ''
alias: ''
comment: ''
- delay_maxdev: (0.5,0.7)
- delay_std: (1e-4,1e-4)
- delays: (0,2e-5/samp_rate)
- fDTs: ((4*fc)/(3*10e8))/samp_rate
- mags: (1,0.12)
+ delay_maxdev: (0.5,0.7,0.9)
+ delay_std: (1e-4,1e-4,1e-4)
+ delays: (1.0,1.9,2.7)
+ fDTs: 0.2/samp_rate
+ mags: (1,0.95,0.8)
maxoutbuf: '0'
minoutbuf: '0'
ntaps: '8'
@@ -544,7 +525,7 @@ blocks:
bus_sink: false
bus_source: false
bus_structure: null
- coordinate: [904, 292.0]
+ coordinate: [888, 276.0]
rotation: 0
state: disabled
- name: channels_selective_fading_model_0
@@ -556,18 +537,18 @@ blocks:
affinity: ''
alias: ''
comment: ''
- delays: (0,2e-5/samp_rate)
- fDTs: ((4*fc)/(3*10e8))/samp_rate
+ delays: (0,1.8)
+ fDTs: ((2*fc*1e9)/(3*10e8))/samp_rate
mags: (1,0.12)
maxoutbuf: '0'
minoutbuf: '0'
ntaps: '8'
- seed: '0'
+ seed: '21'
states:
bus_sink: false
bus_source: false
bus_structure: null
- coordinate: [968, 468.0]
+ coordinate: [976, 404.0]
rotation: 0
state: enabled
- name: channels_selective_fading_model_2
@@ -684,26 +665,6 @@ blocks:
coordinate: [240, 332.0]
rotation: 0
state: enabled
-- name: digital_constellation_receiver_cb_0
- id: digital_constellation_receiver_cb
- parameters:
- affinity: ''
- alias: ''
- comment: ''
- constellation: const
- fmax: '1'
- fmin: '1.5'
- loop_bw: timing_loop_bw
- maxoutbuf: '0'
- minoutbuf: '0'
- showports: 'False'
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [1376, -64.0]
- rotation: 0
- state: disabled
- name: digital_costas_loop_cc_0
id: digital_costas_loop_cc
parameters:
@@ -850,25 +811,6 @@ blocks:
coordinate: [1088, 868.0]
rotation: 0
state: true
-- name: fir_filter_xxx_0
- id: fir_filter_xxx
- parameters:
- affinity: ''
- alias: ''
- comment: ''
- decim: '1'
- maxoutbuf: '0'
- minoutbuf: '0'
- samp_delay: '0'
- taps: rrc_taps
- type: ccc
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [488, 212.0]
- rotation: 0
- state: bypassed
- name: import_0
id: import
parameters:
@@ -1318,98 +1260,6 @@ blocks:
coordinate: [2188.0, 0]
rotation: 90
state: enabled
-- name: qtgui_const_sink_x_3
- id: qtgui_const_sink_x
- parameters:
- affinity: ''
- alias: ''
- alpha1: '1.0'
- alpha10: '1.0'
- alpha2: '1.0'
- alpha3: '1.0'
- alpha4: '1.0'
- alpha5: '1.0'
- alpha6: '1.0'
- alpha7: '1.0'
- alpha8: '1.0'
- alpha9: '1.0'
- autoscale: 'False'
- axislabels: 'True'
- color1: '"blue"'
- color10: '"red"'
- color2: '"red"'
- color3: '"red"'
- color4: '"red"'
- color5: '"red"'
- color6: '"red"'
- color7: '"red"'
- color8: '"red"'
- color9: '"red"'
- comment: ''
- grid: 'False'
- gui_hint: ''
- label1: ''
- label10: ''
- label2: ''
- label3: ''
- label4: ''
- label5: ''
- label6: ''
- label7: ''
- label8: ''
- label9: ''
- legend: 'True'
- marker1: '0'
- marker10: '0'
- marker2: '0'
- marker3: '0'
- marker4: '0'
- marker5: '0'
- marker6: '0'
- marker7: '0'
- marker8: '0'
- marker9: '0'
- name: '""'
- nconnections: '1'
- size: '1024'
- style1: '0'
- style10: '0'
- style2: '0'
- style3: '0'
- style4: '0'
- style5: '0'
- style6: '0'
- style7: '0'
- style8: '0'
- style9: '0'
- tr_chan: '0'
- tr_level: '0.0'
- tr_mode: qtgui.TRIG_MODE_FREE
- tr_slope: qtgui.TRIG_SLOPE_POS
- tr_tag: '""'
- type: complex
- update_time: '0.10'
- width1: '1'
- width10: '1'
- width2: '1'
- width3: '1'
- width4: '1'
- width5: '1'
- width6: '1'
- width7: '1'
- width8: '1'
- width9: '1'
- xmax: '2'
- xmin: '-2'
- ymax: '2'
- ymin: '-2'
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [344, 660.0]
- rotation: 0
- state: true
- name: qtgui_freq_sink_x_0
id: qtgui_freq_sink_x
parameters:
@@ -1669,30 +1519,28 @@ blocks:
state: true
connections:
-- [analog_random_source_x_0, '0', blocks_throttle_0_0, '0']
- [analog_random_source_x_0, '0', blocks_unpack_k_bits_bb_0_0, '0']
+- [analog_random_source_x_0, '0', digital_constellation_modulator_0, '0']
- [blocks_char_to_float_0, '0', qtgui_freq_sink_x_2_1, '0']
- [blocks_char_to_float_0, '0', qtgui_time_sink_x_0, '0']
- [blocks_char_to_float_0_0, '0', blocks_delay_0, '0']
- [blocks_char_to_float_0_1, '0', qtgui_freq_sink_x_2_1, '1']
- [blocks_char_to_float_0_1, '0', qtgui_time_sink_x_0, '2']
- [blocks_delay_0, '0', qtgui_time_sink_x_0, '1']
-- [blocks_throttle_0, '0', fir_filter_xxx_0, '0']
-- [blocks_throttle_0_0, '0', digital_constellation_modulator_0, '0']
+- [blocks_throttle_0, '0', channels_channel_model_0, '0']
- [blocks_unpack_k_bits_bb_0, '0', blocks_char_to_float_0, '0']
- [blocks_unpack_k_bits_bb_0_0, '0', blocks_char_to_float_0_0, '0']
- [blocks_unpack_k_bits_bb_0_1, '0', blocks_char_to_float_0_1, '0']
- [blocks_vector_source_x_0, '0', digital_constellation_modulator_0, '0']
-- [channels_channel_model_0, '0', channels_selective_fading_model2_0, '0']
+- [channels_channel_model_0, '0', channels_selective_fading_model2_1, '0']
- [channels_channel_model_0, '0', channels_selective_fading_model_0, '0']
- [channels_channel_model_0, '0', channels_selective_fading_model_2, '0']
- [channels_channel_model_0, '0', digital_pfb_clock_sync_xxx_0_0, '0']
- [channels_channel_model_0, '0', qtgui_const_sink_x_0, '1']
- [channels_channel_model_0, '0', qtgui_freq_sink_x_0, '1']
-- [channels_selective_fading_model2_0, '0', digital_pfb_clock_sync_xxx_0, '0']
-- [channels_selective_fading_model2_0, '0', qtgui_const_sink_x_0, '0']
-- [channels_selective_fading_model2_0, '0', qtgui_freq_sink_x_0, '0']
-- [channels_selective_fading_model_0, '0', digital_constellation_receiver_cb_0, '0']
+- [channels_selective_fading_model2_1, '0', digital_pfb_clock_sync_xxx_0, '0']
+- [channels_selective_fading_model2_1, '0', qtgui_const_sink_x_0, '0']
+- [channels_selective_fading_model2_1, '0', qtgui_freq_sink_x_0, '0']
- [channels_selective_fading_model_0, '0', digital_pfb_clock_sync_xxx_0, '0']
- [channels_selective_fading_model_0, '0', qtgui_const_sink_x_0, '0']
- [channels_selective_fading_model_0, '0', qtgui_freq_sink_x_0, '0']
@@ -1706,12 +1554,6 @@ connections:
- [digital_constellation_decoder_cb_0, '0', digital_diff_decoder_bb_0, '0']
- [digital_constellation_decoder_cb_0_0, '0', digital_diff_decoder_bb_0_0, '0']
- [digital_constellation_modulator_0, '0', blocks_throttle_0, '0']
-- [digital_constellation_modulator_0, '0', qtgui_const_sink_x_3, '0']
-- [digital_constellation_receiver_cb_0, '0', digital_diff_decoder_bb_0, '0']
-- [digital_constellation_receiver_cb_0, '4', digital_cma_equalizer_cc_0, '0']
-- [digital_constellation_receiver_cb_0, '4', qtgui_const_sink_x_0_0, '0']
-- [digital_constellation_receiver_cb_0, '4', qtgui_const_sink_x_1, '0']
-- [digital_constellation_receiver_cb_0, '4', qtgui_const_sink_x_2, '0']
- [digital_costas_loop_cc_0, '0', digital_constellation_decoder_cb_0, '0']
- [digital_costas_loop_cc_0, '0', qtgui_const_sink_x_2, '0']
- [digital_costas_loop_cc_0_0, '0', digital_constellation_decoder_cb_0_0, '0']
@@ -1724,7 +1566,6 @@ connections:
- [digital_pfb_clock_sync_xxx_0, '0', qtgui_const_sink_x_0_0, '0']
- [digital_pfb_clock_sync_xxx_0_0, '0', digital_cma_equalizer_cc_0_0, '0']
- [digital_pfb_clock_sync_xxx_0_0, '0', qtgui_const_sink_x_0_0, '1']
-- [fir_filter_xxx_0, '0', channels_channel_model_0, '0']
metadata:
file_format: 1