wPID class More...

Public Member Functions

 wPID ()
 Constructor.
 
double pidloop (double currentvalue)
 it compute a loop of PID algorithm
 
void reset ()
 Resets the PID status.
 

Public Attributes

double acc_ff
 'A' acceleration feed forward
 
double accel_r
 'R' acceleration rate
 
double bias
 'B' bias
 
double d_gain
 'D' derivative gain
 
double fri_ff
 'F' friction feed forward
 
double i_gain
 'I' integral gain
 
double max
 'M' maximum output value
 
double min
 'N' minimum output value
 
double p_gain
 'P' proportional gain
 
double setpt
 'S' set point
 
double slew
 'W' maximum slew rate
 
double vel_ff
 'V' velocity feed forward
 

Detailed Description

wPID class

Motivation
this class provide an implementation of PID algorithm, I didn't find it into Yarp.
Note
this is a C++ adaptation of pidloop example at http://jk-technology.com/C_Unleashed/code_list.html

Definition at line 59 of file motorcontrollers.h.

Constructor & Destructor Documentation

wPID ( )

Constructor.

Definition at line 45 of file motorcontrollers.cpp.

References farsa::max(), and farsa::min().

Member Function Documentation

double pidloop ( double  currentvalue)

it compute a loop of PID algorithm

Parameters
currentvalueis the current value of variable under the control of PID

Definition at line 65 of file motorcontrollers.cpp.

References farsa::max(), and farsa::min().

void reset ( )

Resets the PID status.

Definition at line 138 of file motorcontrollers.cpp.

Member Data Documentation

double acc_ff

'A' acceleration feed forward

Definition at line 77 of file motorcontrollers.h.

double accel_r

'R' acceleration rate

Definition at line 85 of file motorcontrollers.h.

double bias

'B' bias

Definition at line 83 of file motorcontrollers.h.

double d_gain

'D' derivative gain

Definition at line 75 of file motorcontrollers.h.

double fri_ff

'F' friction feed forward

Definition at line 79 of file motorcontrollers.h.

double i_gain

'I' integral gain

Definition at line 73 of file motorcontrollers.h.

double max

'M' maximum output value

Definition at line 91 of file motorcontrollers.h.

double min

'N' minimum output value

Definition at line 89 of file motorcontrollers.h.

double p_gain

'P' proportional gain

Definition at line 71 of file motorcontrollers.h.

double setpt

'S' set point

Definition at line 87 of file motorcontrollers.h.

double slew

'W' maximum slew rate

Definition at line 93 of file motorcontrollers.h.

double vel_ff

'V' velocity feed forward

Definition at line 81 of file motorcontrollers.h.


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