,
(1.銅川職業(yè)技術(shù)學(xué)院 基礎(chǔ)部,陜西 銅川 727031;2.中國(guó)石油 川慶鉆探長(zhǎng)慶井控培訓(xùn)中心,西安 710000)
嵌入式以太網(wǎng)數(shù)據(jù)采集與控制系統(tǒng)設(shè)計(jì)
戴麗萍1,李卓立2
(1.銅川職業(yè)技術(shù)學(xué)院基礎(chǔ)部,陜西銅川727031;2.中國(guó)石油川慶鉆探長(zhǎng)慶井控培訓(xùn)中心,西安710000)
為了提高嵌入式以太網(wǎng)數(shù)據(jù)的操作精度,減少數(shù)據(jù)運(yùn)行時(shí)間,增加數(shù)據(jù)運(yùn)行靈活性以及穩(wěn)定性,方便對(duì)嵌入式以太網(wǎng)數(shù)據(jù)進(jìn)行的有效管理,需要對(duì)嵌入式以太網(wǎng)數(shù)據(jù)采集與控制系統(tǒng)進(jìn)行設(shè)計(jì);當(dāng)前的嵌入式以太網(wǎng)數(shù)據(jù)采集與控制系統(tǒng)設(shè)計(jì)方法對(duì)以太網(wǎng)數(shù)據(jù)進(jìn)行采集與控制系統(tǒng)設(shè)計(jì)時(shí),因?yàn)闊o(wú)法對(duì)其進(jìn)行靈活、高效、全面地采集和控制,存在數(shù)據(jù)運(yùn)行盲區(qū)較多,成本較大的問(wèn)題,所以提出一種基于LonWorks的嵌入式以太網(wǎng)采集和控制系統(tǒng)設(shè)計(jì)方法,即采用局部網(wǎng)格方式進(jìn)行數(shù)據(jù)采集,使嵌入式以太網(wǎng)進(jìn)行自維護(hù)、自組織、自控制的操作;該方法先利用μC/OSⅡ平臺(tái)完成對(duì)嵌入式以太網(wǎng)數(shù)據(jù)采集與控制系統(tǒng)的硬件設(shè)計(jì),然后依據(jù)互式數(shù)據(jù)遷移技術(shù)對(duì)嵌入式以太網(wǎng)進(jìn)行數(shù)據(jù)采集,以采集的數(shù)據(jù)為基礎(chǔ),采用模糊關(guān)聯(lián)空間理論對(duì)采集得到的以太網(wǎng)數(shù)據(jù)進(jìn)行過(guò)濾,最后以上述過(guò)程為依據(jù),利用OPC服務(wù)器程序?qū)^(guò)濾后的嵌入式以太網(wǎng)數(shù)據(jù)進(jìn)行控制,由此完成了嵌入式以太網(wǎng)數(shù)據(jù)采集與控制系統(tǒng)設(shè)計(jì);實(shí)驗(yàn)結(jié)果證明,所提方法可以全面精確地對(duì)嵌入式以太網(wǎng)數(shù)據(jù)進(jìn)行采集和控制,提高以太網(wǎng)運(yùn)行速度,增強(qiáng)網(wǎng)絡(luò)使用壽命,為該領(lǐng)域研究發(fā)展提供了強(qiáng)有力的依據(jù)。
嵌入式以太網(wǎng);數(shù)據(jù)采集與控制;系統(tǒng)設(shè)計(jì)
當(dāng)前,隨著計(jì)算機(jī)水平和科學(xué)技術(shù)的不斷發(fā)展,嵌入式以太網(wǎng)數(shù)據(jù)的采集與控制受到了人們的廣泛關(guān)注和高度重視[1]。數(shù)據(jù)采集與控制系統(tǒng)在溫度變化數(shù)據(jù)的采集與控制、水位高低數(shù)據(jù)的采集與控制、風(fēng)速大小數(shù)據(jù)的采集與控制、電路壓力數(shù)據(jù)的采集與控制等各個(gè)領(lǐng)域都有著不可或缺的作用[2]。由于嵌入式以太網(wǎng)數(shù)據(jù)具有不安全性、不穩(wěn)定性、錯(cuò)綜復(fù)雜性等特點(diǎn)[3],需要對(duì)其進(jìn)行高精度穩(wěn)定的采集與控制,但大多數(shù)數(shù)據(jù)采集與控制系統(tǒng)設(shè)計(jì)方法無(wú)法對(duì)其進(jìn)行高效全面地采集與控制[4],導(dǎo)致嵌入式以太網(wǎng)操作時(shí)無(wú)法得到精準(zhǔn)的結(jié)果、運(yùn)行速度慢、運(yùn)行過(guò)程復(fù)雜。在這種情況下,如何對(duì)嵌入式以太網(wǎng)數(shù)據(jù)進(jìn)行全面準(zhǔn)確的采集與控制成為了亟待解決的問(wèn)題[5]。而嵌入式以太網(wǎng)數(shù)據(jù)采集與控制系統(tǒng)設(shè)計(jì)方法,可以對(duì)以太網(wǎng)數(shù)據(jù)進(jìn)行高精度的采集與控制,是解決上述問(wèn)題的有效途徑[6],成為了數(shù)據(jù)采集與控制系統(tǒng)設(shè)計(jì)研究者的主要研究課題,同時(shí)也受到了該領(lǐng)域?qū)<覍W(xué)者的廣泛關(guān)注,獲得了很多優(yōu)秀方法[7]。
文獻(xiàn)[8]提出了基于GPRS的嵌入式以太網(wǎng)數(shù)據(jù)采集與控制系統(tǒng)設(shè)計(jì)方法。該方法首先采用STM32F103RBT6芯片作為嵌入式以太網(wǎng)數(shù)據(jù)采集與控制系統(tǒng)的主芯片,然后通過(guò)RS485接口設(shè)置嵌入式以太網(wǎng)端口以及數(shù)據(jù)采集與數(shù)據(jù)控制間隔參數(shù),最后以此參數(shù)為依據(jù)實(shí)現(xiàn)基于GPRS的嵌入式以太網(wǎng)數(shù)據(jù)采集與控制系統(tǒng)設(shè)計(jì)方法。該方法設(shè)計(jì)的采集與控制系統(tǒng)性能穩(wěn)定可靠,但實(shí)現(xiàn)過(guò)程相對(duì)繁瑣,消耗時(shí)間較長(zhǎng)。文獻(xiàn)[9]提出了一種基于ARM9的嵌入式以太網(wǎng)數(shù)據(jù)采集與控制系統(tǒng)設(shè)計(jì)方法。該方法先利用AT91RM9200以及嵌入式Linux新型數(shù)據(jù)采集與控制系統(tǒng)平臺(tái),對(duì)嵌入式以太網(wǎng)數(shù)據(jù)采集系統(tǒng)與控制系統(tǒng)分別進(jìn)行硬件設(shè)計(jì),然后依據(jù)SPI串行接口的設(shè)計(jì)實(shí)現(xiàn)以太網(wǎng)數(shù)據(jù)采集系統(tǒng)與控制系統(tǒng)的融合,構(gòu)建嵌入式以太網(wǎng)數(shù)據(jù)采集與控制系統(tǒng)優(yōu)化函數(shù),完成對(duì)嵌入式以太網(wǎng)數(shù)據(jù)采集與控制系統(tǒng)的設(shè)計(jì)。該方法下的嵌入式以太網(wǎng)數(shù)據(jù)采集與控制系統(tǒng)設(shè)計(jì)具有強(qiáng)大的數(shù)據(jù)處理能力,但存在采集數(shù)據(jù)較慢的問(wèn)題。文獻(xiàn)[10]提出了一種基于FPGA的嵌入式以太網(wǎng)數(shù)據(jù)采集與控制系統(tǒng)設(shè)計(jì)方法。該方法先將系統(tǒng)分為采集控制終端和控制終端兩部分,兩者采用SPI技術(shù)交互通信,然后依據(jù)多路數(shù)據(jù)采集和控制接口,對(duì)其模擬信號(hào)的數(shù)據(jù)采集模塊和數(shù)據(jù)控制模塊進(jìn)行連接,最后利用連接結(jié)果實(shí)現(xiàn)基于FPGA的嵌入式以太網(wǎng)數(shù)據(jù)采集與控制系統(tǒng)設(shè)計(jì)。該方法數(shù)據(jù)采集與控制系統(tǒng)設(shè)計(jì)精度高,但存在數(shù)據(jù)采集不安全的問(wèn)題。
針對(duì)上述產(chǎn)生的問(wèn)題,提出一種基于LonWorks的嵌入式以太網(wǎng)數(shù)據(jù)采集與控制系統(tǒng)設(shè)計(jì)方法。該方法首先對(duì)嵌入式以太網(wǎng)數(shù)據(jù)采集與控制系統(tǒng)進(jìn)行了硬件設(shè)計(jì),以硬件設(shè)計(jì)為依據(jù),對(duì)以太網(wǎng)數(shù)據(jù)進(jìn)行采集和過(guò)濾的操作,最后以過(guò)濾結(jié)果為基礎(chǔ),完成了嵌入式以太網(wǎng)數(shù)據(jù)采集與控制系統(tǒng)設(shè)計(jì)。仿真實(shí)驗(yàn)證明,所提方法可以安全準(zhǔn)確地對(duì)嵌入式以太網(wǎng)數(shù)據(jù)進(jìn)行采集與控制,也證明了該方法是切實(shí)可行的。
1.1 嵌入式以太網(wǎng)數(shù)據(jù)采集與控制系統(tǒng)結(jié)構(gòu)及原理
1.1.1 嵌入式以太網(wǎng)數(shù)據(jù)采集與控制系統(tǒng)結(jié)構(gòu)
實(shí)現(xiàn)嵌入式以太網(wǎng)數(shù)據(jù)采集與控制系統(tǒng)的設(shè)計(jì),首先利用μC/OSⅡ平臺(tái)完成對(duì)其的硬件設(shè)計(jì),然后以硬件設(shè)計(jì)為基礎(chǔ),對(duì)以太網(wǎng)數(shù)據(jù)進(jìn)行采集與控制[11]。嵌入式以太網(wǎng)數(shù)據(jù)采集與控制系統(tǒng)構(gòu)造如圖1所示。
圖1 嵌入式以太網(wǎng)數(shù)據(jù)采集與控制系統(tǒng)構(gòu)造
圖1中嵌入式以太網(wǎng)數(shù)據(jù)采集與控制系統(tǒng)構(gòu)造主要由數(shù)據(jù)過(guò)濾模塊、數(shù)據(jù)采集模塊、數(shù)據(jù)控制模塊組成。在該構(gòu)造中各模塊可以輔助總系統(tǒng)的高精度數(shù)據(jù)采集與控制。圖2是對(duì)嵌入式以太網(wǎng)數(shù)據(jù)采集模塊的細(xì)化。
圖2 嵌入式以太網(wǎng)數(shù)據(jù)采集模塊構(gòu)造
圖2中對(duì)嵌入式以太網(wǎng)數(shù)據(jù)采集模塊進(jìn)行了細(xì)化,在細(xì)化中將其分為:數(shù)據(jù)遷移模塊、數(shù)據(jù)清理模塊、在采集數(shù)據(jù)后對(duì)采集的以太網(wǎng)數(shù)據(jù)進(jìn)行過(guò)濾的數(shù)據(jù)過(guò)濾模塊。利用這三部分構(gòu)建了數(shù)據(jù)采集模塊關(guān)系網(wǎng),該關(guān)系網(wǎng)可以高效安全地對(duì)嵌入式以太網(wǎng)數(shù)據(jù)進(jìn)行采集。
1.1.2 嵌入式以太網(wǎng)數(shù)據(jù)采集與控制系統(tǒng)原理
嵌入式以太網(wǎng)數(shù)據(jù)采集與控制系統(tǒng)是指將溫度、壓力、磁場(chǎng)、位移、流量等模擬量采集、轉(zhuǎn)換成數(shù)字量后,再由計(jì)算機(jī)進(jìn)行存儲(chǔ)、處理、顯示或打印的過(guò)程。
常用的嵌入式以太網(wǎng)數(shù)據(jù)采集與控制系統(tǒng)有兩種:
1)以為核心的數(shù)據(jù)采集系統(tǒng),即刀形式。它的主要構(gòu)成通常包括傳感器、模擬多路開關(guān)、程控放大器、采樣保持器、刀轉(zhuǎn)換器、及特殊外設(shè)等組成部分。圖1就是一個(gè)典型的采用進(jìn)行控制的小型數(shù)據(jù)采集系統(tǒng)。這類系統(tǒng)具有價(jià)格低廉、體積小、結(jié)構(gòu)簡(jiǎn)單、功能強(qiáng)大、應(yīng)用靈活、穩(wěn)定可靠等許多優(yōu)點(diǎn),因而得到了人們充分的關(guān)注并發(fā)展成熟起來(lái),現(xiàn)已廣泛應(yīng)用于工業(yè)控制、儀器儀表以及簡(jiǎn)單的通訊設(shè)備中而且,由于功能的添加和技術(shù)的改進(jìn),它們?cè)谶@些領(lǐng)域還占有相當(dāng)?shù)臄?shù)量。這種嵌入式以太網(wǎng)數(shù)據(jù)采集與控制系統(tǒng)注重的是數(shù)據(jù)采集和控制的實(shí)時(shí)性,除了進(jìn)行一些簡(jiǎn)單的數(shù)字處理之外,一般不進(jìn)行大規(guī)模的數(shù)據(jù)存儲(chǔ),這是由單片機(jī)本身的架構(gòu)所決定的。對(duì)于一些比較復(fù)雜的應(yīng)用場(chǎng)合,比如通訊和控制領(lǐng)域,這種基于的數(shù)據(jù)采集系統(tǒng)的應(yīng)用就受到限制。
2)以計(jì)算機(jī)為控制核心的嵌入式以太網(wǎng)數(shù)據(jù)采集與控制系統(tǒng)。自從計(jì)算機(jī)問(wèn)世以來(lái),及其兼容機(jī)的應(yīng)用范圍越來(lái)越廣泛。它不再僅僅局限于科學(xué)計(jì)算和事務(wù)管理,而是與基于的各種內(nèi)總線的接口卡結(jié)合,逐漸被應(yīng)用到實(shí)時(shí)數(shù)據(jù)采集等測(cè)控領(lǐng)域中。用于工業(yè)控制的采用了標(biāo)準(zhǔn)總線,包括工控標(biāo)準(zhǔn)總線、傳輸位總線一、總線、總線等總線系統(tǒng)閻。目前的數(shù)據(jù)采集板卡一般都采用總線,可以插入主機(jī)內(nèi)形成內(nèi)插式工作方式。這些總線技術(shù)利用機(jī)強(qiáng)大的數(shù)據(jù)處理能力、豐富的軟硬件資源,為數(shù)據(jù)的應(yīng)用提供了非常有利的條件用戶環(huán)境好,系統(tǒng)投運(yùn)時(shí)對(duì)操作人員的培訓(xùn)期短軟件開發(fā)便利,有許多成熟的支持程序和應(yīng)用程序可利用和借鑒維護(hù)支持環(huán)境好。
1.2 嵌入式以太網(wǎng)數(shù)據(jù)采集模塊和過(guò)濾模塊
以2.1各項(xiàng)信息為依據(jù),采用交互式數(shù)據(jù)遷移技術(shù)對(duì)嵌入式以太網(wǎng)進(jìn)行數(shù)據(jù)采集,需注意下列問(wèn)題。
1)嵌入式以太網(wǎng)數(shù)據(jù)分析。對(duì)被審計(jì)的嵌入式以太網(wǎng)數(shù)據(jù)進(jìn)行分析,其中也包括將數(shù)據(jù)讀懂,因?yàn)榍度胧揭蕴W(wǎng)數(shù)據(jù)有很多標(biāo)識(shí),但標(biāo)識(shí)的含義并不明確,所以要對(duì)嵌入式以太網(wǎng)數(shù)據(jù)的標(biāo)識(shí)進(jìn)行分解。
2)嵌入式以太網(wǎng)數(shù)據(jù)采集。按照嵌入式以太網(wǎng)數(shù)據(jù)的依賴關(guān)系,分步執(zhí)行數(shù)據(jù)采集,在這一階段,正確的數(shù)據(jù)遷移和垃圾數(shù)據(jù)清理方法可以提高整個(gè)以太網(wǎng)數(shù)據(jù)采集質(zhì)量。則有嵌入式以太網(wǎng)數(shù)據(jù)遷移函數(shù)Ej:
(1)
其中:Ej代表嵌入式以太網(wǎng)數(shù)據(jù)遷移函數(shù)計(jì)算時(shí)第j次的值,i代表嵌入式以太網(wǎng)采集數(shù)據(jù)個(gè)數(shù),m代表嵌入式以太網(wǎng)數(shù)據(jù)標(biāo)識(shí)數(shù),Er代表嵌入式以太網(wǎng)數(shù)據(jù)標(biāo)識(shí)分解值,N代表嵌入式以太網(wǎng)數(shù)據(jù)遷移次數(shù)。
根據(jù)上式所得嵌入式以太網(wǎng)數(shù)據(jù)遷移函數(shù)值,對(duì)以太網(wǎng)垃圾數(shù)據(jù)清理函數(shù)進(jìn)行計(jì)算:
(2)
其中:Ev代表嵌入式以太網(wǎng)垃圾數(shù)據(jù)清理函數(shù)計(jì)算時(shí)第v次的值,n代表嵌入式以太網(wǎng)垃圾數(shù)據(jù)數(shù)量總數(shù)。
以嵌入式以太網(wǎng)遷移數(shù)據(jù)函數(shù)和嵌入式以太網(wǎng)垃圾數(shù)據(jù)清理函數(shù)的計(jì)算為基礎(chǔ),給出嵌入式以太網(wǎng)數(shù)據(jù)采集公式:
(3)
其中:Ei代表嵌入式以太網(wǎng)數(shù)據(jù)采集函數(shù)值。
以上述內(nèi)容為依據(jù),完成了對(duì)嵌入式以太網(wǎng)數(shù)據(jù)的采集,將采集數(shù)據(jù)進(jìn)行過(guò)濾,有利于對(duì)其進(jìn)行控制。本文采用模糊關(guān)聯(lián)空間理論對(duì)嵌入式以太網(wǎng)數(shù)據(jù)進(jìn)行過(guò)濾。為了使過(guò)濾的水平和過(guò)濾的精度更高,將對(duì)嵌入式以太網(wǎng)數(shù)據(jù)過(guò)濾水平值β進(jìn)行計(jì)算。
在進(jìn)行嵌入式以太網(wǎng)數(shù)據(jù)過(guò)濾水平值計(jì)算時(shí),并非所有的以太網(wǎng)數(shù)據(jù)屬性對(duì)以太網(wǎng)數(shù)據(jù)過(guò)濾實(shí)體關(guān)聯(lián)度貢獻(xiàn)都有一樣大的權(quán)重,因此需要對(duì)模糊關(guān)聯(lián)空間理論值進(jìn)行計(jì)算。
D=fiw(u)*m(θ)
(4)
其中:D代表模糊關(guān)聯(lián)空間理論值,f代表嵌入式以太網(wǎng)數(shù)據(jù)過(guò)濾實(shí)體關(guān)聯(lián)度貢獻(xiàn)值,w代表嵌入式以太網(wǎng)數(shù)據(jù)屬性值,u代表嵌入式以太網(wǎng)數(shù)據(jù)采集系數(shù),θ嵌入式以太網(wǎng)數(shù)據(jù)采集參數(shù),為一常數(shù),當(dāng)此參數(shù)控制在1.4~1.5區(qū)間內(nèi)嵌入式以太網(wǎng)數(shù)據(jù)的采集效率最高。
為了對(duì)嵌入式以太網(wǎng)數(shù)據(jù)進(jìn)行高質(zhì)量過(guò)濾,以模糊關(guān)聯(lián)空間理論值為依據(jù),需要對(duì)模糊關(guān)聯(lián)空間理論廣義積分進(jìn)行計(jì)算。
(5)
其中:d代表模糊關(guān)聯(lián)空間理論廣義積分,X代表嵌入式以太網(wǎng)數(shù)據(jù)采集質(zhì)量監(jiān)測(cè)值。根據(jù)模糊關(guān)聯(lián)空間理論廣義積分,對(duì)嵌入式以太網(wǎng)數(shù)據(jù)過(guò)濾水平值β進(jìn)行計(jì)算。
輸入嵌入式以太網(wǎng)數(shù)據(jù)過(guò)濾水平值β:
β=(U,K,V,Fq)q∈K
(6)
其中:K=C∪D≠φ,C和D分別代表嵌入式以太網(wǎng)條件屬性值和決策屬性值,β代表嵌入式以太網(wǎng)數(shù)據(jù)過(guò)濾水平值,U代表嵌入式以太網(wǎng)數(shù)據(jù)過(guò)濾誤差值,K代表嵌入式以太網(wǎng)條件屬性值和決策屬性值的總交集值,V代表嵌入式以太網(wǎng)數(shù)據(jù)過(guò)濾效率值,F(xiàn)代表嵌入式以太網(wǎng)數(shù)據(jù)過(guò)濾節(jié)點(diǎn),q代表在嵌入式以太網(wǎng)數(shù)據(jù)過(guò)濾節(jié)點(diǎn)處,以太網(wǎng)條件屬性值和決策屬性值的交集值。
輸出嵌入式以太網(wǎng)數(shù)據(jù)過(guò)濾水平值β:
(7)
其中:R代表嵌入式以太網(wǎng)數(shù)據(jù)過(guò)濾中一常量單位。
綜上所述,完成了對(duì)嵌入式以太網(wǎng)數(shù)據(jù)的過(guò)濾水平值β的計(jì)算,由此實(shí)現(xiàn)了其高質(zhì)量過(guò)濾操作,為嵌入式以太網(wǎng)數(shù)據(jù)的控制打下了堅(jiān)實(shí)的基礎(chǔ)。
1.3 嵌入式以太網(wǎng)數(shù)據(jù)控制模塊
以2.2各項(xiàng)數(shù)據(jù)為依據(jù),采用OPC服務(wù)器程序?qū)η度胧揭蕴W(wǎng)數(shù)據(jù)進(jìn)行控制。對(duì)數(shù)據(jù)進(jìn)行控制時(shí)需要考慮被控制的嵌入式以太網(wǎng)數(shù)據(jù)對(duì)象為:
x=Cx+Du
(8)
其中:x代表嵌入式以太網(wǎng)被控制數(shù)據(jù)對(duì)象。
對(duì)上述嵌入式以太網(wǎng)被控制數(shù)據(jù)進(jìn)行離散化,并將最優(yōu)的控制指標(biāo)設(shè)定為:
(9)
其中:ξ代表嵌入式以太網(wǎng)被控制數(shù)據(jù)進(jìn)行離散化時(shí)的最優(yōu)控制指標(biāo)。
為了保證嵌入式以太網(wǎng)數(shù)據(jù)控制的時(shí)間間隔保持定常,假設(shè)離散化的以太網(wǎng)數(shù)據(jù)控制狀態(tài)方程如下所示。
x(k+1)=φx(k)+u(k)
(10)
其中:φ代表嵌入式以太網(wǎng)數(shù)據(jù)控制的時(shí)間間隔定常值。
上述對(duì)嵌入式以太網(wǎng)數(shù)據(jù)控制狀態(tài)方程的計(jì)算,將帶有隨機(jī)變延的嵌入式以太網(wǎng)數(shù)據(jù)控制系統(tǒng)轉(zhuǎn)換為智能定常的數(shù)據(jù)控制系統(tǒng),使數(shù)據(jù)控制系統(tǒng)變得簡(jiǎn)單且高效。
以上述信息為依據(jù),對(duì)嵌入式以太網(wǎng)數(shù)據(jù)控制系數(shù)模型進(jìn)行計(jì)算,完成對(duì)以太網(wǎng)數(shù)據(jù)控制系統(tǒng)的設(shè)計(jì)。文中將嵌入式以太網(wǎng)數(shù)據(jù)控制系數(shù)記作ε。將嵌入式以太網(wǎng)線性隨機(jī)系統(tǒng)模型融入至其數(shù)據(jù)控制系數(shù)ε模型中,用來(lái)描述以太網(wǎng)數(shù)據(jù)控制系統(tǒng),兩者的結(jié)合獲得了7個(gè)嵌入式以太網(wǎng)數(shù)據(jù)控制函數(shù),數(shù)據(jù)控制函數(shù)具體描述如下:
ε1=x1+ξ1
(11)
ε2=(x1+ξ1)*(x2+ξ2)
(12)
ε3=(x1+ξ1)*(x2+ξ2)*(x3+ξ3)
(13)
ε4=(x1+ξ1)*(x2+ξ2)*(x3+ξ3)*(x4+ξ4)
(14)
ε5=(x1+ξ1)*(x2+ξ2)*(x3+ξ3)*(x4+ξ4)
*(x5+ξ5)
(15)
ε6=(x1+ξ1)*(x2+ξ2)*(x3+ξ3)*(x4+ξ4)
*(x5+ξ5)*(x6+ξ6)
(16)
ε7=(x1+ξ1)*(x2+ξ2)*(x3+ξ3)*(x4+ξ4)
*(x5+ξ5)*(x6+ξ6)*ε(x7+ξ7)
(17)
其中:ε代表嵌入式以太網(wǎng)數(shù)據(jù)控制系數(shù)。
通過(guò)上式的計(jì)算完成了對(duì)嵌入式以太網(wǎng)數(shù)據(jù)控制系統(tǒng)的描述。最后利用嵌入式以太網(wǎng)數(shù)據(jù)控制最優(yōu)性能指標(biāo)完成對(duì)其控制系統(tǒng)的設(shè)計(jì)。其最優(yōu)性能指標(biāo)計(jì)算公式為:
(18)
其中:J代表嵌入式以太網(wǎng)數(shù)據(jù)控制系統(tǒng)最優(yōu)性能指標(biāo),為一常數(shù)單位,此指標(biāo)控制在0.3~0.4區(qū)間內(nèi)以太網(wǎng)數(shù)據(jù)控制效率最高。
綜上所述,依據(jù)嵌入式以太網(wǎng)數(shù)據(jù)控制最優(yōu)性能指標(biāo),完成了對(duì)嵌入式以太網(wǎng)數(shù)據(jù)控制系統(tǒng)的設(shè)計(jì)。
為了證明基于LonWorks的嵌入式以太網(wǎng)數(shù)據(jù)采集與控制系統(tǒng)設(shè)計(jì)方法的整體有效性,需要進(jìn)行一次仿真實(shí)驗(yàn)。實(shí)驗(yàn)步驟如下:
1)在RTL8019AS的環(huán)境下搭建嵌入式以太網(wǎng)數(shù)據(jù)采集與控制實(shí)驗(yàn)仿真平臺(tái)。實(shí)驗(yàn)數(shù)據(jù)取自于清華大學(xué)微機(jī)室100臺(tái)含有嵌入式以太網(wǎng)的計(jì)算機(jī),利用基于LonWorks的嵌入式以太網(wǎng)數(shù)據(jù)采集與控制系統(tǒng)設(shè)計(jì)方法對(duì)實(shí)驗(yàn)數(shù)據(jù)進(jìn)行采集和控制,觀察系統(tǒng)設(shè)計(jì)方法有效性和可實(shí)現(xiàn)性。表1是不同方法下嵌入式以太網(wǎng)數(shù)據(jù)采集與控制效率(%)的對(duì)比。
表1 不同方法下嵌入式以太網(wǎng)數(shù)據(jù)采集與控制效率對(duì)比
分析表1可知,文獻(xiàn)[8-10]所提方法設(shè)計(jì)的嵌入式以太網(wǎng)數(shù)據(jù)采集與控制系統(tǒng),與本文所提方法設(shè)計(jì)的數(shù)據(jù)采集與控制系統(tǒng)的效率相差較大,本文所提基于LonWorks的嵌入式以太網(wǎng)數(shù)據(jù)采集與控制系統(tǒng)設(shè)計(jì)方法的數(shù)據(jù)采集與控制效率較高,明顯優(yōu)于文獻(xiàn)所提方法,證明了本文方法的可行性。表2是嵌入式以太網(wǎng)數(shù)據(jù)采集參數(shù)θ對(duì)數(shù)據(jù)采集效率(%)的影響,當(dāng)此參數(shù)控制在1.4~1.5區(qū)間時(shí)嵌入式以太網(wǎng)數(shù)據(jù)的采集效率(%)最高。
表2 采集參數(shù)θ對(duì)嵌入式以太網(wǎng)數(shù)據(jù)采集效率影響
通過(guò)表2可知,嵌入式以太網(wǎng)數(shù)據(jù)采集參數(shù)θ對(duì)數(shù)據(jù)采集效率有著深度影響,當(dāng)參數(shù)在1.4~1.5區(qū)間外時(shí)嵌入式以太網(wǎng)數(shù)據(jù)采集效率,明顯低于參數(shù)在1.4~1.5區(qū)間內(nèi),當(dāng)參數(shù)在1.4~1.5區(qū)間內(nèi)采集效率基本在96.7%~98.5%之間,進(jìn)一步證明了本文所提基于LonWorks的嵌入式以太網(wǎng)數(shù)據(jù)采集與控制系統(tǒng)設(shè)計(jì)方法的可實(shí)現(xiàn)性。圖3是文獻(xiàn)[9]所提方法與本文所提方法數(shù)據(jù)過(guò)濾誤差率(%)的對(duì)比描述。
圖3 不同方法下嵌入式以太網(wǎng)數(shù)據(jù)過(guò)濾誤差率對(duì)比
2)采用了模糊關(guān)聯(lián)空間理論對(duì)嵌入式以太網(wǎng)數(shù)據(jù)進(jìn)行過(guò)濾。分析圖3可知,文獻(xiàn)[9]所提嵌入式以太網(wǎng)數(shù)據(jù)采集與控制系統(tǒng)設(shè)計(jì)方法的誤差率,明顯高于本文所提方法的誤差率,這主要是因?yàn)楸疚姆椒ㄟM(jìn)行嵌入式以太網(wǎng)數(shù)據(jù)采集與控制系統(tǒng)設(shè)計(jì)時(shí),采用了模糊關(guān)聯(lián)空間理論對(duì)嵌入式以太網(wǎng)數(shù)據(jù)進(jìn)行過(guò)濾,為了使數(shù)據(jù)過(guò)濾的精度更高,對(duì)嵌入式以太網(wǎng)數(shù)據(jù)過(guò)濾水平值β進(jìn)行計(jì)算,從而完成對(duì)其的過(guò)濾。圖4是嵌入式以太網(wǎng)數(shù)據(jù)控制系統(tǒng)最優(yōu)性能指標(biāo),對(duì)以太網(wǎng)數(shù)據(jù)控制精度(%)的影響。
圖4 數(shù)據(jù)控制系統(tǒng)最優(yōu)性能指標(biāo)對(duì)數(shù)據(jù)控制精度影響
由圖4可知,數(shù)據(jù)控制系統(tǒng)最優(yōu)性能指標(biāo),對(duì)嵌入式以太網(wǎng)數(shù)據(jù)控制精度有很大地影響,當(dāng)數(shù)據(jù)控制系統(tǒng)最優(yōu)性能指標(biāo)在0.3~0.4區(qū)間時(shí),隨著控制數(shù)據(jù)量的增加,數(shù)據(jù)控制精度也在不斷波動(dòng),但在數(shù)據(jù)控制系統(tǒng)最優(yōu)性能指標(biāo)的影響下,數(shù)據(jù)控制精度基本在87%以上,此數(shù)據(jù)證明了本文所提方法可高精度地對(duì)嵌入式以太網(wǎng)數(shù)據(jù)進(jìn)行控制,也證明了本文方法的整體有效性,同時(shí)也為該領(lǐng)域的研究發(fā)展提供了可靠依據(jù)。
仿真實(shí)驗(yàn)證明,所提方法可以高精度地對(duì)嵌入式以太網(wǎng)數(shù)據(jù)采集與控制系統(tǒng)進(jìn)行設(shè)計(jì),提高數(shù)據(jù)采集與控制的準(zhǔn)確率,減少嵌入式以太網(wǎng)數(shù)據(jù)運(yùn)行時(shí)間,增加該網(wǎng)絡(luò)的使用壽命。
采用當(dāng)前方法對(duì)嵌入式以太網(wǎng)數(shù)據(jù)進(jìn)行采集與控制時(shí),無(wú)法對(duì)其進(jìn)行高精度、靈活、全面地?cái)?shù)據(jù)采集與控制,存在嵌入式以太網(wǎng)數(shù)據(jù)操作復(fù)雜無(wú)序、時(shí)間長(zhǎng)、數(shù)據(jù)采集偏差大、數(shù)據(jù)控制不得當(dāng)?shù)葐?wèn)題。提出一種基于LonWorks的嵌入式以太網(wǎng)數(shù)據(jù)采集與控制系統(tǒng)設(shè)計(jì)方法。并通過(guò)仿真實(shí)驗(yàn)證明,所提方法可以高精度地對(duì)嵌入式以太網(wǎng)數(shù)據(jù)進(jìn)行高效安全地采集與控制,是切實(shí)可行的,并且具有良好的借鑒價(jià)值。
[1]李 勇,張以帥,唐廣耀,等.基于MSP430的溫室環(huán)境數(shù)據(jù)采集和控制系統(tǒng)設(shè)計(jì)[J].微型機(jī)與應(yīng)用,2016,35(7):94-96.
[2]李 明,安書董,路 輝.一種高精度數(shù)據(jù)采集及控制系統(tǒng)設(shè)計(jì)[J].航空計(jì)算技術(shù),2016,46(5):123-126.
[3]李 琦,張 康,王月明.基于CoAP協(xié)議的數(shù)據(jù)采集網(wǎng)關(guān)設(shè)計(jì)[J].電子技術(shù)應(yīng)用,2015,41(6):154-156.
[4]戴敏敏,王華忠,楊 飛,等.EAST電源數(shù)據(jù)采集控制系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn)[J].測(cè)控技術(shù),2015,34(3):44-47.
[5]王正萬(wàn), 李遠(yuǎn)英. 基于ZigBee技術(shù)的嵌入式Web數(shù)據(jù)采集系統(tǒng)的研究與應(yīng)用[J]. 電子設(shè)計(jì)工程, 2016, 24(3):144-147.
[6]張志偉,靳 鴻,穆蔚然,等.基于千兆以太網(wǎng)的機(jī)載雷達(dá)數(shù)據(jù)采集系統(tǒng)設(shè)計(jì)[J].現(xiàn)代雷達(dá),2016,38(9):57-60.
[7]孫富津,張林行,曹家銘,等.基于SOPC的8通道地震數(shù)據(jù)采集系統(tǒng)設(shè)計(jì)[J].中國(guó)測(cè)試,2016,42(3):73-76.
[8]陳桂平,賀德強(qiáng),譚文舉,等.基于Linux+ARM的列控設(shè)備數(shù)據(jù)采集系統(tǒng)設(shè)計(jì)[J].電子技術(shù)應(yīng)用,2016,42(12):58-61.
[9]鄭國(guó)勛,張曉賢,張 華,等.變水頭滲透儀數(shù)據(jù)采集及控制系統(tǒng)硬件設(shè)計(jì)與實(shí)現(xiàn)[J].長(zhǎng)春工程學(xué)院學(xué)報(bào)(自然科學(xué)版),2015,16(4):82-84.
[10]黃曉剛,黃品劍,湯 劍,等.基于機(jī)械臂控制系統(tǒng)的數(shù)據(jù)采集模塊研究[J].電子設(shè)計(jì)工程,2016,24(17):145-146.
[11]郟琨琪, 何光宇. 智能用電網(wǎng)絡(luò)數(shù)據(jù)采集與通信機(jī)制的研究[J]. 中國(guó)電機(jī)工程學(xué)報(bào), 2016, 36(6):1544-1551.
EmbeddedEthernetDataAcquisitionandControlSystemDesign
Dai Liping1,Li Zhuoli2
(1.Foundation Department,Tongchuan Vocational and Technical College,Tongchuan 727031,China;2.China Petroleum Changqing well training center,Xi′an 710000,China)
In order to improve the operation of the embedded Ethernet data accuracy, reduces the running time data, increasing data operation flexibility and stability, convenient and effective management of embedded Ethernet data, put forward a design method of Embedded Ethernet data acquisition and control system based on LonWorks, which uses local mesh to carry on the data acquisition, the embedded Ethernet self maintenance, self organization and control operation. The method to use μC/OS Ⅱ platform of embedded Ethernet data acquisition and control system hardware design, and then on the basis of mutual on the embedded Ethernet technology for data migration data collection, based on the acquisition of data, using the theory of fuzzy correlation space of Ethernet data filtering, finally based on the above process, use of OPC server program to control the filtered embedded Ethernet data, thus completing the embedded Ethernet data acquisition and control system design. The experimental results show that the proposed method can comprehensively accurately complete the embedded Ethernet data acquisition and control, improve the speed of Ethernet, enhance the service life of the network, the research in the field development provides a strong basis.
embedded Ethernet; data acquisition and control; system design;
2017-04-07;
2017-04-26。
戴麗萍(1981-),女,陜西富平人,碩士,講師,主要從事計(jì)算機(jī)技術(shù)應(yīng)用方向的研究。
1671-4598(2017)10-0085-04
10.16526/j.cnki.11-4762/tp.2017.10.023
TP274.2
A