// PID.c // 8/7/2005 written by MrLiu // #include #include "PID.h" #include "main.h" #define PID_EE_VALUE_MAX 100 v…
pid算法 源代码
在过程控制中,按偏差的比例(P)、积分(I)和微分(D)进行控制的PID控制器(亦称PID调节器)是应用最为广泛的一种自动控制器。它具有原理简单,易于实现,适用面广,控制参数相互独立,参数的选定比较简单等优点;而且在理论上可以证明,对于过程控制的典型对象──“一阶滞后+纯滞后”与…
-c --device DLM -g -O0 --apcs=interwork -I "C:\Keil\ARM\INC\Luminary" -o "pid.o" "Pid.c"
#!/bin/bash # pid-identifier.sh: # Gives complete path name to process associated with pid. ARGNO=1 # Number of arguments the sc…
#!/bin/bash # pid-identifier.sh: 给出与指定pid相关联进程的完整路径名. ARGNO=1 # 期望的参数个数. E_WRONGARGS=65 E_BADPID=66 E_NOSUCHPROCESS=67 E_NOPER…
unsigned int SetPoint //设定目标,应用时实际上取值该值的1/10,出现温度的0.x度 int ei; //最近1次偏差,ei=stPID.SetPoint-stPID.T_adc_d…
typedef struct DeltPID //定义增量式PID的结构 { int Goal; //设定目标,为实际值的10倍 float P; //比例常数,规范化后取…
void PID_Ctrl(void) //增量式PID,调节ui { #define delt_Um 15 //刷新近2次偏差 PID.LastError=PID.ei; PID.ei=PID.Goal-PID.ADC_data[0]; if(P…
void PIDinit(void) { PID.P=EEPROM_read(0xc0);//初始化PID比例值 if(PID.P>99) {PID.P=50; EEPROM_write(0xc0,50); EEPROM_write(0xc1,50…
//--------------------------------------------------------------------------- #ifndef PIDH #define PIDH //-------------------…
#include #include #pragma hdrstop #include "PID.h" //-----------------------------------------------------------------------…