Robot Simulator of the Robotics Group for Self-Organization of Control: PID Class Reference

- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages
- Examples

- Search for |

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# PID Class Reference

`#include <pid.h>`

List of all members.

## Public Member Functions
| PID (double KP=100, double KI=2.0, double KD=0.3)
| KP is used as a general koefficient. KI and KD can be tuned without dependence of KP.
void | setKP (double KP)
void | setTargetPosition (double newpos)
double | getTargetPosition ()
double | step (double newsensorval, double time)
double | stepNoCutoff (double newsensorval, double time)
## Public Attributes
double | position
double | lastposition
double | last2position
double | error
double | lasterror
double | derivative
double | targetposition
double | KP
double | KI
double | KD
double | tau
double | P
double | D
double | I
double | force
double | lasttime

## Constructor & Destructor Documentation

PID | ( | double | KP = `100`,
|  | double | KI = `2.0`,
|  | double | KD = `0.3` |
| ) |  |  |

KP is used as a general koefficient. KI and KD can be tuned without dependence of KP.

## Member Function Documentation

double getTargetPosition | ( |  | ) |

void setKP | ( | double | KP | ) |

void setTargetPosition | ( | double | newpos | ) |

double step | ( | double | newsensorval,
|  | double | time |
| ) |  |  |

double stepNoCutoff | ( | double | newsensorval,
|  | double | time |
| ) |  |  |

## Member Data Documentation

double D

double derivative

double error

double force

double I

double KD

double KI

double KP

double last2position

double lasterror

double lastposition

double lasttime

double P

double position

double targetposition

double tau

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

- pid.h
- pid.cpp