您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 公司方案 > 基于无线传感器网络的光强环境监测系统设计
华中科技大学硕士学位论文基于无线传感器网络的光强环境监测系统设计姓名:蔡殷申请学位级别:硕士专业:软件工程指导教师:曹华20090522IInternetInternetAtmelATmega128LCC2420TinyOSNesCTinyOSTOSSIMIIAbstractWirelessSensorNetworks(WSN)hasreceivedwidelyattentionbothathomeandabroadbecauseofitsgreatapplicationvalue.WSNislarge-scale,self-organizing,dynamicandreliability,whichmeansithasadvantageinapplicationofaccessingextensiveenvironmentalmonitoringdataandalargenumberofrandomizedresearchoneandlong-termcontinuousmonitoringofhard-to-reachregion.ThispaperemphasizesonhowtosetupandimplementWSN,whichtakesluminousintensitymeasurementofthemappedregionforexample,implementsanEnvironmentalMonitoringSystemwhichisbasedonWSN,putsforwardafour-layerstructureof“sensornode-sinknode-server-user”.Thesystemallowssensornodesarbitrarilytobedeployedinthemonitoredregionandconstituteasensornetworkbyself-organizing.Everysinglesensornodecollectsdata,whichissenttothesinknode,andthenthesinknodesendsthegathereddatatothePCinbasestation,whichdirectlyconnectswiththeInternetviagatewayandsendsthedatatothedatabaseserver.Remoteusershaveaccesstothosedataindatacenterinordertoachievetheirgoalsofmonitoringenvironment.ThesystemusesATmega128L,whichismadeinAtmelCompany,assinglechipandCC2420asradiofrequencychiptoworkasitshardwareplatform,whileusesTinyOSforitsoperationsystemandchoosesacomponent-orientedlanguageNesCforprogramminglanguage.Imitatingthenodesblink,datacollectionandtransmissionanddrawingmeasurementcurveofthegathereddataofLuminousIntensitybyusingTOSSIM,thesimulationofTinyOS.KeywordsWirelessSensorNetworksLuminousIntensityMeasurementMicromanipulationSystemSimulation111.1EnvironmentalMonitoring[1]GSM/CDMA/GPRS[2]2[3]1.2IT1NSFDARPAUnivofCaliforniaCornellUniv20032001[4]32002[4]2003[4]2[4]MoteMica[5,6]TinyOSIEEE802.15.4[7]ZigBee[8][9]41.3TinyOS12TinyOSNesC3TinyOSNesCTinyOSTinyOSTOSSIM522.1WSNWirelessSensorNetwork[10]sensornodesinknode2.1[11]2.1[12]Internet[13]6[14][15]1TCP/IP[16][17]2[18]7[19][20][21][22]3123[23]8456[24]1[25]C4ISRC4KISR[26]DSN9[27][28]2[29][30]3[31][32]4[33]PODS[34]GDI[35]5Internet[36]61012[37]3[38]1145[39]2.2[40]2.2[41]MCU/2.21212.3134//52.3TinyOSTinyMicroThreadingOperatingSystemTinyOS2.3()Main2.3TinyOS14TinyOSMainmainRealMainmainintmain()_attribute_((C,spontaneous)){//maincallhardwareInit();//hardwareInitcallPot.init(10);//Pot.initTOSH_sched_init();//callStdControl.init();//StdControl.initcallStdControl.start();//StdControl.start_nesc_enable_interrupt();//while(1){TOSH_run_task();}//}TinyOSNesC[42]NesCCTinyOSNesCinterfacemoduleconfiguration1NesC15providerusercommandsevents[43]interfaceName{defaultasynccommandresult_tCommandName(parameteri)defaultasynceventresult_tEventName(parameterj)}defaultasyncdefaultasync2NesCmoduleconfigurationNesCCmainMainmoduleBlinkTaskM{//provides{//BlinkTaskMStdControlinterfaceStdControl;16}uses{//BlinkTaskMTimerLedsinterfaceTimer;interfaceLeds;}}implementation{//boolstate;commandresult_tStdControl.init(){//StdControlinitstate=FALSE;callLeds.init();returnSUCCESS;}commandresult_tStdControl.start(){//StdControlstartreturncallTimer.start(TIMER_REPEAT,1000);//TIMER_REPEAT1000}commandresult_tStdControl.stop(){//StdControlstopreturncallTimer.stop();//}taskvoidprocessing(){if(state)callLeds.redOn();else17callLeds.redOff();}eventresult_tTimer.fired()//Timerfiredevent{state=!state;postprocessing();returnSUCCESS;}}moduleBlinkTaskMBlinkTaskMprovidesusesimplementationconfigurationBlinkTask{//}implementation{//componentsMain,BlinkTaskM,SingleTimer,LedsC;//Main.StdControl-BlinkTaskM.StdControl;//Main.StdControl-SingleTimer;BlinkTaskM.Timer-SingleTimer;BlinkTaskM.Leds-LedsC;18}configurationimplementationNesCUserX.interface=UserY.interfaceProviderX.interface=ProviderY.interfaceUser.interface-Provider.interfaceProvider.interface-User.Interface2.41933.112320453.23.1InternetBA3.121InternetInternet3.33.3.1U.C.BerkeleyCrossbowMica3.2ATmega128Ds2401UID50I/OI/O8|8CC24204MBSPI3.23.3223.31AtmelATmega128LRISC13332816MHz128KBFlash4KBEEPROM10000BOOT4KBSRAMSPIIEEEstd.1149.1JTAGJTAGJTAG23JTAGAtmega128LFlash28/216/128PWM6PWM810A/D872I2CUART/SPIMCUADCI/O53I/O64TQFPMLF2.7~5.5V2Chipcon2.4GHzIEEE802.15.4CC2420CC24202.400~2.4835GHZIEEE802.15.4250kbps2Mchip/sO-QPSKVCOLNAPAIEEE802.15.4MACMACQLP-487×7MMCC24203.4CC24202MHz243.4CC2420CC2420CC24201.8V3.3V3.3V3.3V1.8V3.3V33.5253.53.63.645263.3.23.7NYNY3.7273.4ATmega128LCC2420TinyOSTinyOSNesCNesCTinyOS/TinyOS2843TinyOSTinyOSTOSSIM4.1TinyOSTinyOSLinuxWindowsUNIXcygwin4.1.1TinyOScygwinJava1cygwincvsgccgdbopensshperlrpmvim2JDK1.43javax.commcygwinshellJDKC:\tinyos\j2sdk1.4.2_18javacomm20-win32.zipcdcommapicpwin32com.dllC:\tinyos\j2sdk1.4.2_18\jre\binchmod755C:\tinyos\j2sdk1.4.2_18\jre\bin\win32com.dllcpcomm.jarC:\tinyos\j2sdk1.4.2_18\jre\lib\extcpjavax.comm.propertiesC:\tinyos\j2sdk1.4.2_18\jre\lib4graphviz5294.1.2TinyOS1RPMtinyos-tools-1.2.2-1.cygwin.i386.rpmnesc-1.2.7a-1.cygwin.i386.rpmmake-3.80tinyos-1.cygwin.i386.rpmrpm--ignoreos-ivh*.rpmcygwinshellRPM2CygwincvsTinyOScd/optcvs-d:pserver:anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyoslogincvs-z3-d:pserver:anony
本文标题:基于无线传感器网络的光强环境监测系统设计
链接地址:https://www.777doc.com/doc-914296 .html