motor_controller
Public Member Functions | Public Attributes | List of all members
motor_controller::PIDSettings Struct Reference

Structure to hold the PID parameters for 'IDEAL' type PID. More...

#include <PID.hpp>

Public Member Functions

 PIDSettings ()
 Constructor. More...
 
bool operator== (const PIDSettings &other) const
 
bool operator!= (const PIDSettings &other) const
 
void setParallelCoefficients (double _Kp=0, double _Ki=0, double _Kd=0)
 

Public Attributes

double Ts
 Sampling time in seconds. More...
 
double K
 Proportional gain. More...
 
double Ti
 Integral time constant, 0 to disable it. More...
 
double Td
 Derivative time constant, 0 to disable it. More...
 
double N
 Derivative term. More...
 
double B
 Setpoint weighing term. More...
 
double Tt
 Anti-integrator-windup. More...
 
double YMin
 Minimum output value. More...
 
double YMax
 Maximum output value. More...
 

Detailed Description

Structure to hold the PID parameters for 'IDEAL' type PID.

To convert from PARALLEL form to IDEAL form Ti = 1.0/Ki/Kp and Td = Kd/Kp

Constructor & Destructor Documentation

motor_controller::PIDSettings::PIDSettings ( )
inline

Constructor.

Member Function Documentation

bool motor_controller::PIDSettings::operator!= ( const PIDSettings other) const
inline
bool motor_controller::PIDSettings::operator== ( const PIDSettings other) const
inline
void PIDSettings::setParallelCoefficients ( double  _Kp = 0,
double  _Ki = 0,
double  _Kd = 0 
)

Member Data Documentation

double motor_controller::PIDSettings::B

Setpoint weighing term.

Setpoint weighing term, generally between 0 and 1

  • B = 0 reference is introduced only through integral term
  • B = 1 disables setpoint weighting
double motor_controller::PIDSettings::K

Proportional gain.

double motor_controller::PIDSettings::N

Derivative term.

Derivative term filtered by a first order system with time constant Td/N

  • Typical values of N are between 8 and 20
  • No derivative action on frequencies above N/Td
double motor_controller::PIDSettings::Td

Derivative time constant, 0 to disable it.

double motor_controller::PIDSettings::Ti

Integral time constant, 0 to disable it.

double motor_controller::PIDSettings::Ts

Sampling time in seconds.

double motor_controller::PIDSettings::Tt

Anti-integrator-windup.

Anti-integrator-windup time constant

  • < 0 disable
  • = 0 and Td = 0 disable
  • = 0 and Td > 0 Tt = sqrt(Ti * Td)
double motor_controller::PIDSettings::YMax

Maximum output value.

double motor_controller::PIDSettings::YMin

Minimum output value.


The documentation for this struct was generated from the following files: