GNU Radio v3.6.2-149-ga6d285d9 C++ API
|
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 <filter/api.h> 00027 #include <filter/single_pole_iir.h> 00028 #include <gr_sync_block.h> 00029 #include <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 * The input and output satisfy a difference equation of the form 00039 \htmlonly 00040 \f{ 00041 y[n] - (1-alpha) y[n-1] = alpha x[n] 00042 \f} 00043 \endhtmlonly 00044 00045 \xmlonly 00046 y[n] - (1-alpha) y[n-1] = alpha x[n] 00047 \endxmlonly 00048 00049 * with the corresponding rational system function 00050 \htmlonly 00051 \f{ 00052 H(z) = \frac{alpha}{1 - (1-alpha) z^{-1}} 00053 \f} 00054 \endhtmlonly 00055 00056 \xmlonly 00057 H(z) = \ frac{alpha}{1 - (1-alpha) z^{-1}} 00058 \endxmlonly 00059 00060 * Note that some texts define the system function with a + in the 00061 * denominator. If you're using that convention, you'll need to 00062 * negate the feedback tap. 00063 */ 00064 class FILTER_API single_pole_iir_filter_cc : virtual public gr_sync_block 00065 { 00066 public: 00067 // gr::filter::single_pole_iir_filter_cc::sptr 00068 typedef boost::shared_ptr<single_pole_iir_filter_cc> sptr; 00069 00070 static sptr make(double alpha, unsigned int vlen=1); 00071 00072 virtual void set_taps(double alpha) = 0; 00073 }; 00074 00075 } /* namespace filter */ 00076 } /* namespace gr */ 00077 00078 #endif /* INCLUDED_SINGLE_POLE_IIR_FILTER_CC_H */