LocalGuidance
A library that generates velocity references to follow a path.
robot_utils::ContinuousTimeTransferFunction< ValueType_, Order_ > Class Template Reference

#include <ContinuousTimeTransferFunction.hpp>

Inheritance diagram for robot_utils::ContinuousTimeTransferFunction< ValueType_, Order_ >:
Inheritance graph

Public Types

using BaseType = DiscreteTimeTransferFunction< ValueType_, Order_ >
 
using CoefficientArray = typename BaseType::CoefficientArray
 
- Public Types inherited from robot_utils::DiscreteTimeTransferFunction< ValueType_, Order_ >
using CoefficientArray = std::array< double, Size_ >
 

Public Member Functions

 ContinuousTimeTransferFunction ()=default
 
 ContinuousTimeTransferFunction (const double dt, const CoefficientArray &ctNumeratorCoefficients, const CoefficientArray &ctDenominatorCoefficients, const ValueType_ &y0=getDefaultValue< ValueType_ >())
 
 ~ContinuousTimeTransferFunction () override=default
 
void setContinuousTimeCoefficients (const double dt, const CoefficientArray &ctNumeratorCoefficients, const CoefficientArray &ctDenominatorCoefficients, const ValueType_ &y0=getDefaultValue< ValueType_ >())
 
- Public Member Functions inherited from robot_utils::DiscreteTimeTransferFunction< ValueType_, Order_ >
 DiscreteTimeTransferFunction ()=default
 
 DiscreteTimeTransferFunction (const CoefficientArray &numeratorCoefficients, const CoefficientArray &denominatorCoefficients, const ValueType_ &y0=getDefaultValue< ValueType_ >())
 
virtual ~DiscreteTimeTransferFunction ()=default
 
 EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF (traits::is_eigen_matrix< ValueType_ >::value) inline void setCoefficients(const CoefficientArray &numeratorCoefficients
 

Static Public Attributes

static constexpr unsigned int Size_ = BaseType::Size_
 
- Static Public Attributes inherited from robot_utils::DiscreteTimeTransferFunction< ValueType_, Order_ >
static constexpr unsigned int Size_ = Order_+1
 

Additional Inherited Members

- Public Attributes inherited from robot_utils::DiscreteTimeTransferFunction< ValueType_, Order_ >
const CoefficientArraydenominatorCoefficients
 
const CoefficientArray const ValueType_ & y0
 
const CoefficientArray const ValueType_ Size_ input_
 
std::array< ValueType_, Size_output_
 
CoefficientArray numeratorCoefficients_
 
CoefficientArray denominatorCoefficients_
 
double invA_n_ = 1.0
 

Detailed Description

template<typename ValueType_, unsigned int Order_>
class robot_utils::ContinuousTimeTransferFunction< ValueType_, Order_ >

This class implements a generic continuous time (CT) transfer function.

             b_0 + b_1 * s + b_2 * s^2 + ... + b_n * s^n

G(s) = ------------------------------------------— a_0 + a_1 * s + a_2 * s^2 + ... + a_n * s^n

The number of coefficients (n) in the numerator and denominator has to be equal. It is up to the user to fill unused entries with 0.

Internally the transfer function is transformed to discrete time (DT) using Tustin (or bilinear) transformation (which maps stable CT poles inside the unit circle in the Z domain) using a given sample time T:

       2      (z - 1)

s ~= — * -----— T (z + 1)

Member Typedef Documentation

template<typename ValueType_, unsigned int Order_>
using robot_utils::ContinuousTimeTransferFunction< ValueType_, Order_ >::BaseType = DiscreteTimeTransferFunction<ValueType_, Order_>
template<typename ValueType_, unsigned int Order_>
using robot_utils::ContinuousTimeTransferFunction< ValueType_, Order_ >::CoefficientArray = typename BaseType::CoefficientArray

Constructor & Destructor Documentation

template<typename ValueType_, unsigned int Order_>
robot_utils::ContinuousTimeTransferFunction< ValueType_, Order_ >::ContinuousTimeTransferFunction ( )
explicitdefault
template<typename ValueType_, unsigned int Order_>
robot_utils::ContinuousTimeTransferFunction< ValueType_, Order_ >::ContinuousTimeTransferFunction ( const double  dt,
const CoefficientArray ctNumeratorCoefficients,
const CoefficientArray ctDenominatorCoefficients,
const ValueType_ &  y0 = getDefaultValue<ValueType_>() 
)
inlineexplicit

Construct the transfer function with given sampling time and CT coefficients.

Parameters
dtSampling time T
numeratorCoefficientsThe CT numerator coefficients b_0, ..., b_n
denominatorCoefficientsThe CT denominator coefficients a_0, ..., a_n
y0Default value to initialize the inputs and outputs to
template<typename ValueType_, unsigned int Order_>
robot_utils::ContinuousTimeTransferFunction< ValueType_, Order_ >::~ContinuousTimeTransferFunction ( )
overridedefault

Member Function Documentation

template<typename ValueType_, unsigned int Order_>
void robot_utils::ContinuousTimeTransferFunction< ValueType_, Order_ >::setContinuousTimeCoefficients ( const double  dt,
const CoefficientArray ctNumeratorCoefficients,
const CoefficientArray ctDenominatorCoefficients,
const ValueType_ &  y0 = getDefaultValue<ValueType_>() 
)
inline

Set the CT coefficients of the transfer function with sampling time T. DT coefficients are calculated internally.

Parameters
dtSampling time T
numeratorCoefficientsThe CT numerator coefficients b_0, ..., b_n
denominatorCoefficientsThe CT denominator coefficients a_0, ..., a_n
y0Default value to initialize the inputs and outputs to

Member Data Documentation

template<typename ValueType_, unsigned int Order_>
constexpr unsigned int robot_utils::ContinuousTimeTransferFunction< ValueType_, Order_ >::Size_ = BaseType::Size_
static

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