GNU Radio Manual and C++ API Reference 3.7.14.0
The Free & Open Software Radio Ecosystem
mmse_interp_differentiator_cc.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright (C) 2002,2007,2012,2017 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 this file; 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#ifndef _MMSE_INTERP_DIFFERENTIATOR_CC_H_
23#define _MMSE_INTERP_DIFFERENTIATOR_CC_H_
24
25#include <gnuradio/filter/api.h>
27#include <gnuradio/gr_complex.h>
28#include <vector>
29
30namespace gr {
31namespace filter {
32
33/*!
34 * \brief Compute intermediate samples of the derivative of a signal
35 * between signal samples x(k*Ts)
36 * \ingroup filter_primitive
37 *
38 * \details
39 * This implements a Minimum Mean Squared Error interpolating
40 * differentiator with 8 taps. It is suitable for signals where the
41 * derivative of a signal has a bandwidth of interest in the range
42 * (-Fs/4, Fs/4), where Fs is the samples rate.
43 *
44 * Although mu, the fractional delay, is specified as a float, in
45 * the range [0.0, 1.0], it is actually quantized. That is, mu is
46 * quantized in the differentiate method to 128th's of a sample.
47 *
48 */
50{
51public:
54
55 unsigned ntaps() const;
56 unsigned nsteps() const;
57
58 /*!
59 * \brief compute a single interpolated differentiated output value.
60 *
61 * \p input must have ntaps() valid entries.
62 * input[0] .. input[ntaps() - 1] are referenced to compute the output
63 * value.
64 *
65 * \p mu must be in the range [0, 1] and specifies the fractional delay.
66 *
67 * \throws std::runtime_error if mu is not in the range [0, 1].
68 *
69 * \returns the interpolated differentiated output value.
70 */
71 gr_complex differentiate(const gr_complex input[], float mu) const;
72
73protected:
74 std::vector<kernel::fir_filter_ccf*> filters;
75};
76
77} /* namespace filter */
78} /* namespace gr */
79
80#endif /* _MMSE_INTERP_DIFFERENTIATOR_CC_H_ */
Compute intermediate samples of the derivative of a signal between signal samples x(k*Ts)
Definition: mmse_interp_differentiator_cc.h:50
std::vector< kernel::fir_filter_ccf * > filters
Definition: mmse_interp_differentiator_cc.h:74
gr_complex differentiate(const gr_complex input[], float mu) const
compute a single interpolated differentiated output value.
#define FILTER_API
Definition: gr-filter/include/gnuradio/filter/api.h:30
std::complex< float > gr_complex
Definition: gr_complex.h:27
Include this header to use the message passing features.
Definition: basic_block.h:45