總進(jìn)度設(shè)計(jì)自控_第1頁
總進(jìn)度設(shè)計(jì)自控_第2頁
總進(jìn)度設(shè)計(jì)自控_第3頁
總進(jìn)度設(shè)計(jì)自控_第4頁
總進(jìn)度設(shè)計(jì)自控_第5頁
免費(fèi)預(yù)覽已結(jié)束,剩余55頁可下載查看

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

1、誠:本獻(xiàn)均已誠:本獻(xiàn)均已本人簽名年月日畢業(yè)設(shè)計(jì))任務(wù)設(shè)計(jì))學(xué)院信息學(xué)專業(yè)自動(dòng)班級(jí)自控學(xué)生指導(dǎo)教師(: 于濤(講師): 李大12C3ThornhillNF,ShoukatChoudhuryMAA,Shah畢業(yè)設(shè)計(jì))任務(wù)設(shè)計(jì))學(xué)院信息學(xué)專業(yè)自動(dòng)班級(jí)自控學(xué)生指導(dǎo)教師(: 于濤(講師): 李大12C3ThornhillNF,ShoukatChoudhuryMAA,ShahSL.Theimpactofdata-drivensysesJ.Journal of sControl, 2004, 14(4):389-SivalingamS,HovdM.Effectofon monitoringC/Control

2、&Automation(MED),201119thMediterraneanon.IEEE, 2011: 594-SDT算法J. 計(jì)算機(jī)工程, . 多通道系統(tǒng)數(shù)據(jù)壓縮算法的研究與實(shí)現(xiàn)D. 電子科技大學(xué),4設(shè)計(jì))各階段名起 11 1 日1 31 23 7 日3 31 3C4 1 日4 20 44 20 日5 10 55 10 日6 摘要監(jiān)測(cè)摘要監(jiān)測(cè)Visual Studio C:旋轉(zhuǎn)門(SDT);流程工業(yè);數(shù)Withthecontinuous developmentof sindustry and the continuous ofautomationlevel,alarge numberofr

3、ealindustrial data needtobemonitored,storage management, because the he s industry is very large, if the data are Withthecontinuous developmentof sindustry and the continuous ofautomationlevel,alarge numberofrealindustrial data needtobemonitored,storage management, because the he s industry is very

4、large, if the data are directly, can cause huge waste of storage , so the technology the swing s industry data storage has a very important role. This topic is algorithmfor techniqueswere In this article, we will be on the swing door algorithm of the corresponding of all, on the basic of the swing d

5、oor algorithm to understand the present situation and problems of the application of sindustry,the basic principle of swing door algorithm. in understanding the basic swing door algorithm is ed on the basis the improved method, according to the ed design idea, the algorithm design o three parts: , d

6、ata extract part and testing part. By using software Visual Studio 2015 and C language to complete the algorithmfor therealization of Experiment t the swing door algorithm compared with swingdoorhe data error and ratio has a Keywords:Swingdoortrending(SDT),sindustries,Data目前11.11.2目前11.11.2課題來源及背旋轉(zhuǎn)門

7、壓縮算法的發(fā)展現(xiàn)實(shí)時(shí)數(shù)據(jù)庫系旋轉(zhuǎn)門壓縮算應(yīng)基于旋轉(zhuǎn)門壓縮算法的實(shí)時(shí)數(shù)第1.3節(jié)課題的意義和主要內(nèi)課題的意課題的主要內(nèi)第2 章 基于旋轉(zhuǎn)門的流程工業(yè)數(shù)據(jù)壓縮算法模塊總體設(shè)第2.1節(jié)有損線性壓縮算法介工業(yè)標(biāo)準(zhǔn)死區(qū)壓縮算兩點(diǎn)式壓縮算PI的旋轉(zhuǎn)門算GEProficyHistorian 的旋轉(zhuǎn)門壓縮算愛康諾HyperHistorian 的旋轉(zhuǎn)門算改進(jìn)的雙旋轉(zhuǎn)門算第2.2節(jié)基于旋轉(zhuǎn)門壓縮算法的改旋轉(zhuǎn)門(SDT)壓縮算法基本原改進(jìn)的旋轉(zhuǎn)門(SDT)壓縮算旋轉(zhuǎn)門(SDT)壓縮算法利與第2.3 節(jié) 基于旋轉(zhuǎn)門的工業(yè)數(shù)據(jù)壓縮算法模塊總體設(shè)計(jì)框第 3 章 基于旋轉(zhuǎn)門的流程工業(yè)數(shù)據(jù)壓縮算法模塊設(shè)計(jì)與實(shí)數(shù)據(jù)壓縮模塊設(shè)計(jì)

