Recherche source

MAESChristian Messages postés 1 Date d'inscription dimanche 14 mars 2004 Statut Membre Dernière intervention 14 mars 2004 - 14 mars 2004 à 19:56
Phollivi Messages postés 3 Date d'inscription vendredi 28 février 2003 Statut Membre Dernière intervention 9 octobre 2004 - 9 oct. 2004 à 14:21
Je recherche le code source en VB pour un régulateur proportionel intégral dérivé (PID)
Merci d'avance et bien à vous

2 réponses

cs_Jack Messages postés 14006 Date d'inscription samedi 29 décembre 2001 Statut Modérateur Dernière intervention 28 août 2015 79
14 mars 2004 à 20:23
Salut MAESChristian
Si tu trouves, fais m'en une copie ... ça m'intéresse !

Vala
Jack
0
Phollivi Messages postés 3 Date d'inscription vendredi 28 février 2003 Statut Membre Dernière intervention 9 octobre 2004
9 oct. 2004 à 14:21
KIKI
Voilà ce que j'ai trouvé sur un site anglais

Improved PID code
The method of implementing automatic reset described in using a positive feedback loop was first used with pneumatic analog controllers. It can easily be implemented digitally.

There are several advantages of this algorithm implementation. Most important, it eliminates the problems that cause the output to pull away from a limit inappropriately. It also allows the use of external feedback when required.

Variables:
Input Process input
InputD Process input plus derivative
InputLast Process input from last pass, used in deriv. calc.
Err Error, Difference between input and set point
SetP Set point
OutPutTemp Temporary value of output
OutP Output of PID algorithm
Feedback Result of lag in positive feedback loop.
Mode value is ?AUTO? if loop is in automatic
Action value is ?DIRECT? if loop is direct acting

The PID emulation code:



1. IF Mode = ?AUTO? THEN

2. InputD=Input+(Input-InputLast)*Derivative *60 derivative.

3. InputLast = Input

4. Err=SetP-InputD Error based on reverse action.

5. IF Action = ?DIRECT? THEN Err=0 ? Err Change sign if direct.

6. ENDIF

7. OutPutTemp = Err*Gain+Feedback Calculate the gain time the error and add the feedback.

8. IF OutPutTemp > 100 THEN OutPutTemp =100 Limit output to between

9. IF OutPutTemp < 0 THEN OutPutTemp =0 0 and 100 percent.

10. OutP = OutPutTemp The final output of the controller.

11. Feedback=Feedback+(OutP - Feedback)*ResetRate/60

12. ELSE

13. InputLast=Input While loop in manual, stay ready for bumpless switch to Auto.

14. Feedback=OutP

15. ENDIF

If external feedback is used, the variable ?OutP? in line 11 is replaced with the variable containing the external feedback.


Updated March 29, 2004 10:58:26 AM.

Back to Control Information

Privacy Policy
Provided by John Shaw.

Merci de le diffuser à tout le monde
0
Rejoignez-nous