褚義文獻(xiàn)翻譯_第1頁
褚義文獻(xiàn)翻譯_第2頁
褚義文獻(xiàn)翻譯_第3頁
褚義文獻(xiàn)翻譯_第4頁
褚義文獻(xiàn)翻譯_第5頁
已閱讀5頁,還剩20頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

1、單位代碼 01 學(xué) 號 100119056 分 類 號 TP393 密 級 文獻(xiàn)翻譯基于單片機(jī)溫度控制系統(tǒng) 院(系)名稱信息工程學(xué)院 專業(yè)名稱電子信息工程 學(xué)生姓名褚義 指導(dǎo)教師付瑞玲 2014 年 月 日單片機(jī)溫度控制:一個(gè)跨學(xué)科的本科生工程設(shè)計(jì)項(xiàng)目JamesS.McDonald工程科學(xué)系三一大學(xué)德克薩斯州圣安東尼奧市78212摘要本文所描述的是作者領(lǐng)導(dǎo)由四個(gè)三一大學(xué)高年級學(xué)生組成的團(tuán)隊(duì)進(jìn)行的一個(gè)跨學(xué)科工程項(xiàng)目的設(shè)計(jì)。該項(xiàng)目的目標(biāo)是設(shè)計(jì)一個(gè)氣室內(nèi)溫度控制系統(tǒng)。該系統(tǒng)的要求是:當(dāng)實(shí)際氣室的溫度階躍響應(yīng)時(shí),規(guī)定范圍內(nèi)的溫度進(jìn)入氣室后,穩(wěn)定時(shí)的溫度誤差和超調(diào)量必須少于一個(gè)絕對溫度。本組學(xué)生開發(fā)設(shè)計(jì)

2、是基于摩托羅拉MC68HC05系列單片機(jī)。該問題的教學(xué)價(jià)值也通過某些步驟的關(guān)鍵描述在本文說明。研究結(jié)果表明,解決該方案需要具有廣泛的工程學(xué)科知識(shí),包括相關(guān)電子、機(jī)械和控制系統(tǒng)工程的知識(shí)。1引言該設(shè)計(jì)項(xiàng)目來自一個(gè)實(shí)際應(yīng)用問題,一個(gè)關(guān)于顯微鏡載玻片干燥劑溫控器歐米茄CN-390溫度控制器,而這個(gè)設(shè)計(jì)的目標(biāo)是研發(fā)一個(gè)自定義的通用溫度控制系統(tǒng)取代歐米茄系統(tǒng)、一個(gè)以更低的成本實(shí)現(xiàn)相同功能的自定義控制器,就像歐米茄系統(tǒng)一樣,并不需要能夠全方位的處理各種問題。該載玻片干燥機(jī)的機(jī)械布局如圖1-1所示。干燥機(jī)的主體是一個(gè)足夠大的絕緣充氣室,里面依次存放著薄紙包著的石蠟。為了使石蠟保持適當(dāng)穩(wěn)定性,載玻片氣室的溫度

3、必須維持穩(wěn)定。第二個(gè)氣筒(電子圍繞元件)設(shè)有一個(gè)電阻加熱器、一個(gè)溫度控制器以及一個(gè)安裝在干燥機(jī)上的風(fēng)扇,是為了把風(fēng)吹過加熱器,把熱量帶到載玻片氣室。圖1-1載玻片干燥機(jī)的機(jī)械布局自1996-97學(xué)年來,本文作者帶領(lǐng)四位三一大學(xué)工程科學(xué)系的高年級學(xué)生開展此項(xiàng)目的研究。本文的目的說明了提出一些問題并詳細(xì)闡述學(xué)生的一些解決方案,而且討論了這種類型的跨學(xué)科設(shè)計(jì)項(xiàng)目在教學(xué)方面應(yīng)用的問題。這份學(xué)生報(bào)告曾經(jīng)在1997年全國本科畢業(yè)生研討會(huì)上提出過并討論過。第2節(jié)給出該設(shè)計(jì)的更多詳細(xì)情況,包括性能規(guī)格。第3節(jié)具體 學(xué)生的設(shè)計(jì)。第4節(jié)是論文的主體,討論該設(shè)計(jì)在教學(xué)應(yīng)用方面的實(shí)施問題。最后,第5節(jié)全文總結(jié)。2問題

