Robotsystem from Robot Group Leipzig: PID Class Reference

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

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

# PID Class Reference

`#include <pid.h>`

List of all members.

## Detailed Description

Definition at line 46 of file pid.h.

## 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 | stepWithD (double newsensorval, double derivative)
## Public Attributes
double | position
double | lastposition
double | last2position
double | error
double | lasterror
double | targetposition
double | KP
double | KD
double | KI
double | alpha
double | P
double | D
double | I
double | force

## 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. Definition at line 46 of file pid.cpp.

## Member Function Documentation

double getTargetPosition | ( |  | ) |

| Definition at line 71 of file pid.cpp.

void setKP | ( | double | KP | ) |

| Definition at line 62 of file pid.cpp.

void setTargetPosition | ( | double | newpos | ) |

| Definition at line 66 of file pid.cpp.

double step | ( | double | newsensorval | ) |

| Definition at line 76 of file pid.cpp.

double stepWithD | ( | double | newsensorval,
|  | double | derivative
| ) |

| Definition at line 85 of file pid.cpp.

## Member Data Documentation

double alpha

| Definition at line 64 of file pid.h.

double D

| Definition at line 67 of file pid.h.

double error

| Definition at line 56 of file pid.h.

double force

| Definition at line 70 of file pid.h.

double I

| Definition at line 68 of file pid.h.

double KD

| Definition at line 62 of file pid.h.

double KI

| Definition at line 63 of file pid.h.

double KP

| Definition at line 61 of file pid.h.

double last2position

| Definition at line 54 of file pid.h.

double lasterror

| Definition at line 57 of file pid.h.

double lastposition

| Definition at line 53 of file pid.h.

double P

| Definition at line 66 of file pid.h.

double position

| Definition at line 52 of file pid.h.

double targetposition

| Definition at line 59 of file pid.h.