diff options
author | Tom | 2010-01-31 17:08:03 -0500 |
---|---|---|
committer | Tom | 2010-01-31 17:08:03 -0500 |
commit | 98a0c00c7a922e1c5cbce155205b4e5de725bcf7 (patch) | |
tree | 18d8333613b2186e360d3b41c8ec78197ca8171f /gnuradio-core | |
parent | fd6fd94644330a29ae0598c3ff1e75ddc196e806 (diff) | |
download | gnuradio-98a0c00c7a922e1c5cbce155205b4e5de725bcf7.tar.gz gnuradio-98a0c00c7a922e1c5cbce155205b4e5de725bcf7.tar.bz2 gnuradio-98a0c00c7a922e1c5cbce155205b4e5de725bcf7.zip |
Using PFB resampler to do the RRC filtering on the modulator. This along with the PFB clock recovery in the demod block allows arbitrary real numbers for the number of samples per symbol. We will have to chance the transmit and recieve path code in the examples to take advantage of this.
Diffstat (limited to 'gnuradio-core')
-rw-r--r-- | gnuradio-core/src/python/gnuradio/blks2impl/dbpsk2.py | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/dbpsk2.py b/gnuradio-core/src/python/gnuradio/blks2impl/dbpsk2.py index a692e7d1f..b2cc27854 100644 --- a/gnuradio-core/src/python/gnuradio/blks2impl/dbpsk2.py +++ b/gnuradio-core/src/python/gnuradio/blks2impl/dbpsk2.py @@ -26,7 +26,7 @@ differential BPSK modulation and demodulation. """ from gnuradio import gr, gru, modulation_utils -from math import pi, sqrt +from math import pi, sqrt, ceil import psk import cmath from pprint import pprint @@ -86,8 +86,6 @@ class dbpsk2_mod(gr.hier_block2): if not isinstance(self._samples_per_symbol, int) or self._samples_per_symbol < 2: raise TypeError, ("sbp must be an integer >= 2, is %d" % self._samples_per_symbol) - ntaps = 11 * self._samples_per_symbol - arity = pow(2,self.bits_per_symbol()) # turn bytes into k-bit vectors @@ -103,16 +101,15 @@ class dbpsk2_mod(gr.hier_block2): self.chunks2symbols = gr.chunks_to_symbols_bc(psk.constellation[arity]) - # pulse shaping filter - self.rrc_taps = gr.firdes.root_raised_cosine( - self._samples_per_symbol, # gain (samples_per_symbol since we're - # interpolating by samples_per_symbol) - self._samples_per_symbol, # sampling rate - 1.0, # symbol rate - self._excess_bw, # excess bandwidth (roll-off factor) + nfilts = 32 + ntaps = nfilts * 11 * self._samples_per_symbol # make nfilts filters of ntaps each + self.rrc_taps = gr.firdes.root_raised_cosine( + nfilts, # gain + nfilts, # sampling rate based on 32 filters in resampler + 1.0, # symbol rate + self._excess_bw, # excess bandwidth (roll-off factor) ntaps) - self.rrc_filter = gr.interp_fir_filter_ccf(self._samples_per_symbol, - self.rrc_taps) + self.rrc_filter = gr.pfb_arb_resampler_ccf(self._samples_per_symbol, self.rrc_taps) # Connect self.connect(self, self.bytes2chunks, self.symbol_mapper, self.diffenc, @@ -244,16 +241,14 @@ class dbpsk2_demod(gr.hier_block2): self.agc = gr.agc2_cc(0.6e-1, 1e-3, 1, 1, 100) #self.agc = gr.feedforward_agc_cc(16, 1.0) - # Frequency correction self.freq_recov = gr.fll_band_edge_cc(self._samples_per_symbol, self._excess_bw, - 11*self._samples_per_symbol, + 11*int(self._samples_per_symbol), self._freq_alpha, self._freq_beta) - # symbol timing recovery with RRC data filter nfilts = 32 - ntaps = 11 * samples_per_symbol*nfilts + ntaps = 11 * int(self._samples_per_symbol*nfilts) taps = gr.firdes.root_raised_cosine(nfilts, nfilts, 1.0/float(self._samples_per_symbol), self._excess_bw, ntaps) |