GNU Radio Manual and C++ API Reference 3.7.14.0
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 * 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_FILTER_DC_BLOCKER_FF_H
24#define INCLUDED_FILTER_DC_BLOCKER_FF_H
25
26#include <gnuradio/filter/api.h>
27#include <gnuradio/sync_block.h>
28
29namespace gr {
30namespace filter {
31
32/*!
33 * \brief a computationally efficient controllable DC blocker
34 * \ingroup filter_blk
35 *
36 * \details
37 * This block implements a computationally efficient DC blocker
38 * that produces a tighter notch filter around DC for a smaller
39 * group delay than an equivalent FIR filter or using a single
40 * pole IIR filter (though the IIR filter is computationally
41 * cheaper).
42 *
43 * The block defaults to using a delay line of length 32 and the
44 * long form of the filter. Optionally, the delay line length can
45 * be changed to alter the width of the DC notch (longer lines
46 * will decrease the width).
47 *
48 * The long form of the filter produces a nearly flat response
49 * outside of the notch but at the cost of a group delay of 2D-2.
50 *
51 * The short form of the filter does not have as flat a response
52 * in the passband but has a group delay of only D-1 and is
53 * cheaper to compute.
54 *
55 * The theory behind this block can be found in the paper:
56 *
57 * <B><EM>R. Yates, "DC Blocker Algorithms," IEEE Signal Processing Magazine,
58 * Mar. 2008, pp 132-134.</EM></B>
59 */
60class FILTER_API dc_blocker_ff : virtual public sync_block
61{
62public:
63 // gr::filter::dc_blocker_ff::sptr
64 typedef boost::shared_ptr<dc_blocker_ff> sptr;
65
66 /*!
67 * Make a DC blocker block.
68 *
69 * \param D (int) the length of the delay line
70 * \param long_form (bool) whether to use long (true, default) or short form
71 */
72 static sptr make(int D, bool long_form = true);
73
74 virtual int group_delay() = 0;
75};
76
77} /* namespace filter */
78} /* namespace gr */
79
80#endif /* INCLUDED_FILTER_DC_BLOCKER_FF_H */
a computationally efficient controllable DC blocker
Definition: dc_blocker_ff.h:61
boost::shared_ptr< dc_blocker_ff > sptr
Definition: dc_blocker_ff.h:64
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:38
#define FILTER_API
Definition: gr-filter/include/gnuradio/filter/api.h:30
Include this header to use the message passing features.
Definition: basic_block.h:45