GNU Radio Manual and C++ API Reference 3.8.5.0
The Free & Open Software Radio Ecosystem
 
Loading...
Searching...
No Matches
lms_dd_equalizer_cc.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2011,2012 Free Software Foundation, Inc.
4 *
5 * This file is part of GNU Radio
6 *
7 * GNU Radio is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3, or (at your option)
10 * any later version.
11 *
12 * GNU Radio is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with GNU Radio; see the file COPYING. If not, write to
19 * the Free Software Foundation, Inc., 51 Franklin Street,
20 * Boston, MA 02110-1301, USA.
21 */
22
23#ifndef INCLUDED_DIGITAL_LMS_DD_EQUALIZER_CC_H
24#define INCLUDED_DIGITAL_LMS_DD_EQUALIZER_CC_H
25
29
30namespace gr {
31namespace digital {
32
33/*!
34 * \brief Least-Mean-Square Decision Directed Equalizer (complex in/out)
35 * \ingroup equalizers_blk
36 *
37 * \details
38 * This block implements an LMS-based decision-directed equalizer.
39 * It uses a set of weights, w, to correlate against the inputs,
40 * u, and a decisions is then made from this output. The error in
41 * the decision is used to update the weight vector.
42 *
43 * y[n] = conj(w[n]) u[n]
44 * d[n] = decision(y[n])
45 * e[n] = d[n] - y[n]
46 * w[n+1] = w[n] + mu u[n] conj(e[n])
47 *
48 * Where mu is a gain value (between 0 and 1 and usually small,
49 * around 0.001 - 0.01.
50 *
51 * This block uses the digital_constellation object for making the
52 * decision from y[n]. Create the constellation object for
53 * whatever constellation is to be used and pass in the object.
54 * In Python, you can use something like:
55 *
56 * self.constellation = digital.constellation_qpsk()
57 *
58 * To create a QPSK constellation (see the digital_constellation
59 * block for more details as to what constellations are available
60 * or how to create your own). You then pass the object to this
61 * block as an sptr, or using "self.constellation.base()".
62 *
63 * The theory for this algorithm can be found in Chapter 9 of:
64 * S. Haykin, Adaptive Filter Theory, Upper Saddle River, NJ:
65 * Prentice Hall, 1996.
66 */
68{
69protected:
70 virtual gr_complex error(const gr_complex& out) = 0;
71 virtual void update_tap(gr_complex& tap, const gr_complex& in) = 0;
72
73public:
74 // gr::digital::lms_dd_equalizer_cc::sptr
75 typedef boost::shared_ptr<lms_dd_equalizer_cc> sptr;
76
77 /*!
78 * Make an LMS decision-directed equalizer
79 *
80 * \param num_taps Number of taps in the equalizer (channel size)
81 * \param mu Gain of the update loop
82 * \param sps Number of samples per symbol of the input signal
83 * \param cnst A constellation derived from class
84 * 'constellation'. Use base() method to get a shared pointer to
85 * this base class type.
86 */
87 static sptr make(int num_taps, float mu, int sps, constellation_sptr cnst);
88
89 virtual void set_taps(const std::vector<gr_complex>& taps) = 0;
90 virtual std::vector<gr_complex> taps() const = 0;
91 virtual float gain() const = 0;
92 virtual void set_gain(float mu) = 0;
93};
94
95} /* namespace digital */
96} /* namespace gr */
97
98#endif /* INCLUDED_DIGITAL_LMS_DD_EQUALIZER_CC_H */
Least-Mean-Square Decision Directed Equalizer (complex in/out)
Definition lms_dd_equalizer_cc.h:68
virtual gr_complex error(const gr_complex &out)=0
virtual std::vector< gr_complex > taps() const =0
boost::shared_ptr< lms_dd_equalizer_cc > sptr
Definition lms_dd_equalizer_cc.h:75
virtual void set_gain(float mu)=0
virtual float gain() const =0
virtual void set_taps(const std::vector< gr_complex > &taps)=0
static sptr make(int num_taps, float mu, int sps, constellation_sptr cnst)
virtual void update_tap(gr_complex &tap, const gr_complex &in)=0
synchronous N:1 input to output with history
Definition sync_decimator.h:38
#define DIGITAL_API
Definition gr-digital/include/gnuradio/digital/api.h:30
std::complex< float > gr_complex
Definition gr_complex.h:27
static const float taps[NSTEPS+1][NTAPS]
Definition interpolator_taps.h:9
GNU Radio logging wrapper for log4cpp library (C++ port of log4j)
Definition basic_block.h:46