GNU Radio's ADAPT Package
iqrd_rls_filter_ff.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2018 <+YOU OR YOUR COMPANY+>.
4 *
5 * This is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3, or (at your option)
8 * any later version.
9 *
10 * This software is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this software; see the file COPYING. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street,
18 * Boston, MA 02110-1301, USA.
19 */
20
21
22#ifndef INCLUDED_ADAPT_IQRD_RLS_FILTER_FF_H
23#define INCLUDED_ADAPT_IQRD_RLS_FILTER_FF_H
24
25#include <adapt/api.h>
26#include <gnuradio/sync_decimator.h>
27
28namespace gr {
29namespace adapt {
30
31/*!
32 * \brief Inverse QR Decomposition Recursive Least Squares Adaptive Filter (float in/out)
33 * \ingroup adapt
34 *
35 * \details
36 * This block implements an IQRD-RLS-based adaptive filter.
37 */
38class ADAPT_API iqrd_rls_filter_ff : virtual public gr::sync_decimator {
39 public:
40 typedef boost::shared_ptr<iqrd_rls_filter_ff> sptr;
41
42 /*!
43 * Make an IQRD-RLS adaptive filter
44 *
45 * \param num_taps Number of taps in the filter (int)
46 * \param delta Regularization factor of the update loop (float)
47 * \param _lambda Forgetting factor of the update loop (float)
48 * \param skip Specifies how many samples are skipped between
49 * successive filter updates (unsigned)
50 * \param decimation Decimation rate of the filter (unsigned)
51 * \param adapt Controls whether filter taps are being updated (bool)
52 * \param reset Reset filter taps (bool)
53 */
54 static sptr make(int num_taps,
55 float delta,
56 float _lambda,
57 unsigned skip,
58 unsigned decimation,
59 bool adapt,
60 bool reset);
61
62 virtual void set_taps(const std::vector<float>& taps) = 0;
63 virtual const std::vector<float>& get_taps() = 0;
64 virtual float get_delta() const = 0;
65 virtual void set_delta(float delta) = 0;
66 virtual float get_lambda() const = 0;
67 virtual void set_lambda(float _lambda) = 0;
68 virtual unsigned get_skip() const = 0;
69 virtual void set_skip(unsigned skip) = 0;
70 virtual bool get_adapt() const = 0;
71 virtual void set_adapt(bool adapt) = 0;
72 virtual bool get_reset() const = 0;
73 virtual void set_reset(bool reset) = 0;
74};
75
76} // namespace adapt
77} // namespace gr
78
79#endif /* INCLUDED_ADAPT_IQRD_RLS_FILTER_FF_H */
#define ADAPT_API
Definition api.h:30
Inverse QR Decomposition Recursive Least Squares Adaptive Filter (float in/out)
Definition iqrd_rls_filter_ff.h:38
virtual void set_lambda(float _lambda)=0
static sptr make(int num_taps, float delta, float _lambda, unsigned skip, unsigned decimation, bool adapt, bool reset)
virtual void set_taps(const std::vector< float > &taps)=0
virtual void set_reset(bool reset)=0
virtual void set_skip(unsigned skip)=0
virtual float get_delta() const =0
virtual float get_lambda() const =0
boost::shared_ptr< iqrd_rls_filter_ff > sptr
Definition iqrd_rls_filter_ff.h:40
virtual bool get_reset() const =0
virtual void set_delta(float delta)=0
virtual void set_adapt(bool adapt)=0
virtual unsigned get_skip() const =0
virtual bool get_adapt() const =0
virtual const std::vector< float > & get_taps()=0
Definition iqrd_rls_filter_cc.h:28