Skip to content

Commit 584f536

Browse files
moved warning about pid forward
1 parent 577593a commit 584f536

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

docs/section-7/feedback-control.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ As a summary, the controller has 3 parts:
2020
The three quantities are added together to drive the error to zero. The three constants can be "tuned" (by changing around their values) for the error to be driven faster, slower, or to be less volatile.
2121

2222
In code, it looks something like this:
23+
24+
!!! warning
25+
The code excerpt is only meant to show how PID works. This is not how we actually implement PID, but should give you a better idea of the inner workings of PID.
26+
2327
``` Java
2428

2529
// kP, kI, kD can be any value, for example kP can = 0.5
@@ -55,8 +59,6 @@ double calculate(double currentPosition, double targetPosition) {
5559
return kP * error + accumulatedError + kD * derivative;
5660
}
5761
```
58-
!!! warning
59-
The code excerpt is only meant to show how PID works. This is not how we actually implement PID, but should give you a better idea of the inner workings of PID.
6062

6163
For those that know calculus, the formal definition of PID control is:
6264

0 commit comments

Comments
 (0)