Robotics Library  0.6.2
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)
 
void reset ()
 

Public Attributes

kd
 Derivative gain \( K_d \). More...
 
ki
 Integral gain \( K_i \). More...
 
kp
 Proportional gain \( K_p \). More...
 
x
 Setpoint. More...
 

Private Attributes

e
 Previous error. More...
 
i
 Integral output \( K_i \int_{0}^{t} e(\tau) \, d\tau \). 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

\[ K_p e(t) + K_i \int_{0}^{t} e(\tau) \, d\tau + K_d \frac{de}{dt} \]

Parameters
dt\( dt \)

◆ 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_i \int_{0}^{t} e(\tau) \, d\tau \).

◆ kd

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

Derivative gain \( K_d \).

◆ ki

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

Integral gain \( K_i \).

◆ kp

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

Proportional gain \( K_p \).

◆ x

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

Setpoint.


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