硕士学位论文智能建筑中BACnetMS/TP控制模块研究与实现RESEARCHANDIMPLEMENTATIONOFBACnetMS/TPCONTROLMODULEINSMARTBUILDING冷正龙哈尔滨工业大学2012年6月国内图书分类号:TU855学校代码:10213国际图书分类号:697密级:公开工学硕士学位论文智能建筑中BACnetMS/TP控制模块研究与实现硕士研究生:冷正龙导师:马新军副教授申请学位:工学硕士学科:电气工程所在单位:深圳研究生院答辩日期:2012年6月授予学位单位:哈尔滨工业大学ClassifiedIndex:TU855U.D.C:697DissertationfortheMasterDegreeinEngineeringRESEARCHANDIMPLEMENTATIONOFBACnetMS/TPCONTROLMODULEINSMARTBUILDINGCandidate:LengZhenglongSupervisor:Asso.Prof.MaXinjunAcademicDegreeAppliedfor:MasterofEngineeringSpeciality:ElectricalEngineeringAffiliation:ShenzhenGraduateSchoolDateofDefence:June,2012Degree-Conferring-Institution:HarbinInstituteofTechnology哈尔滨工业大学工学硕士学位论文-I-摘要随着人们对生活质量的要求提高,智能建筑应用日益广泛。作为楼宇自控中唯一的国际标准,BACnet在全球内获得广泛的应用。MS/TP作为BACnet的成本低廉、实现简单的数据链路选择,在楼宇自控现场级设备中使用广泛。MS/TP是BACnet专门针对楼宇自控开发的,利用令牌环机制实现主从/令牌传递控制。首先,介绍了BACnet标准,阐述了其体系结构和服务对象,还着重介绍了MS/TP链路层的状态机。其次,对MS/TP介质访问控制算法进行了研究,阐述了令牌传递、多令牌检测和令牌产生等算法思想。然后,由于传统MS/TPMAC地址的设定,从成本和操作上一定程度限制了MS/TP控制设备的使用。本文研究了一种可以自动动态寻址算法,可以减少拨码开关等硬件成本,对网络中的带宽也影响很小,最主要的是降少了人工误操作和人力成本。对于实际应用具有重要意义。通过制作的实物,实验测试中通过Wireshark报文分析验证了自动寻址算法。最后,本文对于智能建筑中用于控制开关设备的MS/TP控制模块,从输入电源、通信接口、继电器驱动和负载检测等电路进行了设计,并给出了详细的原理图。另外,对于本模块使用的BACnet协议栈和MS/TP协议流程进行了阐述。同时设计的MS/TP控制模块符通过了BTL的VTS软件测试,符合BACnet一致性要求。本文设计的MS/TP控制模块是一种智能建筑中使用的直接数字控制设备(DDC)。连同其他BACnet设备,可以形成一套完整的楼宇控制方案。它有利于促进BACnet在国内的应用和发展。关键词:BACnet;MS/TP;DDC;自动寻址哈尔滨工业大学工学硕士学位论文-II-AbstractWiththeimprovementofpeople'slifequality,thereisaincreasinglywideapplicationofintelligentbuildings.Astheonlyinternationalstandardinbuildingautomation,BACnetisusedwidelyinglobal.MS/TPisanoptionofdatalinklayerofBACnet,MS/TPiswidelyusedinthefieldbuildingautomationequipmentbecauseofitslowcostandeasyusing.MS/TPisaspecificallyforbuildingautomationdevelopment,usingtokenringmechanismtorealizemaster-slave/token-passingcontrol.Firstly,thispaperdiscussesthesystemstructure,serviceandobjectofBACnetprotocol.ThepaperalsofocusedontheMS/TPstatemachine.Secondly,thepaperstudiedmediumaccesscontrolalgorithm,includingalgorithmoftokenpassing,multipletokensdetectionandtokengeneration.Then,thetraditionalMS/TPMACaddressassignmenthastheproblemofmanualmistaken,whichonsomedegreeconstraintsMS/TPdevices'using.Thispaperfocusesonthestudyofanautomaticdynamicaddressingalgorithm,whichcanreducehardwarecostandhavelittleaffectonthenetworkbandwidth,themostimportantbenefitistodecreasethemanualmistakeoperationandmanpowercost.ThroughtheanalysisofWiresharkmessageintestcouldverifytheautomaticaddressingalgorithm.Finally,thisthesisdesignedaMS/TPfieldcontrolmoduleusinginsmartbuildingintermsoftheinputpowersupply,communicationinterface,arelaydriveandloaddetectioncircuitdesign,andgivingadetailedschematicdiagram.Inaddition,theBACnetprotocolandMS/TPprotocolusinginthemodulearedescribed.ThroughVTStestingofBTL,thecontrolmoduleconformstotheBACnetconformancerequirements.TheMS/TPcontrolmoduledesigningisadirectdigitalcontrolequipment(DDC)usedinintelligentbuilding.ConnectingwiththeotherBACnetdevices,canformacompletesetofbuildingcontrolscheme.IthelpstopromotetheapplicationanddevelopmentofBACnetinChina.Keywords:BACnet,MS/TP,DDC,automaticaddressing哈尔滨工业大学工学硕士学位论文-III-目录摘要..........................................................................................................................IABSTRACT................................................................................................................II第1章绪论...........................................................................................................11.1课题背景及意义.......................................................................................11.2国内外发展现状.......................................................................................21.2.1智能建筑的发展........................................................................................21.2.2楼宇自控系统的发展现状........................................................................21.2.3BACnetMS/TP研究现状.........................................................................31.3论文研究内容...........................................................................................4第2章BACnetMS/TP理论研究.............................................................................62.1BACnet标准.............................................................................................62.1.1BACnet体系结构.....................................................................................72.1.2BACnet对象和属性...............................................................................112.1.3BACnet服务...........................................................................................122.2MS/TP协议.............................................................................................132.2.1MS/TP协议概述.....................................................................................132.2.2MS/TP状态机.........................................................................................132.3MS/TP介质访问控制算法......................................................................162.3.1令牌传递算法...................................................