tomlankhorst/control
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
control::classic::PID< T > Class Template Reference

#include <pid.h>

Inheritance diagram for control::classic::PID< T >:
control::classic::AbstractController< T > control::system::SISO< T > control::classic::PD< T > control::classic::PI< T >

Public Member Functions

 PID (T Ts=1.0, T Kp=1.0, T Ti=max< T >(), T Td=0.0, T N=max< T >(), T Limit=max< T >())
 
filter::TCS< T > poles ()
 
void reset ()
 
- Public Member Functions inherited from control::classic::AbstractController< T >
 AbstractController (T Limit_=max< T >())
 
step (T e) final
 
void setLimit (T limit)
 

Protected Member Functions

control (T e)
 
- Protected Member Functions inherited from control::classic::AbstractController< T >
clip (T u)
 

Protected Attributes

filter::Biquad< T > B
 

Additional Inherited Members

- Public Attributes inherited from control::classic::AbstractController< T >
Limit
 
bool clipping = false
 

Detailed Description

template<typename T>
class control::classic::PID< T >

Proportional integral derivative controller

Constructor & Destructor Documentation

◆ PID()

template<typename T >
control::classic::PID< T >::PID ( Ts = 1.0,
Kp = 1.0,
Ti = max<T>(),
Td = 0.0,
N = max<T>(),
Limit = max<T>() 
)
inlineexplicit

Constructor of PID controller

Parameters
TsTimestep (s)
KpProportional gain
TiIntegrator time-constant (s)
TdDifferentiator time-constant (s)
NFilter coefficicent
LimitMaximum output

Member Function Documentation

◆ control()

template<typename T >
T control::classic::PID< T >::control ( e)
inlineprotectedvirtual

Retrieves the control output, unclipped

Parameters
Te the error
Returns
T the raw output

Implements control::classic::AbstractController< T >.

◆ poles()

template<typename T >
filter::TCS<T> control::classic::PID< T >::poles ( )
inline

Poles of the PID controller

Returns
control::filter::TCS<T> pair of complex T in tuple

◆ reset()

template<typename T >
void control::classic::PID< T >::reset ( )
inlinevirtual

Reset the state of the controller

Reimplemented from control::classic::AbstractController< T >.

Member Data Documentation

◆ B

template<typename T >
filter::Biquad<T> control::classic::PID< T >::B
protected

Biquad filter


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