GNU Radio Manual and C++ API Reference  3.7.13.4
The Free & Open Software Radio Ecosystem
ofdm_sync_sc_cfb.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2013 Free Software Foundation, Inc.
4  *
5  * This file is part of GNU Radio
6  *
7  * GNU Radio is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 3, or (at your option)
10  * any later version.
11  *
12  * GNU Radio is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with GNU Radio; see the file COPYING. If not, write to
19  * the Free Software Foundation, Inc., 51 Franklin Street,
20  * Boston, MA 02110-1301, USA.
21  */
22 
23 
24 #ifndef INCLUDED_DIGITAL_OFDM_SYNC_SC_CFB_H
25 #define INCLUDED_DIGITAL_OFDM_SYNC_SC_CFB_H
26 
27 #include <gnuradio/digital/api.h>
28 #include <gnuradio/hier_block2.h>
29 
30 namespace gr {
31  namespace digital {
32 
33  /*!
34  * \brief Schmidl & Cox synchronisation for OFDM
35  * \ingroup ofdm_blk
36  * \ingroup synchronizers_blk
37  *
38  * \details
39  * Input: complex samples.
40  * Output 0: Fine frequency offset, scaled by the OFDM symbol duration.
41  * This is \f$\hat{\varphi}\f$ in [1]. The normalized frequency
42  * offset is then 2.0*output0/fft_len.
43  * Output 1: Beginning of the first OFDM symbol after the first (doubled) OFDM
44  * symbol. The beginning is marked with a 1 (it's 0 everywhere else).
45  *
46  * The evaluation of the coarse frequency offset is *not* done in this block.
47  * Also, the initial equalizer taps are not calculated here.
48  *
49  * Note that we use a different normalization factor in the timing metric than
50  * the authors do in their original work[1]. If the timing metric (8) is
51  * \f[
52  * M(d) = \frac{|P(d)|^2}{(R(d))^2},
53  * \f]
54  * we calculate the normalization as
55  * \f[
56  * R(d) = \frac{1}{2} \sum_{k=0}^{N-1} |r_{k+d}|^2,
57  * \f]
58  * i.e., we estimate the energy from *both* half-symbols. This avoids spurious detects
59  * at the end of a burst, when the energy level suddenly drops.
60  *
61  * [1] Schmidl, T.M. and Cox, D.C., "Robust frequency and timing synchronization for OFDM",
62  * Communications, IEEE Transactions on, 1997.
63  */
64  class DIGITAL_API ofdm_sync_sc_cfb : virtual public hier_block2
65  {
66  public:
67  typedef boost::shared_ptr<ofdm_sync_sc_cfb> sptr;
68 
69  /*! \param fft_len FFT length
70  * \param cp_len Length of the guard interval (cyclic prefix) in samples
71  * \param use_even_carriers If true, the carriers in the sync preamble are occupied such
72  * that the even carriers are used (0, 2, 4, ...). If you use all
73  * carriers, that would include the DC carrier, so be careful.
74  * \param threshold detection threshold. Default is 0.9.
75  */
76  static sptr make(int fft_len, int cp_len, bool use_even_carriers=false,
77  float threshold=0.9);
78 
79  virtual void set_threshold(float threshold) = 0;
80  virtual float threshold() const = 0;
81  };
82 
83  } // namespace digital
84 } // namespace gr
85 
86 #endif /* INCLUDED_DIGITAL_OFDM_SYNC_SC_CFB_H */
87 
Schmidl & Cox synchronisation for OFDM.
Definition: ofdm_sync_sc_cfb.h:64
boost::shared_ptr< ofdm_sync_sc_cfb > sptr
Definition: ofdm_sync_sc_cfb.h:67
#define DIGITAL_API
Definition: gr-digital/include/gnuradio/digital/api.h:30
Include this header to use the message passing features.
Definition: logger.h:695
Hierarchical container class for gr::block&#39;s and gr::hier_block2&#39;s.
Definition: hier_block2.h:46