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