8、與實(shí)數(shù)據(jù)解壓縮模塊設(shè)計(jì)與實(shí)數(shù)據(jù)檢測(cè)模塊設(shè)計(jì)與實(shí)第4章實(shí)驗(yàn)及分4.14.1數(shù)據(jù)計(jì)第4.2節(jié)實(shí)際工業(yè)數(shù)據(jù)計(jì)結(jié)參考文致附前言法通常采用旋轉(zhuǎn)門壓縮算法、基于斜率比較的旋轉(zhuǎn)門壓縮算法和死區(qū)限值壓縮算法壓縮率和壓縮精度,將改進(jìn)算法通過C前言法通常采用旋轉(zhuǎn)門壓縮算法、基于斜率比較的旋轉(zhuǎn)門壓縮算法和死區(qū)限值壓縮算法壓縮率和壓縮精度,將改進(jìn)算法通過C11.1題來源及背新的要求,由此產(chǎn)生了許多新的數(shù)據(jù)庫技11.1題來源及背新的要求,由此產(chǎn)生了許多新的數(shù)據(jù)庫技術(shù),實(shí)時(shí)數(shù)據(jù)庫技術(shù)就是其中之一1-3志可以將數(shù)據(jù)庫技術(shù)分為三個(gè)階段46。第一代數(shù)據(jù)庫系統(tǒng)是指層次和網(wǎng)狀數(shù)據(jù)庫系的和速較的旋轉(zhuǎn)門壓縮算法和死區(qū)限值壓縮算法7-9

9、,其中,比較流行的是旋轉(zhuǎn)門壓縮算法10,該算法是通過減1.2轉(zhuǎn)門壓縮算法的發(fā)展現(xiàn)1.2.1 實(shí)時(shí)數(shù)據(jù)庫系實(shí)時(shí)數(shù)據(jù)庫系統(tǒng)是對(duì)實(shí)時(shí)性要求非常高的時(shí)標(biāo)型11信息的數(shù)據(jù)庫管1.2轉(zhuǎn)門壓縮算法的發(fā)展現(xiàn)1.2.1 實(shí)時(shí)數(shù)據(jù)庫系實(shí)時(shí)數(shù)據(jù)庫系統(tǒng)是對(duì)實(shí)時(shí)性要求非常高的時(shí)標(biāo)型11信息的數(shù)據(jù)庫管理系統(tǒng)自1992類實(shí)時(shí)數(shù)據(jù)庫均先后誕生并迅速得到推廣應(yīng)用。通過實(shí)時(shí)14;系統(tǒng)的資源調(diào)度恢復(fù)通信協(xié)議與算法等15,而對(duì)制約歷史數(shù)據(jù)庫發(fā)展的瓶頸文件的索引和數(shù)據(jù)的組織結(jié)構(gòu)以及由于海量歷史數(shù)引起的磁盤I/O等問題并要求高、保存時(shí)間間隔差距大的特點(diǎn)16。因此,對(duì)實(shí)時(shí)歷史數(shù)據(jù)庫的開發(fā)主要圍繞1.2.2 旋轉(zhuǎn)門壓縮算過程數(shù)據(jù)的壓縮方法有

10、3旋轉(zhuǎn)門趨勢(shì)文獻(xiàn)DoorTrending,SDT)支點(diǎn)。兩個(gè)支點(diǎn)和過程數(shù)據(jù)之間的連線文獻(xiàn)DoorTrending,SDT)支點(diǎn)。兩個(gè)支點(diǎn)和過程數(shù)據(jù)之間的連線1.1 SDT算法操作示數(shù)據(jù)點(diǎn)7易證明,SDT限E的最大誤差。SDT未知量。SDT算法的執(zhí)行過程就是確定擬合直線的斜率的過程。事實(shí)上,SDT以看成求解在壓縮誤差不超限E的條曲奕霖等21易證明,SDT限E的最大誤差。SDT未知量。SDT算法的執(zhí)行過程就是確定擬合直線的斜率的過程。事實(shí)上,SDT以看成求解在壓縮誤差不超限E的條曲奕霖等21采用反饋控制系統(tǒng)模型,實(shí)現(xiàn)了容差在壓縮過程中的自適應(yīng)調(diào)整。再如段等22提出了用一條斜率為兩個(gè)門的平均斜率根據(jù)

