GNU Radio C++ API Reference: decision_feedback_equalizer.h Source File

| GNU Radio C++ API Reference 3.10.12.0 The Free & Open Software Radio Ecosystem |

Loading...
Searching...
No Matches
decision_feedback_equalizer.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2020 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#ifndef INCLUDED_DIGITAL_DECISION_FEEDBACK_EQUALIZER_H
12#define INCLUDED_DIGITAL_DECISION_FEEDBACK_EQUALIZER_H
13
14#include <gnuradio/digital/adaptive_algorithm.h>
15#include <gnuradio/digital/api.h>
16#include <gnuradio/sync_decimator.h>
17
18namespace gr {
19namespace digital {
20
21/*!
22 * \brief Decision Feedback Equalizer
23 * \ingroup equalizers
24 *
25 */
26 class DIGITAL_API decision_feedback_equalizer : virtual public gr::sync_decimator
27{
28public:
29 typedef std::shared_ptr<decision_feedback_equalizer> sptr;
30
31 /*!
32 * \brief Return a shared_ptr to a new instance of
33 * gr::digital::decision_feedback_equalizer.
34 *
35 * The Decision Feedback Equalizer block equalizes the incoming signal using an
36 * FIR filter representing both the forward and feedback taps
37 *
38 * If provided with a training sequence and a training start tag, data aided
39 * equalization will be performed starting with the tagged sample. If training-based
40 * equalization is active and the training sequence ends, then optionally decision
41 * directed equalization will be performed given the adapt_after_training If no
42 * training sequence or no tag is provided, decision directed equalization will be
43 * performed
44 * This equalizer decimates to the symbol rate according to the samples per symbol
45 * param
46 *
47 * \param num_taps_forward Number of feedforward taps for the FIR filter
48 * \param num_taps_feedback Number of feedback taps for the FIR filter
49 * \param sps int - Samples per Symbol
50 * \param alg Adaptive algorithm object
51 * \param training_sequence Sequence of samples that will be used to train the
52 * equalizer. Provide empty vector to default to DD equalizer
53 * \param adapt_after_training bool - set true to continue DD training after training
54 * sequence has been used up
55 * \param training_start_tag string - tag that indicates the start
56 * of the training sequence in the incoming data
57 */
58 static sptr
59 make(unsigned num_taps_forward,
60 unsigned num_taps_feedback,
61 unsigned sps,
62 adaptive_algorithm_sptr alg,
63 bool adapt_after_training = true,
64 std::vector<gr_complex> training_sequence = std::vector<gr_complex>(),
65 const std::string& training_start_tag = "");
66
67 virtual void set_taps(const std::vector<gr_complex>& taps) = 0;
68 virtual std::vector<gr_complex> taps() const = 0;
69
70 /*!
71 * \brief Public "work" function - equalize a block of input samples
72 * \details Behaves similar to the block's work function, but made public
73 * to be able to be called outside the GNU Radio scheduler on bursty data
74 * \param input_samples Buffer of input samples to equalize
75 * \param output_symbols Buffer of output symbols post equalization
76 * \param num_inputs Number of input samples provided
77 * \param max_num_outputs Size of output_symbols buffer to write into
78 * \param training_start_samples Vector of starting positions of training sequences
79 * within the input_samples buffer
80 * \param history_included Flag to indicate whether history has been provided at
81 * the beginning of the input_samples buffer, as would normally be provided in a
82 * work() call. The work() function of this block sets this to true, but in bursty
83 * operation, this should be set to false
84 * \param taps Optional output vector buffer of tap weights calculated at
85 * each sample of the output
86 * \param state Optional output state of the equalizer for debug {IDLE,
87 * TRAINING, DD}
88 */
89 virtual int equalize(
90 const gr_complex* input_samples,
91 gr_complex* output_symbols,
92 unsigned int num_inputs,
93 unsigned int max_num_outputs,
94 std::vector<unsigned int> training_start_samples = std::vector<unsigned int>(0),
95 bool history_included = false,
96 gr_complex* taps = nullptr,
97 unsigned short* state = nullptr) = 0;
98};
99
100} // namespace digital
101} // namespace gr
102
103#endif /* INCLUDED_DIGITAL_DECISION_FEEDBACK_EQUALIZER_H */
adaptive_algorithm.h
gr::digital::decision_feedback_equalizer
Decision Feedback Equalizer.
Definition decision_feedback_equalizer.h:27
gr::digital::decision_feedback_equalizer::make
static sptr make(unsigned num_taps_forward, unsigned num_taps_feedback, unsigned sps, adaptive_algorithm_sptr alg, bool adapt_after_training=true, std::vector< gr_complex > training_sequence=std::vector< gr_complex >(), const std::string &training_start_tag="")
Return a shared_ptr to a new instance of gr::digital::decision_feedback_equalizer.
gr::digital::decision_feedback_equalizer::taps
virtual std::vector< gr_complex > taps() const =0
gr::digital::decision_feedback_equalizer::equalize
virtual int equalize(const gr_complex *input_samples, gr_complex *output_symbols, unsigned int num_inputs, unsigned int max_num_outputs, std::vector< unsigned int > training_start_samples=std::vector< unsigned int >(0), bool history_included=false, gr_complex *taps=nullptr, unsigned short *state=nullptr)=0
Public "work" function - equalize a block of input samples.
gr::digital::decision_feedback_equalizer::sptr
std::shared_ptr< decision_feedback_equalizer > sptr
Definition decision_feedback_equalizer.h:29
gr::digital::decision_feedback_equalizer::set_taps
virtual void set_taps(const std::vector< gr_complex > &taps)=0
gr::sync_decimator
synchronous N:1 input to output with history
Definition sync_decimator.h:26
api.h
DIGITAL_API
#define DIGITAL_API
Definition gr-digital/include/gnuradio/digital/api.h:18
gr_complex
std::complex< float > gr_complex
Definition gr_complex.h:15
gr::digital
Definition adaptive_algorithm.h:22
gr
GNU Radio logging wrapper.
Definition basic_block.h:29
sync_decimator.h