commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r4072 - gnuradio/branches/releases/3.0/gnuradio-core/s


From: jcorgan
Subject: [Commit-gnuradio] r4072 - gnuradio/branches/releases/3.0/gnuradio-core/src/python/gnuradio/blksimpl
Date: Tue, 12 Dec 2006 14:51:12 -0700 (MST)

Author: jcorgan
Date: 2006-12-12 14:51:12 -0700 (Tue, 12 Dec 2006)
New Revision: 4072

Modified:
   
gnuradio/branches/releases/3.0/gnuradio-core/src/python/gnuradio/blksimpl/dbpsk.py
   
gnuradio/branches/releases/3.0/gnuradio-core/src/python/gnuradio/blksimpl/dqpsk.py
Log:
Merged trunk version r4071 of dqpsk.py and dbpsk.py into release branch.

Modified: 
gnuradio/branches/releases/3.0/gnuradio-core/src/python/gnuradio/blksimpl/dbpsk.py
===================================================================
--- 
gnuradio/branches/releases/3.0/gnuradio-core/src/python/gnuradio/blksimpl/dbpsk.py
  2006-12-12 20:40:46 UTC (rev 4071)
+++ 
gnuradio/branches/releases/3.0/gnuradio-core/src/python/gnuradio/blksimpl/dbpsk.py
  2006-12-12 21:51:12 UTC (rev 4072)
@@ -39,7 +39,7 @@
 _def_verbose = False
 _def_log = False
 
-_def_costas_alpha = 0.05
+_def_costas_alpha = None
 _def_gain_mu = 0.03
 _def_mu = 0.05
 _def_omega_relative_limit = 0.005
@@ -241,10 +241,12 @@
 
         
         # Costas loop (carrier tracking)
-        # FIXME: need to decide how to handle this more generally; do we pull 
it from higher layer?
-        costas_order = 2
-        beta = .25 * self._costas_alpha * self._costas_alpha
-        self.costas_loop = gr.costas_loop_cc(self._costas_alpha, beta, 0.002, 
-0.002, costas_order)
+        # The Costas loop is not needed for BPSK, though it can help. Turn the 
Costas loop on
+        # by setting an alpha value not None.
+        if self._costas_alpha is not None:
+            costas_order = 2
+            beta = .25 * self._costas_alpha * self._costas_alpha
+            self.costas_loop = gr.costas_loop_cc(self._costas_alpha, beta, 
0.002, -0.002, costas_order)
 
         # RRC data filter
         ntaps = 11 * self._samples_per_symbol
@@ -289,9 +291,14 @@
             self._setup_logging()
 
         # Connect and Initialize base class
-        self._fg.connect(self.pre_scaler, self.agc, self.costas_loop,
-                         self.rrc_filter, self.clock_recovery, self.diffdec,
-                         self.slicer, self.symbol_mapper, self.unpack)
+        if self._costas_alpha is not None:   # With Costas Loop
+            self._fg.connect(self.pre_scaler, self.agc, self.costas_loop,
+                             self.rrc_filter, self.clock_recovery, 
self.diffdec,
+                             self.slicer, self.symbol_mapper, self.unpack)
+        else: # Without Costas Loop
+            self._fg.connect(self.pre_scaler, self.agc,
+                             self.rrc_filter, self.clock_recovery, 
self.diffdec,
+                             self.slicer, self.symbol_mapper, self.unpack)
 
         gr.hier_block.__init__(self, self._fg, self.pre_scaler, self.unpack)
 
@@ -306,7 +313,10 @@
         print "bits per symbol = %d"         % self.bits_per_symbol()
         print "Gray code = %s"               % self._gray_code
         print "RRC roll-off factor = %.2f"   % self._excess_bw
-        print "Costas Loop alpha = %.5f"     % self._costas_alpha
+        if self._costas_alpha is not None:
+            print "Costas Loop alpha = %.5f"     % self._costas_alpha
+        else:
+            print "Costas Loop is turned off"
         print "M&M symbol sync gain = %.5f"  % self._gain_mu
         print "M&M symbol sync mu = %.5f"    % self._mu
         print "M&M omega relative limit = %.5f" % self._omega_relative_limit
@@ -317,10 +327,11 @@
                          gr.file_sink(gr.sizeof_gr_complex, "prescaler.dat"))
         self._fg.connect(self.agc,
                          gr.file_sink(gr.sizeof_gr_complex, "agc.dat"))
-        self._fg.connect(self.costas_loop,
-                         gr.file_sink(gr.sizeof_gr_complex, "costas_loop.dat"))
-        self._fg.connect((self.costas_loop,1),
-                         gr.file_sink(gr.sizeof_gr_complex, 
"costas_error.dat"))
+        if self._costas_alpha is not None:
+            self._fg.connect(self.costas_loop,
+                             gr.file_sink(gr.sizeof_gr_complex, 
"costas_loop.dat"))
+            self._fg.connect((self.costas_loop,1),
+                             gr.file_sink(gr.sizeof_gr_complex, 
"costas_error.dat"))
         self._fg.connect(self.rrc_filter,
                          gr.file_sink(gr.sizeof_gr_complex, "rrc_filter.dat"))
         self._fg.connect(self.clock_recovery,

Modified: 
gnuradio/branches/releases/3.0/gnuradio-core/src/python/gnuradio/blksimpl/dqpsk.py
===================================================================
--- 
gnuradio/branches/releases/3.0/gnuradio-core/src/python/gnuradio/blksimpl/dqpsk.py
  2006-12-12 20:40:46 UTC (rev 4071)
+++ 
gnuradio/branches/releases/3.0/gnuradio-core/src/python/gnuradio/blksimpl/dqpsk.py
  2006-12-12 21:51:12 UTC (rev 4072)
@@ -39,7 +39,7 @@
 _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 @@
         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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]