X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=gnuradio-core%2Fsrc%2Fpython%2Fgnuradio%2Fblksimpl%2Fdqpsk.py;h=70024f1e98da3ec1391d5a4bad53030927dc0f04;hb=b78ae1de4d9bbde942e5e7556630d7ccd8161c30;hp=3b60f2242e2fbf69a41aeea4eedb359a6a133a6f;hpb=0cfd4875e519e2b1ee05d074f72ec67391ed13bf;p=debian%2Fgnuradio diff --git a/gnuradio-core/src/python/gnuradio/blksimpl/dqpsk.py b/gnuradio-core/src/python/gnuradio/blksimpl/dqpsk.py index 3b60f224..70024f1e 100644 --- a/gnuradio-core/src/python/gnuradio/blksimpl/dqpsk.py +++ b/gnuradio-core/src/python/gnuradio/blksimpl/dqpsk.py @@ -39,7 +39,7 @@ _def_gray_code = True _def_verbose = False _def_log = False -_def_costas_alpha = 0.10 +_def_costas_alpha = None _def_gain_mu = 0.03 _def_mu = 0.05 _def_omega_relative_limit = 0.005 @@ -238,11 +238,15 @@ class dqpsk_demod(gr.hier_block): self.agc = gr.feedforward_agc_cc(16, 1.0) # Costas loop (carrier tracking) - # FIXME: need to decide how to handle this more generally; do we pull it from higher layer? - costas_order = 4 - beta = .25 * self._costas_alpha * self._costas_alpha - #self.costas_loop = gr.costas_loop_cc(self._costas_alpha, beta, 0.1, -0.1, costas_order) - self.costas_loop = gr.costas_loop_cc(self._costas_alpha, beta, 0.002, -0.002, costas_order) + if self._costas_alpha is None: # If no alpha value was specified by the user + alpha_dir = {2:0.075, 3:0.09, 4:0.09, 5:0.095, 6:0.10, 7:0.105} + self._costas_alpha = alpha_dir[self._samples_per_symbol] + + costas_order = 4 + # The value of beta is now set to be underdamped; this value can have a huge impact on the + # performance of QPSK. Set to 0.25 for critically damped or higher for underdamped responses. + beta = .35 * self._costas_alpha * self._costas_alpha + self.costas_loop = gr.costas_loop_cc(self._costas_alpha, beta, 0.02, -0.02, costas_order) # RRC data filter ntaps = 11 * samples_per_symbol