$search

filters::SingleChannelTransferFunctionFilter< T > Class Template Reference

One-dimensional digital filter class. More...

#include <transfer_function.h>

Inheritance diagram for filters::SingleChannelTransferFunctionFilter< T >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual bool configure ()
 Configure the filter with the correct number of channels and params.
 SingleChannelTransferFunctionFilter ()
 Construct the filter.
virtual bool update (const T &data_in, T &data_out)
 Update the filter and return the data seperately.
 ~SingleChannelTransferFunctionFilter ()
 Destructor to clean up.

Protected Attributes

std::vector< double > a_
std::vector< double > b_
boost::scoped_ptr
< RealtimeCircularBuffer< T > > 
input_buffer_
boost::scoped_ptr
< RealtimeCircularBuffer< T > > 
output_buffer_
temp_

Detailed Description

template<typename T>
class filters::SingleChannelTransferFunctionFilter< T >

One-dimensional digital filter class.

This class calculates the output for $N$ one-dimensional digital filters. The filter is described by vectors $a$ and $b$ and implemented using the standard difference equation:

\begin{eqnarray*} a[0]*y[n] = b[0]*x[n] &+& b[1]*x[n-1]+ ... + b[n_b]*x[n-n_b]\\ &-& a[1]*y[n-1]- ... - a[n_a]*y[n-n_a] \end{eqnarray*}


If $a[0]$ is not equal to 1, the coefficients are normalized by $a[0]$.

Example xml config:

<filter type="TransferFunctionFilter" name="filter_name">
<params a="1.0 0.5" b="0.2 0.2">
</filter>

Definition at line 74 of file transfer_function.h.


Constructor & Destructor Documentation

Construct the filter.

Definition at line 113 of file transfer_function.h.

Destructor to clean up.

Definition at line 118 of file transfer_function.h.


Member Function Documentation

template<typename T >
bool filters::SingleChannelTransferFunctionFilter< T >::configure (  )  [inline, virtual]

Configure the filter with the correct number of channels and params.

Parameters:
number_of_channels The number of inputs filtered.
config The xml that is parsed to configure the filter.

Todo:
check length
Todo:
check length

Implements filters::FilterBase< T >.

Definition at line 123 of file transfer_function.h.

template<typename T >
bool filters::SingleChannelTransferFunctionFilter< T >::update ( const T &  data_in,
T &  data_out 
) [inline, virtual]

Update the filter and return the data seperately.

Parameters:
data_in vector<T> with number_of_channels elements
data_out vector<T> with number_of_channels elements

Implements filters::FilterBase< T >.

Definition at line 170 of file transfer_function.h.


Member Data Documentation

template<typename T>
std::vector<double> filters::SingleChannelTransferFunctionFilter< T >::a_ [protected]

Definition at line 107 of file transfer_function.h.

template<typename T>
std::vector<double> filters::SingleChannelTransferFunctionFilter< T >::b_ [protected]

Definition at line 108 of file transfer_function.h.

template<typename T>
boost::scoped_ptr<RealtimeCircularBuffer<T > > filters::SingleChannelTransferFunctionFilter< T >::input_buffer_ [protected]

Definition at line 102 of file transfer_function.h.

template<typename T>
boost::scoped_ptr<RealtimeCircularBuffer<T > > filters::SingleChannelTransferFunctionFilter< T >::output_buffer_ [protected]

Definition at line 103 of file transfer_function.h.

template<typename T>
T filters::SingleChannelTransferFunctionFilter< T >::temp_ [protected]

Definition at line 105 of file transfer_function.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Defines


filters
Author(s): Tully Foote/tfoote@willowgarage.com
autogenerated on Fri Mar 1 15:29:55 2013