GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
dc_blocker_ff.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  * SPDX-License-Identifier: GPL-3.0-or-later
8  *
9  */
10 
11 #ifndef INCLUDED_FILTER_DC_BLOCKER_FF_H
12 #define INCLUDED_FILTER_DC_BLOCKER_FF_H
13 
14 #include <gnuradio/filter/api.h>
15 #include <gnuradio/sync_block.h>
16 
17 namespace gr {
18 namespace filter {
19 
20 /*!
21  * \brief a computationally efficient controllable DC blocker
22  * \ingroup filter_blk
23  *
24  * \details
25  * This block implements a computationally efficient DC blocker
26  * that produces a tighter notch filter around DC for a smaller
27  * group delay than an equivalent FIR filter or using a single
28  * pole IIR filter (though the IIR filter is computationally
29  * cheaper).
30  *
31  * The block defaults to using a delay line of length 32 and the
32  * long form of the filter. Optionally, the delay line length can
33  * be changed to alter the width of the DC notch (longer lines
34  * will decrease the width).
35  *
36  * The long form of the filter produces a nearly flat response
37  * outside of the notch but at the cost of a group delay of 2D-2.
38  *
39  * The short form of the filter does not have as flat a response
40  * in the passband but has a group delay of only D-1 and is
41  * cheaper to compute.
42  *
43  * The theory behind this block can be found in the paper:
44  *
45  * <B><EM>R. Yates, "DC Blocker Algorithms," IEEE Signal Processing Magazine,
46  * Mar. 2008, pp 132-134.</EM></B>
47  */
48 class FILTER_API dc_blocker_ff : virtual public sync_block
49 {
50 public:
51  // gr::filter::dc_blocker_ff::sptr
52  typedef std::shared_ptr<dc_blocker_ff> sptr;
53 
54  /*!
55  * Make a DC blocker block.
56  *
57  * \param D (int) the length of the delay line
58  * \param long_form (bool) whether to use long (true, default) or short form
59  */
60  static sptr make(int D, bool long_form = true);
61 
62  virtual int group_delay() = 0;
63 };
64 
65 } /* namespace filter */
66 } /* namespace gr */
67 
68 #endif /* INCLUDED_FILTER_DC_BLOCKER_FF_H */
#define D(...)
Definition: basic_block_pydoc_template.h:10
a computationally efficient controllable DC blocker
Definition: dc_blocker_ff.h:49
std::shared_ptr< dc_blocker_ff > sptr
Definition: dc_blocker_ff.h:52
static sptr make(int D, bool long_form=true)
virtual int group_delay()=0
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