aboutsummaryrefslogtreecommitdiffstats
path: root/simulation/QAM_Fading
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xsimulation/QAM_Fading/qam_fading.py24
-rw-r--r--simulation/QAM_Fading/qam_fading_V2.grc45
2 files changed, 32 insertions, 37 deletions
diff --git a/simulation/QAM_Fading/qam_fading.py b/simulation/QAM_Fading/qam_fading.py
index d6ace52..063c91b 100755
--- a/simulation/QAM_Fading/qam_fading.py
+++ b/simulation/QAM_Fading/qam_fading.py
@@ -37,6 +37,7 @@ from argparse import ArgumentParser
from gnuradio.eng_arg import eng_float, intx
from gnuradio import eng_notation
from gnuradio.qtgui import Range, RangeWidget
+import numpy as np
from gnuradio import qtgui
@@ -160,7 +161,7 @@ class qam_fading(gr.top_block, Qt.QWidget):
self.params_grid_layout_0.setRowStretch(r, 1)
for c in range(0, 1):
self.params_grid_layout_0.setColumnStretch(c, 1)
- self._fading_1_range = Range(1, 10, 1, 2, 200)
+ self._fading_1_range = Range(1, 30, 1, 2, 200)
self._fading_1_win = RangeWidget(self._fading_1_range, self.set_fading_1, 'Fading', "counter_slider", int)
self.params_grid_layout_0.addWidget(self._fading_1_win, 2, 0, 1, 1)
for r in range(2, 3):
@@ -490,7 +491,8 @@ class qam_fading(gr.top_block, Qt.QWidget):
self.plots_grid_layout_0.setRowStretch(r, 1)
for c in range(0, 1):
self.plots_grid_layout_0.setColumnStretch(c, 1)
- self.freq_xlating_fir_filter_xxx_0 = filter.freq_xlating_fir_filter_ccc(1, [1]+([0]*fading_1)+[0.2], 0, samp_rate)
+ self.interp_fir_filter_xxx_0 = filter.interp_fir_filter_ccc(1, [1]+([0]*fading_1)+[0.2])
+ self.interp_fir_filter_xxx_0.declare_sample_delay(0)
self.digital_pfb_clock_sync_xxx_0_0 = digital.pfb_clock_sync_ccf(sps , timing_loop_bw, rrc_taps, nfilts, nfilts/2, 1.5, 1)
self.digital_pfb_clock_sync_xxx_0 = digital.pfb_clock_sync_ccf(sps, timing_loop_bw, rrc_taps, nfilts, nfilts/2, 1.5, 1)
self.digital_map_bb_0_0 = digital.map_bb([0, 1, 3, 2])
@@ -546,7 +548,7 @@ class qam_fading(gr.top_block, Qt.QWidget):
self.connect((self.blocks_unpack_k_bits_bb_0_0, 0), (self.blocks_char_to_float_0_0, 0))
self.connect((self.blocks_unpack_k_bits_bb_0_1, 0), (self.blocks_char_to_float_0_1, 0))
self.connect((self.channels_channel_model_0, 0), (self.digital_pfb_clock_sync_xxx_0_0, 0))
- self.connect((self.channels_channel_model_0, 0), (self.freq_xlating_fir_filter_xxx_0, 0))
+ self.connect((self.channels_channel_model_0, 0), (self.interp_fir_filter_xxx_0, 0))
self.connect((self.channels_channel_model_0, 0), (self.qtgui_const_sink_x_0, 1))
self.connect((self.channels_channel_model_0, 0), (self.qtgui_freq_sink_x_0, 1))
self.connect((self.digital_cma_equalizer_cc_0, 0), (self.digital_costas_loop_cc_0, 0))
@@ -568,9 +570,9 @@ class qam_fading(gr.top_block, Qt.QWidget):
self.connect((self.digital_pfb_clock_sync_xxx_0, 0), (self.qtgui_const_sink_x_0_0, 0))
self.connect((self.digital_pfb_clock_sync_xxx_0_0, 0), (self.digital_cma_equalizer_cc_0_0, 0))
self.connect((self.digital_pfb_clock_sync_xxx_0_0, 0), (self.qtgui_const_sink_x_0_0, 1))
- self.connect((self.freq_xlating_fir_filter_xxx_0, 0), (self.digital_pfb_clock_sync_xxx_0, 0))
- self.connect((self.freq_xlating_fir_filter_xxx_0, 0), (self.qtgui_const_sink_x_0, 0))
- self.connect((self.freq_xlating_fir_filter_xxx_0, 0), (self.qtgui_freq_sink_x_0, 0))
+ self.connect((self.interp_fir_filter_xxx_0, 0), (self.digital_pfb_clock_sync_xxx_0, 0))
+ self.connect((self.interp_fir_filter_xxx_0, 0), (self.qtgui_const_sink_x_0, 0))
+ self.connect((self.interp_fir_filter_xxx_0, 0), (self.qtgui_freq_sink_x_0, 0))
def closeEvent(self, event):
@@ -659,7 +661,7 @@ class qam_fading(gr.top_block, Qt.QWidget):
def set_fading_1(self, fading_1):
self.fading_1 = fading_1
- self.freq_xlating_fir_filter_xxx_0.set_taps([1]+([0]*self.fading_1)+[0.2])
+ self.interp_fir_filter_xxx_0.set_taps([1]+([0]*self.fading_1)+[0.2])
def get_eq_ntaps(self):
return self.eq_ntaps
@@ -696,12 +698,6 @@ class qam_fading(gr.top_block, Qt.QWidget):
self.chn_taps = chn_taps
self.channels_channel_model_0.set_taps(self.chn_taps)
-def snipfcn_snippet_0(self):
- import numpy as np
-
-
-def snippets_main_after_init(tb):
- snipfcn_snippet_0(tb)
@@ -716,7 +712,7 @@ def main(top_block_cls=qam_fading, options=None):
qapp = Qt.QApplication(sys.argv)
tb = top_block_cls()
- snippets_main_after_init(tb)
+
tb.start()
tb.show()
diff --git a/simulation/QAM_Fading/qam_fading_V2.grc b/simulation/QAM_Fading/qam_fading_V2.grc
index ab70648..d45e030 100644
--- a/simulation/QAM_Fading/qam_fading_V2.grc
+++ b/simulation/QAM_Fading/qam_fading_V2.grc
@@ -130,14 +130,14 @@ blocks:
rangeType: int
start: '1'
step: '1'
- stop: '10'
+ stop: '30'
value: '2'
widget: counter_slider
states:
bus_sink: false
bus_source: false
bus_structure: null
- coordinate: [976, 308.0]
+ coordinate: [992, 476.0]
rotation: 0
state: true
- name: freq_offset
@@ -506,7 +506,7 @@ blocks:
bus_sink: false
bus_source: false
bus_structure: null
- coordinate: [1544, 824.0]
+ coordinate: [1536, 788.0]
rotation: 0
state: true
- name: digital_constellation_decoder_cb_0
@@ -708,37 +708,36 @@ blocks:
coordinate: [1096, 812.0]
rotation: 0
state: true
-- name: freq_xlating_fir_filter_xxx_0
- id: freq_xlating_fir_filter_xxx
+- name: import_0
+ id: import
parameters:
- affinity: ''
alias: ''
- center_freq: '0'
comment: ''
- decim: '1'
- maxoutbuf: '0'
- minoutbuf: '0'
- samp_rate: samp_rate
- taps: '[1]+([0]*fading_1)+[0.2]'
- type: ccc
+ imports: import numpy as np
states:
bus_sink: false
bus_source: false
bus_structure: null
- coordinate: [976, 204.0]
+ coordinate: [600, 20.0]
rotation: 0
state: true
-- name: import_0
- id: import
+- name: interp_fir_filter_xxx_0
+ id: interp_fir_filter_xxx
parameters:
+ affinity: ''
alias: ''
comment: ''
- imports: import numpy as np
+ interp: '1'
+ maxoutbuf: '0'
+ minoutbuf: '0'
+ samp_delay: '0'
+ taps: '[1]+([0]*fading_1)+[0.2]'
+ type: ccc
states:
bus_sink: false
bus_source: false
bus_structure: null
- coordinate: [600, 20.0]
+ coordinate: [968, 348.0]
rotation: 0
state: true
- name: params
@@ -898,7 +897,7 @@ blocks:
bus_sink: false
bus_source: false
bus_structure: null
- coordinate: [812.0, -96]
+ coordinate: [884.0, -112]
rotation: 90
state: enabled
- name: qtgui_const_sink_x_0_0
@@ -1449,7 +1448,7 @@ connections:
- [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']
- [channels_channel_model_0, '0', digital_pfb_clock_sync_xxx_0_0, '0']
-- [channels_channel_model_0, '0', freq_xlating_fir_filter_xxx_0, '0']
+- [channels_channel_model_0, '0', interp_fir_filter_xxx_0, '0']
- [channels_channel_model_0, '0', qtgui_const_sink_x_0, '1']
- [channels_channel_model_0, '0', qtgui_freq_sink_x_0, '1']
- [digital_cma_equalizer_cc_0, '0', digital_costas_loop_cc_0, '0']
@@ -1471,9 +1470,9 @@ 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']
-- [freq_xlating_fir_filter_xxx_0, '0', digital_pfb_clock_sync_xxx_0, '0']
-- [freq_xlating_fir_filter_xxx_0, '0', qtgui_const_sink_x_0, '0']
-- [freq_xlating_fir_filter_xxx_0, '0', qtgui_freq_sink_x_0, '0']
+- [interp_fir_filter_xxx_0, '0', digital_pfb_clock_sync_xxx_0, '0']
+- [interp_fir_filter_xxx_0, '0', qtgui_const_sink_x_0, '0']
+- [interp_fir_filter_xxx_0, '0', qtgui_freq_sink_x_0, '0']
metadata:
file_format: 1