温度控制的PID算法的C语言程序.docVIP

  • 19
  • 0
  • 约7.94千字
  • 约 10页
  • 2017-02-13 发布于重庆
  • 举报
温度控制的PID算法的C语言程序

我的题目是:基于PID算法的温度控制系统 89C51单片机,通过键盘输入预设值,与DS18B20测得的实际值做比较,然后驱动制冷或加热电路。用keil C语言来实现PID的控制。 最佳答案 //PID算法温控C语言2008-08-17 18:58 #includereg51.h #includeintrins.h #includemath.h #includestring.h struct PI{ unsigned int SetPoint; // 设定目标 Desired Value unsigned int Proportion; // 比例常数 Proportional Const unsigned int Integral; // 积分常数 Integral Const unsigned int LastError; // Error[-1] unsigned int PrevError; // Error[-2] unsigned int SumError; // Sums of Errors }; struct PI spid; // PI Control Structure unsigned int rout; // PIResponse (Output) unsigned int rin; // PI Feedback (

文档评论(0)

1亿VIP精品文档

相关文档