InternationalTechnologyandInnovationConference2007THEDESIGNOFFUZZYPIDMULTI-CHANNELTEMPERATURECONTROLSYSTEMBASEDONNEURALNETWORKZHANGYongjun*,WANGZhixing*,WANGLilit*HarbinInstituteofTechnology,Harbin150006,China,zhangyongjun916@sohu.comtHarbinUniversityofScienceandTechnology,Harbin150080,China,gaisidiwenwll@yahoo.com.cnKeywords:FuzzyPIDcontrol,neuralnetwork,controlsystem,temperaturemeasurement.AbstractBasedonfuzzyneuralnetworkPIDcontroltechnology,thepaperdesignsamulti-channeltemperaturesystemusedinpetrochemicalindustry.ByadjustingPIDcontrolparametersthroughfuzzyneuralnetwork,thesystemperfectstheauto-adaptingperformanceofPIDcontrol.Themaincomponentoftemperaturemonitorandcontrolhardwaresystemismicro-controllerC8051F020.Thishardwaresystemcouldrealizetemperaturedetectionandcontrolonsixteenmonitorpoints,andtransmitsthetemperaturesignalthroughCANbustouppercomputerreal-timely.Theresultsofexperimentsprovethatthissystemsatisfiesoperationrequirements,andhasnicerdynamicstate,staticstateandauto-adaptabilitystate.experienceofexperts,whicharefixedinthelanguageruleandinferenceprocess,anditissupposedthatcontrolprocesscannotmakeremarkablechangebeyondtheseexperiencescopes,sotheparametershavecertainlimitation.Neuralnetworkcouldobtaintherulesdirectlyfromthedatasamplewithoutusingdomainknowledge,sothefuzzyneuralnetworkhasfuzzyinferenceability,self-study,self-adaptability,faulttoleranceandparallelism-in-handlingability.ThepaperusestheneuralnetworktoadjustPIDparameterstoperfecttheself-adaptabilityofPIDcontrol,anddesignsahardwarecontrolsystemmulti-channeltemperaturecontrolcombiningwithmicro-controllerC8051F020.Theresultsofapplicationprovethatthehardwaresystemhasgoodrobustness,dynamictrackingqualityandstablestateprecision.2ManuscriptpreparationControlalgorithmofsequencePIDis:1tde(t)u(t)=Kp[e(t)+-foe(t)dt+Td-]11dt1IntroductionInpetrochemicalindustry,inordertoensuretheequipmentstorunstablyandensuretheproductquality,severalrequirementsofworkingenvironmentandworkingtemperaturetotheequipmentshasstricthavebeenlistedstrictly.Buttheprocessofthermoregulationisthetypicalnon-linearity,strongcoupling,timevarying,andtimelagprocess,whichisabigdeferredprocess.Owingtothebigdeferring,thesystemhasseriousnonlinearityandtimevaryingcharacteristic,andtherearemanydisturbancefactorsaffectingthetemperatureandenvironmentchangingoftheequipments,whichmakethethermoregulationverydifficult.Whereassomeroutinecontrolplansusinginthermoregulationeffectsofbigpetrochemicalequipmentisnotidealenough,soitisverysignificanttodesignthenewcontroltacticsofthepetrochemicaltemperaturecontrolsystem.ThefuzzyPIDcontrol[3]isanamazingcontrolmethodinthedomainofcontrol,andusesthefuzzycontroltechnologyindependentofcontroltarget'smathematicalmodel.Throughtheprocessingoffuzzyinformation,thefuzzyPIDcontrolcanwellcontrolthecomplexobject,andhashighprecisionofstablestate.ThefuzzyPIDcontrolhasupperagility,adaptabilityandcontrolprecision,andobtainsmoreandmoreapplicationinmanydomains.AsthecontrolregulationparametersoffuzzyPIDcontrolleraresummedupviathe(1)InthedesignofpositiontypePIDcontroller,theincreasetypePIDisusuallyused.Thediscreteformis:u(t)=u(t-l)+Kp[e(t)-e(t-l)]+Kie(t)+Kd[e(t)-2e(t-l)+e(t-2)](2)WhereKp,K.,KIdaretheproportional,integral,anddifferentialcoefficientsrespectively.AndTissamplingcycle,u(t)isthecontrollingquantityofcurrentsamplingtime.Itissupposedthate(t)and6e(t)aretheoutputerroranderrorchangerate,thenadjustingPIDparametersusingfuzzyneuralnetworkbasedonconventionalPIDcontrolleristoestablishthecontinuousfunctionrelationshipbetweenthecontrolparametersKp,K.,KIdandoutputerrorabsolutevalue16e(t)I.ItissupposedIe(t)I,errorchangerateabsolutevaluethatthefunctionrelationshipbetweencontrolparametersanderror,errorchangerateistheformula(3).Accordingtodifferentinputoferroranderrorchangerate,PIDcontrolparameterscouldbecreatedreal-timelyonline,whichmakesthecontrollerperformancebest.-1940-Section2AutomationTechnology&RoboticsKp=.Ii(Ie(t)I,I~e(t)I)(3)K;=12(Ie(t)I,I~e(t)I)Kd=13(Ie(t)I,I~e(t)I)Accordingtotheexperts'experienceandactualsituation,thefollowingrulecouldbesummedup:whensystemerrore(t)isbig,inordertomakethesystemhasbetterfast-trackingperformanceandinordertoavoidthesystemresponseandlesserappearsbigovershooting[1],thebigKpKdshouldbeusedandtheintegralactionshouldbelimited.Figure1:structureofneuralnetworkfuzzyPIDcontrolsystem.Temperatureerrore(t)andtemperatureerrorchangerateae(t).InthefuzzyPIDcontrollerdesignedbasedonneuralnetwork,thereareseveninputlanguagevalues(NB,NM,NS,O,PS,PM,PB),whicharecorrespondingtouniverseofdiscourseoffuzzyset(-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6).Themembershipfunctionofeachfuzzylanguagevariableistanglefunction,whichisshowninfigure2andfigure3.Inordertoenhancetherobustnessofsystemandresolutionofmembershipfunction,theformoffunctionnearthevalueshouldbealittlesteep.Whenthesystemerrore(t)isinmediumsize,inordertomakethesystemappearlesserovershooting,Kpshouldbelesser.Inthiscase,thevalueofKdhastheinfluenceonsystemresponse.Whenthesystemerrore(t)islesser,inordertomakethesystemhavebetterstablestateperformance,KandK.shouldbebig.p1°3StructureandprincipleoffuzzyneuralnetworkPIDcontroller4.2NeuralnetworkadjustsfuzzyrulemoduleNeuralnetworkstructure[4]isshowninfigure4.ItusesthreelayersBPneuralnetworks,whichcompriseofinputlayer,concealinglayerandoutputlayer.Inputlayerise(t)andae(t)correspondingtotwoinputnodes,concealinglayertakingchargefuzzyandfuzzyreasoninghaseightnodes,outputlayerhasthreenodescorrespondingtothreecontrolparametersK,K.andK.Asthethreecontrolp1ThestructureofneuralnetworkfuzzyPIDcontrollerisshowninfigure1.Thecontrolleriscomposedofthreeparts:(1)thetraditionalPIDcontroller:whichcarriesclosedloopcontroloverthecontrolledobjectandprocessdirectly,andtheparametersKp,K.,Kareself-turningonline.(2)fuzzy1dmodule:whichcarriesthehandlingoffuzzinessandnormalizeddifferenceonstatevariable.(3)neuralnetwork:whichmeansfuzzyrule.ThroughstudyingNN,theruleisintheformofweightcoefficient,andthecreatingoftheruleistransformedtoconfirmandamendtheweightcoefficientinitialvalue.Accordingtotherunningstate,adjustingPIDcontrolparametersmakestheperformanceofthecontrolsystematitsbest.Theconcretemethodis:theoutputstateofneuralunitshouldbecorrespondingtotheadjustedparametersofPIDcontroller.ThePIDcontrolparametersaresettomakethecontrolsystembestviaadjustingthecontroller'weightcoefficient.dparameterscannotbenegative,theneuralunitactivationfunctionofoutputlayerisassumedasnon-negativeSigmoidfunction.Butactivation.functionofconcealinglayerneuralunitisassumedaspositiveandnegativesymmetricalSigmoidfunction.UNBr---_NIvINSO__PS__PIvI__-,PB10.80.60.44RealizingoffuzzyneuralnetworkPIDcontrolalgorithm4.1Filing-upfuzzymoduleItissupposedthattherearetwofuzzyvariables:0.20-6-4-2o246e(f)Figure2:membershipfunctionoftemperatureerrorchangee(t).Theinputofneuralnetworkise(t)andae(t),theinputandoutputofconcealinglayeris:2ne/)(k)=I(2)_OJ(k)-f[]=0Aj,.£..J(O~~)o(l)(k)lJ](2)._netj(k)]-O,I,2,...Q)I(4)-1941-InternationalTechnologyandInnovationConference2007WhereQis8informula(4);concealinglayer;miiJandOJ~~)isthecoefficientofTheinputandoutputdatafromlocaleisthetrainingsampleofneuralnetwork,andusesBPalgorithmfortraininglJnetwork.Thepapermakesuseofneuralnetworktrainedtoreason,andobtainstheoutputofPIDcontrolparameters.Therefore,thepaperestablishesthemappingrelationshipbetweenthePIDcontrolparametersK,K.,KanderrorpIiscorrespondingvalvevalue.isactivationfunction,thef[.]=tanh(x)=---xeX+e-eX_e-xdsuperscripts[1],[2][3]arecorrespondingtoinputlayer,e(t),errorchangerate6.e(t),usesthefuzzyneuralnetworkconcealinglayerandoutputlayerrespectively.Theinputandoutputofoutputlayeris:nett(?)(k)=Ii=O~OJt(?)o(2)(k)II(5)torealizeauto-adaptingadjustingofPIDcontrolparameters,andsatisfiesdifferentrequirementsofcontrolparametersundertheconditionofdifferente(t)and6.e(t).o}3)(k)=g[net}3)(k)](t=O,I,2)5HardwarecontrolsystemdesignThesystemhardwarestructureisshowninfigure5.Theintegrationcompositesignal[1]SoCchipC8051F020manufacturedbyAmericaCygnalCompanyisthecoreofthecircuit,andthechipintegratesthedatagathering,simulationpartsusuallyusedincontrolsystemandthedigitalperipherals,whichcouldfacilitatetheconnectionwithperipheralandrealizehighprecisiongatheringtosimulationsignal.TheperipheralsaresixteenrouteADC,programmablegainamplifier,voltagecomparator,voltagenorm,temperaturesensorandsoon.o~3)(k)=Kp;of3)(k)=Ki;O~3)(k)=KDWherem~3)isweightcoefficientofoutputlayerintheJ=Mr(k+l)-Y(k+l)]2formula(5),andperformanceindexfunctionis:(6)Correcttheweightcoefficientofnetworkaccordingtosteepestdescentmethod,thentheweightcoefficientformulaofoutputlayerandconcealinglayerofBPneuralnetworkisshowninformulas(7)and(8).AOJ~?)(k+l)=17of3)of2)(k)+aOJ~?)(k)of3)=e(k+l)Sgn(BY(k+l»)Bu(k)By(k+l)[3](3)gnett(k)(t=0,1,2)BUt(k)(7)Micro-controllerC8051F020Three-waretemperaturemeasurement6.OJ~2)(k+l)='70;(2)0)(k)+a6.OJ~2)(k)or)=f[net[22)(k)l!o<5[3)m~3))(8)(k)(j=0,1,2,...8)ProgramdownloadrtlControlsignaloutputFigure4:structureofsystemhardware.Thetemperatureexaminationpartsusesplatinumresistanceastemperaturesensingelement,makesuseofthecharacteristicthattheresistancevalueofplatinumresistanceincreaseswiththetemperaturerising,andcouldtranslatethetemperaturechangeintovoltagechange.Inordertoimprovethetemperaturemeasurementprecisionofthelocaletemperaturemeasurementpoint,theconnectionbetweenthecircuitandtemperaturemeasurementsensorusesthemethodoftheconstantcurrentdrivethree-wire,whichavoidsthetemperaturemeasurementerrorbroughtbylongdown-leadandthereplacingdown-leadofdifferentlength,thenenhancesthemeasurementprecision.ThetemperaturecontrolpartmakesuseoftheuniversaldigitalportC8051F020,andconnectstheheatpreservationequipmentsoftemperaturemeasurementpointsforcontrolstart-upandstopofheatpreservationequipmentsoftemperaturemeasurementpoints.Atthesametime,inordertotransmitthetemperatureofeachpointtotheuppercomputerfordisplaying,thecommunicationwiththeuppercomputerusesCANbuscommunication.CANbuswhichisaserialcommunicationConcealinglayerInputlayerFigure3:structureoffuzzyneuralnetwork.-1942-Section2AutomationTechnology&Roboticsbusofmulti-hostworkingcouldprovidethetransmissionspeedofdataashighasIMbit/sandhashighreliability.CommunicationinterfaceofCANbusiscomposedofSJA1000,82C250andhighspeedlight-coupledisolationcircuits.7ConclusionThepaperintroducesindetailsthesoftwareandhardwaredesignofmulti-channeltemperaturecontrolsystemusinginthepetrochemicalindustrybasedonfuzzyneuralnetworkPIDcontroltechnology.Thesystemhasrunsuccessfully,anditcanmeasuremulti-spottemperatureaccurately,andhasthecharacteristicsoffullfunction,highcontrolprecision,highreliability,stronganti-jammingability,andwide-scopeapplication.MeuandeachtimerinitializationAcknowledgementsTemperaturesensorinformationgatheringsubprogramThanksforHeilongjiangnaturalsciencesfundsubsidizationandHeilongjiangeducationdepartmentscientificresearchprojectfundsubsidization.FuzzysubprogramFuzzyneuralnetworkreasoningsubprogramReferences[1]XuAijun,\"Principalanddesignofintellectualizationmeasuringandcontrolapplication\ThepublishingcompanyofBeijingUniversityofAeronautics&Astronautics,2004.[2]ZhangHuaguang,HeXiji,\"Fuzzyauto-adaptingcontrolandapplication\ThepublishingcompanyofBeijingUniversityofAeronautics&Astronautics,297-306,2002.[3]LiZhuo,XiaoDeyun.,HeShizhong,\"Fuzzyauto-adaptingPIDcontrolmethodbasedonneuralnetwork\Controlanddecision-making,(3),340-345,1996.[4]W.Li.,X.G.Chang,\"TrackingcontrolofamanipulatorunderuncertaintybyFUZZYPIDcontroller\FuzzySetsandsystems,112(200):125-326.Anti-fuzzysubprogramPIDcontrolOutputcontrolquantityFigure5:softwareflow.6SoftwaresystemdesignThesoftwareofmeasurementandcontrolcompriseofmainsubprogram,temperaturegatheringsubprogram,fuzzysubprogram,reasoningsubprogramoffuzzyneuralnetwork,outputsubprogramofPIDalgorithmandcontrol,transmissionprogramofCANbus,eachhaltprocessingprogramandinnersamplingprogram.TheprogramsarecompiledinC51language,andtheflowofmainprogramisshowninfigure6.WhereTOandTlisrunninginmode1,andthetimingcycleofTOis20microsecond.Theset-devicemeasuresthetemperatureonceinacycle,usesmedianfilertoeliminatedisturbanceeffectively,andmakesuseofdesigncontrollertomakeoperationprocessing.ThetimingcycleofT1isImicrosecond.T1whichisanarithmometercomparesitsvaluewiththeoutputcontrolquantityofcontroller,thencontrolshighleveloutputtimeofvariouschannelsincorrespondingunitcycleandcorrespondingvariouschannelsheatpreservationequipments,realizesthetemperaturecontrolofpetrochemicalequipments.-1943-