summaryrefslogtreecommitdiff
path: root/gnuradio-core
diff options
context:
space:
mode:
authortrondeau2008-04-18 16:06:40 +0000
committertrondeau2008-04-18 16:06:40 +0000
commit2ae538ed6a5d18615fb9eea280d861ed3a8600e5 (patch)
tree92a2c0b9edff7ffeefa962b171d078931e2dfc96 /gnuradio-core
parentb96d58fda01e00e8a9f710824dffe9123d93e35f (diff)
downloadgnuradio-2ae538ed6a5d18615fb9eea280d861ed3a8600e5.tar.gz
gnuradio-2ae538ed6a5d18615fb9eea280d861ed3a8600e5.tar.bz2
gnuradio-2ae538ed6a5d18615fb9eea280d861ed3a8600e5.zip
Improved performance of the ML sync (with added computations). It uses the energy calculation to normalize the correlation and the timing sequence and correlation together to determine the timing. This works for frequencies of +-0.6 offset, which is a limiting factor still in the performance but better than the previous checkin.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@8222 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gnuradio-core')
-rw-r--r--gnuradio-core/src/python/gnuradio/blks2impl/ofdm_sync_ml.py36
1 files changed, 25 insertions, 11 deletions
diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/ofdm_sync_ml.py b/gnuradio-core/src/python/gnuradio/blks2impl/ofdm_sync_ml.py
index 59c4913d1..7c75d7f1d 100644
--- a/gnuradio-core/src/python/gnuradio/blks2impl/ofdm_sync_ml.py
+++ b/gnuradio-core/src/python/gnuradio/blks2impl/ofdm_sync_ml.py
@@ -98,7 +98,7 @@ class ofdm_sync_ml(gr.hier_block2):
self.connect(self.diff, self.pk_detect)
# The DPLL corrects for timing differences between CP correlations
- use_dpll = 1
+ use_dpll = 0
if use_dpll:
self.dpll = gr.dpll_bb(float(symbol_length),0.01)
self.connect(self.pk_detect, self.dpll)
@@ -117,21 +117,29 @@ class ofdm_sync_ml(gr.hier_block2):
kstime.reverse()
self.kscorr = gr.fir_filter_ccc(1, kstime)
self.corrmag = gr.complex_to_mag_squared()
+ self.div = gr.divide_ff()
# The output signature of the correlation has a few spikes because the rest of the
# system uses the repeated preamble symbol. It needs to work that generically if
- # anyone wants to use this against a WiMAX-like signal since it, too, repeats
- # This slicing against a threshold will __not__ work over the air unless the
- # received power is at just the right point. It __does__ work under the normal
- # conditions of the loopback model.
- self.slice = gr.threshold_ff(700000, 700000, 0)
+ # anyone wants to use this against a WiMAX-like signal since it, too, repeats.
+ # The output theta of the correlator above is multiplied with this correlation to
+ # identify the proper peak and remove other products in this cross-correlation
+ self.threshold_factor = 0.1
+ self.slice = gr.threshold_ff(self.threshold_factor, self.threshold_factor, 0)
self.f2b = gr.float_to_char()
+ self.b2f = gr.char_to_float()
+ self.mul = gr.multiply_ff()
+
+ # Normalize the power of the corr output by the energy. This is not really needed
+ # and could be removed for performance, but it makes for a cleaner signal.
+ # if this is removed, the threshold value needs adjustment.
+ self.connect(self.input, self.kscorr, self.corrmag, (self.div,0))
+ self.connect(self.moving_sum_filter, (self.div,1))
+
+ self.connect(self.div, (self.mul,0))
+ self.connect(self.pk_detect, self.b2f, (self.mul,1))
+ self.connect(self.mul, self.slice)
- self.connect(self.input, self.kscorr, self.corrmag, self.slice)
- self.connect(self.kscorr, gr.file_sink(gr.sizeof_gr_complex, "kscorr.dat"))
- self.connect(self.corrmag, gr.file_sink(gr.sizeof_float, "kscorrmag.dat"))
- self.connect(self.slice, gr.file_sink(gr.sizeof_float, "kspeak.dat"))
-
# Set output signals
# Output 0: fine frequency correction value
# Output 1: timing signal
@@ -140,8 +148,14 @@ class ofdm_sync_ml(gr.hier_block2):
if logging:
+ self.connect(self.moving_sum_filter, gr.file_sink(gr.sizeof_float, "ofdm_sync_ml-energy_f.dat"))
self.connect(self.diff, gr.file_sink(gr.sizeof_float, "ofdm_sync_ml-theta_f.dat"))
self.connect(self.angle, gr.file_sink(gr.sizeof_float, "ofdm_sync_ml-epsilon_f.dat"))
+ self.connect(self.corrmag, gr.file_sink(gr.sizeof_float, "ofdm_sync_ml-corrmag_f.dat"))
+ self.connect(self.kscorr, gr.file_sink(gr.sizeof_gr_complex, "ofdm_sync_ml-kscorr_c.dat"))
+ self.connect(self.div, gr.file_sink(gr.sizeof_float, "ofdm_sync_ml-div_f.dat"))
+ self.connect(self.mul, gr.file_sink(gr.sizeof_float, "ofdm_sync_ml-mul_f.dat"))
+ self.connect(self.slice, gr.file_sink(gr.sizeof_float, "ofdm_sync_ml-slice_f.dat"))
self.connect(self.pk_detect, gr.file_sink(gr.sizeof_char, "ofdm_sync_ml-peaks_b.dat"))
if use_dpll:
self.connect(self.dpll, gr.file_sink(gr.sizeof_char, "ofdm_sync_ml-dpll_b.dat"))