| Electronic Components Datasheet Search |
|
UM0585 Datasheet(PDF) 8 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
UM0585 Datasheet(HTML) 8 Page - STMicroelectronics |
|
8 / 25 page ![]() PID controller UM0585 8/25 Doc ID 14988 Rev 2 Coeff[1] = Ki;/*integral coefficient*/ Coeff[2] = Kd;/*derivative coefficient*/ /* Compute the error */ Error = Target_Signal - Measured_Signal; /* PID control process */ Command = DoPID(Error, Coeff); 2.2.2 DoFullPID function Table 3 describes the DoFullPID function. Example /* Fill the coefficients table */ Coeff[0] = Kp;/*proportional coefficient*/ Coeff[1] = Ki;/*integral coefficient*/ Coeff[2] = Kd;/*derivative coefficient*/ /* PID control process, the error is computed inside the function */ Command = DoFullPID(Measured_Signal, Target_Signal, Coeff); 2.2.3 PID_stm32 function Table 4 describes the PID_stm32 function. Table 3. DoFullPID function Function name DoFullPID Prototype uint16_t DoFullPID(uint16_t In, uint16_t Ref, uint16_t *Coeff) Behavior description PID in C, error computed inside the function. Input parameter – In: Input (measured value) – Ref: reference (target value) – Coeff: pointer to the coefficients table Output parameter Computed error Return parameter PID output command Table 4. PID_stm32 function Function name PID_stm32 Prototype uint16_t PID_stm32(uint16_t Error, uint16_t *Coeff); Behavior description Assembly optimized PID controller with error computed outside the function. Input parameter – Error: difference between reference and measured values – Coeff: pointer to the coefficients table Output parameter None Return parameter PID output command |
|
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |