From 1a9a1e15cfe63e0fb231d7be27487c0aab078fb3 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 25 Nov 2009 16:51:24 -0800 Subject: added wrappers for the dxpsk2 blocks mod and demod --- grc/blocks/Makefile.am | 2 ++ grc/blocks/blks2_dxpsk_demod.xml | 2 +- grc/blocks/blks2_dxpsk_mod.xml | 2 +- grc/blocks/block_tree.xml | 3 +++ 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/grc/blocks/Makefile.am b/grc/blocks/Makefile.am index e436cc764..9c91af543 100644 --- a/grc/blocks/Makefile.am +++ b/grc/blocks/Makefile.am @@ -34,6 +34,8 @@ dist_ourdata_DATA = \ blks2_cvsd_decode.xml \ blks2_dxpsk_demod.xml \ blks2_dxpsk_mod.xml \ + blks2_dxpsk2_demod.xml \ + blks2_dxpsk2_mod.xml \ blks2_error_rate.xml \ blks2_fm_deemph.xml \ blks2_fm_demod_cf.xml \ diff --git a/grc/blocks/blks2_dxpsk_demod.xml b/grc/blocks/blks2_dxpsk_demod.xml index 4c13b3415..1c96b6cec 100644 --- a/grc/blocks/blks2_dxpsk_demod.xml +++ b/grc/blocks/blks2_dxpsk_demod.xml @@ -76,7 +76,7 @@ Gray Code gray_code True - enum + bool + + Sync Out + sync_out + False + bool + + + in complex @@ -119,4 +134,9 @@ out byte + + sync + complex + 1 + -- cgit From 2ff1da1f41d9604155cdec90a7b4aa992330e3bf Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 25 Nov 2009 20:09:07 -0800 Subject: added callbacks for setting alphas --- grc/blocks/blks2_dxpsk2_demod.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/grc/blocks/blks2_dxpsk2_demod.xml b/grc/blocks/blks2_dxpsk2_demod.xml index c1af5368e..ce8305c50 100644 --- a/grc/blocks/blks2_dxpsk2_demod.xml +++ b/grc/blocks/blks2_dxpsk2_demod.xml @@ -19,6 +19,9 @@ log=$log, sync_out=$sync_out, ) + clock_recov.set_alpha($costas_alpha) + clock_recov.set_beta(0.25*$costas_alpha**2) + time_recov.set_alpha($timing_alpha) Type type -- cgit From 6af2c9c58cc6afcab371b769da5738c1f52fc969 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 25 Nov 2009 20:49:27 -0800 Subject: created dpsk demo with usrps --- gnuradio-examples/grc/Makefile.am | 2 + gnuradio-examples/grc/usrp/usrp_rx_dpsk.grc | 635 ++++++++++++++++++++++++++++ gnuradio-examples/grc/usrp/usrp_tx_dpsk.grc | 583 +++++++++++++++++++++++++ 3 files changed, 1220 insertions(+) create mode 100644 gnuradio-examples/grc/usrp/usrp_rx_dpsk.grc create mode 100644 gnuradio-examples/grc/usrp/usrp_tx_dpsk.grc diff --git a/gnuradio-examples/grc/Makefile.am b/gnuradio-examples/grc/Makefile.am index 97417c5a2..f8a26bace 100644 --- a/gnuradio-examples/grc/Makefile.am +++ b/gnuradio-examples/grc/Makefile.am @@ -49,6 +49,8 @@ usrpdatadir = $(grc_examples_prefix)/usrp dist_usrpdata_DATA = \ usrp/usrp2_const_wave.grc \ usrp/usrp2_dpsk_mod.grc \ + usrp/usrp_rx_dpsk.grc \ + usrp/usrp_tx_dpsk.grc \ usrp/usrp2_fft.grc \ usrp/usrp_two_tone_loopback.grc \ usrp/usrp_wbfm_receive.grc diff --git a/gnuradio-examples/grc/usrp/usrp_rx_dpsk.grc b/gnuradio-examples/grc/usrp/usrp_rx_dpsk.grc new file mode 100644 index 000000000..9b869687a --- /dev/null +++ b/gnuradio-examples/grc/usrp/usrp_rx_dpsk.grc @@ -0,0 +1,635 @@ + + + Wed Nov 25 20:45:31 2009 + + options + + id + usrp_rx_dpsk + + + _enabled + True + + + title + USRP RX DPSK + + + author + + + + description + + + + window_size + 1280, 1024 + + + generate_options + wx_gui + + + category + Custom + + + run_options + prompt + + + run + True + + + realtime_scheduling + + + + _coordinate + (12, 9) + + + _rotation + 0 + + + + variable + + id + samps_per_sym + + + _enabled + True + + + value + 4 + + + _coordinate + (14, 79) + + + _rotation + 0 + + + + variable + + id + bb_freq + + + _enabled + True + + + value + 2.45e9 + + + _coordinate + (18, 151) + + + _rotation + 0 + + + + variable + + id + samp_rate + + + _enabled + True + + + value + 1e6 + + + _coordinate + (20, 234) + + + _rotation + 0 + + + + usrp2_source_xxxx + + id + usrp2_source_xxxx_0 + + + _enabled + True + + + type + complex + + + interface + + + + mac_addr + + + + decimation + int(100e6/samp_rate) + + + frequency + bb_freq + + + lo_offset + float('inf') + + + gain + 0 + + + _coordinate + (158, 51) + + + _rotation + 0 + + + + blks2_dxpsk2_demod + + id + blks2_dxpsk2_demod_0 + + + _enabled + True + + + type + dqpsk + + + samples_per_symbol + samps_per_sym + + + excess_bw + 0.35 + + + costas_alpha + costas_alpha + + + timing_alpha + timing_alpha + + + timing_max_dev + 1.5 + + + omega_relative_limit + 0.005 + + + gray_code + True + + + verbose + False + + + log + False + + + sync_out + True + + + _coordinate + (488, 65) + + + _rotation + 0 + + + + variable + + id + p2p + + + _enabled + True + + + value + 2.0 + + + _coordinate + (13, 314) + + + _rotation + 0 + + + + wxgui_scopesink2 + + id + wxgui_scopesink2_0 + + + _enabled + True + + + type + complex + + + title + Recovered DQPSK Constellation + + + samp_rate + samp_rate + + + v_scale + 0 + + + v_offset + 0 + + + t_scale + 0 + + + ac_couple + False + + + xy_mode + True + + + num_inputs + 1 + + + win_size + + + + grid_pos + + + + notebook + + + + _coordinate + (747, 237) + + + _rotation + 0 + + + + variable_slider + + id + timing_alpha + + + _enabled + True + + + label + Timing Alpha + + + value + .1 + + + min + 0 + + + max + .5 + + + num_steps + 100 + + + style + wx.SL_HORIZONTAL + + + converver + float_converter + + + grid_pos + + + + notebook + + + + _coordinate + (759, 365) + + + _rotation + 0 + + + + gr_null_sink + + id + gr_null_sink_0 + + + _enabled + True + + + type + byte + + + vlen + 1 + + + _coordinate + (815, 80) + + + _rotation + 0 + + + + variable_slider + + id + costas_alpha + + + _enabled + True + + + label + Costas Alpha + + + value + 0.175 + + + min + 0 + + + max + .5 + + + num_steps + 100 + + + style + wx.SL_HORIZONTAL + + + converver + float_converter + + + grid_pos + + + + notebook + + + + _coordinate + (598, 367) + + + _rotation + 0 + + + + usrp_simple_source_x + + id + usrp_simple_source_x_0 + + + _enabled + False + + + type + complex + + + format + + + + which + 0 + + + decimation + int(64e6/samp_rate) + + + frequency + bb_freq + + + lo_offset + float('inf') + + + gain + 0 + + + side + B + + + rx_ant + TX/RX + + + hb_filters + + + + _coordinate + (154, 218) + + + _rotation + 0 + + + + wxgui_fftsink2 + + id + wxgui_fftsink2_0 + + + _enabled + True + + + type + complex + + + title + Receive Spectrum + + + samp_rate + samp_rate + + + baseband_freq + bb_freq + + + y_per_div + 10 + + + y_divs + 10 + + + ref_level + -40 + + + ref_scale + p2p + + + fft_size + 1024 + + + fft_rate + 20 + + + peak_hold + False + + + average + False + + + avg_alpha + 0 + + + win + None + + + win_size + + + + grid_pos + + + + notebook + + + + _coordinate + (383, 321) + + + _rotation + 0 + + + + usrp2_source_xxxx_0 + wxgui_fftsink2_0 + 0 + 0 + + + usrp2_source_xxxx_0 + blks2_dxpsk2_demod_0 + 0 + 0 + + + blks2_dxpsk2_demod_0 + gr_null_sink_0 + 0 + 0 + + + blks2_dxpsk2_demod_0 + wxgui_scopesink2_0 + 1 + 0 + + diff --git a/gnuradio-examples/grc/usrp/usrp_tx_dpsk.grc b/gnuradio-examples/grc/usrp/usrp_tx_dpsk.grc new file mode 100644 index 000000000..c710dbb24 --- /dev/null +++ b/gnuradio-examples/grc/usrp/usrp_tx_dpsk.grc @@ -0,0 +1,583 @@ + + + Wed Nov 25 20:45:29 2009 + + options + + id + usrp_tx_dpsk + + + _enabled + True + + + title + USRP TX DPSK + + + author + + + + description + + + + window_size + 1280, 1024 + + + generate_options + wx_gui + + + category + Custom + + + run_options + prompt + + + run + True + + + realtime_scheduling + + + + _coordinate + (10, 10) + + + _rotation + 0 + + + + variable + + id + samps_per_sym + + + _enabled + True + + + value + 4 + + + _coordinate + (15, 76) + + + _rotation + 0 + + + + variable + + id + samp_rate + + + _enabled + True + + + value + 1e6 + + + _coordinate + (12, 207) + + + _rotation + 0 + + + + random_source_x + + id + random_source_x_0 + + + _enabled + True + + + type + byte + + + min + 0 + + + max + 2**8 + + + num_samps + 1000 + + + repeat + True + + + _coordinate + (23, 319) + + + _rotation + 0 + + + + blks2_dxpsk2_mod + + id + blks2_dxpsk2_mod_0 + + + _enabled + True + + + type + dqpsk + + + samples_per_symbol + samps_per_sym + + + excess_bw + 0.35 + + + gray_code + True + + + verbose + False + + + log + False + + + _coordinate + (234, 151) + + + _rotation + 0 + + + + usrp_simple_sink_x + + id + usrp_simple_sink_x_0 + + + _enabled + True + + + type + complex + + + which + 0 + + + interpolation + int(128e6/samp_rate) + + + frequency + bb_freq + + + lo_offset + float('inf') + + + gain + 0 + + + side + A + + + transmit + auto_tr + + + _coordinate + (516, 203) + + + _rotation + 0 + + + + usrp2_sink_xxxx + + id + usrp2_sink_xxxx_0 + + + _enabled + False + + + type + complex + + + interface + + + + mac_addr + + + + interpolation + int(100e6/samp_rate) + + + frequency + bb_freq + + + lo_offset + float('inf') + + + gain + 0 + + + _coordinate + (498, 51) + + + _rotation + 0 + + + + variable_slider + + id + tx_ampl + + + _enabled + True + + + label + TX Amplitude + + + value + .2 + + + min + 0 + + + max + 1 + + + num_steps + 100 + + + style + wx.SL_HORIZONTAL + + + converver + float_converter + + + grid_pos + + + + notebook + + + + _coordinate + (277, 491) + + + _rotation + 0 + + + + variable + + id + bb_freq + + + _enabled + True + + + value + 2.45e9+freq_off + + + _coordinate + (14, 141) + + + _rotation + 0 + + + + variable_slider + + id + freq_off + + + _enabled + True + + + label + Frequency Offset + + + value + 0 + + + min + -samp_rate/2 + + + max + samp_rate/2 + + + num_steps + 100 + + + style + wx.SL_HORIZONTAL + + + converver + float_converter + + + grid_pos + + + + notebook + + + + _coordinate + (63, 483) + + + _rotation + 0 + + + + variable + + id + p2p + + + _enabled + True + + + value + 2**15 + + + _coordinate + (179, 37) + + + _rotation + 0 + + + + gr_multiply_const_vxx + + id + gr_multiply_const_vxx_0 + + + _enabled + True + + + type + complex + + + const + tx_ampl*p2p/2. + + + vlen + 1 + + + _coordinate + (306, 355) + + + _rotation + 0 + + + + wxgui_fftsink2 + + id + wxgui_fftsink2_0 + + + _enabled + True + + + type + complex + + + title + Transmit Spectrum + + + samp_rate + samp_rate + + + baseband_freq + bb_freq + + + y_per_div + 10 + + + y_divs + 10 + + + ref_level + 0 + + + ref_scale + p2p + + + fft_size + 1024 + + + fft_rate + 20 + + + peak_hold + False + + + average + False + + + avg_alpha + 0 + + + win + None + + + win_size + + + + grid_pos + + + + notebook + + + + _coordinate + (576, 410) + + + _rotation + 0 + + + + random_source_x_0 + blks2_dxpsk2_mod_0 + 0 + 0 + + + blks2_dxpsk2_mod_0 + gr_multiply_const_vxx_0 + 0 + 0 + + + gr_multiply_const_vxx_0 + usrp_simple_sink_x_0 + 0 + 0 + + + gr_multiply_const_vxx_0 + wxgui_fftsink2_0 + 0 + 0 + + -- cgit From 5a8e6229298d89ccf527a4d8894e0c654dea39d9 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Thu, 3 Dec 2009 16:24:50 -0500 Subject: updated tx example --- gnuradio-examples/grc/usrp/usrp_tx_dpsk.grc | 48 ++++++++++++++--------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/gnuradio-examples/grc/usrp/usrp_tx_dpsk.grc b/gnuradio-examples/grc/usrp/usrp_tx_dpsk.grc index c710dbb24..90ec5e910 100644 --- a/gnuradio-examples/grc/usrp/usrp_tx_dpsk.grc +++ b/gnuradio-examples/grc/usrp/usrp_tx_dpsk.grc @@ -1,6 +1,6 @@ - Wed Nov 25 20:45:29 2009 + Thu Dec 3 11:42:41 2009 options @@ -79,29 +79,6 @@ 0 - - variable - - id - samp_rate - - - _enabled - True - - - value - 1e6 - - - _coordinate - (12, 207) - - - _rotation - 0 - - random_source_x @@ -556,6 +533,29 @@ 0 + + variable + + id + samp_rate + + + _enabled + True + + + value + 1e6/4 + + + _coordinate + (12, 207) + + + _rotation + 0 + + random_source_x_0 blks2_dxpsk2_mod_0 -- cgit From a903212f60d9bc4f3a5b34ae47fe54cdb2db0ce0 Mon Sep 17 00:00:00 2001 From: Matt Ettus Date: Thu, 3 Dec 2009 08:27:05 -0800 Subject: added a gain slider --- gnuradio-examples/grc/usrp/usrp_rx_dpsk.grc | 416 +++++++++++++++++----------- 1 file changed, 254 insertions(+), 162 deletions(-) diff --git a/gnuradio-examples/grc/usrp/usrp_rx_dpsk.grc b/gnuradio-examples/grc/usrp/usrp_rx_dpsk.grc index 9b869687a..9843ee6b0 100644 --- a/gnuradio-examples/grc/usrp/usrp_rx_dpsk.grc +++ b/gnuradio-examples/grc/usrp/usrp_rx_dpsk.grc @@ -1,6 +1,6 @@ - Wed Nov 25 20:45:31 2009 + Wed Dec 2 11:03:20 2009 options @@ -106,7 +106,7 @@ variable id - samp_rate + p2p _enabled @@ -114,11 +114,11 @@ value - 1e6 + 2.0 _coordinate - (20, 234) + (13, 314) _rotation @@ -126,46 +126,54 @@ - usrp2_source_xxxx + variable_slider id - usrp2_source_xxxx_0 + timing_alpha _enabled True - type - complex + label + Timing Alpha - interface - + value + .1 - mac_addr - + min + 0 - decimation - int(100e6/samp_rate) + max + .5 - frequency - bb_freq + num_steps + 100 - lo_offset - float('inf') + style + wx.SL_HORIZONTAL - gain - 0 + converver + float_converter + + + grid_pos + + + + notebook + _coordinate - (158, 51) + (759, 365) _rotation @@ -173,10 +181,10 @@ - blks2_dxpsk2_demod + gr_null_sink id - blks2_dxpsk2_demod_0 + gr_null_sink_0 _enabled @@ -184,74 +192,70 @@ type - dqpsk - - - samples_per_symbol - samps_per_sym + byte - excess_bw - 0.35 + vlen + 1 - costas_alpha - costas_alpha + _coordinate + (815, 80) - timing_alpha - timing_alpha + _rotation + 0 + + + variable_slider - timing_max_dev - 1.5 + id + costas_alpha - omega_relative_limit - 0.005 + _enabled + True - gray_code - True + label + Costas Alpha - verbose - False + value + 0.175 - log - False + min + 0 - sync_out - True + max + .5 - _coordinate - (488, 65) + num_steps + 100 - _rotation - 0 + style + wx.SL_HORIZONTAL - - - variable - id - p2p + converver + float_converter - _enabled - True + grid_pos + - value - 2.0 + notebook + _coordinate - (13, 314) + (598, 367) _rotation @@ -259,10 +263,10 @@ - wxgui_scopesink2 + wxgui_fftsink2 id - wxgui_scopesink2_0 + wxgui_fftsink2_0 _enabled @@ -274,35 +278,55 @@ title - Recovered DQPSK Constellation + Receive Spectrum samp_rate samp_rate - v_scale - 0 + baseband_freq + bb_freq - v_offset - 0 + y_per_div + 10 - t_scale - 0 + y_divs + 10 - ac_couple + ref_level + -40 + + + ref_scale + p2p + + + fft_size + 1024 + + + fft_rate + 15 + + + peak_hold False - xy_mode - True + average + False - num_inputs - 1 + avg_alpha + 0 + + + win + None win_size @@ -318,7 +342,30 @@ _coordinate - (747, 237) + (383, 321) + + + _rotation + 0 + + + + variable + + id + samp_rate + + + _enabled + True + + + value + 1e6/4 + + + _coordinate + (20, 234) _rotation @@ -329,7 +376,7 @@ variable_slider id - timing_alpha + gain _enabled @@ -337,11 +384,11 @@ label - Timing Alpha + Gain value - .1 + 20 min @@ -349,7 +396,7 @@ max - .5 + 70 num_steps @@ -373,7 +420,7 @@ _coordinate - (759, 365) + (152, 378) _rotation @@ -381,10 +428,10 @@ - gr_null_sink + usrp2_source_xxxx id - gr_null_sink_0 + usrp2_source_xxxx_0 _enabled @@ -392,70 +439,35 @@ type - byte - - - vlen - 1 - - - _coordinate - (815, 80) - - - _rotation - 0 - - - - variable_slider - - id - costas_alpha - - - _enabled - True - - - label - Costas Alpha - - - value - 0.175 - - - min - 0 + complex - max - .5 + interface + - num_steps - 100 + mac_addr + - style - wx.SL_HORIZONTAL + decimation + int(100e6/samp_rate) - converver - float_converter + frequency + bb_freq - grid_pos - + lo_offset + float('inf') - notebook - + gain + gain _coordinate - (598, 367) + (158, 51) _rotation @@ -498,7 +510,7 @@ gain - 0 + gain side @@ -522,10 +534,10 @@ - wxgui_fftsink2 + blks2_dxpsk2_demod id - wxgui_fftsink2_0 + blks2_dxpsk2_demod_0 _enabled @@ -533,59 +545,102 @@ type - complex + dqpsk - title - Receive Spectrum + samples_per_symbol + samps_per_sym - samp_rate - samp_rate + excess_bw + 0.35 - baseband_freq - bb_freq + costas_alpha + costas_alpha - y_per_div - 10 + timing_alpha + timing_alpha - y_divs - 10 + timing_max_dev + 1.5 - ref_level - -40 + omega_relative_limit + 0.005 - ref_scale - p2p + gray_code + True - fft_size - 1024 + verbose + False - fft_rate - 20 + log + False - peak_hold - False + sync_out + True - average - False + _coordinate + (487, 64) - avg_alpha + _rotation 0 + + + wxgui_scopesink2 - win - None + id + wxgui_scopesink2_0 + + + _enabled + True + + + type + complex + + + title + Recovered DQPSK Constellation + + + samp_rate + samp_rate/4/20 + + + v_scale + 0 + + + v_offset + 0 + + + t_scale + 0 + + + ac_couple + False + + + xy_mode + True + + + num_inputs + 1 win_size @@ -601,7 +656,38 @@ _coordinate - (383, 321) + (760, 239) + + + _rotation + 180 + + + + gr_keep_one_in_n + + id + gr_keep_one_in_n_0 + + + _enabled + True + + + type + complex + + + n + 20 + + + vlen + 1 + + + _coordinate + (873, 151) _rotation @@ -628,8 +714,14 @@ blks2_dxpsk2_demod_0 - wxgui_scopesink2_0 + gr_keep_one_in_n_0 1 0 + + gr_keep_one_in_n_0 + wxgui_scopesink2_0 + 0 + 0 + -- cgit