GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
ofdm_equalizer_static.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  * SPDX-License-Identifier: GPL-3.0-or-later
7  *
8  */
9 
10 #ifndef INCLUDED_DIGITAL_OFDM_EQUALIZER_STATIC_H
11 #define INCLUDED_DIGITAL_OFDM_EQUALIZER_STATIC_H
12 
13 #include <gnuradio/digital/api.h>
16 
17 namespace gr {
18 namespace digital {
19 
20 /*!
21  * \brief Very simple static equalizer for OFDM.
22  * \ingroup ofdm_blk
23  * \ingroup equalizers_blk
24  *
25  * \details
26  * This is an extremely simple equalizer. It will only work for
27  * high-SNR, very, very slowly changing channels.
28  *
29  * It simply divides the signal with the currently known channel
30  * state. Whenever a pilot symbol comes around, it updates the
31  * channel state on that particular carrier by dividing the
32  * received symbol with the known pilot symbol.
33  */
35 {
36 public:
37  typedef std::shared_ptr<ofdm_equalizer_static> sptr;
38 
39  ofdm_equalizer_static(int fft_len,
40  const std::vector<std::vector<int>>& occupied_carriers =
41  std::vector<std::vector<int>>(),
42  const std::vector<std::vector<int>>& pilot_carriers =
43  std::vector<std::vector<int>>(),
44  const std::vector<std::vector<gr_complex>>& pilot_symbols =
45  std::vector<std::vector<gr_complex>>(),
46  int symbols_skipped = 0,
47  bool input_is_shifted = true);
49 
50  /*! \brief Divide the input signal with the current channel state.
51  *
52  * Does the following (and nothing else):
53  * - Divide every OFDM symbol with the current channel state
54  * - If a pilot symbol is found, re-set the channel state by dividing the received
55  * symbol with the known pilot symbol
56  */
57  void equalize(gr_complex* frame,
58  int n_sym,
59  const std::vector<gr_complex>& initial_taps = std::vector<gr_complex>(),
60  const std::vector<tag_t>& tags = std::vector<tag_t>()) override;
61 
62  /*
63  * \param fft_len FFT length
64  * \param occupied_carriers List of occupied carriers, see ofdm_carrier_allocator
65  * for a description.
66  * \param pilot_carriers Position of pilot symbols, see ofdm_carrier_allocator
67  * for a description.
68  * \param pilot_symbols Value of pilot symbols, see ofdm_carrier_allocator
69  * for a description.
70  * \param symbols_skipped Starting position within occupied_carriers and
71  * pilot_carriers. If the first symbol of the frame was removed (e.g. to decode the
72  * header), set this make sure the pilot symbols are correctly
73  * identified.
74  * \param input_is_shifted Set this to false if the input signal is not shifted, i.e.
75  * the first input items is on the DC carrier.
76  * Note that a lot of the OFDM receiver blocks operate on
77  * shifted signals!
78  */
79  static sptr make(int fft_len,
80  const std::vector<std::vector<int>>& occupied_carriers =
81  std::vector<std::vector<int>>(),
82  const std::vector<std::vector<int>>& pilot_carriers =
83  std::vector<std::vector<int>>(),
84  const std::vector<std::vector<gr_complex>>& pilot_symbols =
85  std::vector<std::vector<gr_complex>>(),
86  int symbols_skipped = 0,
87  bool input_is_shifted = true);
88 };
89 
90 } /* namespace digital */
91 } /* namespace gr */
92 
93 #endif /* INCLUDED_DIGITAL_OFDM_EQUALIZER_STATIC_H */
Definition: ofdm_equalizer_base.h:57
std::shared_ptr< ofdm_equalizer_base > sptr
Definition: ofdm_equalizer_base.h:32
Very simple static equalizer for OFDM.
Definition: ofdm_equalizer_static.h:35
static sptr make(int fft_len, const std::vector< std::vector< int >> &occupied_carriers=std::vector< std::vector< int >>(), const std::vector< std::vector< int >> &pilot_carriers=std::vector< std::vector< int >>(), const std::vector< std::vector< gr_complex >> &pilot_symbols=std::vector< std::vector< gr_complex >>(), int symbols_skipped=0, bool input_is_shifted=true)
ofdm_equalizer_static(int fft_len, const std::vector< std::vector< int >> &occupied_carriers=std::vector< std::vector< int >>(), const std::vector< std::vector< int >> &pilot_carriers=std::vector< std::vector< int >>(), const std::vector< std::vector< gr_complex >> &pilot_symbols=std::vector< std::vector< gr_complex >>(), int symbols_skipped=0, bool input_is_shifted=true)
std::shared_ptr< ofdm_equalizer_static > sptr
Definition: ofdm_equalizer_static.h:37
void equalize(gr_complex *frame, int n_sym, const std::vector< gr_complex > &initial_taps=std::vector< gr_complex >(), const std::vector< tag_t > &tags=std::vector< tag_t >()) override
Divide the input signal with the current channel state.
#define DIGITAL_API
Definition: gr-digital/include/gnuradio/digital/api.h:18
std::complex< float > gr_complex
Definition: gr_complex.h:15
GNU Radio logging wrapper.
Definition: basic_block.h:29