GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
single_pole_iir_filter_cc.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2004-2006,2012 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_SINGLE_POLE_IIR_FILTER_CC_H
12 #define INCLUDED_SINGLE_POLE_IIR_FILTER_CC_H
13 
14 #include <gnuradio/filter/api.h>
16 #include <gnuradio/gr_complex.h>
17 #include <gnuradio/sync_block.h>
18 
19 namespace gr {
20 namespace filter {
21 
22 /*!
23  * \brief single pole IIR filter with complex input, complex output
24  * \ingroup filter_blk
25  *
26  * \details
27  * The input and output satisfy a difference equation of the form
28  \htmlonly
29  \f{
30  y[n] - (1-alpha) y[n-1] = alpha x[n]
31  \f}
32  \endhtmlonly
33 
34  \xmlonly
35  y[n] - (1-alpha) y[n-1] = alpha x[n]
36  \endxmlonly
37 
38  * with the corresponding rational system function
39  \htmlonly
40  \f{
41  H(z) = \frac{alpha}{1 - (1-alpha) z^{-1}}
42  \f}
43  \endhtmlonly
44 
45  \xmlonly
46  H(z) = \ frac{alpha}{1 - (1-alpha) z^{-1}}
47  \endxmlonly
48 
49  * Note that some texts define the system function with a + in the
50  * denominator. If you're using that convention, you'll need to
51  * negate the feedback tap.
52  */
54 {
55 public:
56  // gr::filter::single_pole_iir_filter_cc::sptr
57  typedef std::shared_ptr<single_pole_iir_filter_cc> sptr;
58 
59  static sptr make(double alpha, unsigned int vlen = 1);
60 
61  virtual void set_taps(double alpha) = 0;
62 };
63 
64 } /* namespace filter */
65 } /* namespace gr */
66 
67 #endif /* INCLUDED_SINGLE_POLE_IIR_FILTER_CC_H */
single pole IIR filter with complex input, complex output
Definition: single_pole_iir_filter_cc.h:54
std::shared_ptr< single_pole_iir_filter_cc > sptr
Definition: single_pole_iir_filter_cc.h:57
virtual void set_taps(double alpha)=0
static sptr make(double alpha, unsigned int vlen=1)
synchronous 1:1 input to output with history
Definition: sync_block.h:26
#define FILTER_API
Definition: gr-filter/include/gnuradio/filter/api.h:18
GNU Radio logging wrapper.
Definition: basic_block.h:29