4、闡述該項(xiàng)目基本的思想是設(shè)計(jì)一個(gè)自定義溫度控制系統(tǒng)來取代相關(guān)的歐米茄CN-390溫度控制器。溫度時(shí)通常保持在一個(gè)穩(wěn)定的常數(shù),但重要的是階躍變化可以被“合理”的跟蹤。因此主要要求如下:·可以對空氣室的溫度進(jìn)行設(shè)定,·同時(shí)顯示設(shè)定值和實(shí)際溫度,·以及在設(shè)定溫度值情況下,可接受范圍內(nèi)的跟蹤階躍變化,穩(wěn)態(tài)誤差,超調(diào)量。表1精確的規(guī)格說明設(shè)定溫度接口設(shè)定溫度顯示室內(nèi)溫度顯示范圍精度準(zhǔn)確度60-991°C±1°C室內(nèi)溫度階梯響應(yīng)范圍(穩(wěn)定狀態(tài))精度(穩(wěn)定狀態(tài))最大超調(diào)設(shè)定時(shí)間(到±1°)60-99±1°C 1

5、°C120s盡管表1部分說明并不明確,但是它清楚的反映了人們對數(shù)字顯示器在設(shè)定值和實(shí)際溫度的要求和溫度應(yīng)該通過數(shù)值輸入來設(shè)定(而不是,通過電位器設(shè)置)。3系統(tǒng)設(shè)計(jì)根據(jù)微控設(shè)計(jì),數(shù)字溫度顯示和單點(diǎn)輸入的要求可能是最合適的。圖2-2為學(xué)生的設(shè)計(jì)框圖。圖2-2溫度控制器硬件結(jié)構(gòu)圖摩托羅拉MC68HC705B16(簡稱6805),是系統(tǒng)的核心。它通過一個(gè)簡單的4鍵小鍵盤對溫度進(jìn)行設(shè)定,同時(shí)使用兩個(gè)顯示驅(qū)動(dòng)控制7段LED數(shù)碼管來顯示定值和氣室溫度的測量值。所有這些,輸入和輸出信號與6805的并行口相連。氣室的溫度值使用預(yù)校準(zhǔn)熱敏電阻測量,并通過6805的數(shù)模轉(zhuǎn)換輸入。最后,6085的脈沖寬度調(diào)

6、制(PWM)輸出用來驅(qū)動(dòng)一個(gè)繼電器,以控制線性電阻加熱器的閉合和斷開。圖2-3更詳細(xì)的顯示了6805的接口和電子器件。使用暴風(fēng)3K041103型號四鍵鍵盤,通過PA0-PA3端口進(jìn)行數(shù)據(jù)輸入。其中一個(gè)重要的功能是進(jìn)行模式切換。兩種模式:固定模式和運(yùn)行模式。在固定模式下,其他兩個(gè)鍵用于設(shè)定溫度,一個(gè)增加,一個(gè)減少,第四個(gè)按鍵暫無作用。LED顯示屏由哈里斯半導(dǎo)體ICM7212進(jìn)行驅(qū)動(dòng),通過PB0-PB6端口與芯片相連,作為輸出。熱敏電阻由電壓分頻器驅(qū)動(dòng),通過AN0針腳(八個(gè)模擬輸入端口中的一個(gè))相連。最后,PLMA針腳(兩個(gè)PWM輸出端口中的一個(gè))驅(qū)動(dòng)加熱繼電器。圖2-3單片機(jī)原理圖圖3單片機(jī)原理

