【正文】
........ 20 編輯本段電路仿真 ....................................................................................... 20 具體仿真及結(jié)果 ........................................................................................................ 20 6 系統(tǒng)的安裝與調(diào)試 ........................................................................................ 24 安裝步驟 .................................................................................................................... 24 調(diào)試過程 .................................................................................................................... 24 電路檢測(cè) .................................................................................................................... 24 調(diào)試步驟 .......................................................................................................... 24 調(diào)試遇到的問題及解決方案 .......................................................................... 25 7 結(jié)論 ........................................................................................................... 26 致謝 ...................................................................................... 錯(cuò)誤 !未定義書簽。 系統(tǒng)程序語(yǔ)言是使用比較廣泛的 C 語(yǔ)言進(jìn)行編寫,結(jié)構(gòu)清晰,達(dá)到的系統(tǒng)控制效果很好 。本次設(shè)計(jì)采用基于單片機(jī)水塔水位控制系統(tǒng),為了使 實(shí)際供水過程中要確保水位在允許的范圍內(nèi)浮動(dòng),應(yīng)采用電壓控制水位。 in industrial production by water tower control system to discharge the sewage. However traditional water tower control system in the presence of a lot of problems and need to staff time monitoring and need of labor force is very strong, but also brings many problems, light to people39。 目前,控制水塔水位方法較多,其中較為常用的是由單片機(jī)控制實(shí)現(xiàn)自動(dòng)運(yùn)行,使水塔水位保持恒定,以保證連續(xù)正常地供水。在我國(guó),單片機(jī)已被廣泛地應(yīng)用在工業(yè)自動(dòng)化控制、自動(dòng)檢測(cè)、智能儀表、智能化家用電器、航空航天系統(tǒng)和和國(guó)防軍事、尖端武器等各個(gè)方面。這種以軟件結(jié)合硬件并能提高系統(tǒng)性能的控制技術(shù)稱為微控制技術(shù)。 因?yàn)?Atmel 公司的 51 單片機(jī)需要專門的編程器,這樣無形中加重了系統(tǒng)的成本,而 STC公司單片機(jī)不僅支持 ISP,還支持 IAP等多種下載程序的方式,并且 STC公司單片機(jī)工作在寬電壓范圍內(nèi),電壓的波動(dòng)對(duì)系統(tǒng)的影響不大,這樣提高了系統(tǒng)的穩(wěn)定性,另外 STC單片機(jī)的加密性能也由于其他單片機(jī),并且 STC的單片機(jī)是增強(qiáng)型的 51 單片機(jī)。 STC89C52 單片機(jī)的特點(diǎn)如下: ( 1) .增強(qiáng)性 6 時(shí)鐘 /機(jī)器周期, 12 時(shí)鐘 /機(jī)器周期 8051 CPU。 ( 8) .通用異步串行口( UART) ,還可用定時(shí)器軟件實(shí)現(xiàn)多個(gè) UART。采用普通 晶振。單對(duì)于此系統(tǒng)我們不需要顯示豐富的內(nèi)容,而且 LCD 液晶價(jià)格貴,因此我們放棄了此方案。 綜上所述采用方案 3。此時(shí)電機(jī)帶動(dòng)水泵給水塔注水,使水位上升,還是電機(jī)不工作,水位不斷下降,都應(yīng)繼續(xù)維持原有工作狀態(tài);當(dāng)水位處于下限位置以下時(shí), B、 C 棒均不能與 A 棒導(dǎo)通, b、 c 均為“ 0”狀態(tài),此時(shí)應(yīng)啟動(dòng)電機(jī)轉(zhuǎn)動(dòng),帶動(dòng)水泵給水塔注水。 按鍵功能電路原理 圖 按鍵功能電路 按鍵功能電路里面有兩種按鍵,一種按鍵是模仿水塔水位開關(guān)的功能按鈕,一種是電機(jī) PWM 輸出的調(diào)整按鈕。由于 C 語(yǔ)言的強(qiáng)大功能,并逐漸為人們知道P22 P23 P24 P25 P26 P27 P21 P20 輸出控制動(dòng)作 顯示 0 1 1 1 1 1 1 1 水泵抽水 1 1 0 1 1 1 1 1 1 保持上一狀態(tài) 2 1 1 0 1 1 1 1 1 保持上一狀態(tài) 3 1 1 1 0 1 1 1 1 保持上一狀態(tài) 4 1 1 1 1 0 1 1 1 保持上一狀態(tài) 5 1 1 1 1 1 0 1 1 水泵停止抽水 6 * * * * * * 0 1 水泵抽水 顯示當(dāng)前水位 * * * * * * 1 0 水泵停止抽水 顯示當(dāng)前水位 沈陽(yáng)理工大學(xué)學(xué)士學(xué)位論文 14 的優(yōu)點(diǎn),由八十年代, C 開始進(jìn)入其它操作系統(tǒng),并很快在各類大,中,小和微型計(jì)算機(jī)已廣泛使用。因此它是廣泛移植到各類計(jì)算機(jī),并且它形成多種 C 語(yǔ)言 C 語(yǔ)言對(duì)操作系統(tǒng)和系統(tǒng)使用程序以及需要對(duì)硬件進(jìn)行操作的場(chǎng)合,用 C 語(yǔ)言明顯優(yōu)于其它高級(jí)語(yǔ)言,許多大型應(yīng)用軟件都是用 C 語(yǔ)言編寫的。 ( 3)數(shù)據(jù)結(jié)構(gòu)極其豐富 :C 的數(shù)據(jù)類型有:整型、實(shí)型、字符型、數(shù)組類型、指針類型等。而 C 語(yǔ)言允許程序編寫者有較大的自由度。但預(yù)處理命令,函數(shù)頭和 花括號(hào)“ }”之后不能加分號(hào)。 ( 2)制定合理的程序框圖,這不僅僅是程序設(shè)計(jì)的一個(gè)重要組成部分,而且是決定成功與否的很關(guān)鍵部分。使各功能程序模塊化,子程序化,縮短程序長(zhǎng)度,加快運(yùn)算速度,縮沈陽(yáng)理工大學(xué)學(xué)士學(xué)位論文 16 短程序執(zhí)行時(shí)間。 Proteus 與其他仿真軟件的異同 Proteus 與其它單片機(jī)仿真軟件不同的是,它不僅能模擬單片機(jī) CPU ,也能模擬單片機(jī)外圍電路或是沒有單片機(jī)參與的其它電路工作情況。 Proteus 而且還提供了一個(gè)圖形顯示功能,可以將線路上變化信號(hào),以圖形的方式實(shí)時(shí)地顯示出來,其作用與示波器相似。理論上同一種儀器可以在一個(gè)電路中隨意調(diào)用。這在相當(dāng)程度上替代了傳統(tǒng)的單片機(jī)實(shí)驗(yàn)教學(xué)的功能,例:元器件選擇、電路連接、電路檢測(cè)、電路修改、 軟件調(diào)試 、運(yùn)行結(jié)果等。 具體仿真及結(jié)果 沈陽(yáng)理工大學(xué)學(xué)士學(xué)位論文 21 水位由低到高數(shù)碼管顯示分別為 1, 2, 3, 1 時(shí)繼電器打開,水泵抽水,當(dāng)水位達(dá)到 4 時(shí)蜂鳴器報(bào)警提示。軟件編程中,首先編寫單元模塊程序,并且解決在硬件上調(diào)試成功問題,即可以做系統(tǒng)整體程序調(diào)試。主要查看是否把 LED 燈的陰陽(yáng)極接反。 沈陽(yáng)理工大學(xué)學(xué)士學(xué)位論文 26 7 結(jié)論 此課題屬于設(shè)計(jì)類,在分析了設(shè)計(jì)任務(wù)后,查閱大量的資料和相關(guān)的書籍,最終選定了以 SCT89C52 單片機(jī)為核心控制器來進(jìn)行系統(tǒng)設(shè)計(jì)。 the steam generator?s water level must be controlled in a certain range. When the nuclear power plant is running, as the steam flow or the water flow changing, the amount of boiling bubbles in the steam generator will change due to local pressure or temperature change, the instantaneous water level showed “false water level” phenomenon . The existence of “false water level” made it difficult to control the water level. The introduction of feedforward control to the traditional singleloop PID control can, in a certain extent, overe the false water level phenomenon. But the conventional PID control method in the process of steam generator water level control has some shortings. To the steam generator that has highly plex, large timedelay and nonlinear timevarying characteristics, the PID parameters tuning is a tedious job and the control effect is very poor. Furthermore, to achieve good control performance still as conditions changing, it often needs to change the PID controller parameters. But the analog PID controller parameters are difficult to regulate online. Fuzzy control is a kind of nonlinear 沈陽(yáng)理工大學(xué)學(xué)士學(xué)位論文 29 control strategy based on fuzzy reasoning, which express operating experience of skilled manipulation men and mon sense rules of inference through vague language. Fuzzy control do not need to know precise mathematical model of controlled object, is not sensitive to the change of process parameters, is highly robust and can overe nonlinear factors, so, fuzzy control has faster response and smaller ultra tone, can get better control effect. Based on understanding above, this paper design a steam generator water level fuzzy controller, the simulation shows that the controller has good control performance and practical value. II. DYNAMIC CHARACTERISTICS OF STEAM GENERATOR The transfer function of PWR steam generator?s mathematical model of the general form shows below: y(s)=GW(s)QW(s)+GS(s)QS(s) ( 1) where y is the steam generator water level。 the bubble volume on the liquid surface increases, causing the water level increased. Comprehensive two factors, after the step increase of the steam flow rate, the water level down has a time delay process, showing a up then down. 沈陽(yáng)理工大學(xué)學(xué)士學(xué)位論文 30 The impact on the water level of water flow or steam flow stepping decreased has similar principle as abov