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