7、圖是關(guān)于用軟件實(shí)現(xiàn)溫度控制算法、保持溫度顯示以及改變鍵盤輸入響應(yīng),這將不會(huì)在本文詳細(xì)討論,因?yàn)檫@并不是本文的重點(diǎn),也沒有編譯完成。軟件部分還沒有確定控制算法,但很可能是一個(gè)簡單的比例控制,比PID算法簡單。一些控制設(shè)計(jì)的問題將在第四節(jié)討論。4設(shè)計(jì)過程雖然該項(xiàng)目的本質(zhì)是建立一個(gè)恒溫器,但它有許多很好的契機(jī)可以供教學(xué)借鑒。高級工程本科教育的知識(shí)只是能夠讓學(xué)生們具有解決問題的能力。然而,很多情況下,實(shí)際情況卻和理論有些不同。不過,這些不是問題,參與這個(gè)項(xiàng)目的設(shè)計(jì),將獲得很多設(shè)計(jì)方面的寶貴經(jīng)驗(yàn)。本節(jié)的其余部分著眼于其他的幾個(gè)方面:4.1節(jié)討論系統(tǒng)的一些特征,簡化系統(tǒng)熱性能的數(shù)學(xué)模型,以及一些簡單理論的

8、證明。4.2節(jié)介紹確定實(shí)際控制算法。4.3節(jié)指出控制設(shè)計(jì)程序的一些不足,并通過模擬環(huán)境,指出怎樣克服問題。4.4節(jié)給出單片機(jī)的一些設(shè)計(jì)相關(guān)概述,以及出現(xiàn)問題和值得借鑒之處。4.1數(shù)學(xué)模型集總元件熱系統(tǒng)符合線性控制,適用于載玻片干燥機(jī)的問題。圖4-1顯示了二階集總元件熱量模型的載玻片干燥機(jī)。狀態(tài)變量是溫度,Ta是箱內(nèi)空氣的溫度,Tb是箱子本身的溫度。該系統(tǒng)輸入功率等于q(t)的熱量和環(huán)境溫度T的和。ma,mb分別對應(yīng)空氣和箱子的質(zhì)量。Ca和Cb則分別是其對應(yīng)熱量。m1和m2分別是空氣與箱子間以及箱子與外界間的傳熱系數(shù)。圖4-1集總元件熱模型由圖4可以推出(線性)狀態(tài)方程拉普拉斯變換(1)和(2)

9、等式,并整理Ta(s)。有趣的是,可以推出一個(gè)開環(huán)的熱系統(tǒng)方程。其中K是一個(gè)常數(shù),D(s)是一個(gè)二階的多項(xiàng)式。K,tz,以及系數(shù)D(s)和在(1)和(2)等式中出現(xiàn)的系數(shù)功能相近。當(dāng)然,在(1)和(2)等式中各種參數(shù)在未知的情況下,不難證明D(s)與其他參數(shù)的值無關(guān),具有兩個(gè)零點(diǎn)。因此傳遞函數(shù)可以寫成(我們假設(shè)環(huán)境溫度為常數(shù))此外,可以推出1/tp1<1/tz<1/tp2,即,零點(diǎn)在兩極之間。開環(huán)零極點(diǎn)如圖4-2所示。圖4-2Gaq(s)的零極點(diǎn)為了獲取完整的熱模型,從(3)式中除去常數(shù)K和3個(gè)未知的時(shí)間常數(shù)。四個(gè)未知參數(shù)并不少,但由簡單的實(shí)驗(yàn)表明,1/tp1<<1/t

