Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
DaclePID.h
00001 #ifndef PID_H 00002 #define PID_H 00003 00004 00005 #include "mbed.h" 00006 00007 class DaclePID{ 00008 00009 public: 00010 00011 /* Constructeur du DaclePID 00012 Kc: Coeff Kc 00013 Ti: Coeff Ti 00014 Td: Coeff Td 00015 Interval: Intervalle de temps */ 00016 DaclePID(float Kc, float Ti, float Td, float interval); 00017 00018 /* Fonction qui permet de regler les coeff du PID */ 00019 void setCoeff(float Kc, float Ti, float Td); 00020 00021 /* Fonction qui permet au DaclePID de calculer la commande 00022 en entrée: Erreur */ 00023 void setInputLimits(float minInput, float maxInput); 00024 void setOutputLimits(float minOutput, float maxOutput); 00025 void setConsigne(float consigne); 00026 void setBiais(float biais); 00027 float dacalcul(float erreur); 00028 00029 private: 00030 00031 float Kc_; 00032 float Ti_; 00033 float Td_; 00034 00035 float dT_; 00036 float accError_; //Erreur accumulée (Pour l'intégrale de l'erreur) 00037 float pidSortie_; //Commande 00038 float erreurPres_; //Erreur au temps d'avant (pour la dérivée) 00039 00040 float minInput_, maxInput_, minOutput_, maxOutput_; 00041 float consigne_, biais_; 00042 00043 float to01(float x); 00044 float from01(float x); 00045 00046 }; 00047 00048 #endif
Generated on Wed Jul 13 2022 00:49:05 by
1.7.2