11、起點(diǎn)推算終點(diǎn)數(shù)1.2.3 基于旋轉(zhuǎn)門壓縮算法的實(shí)時(shí)數(shù)應(yīng) Server和InfoPlus.21實(shí)時(shí)數(shù)據(jù)庫采用的都是旋轉(zhuǎn)門壓縮算法,油廠生產(chǎn)管理系統(tǒng)中,采用基于斜率比較的旋轉(zhuǎn)門壓縮算法23實(shí)時(shí)數(shù)據(jù)庫LCMD(LangChao Mobile Database)SDT SDT 1.3題的意義和主要內(nèi)1.3.1 課題的意會(huì)占用大量的SDT SDT 1.3題的意義和主要內(nèi)1.3.1 課題的意會(huì)占用大量的得到很大1.3.2 課題的主要內(nèi)(1) 的SDT(2) (3) (4) (3) (4) 試第 2 章 基于旋轉(zhuǎn)門的流程工業(yè)數(shù)據(jù)壓縮算法模第 2 章 基于旋轉(zhuǎn)門的流程工業(yè)數(shù)據(jù)壓縮算法模塊總體設(shè)2.1損線性壓縮

12、算法介2.1.1 工業(yè)標(biāo)準(zhǔn)死區(qū)壓縮算工業(yè)標(biāo)準(zhǔn)死區(qū)壓縮算法24已在某條斜率不為0的直線上下,那使用該方法得到的結(jié)果將會(huì)很差。但有人將該算法死區(qū)壓縮算法的原理是:對(duì)于時(shí)間序列的變量數(shù)據(jù),規(guī)定好變量的變化限值(即死區(qū),或稱為閾值),若當(dāng)前數(shù)據(jù)與上一個(gè)保存的數(shù)據(jù)的偏差超過了規(guī)定的死區(qū),那么就保存當(dāng)前數(shù)據(jù),否則丟棄,如圖2.12.1 死區(qū)壓縮算法原法,那么A、B、C、D都需要保存,實(shí)際上僅保存A和D即可,B和C圖 2.2 死區(qū)不適宜處理沿斜率線變化數(shù)據(jù)示意2.1.2 兩點(diǎn)式壓縮算圖 2.2 死區(qū)不適宜處理沿斜率線變化數(shù)據(jù)示意2.1.2 兩點(diǎn)式壓縮算兩點(diǎn)式壓縮算法25同樣也是很早工業(yè)標(biāo)準(zhǔn)死區(qū)壓縮算法的優(yōu)點(diǎn)

13、就是直線的選定不再使用單一的平行于軸的斜率為02.1.3PI的旋轉(zhuǎn)門算2.3 PI旋2.3 PI旋轉(zhuǎn)門算法原2.1.4GEProficyHistorian 的旋轉(zhuǎn)門壓縮算E ficy torian)也采用了一種旋轉(zhuǎn)門壓縮算法,其原理如圖2.4中帶有箭頭的豎直線段。A點(diǎn)是一個(gè)要保存的數(shù)值,從A點(diǎn)向后續(xù)數(shù)據(jù)點(diǎn)畫線,若這條線與這兩點(diǎn)間的所有豎直線段都相交,那么繼續(xù)向下一個(gè)數(shù)據(jù)點(diǎn)劃線,圖中AD連線與C因此,點(diǎn)需要進(jìn)行保存,再從點(diǎn)開始向后續(xù)點(diǎn)劃線。2.4 PH旋轉(zhuǎn)門2.4 PH旋轉(zhuǎn)門算法原2.1.5 愛康HyperHistorian 的旋轉(zhuǎn)門算愛康諾(ICONICS)公司的Hyper Historian

