Skip to content

Commit

Permalink
Tweak README.
Browse files Browse the repository at this point in the history
  • Loading branch information
braincore committed Jan 20, 2020
1 parent 1c92d99 commit 2d6a021
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ extern crate pid;
use pid::Pid;

fn main() {
// Set only kp (proportional) to 10 with a limit of 100 from the
// proportional term. The setpoint is 15.
// Set only kp (proportional) to 10. The setpoint is 15.
// Set limits for P, I, and D to 100 each.
let mut pid = Pid::new(10.0, 0.0, 0.0, 100.0, 100.0, 100.0, 15.0);
// Fake a measurement of 10.0, which is an error of 5.0.
let output = pid.next_control_output(10.0);
Expand Down Expand Up @@ -90,8 +90,8 @@ where:
- e(t) = error = S(t) - P(t)
- S(t) = set point, the desired target for the process variable.

`kp`/`ki`/`kd` can be changed during operation and can therefore also be a
function of time.
`kp`/`ki`/`kd` can be changed during operation and can therefore be a function
of time.

If you're interested in the dependent form, add your own logic that computes
`kp`/`ki`/`kd` using dead time, time constant, `kc`, or whatever else.
Expand Down

0 comments on commit 2d6a021

Please sign in to comment.