10、z,1/tp2統(tǒng)基本上是一階函數(shù),且tz,tp2近似為0。因此,開環(huán)系可以寫成:(下標(biāo)p1已經(jīng)被去掉了)過初始溫度和熱量值大范圍內(nèi)的設(shè)置,簡單的開環(huán)階躍響應(yīng)實(shí)驗(yàn)結(jié)果表明,K0.14o/W,295S。4.2控制系統(tǒng)設(shè)計(jì)使用(4)式的一階開環(huán)傳遞函數(shù)Gaq(s),并且假定加熱器的輸出函數(shù)q(t)為線性,圖4-3是系統(tǒng)框圖代表閉環(huán)系統(tǒng)。Td(s)是設(shè)定溫度的函數(shù),C(s)是傳遞函數(shù),Q(s)是熱量輸出,單位是瓦特。圖4-3簡化的閉環(huán)系統(tǒng)框圖鑒于這種簡單情況,前面所指的線性控制設(shè)置,例如,根軌跡法設(shè)計(jì)法可以使C(s)中符合要求的階躍響應(yīng)對應(yīng)的上升時(shí)間、穩(wěn)態(tài)誤差和超調(diào)量符合表格1所示。當(dāng)然,一個(gè)有足夠增

11、益的比例控制器就可以滿足各種要求。超調(diào)量改變是不可能既增加增益又減少穩(wěn)態(tài)誤差和上升時(shí)間的。不幸的是,如果要獲得足夠增益,需要生產(chǎn)超過實(shí)際生產(chǎn)能力的大容量加熱器。這是本系統(tǒng)的實(shí)際問題,將會(huì)致使上升時(shí)間不符合要求。這要求學(xué)生們?nèi)绾卫眠@個(gè)經(jīng)過仔細(xì)計(jì)算的簡化模型,在整體性能上達(dá)到最佳控制。4.4模型仿真該設(shè)計(jì)的大部分性能和限制功能,應(yīng)該可以使用圖4-3簡化模型來完成。但有一個(gè)數(shù)據(jù)對閉環(huán)系統(tǒng)其他方面的影響并非能夠如此簡單的仿真。其中最主要的是:·量化誤差的模擬和數(shù)模轉(zhuǎn)換,·測量溫度和使用PWM控制加熱器。這兩種都是非線性的、時(shí)變的。所以唯一切實(shí)可行的方法就是通過仿真(或?qū)嶒?yàn))加以研

12、究。圖7Simulink仿真閉環(huán)系統(tǒng)框圖顯示了Simulink情況下的閉環(huán)系統(tǒng)框圖,其中包括A/D轉(zhuǎn)換和使用標(biāo)準(zhǔn)Simulink量化飽和塊建立的飽和量化模型。建立PWM調(diào)制模型比較復(fù)雜,需要一個(gè)自定義的S函數(shù)來表示。圖4-3仿真閉環(huán)系統(tǒng)框圖這種仿真模型已經(jīng)被證明在衡量不同的PWM基本參數(shù)對設(shè)計(jì)的影響以及適當(dāng)參數(shù)的選擇中特別有用。(即時(shí)間越長,PWM調(diào)制會(huì)產(chǎn)生更多溫度誤差。另一方面,時(shí)間越長,繼電器抖動(dòng)機(jī)率越小。)PWM調(diào)制方法往往很難讓學(xué)生掌握,并且仿真模型允許研究測試運(yùn)行和明顯的影響。4.4單片機(jī)簡單的閉環(huán)控制、鍵盤輸入和顯示控制是經(jīng)典單片機(jī)應(yīng)用技術(shù),這個(gè)設(shè)計(jì)項(xiàng)目包含上述三個(gè)方面。因此這是一

