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

正文內(nèi)容

基于單片機(jī)的pid控制器畢業(yè)設(shè)計(jì)-資料下載頁

2025-07-27 05:25本頁面
  

【正文】 量式PID只需計(jì)算增量,計(jì)算誤差或精度不足時(shí)對(duì)控制量的計(jì)算影響較小。(2)控制從手動(dòng)切換到自動(dòng)時(shí),位置式PID算法必須先將計(jì)算機(jī)的輸出值置為原始閥門開時(shí),才能保證無沖擊切換。若采用增量算法,與原始值無關(guān),易于實(shí)現(xiàn)手動(dòng)到自動(dòng)的無沖擊切換。 式中 ,,計(jì)算e(k)計(jì)算e(k)計(jì)算e(k1)計(jì)算e(k)+e(k1)計(jì)算e(k2)計(jì)算?u(k)更新e(k1),e(k2)返回 圖 增量式PID算法流程圖賦給e(k)一個(gè)給定值32,=2,=3,=1,通過按鍵改變后的=3,=2,=2,e(k1)是前一次輸出的值,e(k2)是前兩次輸出的值。下面為本次設(shè)計(jì)的仿真圖 6 結(jié)束語本論文主要是從硬件和軟件兩方面來設(shè)計(jì)基于單片機(jī)的PID控制器,主要選擇了自己比較熟悉的8051單片機(jī)作為主控模塊。該設(shè)計(jì)充分利用了8051單片機(jī)的功能,通過電源電路、按鍵電路、顯示電路、復(fù)位和晶振等電路來使數(shù)碼管顯示出PID參數(shù)的選擇和參數(shù)數(shù)值。由于自己對(duì)許多知識(shí)不熟悉浪費(fèi)了很多時(shí)間去了解,可能自己掌握知識(shí)的多少,本次論文還有很多不盡人意的地方。本設(shè)計(jì)基本上符合預(yù)期的目標(biāo),但設(shè)計(jì)不完美,存在很多問題,比如怎樣使電路更加簡(jiǎn)單,更加能符合使用者的要求,讓使用者能簡(jiǎn)單的操作。PID控制器理論知識(shí)也會(huì)不斷的更新和完善,PID控制器會(huì)更加符合現(xiàn)在工程實(shí)際中的復(fù)雜惡劣環(huán)境,在各行業(yè)中使用更加廣泛。 參考文獻(xiàn)[1] 周潤景、張麗娜、(第二版).北京: 航空航天大學(xué)出版社,2010[2] ,2011[3] (第二版).[4] 郭一楠、常俊林、2009[5] 張毅剛、彭喜源、2000[6] ,2008[7] ,2000[8] 齊志才、:中國建筑工業(yè)出版社, 2005[9] 高金源、2007[10] :機(jī)械工業(yè)出版社,1998[11] [M].北京:電子工業(yè)出版社,2003[12] 吳占雄。.《電子器件》, 2006年第03期[13] ,2003修訂版[14] 薛均義、張彥斌、 2003[15] ,2008[16] Bennett S. The Past of PID Controllers. Annual Reviews in Control, 2001,[17] Min Sen chiu。Cui Shan。Wang Qingguo. Intermal Model Control Design for Transition Control,2000[18] Ho WK, Lim and Xu Wen, Optimal gain and phase margin tuning for PID controllers Automation, 1998[19] Astrom K J, Hang C C, Persson and Ho W K, Towards Intelligent PID, 1992[20] M Zhuang, D. P. Atherton,Automatic tuning of optimum PID controllers[J],IEE proceedings Control and Application,1993 附錄 程序顯示程序 include define uchar unsigned charsbit wei01 = P1^0。 sbit wei02 = P1^1。 sbit wei03 = P1^2。 sbit wei04 = P1^3。 void delay(uchar a) { uchar i=0, j=0。 for(i =0。 ia。 i++) for(j =0。 j110。 j++)。 } main() { while(1) { wei01 = 0。 wei04 = 1。 P0 = 0x06。 delay(1000)。 wei01 = 1。 wei04 = 0。 P0 = 0x4f。 delay(1000)。 }}中斷程序中斷時(shí)間500微妙void main(void){ P1=0x00。 //初始化p1口,全設(shè)為0; TMOD=0x01。 //time0為定時(shí)器,工作方式1; TH0=(65536500)/256。 //預(yù)置計(jì)數(shù)初值; TL0=(65536500)%256。 EA=1。 //開總中斷; ET0=1。 //中定時(shí)中斷; TR0=1。 //定時(shí)器0開始計(jì)數(shù);} 按鍵程序下面的程序代碼初始化引腳為輸入。 void KeyInit(void) { io_key_1 = 1 。 io_key_2 = 1 。 io_key_3 = 1 。 io_key_4 = 1 。 } 根據(jù)按鍵硬件連接定義按鍵鍵值 define KEY_VALUE_1 0x0e define KEY_VALUE_2 0x0d define KEY_VALUE_3 0x0b define KEY_VALUE_4 0x07 define KEY_NULL 0x0f 下面我們來編寫按鍵的硬件驅(qū)動(dòng)程序。 根據(jù)第一章所描述的按鍵檢測(cè)原理,我們可以很容易的得出如下的代碼: static uint8 KeyScan(void) { if(io_key_1 == 0)return KEY_VALUE_1 。 if(io_key_2 == 0)return KEY_VALUE_2 。 if(io_key_3 == 0)return KEY_VALUE_3 。 if(io_key_4 == 0)return KEY_VALUE_4 。 return KEY_NULL 。 } 其中io_key_1等是我們按鍵端口的定義,如下所示: sbit io_key_1 = P1^4 。 sbit io_key_2 = P1^5 。 sbit io_key_3 = P1^6 。 sbit io_key_4 = P1^7 。 A/D,D/A轉(zhuǎn)換調(diào)試程序includedefine uchar unsigned charuchar xdata *ad。uchar data adtab。 uchar j=0。 main() {ad=0x0f000。 while(1){*ad=0。for(j=0。j=100。j++)。adtab=*ad。P1=adtab。return 0。}}增量式PID控制算法C51程序/*==================================================================================================== PID Function The PID (比例、積分、微分) function is used in mainly control applications. PIDCalc performs one iteration of the PID algorithm. While the PID function works, main is just a dummy program showing a typical usage. =====================================================================================================*/ typedef struct PID { int SetPoint。 //設(shè)定目標(biāo) Desired Value long SumError。 //誤差累計(jì) double Proportion。 //比例常數(shù) Proportional Const double Integral。 //積分常數(shù) Integral Const double Derivative。 //微分常數(shù) Derivative Const int LastError。 //Error[1] int PrevError。 //Error[2] } PID。static PID sPID。 static PID *sptr = amp。sPID。 /*==================================================================================================== Initialize PID Structure PID參數(shù)初始化=====================================================================================================*/ void IncPIDInit(void) { sptrSumError = 0。 sptrLastError = 0。 //Error[1] sptrPrevError = 0。 //Error[2] sptrProportion = 0。 //比例常數(shù) Proportional Const sptrIntegral = 0。 //積分常數(shù)Integral Const sptrDerivative = 0。 //微分常數(shù) Derivative Const sptrSetPoint = 0。 }/*==================================================================================================== 增量式PID計(jì)算部分 =====================================================================================================*/ int IncPIDCalc(int NextPoint) { register int iError, iIncpid。 //當(dāng)前誤差 iError = sptrSetPoint NextPoint。 //增量計(jì)算 iIncpid = sptrProportion * iError //E[k]項(xiàng) sptrIntegral * sptrLastError //E[k-1]項(xiàng) + sptrDerivative * sptrPrevError。 //E[k-2]項(xiàng) //存儲(chǔ)誤差,用于下次計(jì)算 sptrPrevError = sptrLastError。 sptrLastError = iError。 //返回增量值 return(iIncpid)。 } 英文原文ProportionalIntegralDerivative (PID) Controller[7]The PID algorithm is the most popular feedback controller used within the process industries. It has been successfully used for 50 years. It is a robust easily understood algorithm that can provide excellent control performance despite the varied dynamic characteristics of process plant.As the name suggests, the PID algorithm consists of three basic modes, the Proportional mode
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1