Robotics Library  0.7.0
Public Member Functions | Public Attributes | Private Attributes | List of all members
rl::math::Pid< T > Class Template Reference

Proportional-Integral-Derivative controller. More...

#include <Pid.h>

Public Member Functions

 Pid ()
 
virtual ~Pid ()
 
operator() (const T &x, const Real &dt)
 Calculate next step. More...
 
void reset ()
 

Public Attributes

kd
 Derivative gain. More...
 
ki
 Integral gain. More...
 
kp
 Proportional gain. More...
 
x
 Setpoint. More...
 

Private Attributes

e
 Previous error. More...
 
i
 Integral output. More...
 

Detailed Description

template<typename T>
class rl::math::Pid< T >

Proportional-Integral-Derivative controller.

Constructor & Destructor Documentation

◆ Pid()

template<typename T >
rl::math::Pid< T >::Pid ( )
inline

◆ ~Pid()

template<typename T >
virtual rl::math::Pid< T >::~Pid ( )
inlinevirtual

Member Function Documentation

◆ operator()()

template<typename T >
T rl::math::Pid< T >::operator() ( const T &  x,
const Real dt 
)
inline

Calculate next step.

\[ k_{\mathrm{p}} \, e(t) + k_{\mathrm{i}} \int_{0}^{t} e(\tau) \, \mathrm{d}\tau + k_{\mathrm{d}} \, \frac{\mathrm{d}}{\mathrm{d}t} \, e(t) \]

Parameters
[in]dt\(\mathrm{d}t\)

◆ reset()

template<typename T >
void rl::math::Pid< T >::reset ( )
inline

Member Data Documentation

◆ e

template<typename T >
T rl::math::Pid< T >::e
private

Previous error.

◆ i

template<typename T >
T rl::math::Pid< T >::i
private

Integral output.

\[ k_{\mathrm{i}} \int_{0}^{t} e(\tau) \, \mathrm{d}\tau \]

◆ kd

template<typename T >
T rl::math::Pid< T >::kd

Derivative gain.

\[ k_{\mathrm{d}} \]

◆ ki

template<typename T >
T rl::math::Pid< T >::ki

Integral gain.

\[ k_{\mathrm{i}} \]

◆ kp

template<typename T >
T rl::math::Pid< T >::kp

Proportional gain.

\[ k_{\mathrm{p}} \]

◆ x

template<typename T >
T rl::math::Pid< T >::x

Setpoint.


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