Repository navigation
1C: Pid Concepts - #392
1C: Pid Concepts#392Adrianamm wants to merge 12 commits into
Conversation
|
🌐 Preview URL: https://pr-392.frcsoftware.org Changed pages |
roboteer5291
left a comment
There was a problem hiding this comment.
Would recommend changing the 1C overview page to use the term "output" consistently with the page added here.
There's also some really odd sentences broken over multiple lines (that aren't inside html blocks) that I feel like should be combined to make it easier to make suggestions on github and prevent diff explosion
Co-authored-by: Andrew Haselton <13470989+roboteer5291@users.noreply.github.com>
DylanB5402
left a comment
There was a problem hiding this comment.
left a number of comments on the first half, will probably give this another pass later
|
|
||
| First we start off with tuning P. | ||
| As P increases, the output overshoots and oscillates. | ||
| Overshooting is when the output passes the setpoint, and oscillating means it passes the setpoint repeatedly. |
There was a problem hiding this comment.
Might be good to explain the back and forth behavior of oscillation here, though I do think this is better explained visually.
Co-authored-by: Dylan Barva <d.barva5402@gmail.com>
DylanB5402
left a comment
There was a problem hiding this comment.
Another set of review, mostly small grammatical things. This is probably good to just merge once that's taken care of, not sure if there are any higher level things about this section that we want to hash out
DylanB5402
left a comment
There was a problem hiding this comment.
also pls rebase from main, the broken FIRSTInspires blog link is failing CI
Co-authored-by: Dylan Barva <d.barva5402@gmail.com>
| PID is a type of feedback controller. | ||
| A feedback controller uses sensors and equations to figure out what the mechanism is currently doing, | ||
| and controls the mechanism's output to make it do what we want it do. | ||
| The mechanism's current state is called the **output**. |
There was a problem hiding this comment.
I know in control theory the measurement is called the output, but for simplicity's sake I wouldn't use the official jargon here. This isn't meant to be a college level class on control theory, and it'll be easier if input = measurement, output = applied motor power.
There was a problem hiding this comment.
Also, 'state', isn't the correct description of output either. state is its own thing, so this sentence is wrong regardless
| PID constantly compares where you are to where you want to be and adjusts. | ||
| This is possible because each term is working to help adjust. |
There was a problem hiding this comment.
I think this is just repeating what has already been said
|
|
||
| In code, the three terms are commonly noted as `kp`, `ki`, and `kd`. | ||
| The k stands for constants. | ||
|
|
There was a problem hiding this comment.
| The full equation of a PID controller function is | |
| output = kP * error + kI * \integral(error dt) + kD * de/dt. |
| To tune PID, the output and setpoint's information is put into a graph to help figure out how to tune each term. | ||
| When tuning PID, the output isn't always a clean line. | ||
| As the values are adjusted, the output line takes on different shapes which can help determine which value needs to be adjusted and how. | ||
|
|
||
| When the output passes the set point, this is called **overshoot**. | ||
| When the output goes up, then down, up again, and repeats, this is called **oscillating**. |
There was a problem hiding this comment.
I would move all this to a specific section on PID tuning, if there is one
Co-authored-by: Tim Winters <twinters007@gmail.com>
Description
What changed?
Introduces the concept of PID for 1C. No code stuff yet, that's another PR
Meta
Merge checklist: