GNU Radio Manual and C++ API Reference  3.10.9.1
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  * SPDX-License-Identifier: GPL-3.0-or-later
8  *
9  */
10 
11 
12 #ifndef INCLUDED_DIGITAL_OFDM_SYNC_SC_CFB_H
13 #define INCLUDED_DIGITAL_OFDM_SYNC_SC_CFB_H
14 
15 #include <gnuradio/digital/api.h>
16 #include <gnuradio/hier_block2.h>
17 
18 namespace gr {
19 namespace digital {
20 
21 /*!
22  * \brief Schmidl & Cox synchronisation for OFDM
23  * \ingroup ofdm_blk
24  * \ingroup synchronizers_blk
25  *
26  * \details
27  * Input: complex samples.
28  * Output 0: Fine frequency offset, scaled by the OFDM symbol duration.
29  * This is \f$\hat{\varphi}\f$ in [1]. The normalized frequency
30  * offset is then 2.0*output0/fft_len.
31  * Output 1: Beginning of the first OFDM symbol after the first (doubled) OFDM
32  * symbol. The beginning is marked with a 1 (it's 0 everywhere else).
33  *
34  * The evaluation of the coarse frequency offset is *not* done in this block.
35  * Also, the initial equalizer taps are not calculated here.
36  *
37  * Note that we use a different normalization factor in the timing metric than
38  * the authors do in their original work[1]. If the timing metric (8) is
39  * \f[
40  * M(d) = \frac{|P(d)|^2}{(R(d))^2},
41  * \f]
42  * we calculate the normalization as
43  * \f[
44  * R(d) = \frac{1}{2} \sum_{k=0}^{N-1} |r_{k+d}|^2,
45  * \f]
46  * i.e., we estimate the energy from *both* half-symbols. This avoids spurious detects
47  * at the end of a burst, when the energy level suddenly drops.
48  *
49  * [1] Schmidl, T.M. and Cox, D.C., "Robust frequency and timing synchronization for
50  * OFDM", Communications, IEEE Transactions on, 1997.
51  */
53 {
54 public:
55  typedef std::shared_ptr<ofdm_sync_sc_cfb> sptr;
56 
57  /*! \param fft_len FFT length
58  * \param cp_len Length of the guard interval (cyclic prefix) in samples
59  * \param use_even_carriers If true, the carriers in the sync preamble are occupied
60  * such that the even carriers are used (0, 2, 4, ...). If you use all carriers, that
61  * would include the DC carrier, so be careful. \param threshold detection threshold.
62  * Default is 0.9.
63  */
64  static sptr
65  make(int fft_len, int cp_len, bool use_even_carriers = false, float threshold = 0.9);
66 
67  virtual void set_threshold(float threshold) = 0;
68  virtual float threshold() const = 0;
69 };
70 
71 } // namespace digital
72 } // namespace gr
73 
74 #endif /* INCLUDED_DIGITAL_OFDM_SYNC_SC_CFB_H */
Schmidl & Cox synchronisation for OFDM.
Definition: ofdm_sync_sc_cfb.h:53
std::shared_ptr< ofdm_sync_sc_cfb > sptr
Definition: ofdm_sync_sc_cfb.h:55
virtual void set_threshold(float threshold)=0
virtual float threshold() const =0
static sptr make(int fft_len, int cp_len, bool use_even_carriers=false, float threshold=0.9)
Hierarchical container class for gr::block's and gr::hier_block2's.
Definition: hier_block2.h:34
#define DIGITAL_API
Definition: gr-digital/include/gnuradio/digital/api.h:18
GNU Radio logging wrapper.
Definition: basic_block.h:29