石惠嫻,孟祥真,游煜成,張中華,歐陽(yáng)三川,任亦可
?
植物工廠地源熱泵系統(tǒng)熱負(fù)荷BP神經(jīng)網(wǎng)絡(luò)預(yù)測(cè)及驗(yàn)證
石惠嫻,孟祥真,游煜成,張中華,歐陽(yáng)三川,任亦可
(同濟(jì)大學(xué)新農(nóng)村發(fā)展研究院國(guó)家設(shè)施農(nóng)業(yè)工程技術(shù)研究中心,上海 200092)
為提高水蓄能型地下水源熱泵自然光植物工廠供熱系統(tǒng)節(jié)能性,供熱系統(tǒng)必須能夠很好地預(yù)測(cè)熱負(fù)荷變化。針對(duì)自然光植物工廠熱環(huán)境系統(tǒng)非線性特點(diǎn),利用具有很強(qiáng)非線性映射能力的BP神經(jīng)網(wǎng)絡(luò)(back propagation,BP),選取室內(nèi)外空氣干球溫度、太陽(yáng)輻射強(qiáng)度、室內(nèi)相對(duì)濕度和絕對(duì)濕度、室內(nèi)風(fēng)速等輸入?yún)?shù),確定算法步驟和評(píng)價(jià)指標(biāo),構(gòu)建神經(jīng)網(wǎng)絡(luò)模型預(yù)測(cè)植物工廠次日負(fù)荷。采用Matlab神經(jīng)網(wǎng)絡(luò)工具箱對(duì)崇明試驗(yàn)基地水蓄能型地源熱泵自然光植物工廠的樣本集進(jìn)行訓(xùn)練,訓(xùn)練后誤差函數(shù)值為0.002 999 94,神經(jīng)網(wǎng)絡(luò)收斂。通過對(duì)比熱負(fù)荷預(yù)測(cè)值與實(shí)際值,證明了神經(jīng)網(wǎng)絡(luò)預(yù)測(cè)熱負(fù)荷值與實(shí)際值趨勢(shì)一致,基本誤差在±6%以內(nèi),結(jié)果表明神經(jīng)網(wǎng)絡(luò)法可以用于植物工廠次日熱負(fù)荷預(yù)測(cè)。通過熱負(fù)荷預(yù)測(cè)能夠更加科學(xué)地調(diào)整供熱系統(tǒng)運(yùn)行模式,更好地匹配植物工廠需求熱量與熱泵的輸出能量,實(shí)現(xiàn)運(yùn)行節(jié)能和降低供能成本的目的。
熱能;神經(jīng)網(wǎng)絡(luò);算法;熱負(fù)荷預(yù)測(cè);植物工廠;水蓄能;地源熱泵
維持植物工廠內(nèi)適宜運(yùn)行溫度對(duì)于作物生長(zhǎng)非常重要,但冬季巨大的供熱能耗日益成為影響植物工廠經(jīng)濟(jì)運(yùn)行的主要問題。在歐洲用于植物工廠冬季供熱的成本大約為植物工廠總運(yùn)行費(fèi)用的30%以上。在中國(guó)北緯35°左右地區(qū)的植物工廠,冬季供熱耗能約占總生產(chǎn)成本的30%~40%,在北緯40°左右的地區(qū),約占40%~50%,北緯43°以上的地區(qū)約占60%~70%[1-2]。并且燃煤鍋爐等傳統(tǒng)加熱設(shè)備污染環(huán)境[3]。因此從源頭上選擇可再生能源供能植物工廠系統(tǒng),并跟蹤預(yù)測(cè)植物工廠熱負(fù)荷變化,及時(shí)調(diào)控供熱系統(tǒng),成為實(shí)現(xiàn)節(jié)能降耗的關(guān)鍵[4-10]。但植物工廠熱負(fù)荷預(yù)測(cè)的研究較少,有學(xué)者通過天氣預(yù)測(cè)系統(tǒng)和穩(wěn)態(tài)熱模型預(yù)測(cè)溫室供熱需求[11-12]。
自然光型植物工廠熱負(fù)荷變化具有動(dòng)態(tài)性、時(shí)變性、多擾性和不確定性等[13-16]。人工神經(jīng)網(wǎng)絡(luò)(artificial neural networks,ANN)模型非常適合對(duì)負(fù)荷變化進(jìn)行預(yù)測(cè)[17-19]。其中,反向傳播的BP神經(jīng)網(wǎng)絡(luò)模型具有很強(qiáng)的非線性映射能力[20-22],主要集中用于建筑負(fù)荷預(yù)測(cè)[23],國(guó)內(nèi)外學(xué)者對(duì)于BP神經(jīng)網(wǎng)絡(luò)預(yù)測(cè)植物工廠熱負(fù)荷研究較少。
Ahmad等[24]為了提高負(fù)荷預(yù)測(cè)精度,通過6種模型來預(yù)測(cè)水源熱泵供暖和制冷負(fù)荷需求,得到BP神經(jīng)網(wǎng)絡(luò)模型預(yù)測(cè)7 d能源需求的平均絕對(duì)誤差為2.592%。Casta?eda-Miranda等[25]通過BP神經(jīng)網(wǎng)絡(luò)算法設(shè)計(jì)和實(shí)現(xiàn)在墨西哥中部地區(qū)某溫室的智能控制,在夏季和冬季預(yù)測(cè)的準(zhǔn)確率分別達(dá)到0.954 9和0.959 0。Taki等[26]通過運(yùn)用多層感知器神經(jīng)網(wǎng)絡(luò)預(yù)測(cè)位于伊朗西北部某溫室內(nèi)部溫度,證明此方法適用于估計(jì)溫室中的實(shí)際數(shù)據(jù)和預(yù)測(cè)能量變化。張經(jīng)博等[27]通過利用改進(jìn)的遺傳算法優(yōu)化BP神經(jīng)網(wǎng)絡(luò)初始權(quán)值和網(wǎng)絡(luò)結(jié)構(gòu),對(duì)建筑供暖系統(tǒng)熱負(fù)荷進(jìn)行短期預(yù)測(cè)。
考慮到植物工廠熱負(fù)荷與建筑熱負(fù)荷都具有非線性特點(diǎn),采用BP人工神網(wǎng)絡(luò)模型對(duì)植物工廠次日熱負(fù)荷進(jìn)行預(yù)測(cè)[28-29],以期及時(shí)調(diào)整供熱系統(tǒng)的供熱模式和供能量,及時(shí)降低熱泵不必要的運(yùn)行時(shí)間,或者避免供熱量不足對(duì)作物產(chǎn)量和品質(zhì)的影響,以促進(jìn)植物工廠供熱系統(tǒng)節(jié)能控制優(yōu)化。
自然光植物工廠位于上海市崇明區(qū)國(guó)家設(shè)施農(nóng)業(yè)工程技術(shù)研究中心基地。其中自然光植物工廠外圍護(hù)結(jié)構(gòu)為5 mm厚的單層浮法玻璃,總面積為21 180 m2,分為A,B,C 3區(qū),其中A區(qū)的A2,A4,A6,A7,A8,A9,A10共7棟溫室采用水蓄能型地下水源熱泵空調(diào)系統(tǒng)供能,其供熱面積為5 880 m2。基地采用的地源熱泵機(jī)組為Carrier公司生產(chǎn)的30HXC200-PH3opt150型熱泵,其最大制熱量可達(dá)800 kW。水蓄能型地下水源熱泵植物工廠供熱系統(tǒng)如圖1所示,主要由地下水換熱系統(tǒng)、蓄能系統(tǒng)、供能系統(tǒng)等組成。
1.熱水井 2.冷水井 3.低溫板式換熱器 4.高溫板式換熱器 5.熱泵機(jī)組6.蓄冷水箱 7.蓄熱水箱 8.植物工廠
1.Hot water well 2.Cold water well 3.Low temperature plate heat exchanger 4.High temperature plate heat exchanger 5.Heat pump unit 6.Cool storage tank 7.Hot storage tank 8.Plant factory
注:B1為潛水泵,B2-B7為循環(huán)水泵,V1-V4為電磁閥。
Note: B1 is submersible pump; B2-B7 are circulating water pumps; V1-V4 are electromagnetic valves.
圖1 水蓄能型地源熱泵植物工廠供熱系統(tǒng)
Fig.1 Water storage ground source heat pump heating system of plant factory
地源熱泵機(jī)組運(yùn)行模式應(yīng)隨不同熱負(fù)荷變化而發(fā)生變化。在冬季,當(dāng)熱泵機(jī)組供熱量大于植物工廠熱負(fù)荷,機(jī)組邊儲(chǔ)熱邊供熱,熱水井中的潛水泵抽取地下水依次通過除砂器、水源側(cè)電子除垢儀等水處理設(shè)備進(jìn)入低溫板式換熱器水源側(cè),經(jīng)過低溫板式換熱器提取熱量后回灌到冷水井,蓄冷水箱下側(cè)的冷水進(jìn)入低溫板式換熱器吸收地下水的熱量后回到蓄冷水箱的上側(cè)。升溫的蓄冷水箱上側(cè)冷水進(jìn)入熱泵蒸發(fā)器側(cè),經(jīng)蒸發(fā)器提取熱量后返回蓄冷水箱下側(cè),蒸發(fā)器吸收的熱量經(jīng)冷凝器釋放,冷凝器出水管溫度升高,部分進(jìn)入空氣處理機(jī)組(air treatment unit,ATU)的熱水進(jìn)水管對(duì)植物工廠供熱,剩余進(jìn)入蓄熱水箱上側(cè)進(jìn)行儲(chǔ)熱,此時(shí)在蓄熱水箱處電磁閥V2和V3打開,電磁閥V1和V4關(guān)閉。當(dāng)熱泵機(jī)組供熱量和蓄熱水箱供熱量都小于植物工廠熱負(fù)荷時(shí),蓄熱水箱和熱泵機(jī)組聯(lián)合供熱,機(jī)組供熱流程和機(jī)組邊儲(chǔ)熱邊供熱模式中相同,熱泵停止對(duì)蓄熱水箱蓄熱,此時(shí)在蓄熱水箱處電磁閥V1和V4打開,電磁閥V2和V3關(guān)閉,抽取蓄熱水箱上側(cè)熱水進(jìn)入空氣處理機(jī)組的熱水進(jìn)水管,從而對(duì)植物工廠供熱。
當(dāng)供熱系統(tǒng)需求側(cè)——植物工廠內(nèi)熱負(fù)荷不同,供熱系統(tǒng)會(huì)采用不同的運(yùn)行模式進(jìn)行供能。根據(jù)氣象數(shù)據(jù)及植物工廠環(huán)境實(shí)時(shí)運(yùn)行數(shù)據(jù)提前對(duì)供熱系統(tǒng)需求側(cè)熱負(fù)荷進(jìn)行預(yù)測(cè),根據(jù)需求提前做出供能策略調(diào)整,能夠最大限度地實(shí)現(xiàn)系統(tǒng)供能節(jié)能。
BP神經(jīng)網(wǎng)絡(luò)算法是由人工神經(jīng)元按照某種模式連接而構(gòu)成的,有輸入層、隱含層和輸出層3個(gè)層次。確定BP神經(jīng)網(wǎng)絡(luò)算法流程,首先初始化各層權(quán)系數(shù)和閾值,隨機(jī)選取樣本值提供給網(wǎng)絡(luò),計(jì)算隱含層和輸出層的輸出值。然后計(jì)算輸出層的一般化誤差,將誤差反向傳播至隱含層,計(jì)算隱含層的一般化誤差,調(diào)整隱含層和輸出層的權(quán)系數(shù)和閾值。重新選取樣本值輸入網(wǎng)絡(luò),通過重復(fù)以上算法流程,直到網(wǎng)絡(luò)全局誤差函數(shù)小于預(yù)先設(shè)定的一個(gè)極小值,即網(wǎng)絡(luò)收斂。當(dāng)誤差函數(shù)大于預(yù)先設(shè)定值,則網(wǎng)絡(luò)無(wú)法收斂。
為了使熱負(fù)荷預(yù)測(cè)既可以滿足植物工廠的供熱需求同時(shí)又能兼顧節(jié)能的要求,需要對(duì)BP神經(jīng)網(wǎng)絡(luò)的輸入變量、輸出變量進(jìn)行合理選擇。
2.2.1 輸入?yún)?shù)的選擇
輸入?yún)?shù)樣本應(yīng)具有完整的大氣溫度、大氣濕度以及太陽(yáng)輻射強(qiáng)度,這三者是影響地源熱泵系統(tǒng)負(fù)荷的最重要因素。因此輸入?yún)?shù)包括室內(nèi)外空氣干球溫度、太陽(yáng)輻射強(qiáng)度、室內(nèi)相對(duì)濕度、室內(nèi)絕對(duì)濕度、室內(nèi)風(fēng)速等。對(duì)于植物工廠而言,次日天氣狀況對(duì)熱負(fù)荷影響很大。實(shí)踐證明,當(dāng)冬季晴天時(shí),自然光植物工廠的供熱負(fù)荷很小,有時(shí)甚至不需要供熱。因此,在對(duì)供熱負(fù)荷進(jìn)行預(yù)測(cè)時(shí)需要將天氣類型分為晴、多云、陰、雨4類。本文以冬季陰天極端天氣條件下為例,對(duì)供熱負(fù)荷進(jìn)行預(yù)測(cè)。
對(duì)于供熱系統(tǒng)而言,只需要知道室內(nèi)供熱負(fù)荷總情況,不需要對(duì)其劃分為人員負(fù)荷、設(shè)備負(fù)荷和其他負(fù)荷等。因此選擇前一天的逐時(shí)熱負(fù)荷參數(shù)作為輸入?yún)?shù)。
2.2.2 輸出變量的選擇
需要利用前一天的逐時(shí)參數(shù)來預(yù)測(cè)植物工廠第二天的逐時(shí)熱負(fù)荷,因此對(duì)地源熱泵系統(tǒng)熱負(fù)荷預(yù)測(cè)的輸出變量確定為第二天逐時(shí)植物工廠熱負(fù)荷值
2.3.1 隱含層層數(shù)確定
隱含層是連接神經(jīng)網(wǎng)絡(luò)輸入與輸出的“樞紐”,是一個(gè)“暗箱”,真正的網(wǎng)絡(luò)模型就是由這個(gè)“暗箱”來決定的。目前,對(duì)隱含層的選擇沒有固定的理論依據(jù)。Kolgmogrov定理表明:采用一層中間層,即3層神經(jīng)網(wǎng)絡(luò)已經(jīng)能夠解決地源熱泵系統(tǒng)負(fù)荷預(yù)測(cè)的問題[30]。采用3層以上的神經(jīng)網(wǎng)絡(luò)會(huì)使誤差反向傳播的計(jì)算過程變得非常復(fù)雜,訓(xùn)練時(shí)間急劇增加,而且局部最小誤差也會(huì)增加,最終誤差函數(shù)也可能無(wú)法收斂,網(wǎng)絡(luò)的連接權(quán)系數(shù)矩陣也很難調(diào)整到最小誤差處。因此,確定采用的隱含層層數(shù)為1。
2.3.2 隱含節(jié)點(diǎn)數(shù)確定
找到最優(yōu)的隱含層節(jié)點(diǎn)數(shù)對(duì)網(wǎng)絡(luò)的結(jié)構(gòu)非常關(guān)鍵。研究BP神經(jīng)網(wǎng)絡(luò)用于地源熱泵系統(tǒng)負(fù)荷預(yù)測(cè),是運(yùn)用函數(shù)擬合功能,通過訓(xùn)練證實(shí)選用式(1)效果更好。經(jīng)多次試驗(yàn)選用=10時(shí),效果比較好,同時(shí):=9,=1,隱藏節(jié)點(diǎn)數(shù)1=13。
式中為輸入神經(jīng)元數(shù);1為隱藏層節(jié)點(diǎn)數(shù);為輸出神經(jīng)元數(shù);為0至10之間的常數(shù)。
2.4.1 BP神經(jīng)網(wǎng)絡(luò)初始權(quán)值確定
選擇權(quán)系數(shù)初始值是否得當(dāng)直接影響到BP神經(jīng)網(wǎng)絡(luò)學(xué)習(xí)是否收斂及是否陷入局部最小情況,對(duì)負(fù)荷預(yù)測(cè)的準(zhǔn)確性至關(guān)重要。調(diào)整輸出層和隱含層的權(quán)系數(shù)公式分別見式(2)、(3)。
式中0<<1;0<<1;v為從輸入向量的第個(gè)分量到輸出向量第(1,…,)個(gè)分量的權(quán)重;為訓(xùn)練次數(shù);e為輸出層的一般化誤差;c為隱含層節(jié)點(diǎn)的輸出值;w為從輸入向量的第(1,…,)個(gè)分量到輸出向量第(1,…,)個(gè)分量的權(quán)重;f為隱含層的一般化誤差。
由式(2)、(3)可知,初始權(quán)值如果能使每個(gè)神經(jīng)元的狀態(tài)值都趨近于零是最理想的。但是如果全都等于零或某同一個(gè)數(shù),系統(tǒng)將不可能繼續(xù)進(jìn)行訓(xùn)練。初始值取(?0.3,0.3)之間的隨機(jī)數(shù)一般情況下能很好的保證網(wǎng)絡(luò)訓(xùn)練的穩(wěn)定度,且初始值在(?0.3,0.3)之間的BP神經(jīng)網(wǎng)絡(luò)訓(xùn)練速度明顯高于(?1,1)之間的BP神經(jīng)網(wǎng)絡(luò)。因此選用初始連接權(quán)值(?0.3,0.3),網(wǎng)絡(luò)的訓(xùn)練性能比較穩(wěn)定,不需對(duì)初始連接權(quán)進(jìn)行修正。
2.4.2 學(xué)習(xí)率和動(dòng)量因子確定
學(xué)習(xí)率直接影響連接權(quán)矩陣變化的范圍和速率。通過參考文獻(xiàn)以及反復(fù)實(shí)踐[31-32],選取學(xué)習(xí)率為0.25~0.30,在此范圍內(nèi)神經(jīng)網(wǎng)絡(luò)的收斂概率是最大的。為了避免網(wǎng)絡(luò)連接權(quán)系數(shù)矩陣的修正陷入局部能量最小的困境,采用動(dòng)量因子法對(duì)其進(jìn)行改進(jìn)[33]。取初始動(dòng)量因子m=0.9,不再對(duì)其進(jìn)行調(diào)整,即慣性修正項(xiàng)在每次連接權(quán)系數(shù)矩陣修正時(shí)所起的作用的比重是相等的。
根據(jù)以上針對(duì)植物工廠地源熱泵供熱系統(tǒng)熱負(fù)荷預(yù)測(cè)特點(diǎn)的分析,建立植物工廠地源熱泵系統(tǒng)熱負(fù)荷BP神經(jīng)網(wǎng)絡(luò)預(yù)測(cè)拓?fù)浣Y(jié)構(gòu)和參數(shù)選擇,如圖2所示。
1.T時(shí)刻室內(nèi)空氣干球溫度 2.T時(shí)刻室外空氣干球溫度 3.T-1時(shí)刻室外空氣干球溫度 4.T時(shí)刻太陽(yáng)輻射強(qiáng)度 5.T-1時(shí)刻太陽(yáng)輻射強(qiáng)度 6.T時(shí)刻室內(nèi)相對(duì)濕度 7.T時(shí)刻室內(nèi)絕對(duì)濕度 8.T時(shí)刻室內(nèi)風(fēng)速 9.T時(shí)刻熱負(fù)荷
圖2中BP神經(jīng)網(wǎng)絡(luò)為全互連連接網(wǎng)絡(luò),每個(gè)處理單元的輸出都將與下一層中的每個(gè)處理單元相連,但同層之間的處理單元不形成連接。根據(jù)已確定的輸入層參數(shù)、隱含層層數(shù)、節(jié)點(diǎn)數(shù)和輸出層參數(shù),輸入層神經(jīng)元數(shù)為9,隱含層的神經(jīng)元數(shù)為13,需要通過不斷地調(diào)試調(diào)整,確定輸出層神經(jīng)元數(shù)為1,進(jìn)行第二天時(shí)刻植物工廠預(yù)測(cè)熱負(fù)荷。
BP神經(jīng)網(wǎng)絡(luò)需要已知負(fù)荷值作為原始目標(biāo)值來訓(xùn)練網(wǎng)絡(luò)。試驗(yàn)數(shù)據(jù)樣本值獲取來自崇明水蓄能型地下水源熱泵供能的自然光植物工廠。植物工廠中地源熱泵系統(tǒng)數(shù)據(jù)采集匹配各種感測(cè)器實(shí)時(shí)監(jiān)控參數(shù),包括室外氣象站含有風(fēng)速風(fēng)向和氣溫等計(jì)量計(jì)、測(cè)量全天日照量的輻射量計(jì)、相對(duì)濕度計(jì)等,能夠準(zhǔn)確提供模型所需參數(shù)。
崇明自然光植物工廠至2018年4月已成功運(yùn)行5個(gè)冬天,通過篩選和對(duì)比,選取2017年冬季1月19日至1月29典型的逐時(shí)負(fù)荷值(間接測(cè)量參數(shù))和對(duì)應(yīng)的氣象參數(shù)(直接測(cè)量參數(shù))作為樣本集,其中選取1月19日至1月28日為訓(xùn)練集,1月29日為驗(yàn)證集。植物工廠內(nèi)外各氣象參數(shù)和所需設(shè)備參數(shù)隨時(shí)間變化曲線見圖3所示。
植物工廠冬季逐時(shí)供熱負(fù)荷見式(4)。根據(jù)冬季逐時(shí)供熱負(fù)荷公式,由圖3b ATU供回水溫差和ATU熱水流量數(shù)據(jù),計(jì)算得出1月19日至28日植物工廠內(nèi)熱負(fù)荷隨時(shí)間的變化情況,如圖4所示。通過曲線可以看出受各天氣因素影響,植物工廠每天所需供熱量呈現(xiàn)出明顯的非線性變化。
式中l(wèi)oad為植物工廠冬季逐時(shí)供熱負(fù)荷,kW;c為水比熱容,kJ/kg℃;Δt為ATU供回水溫差,℃;ρ為熱水密度,kg/m3;V為ATU熱水流量,m3/s。
對(duì)所選取的逐時(shí)熱負(fù)荷和各氣象參數(shù)進(jìn)行BP神經(jīng)網(wǎng)絡(luò)訓(xùn)練,利用Matlab神經(jīng)網(wǎng)絡(luò)工具箱特有的網(wǎng)絡(luò)訓(xùn)練功能,訓(xùn)練仿真步驟如下:
1)將樣本數(shù)據(jù)以矩陣的形式輸入到均值中,形成9行2 880(12×24×10)列的矩陣,將輸出以矩陣的形式輸入到矩陣中,形成1行2 880列的矩陣;
2)對(duì)輸入矩陣進(jìn)行歸一化,按式(5)、(6)進(jìn)行數(shù)據(jù)預(yù)處理,將數(shù)據(jù)處理成0~1之間的數(shù)值。
式中x為歸一化神經(jīng)網(wǎng)絡(luò)的輸入值;x,t為原始輸入值;x,min為原始輸入值的最小值;x,max為原始輸入值中的最大值;y為歸一化后神經(jīng)網(wǎng)絡(luò)的目標(biāo)值(教師值);y,t為表示原始目標(biāo)值;y,min為表示原始目標(biāo)值中的最小值;y,max為表示原始目標(biāo)值中的最大值。
注:ATU,空氣處理機(jī)組。
圖4 植物工廠內(nèi)1月19日至28日熱負(fù)荷隨時(shí)間變化曲線
3)新建一個(gè)神經(jīng)網(wǎng)絡(luò),其中隱含層神經(jīng)元數(shù)為13,隱含層傳遞函數(shù)選用sigmoid函數(shù);輸入層神經(jīng)元數(shù)為9,輸出函數(shù)選用purelin函數(shù),實(shí)現(xiàn)語(yǔ)句為
net=newff(minmax(p),[13,1],{'sigmoid','purelin'},'traingdm');
4)將輸入層和隱含層權(quán)值、閾值設(shè)置為任意值:
inputweights=rand; inputbias=rand;
layerweights=rand; layerbias=rand;
5)設(shè)置各項(xiàng)參數(shù):
net.trainparam.show=50; %(后面內(nèi)容為注釋)顯示步長(zhǎng)為50
net.trainparam.Ir=0.25; %學(xué)習(xí)速度為0.25
net.trainparam.mc=0.9; %動(dòng)量參數(shù)為0.9
net.trainparam.epochs=500 00; %最大訓(xùn)練次數(shù)為500 00
net.trainparam.goal=0.003; %訓(xùn)練目標(biāo)允許誤差為0.003
6)開始訓(xùn)練網(wǎng)絡(luò):[net,tr]=train(net,p,t); %不斷調(diào)試,減小誤差
7)用訓(xùn)練好的網(wǎng)絡(luò)進(jìn)行仿真:=sim(net,p); %仿真輸出為
8)將仿真輸出還原:=(max(T)-min(T))+min(T)
BP神經(jīng)網(wǎng)絡(luò)是否收斂的常用評(píng)價(jià)指標(biāo)包括:標(biāo)準(zhǔn)偏差()、偏差系數(shù)(coefficient of variation,CV)、期望偏差百分?jǐn)?shù)(expected error percentage,EEP),見式(7)至(9)。
利用3.2程序語(yǔ)句通過Matlab神經(jīng)網(wǎng)絡(luò)工具箱建立、訓(xùn)練及仿真,實(shí)際編程過程經(jīng)過反復(fù)調(diào)試,確定輸入、輸出層傳遞函數(shù)、神經(jīng)元數(shù)、初始允許誤差和學(xué)習(xí)率,由于初始權(quán)值和閾值隨機(jī),每次訓(xùn)練網(wǎng)絡(luò)時(shí)間不等。圖5為9個(gè)輸入樣本訓(xùn)練收斂圖像,隨著訓(xùn)練次數(shù)的增加誤差函數(shù)最終會(huì)無(wú)限趨近于一個(gè)值,此誤差值越小說明訓(xùn)練的結(jié)果越好。
通過圖5曲線可以看出,誤差函數(shù)隨著訓(xùn)練次數(shù)的增加逐漸減小,在訓(xùn)練112 28次時(shí)達(dá)到0.002 999 94,小于設(shè)定的最大允許誤差0.003。說明神經(jīng)網(wǎng)絡(luò)是收斂的,預(yù)測(cè)效果好。
圖5 9個(gè)輸入樣本訓(xùn)練收斂圖像
為了驗(yàn)證預(yù)測(cè)結(jié)果的準(zhǔn)確性,在訓(xùn)練數(shù)據(jù)集中隨機(jī)選取27日預(yù)測(cè)數(shù)據(jù)與實(shí)際熱負(fù)荷進(jìn)行比較,以確保預(yù)測(cè)結(jié)果在模型訓(xùn)練的時(shí)間范圍內(nèi)是準(zhǔn)確的,再進(jìn)一步拓展驗(yàn)證驗(yàn)證集29日預(yù)測(cè)結(jié)果的準(zhǔn)確性,從兩方面充分說明預(yù)測(cè)結(jié)果的準(zhǔn)確性。1月27日和29日的熱負(fù)荷預(yù)測(cè)值與實(shí)際值比較,結(jié)果如圖6所示,運(yùn)用BP神經(jīng)網(wǎng)絡(luò)預(yù)測(cè)熱負(fù)荷值與實(shí)際值趨勢(shì)一致,誤差基本控制在±6%以內(nèi)。由式(7)~(9)計(jì)算可知,負(fù)荷預(yù)測(cè)值與實(shí)際值的標(biāo)準(zhǔn)偏差=21.61,偏差系數(shù)CV=7.45%,期望偏差百分?jǐn)?shù)EEP=3.47%,預(yù)測(cè)效果是比較理想的。
圖6 1月27日和1月29日熱負(fù)荷實(shí)際值與預(yù)測(cè)值比較
圖3b中ATU的出水流量為0時(shí)說明空氣處理機(jī)組不運(yùn)行,植物工廠內(nèi)空氣處理機(jī)組不運(yùn)行時(shí),認(rèn)為植物工廠內(nèi)熱負(fù)荷為0。由圖6可以看出:1月27日和1月29日植物工廠熱負(fù)荷主要集中時(shí)段為0:00-6:00,17:00-24:00,而這些時(shí)段大多處于上海地區(qū)谷電價(jià)時(shí)間區(qū)間內(nèi)。植物工廠熱泵與蓄熱水箱的基本搭配原則為:在電價(jià)低谷時(shí)段熱泵機(jī)組邊儲(chǔ)熱邊向植物工廠供熱,電價(jià)高峰時(shí)段僅由蓄熱水箱供熱,電價(jià)平價(jià)階段采用熱泵和蓄熱水箱聯(lián)合供熱模式或熱泵機(jī)組邊儲(chǔ)熱邊供熱模式。具體運(yùn)行情況根據(jù)植物工廠實(shí)時(shí)的供熱能耗以及蓄熱水箱的蓄熱量決定,通常情況下,供熱期間熱泵不需要滿負(fù)荷運(yùn)行,多余的熱量存儲(chǔ)在蓄熱水箱中。由于蓄熱水量會(huì)存在熱量的損耗,通過BP神經(jīng)網(wǎng)絡(luò)對(duì)植物工廠地源熱泵供熱系統(tǒng)次日熱負(fù)荷進(jìn)行預(yù)測(cè),可以對(duì)蓄熱水箱的蓄熱時(shí)間進(jìn)行指導(dǎo),根據(jù)次日熱負(fù)荷的需求量和電價(jià)峰谷政策調(diào)控?zé)岜玫墓釙r(shí)間及輸出功率。各氣象參數(shù)是動(dòng)態(tài)變化的,本文以1 h為間隔來計(jì)算熱負(fù)荷,預(yù)測(cè)熱負(fù)荷值與實(shí)際值趨勢(shì)一致,誤差基本控制在±6%以內(nèi),如果想得到更加精確的預(yù)測(cè)結(jié)果,可以在后續(xù)的研究中進(jìn)一步縮小計(jì)算的時(shí)間間隔,實(shí)現(xiàn)更加精準(zhǔn)的調(diào)控。同時(shí)根據(jù)植物工廠所需熱負(fù)荷對(duì)供能量和供能模式進(jìn)行調(diào)整,能夠更好的維持植物工廠環(huán)境的穩(wěn)定性,提升作物的品質(zhì)和產(chǎn)量。
針對(duì)植物工廠室內(nèi)熱環(huán)境的非線性特性,提出利用神經(jīng)網(wǎng)絡(luò)BP算法預(yù)測(cè)植物工廠熱負(fù)荷;依據(jù)冬季典型運(yùn)行工況試驗(yàn)數(shù)據(jù),利用BP神經(jīng)網(wǎng)絡(luò)算法建立熱負(fù)荷預(yù)測(cè)模型,并通過使用Matlab神經(jīng)網(wǎng)絡(luò)工具箱對(duì)數(shù)據(jù)進(jìn)行訓(xùn)練,訓(xùn)練后誤差函數(shù)的值為0.002 999 94,小于設(shè)定值0.003,說明神經(jīng)網(wǎng)絡(luò)收斂;最后通過熱負(fù)荷預(yù)測(cè)值與實(shí)際值驗(yàn)證,誤差基本控制在±6%以內(nèi),證明BP神經(jīng)網(wǎng)絡(luò)預(yù)測(cè)植物工廠熱負(fù)荷的精確性,說明可以采用BP神經(jīng)網(wǎng)絡(luò)較為準(zhǔn)確地預(yù)測(cè)植物工廠次日負(fù)荷,為蓄能型地下水源熱泵供能植物工廠運(yùn)行提供節(jié)能指導(dǎo)。
根據(jù)所預(yù)測(cè)的熱負(fù)荷大小,調(diào)整運(yùn)行策略和運(yùn)行模式,盡量在谷電價(jià)時(shí)段熱泵滿負(fù)荷或者高負(fù)荷運(yùn)行,盈余的輸出熱儲(chǔ)存到蓄熱水箱中。在平電價(jià)或峰電價(jià)中減少熱泵的輸出功率,使用蓄熱水箱供能,從而降低運(yùn)行成本。本文研究表明BP神經(jīng)網(wǎng)絡(luò)算法還適合應(yīng)用于自然光植物工廠。
[1] 方慧,楊其長(zhǎng),孫驥. 地源熱泵在日光溫室中的應(yīng)用[J].西北農(nóng)業(yè)學(xué)報(bào),2010,19(4):196-200.
Fang Hui, Yang Qichang, Sun Ji. Application of ground-source heat pump in greenhouse[J]. Acta Agriculturae Boreali- occidentalis Sinica, 2010, 19(4): 196-200. (in Chinese with English abstract)
[2] Bargach M N, Dahman A S, Boukallouch M. A heating system using flat plate collectors to improve the inside greenhouse microclimate in Morocco[J]. Renewable Energy, 1999, 18(3): 367-381.
[3] Taghavifar H, Mardani A. Prognostication of energy consumption and greenhouse gas (GHG) emissions analysis of apple production in West Azarbayjan of Iran using artificial neural network[J]. Journal of Cleaner Production, 2015, 87(1): 159-167.
[4] 江億,彭琛,燕達(dá). 中國(guó)建筑節(jié)能的技術(shù)路線圖[J]. 建設(shè)科技,2012(17):12-19.
[5] Lim J H, Song J H, Song S Y. Development of operational guidelines for thermally activated building system according to heating and cooling load characteristics[J]. Applied Energy, 2014, 126(126): 123-135.
[6] González P A, Zamarre?o J M. Prediction of hourly energy consumption in buildings based on a feedback artificial neural network[J]. Energy & Buildings, 2005, 37(6): 595-601.
[7] Briana S, Gerrit H, Ronaldw M C. Artificial neural networks for automated year-round temperature prediction[J]. Computers and Electronics in Agriculture, 2009, 68(1): 52-61.
[8] 石惠嫻,任亦可,孟祥真,等. 植物工廠水蓄能型地下水源熱泵供熱系統(tǒng)節(jié)能運(yùn)行特性研究[J]. 農(nóng)業(yè)工程學(xué)報(bào),2018,34(23):157-163.
Shi Huixian, Ren Yike, Meng Xiangzhen, et al. Research on energy-saving operating characteristics of water storage groundwater source heat pump heating system in plant factory[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2018, 34(23): 157-163. (in Chinese with English abstract)
[9] 沈興來. 能源系統(tǒng)中電、氣、冷、熱負(fù)荷預(yù)測(cè)綜述[J]. 電子世界,2017(11):28-28.
[10] 張琦,謝慕君,賈其臣,等. 熱負(fù)荷預(yù)測(cè)中最有影響力參數(shù)測(cè)定[J]. 長(zhǎng)春工業(yè)大學(xué)學(xué)報(bào),2017,38(2):150-154.
Zhang Qi, Xie Mujun, Jia Qichen, et al. Heat load forecasting input variable selection[J]. Journal of Changchun University of Technology, 2017, 38(2): 150-154. (in Chinese with English abstract)
[11] Vogler-Finck P J C, Bacher P, Madsen H. Online short-term forecast of greenhouse heat load using a weather forecast service[J]. Applied Energy, 2017, 205: 1298-1310.
[12] Ahamed M S, Guo H, Tanino K. A quasi-steady state model for predicting the heating requirements of conventional greenhouses in cold regions[J]. Information Processing in Agriculture, 2017, 5(1): 33-46.
[13] 程秀花,毛罕平,伍德林,等. 玻璃溫室自然通風(fēng)熱環(huán)境時(shí)空分布數(shù)值模擬[J]. 農(nóng)業(yè)機(jī)械學(xué)報(bào),2009,40(6):179-183.
Cheng Xiuhua, Mao Hanping, Wu Delin, et al. Numerical simulation of thermal profiles in spatial and temporal field for natural ventilated glasshouse[J]. Transactions of the Chinese Society of Agricultural Machinery, 2009, 40(6): 179-183. (in Chinese with English abstract)
[14] He Fen, Ma Chengwei. Modeling greenhouse air humidity by means of artificial neural network and principal component analysis[J]. Computers and Electronics in Agriculture, 2010, 71(1): 19-23.
[15] Wang H, Sánchez-Molina J A, Li M, et al. Leaf area index estimation for a greenhouse transpiration model using external climate conditions based on genetics algorithms, back-propagation neural networks and nonlinear autoregressive exogenous models[J]. Agricultural Water Management, 2017, 183: 107-115.
[16] 陳教料,胥芳,張立彬,等. 基于CFD技術(shù)的玻璃溫室加熱環(huán)境數(shù)值模擬[J]. 農(nóng)業(yè)機(jī)械學(xué)報(bào),2008,39(8):114-118.
Chen Jiaoliao, Xu Fang, Zhang Libin, et al. CFO-based Simulation of temperature distribution in glass greenhouse with forced-air heater[J]. Transactions of the Chinese Society of Agricultural Machinery, 2008, 39(8): 114-118. (in Chinese with English abstract)
[17] Kumar R, Aggarwal R K, Sharma J D. Energy analysis of a building using artificial neural network: A review[J]. Energy & Buildings, 2013, 65(4): 352-358.
[18] Panigrahi S, Behera H S. A hybrid ETS-ANN model for time series forecasting[J]. Engineering Applications of Artificial Intelligence, 2017, 66: 49-59.
[19] Chou J S, Bui D K. Modeling heating and cooling loads by artific-ial intelligence for energy-efficient building design[J]. Energy and Buildings, 2014, 82: 437-446.
[20] Meng Anbo, Ge Jiafei, Yin Hao, et al. Wind speed forecasting based on wavelet packet decomposition and artificial neural networks trained by crisscross optimization algorithm[J]. Energy Conversion & Management, 2016, 114: 75-88.
[21] Guo Zhenhai, Wu Jie, Lu Haiyan, et al. A case study on a hybrid wind speed forecasting method using BP neural network[J]. Knowledge-Based Systems, 2011, 24(7): 1048-1056.
[22] 代愛妮,周曉光,劉相東,等. 基于BP神經(jīng)網(wǎng)絡(luò)的旁熱式輻射與對(duì)流糧食干燥過程模型[J]. 農(nóng)業(yè)機(jī)械學(xué)報(bào),2017,48(3):351-360.
Dai Aini, Zhou Xiaoguang, Liu Xiangdong, et al. Model of drying process for combined side-heat infrared radiation and convection grain dryer based on BP neural network[J]. Transactions of the Chinese Society of Agricultural Machinery, 2017, 48(3): 351-360. (in Chinese with English abstract)
[23] Wang Lan, Lee E W M, Yuen R K K. Novel dynamic forecasting model for building cooling loads combining an artificial neural network and an ensemble approach[J]. Applied Energy, 2018, 228: 1740-1753.
[24] Ahmad T, Chen Huanxin. Short and medium-term forecasting of cooling and heating load demand in building environment with data-mining based approaches[J]. Energy & Buildings, 2018, 166: 460-476.
[25] Castaeda-Miranda A, Castao V M. Smart frost control in greenhouses by neural networks models[J]. Computers & Electronics in Agriculture, 2017, 137: 102-114.
[26] Taki M, Ajabshirchi Y, Ranjbar S F, et al. Heat transfer and MLP neural network models to predict inside environment variables and energy lost in a semi-solar greenhouse[J]. Energy & Buildings, 2016, 110: 314-329.
[27] 張經(jīng)博,郭凌,王朝霞,等. 基于遺傳算法優(yōu)化BP神經(jīng)網(wǎng)絡(luò)的供暖系統(tǒng)熱負(fù)荷預(yù)測(cè)模型[J]. 兵器裝備工程學(xué)報(bào),2014,35(4):152-156.
Zhang Jingbo, Guo Ling, Wang Chaoxia, et al. Thermal load forecasting model of heating system based on genetic algorithm optimization BP neural network[J]. Journal of Ordnance Equipment Engineering, 2014, 35(4): 152-156. (in Chinese with English abstract)
[28] 陳曉冉. 水蓄冷空調(diào)系統(tǒng)負(fù)荷預(yù)測(cè)方法的研究[D].天津:天津大學(xué),2009.
Chen Xiaoran. Research of Cooling Load Prediction Method in Water Storage Air Conditioning System[D]. Tianjin: Tianjin University, 2009. (in Chinese with English abstract)
[29] Xie Ling. The heat load prediction model based on BP neural network-markov model[J]. Procedia Computer Science, 2017, 107: 296-300.
[30] 孫敬. 基于遺傳神經(jīng)網(wǎng)絡(luò)的空調(diào)房間送風(fēng)量預(yù)測(cè)研究[D].南京:南京工業(yè)大學(xué),2006.
Sun Jing. Study on Air Supply Volume Prediction of Air-Condition Room based on GA-ANN[D]. Nanjing: Nanjing University of Technology, 2006. (in Chinese with English abstract)
[31] Ren Guanghua, Cao Yuting, Wen Shiping, et al. A modified elman neural network with a new learning rate scheme[J]. Neurocomputing, 2018, 286:11-18.
[32] Takase T, Oyama S, Kurihara M. Effective neural network training with adaptive learning rate based on training loss[J]. Neural Networks, 2018, DOI: 10.1016/j.neunet.2018.01.016.
[33] 田野. 基于動(dòng)量因子的神經(jīng)網(wǎng)絡(luò)群電流負(fù)荷預(yù)測(cè)模型[J]. 電力系統(tǒng)保護(hù)與控制,2016,44(17):31-38.
Tian Ye. A forecasting model for current load of neural network group based upon momentum factor[J]. Power System Protection and Control, 2016, 44(17): 31-38. (in Chinese with English abstract)
Prediction and verification on heating load of ground source heat pump heating system based on BP neural network for plant factory
Shi Huixian,Meng Xiangzhen, You Yucheng, Zhang Zhonghua, Ouyang Sanchuan, Ren Yike
(,,200092,)
It is important for crop growth to maintain suitable temperature in plant factory, however large heating energy consumption has been proved to be an obstacle that restricts its development. In Europe, the cost of heating accounts for about 30% of the total operation cost during the winter, but in the north of latitude 43° of China, the proportion reaches 60% to 70%. The traditional heating equipment such as coal-fired boilers has an energy utilization rate of only 40% to 50%. So it is very necessary to apply renewable energy to plant factory. Regulating heating modes by tracking and predicting the heating load changes in plant factory is the key to achieve energy saving. Because of the high energy consumption in winter, accurate heating load prediction can improve the energy saving effect of groundwater source heat pump with water energy storage. Changes of heating load in natural light plant factory are dynamic, time-varying, highly turbulent and uncertain. Artificial neural networks is ideal for predicting load changes, especially BP (back propagation) neural network has strong nonlinear mapping ability, which is generally used by many scholars for building heating load prediction, but rarely in plant factory. Given that heating load of both plant factory and building have nonlinear characteristics, we used BP neural network to predict the next day's heating load of plant factory to promote energy-saving control optimization. The BP neural network model has three levels: input layer, hidden layer and output layer. Input parameters include indoor and outdoor air temperature, solar radiation intensity, indoor relative humidity, indoor absolute humidity, indoor wind speed, etc. For plant factory, the next day's weather condition has a significant impact on the heating load. The output variable is determined as the next day's hourly glass greenhouse load value. The number of neurons in the input layer was 9, the number of neurons in the hidden layer was 13, the selected layer number of hidden layers was 1, the learning rate was 0.25 to 0.30, and the initial momentum factor was 0.9. Common evaluation indicators used to determine whether the neural network converges, included standard deviation, coefficient of variation, and expected error percentage. After algorithm steps being determined, the next day's heating load was predicted based on reasonable algorithmic procedures and steps. Experimental data in the paper was obtained from a natural light plant factory powered by groundwater source heat pump with water energy storage system in Chongming National Facility Agricultural Engineering Technology Research Center. Using the neural network toolbox of Matlab to train and simulate the model to process the experimental data from January 19th to 28th, the value of the error function was 0.002 999 94 which was less than the set value of 0.003, so the neural network was convergent. Prediction effect can be drawn by comparison between the actual surveyed value and the predicted value of the heating load. The main heating load was concentrated on 0:00-6:00 and 17:00-24:00 o’clock in the plant factory, and most of these periods were in the cheap electricity price period of Shanghai. Adjusting the operating strategy and operating mode of the energy supply system were based on the predicted heating load,the heat pump operated at full load or high load during the period of cheap electricity prices, and excess heat was stored in the hot storage tank. The hot storage tank provided heat to plant factory during the period of moderate and expensive electricity price. In this case, the energy cost would be reduced. Therefore, it was significantly economical to control start-stop time of the groundwater source heat pump with water energy storage for plant factory heating project. The error was controlled within ±6% basically between the actual value and the predicted value of the heating loads. Therefore, the results showed that the BP neural network was suitable for the next day's heating load prediction of plant factory.
thermal energy; neural networks; algorithms; heating load prediction; plant factory; water energy storage; ground source heat pump
10.11975/j.issn.1002-6819.2019.02.025
S215; TK124
A
1002-6819(2019)-02-0196-07
2018-08-11
2018-11-09
國(guó)家高技術(shù)研究發(fā)展計(jì)劃(863計(jì)劃)資助項(xiàng)目(2013AA103006-02)
石惠嫻,副教授,博士,主要從事可再生能源應(yīng)用于農(nóng)業(yè)設(shè)施領(lǐng)域理論和實(shí)踐研究。Email:huixian_shi@#edu.cn
石惠嫻,孟祥真,游煜成,張中華,歐陽(yáng)三川,任亦可. 植物工廠地源熱泵系統(tǒng)熱負(fù)荷BP神經(jīng)網(wǎng)絡(luò)預(yù)測(cè)及驗(yàn)證[J]. 農(nóng)業(yè)工程學(xué)報(bào),2019,35(2):196-202. doi:10.11975/j.issn.1002-6819.2019.02.025 http://www.tcsae.org
Shi Huixian, Meng Xiangzhen, You Yucheng, Zhang Zhonghua, Ouyang Sanchuan, Ren Yike. Prediction and verification on heating load of ground source heat pump heating system based on BP neural network for plant factory[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2019, 35(2): 196-202. (in Chinese with English abstract) doi:10.11975/j.issn.1002-6819.2019.02.025 http://www.tcsae.org