14、實(shí)時(shí)歷史數(shù)據(jù)庫(后文簡稱HH)也采用了2.5 HH旋轉(zhuǎn)門算法原2.1.6 改進(jìn)的雙旋轉(zhuǎn)門算2.1.6 改進(jìn)的雙旋轉(zhuǎn)門算2.6 雙旋轉(zhuǎn)門算法原如圖2.61和2當(dāng)達(dá)到某個(gè)點(diǎn)(如E點(diǎn))時(shí),兩個(gè)平行四邊形都不能包含這個(gè)點(diǎn),那么這個(gè)點(diǎn)的前一個(gè)點(diǎn)(圖中點(diǎn))需要進(jìn)行保存,然后從新的保存點(diǎn)開始繼續(xù)畫雙旋轉(zhuǎn)門。由圖2.6可見,2.2于旋轉(zhuǎn)門壓縮算法的改2.2.1 旋轉(zhuǎn)門(SDT)壓縮算法基本原SDT 壓縮算法做了非常詳細(xì)的介紹,并與其它的壓縮算法進(jìn)SDT 壓縮算法在SDT SDTSDT2.3 SDT 的流程工業(yè)數(shù)據(jù)壓縮算法模塊總體2.4 2.3 SDT 的流程工業(yè)數(shù)據(jù)壓縮算法模塊總體2.4 第 3 章 基于旋轉(zhuǎn)

