【正文】
基于 GPRS 的分布式油田原油計量和防盜系統(tǒng)設(shè)計摘 要本課題針對分布式油田的原油計量和丟盜油問題,研究開發(fā)了一套基于 GPRS 的原油計量和防盜系統(tǒng)。系統(tǒng)通過對原油的實時計量,解決長期以來分布式油田存在的計量方式簡陋,實時性差,人為誤差大的問題;通過盜油報警系統(tǒng),打擊盜油犯罪分子,減少或杜絕偷盜油現(xiàn)象。整個系統(tǒng)旨在提高分布式油田的信息化管理水平。整個系統(tǒng)包括兩個部分:遠(yuǎn)程監(jiān)測終端和計算機(jī)監(jiān)控中心。監(jiān)測終端完成儲油罐中原油油位、儲油罐閥門狀態(tài)、以及當(dāng)防盜報警設(shè)備被觸發(fā)時井場周邊圖片數(shù)據(jù)的采集,實現(xiàn)數(shù)據(jù)通過 GPRS 網(wǎng)絡(luò)的發(fā)送和接收;計算機(jī)監(jiān)控中心通過固定的 IP 地址登陸 Inter 網(wǎng)絡(luò),完成數(shù)據(jù)接收、保存和分析,實時顯示各儲油罐油位高度、當(dāng)前閥門狀態(tài),并提供報表打印等功能。在遠(yuǎn)程監(jiān)測終端的硬件開發(fā)中,為了保證整個硬件配置靈活、易于調(diào)試、升級和維護(hù),采用了模塊化的設(shè)計方法,即依據(jù)系統(tǒng)功能自頂向下的把硬件分成了五個模塊,分別是數(shù)據(jù)采集模塊、GPRS 通信模塊、圖像采集模塊、鍵盤與顯示模塊和系統(tǒng)供電模塊。數(shù)據(jù)采集模塊以 ARM 公司最新的 CortexM3 內(nèi)核處理器 STM32F103C6T6 為核心,負(fù)責(zé)監(jiān)測終端總體控制功能;GPRS 通信模塊由 BenQ 公司的 M23A GSM/GPRS 模塊及相關(guān)外圍電路組成,負(fù)責(zé)數(shù)據(jù)的發(fā)送和接收;圖像采集模塊負(fù)責(zé)將視頻信號轉(zhuǎn)換成數(shù)字信號;鍵盤與顯示模塊負(fù)責(zé)終端的顯示和操作;供電模塊負(fù)責(zé)對整個監(jiān)測終端設(shè)備提供工作電源。論文中對數(shù)據(jù)采集模塊、GPRS 通信模塊和鍵盤顯示模塊的電路進(jìn)行了詳細(xì)說明。在遠(yuǎn)程監(jiān)測終端的軟件開發(fā)中,借鑒于實時操作系統(tǒng)進(jìn)行軟件開發(fā)的層次化設(shè)計方法,在遠(yuǎn)程監(jiān)測終端的軟件設(shè)計中也采用了層次化的軟件設(shè)計結(jié)構(gòu)。總的來說,整個監(jiān)測終端軟件采用的是先軟件分層,再結(jié)合有限狀態(tài)機(jī)、利用事件驅(qū)動的方法來設(shè)計的。論文中首先對遠(yuǎn)程監(jiān)測終端軟件開發(fā)中應(yīng)用的編程方法進(jìn)行了介紹,然后對遠(yuǎn)程監(jiān)測終端的部分底層驅(qū)動程序以及應(yīng)用層程序的設(shè)計進(jìn)行了詳細(xì)說明。論文最后對計算機(jī)監(jiān)控中心的軟件開發(fā)作了簡要說明。關(guān)鍵詞:GPRS ,分布式油田,計量和防盜,CortexM3 內(nèi)核,STM32F103C6T6THE SYSTEM DESIGN OF MEASUREMENT AND ANTITHEFT FOR CRUDE OIL OF DISTRIBUTED OILFIELD BASED ON GPRS NETWORKSABSTRACTTo solve problems of crude oil measurement and loss in distributed oilfield, a crude oil measuring and antitheft system is designed based on GPRS wireless work in the paper. In the system, a lot of problems existing in distributed oilfield for a long time can be solved, such as rough measuring method, poor realtime performance and high manmade errors. With the help of alarming system, oiltheft criminals will be reduced. The aim of the whole system is to improve the informatization management level of distributed oilfield. The system contains two parts: remotemonitoring terminal and putermonitoring center. Remotemonitoring terminal collects data of crude oil level in oil tank, valve’s status and images surrounding the oil tank when the burglar alarm equipment is triggered. Finally data are sent and received via GPRS wireless work. Computermonitoring center achieves logging on Inter website through fixed IP to plete some functions such as data receiving, saving and analysis, the realtime display of crude oil level in oil tank, current valve’s status and report forms printing. In order to ensure flexible configurations of the whole hardware and make it debug easily and maintenance simply, modularization design method is adopted in hardware design of remotemonitoring terminals. According to system function,hardware is divided into such five modules as data acquisitions module, GPRS munication module, image acquisition module, keyboard and display and power supply modules. The core of data acquisition module is ARM39。s latest CortexM3 processor STM32F103C6T6, which is in charge of the whole control of monitoring terminals. GPRS module is posed of BenQ39。s M23A GSM/GPRS modules and related peripheral circuits, which is responsible for sending and receiving data. Image acquisition module transforms the video signal into digital signal. Keyboard and display module implement display and operation of the terminal. And power supply module achieves power provision of the whole terminal equipment. In the paper circuits of data acquisition module, GPRS munication module and keyboard module are described in detail. During the remotemonitoring terminal software design, software design is built in the hierarchical design way which have been using in realtime operating system software developed. Generally speaking, the whole remotemonitoring terminal software design uses hierarchical software design, and then bines with finitestate machine and takes advantage of casedriven last. System software programming idea is introduced firstly, and then driver program and application layer programs of monitoring terminal are described in detail.Finally, a brief description of software design of puter monitoring center is given in the paper.KEYWORDS: GPRS, distributed oilfield, measurement and antitheft, CortexM3 core, STM32F103C6T6目 錄摘 要 ............................................................................................................................................IABSTRACT...............................................................................................................................III目 錄 ............................................................................................................................................I1 緒論 .........................................................................................................................................1 項目背景及研究的目的和意義 ...................................................................................1 項目的國內(nèi)外研究現(xiàn)狀 ...............................................................................................1 論文的主要研究內(nèi)容 ...................................................................................................2 論文的組織結(jié)構(gòu) ...........................................................................................................32 需求分析 .................................................................................................................................5 系統(tǒng)要解決的問題 .......................................................................................................5 遠(yuǎn)程監(jiān)測終端的要求 .........................................................................................5 計算機(jī)監(jiān)控中心的要求 .....................................................................................5 遠(yuǎn)程監(jiān)測終端功能分析 ...............................................................................................6 計算機(jī)監(jiān)控中心軟件功能分析 ...................................................................................6 系統(tǒng)技術(shù)參數(shù) ...............................................................................................................7 運行環(huán)境 .....................................................................................................