diff options
author | Nao Pross <np@0hm.ch> | 2021-12-04 17:05:29 +0100 |
---|---|---|
committer | Nao Pross <np@0hm.ch> | 2021-12-04 17:05:29 +0100 |
commit | 9d0910c5140b28a84017b9bbb4def22d15425518 (patch) | |
tree | 26836d9005a93afabbb71edd6fddbc194e601a5f /simulation | |
parent | Update documentation (diff) | |
parent | Update net.py to decode UDP data stream (diff) | |
download | Fading-9d0910c5140b28a84017b9bbb4def22d15425518.tar.gz Fading-9d0910c5140b28a84017b9bbb4def22d15425518.zip |
Merge branch 'master' of github.com:NaoPross/Fading
Diffstat (limited to '')
-rw-r--r-- | simulation/QAM_Fading/Alte_versionen/qam_fading_FIR_Filter_v1.grc (renamed from simulation/QAM_Fading/qam_fading_FIR_Filter_v1.grc) | 0 | ||||
-rw-r--r-- | simulation/QAM_Fading/Alte_versionen/qam_fading_V2.grc (renamed from simulation/QAM_Fading/qam_fading_V2.grc) | 0 | ||||
-rw-r--r-- | simulation/QAM_Fading/Alte_versionen/qam_fading_V2_mehrere.grc (renamed from simulation/QAM_Fading/qam_fading_V2_mehrere.grc) | 0 | ||||
-rw-r--r-- | simulation/QAM_Fading/Alte_versionen/qam_fading_frequency_selectiv.grc (renamed from simulation/QAM_Fading/qam_fading_frequency_selectiv_copy.grc) | 20 | ||||
-rw-r--r-- | simulation/QAM_Fading/epy_block_0.py | 74 | ||||
-rwxr-xr-x | simulation/QAM_Fading/qam_fading.py | 4 | ||||
-rw-r--r-- | simulation/QAM_Fading/qam_fading_V2_eigerner_block.grc | 2 | ||||
-rwxr-xr-x | simulation/QAM_Fading/qam_fading_block.py | 2 | ||||
-rw-r--r-- | simulation/QAM_Fading/qam_fading_frequency_selectiv.grc | 20 |
9 files changed, 24 insertions, 98 deletions
diff --git a/simulation/QAM_Fading/qam_fading_FIR_Filter_v1.grc b/simulation/QAM_Fading/Alte_versionen/qam_fading_FIR_Filter_v1.grc index ffc47f6..ffc47f6 100644 --- a/simulation/QAM_Fading/qam_fading_FIR_Filter_v1.grc +++ b/simulation/QAM_Fading/Alte_versionen/qam_fading_FIR_Filter_v1.grc diff --git a/simulation/QAM_Fading/qam_fading_V2.grc b/simulation/QAM_Fading/Alte_versionen/qam_fading_V2.grc index 16fa2e3..16fa2e3 100644 --- a/simulation/QAM_Fading/qam_fading_V2.grc +++ b/simulation/QAM_Fading/Alte_versionen/qam_fading_V2.grc diff --git a/simulation/QAM_Fading/qam_fading_V2_mehrere.grc b/simulation/QAM_Fading/Alte_versionen/qam_fading_V2_mehrere.grc index d5444ad..d5444ad 100644 --- a/simulation/QAM_Fading/qam_fading_V2_mehrere.grc +++ b/simulation/QAM_Fading/Alte_versionen/qam_fading_V2_mehrere.grc diff --git a/simulation/QAM_Fading/qam_fading_frequency_selectiv_copy.grc b/simulation/QAM_Fading/Alte_versionen/qam_fading_frequency_selectiv.grc index a960ec8..fc3cebd 100644 --- a/simulation/QAM_Fading/qam_fading_frequency_selectiv_copy.grc +++ b/simulation/QAM_Fading/Alte_versionen/qam_fading_frequency_selectiv.grc @@ -54,7 +54,7 @@ blocks: rot_sym: '4' soft_dec_lut: None sym_map: '[0, 1, 3, 2]' - type: 16qam + type: qpsk states: bus_sink: false bus_source: false @@ -453,24 +453,24 @@ blocks: - name: channels_selective_fading_model_0 id: channels_selective_fading_model parameters: - K: '1.0' + K: '4.0' LOS: 'False' N: '8' affinity: '' alias: '' comment: '' - delays: (0,7) + delays: (0.0,0.1,1.3) fDTs: '0' - mags: (1,0.2) + mags: (1,0.99,0.97) maxoutbuf: '0' minoutbuf: '0' - ntaps: '2' + ntaps: '4' seed: '0' states: bus_sink: false bus_source: false bus_structure: null - coordinate: [960, 308.0] + coordinate: [944, 316.0] rotation: 0 state: true - name: digital_cma_equalizer_cc_0 @@ -700,7 +700,7 @@ blocks: maxoutbuf: '0' minoutbuf: '0' osps: '1' - sps: 'sps ' + sps: sps * 1.001 taps: rrc_taps type: ccf states: @@ -867,7 +867,7 @@ blocks: bus_sink: false bus_source: false bus_structure: null - coordinate: [1036.0, -64] + coordinate: [1044.0, -48] rotation: 90 state: enabled - name: qtgui_const_sink_x_0_0 @@ -1223,7 +1223,7 @@ blocks: bus_sink: false bus_source: false bus_structure: null - coordinate: [1080.0, 656] + coordinate: [1024.0, 624] rotation: 270 state: true - name: qtgui_freq_sink_x_2_1 @@ -1305,7 +1305,7 @@ blocks: bus_structure: null coordinate: [2848, 488.0] rotation: 0 - state: disabled + state: true - name: qtgui_time_sink_x_0 id: qtgui_time_sink_x parameters: diff --git a/simulation/QAM_Fading/epy_block_0.py b/simulation/QAM_Fading/epy_block_0.py deleted file mode 100644 index 48fe6e9..0000000 --- a/simulation/QAM_Fading/epy_block_0.py +++ /dev/null @@ -1,74 +0,0 @@ -""" -Embedded Python Blocks: - -Each time this file is saved, GRC will instantiate the first class it finds -to get ports and parameters of your block. The arguments to __init__ will -be the parameters. All of them are required to have default values! -""" - -import numpy as np -from numpy.fft import fft,ifft,fftshift -from gnuradio import gr - - -class blk(gr.sync_block): # other base classes are basic_block, decim_block, interp_block - """Embedded Python Block example - a simple multiply const""" - - def __init__(self, amplitudes=[], delays=[], los=True): # only default arguments here - """arguments to this function show up as parameters in GRC""" - gr.sync_block.__init__( - self, - name='Embedded Python Block', # will show up in GRC - in_sig=[np.complex64], - out_sig=[np.complex64] - ) - # if an attribute with the same name as a parameter is found, - # a callback is registered (properties work, too). - self.amplitudes = amplitudes - self.delays = delays - self.temp = [0] - # if los: - # self.amplitudes.append(1) - # self.delays.append(0) - self.los= 1 - #self.fir = - - def work(self, input_items, output_items): - """example: multiply with constant""" - inp = input_items[0] - oup = output_items[0] - - if len(self.amplitudes) != len(self.delays): - raise Exception("Amplitudes and Delay length dont match") - - # raise Exception("Delay length can't be one") - #if np.min(self.delays)<=1: - # raise Exception("Delay length can't be one") - max_len = np.max(self.delays) - sum_x = np.zeros(max_len) - for(a,d) in zip(self.amplitudes,self.delays): - # if d-1 <= 0: - # x = np.concatenate([[a], np.zeros(max_len-1)]) - # else: - x = np.concatenate([np.zeros(d-1), [a], np.zeros(max_len-d)]) - sum_x += x - - sum_x[0] = self.los - print(sum_x) - - #H_int = fft(sum_x) - - #h = ifft(H_int) - - #h[0]=1 - - y = np.convolve(inp, sum_x) - - y+=np.concatenate([self.temp,np.zeros(len(y)-len(self.temp))]) - - - oup[:] = y[:len(inp)] - self.temp = y[len(inp):] - - - return len(oup)
\ No newline at end of file diff --git a/simulation/QAM_Fading/qam_fading.py b/simulation/QAM_Fading/qam_fading.py index 42199d1..30f2262 100755 --- a/simulation/QAM_Fading/qam_fading.py +++ b/simulation/QAM_Fading/qam_fading.py @@ -88,7 +88,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_16qam().base() + self.const = const = digital.constellation_qpsk().base() self.chn_taps = chn_taps = [1.0 + 0.0j, ] ################################################## @@ -456,7 +456,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, 0, False, 1.0, 0, (0,7), (1,0.2), 2 ) + self.channels_selective_fading_model_0 = channels.selective_fading_model( 8, 0, True, 4, 0, (0,0.3e-6), (1,0.39), 3 ) self.channels_channel_model_0 = channels.channel_model( noise_voltage=noise_volt, frequency_offset=freq_offset, diff --git a/simulation/QAM_Fading/qam_fading_V2_eigerner_block.grc b/simulation/QAM_Fading/qam_fading_V2_eigerner_block.grc index 641d78e..42a922b 100644 --- a/simulation/QAM_Fading/qam_fading_V2_eigerner_block.grc +++ b/simulation/QAM_Fading/qam_fading_V2_eigerner_block.grc @@ -811,7 +811,7 @@ blocks: amplitudes: '[amp_1]' comment: '' delays: '[fading_1]' - los: 'False' + los: 'True' maxoutbuf: '0' minoutbuf: '0' states: diff --git a/simulation/QAM_Fading/qam_fading_block.py b/simulation/QAM_Fading/qam_fading_block.py index 89c4a32..416799c 100755 --- a/simulation/QAM_Fading/qam_fading_block.py +++ b/simulation/QAM_Fading/qam_fading_block.py @@ -505,7 +505,7 @@ class qam_fading_block(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.fadingui_multipath_fading_0 = fadingui.multipath_fading(amplitudes=[amp_1], delays=[fading_1], los =False) + self.fadingui_multipath_fading_0 = fadingui.multipath_fading(amplitudes=[amp_1], delays=[fading_1], los =True) 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]) diff --git a/simulation/QAM_Fading/qam_fading_frequency_selectiv.grc b/simulation/QAM_Fading/qam_fading_frequency_selectiv.grc index fc3cebd..ce87db8 100644 --- a/simulation/QAM_Fading/qam_fading_frequency_selectiv.grc +++ b/simulation/QAM_Fading/qam_fading_frequency_selectiv.grc @@ -453,24 +453,24 @@ blocks: - name: channels_selective_fading_model_0 id: channels_selective_fading_model parameters: - K: '4.0' - LOS: 'False' + K: '4' + LOS: 'True' N: '8' affinity: '' alias: '' comment: '' - delays: (0.0,0.1,1.3) + delays: (0,0.3e-6) fDTs: '0' - mags: (1,0.99,0.97) + mags: (1,0.39) maxoutbuf: '0' minoutbuf: '0' - ntaps: '4' + ntaps: '3' seed: '0' states: bus_sink: false bus_source: false bus_structure: null - coordinate: [944, 316.0] + coordinate: [976, 308.0] rotation: 0 state: true - name: digital_cma_equalizer_cc_0 @@ -700,7 +700,7 @@ blocks: maxoutbuf: '0' minoutbuf: '0' osps: '1' - sps: sps * 1.001 + sps: 'sps ' taps: rrc_taps type: ccf states: @@ -867,7 +867,7 @@ blocks: bus_sink: false bus_source: false bus_structure: null - coordinate: [1044.0, -48] + coordinate: [1036.0, -64] rotation: 90 state: enabled - name: qtgui_const_sink_x_0_0 @@ -1223,7 +1223,7 @@ blocks: bus_sink: false bus_source: false bus_structure: null - coordinate: [1024.0, 624] + coordinate: [1080.0, 656] rotation: 270 state: true - name: qtgui_freq_sink_x_2_1 @@ -1305,7 +1305,7 @@ blocks: bus_structure: null coordinate: [2848, 488.0] rotation: 0 - state: true + state: disabled - name: qtgui_time_sink_x_0 id: qtgui_time_sink_x parameters: |