GNU Radio 3.7.1 C++ API
single_pole_iir_filter_cc.h
Go to the documentation of this file.
00001 /* -*- c++ -*- */
00002 /*
00003  * Copyright 2004-2006,2012 Free Software Foundation, Inc.
00004  *
00005  * This file is part of GNU Radio
00006  *
00007  * GNU Radio is free software; you can redistribute it and/or modify
00008  * it under the terms of the GNU General Public License as published by
00009  * the Free Software Foundation; either version 3, or (at your option)
00010  * any later version.
00011  *
00012  * GNU Radio is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with GNU Radio; see the file COPYING.  If not, write to
00019  * the Free Software Foundation, Inc., 51 Franklin Street,
00020  * Boston, MA 02110-1301, USA.
00021  */
00022 
00023 #ifndef INCLUDED_SINGLE_POLE_IIR_FILTER_CC_H
00024 #define INCLUDED_SINGLE_POLE_IIR_FILTER_CC_H
00025 
00026 #include <gnuradio/filter/api.h>
00027 #include <gnuradio/filter/single_pole_iir.h>
00028 #include <gnuradio/sync_block.h>
00029 #include <gnuradio/gr_complex.h>
00030 
00031 namespace gr {
00032   namespace filter {
00033     
00034     /*!
00035      * \brief  single pole IIR filter with complex input, complex output
00036      * \ingroup filter_blk
00037      *
00038      * \details
00039      * The input and output satisfy a difference equation of the form
00040      \htmlonly
00041      \f{
00042      y[n] - (1-alpha) y[n-1] = alpha x[n]
00043      \f}
00044      \endhtmlonly
00045 
00046      \xmlonly
00047      y[n] - (1-alpha) y[n-1] = alpha x[n]
00048      \endxmlonly
00049 
00050      * with the corresponding rational system function
00051      \htmlonly
00052      \f{
00053      H(z) = \frac{alpha}{1 - (1-alpha) z^{-1}}
00054      \f}
00055      \endhtmlonly
00056 
00057      \xmlonly
00058      H(z) = \ frac{alpha}{1 - (1-alpha) z^{-1}}
00059      \endxmlonly
00060      
00061      * Note that some texts define the system function with a + in the
00062      * denominator. If you're using that convention, you'll need to
00063      * negate the feedback tap.
00064      */
00065     class FILTER_API single_pole_iir_filter_cc : virtual public sync_block
00066     {
00067     public:
00068       // gr::filter::single_pole_iir_filter_cc::sptr
00069       typedef boost::shared_ptr<single_pole_iir_filter_cc> sptr;
00070 
00071       static sptr make(double alpha, unsigned int vlen=1);
00072 
00073       virtual void set_taps(double alpha) = 0;
00074     };
00075 
00076   } /* namespace filter */
00077 } /* namespace gr */
00078 
00079 #endif /* INCLUDED_SINGLE_POLE_IIR_FILTER_CC_H */