13、個(gè)優(yōu)秀的全面的單片機(jī)應(yīng)用練習(xí)。此外,由于該項(xiàng)目是來源于現(xiàn)實(shí),它不會(huì)是一個(gè)簡單的輸入輸出設(shè)計(jì)就能完成的。相反,這個(gè)項(xiàng)目需要制定一個(gè)完整的嵌入式應(yīng)用。這需要從大量的單片機(jī)型號中選取適當(dāng)?shù)男酒W(xué)著使用一個(gè)相當(dāng)復(fù)雜的開發(fā)環(huán)境。最后,必須設(shè)計(jì)和選取印刷電路板和單片機(jī),以及外接元件。單片機(jī)選擇從現(xiàn)有的實(shí)際經(jīng)驗(yàn)來看,經(jīng)常選用摩托羅拉公司的單片機(jī)。不過,芯片的選擇不應(yīng)該局限于此。研究表明,系統(tǒng)要求符合工作需求的單片機(jī)。這對學(xué)生很困難,因?yàn)樗麄內(nèi)狈α己玫慕?jīng)驗(yàn)與判斷能力,只能通過制造商的產(chǎn)品選擇指南決定單片機(jī)的選擇。部分問題是各種外圍設(shè)備(例如,應(yīng)該使用哪種顯示驅(qū)動(dòng)程序?)連接方法的選擇。摩托羅拉的相關(guān)應(yīng)用研究

14、2,3,4中的證明是非常有用的,基本闡述了可實(shí)用性的連接方法以及單片機(jī)和外圍連接的組合方式。在最終要求的基礎(chǔ)上,選擇MC68HC705B16,其現(xiàn)有A/D輸入和PWM輸出以及24個(gè)數(shù)字I/O線。這樣選擇是有必要的,因?yàn)榇隧?xiàng)目需要一個(gè)A/D通道、一個(gè)PWM通道和11個(gè)I/O引腳(見圖3)。該決定為了安全方面,因?yàn)檫x擇一個(gè)完整的開發(fā)系統(tǒng)是有必要的,該項(xiàng)目預(yù)算中沒有足夠的資金再次購買元件。單片機(jī)應(yīng)用開發(fā)外圍設(shè)備的電路硬件、軟件的開發(fā)、最終調(diào)試、單片機(jī)的自定的印刷電路板和外設(shè)都需要某種形式的發(fā)展環(huán)境。如同單片機(jī)本身,一個(gè)開發(fā)環(huán)境的選擇是令人困惑并需要一些教師的專業(yè)知識(shí)。摩托羅拉三級發(fā)展環(huán)境,包括從簡單

15、的評估板(在約100美元)到全面的實(shí)時(shí)在線仿真器(在大約7500元)。中間選項(xiàng)被選為本項(xiàng)目的MMEVS,其中包括:·平臺(tái)板(支持所有6805-family部分),· 模擬器模塊(具體到B系列部分),和· 電纜頭和目標(biāo)適配器(簡明包裝)。總體而言,該系統(tǒng)的成本為900美元,并且在一定局限下,提供了在線仿真能力。它還配備了簡單但足夠的軟件開發(fā)環(huán)境RAPID5。學(xué)生發(fā)現(xiàn)學(xué)習(xí)使用這類系統(tǒng)的挑戰(zhàn)。但他們在現(xiàn)實(shí)世界的微控制器應(yīng)用獲得的經(jīng)驗(yàn)大大超過了第一使用典型的簡單評估板的經(jīng)驗(yàn)。印刷電路板一個(gè)簡單的(雖然布局絕對不平凡)印刷電路板是這個(gè)工程提供的另一個(gè)現(xiàn)實(shí)學(xué)習(xí)的機(jī)會(huì)。圖4-4

