#include <PIDsmoothedValue.h>
Public Member Functions | |
PIDsmoothedValue () | |
Default constructor contains default vaules and weights. | |
PIDsmoothedValue (double value, double p, double i, double d, double min=-100, double max=100.0, double maxaction=100.0) | |
Constructor for user chosen weights and value types as above in the default constructor. | |
void | setMin (double m) |
Set the min value. | |
void | setMax (double m) |
Set the max value. | |
void | setWeightP (double p) |
set the P-weight | |
void | setWeightI (double i) |
set the P-weight | |
void | setWeightD (double d) |
set the P-weight | |
double | approximateVal (double newTargetVal) |
Calculation of the PID-value to return thereby it will not just calculate the PID-sum but also ensure that it lies within the given boundaries. | |
double | addOffset (double offset) |
double | setTo (double val) |
double | apprDiscrVal (double targetVal, double time, double maxIteration) |
Discreet and iterative value calculation. | |
double | getVal () |
return the - if necessary modified - PID-value | |
double | approximateValNew (double newTargetVal) |
Calculation of the PID-value to return, just an alternative approach without any boundary checks and the D-value is not just calculated by the change of the target to object difference but by the object position change. | |
double | apprContVal (double targetVal, double time) |
Calculate the PID value as a continuous function. | |
double | getWeightP () |
get the P-weight | |
double | getWeightI () |
get the I-weight | |
double | getWeightD () |
get the D-weight | |
double | getMin () |
get the Min-border | |
double | getMax () |
get the Max-border | |
void | reset (void) |
reset all values and the sums necessary for its calculation | |
void | resetTo (double val) |
reset all values and the sums necessary for its calculation and set the value to val | |
Private Attributes | |
double | lastDifference |
double | lastTargetVal |
double | value |
double | lastValue |
bool | started |
double | oldTargetVal |
double | integralError |
double | lastTime |
double | p |
double | i |
double | d |
double | min |
double | max |
double | maxaction |
Definition at line 19 of file PIDsmoothedValue.h.
|
Default constructor contains default vaules and weights. Value types are: First result value = 0; P-weight,I-weight,D-weight, Min PID - Value, Max PID - Value, Max PID - value change since recent PID - value. Definition at line 21 of file PIDsmoothedValue.cpp. |
|
Constructor for user chosen weights and value types as above in the default constructor.
Definition at line 31 of file PIDsmoothedValue.cpp. |
|
Set the min value.
Definition at line 49 of file PIDsmoothedValue.cpp. References min. |
|
Set the max value.
Definition at line 59 of file PIDsmoothedValue.cpp. References max. |
|
set the P-weight after using the constructor Definition at line 69 of file PIDsmoothedValue.cpp. References p. Referenced by ObstacleAvoiderOnGreenFieldERS7::handleMessage(), ObstacleAvoiderOnGreenField::handleMessage(), and GT2004MotionControl::handleMessage(). |
|
set the P-weight after using the constructor Definition at line 79 of file PIDsmoothedValue.cpp. References i. Referenced by ObstacleAvoiderOnGreenFieldERS7::handleMessage(), and ObstacleAvoiderOnGreenField::handleMessage(). |
|
set the P-weight after using the constructor Definition at line 89 of file PIDsmoothedValue.cpp. References d. Referenced by ObstacleAvoiderOnGreenFieldERS7::handleMessage(), and ObstacleAvoiderOnGreenField::handleMessage(). |
|
Calculation of the PID-value to return thereby it will not just calculate the PID-sum but also ensure that it lies within the given boundaries.
Definition at line 101 of file PIDsmoothedValue.cpp. References d, i, integralError, lastDifference, lastValue, max, maxaction, min, p, and started. Referenced by apprDiscrVal(), ObstacleAvoiderOnGreenFieldERS7::execute(), ObstacleAvoiderOnGreenField::execute(), SpecialPerceptSelfLocator::execute(), GT2004BasicBehaviorGoToPointAndAvoidObstacles::execute(), resetTo(), and MotionStabilizer::stabilize(). |
|
Definition at line 325 of file PIDsmoothedValue.cpp. References lastValue. Referenced by setTo(). |
|
Definition at line 332 of file PIDsmoothedValue.cpp. References addOffset(). |
Here is the call graph for this function:
|
Discreet and iterative value calculation.
Definition at line 158 of file PIDsmoothedValue.cpp. References approximateVal(), lastValue, and resetTo(). |
Here is the call graph for this function:
|
return the - if necessary modified - PID-value
Definition at line 287 of file PIDsmoothedValue.cpp. Referenced by ObstacleAvoiderOnGreenFieldERS7::execute(), ObstacleAvoiderOnGreenField::execute(), SpecialPerceptSelfLocator::execute(), and MotionStabilizer::stabilize(). |
|
Calculation of the PID-value to return, just an alternative approach without any boundary checks and the D-value is not just calculated by the change of the target to object difference but by the object position change. During first tests the upper algorithm "approximateValue" showed a better convergence behavior that this one and is considered as the original algorithm Definition at line 193 of file PIDsmoothedValue.cpp. References d, i, integralError, lastTargetVal, p, and started. |
|
Calculate the PID value as a continuous function.
Definition at line 227 of file PIDsmoothedValue.cpp. References d, i, integralError, lastDifference, lastValue, max, maxaction, min, p, and started. |
|
get the P-weight
Definition at line 291 of file PIDsmoothedValue.cpp. References p. |
|
get the I-weight
Definition at line 294 of file PIDsmoothedValue.cpp. References i. |
|
get the D-weight
Definition at line 297 of file PIDsmoothedValue.cpp. References d. |
|
get the Min-border
Definition at line 299 of file PIDsmoothedValue.cpp. References min. |
|
get the Max-border
Definition at line 300 of file PIDsmoothedValue.cpp. References max. |
|
reset all values and the sums necessary for its calculation
Definition at line 307 of file PIDsmoothedValue.cpp. References integralError, lastTargetVal, and started. Referenced by resetTo(). |
|
reset all values and the sums necessary for its calculation and set the value to val
Definition at line 318 of file PIDsmoothedValue.cpp. References approximateVal(), and reset(). Referenced by apprDiscrVal(), SpecialPerceptSelfLocator::execute(), and GT2004BasicBehaviorGoToPointAndAvoidObstacles::execute(). |
Here is the call graph for this function:
|
Definition at line 22 of file PIDsmoothedValue.h. Referenced by apprContVal(), and approximateVal(). |
|
Definition at line 23 of file PIDsmoothedValue.h. Referenced by approximateValNew(), and reset(). |
|
Definition at line 24 of file PIDsmoothedValue.h. |
|
Definition at line 25 of file PIDsmoothedValue.h. Referenced by addOffset(), apprContVal(), apprDiscrVal(), and approximateVal(). |
|
Definition at line 26 of file PIDsmoothedValue.h. Referenced by apprContVal(), approximateVal(), approximateValNew(), and reset(). |
|
Definition at line 28 of file PIDsmoothedValue.h. |
|
Definition at line 29 of file PIDsmoothedValue.h. Referenced by apprContVal(), approximateVal(), approximateValNew(), and reset(). |
|
Definition at line 30 of file PIDsmoothedValue.h. |
|
Definition at line 32 of file PIDsmoothedValue.h. Referenced by apprContVal(), approximateVal(), approximateValNew(), getWeightP(), and setWeightP(). |
|
Definition at line 33 of file PIDsmoothedValue.h. Referenced by apprContVal(), approximateVal(), approximateValNew(), getWeightI(), and setWeightI(). |
|
Definition at line 34 of file PIDsmoothedValue.h. Referenced by apprContVal(), approximateVal(), approximateValNew(), getWeightD(), and setWeightD(). |
|
Definition at line 35 of file PIDsmoothedValue.h. Referenced by apprContVal(), approximateVal(), getMin(), and setMin(). |
|
Definition at line 36 of file PIDsmoothedValue.h. Referenced by apprContVal(), approximateVal(), getMax(), and setMax(). |
|
Definition at line 37 of file PIDsmoothedValue.h. Referenced by apprContVal(), and approximateVal(). |