Modifications

Sauter à la navigation Sauter à la recherche
Ligne 239 : Ligne 239 :     
=== Contrôle PID ===
 
=== Contrôle PID ===
The integer value returned by '''readLine()''' can be easily converted into a measure of your position error for line-following applications, as was demonstrated in the previous code sample. The function used to generate this position/error value is designed to be monotonic, which means the value will almost always change in the same direction as you sweep your sensors across the line. This makes it a great quantity to use for PID control.
+
TLa valeur entière retournée par '''readLine()''' peu facilement être convertie la mesure de notre erreur de position pour les applications de suivit de ligne, comme démontré dans le précédent exemple de code. La fonction utilisée pour générer cette valeur de position/error est conçue pour être monotonique, ce qui signifie que la valeur change toujours dans la même direction au fur et a mesure que que les senseurs croisent la ligne. Cela en fait une grandeur utile pour réaliser un contrôle PID.
   −
Explaining the nature of PID control is beyond the scope of this document, but [http://en.wikipedia.org/wiki/PID_controller wikipedia has a very good article] (''anglais'') on the subject.
+
Expliquer la nature du contrôle PID va au delà des objectifs de ce document, mais [https://fr.wikipedia.org/wiki/R%C3%A9gulateur_PID wikipedia offre un bon article] sur le sujet.
 +
 
 +
{{traduction}}
    
The following code gives a very simple example of PD control (I find the integral PID term is usually not necessary when it comes to line following). The specific nature of the constants will be determined by your particular application, but you should note that the derivative constant ''Kd'' is usually much bigger than the proportional constant ''Kp''. This is because the derivative of the error is a much smaller quantity than the error itself, so in order to produce a meaningful correction it needs to be multiplied by a much larger constant.
 
The following code gives a very simple example of PD control (I find the integral PID term is usually not necessary when it comes to line following). The specific nature of the constants will be determined by your particular application, but you should note that the derivative constant ''Kd'' is usually much bigger than the proportional constant ''Kp''. This is because the derivative of the error is a much smaller quantity than the error itself, so in order to produce a meaningful correction it needs to be multiplied by a much larger constant.
29 917

modifications

Menu de navigation