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

正文內(nèi)容

基于單片機(jī)的恒壓供水系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn)(參考版)

2024-11-14 02:48本頁面
  

【正文】 count++。 printf(%f\n, display_value)。 // how to display output display_value = pid_calc(amp。 //Get input value for process point pid_bumpless(amp。 //pid_setinteg(amp。 pid_setinteg(amp。 pid_tune(amp。 pid_init(amp。 while(count=20) { Scanf(%d,amp。 printf( %6d %6d %4f %4f %4f\n, process_point, set_point, p_gain, i_gain, d_gain)。 integral_val =(float)()。 XXX 大學(xué) 畢業(yè)設(shè)計(jì) 26 d_gain = (float)()。 p_gain = (float)()。 process_point = 30。i_gain, amp。set_point, amp。 // scanf(%d%d%f%f%f, amp。warm。 int count=0。 return (result)。 } else result = pidintegral。 } dterm = ((float)(err pidlast_error)) * piddgain。 if (pidintegral ) { pidintegral = 。 if (pterm 100 || pterm 100) { XXX 大學(xué) 畢業(yè)設(shè)計(jì) 25 pidintegral = 。 if (abs(err) piddeadband) { ferror = (float) err。 float pterm, dterm, result, ferror。 } /* XXX 大學(xué) 畢業(yè)設(shè)計(jì) 24 pid_bumpless DESCRIPTION Bumpless transfer algorithim. When suddenly changing setpoints, or when restarting the PID equation after an extended pause, the derivative of the equation can cause a bump in the controller output. This function will help smooth out that bump. The process value in *pv should be the updated just before this function is used. */ void pid_bumpless(struct _pid *pid) { pidlast_error = (pidsp)(pidpv)。 } /* pid_setinteg DESCRIPTION Set a new value for the integral term of the pid equation. This is useful for setting the initial output of the pid controller at start up. */ void pid_setinteg(struct _pid *pid,float new_integ) { pidintegral = new_integ。 pidintegral= integral_val。 piddgain = d_gain。 XXX 大學(xué) 畢業(yè)設(shè)計(jì) 23 } /* pid_tune DESCRIPTION Sets the proportional gain (p_gain), integral gain (i_gain), derivitive gain (d_gain), and the dead band (dead_band) of a pid control structure _pid. */ void pid_tune(struct _pid *pid, float p_gain, float i_gain, float d_gain, int dead_band) { pidpgain = p_gain。 pidpv = process_point。 /* pid_init DESCRIPTION This function initializes the pointers in the _pid structure to the process variable and the setpoint. *pv and *sp are integer pointers. */ void pid_init(struct _pid *warm, int process_point, int set_point) { struct _pid *pid。 int process_point, set_point,dead_band。 }。 int deadband。 float igain。 /*integer that contains the set point*/ float integral。//八通道 } } } XXX 大學(xué) 畢業(yè)設(shè)計(jì) 22 附錄 2: PID 控制子程序 include include include struct _pid { int pv。 5 為高電平 number++。 5 是否按下 { while(!P3_5)。 }} void key() { if(!P3_5)// 是否按下 { delaynms(20)。//送相關(guān)通道數(shù)組 oe=0。//等待轉(zhuǎn)換結(jié)束 oe=1。 delaynms(1)。 st=1。//選通通道 oe=0。i8。 }} XXX 大學(xué) 畢業(yè)設(shè)計(jì) 21 void ad0809() { uchar i,m=1。//送通道號(hào)顯示 P2=0x0e。// 選通第三個(gè)數(shù)碼管 delaynms(3)。//送整數(shù)顯示 P0_7=0。//選通第二個(gè)數(shù)碼管 delaynms(3)。 P0=tab[ad_data2]。//送小數(shù)點(diǎn)后第二位顯示 P2=0x07。a10。//讀得的數(shù)據(jù)乘以 2 再乘以 98%再分出十位 ad_data3=(((ad_0809*49/25)%100)%10)。 ad_data1=(ad_0809*49/25)/100。i++) {。 while(x0) { for(i=0。//把相關(guān)通道數(shù)據(jù)給 ad_0809 display()。//調(diào) AD0809 啟動(dòng)子程序 key()。 P1=0x00。//芯片啟動(dòng)程序 void key()。//nms 延時(shí)程序 void display()。 uchar x[8]。//通道先擇數(shù)組 uint ad_0809,ad_data1,ad_data2,ad_data3,ad_
點(diǎn)擊復(fù)制文檔內(nèi)容
研究報(bào)告相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1