Numerical integration and differentation in the PID algorithm: Difference between revisions
No edit summary |
|||
Line 1: | Line 1: | ||
== Introduction == | == Introduction == | ||
PID is elaborated algorithm to use in numerous ways. Though it might difficult to set up the parameters correctly, it makes the robot move more smoothly and thus more rapid. The P is for Proportional, I is the Integral and D is Differential. We use PID in line following. | |||
=== Aim === | === Aim === | ||
Proportion, Integration and Derivation. | |||
Plotting, Error function. | |||
== Robot == | == Robot == | ||
Almost any robot will do, but we will use Asimov 2/ Verne robot. | |||
=== Sensors === | === Sensors === | ||
A light sensor is used. | |||
== Example Video == | == Example Video == | ||
== Theory == | == Theory == | ||
If applying only proportional coding, the steering is affected by the amount of difference in reflectance from the average. The integral term is a sum (or integral) of the previous (historical) errors, and differential is used to forecast the next error based on the previous errors. | |||
{| | |||
|- | |||
! Header text !! Header text | |||
|- | |||
| Error || Sensor value - target value | |||
|- | |||
| Integral || Integral + error | |||
|- | |||
| Derivative || last error - previous error | |||
|- | |||
| Turn || | |||
|} | |||
== Exercises == | == Exercises == | ||
== References == | |||
See [[http://www.inpharmix.com/jps/PID_Controller_For_Lego_Mindstorms_Robots.html| PID Controller For Lego Mindstorms Robots]] | |||
Back to [[Mahtavaa Matematiikkaa 2020]] | Back to [[Mahtavaa Matematiikkaa 2020]] | ||
[[File:Mahtavaa matematiikkaa.png|thumb]] | [[File:Mahtavaa matematiikkaa.png|thumb]] |
Revision as of 12:15, 17 October 2020
Introduction
PID is elaborated algorithm to use in numerous ways. Though it might difficult to set up the parameters correctly, it makes the robot move more smoothly and thus more rapid. The P is for Proportional, I is the Integral and D is Differential. We use PID in line following.
Aim
Proportion, Integration and Derivation.
Plotting, Error function.
Robot
Almost any robot will do, but we will use Asimov 2/ Verne robot.
Sensors
A light sensor is used.
Example Video
Theory
If applying only proportional coding, the steering is affected by the amount of difference in reflectance from the average. The integral term is a sum (or integral) of the previous (historical) errors, and differential is used to forecast the next error based on the previous errors.
Header text | Header text |
---|---|
Error | Sensor value - target value |
Integral | Integral + error |
Derivative | last error - previous error |
Turn |
Exercises
References
See [PID Controller For Lego Mindstorms Robots]
Back to Mahtavaa Matematiikkaa 2020