16、顯示最后的板布局與包輪廓(50%實(shí)際大?。?。相對簡單的電路使手工安置和路由實(shí)踐方面更實(shí)際,它有可能提供更好的結(jié)果比一個(gè)這樣的應(yīng)用程的自動(dòng)性。學(xué)生因此接觸到基本印刷電路布局問題和基本的設(shè)計(jì)規(guī)則。本排版軟件使用的是非常漂亮的包裝印刷電路板,板制作是在內(nèi)部電子技術(shù)員的幫助下完成的。圖4-4單片機(jī)印刷版布局結(jié)論本文的目的是描述一個(gè)跨學(xué)科的本科工程設(shè)計(jì)項(xiàng)目:一個(gè)基于單片機(jī)的溫度控制系統(tǒng),包括設(shè)定點(diǎn)輸入數(shù)字與設(shè)定值/實(shí)際溫度顯示。本文已描述了這樣系統(tǒng)的一個(gè)設(shè)計(jì),并且討論了許多來自工程的問題。這些問題的解決通常需要入門課程要求的知識(shí),尤其是在老師的建議和監(jiān)督下,實(shí)際上可以促進(jìn)大學(xué)生發(fā)展。從教學(xué)方法觀點(diǎn)看,問

17、題的理想特征包括微控制器和外圍設(shè)備的簡單使用,有效地運(yùn)用導(dǎo)論水平的物理系統(tǒng)建模和設(shè)計(jì)閉環(huán)控制。并需要相對簡單的實(shí)驗(yàn)和模擬(詳細(xì)的性能預(yù)測)。并可取的是一些技術(shù)相關(guān)方面的問題,包括熱敏電阻和溫度傳感器(分別需要知識(shí)脈寬調(diào)制和校準(zhǔn)技術(shù))的實(shí)際使用、單片機(jī)選擇和開發(fā)系統(tǒng)的使用以及并印制電路設(shè)計(jì)。鳴謝作者要感謝參與這個(gè)項(xiàng)目的學(xué)生,馬克朗·斯道夫,馬特洛爾和戴維·舒克曼,表現(xiàn)出辛勤工作、奉獻(xiàn)和能力。這個(gè)工程和工程成功全賴他們。參考文獻(xiàn)1朗斯道夫,M.拉爾,D.舒克曼,和P.萊因哈特.“顯微鏡載玻片干燥劑溫控器”1997屆全國大學(xué)生研究,(奧斯汀,德克薩斯州,四月1997.海報(bào)介紹.2

18、摩托羅拉公司,鳳凰城,亞利桑那.溫度測量和使用它的顯示mc68hc05b4和mc14489,1990。摩托羅拉semiconductorapplicationnote an431.3摩托羅拉公司,鳳凰城,亞利桑那.hc05單片機(jī)驅(qū)動(dòng)技術(shù)使用mc68hc705j1a,1995.摩托羅拉半導(dǎo)體應(yīng)用筆記an1238.4摩托羅拉公司,鳳凰城,亞利桑那.hc05mcu鍵盤解碼技術(shù)使用mc68hc705j1a,1995.摩托羅拉半導(dǎo)體應(yīng)用筆記an1239.5摩托羅拉公司,鳳凰城,亞利桑那.快速集成開發(fā)環(huán)境用戶手冊,1993.(快速是由寶潔微機(jī)系統(tǒng),有限公司.)附錄:翻譯原文Temperature Cont

19、rol Using a Microcontroller:An Interdisciplinary Undergraduate Engineering Design ProjectJames S. McDonaldDepartment of Engineering ScienceTrinity UniversitySan Antonio, TX 78212AbstractThis paper describes an interdisciplinary design project which was done under the authors supervision by a group o

20、f four senior students in the Department of Engineering Science at Trinity University. The objective of the project was to develop a temperature control system for an air-filled chamber. The system was to allow entry of a desired chamber temperature in a prescribed range and to exhibit overshoot and

21、 steady-state temperature error of less than 1 degree Kelvin in the actual chamber temperature step response. The details of the design developed by this group of students, based on a Motorola MC68HC05 family microcontroller, are described. The pedagogical value of the problem is also discussed thro

22、ugh a description of some of the key steps in the design process. It is shown that the solution requires broad knowledge drawn from several engineering disciplines including electrical, mechanical, and control systems engineering.1 IntroductionThe design project which is the subject of this paper or

23、iginated from a real-world application. A prototype of a microscope slide dryer had been developed around an OmegaTM model CN-390 temperature controller, and the objective was to develop a custom temperature control system to replace the Omega system. The motivation was that a custom controller targ

24、eted specifically for the application should be able to achieve the same functionality at a much lower cost, as the Omega system is unnecessarily versatile and equipped to handle a wide variety of applications.The mechanical layout of the slide dryer prototype is shown in Figure 1. The main element

25、of the dryer is a large, insulated, air-filled chamber in which microscope slides, each with a tissue sample encased in paraffin, can be set on caddies. In order that the paraffin maintain the proper consistency, the temperature in the slide chamber must be maintained at a desired (constant) tempera

26、ture. A second chamber (the electronics enclosure) houses a resistive heater and the temperature controller, and a fan mounted on the end of the dryer blows air across the heater, carrying heat into the slide chamber. This design project was carried out during academic year 199697 by four students u

27、nder the authors supervision as a Senior Design project in the Department of Engineering Science at Trinity University. The purpose of this paper isto describe the problem and the students solution in some detail, and to discuss some of the pedagogical opportunities offered by an interdisciplinary d

28、esign project of this type. The students own report was presented at the 1997 National Conference on Undergraduate Research 1. Section 2 gives a more detailed statement of the problem, including performance specifications, and Section 3 describes the students design. Section 4 makes up the bulk of t

29、he paper, and discusses in some detail several aspects of the design process which offer unique pedagogical opportunities. Finally, Section 5 offers some conclusions.2 Problem StatementThe basic idea of the project is to replace the relevant parts of the functionality of an Omega CN-390 temperature

30、controller using a custom-designed system. The application dictates that temperature settings are usually kept constant for long periods of time, but its nonetheless important that step changes be tracked in a “reasonable” manner. Thus the main requirements boil down to·allowing a chamber tempe

31、rature set-point to be entered,·displaying both set-point and actual temperatures, and·tracking step changes in set-point temperature with acceptable rise time, steady-state error, and overshoot.Although not explicitly a part of the specifications in Table 1, it was clear that the customer

32、 desired digital displays of set-point and actual temperatures, and that set-point temperature entry should be digital as well (as opposed to, say, through a potentiometer setting).3 System DesignThe requirements for digital temperature displays and setpoint entry alone are enough to dictate that a

33、microcontrollerbased design is likely the most appropriate. Figure 2 shows a block diagram of the students design. The microcontroller, a MotorolaMC68HC705B16 (6805 for short), is the heart of the system. It accepts inputs from a simple four-key keypad which allow specification of the set-point temp

34、erature, and it displays both set-point and measured chamber temperatures using two-digit seven-segment LED displays controlled by a display driver. All these inputs and outputs are accommodated by parallel ports on the 6805. Chamber temperature is sensed using a pre-calibrated thermistor and input

35、via one of the 6805s analog-to-digital inputs. Finally, a pulse-width modulation (PWM) output on the 6805 is used to drive a relay which switches line power to the resistive heater off and on.Figure 3 shows a more detailed schematic of the electronics and their interfacing to the 6805. The keypad, a

36、 Storm 3K041103, has four keys which are interfaced to pins PA0 PA3 of Port A, configured as inputs. One key functions as a mode switch. Two modes are supported: set mode and run mode. In set mode two of the other keys are used to specify the set-point temperature: one increments it and one decremen

37、ts. The fourth key is unused at present. The LED displays are driven by a Harris Semiconductor ICM7212 display driver interfaced to pins PB0PB6 of Port B, configured as outputs. The temperature-sensing thermistor drives, through a voltage divider, pin AN0 (one of eight analog inputs). Finally, pin P

38、LMA (one of two PWM outputs) drives the heater relay.Software on the 6805 implements the temperature control algorithm, maintains the temperature displays, and alters the set-point in response to keypad inputs. Because it is not complete at this writing, software will not be discussed in detail in t

39、his paper. The control algorithm in particular has not been determined, but it is likely to be a simple proportional controller and certainly not more complex than a PID. Some control design issues will be discussed in Section 4, however.4 The Design ProcessAlthough essentially the project is just t

40、o build a thermostat, it presents many nice pedagogical opportunities. The knowledge and experience base of a senior engineering undergraduate are just enough to bring him or her to the brink of a solution to various aspects of the problem. Yet, in each case, realworld considerations complicate the

41、situation significantly.Fortunately these complications are not insurmountable, and the result is a very beneficial design experience. The remainder of this section looks at a few aspects of the problem which present the type of learning opportunity just described. Section 4.1 discusses some of the

42、features of a simplified mathematical model of the thermal properties of the system and how it can be easily validated experimentally. Section 4.2 describes how realistic control algorithm designs can be arrived at using introductory concepts in control design. Section 4.3 points out some important

43、deficiencies of such a simplified modeling/control design process and how they can be overcome through simulation. Finally, Section 4.4 gives an overview of some of the microcontroller-related design issues which arise and learning opportunities offered.4.1 MathematicalModelLumped-element thermal sy

44、stems are described in almost any introductory linear control systems text, and just this sort of model is applicable to the slide dryer problem. Figure 4 shows a second-order lumped-element thermal model of the slide dryer. The state variables are the temperatures Ta of the air in the box and Tb of

45、 the box itself. The inputs to the system are the power output q(t) of the heater and the ambient temperature T¥. ma and mb are the masses of the air and the box, respectively, and Ca and Cb their specific heats. 1 and 2 are heat transfer coefficients from the air to the box and from the box to

46、 the external world, respectively.Its not hard to show that the (linearized) state equationscorresponding to Figure 4 areTaking Laplace transforms of (1) and (2) and solving for Ta(s), which is the output of interest, gives the following open-loop model of the thermal system:where K is a constant an

47、d D(s) is a second-order polynomial.K, 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 completely unknown, but its not hard to show that, regardless of their values, D(s) has two real zeros. Therefor

48、e the main transfer function of interest (which is the one from Q(s), since well assume constant ambient temperature) can be writtenMoreover, its not too hard to show that 1=tp1 <1=tz <1=tp2, i.e., that the zero lies between the two poles. Both of these are excellent exercises for the student,

49、 and the result is the openloop pole-zero diagram of Figure 5.Obtaining a complete 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;1=tp2 so that tz;tp2 _ 0

50、 are good approximations. Thus the open-loop system is essentially first-order and can therefore be written (where the subscript p1 has been dropped).Simple open-loop step response experiments show that,for a wide range of initial temperatures and heat inputs, K _0:14 _=W and t _ 295 s.14.2 Control

51、System DesignUsing the first-order model of (4) for the open-loop 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 closed-loop system. Td(s) is the desired, or set-point, temperature,C(s

52、) is the compensator 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, steady-state error, and overshoo

53、t 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 steady-state error and rise time.Unfortunately, sufficient gain to meet the specifications may require large

54、r 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 perfor

55、mance limitations.4.3 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 closed-loop system whose effects on performance are not so simply modeled. Chief among these are·quantization erro

56、r in analog-to-digital conversion of the measured temperature and· the use of PWM to control the heater.Both of these are nonlinear and time-varying effects, and the only practical way to study them is through simulation (or experiment, of course).Figure 7 shows a SimulinkTM block diagram of th

57、e closed-loop system which incorporates these effects. A/D converter quantization and saturation are modeled using standard Simulink quantizer and saturation blocks. Modeling PWM is more complicated and requires a custom S-function to represent it.This simulation model has proven particularly useful

58、 in gauging the effects of varying the basic PWM parameters and hence selecting them appropriately. (I.e., the longer the period, the larger the temperature error PWM introduces. On the other hand, a long period is desirable to avoid excessive relay “chatter,” among other things.) PWM is often difficult for students to grasp, and the simulation model allows an exploration of its operation and effects which is quite revealing.4.4 The Microcon

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

最新文檔

評論

0/150

提交評論