freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

片機常用算法設計ppt課件-資料下載頁

2025-05-01 12:08本頁面
  

【正文】 or // 比例項 + ppIntegral * ppSumError // 積分項 + ppDerivative * dError )。 } // 微分項 void PIDInit (PID *pp) { memset ( pp,0,sizeof(PID))。 } double sensor (void) { return 。 } void actuator(double rDelta) {} void main(void) { PID sPID。 double rOut。 double rIn。 PIDInit ( amp。sPID )。 = ; = 。 = 。 for (。) { rIn = sensor ()。 rOut = PIDCalc ( amp。sPID,rIn )。 actuator ( rOut )。 } } 主程序: 二 增量式 PID控制算法 增量式 PID控制 算法公式 為: 其中: ?程序如下 : typedef struct PID { int SetPoint。 //設定目標 long SumError。 //誤差累計 double Proportion。 //比例常數(shù) double Integral。 //積分常數(shù) double Derivative。 //微分常數(shù) int LastError。 //Error[1] int PrevError。 //Error[2] } PID。 static PID sPID。 static PID *sptr = amp。sPID。 /*PID參數(shù)初始化 */ void IncPIDInit(void) { sptrSumError = 0。 sptrLastError = 0。 //Error[1] sptrPrevError = 0。 //Error[2] sptrProportion = 0。 //比例常數(shù) sptrIntegral = 0。 //積分常數(shù) sptrDerivative = 0。 //微分常數(shù) sptrSetPoint = 0。 } /*增量式 PID計算部分 */ int IncPIDCalc(int NextPoint) { register int iError, iIncpid。 //當前誤差 iError = sptrSetPoint NextPoint。 //增量計算 iIncpid = sptrProportion * iError //E[k]項 sptrIntegral * sptrLastError //E[k- 1]項 + sptrDerivative * sptrPrevError。 //E[k- 2]項 sptrPrevError = sptrLastError。 sptrLastError = iError。 //返回增量值 return(iIncpid)。 } 模糊控制算法 ?模糊控制 是采用由模糊數(shù)學語言描述的控制律(控制規(guī)則)來操縱系統(tǒng)工作的控制方式。 ?模糊控制系統(tǒng)的 結構組成和工作原理 如下圖,控制器的任務 是根據(jù)系統(tǒng)輸出的誤差和誤差變化情況來決定控制對象的輸入量。 模糊控制系統(tǒng)具有以下特點: ?簡化系統(tǒng)設計的復雜性, 適用于非線性、時變、模型不完全的系統(tǒng) ; ?利用控制法則來描述系統(tǒng)變量間的關系; ?用語言式的模糊變量來描述系統(tǒng),模糊控制器不必對被控制對象建立完整的數(shù)學模式; ?模糊控制器是一語言控制器,操作人員易于使用自然語言進行人機對話 ; ?模糊控制器是一種容易控制、掌握的較理想的非線性控制器,具有較佳的 適應性 及 強健性 、較佳的 容錯性 。 模糊控制算法主程序: void main() { int a=0,e,ec。 /*int nowpoint,p1,p2=1。 FILE *in,*out。 in=fopen(,r)。 out=fopen(,w)。*/ //while(!feof(in)) while(1) { //fscanf(in,%d,amp。nowpoint)。 //p1=nowpoint。 //e=0nowpoint。 //ec= p1p2。 printf(請輸入 e:)。 scanf(%d,amp。e)。 printf(請輸入 ec:)。 scanf(%d,amp。ec)。 a=Fuzzy(e,ec)。 //fprintf(out,%d,a)。 //printf(%d: ,p1)。 printf(e:%d ec:%d,e,ec)。 printf(a: %d \n,a)。 //p2=p1。 } //fclose(in)。 //fclose(out)。 }
點擊復制文檔內(nèi)容
教學課件相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1