15、門的流程工業(yè)數(shù)據(jù)壓縮算法模塊設(shè)計(jì)與實(shí)SDT CVisualStudio20153.1據(jù)壓縮模塊設(shè)計(jì)與實(shí)第 3 章 基于旋轉(zhuǎn)門的流程工業(yè)數(shù)據(jù)壓縮算法模塊設(shè)計(jì)與實(shí)SDT CVisualStudio20153.1據(jù)壓縮模塊設(shè)計(jì)與實(shí)SDT E Etxt txt 。和,此時(shí)的 這個(gè)數(shù)據(jù)時(shí)的時(shí)刻 tt 0 SDT k t FSRL改進(jìn)旋轉(zhuǎn)門壓縮算法FSRL改進(jìn)旋轉(zhuǎn)門壓縮算法操作示SDT Y并圖基本旋轉(zhuǎn)門壓縮算法壓縮流程YNN用當(dāng)前數(shù)據(jù)和時(shí)刻t并與當(dāng)前t=0Y并圖基本旋轉(zhuǎn)門壓縮算法壓縮流程YNN用當(dāng)前數(shù)據(jù)和時(shí)刻t并與當(dāng)前t=03.3 t并與當(dāng)前壓t=03.3 t并與當(dāng)前壓t=0fscanf(fin,%lfn

16、,f(fout1,0n%lfn,while(+t,+t1,+t2,+t3,fscanf(fin,%lfn,&data)!=EOF,fscanf(fin1,&data1)!=EOF,fscanf(fin2,%lfn,&data2)!=EOF,fscanf(fin3, %lfn,&data3)。if (p = now_up =double(data -last_stored_data -E) (t-last_stored_t),if (now_upfscanf(fin,%lfn,f(fout1,0n%lfn,while(+t,+t1,+t2,+t3,fscanf(fin,%lfn,&data)!=

17、EOF,fscanf(fin1,&data1)!=EOF,fscanf(fin2,%lfn,&data2)!=EOF,fscanf(fin3, %lfn,&data3)。if (p = now_up =double(data -last_stored_data -E) (t-last_stored_t),if (now_up up_gate = now_down=double(data -last_stored_data +E)(t-last_stored_t),if(now_down= down_gate |u = last_stored_tt1;last_stored_data=up_ga

18、te= double(data -last_stored_data- fscanf(fin1,%lfn,fscanf(fin2,%lfn,fscanf(fin3,%lfn,down_gate= double(data- last_stored_data+ g = t - last_read_data=down_gate= double(data- last_stored_data+ g = t - last_read_data=last_stored_t2)& (t1-last_stored_t1) =(t3- f(fout1,%lfn%lfn2n,t1-1,if (t2 - last_sto

19、red_t2) (t - last_stored_t) & (t2 -last_stored_t1)& (t2- last_stored_t2) =(t3- f(fout1,%lfn%lfn0.9n,t2-1,last_stored_t2)& (t1-last_stored_t1) =(t3- f(fout1,%lfn%lfn2n,t1-1,if (t2 - last_stored_t2) (t - last_stored_t) & (t2 -last_stored_t1)& (t2- last_stored_t2) =(t3- f(fout1,%lfn%lfn0.9n,t2-1,if (t3

20、 - last_stored_t3) (t - last_stored_t) & (t3 -last_stored_t1)& (t3- last_stored_t3) (t2 - f(fout1,%lfn%lfn0.8n,t3-1,3.2 SDT E E SDT再根據(jù)時(shí)刻t值逐一解壓出數(shù)據(jù),在基本的SDT 壓縮算法中,解壓是根據(jù)數(shù)據(jù)的直線擬合進(jìn)行解壓的。SDTt a, double fscanf(fin,%lfn%lfn,&a.x,將while(fscanf(fin,%lfn%lfn%lfn,&b.x,&b.y,&c)!=f(fout,%lfn,if (a.x+ 1 !=doublek = .

21、y-a.y) (b.xa.x),cfor i= a.x+ 1;ib.x;f(fout,%lfn, (i- a.x), c) + a.x = a.y = 3.3a, double fscanf(fin,%lfn%lfn,&a.x,將while(fscanf(fin,%lfn%lfn%lfn,&b.x,&b.y,&c)!=f(fout,%lfn,if (a.x+ 1 !=doublek = .y-a.y) (b.xa.x),cfor i= a.x+ 1;ib.x;f(fout,%lfn, (i- a.x), c) + a.x = a.y = 3.3 SDTSDT 比。在數(shù)據(jù)誤差計(jì)算部分用CE 來表

22、示重建數(shù)據(jù)和原始數(shù)據(jù)的誤差,在本篇 比。在數(shù)據(jù)誤差計(jì)算部分用CE 來表示重建數(shù)據(jù)和原始數(shù)據(jù)的誤差,在本篇 壓縮率,在本篇文獻(xiàn)CRwhile(fscanf(fin1,%lfn,&data)!=s= s+ q= (s -2) /q = q + f(fout,while(fscanf(fin1,%lfn,&data)!=s= s+ q= (s -2) /q = q + f(fout,%lfn, f(fout,%lfn,w= t / (q *4驗(yàn)及分4.14驗(yàn)及分4.1數(shù)據(jù)計(jì)數(shù)據(jù)的產(chǎn)生1的壓縮效果產(chǎn)生影響實(shí)際上, 波幅對(duì)壓縮效果的影響可以通過調(diào)限E 的值抵消, 僅通過調(diào)整采樣精度來生成不同數(shù)據(jù)。表4.

23、1的壓縮效果產(chǎn)生影響實(shí)際上, 波幅對(duì)壓縮效果的影響可以通過調(diào)限E 的值抵消, 僅通過調(diào)整采樣精度來生成不同數(shù)據(jù)。表4.1 列出了數(shù)據(jù)產(chǎn)生函數(shù)。4.2 計(jì)算結(jié)果分析:表4.2 SDT 算法確實(shí)是正確的和有效的。在對(duì)數(shù)據(jù)集1 2 3 的計(jì)算中,改進(jìn)SDT 算法的壓縮比CR 比SDT 算法平均增加了約40 %至50%, 壓縮誤差CE SDT 算法確E=0.5t 為均勻分布于 0 , 200 4000 SDT SDT 形顯示對(duì)比一下。(4.14.2圖t為均勻分布于0,200 的個(gè)數(shù)據(jù)原始數(shù)據(jù)數(shù)基本SDT 壓基本SDT 壓縮算法壓縮數(shù)據(jù)改進(jìn)SDT 壓縮算法壓縮數(shù)據(jù)數(shù)據(jù)的原始、壓縮數(shù)據(jù)4.3 SDTSDT

24、4.2際工業(yè)數(shù)據(jù)計(jì) 6000 E4.3(四組數(shù)據(jù)為油料數(shù)據(jù),第五組數(shù)據(jù)為輸油管道壓力數(shù)據(jù)4.4 實(shí)際工業(yè)數(shù)據(jù)計(jì)算結(jié)壓縮比壓縮誤差44數(shù)據(jù)的原始、壓縮數(shù)據(jù)4.3 SDTSDT4.2際工業(yè)數(shù)據(jù)計(jì) 6000 E4.3(四組數(shù)據(jù)為油料數(shù)據(jù),第五組數(shù)據(jù)為輸油管道壓力數(shù)據(jù)4.4 實(shí)際工業(yè)數(shù)據(jù)計(jì)算結(jié)壓縮比壓縮誤差444555SDTSDT4.4ESDT SDT 4.4ESDT SDT CR 20%1000 以上,改進(jìn)算法的壓縮率會(huì)明顯優(yōu)于基本壓縮算法,但是SDT 壓縮算法不適用于波動(dòng)幅度SDTSDT下在E=0.1的情況下將油料數(shù)據(jù)的原始數(shù)據(jù)基本SDT 壓縮算法的壓SDT(4.44.5圖油料數(shù)據(jù)原始數(shù)據(jù)基本旋轉(zhuǎn)

25、門壓基本旋轉(zhuǎn)門壓縮算法壓縮數(shù)改進(jìn)旋轉(zhuǎn)門壓縮算法壓縮數(shù)通過以上三個(gè)可以得到實(shí)際工業(yè)數(shù)據(jù)的原始和壓縮數(shù)據(jù)量,如表數(shù)據(jù)的原始、壓縮數(shù)據(jù)通過以上三個(gè)可以得到實(shí)際工業(yè)數(shù)據(jù)的原始和壓縮數(shù)據(jù)量,如表數(shù)據(jù)的原始、壓縮數(shù)據(jù)4.5 SDTSDTSDTSDTSDT SDT SDT SDT SDT SDT SDT SDT SDT SDT SDTSDT壓縮算法基礎(chǔ)上提出SDT 壓縮算法的構(gòu)思思路。SDT(4) SDT.參考文,BEN -YIUaining Temporal Consistency of Discrete Objects Soft Real-Time Database SystemsJ.IEEE 373-

26、ions on MARIA L.B.PERKUSICH.Object-Odented Real-Time Database Design Based on Petri NetsJ.IEEE,1 998:202-207.參考文,BEN -YIUaining Temporal Consistency of Discrete Objects Soft Real-Time Database SystemsJ.IEEE 373-ions on MARIA L.B.PERKUSICH.Object-Odented Real-Time Database Design Based on Petri NetsJ

27、.IEEE,1 998:202-207.LEI ZHOU,ELKE A.RUNDENSTEINER.Schema Evolution ofan Object-Real-Time Database System for Manufacturing AutomationJ.IEEE KnowledgeandDataEngineering,1997,9(6):956ions JoHN OVIC,SANG H.SON,CHI D.NGUYEN.The Cogency erface Architecture For a Distributed Object-Oriented Real-Time Syst

28、emJ.IEEE:2003:12221吳欽章2003,33(10):85歷史數(shù)據(jù)庫實(shí)時(shí)壓縮方法研究J2004,28(8):167,賈海波試驗(yàn)系統(tǒng)中的數(shù)據(jù)壓縮研究J小型微型計(jì)算BristolEH,Swingingdoortrending:adaptivetrendrecording?CProceedingsofISA National Conference,S. l. :IEEE Press,1990:749-753.,計(jì)算機(jī)工程與應(yīng)用,2003年8月,第39卷第8期,222-13Michael VMannino,應(yīng)用開發(fā)與管理(第二版M17Hale J C,Sellars H L.Histor

29、ical Data Recording M17Hale J C,Sellars H L.Historical Data Recording 18Mah R S s Trending with Piecewise Linear SmoothingJ.Computer 19.實(shí)時(shí)數(shù)據(jù)的存取與壓縮J,30(3) :47-,劉光斌.ISDT 算法的數(shù)據(jù)壓縮處理及其性能分析J.火力與指揮控制,2007,32(2) :80-用于過程數(shù)據(jù)壓縮的自控精度SDT算法J:40-,湯同奎.SDT 算法及其在局域控制網(wǎng)絡(luò)中壓縮過程數(shù)據(jù)的應(yīng)用信息與控制,2002,31( 2) 24WANG Jun.Research a

30、nd improvement of loss linear Application,2011,32(7)13- ).君.基于實(shí)時(shí)數(shù)據(jù)庫的有損線性壓縮算法研究與改進(jìn)J(7):13-25Sivalingam S.Effect of data on controller performance monitoring /Trondheim.Norway:NorwegianUnivofSci&Technol,2011:594-致本的本致本的本#include #include#include#define#include #include#include#defineMAX_DOUBLE#defineE

31、structdoublex,voidFILE * fin = fopen(C:UsersAdministratorDesktop實(shí)驗(yàn)數(shù)據(jù)inputdata2.txt, r); FILE * fin1 = fopen(C:UsersAdministratorDesktop實(shí)驗(yàn)數(shù)據(jù)inputdata2.txt, r); FILE * fin2 = fopen(C:UsersAdministratorDesktop實(shí)驗(yàn)數(shù)據(jù)inputdata2.txt, r); FILE * fin3 = fopen(C:UsersAdministratorDesktop實(shí)驗(yàn)數(shù)據(jù)inputdata2.txt, r);

32、 FILE * fout = fopen(C:UsersAdministratorDesktop實(shí)驗(yàn)數(shù)據(jù)outtest20.txt, w); FILE*fout1fopen(C:UsersAdministratorDesktop實(shí)驗(yàn)數(shù)據(jù)outtest21.txt,w);double up_gate = -MAX_DOUBLE; double down_gate = MAX_DOUBLE; double up_gate1 = -MAX_DOUBLE; doubledown_gate1MAX_DOUBLE; double up_gate2 = -MAX_DOUBLE; doubledown_gat

33、e2MAX_DOUBLE; double up_gate3 = -MAX_DOUBLE;doubledown_gate3=/當(dāng)前數(shù)據(jù)的上斜率和下斜doublenow_up,now_down,now_up1,now_down1,now_up2,now_down2,now_up3,doubledouble last_read_data; doublelast_stored_data; double data1;double last_read_data1; doublelast_stored_data1; double data2;double last_read_data2; doublelas

34、t_stored_data2; double data3;doubledoublep=p1double last_read_data; doublelast_stored_data; double data1;double last_read_data1; doublelast_stored_data1; double data2;double last_read_data2; doublelast_stored_data2; double data3;doubledoublep=p1=p2=p3=doubleg; doubleh; double j;doubledoubleu=0; doub

35、lev=0; doublen=doublem=/readandsavefscanf(fin,%lfn,f(fout1,0n%lfn,fscanf(fin1,%lfn,f(fout,0n%lfn,fscanf(fin2,%lfn,f(fout,0n%lfn,last_stored_data2); fscanf(fin3, %lfn, &last_stored_data3);f(fout,0n%lfn,last_read_data = last_stored_data; last_read_data1=last_read_data2=last_read_data3=doublelast_store

36、d_t= doublelast_stored_t1=doublelast_stored_t2=doublelast_stored_t3=double t = 0;doublelast_stored_t1=doublelast_stored_t2=doublelast_stored_t3=double t = 0; doublet1=doublet2=doublet3=while(+t,+t1,+t2,+t3,fscanf(fin,%lfn,&data)!=EOF,fscanf(fin1,%lfn,&data1)!=EOF,fscanf(fin2, %lfn, &data2) != EOF, f

37、scanf(fin3, %lfn, &data3) != EOF) if(p= now_up=double(data-last_stored_data-E) if(now_up up_gate=(t-last_stored_t), now_down=double(data-last_stored_data+E) if(now_down=down_gate|u= last_stored_tt1;修改最近保存數(shù)據(jù)時(shí)間 last_stored_data= /初始化兩扇門為當(dāng)前點(diǎn)與上個(gè)點(diǎn)的斜 up_gate=double(data-last_stored_data- down_gate=double(

38、data-last_stored_data+ g =t - last_read_data= if(p1= now_up1=double(data1-last_stored_data1-E) if(now_up1(t1-last_stored_t1), up_gate1= now_down1=double(data1-last_stored_data1+E) up_gate1= now_down1=double(data1-last_stored_data1+E) if(now_down1=down_gate1|v= last_stored_t1t11;修改最近保存數(shù)據(jù)時(shí)間 last_store

39、d_data1= /初始化兩扇門為當(dāng)前點(diǎn)與上個(gè)點(diǎn)的斜 up_gate1=double(data1-last_stored_data1- down_gate1=double(data1-last_stored_data1+ h =t1 - last_read_data1= if(p2= now_up2=double(data2-last_stored_data2-E)(t2-last_stored_t2), if(now_up2 up_gate2= now_down2=double(data2-last_stored_data2+E) if(now_down2=down_gate2|n= las

40、t_stored_t2t21;修改最近保存數(shù)據(jù)時(shí)間 last_stored_data2= /初始化兩扇門為當(dāng)前點(diǎn)與上個(gè)點(diǎn)的斜 up_gate2=double(data2-last_stored_data2- down_gate2=double(data2-last_stored_data2+ j =t2 - last_read_data2= j =t2 - last_read_data2= if(p3= now_up3=double(data3-last_stored_data3-E)(t3-last_stored_t3), if(now_up3 up_gate3= now_down3=dou

41、ble(data3-last_stored_data3+E) if(now_down3=down_gate3|m= last_stored_t3t31;修改最近保存數(shù)據(jù)時(shí)間 last_stored_data3= /初始化兩扇門為當(dāng)前點(diǎn)與上個(gè)點(diǎn)的斜 up_gate3=double(data3-last_stored_data3- down_gate3=double(data3-last_stored_data3+ k =t3 - last_read_data3= if(p!=0&p1!=0&p2!=0&p3!= if(g=h&g=j&g= f(fout1,%lfn%lfn1n,t-1, up_g

42、ate1=double(data-last_stored_data- down_gate1=double(data-last_stored_data+ up_gate2=double(data-last_stored_data- down_gate2=double(data-last_stored_data+ down_gate2=double(data-last_stored_data+ up_gate3=double(data-last_stored_data- down_gate3=double(data-last_stored_data+ last_stored_data1= last

43、_stored_data2= last_stored_data3= last_stored_t1=t - last_stored_t2=t - last_stored_t3=t - if(hg&h=j&h= f(fout1,%lfn%lfn2n,t1-1, up_gate=double(data1-last_stored_data1- down_gate=double(data1-last_stored_data1+ up_gate2=double(data1-last_stored_data1- down_gate2=double(data1-last_stored_data1+ up_ga

44、te3=double(data1-last_stored_data1- down_gate3=double(data1-last_stored_data1+ last_stored_data= last_stored_data2= last_stored_data3= last_stored_t=t1 - last_stored_t2=t1 - last_stored_t3=t1 - if(jg&jh&j= f(fout1,%lfn%lfn0.5n,t2-1, up_gate=double(data2-last_stored_data2- down_gate=double(data2-last

45、_stored_data2+ up_gate1=double(data2-last_stored_data2- down_gate1=double(data2-last_stored_data2+ up_gate3=double(data2-last_stored_data2- down_gate3=double(data2-last_stored_data2+ last_stored_data= last_stored_data1= last_stored_data3= last_stored_t= last_stored_data1= last_stored_data3= last_sto

46、red_t=t2 - last_stored_t1=t2 - last_stored_t3=t2 - if(kg&kh&k f(fout1,%lfn%lfn0.75n,t3-1, up_gate=double(data3-last_stored_data3- down_gate=double(data3-last_stored_data3+ up_gate1=double(data3-last_stored_data3- down_gate1=double(data3-last_stored_data3+ up_gate2=double(data3-last_stored_data3- dow

47、n_gate2=double(data3-last_stored_data3+ last_stored_data= last_stored_data1= last_stored_data2= last_stored_t=t3 - last_stored_t1=t3 - last_stored_t2=t3 - p= p1= p2= p3= u= v= n= m = /savaendif (t - last_stored_t) = (t1 - last_stored_t1) & (t - last_stored_t) = (t2 - last_stored_t2) & (t - last_stor

48、ed_t) = (t3 - last_stored_t3) f(fout1,%lfn%lfn1n,t-1,if (t1 - last_stored_t1) (t - last_stored_t) & (t1 - last_stored_t1) = if (t1 - last_stored_t1) (t - last_stored_t) & (t1 - last_stored_t1) = (t2 - last_stored_t2) & (t1 - last_stored_t1) = (t3 - last_stored_t3) f(fout1,%lfn%lfn2n,t1-1,if (t2 - la

49、st_stored_t2) (t - last_stored_t) & (t2 - last_stored_t2) (t1 - last_stored_t1) & (t2 - last_stored_t2) = (t3 - last_stored_t3) f(fout1,%lfn%lfn0.5n,t2-1,if (t3 - last_stored_t3) (t - last_stored_t) & (t3 - last_stored_t3) (t1 - last_stored_t1) & (t3 - last_stored_t3) (t2 - last_stored_t2) f(fout1,%

50、lfn%lfn0.75n,t3-1,FILE * fin = fopen(C:UsersAdministratorDesktop實(shí)驗(yàn)數(shù)據(jù)outtest21.txt, r); FILE*foutfopen(C:UsersAdministratorDesktop實(shí)驗(yàn)數(shù)據(jù)outtest30.txt,w);a,doublefscanf(fin,%lfn%lfn,&a.x,while(fscanf(fin,%lfn%lfn%lfn,&b.x,&b.y,&c)!= f(fout,%lfn, if(a.x+1!= doublek=.y-a.y)(b.xa.xc計(jì)算斜 for i= doublek=.y-a.y)(b.xa.xc計(jì)算斜 for i=a.x+1;i up_gate= now_down=double(data-last_stored_data+E)/(t-

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論