First order low pass filter implementing the transfer function H(s) = \frac{1}{1+\tau s}.
More...
#include <filters.h>
|
| FirstOrderLowPassFilter (const double cutFrequency, const double sampleTime, const yarp::sig::Vector &y0=yarp::sig::Vector(1, 0.0)) |
| Creates a filter with specified parameters.
|
|
virtual | ~FirstOrderLowPassFilter () |
| Destructor.
|
|
virtual void | init (const yarp::sig::Vector &y0) |
| Internal state reset.
|
|
bool | setCutFrequency (const double cutFrequency) |
| Change the cut frequency of the filter.
|
|
bool | setSampleTime (const double sampleTime) |
| Change the sample time of the filter.
|
|
double | getCutFrequency () |
| Retrieve the cut frequency of the filter.
|
|
double | getSampleTime () |
| Retrieve the sample time of the filter.
|
|
virtual const yarp::sig::Vector & | filt (const yarp::sig::Vector &u) |
| Performs filtering on the actual input.
|
|
virtual const yarp::sig::Vector & | output () const |
| Return current filter output.
|
|
virtual | ~IFilter () |
| Destructor.
|
|
First order low pass filter implementing the transfer function H(s) = \frac{1}{1+\tau s}.
Definition at line 243 of file filters.h.
◆ FirstOrderLowPassFilter()
FirstOrderLowPassFilter::FirstOrderLowPassFilter |
( |
const double |
cutFrequency, |
|
|
const double |
sampleTime, |
|
|
const yarp::sig::Vector & |
y0 = yarp::sig::Vector(1,0.0) |
|
) |
| |
Creates a filter with specified parameters.
- Parameters
-
cutFrequency | cut frequency (Hz). |
sampleTime | sample time (s). |
y0 | initial output. |
Definition at line 218 of file filters.cpp.
◆ ~FirstOrderLowPassFilter()
FirstOrderLowPassFilter::~FirstOrderLowPassFilter |
( |
| ) |
|
|
virtual |
◆ computeCoeff()
void FirstOrderLowPassFilter::computeCoeff |
( |
| ) |
|
|
protected |
◆ filt()
const Vector & FirstOrderLowPassFilter::filt |
( |
const yarp::sig::Vector & |
u | ) |
|
|
virtual |
Performs filtering on the actual input.
- Parameters
-
u | reference to the actual input. |
- Returns
- the corresponding output.
Implements iCub::ctrl::IFilter.
Definition at line 272 of file filters.cpp.
◆ getCutFrequency()
double iCub::ctrl::FirstOrderLowPassFilter::getCutFrequency |
( |
| ) |
|
|
inline |
Retrieve the cut frequency of the filter.
- Returns
- the cut frequency (Hz).
Definition at line 290 of file filters.h.
◆ getSampleTime()
double iCub::ctrl::FirstOrderLowPassFilter::getSampleTime |
( |
| ) |
|
|
inline |
Retrieve the sample time of the filter.
- Returns
- the sample time (s).
Definition at line 296 of file filters.h.
◆ init()
void FirstOrderLowPassFilter::init |
( |
const yarp::sig::Vector & |
y0 | ) |
|
|
virtual |
◆ output()
virtual const yarp::sig::Vector & iCub::ctrl::FirstOrderLowPassFilter::output |
( |
| ) |
const |
|
inlinevirtual |
◆ setCutFrequency()
bool FirstOrderLowPassFilter::setCutFrequency |
( |
const double |
cutFrequency | ) |
|
Change the cut frequency of the filter.
- Parameters
-
cutFrequency | the new cut frequency (Hz). |
Definition at line 246 of file filters.cpp.
◆ setSampleTime()
bool FirstOrderLowPassFilter::setSampleTime |
( |
const double |
sampleTime | ) |
|
Change the sample time of the filter.
- Parameters
-
sampleTime | the new sample time (s). |
Definition at line 259 of file filters.cpp.
◆ fc
double iCub::ctrl::FirstOrderLowPassFilter::fc |
|
protected |
◆ filter
Filter* iCub::ctrl::FirstOrderLowPassFilter::filter |
|
protected |
◆ Ts
double iCub::ctrl::FirstOrderLowPassFilter::Ts |
|
protected |
yarp::sig::Vector iCub::ctrl::FirstOrderLowPassFilter::y |
|
protected |
The documentation for this class was generated from the following files:
- icub-main/src/libraries/ctrlLib/include/iCub/ctrl/filters.h
- icub-main/src/libraries/ctrlLib/src/filters.cpp