XBotInterface  2.4.1
XBotInterface provides a generic API to model and control a robot.
Public Types | Public Member Functions | List of all members
XBot::Utils::SecondOrderFilter< SignalType > Class Template Reference

SecondOrderFilter implements a canonical continuous-time second order filter with transfer function 1 P(s) = --------------------—, w = natural frequency, eps = damping ratio (s/w)^2 + 2*eps/w*s + 1. More...

#include <Utils.h>

+ Collaboration diagram for XBot::Utils::SecondOrderFilter< SignalType >:

Public Types

typedef std::shared_ptr< SecondOrderFilter< SignalType > > Ptr
 

Public Member Functions

 SecondOrderFilter ()
 
 SecondOrderFilter (double omega, double eps, double ts, const SignalType &initial_state)
 
void reset (const SignalType &initial_state)
 
const SignalType & process (const SignalType &input)
 
const SignalType & getOutput () const
 
void setOmega (double omega)
 
double getOmega ()
 
void setDamping (double eps)
 
double getDamping ()
 
void setTimeStep (double ts)
 
double getTimeStep ()
 

Detailed Description

template<typename SignalType>
class XBot::Utils::SecondOrderFilter< SignalType >

SecondOrderFilter implements a canonical continuous-time second order filter with transfer function 1 P(s) = --------------------—, w = natural frequency, eps = damping ratio (s/w)^2 + 2*eps/w*s + 1.

and discretized according to a trapezoidal (aka Tustin) scheme. This yields a difference equation of the following form:

 a0*y + a1*yd + a2*ydd = u + b1*ud + b2*udd

where yd = y(k-1), ydd = y(k-2) and so on (d = delayed).

Member Typedef Documentation

◆ Ptr

template<typename SignalType >
typedef std::shared_ptr<SecondOrderFilter<SignalType> > XBot::Utils::SecondOrderFilter< SignalType >::Ptr

Constructor & Destructor Documentation

◆ SecondOrderFilter() [1/2]

template<typename SignalType >
XBot::Utils::SecondOrderFilter< SignalType >::SecondOrderFilter ( )
inline

◆ SecondOrderFilter() [2/2]

template<typename SignalType >
XBot::Utils::SecondOrderFilter< SignalType >::SecondOrderFilter ( double  omega,
double  eps,
double  ts,
const SignalType &  initial_state 
)
inline

Member Function Documentation

◆ getDamping()

template<typename SignalType >
double XBot::Utils::SecondOrderFilter< SignalType >::getDamping ( )
inline

◆ getOmega()

template<typename SignalType >
double XBot::Utils::SecondOrderFilter< SignalType >::getOmega ( )
inline

◆ getOutput()

template<typename SignalType >
const SignalType& XBot::Utils::SecondOrderFilter< SignalType >::getOutput ( ) const
inline

◆ getTimeStep()

template<typename SignalType >
double XBot::Utils::SecondOrderFilter< SignalType >::getTimeStep ( )
inline

◆ process()

template<typename SignalType >
const SignalType& XBot::Utils::SecondOrderFilter< SignalType >::process ( const SignalType &  input)
inline

◆ reset()

template<typename SignalType >
void XBot::Utils::SecondOrderFilter< SignalType >::reset ( const SignalType &  initial_state)
inline

◆ setDamping()

template<typename SignalType >
void XBot::Utils::SecondOrderFilter< SignalType >::setDamping ( double  eps)
inline

◆ setOmega()

template<typename SignalType >
void XBot::Utils::SecondOrderFilter< SignalType >::setOmega ( double  omega)
inline

◆ setTimeStep()

template<typename SignalType >
void XBot::Utils::SecondOrderFilter< SignalType >::setTimeStep ( double  ts)
inline

The documentation for this class was generated from the following file: