wPID class More...

List of all members.

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 60 of file motorcontrollers.h.


Constructor & Destructor Documentation

wPID ( )

Constructor.

Definition at line 40 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 60 of file motorcontrollers.cpp.

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

void reset ( )

Resets the PID status.

Definition at line 133 of file motorcontrollers.cpp.


Member Data Documentation

double acc_ff

'A' acceleration feed forward

Definition at line 78 of file motorcontrollers.h.

double accel_r

'R' acceleration rate

Definition at line 86 of file motorcontrollers.h.

double bias

'B' bias

Definition at line 84 of file motorcontrollers.h.

double d_gain

'D' derivative gain

Definition at line 76 of file motorcontrollers.h.

double fri_ff

'F' friction feed forward

Definition at line 80 of file motorcontrollers.h.

double i_gain

'I' integral gain

Definition at line 74 of file motorcontrollers.h.

double max

'M' maximum output value

Definition at line 92 of file motorcontrollers.h.

double min

'N' minimum output value

Definition at line 90 of file motorcontrollers.h.

double p_gain

'P' proportional gain

Definition at line 72 of file motorcontrollers.h.

double setpt

'S' set point

Definition at line 88 of file motorcontrollers.h.

double slew

'W' maximum slew rate

Definition at line 94 of file motorcontrollers.h.

double vel_ff

'V' velocity feed forward

Definition at line 82 of file motorcontrollers.h.


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