GNU Radio Manual and C++ API Reference  3.7.13.4
The Free & Open Software Radio Ecosystem
ofdm_equalizer_simpledfe.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_EQUALIZER_SIMPLEDFE_H
23 #define INCLUDED_DIGITAL_OFDM_EQUALIZER_SIMPLEDFE_H
24 
25 #include <gnuradio/digital/api.h>
28 
29 namespace gr {
30  namespace digital {
31 
32  /*!
33  * \brief Simple decision feedback equalizer for OFDM.
34  * \ingroup ofdm_blk
35  * \ingroup equalizers_blk
36  *
37  * \details
38  * Equalizes an OFDM signal symbol by symbol using knowledge of the
39  * complex modulations symbols.
40  * For every symbol, the following steps are performed:
41  * - On every sub-carrier, decode the modulation symbol
42  * - Use the difference between the decoded symbol and the received symbol
43  * to update the channel state on this carrier
44  * - Whenever a pilot symbol is found, it uses the known pilot symbol to
45  * update the channel state.
46  *
47  * This equalizer makes a lot of assumptions:
48  * - The initial channel state is good enough to decode the first
49  * symbol without error (unless the first symbol only consists of pilot
50  * tones)
51  * - The channel changes only very slowly, such that the channel state
52  * from one symbol is enough to decode the next
53  * - SNR low enough that equalization will always suffice to correctly
54  * decode a symbol
55  * If these assumptions are not met, the most common error is that the
56  * channel state is estimated incorrectly during equalization; after that,
57  * all subsequent symbols will be completely wrong.
58  *
59  * Note that the equalized symbols are *exact points* on the constellation.
60  * This means soft information of the modulation symbols is lost after the
61  * equalization, which is suboptimal for channel codes that use soft decision.
62  *
63  */
65  {
66  public:
67  typedef boost::shared_ptr<ofdm_equalizer_simpledfe> sptr;
68 
70  int fft_len,
71  const gr::digital::constellation_sptr &constellation,
72  const std::vector<std::vector<int> > &occupied_carriers = std::vector<std::vector<int> >(),
73  const std::vector<std::vector<int> > &pilot_carriers = std::vector<std::vector<int> >(),
74  const std::vector<std::vector<gr_complex> > &pilot_symbols = std::vector<std::vector<gr_complex> >(),
75  int symbols_skipped = 0,
76  float alpha = 0.1,
77  bool input_is_shifted = true);
78 
80 
81  void equalize(gr_complex *frame,
82  int n_sym,
83  const std::vector<gr_complex> &initial_taps = std::vector<gr_complex>(),
84  const std::vector<tag_t> &tags = std::vector<tag_t>());
85 
86  /*
87  * \param fft_len FFT length
88  * \param constellation The constellation object describing the modulation used
89  * on the subcarriers (e.g. QPSK). This is used to decode
90  * the individual symbols.
91  * \param occupied_carriers List of occupied carriers, see ofdm_carrier_allocator
92  * for a description.
93  * \param pilot_carriers Position of pilot symbols, see ofdm_carrier_allocator
94  * for a description.
95  * \param pilot_symbols Value of pilot symbols, see ofdm_carrier_allocator
96  * for a description.
97  * \param alpha Averaging coefficient (in a nutshell, if \f$H_{i,k}\f$ is the channel
98  * state for carrier i and symbol k,
99  * \f$H_{i,k+1} = \alpha H_{i,k} + (1 - \alpha) H_{i,k+1}\f$. Make this
100  * larger if there's more noise, but keep in mind that larger values
101  * of alpha mean slower response to channel changes).
102  * \param symbols_skipped Starting position within occupied_carriers and pilot_carriers.
103  * If the first symbol of the frame was removed (e.g. to decode the
104  * header), set this make sure the pilot symbols are correctly
105  * identified.
106  * \param input_is_shifted Set this to false if the input signal is not shifted, i.e.
107  * the first input items is on the DC carrier.
108  * Note that a lot of the OFDM receiver blocks operate on shifted
109  * signals!
110  */
111  static sptr make(
112  int fft_len,
113  const gr::digital::constellation_sptr &constellation,
114  const std::vector<std::vector<int> > &occupied_carriers = std::vector<std::vector<int> >(),
115  const std::vector<std::vector<int> > &pilot_carriers = std::vector<std::vector<int> >(),
116  const std::vector<std::vector<gr_complex> > &pilot_symbols = std::vector<std::vector<gr_complex> >(),
117  int symbols_skipped=0,
118  float alpha=0.1,
119  bool input_is_shifted=true
120  );
121 
122  private:
123  gr::digital::constellation_sptr d_constellation;
124  //! Averaging coefficient
125  float d_alpha;
126  };
127 
128  } /* namespace digital */
129 } /* namespace gr */
130 
131 #endif /* INCLUDED_DIGITAL_OFDM_EQUALIZER_SIMPLEDFE_H */
132 
An abstracted constellation object.
Definition: constellation.h:62
#define DIGITAL_API
Definition: gr-digital/include/gnuradio/digital/api.h:30
std::complex< float > gr_complex
Definition: gr_complex.h:27
Include this header to use the message passing features.
Definition: logger.h:695
boost::shared_ptr< ofdm_equalizer_simpledfe > sptr
Definition: ofdm_equalizer_simpledfe.h:67
Simple decision feedback equalizer for OFDM.
Definition: ofdm_equalizer_simpledfe.h:64
Definition: ofdm_equalizer_base.h:69