Loading...
Searching...
No Matches
ofdm_equalizer_base.h
Go to the documentation of this file.
/* -*- c++ -*- */
/* Copyright 2012 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
*/
#ifndef INCLUDED_DIGITAL_OFDM_EQUALIZER_BASE_H
#define INCLUDED_DIGITAL_OFDM_EQUALIZER_BASE_H
#include <gnuradio/digital/api.h>
#include <gnuradio/gr_complex.h>
#include <gnuradio/tags.h>
namespace gr {
namespace digital {
/*!
* \brief Base class for implementation details of frequency-domain OFDM equalizers.
* \ingroup ofdm_blk
* \ingroup equalizers_blk
*/
class DIGITAL_API ofdm_equalizer_base
: public std::enable_shared_from_this<ofdm_equalizer_base>
{
protected:
int d_fft_len;
public:
typedef std::shared_ptr<ofdm_equalizer_base> sptr;
ofdm_equalizer_base(int fft_len);
virtual ~ofdm_equalizer_base();
//! Reset the channel information state knowledge
virtual void reset() = 0;
//! Run the actual equalization
virtual 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>()) = 0;
//! Return the current channel state
virtual void get_channel_state(std::vector<gr_complex>& taps) = 0;
int fft_len() { return d_fft_len; };
sptr base() { return shared_from_this(); };
};
/* \brief Base class for implementation details of 1-dimensional OFDM FDEs which use pilot
* tones. \ingroup digital
*
*/
class DIGITAL_API ofdm_equalizer_1d_pilots : public ofdm_equalizer_base
{
protected:
//! If \p d_occupied_carriers[k][l] is true, symbol k, carrier l is carrying data.
// (this is a different format than occupied_carriers!)
std::vector<bool> d_occupied_carriers;
//! If \p d_pilot_carriers[k][l] is true, symbol k, carrier l is carrying data.
// (this is a different format than pilot_carriers!)
std::vector<std::vector<bool>> d_pilot_carriers;
//! If \p d_pilot_carriers[k][l] is true, d_pilot_symbols[k][l] is its tx'd value.
// (this is a different format than pilot_symbols!)
std::vector<std::vector<gr_complex>> d_pilot_symbols;
//! In case the frame doesn't begin with OFDM symbol 0, this is the index of the first
//! symbol
int d_symbols_skipped;
//! The current position in the set of pilot symbols
int d_pilot_carr_set;
//! Vector of length d_fft_len saving the current channel state (on the occupied
//! carriers)
std::vector<gr_complex> d_channel_state;
public:
typedef std::shared_ptr<ofdm_equalizer_1d_pilots> sptr;
ofdm_equalizer_1d_pilots(int fft_len,
const std::vector<std::vector<int>>& occupied_carriers,
const std::vector<std::vector<int>>& pilot_carriers,
const std::vector<std::vector<gr_complex>>& pilot_symbols,
int symbols_skipped,
bool input_is_shifted);
~ofdm_equalizer_1d_pilots() override;
void reset() override;
void get_channel_state(std::vector<gr_complex>& taps) override;
};
} /* namespace digital */
} /* namespace gr */
#endif /* INCLUDED_DIGITAL_OFDM_EQUALIZER_BASE_H */
gr::digital::ofdm_equalizer_1d_pilots::d_symbols_skipped
int d_symbols_skipped
In case the frame doesn't begin with OFDM symbol 0, this is the index of the first symbol.
Definition ofdm_equalizer_base.h:70
gr::digital::ofdm_equalizer_1d_pilots::reset
void reset() override
Reset the channel information state knowledge.
gr::digital::ofdm_equalizer_1d_pilots::ofdm_equalizer_1d_pilots
ofdm_equalizer_1d_pilots(int fft_len, const std::vector< std::vector< int > > &occupied_carriers, const std::vector< std::vector< int > > &pilot_carriers, const std::vector< std::vector< gr_complex > > &pilot_symbols, int symbols_skipped, bool input_is_shifted)
gr::digital::ofdm_equalizer_1d_pilots::d_pilot_carriers
std::vector< std::vector< bool > > d_pilot_carriers
If d_pilot_carriers[k][l] is true, symbol k, carrier l is carrying data.
Definition ofdm_equalizer_base.h:64
gr::digital::ofdm_equalizer_1d_pilots::get_channel_state
void get_channel_state(std::vector< gr_complex > &taps) override
Return the current channel state.
gr::digital::ofdm_equalizer_1d_pilots::d_pilot_carr_set
int d_pilot_carr_set
The current position in the set of pilot symbols.
Definition ofdm_equalizer_base.h:72
gr::digital::ofdm_equalizer_1d_pilots::sptr
std::shared_ptr< ofdm_equalizer_1d_pilots > sptr
Definition ofdm_equalizer_base.h:78
gr::digital::ofdm_equalizer_1d_pilots::d_channel_state
std::vector< gr_complex > d_channel_state
Vector of length d_fft_len saving the current channel state (on the occupied carriers).
Definition ofdm_equalizer_base.h:75
gr::digital::ofdm_equalizer_1d_pilots::d_occupied_carriers
std::vector< bool > d_occupied_carriers
If d_occupied_carriers[k][l] is true, symbol k, carrier l is carrying data.
Definition ofdm_equalizer_base.h:61
gr::digital::ofdm_equalizer_1d_pilots::~ofdm_equalizer_1d_pilots
~ofdm_equalizer_1d_pilots() override
gr::digital::ofdm_equalizer_1d_pilots::d_pilot_symbols
std::vector< std::vector< gr_complex > > d_pilot_symbols
If d_pilot_carriers[k][l] is true, d_pilot_symbols[k][l] is its tx'd value.
Definition ofdm_equalizer_base.h:67
gr::digital::ofdm_equalizer_base::equalize
virtual 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 >())=0
Run the actual equalization.
gr::digital::ofdm_equalizer_base::get_channel_state
virtual void get_channel_state(std::vector< gr_complex > &taps)=0
Return the current channel state.
gr::digital::ofdm_equalizer_base::fft_len
int fft_len()
Definition ofdm_equalizer_base.h:47
gr::digital::ofdm_equalizer_base::base
sptr base()
Definition ofdm_equalizer_base.h:48
gr::digital::ofdm_equalizer_base::d_fft_len
int d_fft_len
Definition ofdm_equalizer_base.h:29
gr::digital::ofdm_equalizer_base::~ofdm_equalizer_base
virtual ~ofdm_equalizer_base()
gr::digital::ofdm_equalizer_base::ofdm_equalizer_base
ofdm_equalizer_base(int fft_len)
gr::digital::ofdm_equalizer_base::sptr
std::shared_ptr< ofdm_equalizer_base > sptr
Definition ofdm_equalizer_base.h:32
gr::digital::ofdm_equalizer_base::reset
virtual void reset()=0
Reset the channel information state knowledge.
api.h
DIGITAL_API
#define DIGITAL_API
Definition gr-digital/include/gnuradio/digital/api.h:18
gr_complex.h
gr_complex
std::complex< float > gr_complex
Definition gr_complex.h:15
taps
static constexpr float taps[NSTEPS+1][NTAPS]
Definition interpolator_taps.h:9
gr::digital
Definition adaptive_algorithm.h:22
gr
GNU Radio logging wrapper.
Definition basic_block.h:29
tags.h