From 57cac49a0b3b0378245f02903d6bfdeaf58980da Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Mon, 20 Dec 2021 22:57:10 +0100 Subject: Add data and flowgraph for (broken) QAM on hardware --- flowgraphs/qam_sim.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'flowgraphs/qam_sim.py') diff --git a/flowgraphs/qam_sim.py b/flowgraphs/qam_sim.py index 4d65f2c..d3b6580 100755 --- a/flowgraphs/qam_sim.py +++ b/flowgraphs/qam_sim.py @@ -210,6 +210,14 @@ class qam_sim(gr.top_block, Qt.QWidget): self.blocks_stream_mux_0 = blocks.stream_mux(gr.sizeof_char*1, [len(testvec), 4, 0]) self.blocks_repack_bits_bb_0 = blocks.repack_bits_bb(2, 8, "", False, gr.GR_LSB_FIRST) self.blocks_null_source_0 = blocks.null_source(gr.sizeof_char*1) + self.blocks_file_sink_3 = blocks.file_sink(gr.sizeof_gr_complex*1, 'data/locked_qam_sim.dat', False) + self.blocks_file_sink_3.set_unbuffered(False) + self.blocks_file_sink_2 = blocks.file_sink(gr.sizeof_gr_complex*1, 'data/equalized_qam_sim.dat', False) + self.blocks_file_sink_2.set_unbuffered(False) + self.blocks_file_sink_1 = blocks.file_sink(gr.sizeof_gr_complex*1, 'data/synchronized_qam_sim.dat', False) + self.blocks_file_sink_1.set_unbuffered(False) + self.blocks_file_sink_0 = blocks.file_sink(gr.sizeof_gr_complex*1, 'data/channel_qam_sim.dat', False) + self.blocks_file_sink_0.set_unbuffered(False) self.blocks_complex_to_mag_0 = blocks.complex_to_mag(1) self.analog_random_source_x_0 = blocks.vector_source_b(list(map(int, numpy.random.randint(0, 255, 400))), True) @@ -228,18 +236,22 @@ class qam_sim(gr.top_block, Qt.QWidget): self.connect((self.blocks_throttle_0, 0), (self.channels_channel_model_0, 0)) self.connect((self.blocks_vector_source_x_0, 0), (self.blocks_stream_mux_0, 0)) self.connect((self.channels_channel_model_0, 0), (self.channels_selective_fading_model_0, 0)) + self.connect((self.channels_selective_fading_model_0, 0), (self.blocks_file_sink_0, 0)) self.connect((self.channels_selective_fading_model_0, 0), (self.digital_pfb_clock_sync_xxx_0, 0)) self.connect((self.channels_selective_fading_model_0, 0), (self.fadingui_netsink_0, 0)) self.connect((self.digital_constellation_decoder_cb_0, 0), (self.blocks_tagged_stream_align_0, 0)) self.connect((self.digital_constellation_modulator_0, 0), (self.blocks_throttle_0, 0)) self.connect((self.digital_corr_est_cc_0, 1), (self.blocks_complex_to_mag_0, 0)) self.connect((self.digital_corr_est_cc_0, 0), (self.fadingui_phasecorrection_0, 0)) + self.connect((self.digital_lms_dd_equalizer_cc_0, 0), (self.blocks_file_sink_2, 0)) self.connect((self.digital_lms_dd_equalizer_cc_0, 0), (self.digital_corr_est_cc_0, 0)) self.connect((self.digital_lms_dd_equalizer_cc_0, 0), (self.fadingui_netsink_1, 0)) self.connect((self.digital_lms_dd_equalizer_cc_0, 0), (self.qtgui_const_sink_x_0, 1)) + self.connect((self.digital_pfb_clock_sync_xxx_0, 0), (self.blocks_file_sink_1, 0)) self.connect((self.digital_pfb_clock_sync_xxx_0, 0), (self.digital_lms_dd_equalizer_cc_0, 0)) self.connect((self.digital_pfb_clock_sync_xxx_0, 0), (self.fadingui_netsink_4, 0)) self.connect((self.digital_pfb_clock_sync_xxx_0, 0), (self.qtgui_const_sink_x_0, 0)) + self.connect((self.fadingui_phasecorrection_0, 0), (self.blocks_file_sink_3, 0)) self.connect((self.fadingui_phasecorrection_0, 0), (self.digital_constellation_decoder_cb_0, 0)) self.connect((self.fadingui_phasecorrection_0, 0), (self.fadingui_netsink_3, 0)) self.connect((self.fadingui_phasecorrection_0, 0), (self.qtgui_const_sink_x_0, 2)) -- cgit v1.2.1 From 1de862c5e2ac6e2baa76daf9fbe6b64050da12fc Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Tue, 21 Dec 2021 00:32:06 +0100 Subject: Add more data for QAM, fix colormap --- flowgraphs/qam_sim.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'flowgraphs/qam_sim.py') diff --git a/flowgraphs/qam_sim.py b/flowgraphs/qam_sim.py index d3b6580..3a218f3 100755 --- a/flowgraphs/qam_sim.py +++ b/flowgraphs/qam_sim.py @@ -195,7 +195,7 @@ class qam_sim(gr.top_block, Qt.QWidget): verbose=False, log=False) self.digital_constellation_decoder_cb_0 = digital.constellation_decoder_cb(qam_const) - self.channels_selective_fading_model_0 = channels.selective_fading_model( 8, ((2*carrier_freq)/(3*10e8))/samp_rate, False, 4.0, 21, (0,1.8), (1,0.12), 8 ) + self.channels_selective_fading_model_0 = channels.selective_fading_model( 8, 70/samp_rate, False, 5, 21, (0,0.05e-6/samp_rate,0.12e-6/samp_rate,0.2e-6/samp_rate,0.23e-6/samp_rate,0.5e-6/samp_rate,1.6e-6/samp_rate,2.3e-6/samp_rate,5e-6/samp_rate), (0.7943282347242815,0.7943282347242815,0.7943282347242815,1,1,1,0.5011872336272722,0.31622776601683794,0.19952623149688797), 9 ) self.channels_channel_model_0 = channels.channel_model( noise_voltage=100e-3, frequency_offset=1e-3, @@ -298,7 +298,7 @@ class qam_sim(gr.top_block, Qt.QWidget): def set_samp_rate(self, samp_rate): self.samp_rate = samp_rate self.blocks_throttle_0.set_sample_rate(self.samp_rate) - self.channels_selective_fading_model_0.set_fDTs(((2*self.carrier_freq)/(3*10e8))/self.samp_rate) + self.channels_selective_fading_model_0.set_fDTs(70/self.samp_rate) self.qtgui_time_sink_x_0.set_samp_rate(self.samp_rate / self.sps) def get_rrc_taps(self): @@ -325,7 +325,6 @@ class qam_sim(gr.top_block, Qt.QWidget): def set_carrier_freq(self, carrier_freq): self.carrier_freq = carrier_freq - self.channels_selective_fading_model_0.set_fDTs(((2*self.carrier_freq)/(3*10e8))/self.samp_rate) def get_access_code(self): return self.access_code -- cgit v1.2.1