【正文】
t of interest, gives the following openloop model of the thermal system:where K is a constant and D(s) is a secondorder , tz, and the coefficients of D(s) are functions of the variousparameters appearing in (1) and (2).Of course the various parameters in (1) and (2) are pletely unknown, but it’s not hard to show that, regardless of their values, D(s) has two real zeros. Therefore the main transfer function of interest (which is the one from Q(s), since we’ll assume constant ambient temperature) can be writtenMoreover, it’s not too hard to show that 1=tp1 1=tz 1=tp2, ., that the zero lies between the two poles. Both of these are excellent exercises for the student, and the result is the openloop polezero diagram of Figure 5.Obtaining a plete thermal model, then, is reduced to identifying the constant K and the three unknown time constants in (3). Four unknown parameters is quite a few, but simple experiments show that 1=tp1 _ 1=tz。 the use of PWM to control the heater.Both of these are nonlinear and timevarying effects, and the only practical way to study them is through simulation (or experiment, of course).Figure 7 shows a SimulinkTM block diagram of the closedloop system which incorporates these effects. A/D converter quantization and saturation are modeled using standard Simulink quantizer and saturation blocks. Modeling PWM is more plicated and requires a custom Sfunction to represent it.This simulation model has proven particularly useful in gauging the effects of varying the basic PWM parameters and。tp2 _ 0 are good approximations. Thus the openloop system is essentially firstorder and can therefore be written (where the subscript p1 has been dropped).Simple openloop step response experiments show that,for a wide range of initial temperatures and heat inputs, K _0:14 _=W and t _ 295 Control System DesignUsing the firstorder model of (4) for the openloop transfer function Gaq(s) and assuming for the moment that linear control of the heater power output q(t) is possible, the block diagram of Figure 6 represents the closedloop system. Td(s) is the desired, or setpoint, temperature,C(s) is the pensator transfer function, and Q(s) is the heater output in watts.Given this simple situation, introductory linear control design tools such as the root locus method can be used to arrive at a C(s) which meets the step response requirements on rise time, steadystate error, and overshoot specified in Table 1. The upshot, of course, is that a proportional controller with sufficient gain can meet all specifications. Overshoot is impossible, and increasing gains decreases both steadystate error and rise time.Unfortunately, sufficient gain to meet the specifications may require larger heat outputs than the heater is capable of producing. This was indeed the case for this system, and the result is that the rise time specification cannot be met. It is quite revealing to the student how useful such an oversimplified model, carefully arrived at, can be in determining overall performance limitations. Simulation ModelGross performance and its limitations can be determined using the simplified model of Figure 6, but there are a number of other aspects of the closedloop system whose effects on performance are not so simply modeled. Chief among these areallowing a chamber temperature setpoint to be entered,displaying both setpoint and actual temperatures, and還要感謝我的父母。老師不僅在學(xué)業(yè)上言傳身教,而且以其高尚的品格給我以情操上的熏陶。感謝母校為我們提供的良好學(xué)習(xí)環(huán)境使我們能夠在此專心學(xué)習(xí),提高我們的知識(shí)儲(chǔ)存,教會(huì)我們?nèi)绾翁岣咦陨韺W(xué)習(xí)能力以及自身素養(yǎng)。由于51單片機(jī)技術(shù)成熟且價(jià)格便宜,所以被廣泛應(yīng)用,但是由于我本身知識(shí)的局限性,所以只對(duì)空調(diào)溫度控制做了部分研究,并不成熟。 最后與設(shè)定好的之比較一下再?zèng)Q定壓縮機(jī)電路的狀態(tài)將P0口輸入的溫度信號(hào)值轉(zhuǎn)化為溫度值的方法為:ADC0809的基準(zhǔn)電壓為5V,則 P0口數(shù)據(jù)值對(duì)應(yīng)的電壓值為: VT=P0/2565(V) 取其整數(shù)部分為: T=210[(10P0)/256] 定時(shí)中斷子系統(tǒng)的流程圖如圖16所示:圖16 定時(shí)中斷子系統(tǒng)的流程圖定時(shí)中斷子系統(tǒng)程序代碼:ORG 0100H TIME: PUSH A SETB ; 輸入數(shù)據(jù) SETB ; 啟動(dòng)下一次模/數(shù)轉(zhuǎn)換 MOV P0, 0FFH MOV A, P0MOV B, 10 ; 轉(zhuǎn)換為溫度值,忽略小 MUL AB ; 數(shù)部分(B)=[(10P)/256] MOV A, 210 CLR C` SUBB A, B MOV B, 10 ; 轉(zhuǎn)換為BCD壓縮碼(因 DIV AB ; A內(nèi)溫度值小于100,故可 SWAP A ; 用程序中的轉(zhuǎn)換方法) ADD A, B ; (A)=T CJNE A, R7, CON ;與設(shè)定溫度比較 CON: JNC STOP SETB ;啟動(dòng)壓縮機(jī) SJMP TIMEENDSTOP: CLR ;停止壓縮機(jī)TIMEEND: POP A RETI END 系統(tǒng)完整程序代碼見(jiàn)附件 結(jié)論空調(diào)機(jī)的發(fā)明使用和推廣給人們和現(xiàn)代化的生活帶來(lái)了極大的便利,從空調(diào)發(fā)展至今已經(jīng)發(fā)生了很大的變化,由原來(lái)的手動(dòng)向智能化發(fā)展。A) 升溫設(shè)置流程圖如圖所示: 圖13 溫度設(shè)置流程圖升溫設(shè)置程序代碼:ORG 0050HUP: PUSH A CJNE R7, 30H, GOUP ;最高為30℃ SJMP UPEND GOUP: MOV A, R7 ADD A, 01 ;升高1℃ DA A ;調(diào)整為十進(jìn)制 MOV R7, A ACALL DISPLAYUPEND: POP A RETI B)降溫流程圖如圖14所示圖14 降溫流程圖降溫設(shè)置程序代碼:ORG 0060HDOWN: PUSH A CJNE R7, 10H, GODOWN ;最低10℃ SJMP DOWNEND GODOWN: MOV A, R7 CLR C SUBB A, 01 ;降低1℃ JNB , GOON ;調(diào)整為十進(jìn)制 SUBB A, 06GOON: MOV R7, A ACALL DISPLAYDOWNEND: POP ARETI 溫度顯示流程圖以及其程序代碼將設(shè)定溫度值的壓縮BCD碼拆分,通過(guò)查表得到共陽(yáng)LED碼,分別送往PP2口。若超過(guò)溫度上限則返回。圖10 顯示電路 總體方案示意圖 本次設(shè)計(jì)的總體方案如圖11所示:圖11 總體方案示意圖 系統(tǒng)總電路的設(shè)計(jì)系統(tǒng)由單片機(jī)由時(shí)鐘電路、復(fù)位電路、按鍵接口電路、傳感器測(cè)溫電路、A/D轉(zhuǎn)換電路、LED溫度顯示電路等組成。通常,公共陽(yáng)極接高電平(一般接電源),其它管腳接段驅(qū)動(dòng)電路輸出端。消抖電路由一個(gè)電阻和按鍵K串接在+5V和地之間,一個(gè)電容和按鍵并聯(lián)構(gòu)成。鍵K1為“升溫”控制鍵;K2為“降溫”控制鍵,分別對(duì)應(yīng)