单片机温度控制英文文献及翻译.docx
《单片机温度控制英文文献及翻译.docx》由会员分享,可在线阅读,更多相关《单片机温度控制英文文献及翻译.docx(22页珍藏版)》请在冰豆网上搜索。
![单片机温度控制英文文献及翻译.docx](https://file1.bdocx.com/fileroot1/2023-5/24/9c3b1a33-679a-4ebd-858d-f0fca2a0d66b/9c3b1a33-679a-4ebd-858d-f0fca2a0d66b1.gif)
单片机温度控制英文文献及翻译
TemperatureControlUsingaMicrocontroller:
AnInterdisciplinaryUndergraduateEngineeringDesignProject
JamesS.McDonald
DepartmentofEngineeringScience
TrinityUniversity
SanAntonio,TX78212
Abstract
Thispaperdescribesaninterdisciplinarydesignprojectwhichwasdoneundertheauthor’ssupervisionbyagroupoffourseniorstudentsintheDepartmentofEngineeringScienceatTrinityUniversity.Theobjectiveoftheprojectwastodevelopatemperaturecontrolsystemforanair-filledchamber.Thesystemwastoallowentryofadesiredchambertemperatureinaprescribedrangeandtoexhibitovershootandsteady-statetemperatureerroroflessthan1degreeKelvinintheactualchambertemperaturestepresponse.Thedetailsofthedesigndevelopedbythisgroupofstudents,basedonaMotorolaMC68HC05familymicrocontroller,aredescribed.Thepedagogicalvalueoftheproblemisalsodiscussedthroughadescriptionofsomeofthekeystepsinthedesignprocess.Itisshownthatthesolutionrequiresbroadknowledgedrawnfromseveralengineeringdisciplinesincludingelectrical,mechanical,andcontrolsystemsengineering.
1Introduction
Thedesignprojectwhichisthesubjectofthispaperoriginatedfromareal-worldapplication.AprototypeofamicroscopeslidedryerhadbeendevelopedaroundanOmegaTMmodelCN-390temperaturecontroller,andtheobjectivewastodevelopacustomtemperaturecontrolsystemtoreplacetheOmegasystem.Themotivationwasthatacustomcontrollertargetedspecificallyfortheapplicationshouldbeabletoachievethesamefunctionalityatamuchlowercost,astheOmegasystemisunnecessarilyversatileandequippedtohandleawidevarietyofapplications.
ThemechanicallayoutoftheslidedryerprototypeisshowninFigure1.Themainelementofthedryerisalarge,insulated,air-filledchamberinwhichmicroscopeslides,eachwithatissuesampleencasedinparaffin,canbesetoncaddies.Inorderthattheparaffinmaintaintheproperconsistency,thetemperatureintheslidechambermustbemaintainedatadesired(constant)temperature.Asecondchamber(theelectronicsenclosure)housesaresistiveheaterandthetemperaturecontroller,andafanmountedontheendofthedryerblowsairacrosstheheater,carryingheatintotheslidechamber.Thisdesignprojectwascarriedoutduringacademicyear1996–97byfourstudentsundertheauthor’ssupervisionasaSeniorDesignprojectintheDepartmentofEngineeringScienceatTrinityUniversity.Thepurposeofthispaperis
todescribetheproblemandthestudents’solutioninsomedetail,andtodiscusssomeofthepedagogicalopportunitiesofferedbyaninterdisciplinarydesignprojectofthistype.Thestudents’ownreportwaspresentedatthe1997NationalConferenceonUndergraduateResearch[1].Section2givesamoredetailedstatementoftheproblem,includingperformancespecifications,andSection3describesthestudents’design.Section4makesupthebulkofthepaper,anddiscussesinsomedetailseveralaspectsofthedesignprocesswhichofferuniquepedagogicalopportunities.Finally,Section5offerssomeconclusions.
2ProblemStatement
ThebasicideaoftheprojectistoreplacetherelevantpartsofthefunctionalityofanOmegaCN-390temperaturecontrollerusingacustom-designedsystem.Theapplicationdictatesthattemperaturesettingsareusuallykeptconstantforlongperiodsoftime,butit’snonethelessimportantthatstepchangesbetrackedina“reasonable”manner.Thusthemainrequirementsboildownto
·allowingachambertemperatureset-pointtobeentered,
·displayingbothset-pointandactualtemperatures,and
·trackingstepchangesinset-pointtemperaturewithacceptablerisetime,steady-stateerror,andovershoot.
AlthoughnotexplicitlyapartofthespecificationsinTable1,itwasclearthatthecustomerdesireddigitaldisplaysofset-pointandactualtemperatures,andthatset-pointtemperatureentryshouldbedigitalaswell(asopposedto,say,throughapotentiometersetting).
3SystemDesign
Therequirementsfordigitaltemperaturedisplaysandsetpointentryaloneareenoughtodictatethatamicrocontrollerbaseddesignislikelythemostappropriate.Figure2showsablockdiagramofthestudents’design.
Themicrocontroller,aMotorolaMC68HC705B16(6805forshort),istheheartofthesystem.Itacceptsinputsfromasimplefour-keykeypadwhichallowspecificationoftheset-pointtemperature,anditdisplaysbothset-pointandmeasuredchambertemperaturesusingtwo-digitseven-segmentLEDdisplayscontrolledbyadisplaydriver.Alltheseinputsandoutputsareaccommodatedbyparallelportsonthe6805.Chambertemperatureissensedusingapre-calibratedthermistorandinputviaoneofthe6805’sanalog-to-digitalinputs.Finally,apulse-widthmodulation(PWM)outputonthe6805isusedtodrivearelaywhichswitcheslinepowertotheresistiveheateroffandon.
Figure3showsamoredetailedschematicoftheelectronicsandtheirinterfacingtothe6805.Thekeypad,aStorm3K041103,hasfourkeyswhichareinterfacedtopinsPA0{PA3ofPortA,configuredasinputs.Onekeyfunctionsasamodeswitch.Twomodesaresupported:
setmodeandrunmode.Insetmodetwooftheotherkeysareusedtospecifytheset-pointtemperature:
oneincrementsitandonedecrements.Thefourthkeyisunusedatpresent.TheLEDdisplaysaredrivenbyaHarrisSemiconductorICM7212displaydriverinterfacedtopinsPB0{PB6ofPortB,configuredasoutputs.Thetemperature-sensingthermistordrives,throughavoltagedivider,pinAN0(oneofeightanaloginputs).Finally,pinPLMA(oneoftwoPWMoutputs)drivestheheaterrelay.
Softwareonthe6805implementsthetemperaturecontrolalgorithm,maintainsthetemperaturedisplays,andalterstheset-pointinresponsetokeypadinputs.Becauseitisnotcompleteatthiswriting,softwarewillnotbediscussedindetailinthispaper.Thecontrolalgorithminparticularhasnotbeendetermined,butitislikelytobeasimpleproportionalcontrollerandcertainlynotmorecomplexthanaPID.SomecontroldesignissueswillbediscussedinSection4,however.
4TheDesignProcess
Althoughessentiallytheprojectisjusttobuildathermostat,itpresentsmanynicepedagogicalopportunities.Theknowledgeandexperiencebaseofaseniorengineeringundergraduatearejustenoughtobringhimorhertothebrinkofasolutiontovariousaspectsoftheproblem.Yet,ineachcase,realworldconsiderationscomplicatethesituationsignificantly.
Fortunatelythesecomplicationsarenotinsurmountable,andtheresultisaverybeneficialdesignexperience.Theremainderofthissectionlooksatafewaspectsoftheproblemwhichpresentthetypeoflearningopportunityjustdescribed.Section4.1discussessomeofthefeaturesofasimplifiedmathematicalmodelofthethermalpropertiesofthesystemandhowitcanbeeasilyvalidatedexperimentally.Section4.2describeshowrealisticcontrolalgorithmdesignscanbearrivedatusingintroductoryconceptsincontroldesign.Section4.3pointsoutsomeimportantdeficienciesofsuchasimplifiedmodeling/controldesignprocessandhowtheycanbeovercomethroughsimulation.Finally,Section4.4givesanoverviewofsomeofthemicrocontroller-relateddesignissueswhichariseandlearningopportunitiesoffered.
4.1MathematicalModel
Lumped-elementthermalsystemsaredescribedinalmostanyintroductorylinearcontrolsystemstext,andjustthissortofmodelisapplicabletotheslidedryerproblem.Figure4showsasecond-orderlumped-elementthermalmodeloftheslidedryer.ThestatevariablesarethetemperaturesTaoftheairintheboxandTboftheboxitself.Theinputstothesystemarethepoweroutputq(t)oftheheaterandtheambienttemperatureT¥.maandmbarethemassesoftheairandthebox,respectively,andCaandCbtheirspecificheats.μ1andμ2areheattransfercoefficientsfromtheairtotheboxandfromtheboxtotheexternalworld,respectively.
It’snothardtoshowthatthe(linearized)stateequationscorrespondingtoFigure4are
TakingLaplacetransformsof
(1)and
(2)andsolvingforTa(s),whichistheoutputofinterest,givesthefollowingopen-loopmodelofthethermalsystem:
whereKisaconstantandD(s)isasecond-orderpolynomial.K,tz,andthecoefficientsofD(s)arefunctionsofthevariousparametersappearingin
(1)and
(2).Ofcoursethevariousparametersin
(1)and
(2)arecompletelyunknown,butit’snothardtoshowthat,regardlessoftheirvalues,D(s)hastworealzeros.Thereforethemaintransferfunctionofinterest(whichistheonefromQ(s),sincewe’llassumeconstantambienttemperature)canbewritten
Moreover,it’snottoohardtoshowthat1=tp1<1=tz<1=tp2,i.e.,thatthezeroliesbetweenthetwopoles.Bothoftheseareexcellentexercisesforthestudent,andtheresultistheopenlooppole-zerodiagramofFigure5.
Obtainingacompletethermalmodel,then,isreducedtoidentifyingtheconstantKandthethreeunknowntimeconstantsin(3).Fourunknownparametersisquiteafew,butsimpleexperimentsshowthat1=tp1_1=tz;1=tp2sothattz;tp2_0aregoodapproximations.Thustheopen-loopsystemisessentiallyfirst-orderandcanthereforebewritten
(wherethesubscriptp1hasbeendropped).
Simpleopen-loopstepresponseexperimentsshowthat,forawiderangeofinitialtemperaturesandheatinputs,K_0:
14_=Wandt_295s.1
4.2ControlSystemDesign
Usingthefirst-ordermodelof(4)fortheopen-looptransferfunctionGaq(s)andassumingforthemomentthatlinearcontroloftheheaterpoweroutputq(t)ispossible,theblockdiagramofFigure6representstheclosed-loopsystem.Td(s)isthedesired,orset-point