Greenhouse energy consumption prediction method based on multi-source data fusion
By adopting a multi-source data fusion method in greenhouse energy consumption prediction and using a variety of machine learning algorithms to integrate crop data, environmental data and equipment energy consumption data, the problem of prediction limitations caused by relying on a single data source in the existing technology is solved. Accurate prediction and optimization of greenhouse energy consumption are achieved.
Patent Information
- Application Number
- CN202411397306.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2025-01-24
AI Technical Summary
The prior art relies on a single type of data in greenhouse energy consumption prediction, resulting in limited prediction effects and inability to effectively meet the needs in the actual production environment.
Using a method based on multi-source data fusion, crop data, environmental data and energy consumption data of major internal equipment are effectively integrated through a variety of machine learning algorithms to achieve energy consumption prediction under glass greenhouse conditions.
Through the method of multi -source data fusion, accurate predictions of the total energy consumption of greenhouses are realized, the accuracy and reliability of the prediction is improved, the direction of optimization is provided, and it will help reduce operating costs and improve energy utilization efficiency.
Smart Images

Figure BDA0005074158720000041 
Figure BDA0005074158720000051 
Figure BDA0005074158720000061
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of energy consumption prediction of large-scale glass multi-span greenhouses, and in particular relates to a greenhouse energy consumption prediction method based on multi-source data fusion. Background Art
[0002] As the global population grows and climate change intensifies, agricultural production faces unprecedented challenges [1] As an important part of modern agriculture, multi-span glass greenhouses can provide a stable growth environment and significantly improve the yield and quality of crops. From 2014 to 2022, the area of newly built multi-span glass greenhouses in my country reached 2607.01ha. [2] .However, [3] The high energy consumption of multi-span glass greenhouses has become a major obstacle to their widespread application. [4] Greenhouses are one of the most energy-intensive sectors in the agricultural industry. Therefore, how to efficiently predict and manage greenhouse operating energy consumption, optimize energy use strategies, and reduce operating costs has become a hot topic and difficulty in current research.
[0003] Data-driven methods are widely used in energy consumption forecasting. [5 - 11] The study found that for existing buildings with historical time series energy data, statistical and machine learning techniques have been proven to be more efficient, accurate and faster in building energy consumption prediction models.
[12] A comparative analysis is conducted using monthly electricity energy consumption time series data from different countries combined with Bootstrap aggregation and forecasting methods. The proposed method significantly improves the accuracy of energy end-use service demand forecasting in developed and developing countries.
[13] Three ARIMA-ANFIS model modes were used to predict Iran's annual energy consumption. The hybrid model improved the accuracy of single ARIMA and ANFIS models in predicting energy consumption, and the mean square error of the model was reduced from 0.058% to 0.026%.
[14] Prediction models were developed using weighted SVR models, including ν-SVR and ε-SVR. The proposed model can be used to predict half-hourly and daily electricity consumption time series data of the same building, with a mean absolute percentage error (MAPE) of 5.843 for daily energy consumption data and 3.767 for half-hourly energy consumption data.
[15] The long short-term memory network and the improved sine-cosine optimization algorithm are combined for building energy consumption prediction. The proposed model outperforms the existing energy consumption prediction models in terms of mean absolute error, mean absolute percentage error, mean square error, root mean square error and Theil statistics.
[16] Combining k-means, CNN and LSTM, a deep learning framework kCNN-LSTM is proposed, which can learn the spatiotemporal dependencies in energy consumption data and provide accurate energy consumption prediction.
[17] Unsupervised data clustering and frequent pattern mining analysis on energy time series, as well as Bayesian network prediction for energy usage forecasting, are proposed, with short-term (hourly) energy consumption prediction accuracy of 81.89%, and long-term prediction accuracy of 75.88%, 79.23%, 74.74% and 72.81%, corresponding to days, weeks, months and seasons, respectively.
[18] A variety of machine learning techniques are used to predict the annual energy consumption of residential buildings. The comparison shows that DNN is the most effective prediction model for energy consumption prediction in the early design stage. The annual average energy consumption is predicted by inputting the key features of the building design.
[19] A comprehensive comparison between three commonly used deep reinforcement learning (DRL) techniques to predict the energy consumption of an office building and common supervised models shows an improvement of 16%-24% in the mean absolute error (MAE) in single-step prediction and 19%-32% in multi-step prediction.
[20] A CNN-LSTM neural network is proposed, which is able to extract spatial and temporal features and achieves the minimum root mean square error compared with conventional prediction methods on an individual household electricity consumption dataset.
[0004] There are few studies on the prediction of greenhouse total operating energy consumption using data-driven methods. There are many factors that affect the total operating energy consumption of a greenhouse, and researchers are more likely to conduct energy-saving optimization research on a single influencing factor. [4] In order to promote crop growth, key indoor environmental parameters such as carbon dioxide, humidity, lighting and temperature need to be maintained. Therefore, the total energy consumption of greenhouse operation is affected by the mechanical system, indoor environment, crop growth and evapotranspiration.
[21] proposed a new greenhouse heating control method using computational fluid dynamics (CFD) and energy prediction model (EPM) to save energy and improve system performance.
[22] A time-varying quasi-steady-state thermal model based on the centralized estimation method of greenhouse heat transfer parameters was developed. The model predicts hourly heating demand based on the input of greenhouse indoor environmental control parameters, physical and thermal properties of crops and building materials, and hourly meteorological data including temperature, relative humidity, wind speed and cloud cover.
[23] A greenhouse energy consumption predictor using a multi-layer perceptron (MLP) was proposed, in which temperature, relative humidity, time, and energy consumption were used as inputs of the predictor and the output was energy consumption. The predictor provided better energy consumption estimates at a significance level of 95%.
[0005] At present, greenhouse control strategies have achieved good results. Energy consumption prediction is the most important part of the control strategy. However, most current methods rely on a single type of data to predict greenhouse energy consumption in a greenhouse environment, such as outdoor meteorological conditions, crop growth status, indoor meteorological conditions, and some equipment operating status parameters. However, the prediction method that only uses a single type of data has extremely strong limitations. For example, the energy consumption prediction model that only uses outdoor meteorological data can only contribute to the control strategy by adjusting the crop planting time. Therefore, the energy consumption prediction model using a single source data cannot effectively meet the needs of greenhouse energy consumption prediction in actual production environments. Summary of the invention
[0006] In view of the problems existing in the above-mentioned prior art, the purpose of the present invention is to provide a greenhouse energy consumption prediction method based on multi-source data fusion. The method realizes the effective fusion of crop data, environmental data and internal main equipment energy consumption data through a variety of machine learning algorithms, and finally realizes accurate prediction of energy under glass greenhouse conditions.
[0007] The technical solution adopted to achieve the above-mentioned invention object is: a greenhouse energy consumption prediction method based on multi-source data fusion, comprising the following steps:
[0008] 1) Data collection
[0009] The collected data includes multi-dimensional data such as total greenhouse energy consumption, energy consumption by item, indoor and outdoor environmental parameters and crop growth information;
[0010] 2) Feature Engineering
[0011] Feature engineering is to generate features that better represent the essence of data by processing and transforming raw data. Through the following feature engineering steps, a set of highly representative and predictive feature sets was successfully constructed and extracted, which improved the training efficiency of the model and provided a solid foundation for model training and optimization.
[0012] 2.1) Temporal feature extraction
[0013] Time features can capture periodic changes in data. The specific method includes extracting hour, date and month information from the timestamp and performing sine and cosine transformation on this information to avoid the problems caused by high-dimensional features. Extract the hour feature and convert it into sine and cosine form, as shown in equations (1) and (2):
[0014]
[0015]
[0016] Where H is hour characteristic
[0017] Hsin ——Hourly characteristic after sine conversion
[0018] H cos - cosine-transformed hour characteristic;
[0019] 2.2) Hysteresis feature construction
[0020] The lag feature is used to capture the dependency in the time series. By constructing the 1-hour to 24-hour lag feature of the total energy consumption data, the impact of historical data on the current prediction can be better reflected. The lag feature of h hours is constructed as shown in formula (3):
[0021] E lag_h =E (t-h) (3)
[0022] Where E is the total energy consumption of the tomato area.
[0023] E lag_h ——The total energy consumption value with a lag of h hours at time t
[0024] t——current time
[0025] h——lag time, the value range is 1 to 24 hours;
[0026] 2.3) Rolling statistical features
[0027] The rolling statistical characteristics can reflect the changing trend and fluctuation of the data. By calculating the 24-hour rolling average, standard deviation, maximum and minimum values of the total energy consumption data, the short-term changing characteristics of the total energy consumption can be captured. The calculation method of the 24-hour rolling average and standard deviation of the total energy consumption is shown in formula (4) and formula (5):
[0028]
[0029] Where E rollingmean 24h ——24-hour rolling average of total energy consumption
[0030] E rollingstd 24h ——24-hour rolling standard deviation of total energy consumption;
[0031] 2.4) Cross-feature generation
[0032] Cross-features generate new features by combining different features, providing more information and revealing the interactions between environmental variables. Specifically, the method shown in formula (6) is used to combine the features of different variables, expressed as:
[0033] C A,B =A×B (6)
[0034] In the formula
[0035] C A,B ——The cross eigenvalue of feature A and feature B
[0036] A——the value of feature A
[0037] B——the value of feature B
[0038] Among them, the five characteristics of temperature, humidity, light, wind speed and total energy consumption are multiplied and crossed in pairs to form new cross characteristics; the four characteristics of plant height, stem thickness, leaf length and leaf number are also combined in pairs in this way to form cross characteristics;
[0039] 2.5) Other feature combinations
[0040] By calculating the temperature difference, humidity difference, and new features such as the square and logarithm of temperature and humidity, we can capture the complex environmental parameter change patterns and relationships. The indoor and outdoor temperature difference is shown in formula (7):
[0041] ΔT=T inside_1 -T outside (7)
[0042] Since there are only two climate chambers in the north and south of the greenhouse, the average temperature and humidity in the room are calculated as shown in equations (8) and (9):
[0043] T average =(T inside_1 +T inside_2 ) / 2(8)
[0044] HD average =(HD inside_1 +HD inside_2 ) / 2 (9)
[0045] Where ΔT is the temperature difference between indoor and outdoor
[0046] T inside_1 ——North temperature in greenhouse
[0047] T inside_2 ——South temperature in greenhouse
[0048] T outside ——Outdoor temperature of greenhouse
[0049] T average ——Average temperature in greenhouse
[0050] HD inside_1 ——Indoor North humidity
[0051] HD inside_2 ——Indoor indoor south humidity
[0052] HD average - Outdoor humidity of the greenhouse;
[0053] 2.6) Outlier processing
[0054] In order to ensure the stability and reliability of the data, DBSCAN and IQR methods are used to detect and process outliers. DBSCAN is a density-based clustering method that can effectively identify and eliminate outliers. The IQR method detects outliers by calculating the interquartile range, as shown in formulas (10) and (11):
[0055] Q lower =Q1-1.5×(Q3-Q1) (10)
[0056] Q upper =Q3+1.5×(Q3-Q1) (11)
[0057] Where Q1 is the first quartile
[0058] Q3——The third quartile
[0059] Q lower ——Data lower limit
[0060] Q upper Data caps
[0061] will be lower than Q lower and higher than Q upper The data points are considered as outliers;
[0062] 2.7) Feature Selection
[0063] In the exploration of improving the prediction accuracy and computational efficiency of the model, the LassoCV method was used for feature selection. By introducing L1 regularization, it realizes the automatic screening and elimination of feature items with low contribution to the model, so as to identify key features that have a significant impact on the target variable.
[0064] 3) Algorithm selection and optimization
[0065] 3.1) Algorithm selection and model structure
[0066] Greenhouse energy consumption data is continuous time series data with obvious periodicity and trend. Gated Recurrent Unit, Long Short-Term Memory and Transformer algorithms are selected to solve the gradient vanishing and gradient explosion problems in traditional recurrent neural networks; Transformer algorithm is selected to process long sequence data; Gradient Boosting Regressor, Random Forest Regressor and Support Vector Regressor are selected to process greenhouse energy consumption, equipment energy consumption and crop growth multi-dimensional data; K-Nearest Neighbors Regressor algorithm is selected to predict the voting mechanism of neighboring samples to reveal local patterns and structures in greenhouse energy consumption data; Multi-Layer Perceptron Regressor is selected to capture complex patterns in the data;
[0067] 3.2) Model training and parameter optimization
[0068] During the model training and hyperparameter optimization process, the data was further processed as shown in the following table:
[0069]
[0070] 3.3) Model Evaluation
[0071] To further evaluate the prediction performance of each model, the main steps are as follows:
[0072]
[0073] 4) Model interpretation
[0074] The SHAP value method was used to analyze and explain the interpretability of the model with the best prediction performance, and the features that have the greatest impact on energy consumption were extracted for reference by greenhouse operators.
[0075] The crop growth information includes the number of leaves, leaf length, number of complete ears, growth amount and stem.
[0076] The indoor and outdoor environmental parameters include indoor and outdoor temperature, humidity, light, and carbon dioxide concentration.
[0077] The method of the present invention uses a data-driven approach to predict the overall operating energy consumption of the greenhouse, comprehensively considers various factors that affect the overall operation, and collects the greenhouse's environmental data, crop growth information, sub-item operating energy consumption, and total operating energy consumption. Five traditional machine learning algorithms and three deep learning algorithms are used. After finding the optimal hyperparameter combination, the various features that rank high in terms of total operating energy consumption selected after feature engineering are used as input to perform a single-step prediction of the greenhouse's total operating energy consumption. The total operating energy consumption of the multi-span glass greenhouse was deeply analyzed and predicted using a data-driven approach. The study found that the Random Forest Regressor model, combined with sophisticated feature engineering and hyperparameter optimization, can predict the total operating energy consumption of the greenhouse with high accuracy. The R of this model 2 The value is as high as 0.9403, which shows its effectiveness in capturing the dynamic changes of energy consumption. Through SHAP value analysis, the key factors affecting energy consumption prediction are revealed, providing a clear optimization direction for greenhouse energy saving.
[0078] The method of the present invention successfully applies data-driven methods to accurately predict the total operating energy consumption of multi-span glass greenhouses through carefully designed feature engineering and hyperparameter optimization. It fills the application gap of data-driven methods in the field of greenhouse total operating energy consumption prediction, reveals the key factors affecting the total operating energy consumption prediction, provides a clear optimization direction for greenhouse energy saving, helps to reduce operating costs and improve energy efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0079] Figure 1 It is a logical schematic diagram of a greenhouse energy consumption prediction method based on multi-source data fusion;
[0080] Figure 2 This is a schematic diagram of the internal structure of the greenhouse;
[0081] Figure 3 This is the annual trend chart of temperature, solar radiation intensity and wind speed in the outdoor environment of the greenhouse;
[0082] Figure 4 It is the annual trend chart of relative humidity, humidity deficit, carbon dioxide concentration and temperature in the indoor environment of the greenhouse;
[0083] Figure 5 The relationship between the total greenhouse operating energy consumption and the outdoor temperature and its annual trend chart;
[0084] Figure 6 The relationship between the total greenhouse operating energy consumption and the outdoor solar radiation intensity and its annual variation trend chart;
[0085] Figure 7 The relationship between the total greenhouse operating energy consumption and the outdoor wind speed and its annual trend chart;
[0086] Figure 8 It is the energy consumption trend chart of greenhouse disinfection and sterilization and circulation fan equipment;
[0087] Fig. 9 The SHAP heat map shows the distribution of SHAP values of each feature in different samples;
[0088] Fig.10 is the SHAP decision diagram;
[0089] Fig.11 It is a SHAP scatter plot. DETAILED DESCRIPTION
[0090] The prediction method of the present invention is further described in detail below through specific examples.
[0091] Example 1
[0092] The greenhouse in this case test is located in Yangling District, Xianyang City, Shaanxi Province, which belongs to the temperate continental monsoon climate with obvious four seasons. The annual average temperature of the greenhouse environment is 12.9℃, the high temperature in summer can reach 35℃, and the low temperature in winter can drop to about -10℃. The average annual rainfall is 835 mm, mainly concentrated in July and August. The wind direction is mainly northeasterly, with an annual average wind speed of 2.1 m / s. The annual sunshine hours reach 2163.8 hours, with longer sunshine in spring and shorter sunshine in autumn. The frost-free period lasts from mid-March to mid-April, while the frost period is concentrated in October to November. Humidity and air pressure vary with the seasons, with higher humidity in summer and lower humidity in winter. The annual average humidity is 68% and the annual average air pressure is 986.6 hPa.
[0093] The greenhouse structure is a double-ridged roof covered with glass, and is divided into the east and west areas. The west area is used to grow tomato varieties such as saopolo. Figure 2 As shown in the figure, the Dutch hanging soilless cultivation mode is adopted. Planting is carried out around July 20 every year. A single cultivation trough can hold 59 cultivation bags, and 3 double-headed seedlings are planted in each cultivation bag. The planting density is 4.3 heads / m 2 , reduced to 2.8 heads / m on August 30 2 , and then adjust the side branches according to the light in the later stage. The growth cycle is 44 weeks, the harvest cycle is 33 weeks, the average weekly harvest is 0.48kg / ㎡, and the total harvest is 6.12 tons; the cumulative output is 16kg / ㎡, and the total harvest is 204 tons. During this period, workers measure the growth of crops every week to guide the environmental control strategy. After each planting cycle, they carry out cleaning, maintenance and disinfection to prepare for the next cycle.
[0094] The greenhouse is equipped with an advanced environmental control system that can monitor and automatically adjust key environmental parameters such as temperature, humidity, light intensity and carbon dioxide concentration in the greenhouse in real time to ensure that crops are in the best growth state. The planting area is 145m long and 88m wide. The main internal equipment includes skylights, circulation fans, hot and cold air units, insulation motors, high-pressure sodium lamps, etc.
[0095] According to 2021 data, the total operating cost of the greenhouse is 4,955,916.96 yuan, of which energy consumption costs account for 56.49% of the total cost, reaching 2,800,000 yuan. Energy saving in greenhouse operations will occupy an important position in future development.
[0096] 1. Data Collection
[0097] Figure 1 The present invention is a logic schematic diagram of a greenhouse energy consumption prediction method based on multi-source data fusion. In order to comprehensively evaluate the total energy consumption of the greenhouse and build a prediction model, the present invention collects multi-dimensional data including the total energy consumption of the greenhouse, the energy consumption of each item, the indoor and outdoor environmental parameters, and the crop growth information. Data collection involves various precision measurement devices and is recorded according to a specific time step.
[0098] The key points of crop growth information collection include key indicators such as leaf number, leaf length, number of complete fruit clusters, growth amount, and stem thickness. In the tomato planting area, the area is divided into two parts: the south area and the north area. When performing growth monitoring, 10 tomato plants are randomly selected from the south and north areas for measurement, and this measurement is performed once a week. Therefore, a single measurement can collect detailed growth information of 20 tomatoes. The relevant growth information is shown in Table 1.
[0099] Table 1 Crop growth information
[0100] Crop growth information unit Data Source Number of blades piece Manual Recording Leaf length cm Manual Recording Complete bunch number indivual Manual Recording Growth cm Manual Recording Stem thickness mm Manual Recording
[0101] According to the different collection requirements of total energy consumption and itemized energy consumption, the equipment for collecting power data is shown in Table 2:
[0102] Table 2 Two types of electric meters
[0103]
[0104] The main electrical equipment inside the glass greenhouse was measured. The main measuring equipment and the number of meters used are shown in Table 3:
[0105] Table 3 Electricity meter configuration
[0106] Equipment Type Number of electric meters Transformer ratio Electricity meter type Hot and cold air unit 2 250:5 AIMDB-006 led 4 250:5 AIMDB-006 High pressure sodium lamp_1 set 8 250:5 AIMDB-006 High pressure sodium lamp_2 sets 4 400:5 AIMDB-006 Side insulation equipment 2 AIMDB-005 Internal circulation fan set 2 AIMDB-005 Roof window motor 2 AIMDB-005 Side insulation equipment 2 AIMDB-005 Internal shading and heat preservation motor 2 AIMDB-005 Liquid return pool 1 AIMDB-005
[0107] The indoor and outdoor environmental data provided by the greenhouse environmental control system are shown in Table 4:
[0108] Table 4 Indoor and outdoor environmental parameters
[0109] Environmental parameters unit Data Source temperature ℃ Greenhouse comes with environmental control system record Relative humidity % Greenhouse comes with environmental control system record Humidity loss <![CDATA[g / m 3 ]]> Greenhouse comes with environmental control system record Outdoor radiation intensity W / m2 Greenhouse comes with environmental control system record Carbon dioxide concentration ppm Greenhouse comes with environmental control system record Wind speed m / s Greenhouse comes with environmental control system record
[0110] In the present invention, the total greenhouse energy consumption data, itemized energy consumption data, crop growth data, and indoor and outdoor environmental data for 2023 are systematically collected. The recording frequency of energy consumption data and indoor and outdoor environmental data is set to once an hour, while the monitoring data of tomato crop growth is recorded once a week.
[0111] 2. Feature Engineering
[0112] Feature engineering is a crucial part of data preprocessing. Its purpose is to generate features that better represent the essence of data by processing and transforming raw data.
[24] Through the following feature engineering steps, a set of highly representative and predictive feature sets was successfully constructed and extracted, which improved the training efficiency of the model and provided a solid foundation for model training and optimization.
[0113] 2.1 Temporal feature extraction
[0114] Time features can capture periodic changes in data. The specific method includes extracting hour, date, and month information from the timestamp and performing sine and cosine transformation on this information to avoid the problems caused by high-dimensional features. The hour feature is extracted and converted into sine and cosine form, as shown in equations (1) and (2).
[0115]
[0116] Where H is hour characteristic
[0117] H sin ——Hourly characteristic after sine conversion
[0118] H cos - cosine-transformed hour characteristic;
[0119] 2.2 Hysteresis feature construction
[0120] Lag features are used to capture dependencies in time series
[25] By constructing the 1-hour to 24-hour lag features of the total energy consumption data, the impact of historical data on the current prediction can be better reflected. The h-hour lag features are constructed as shown in formula (3):
[0121] E lag_h =E (t-h) (3)
[0122] Where E is the total energy consumption of the tomato area.
[0123] E lag_h ——The total energy consumption value with a lag of h hours at time t
[0124] t——current time
[0125] h——lag time, the value range is 1 to 24 hours;
[0126] 2.3 Rolling Statistical Features
[0127] The rolling statistical characteristics can reflect the changing trend and fluctuation of the data. By calculating the 24-hour rolling average, standard deviation, maximum and minimum values of the total energy consumption data, the short-term change characteristics of the total energy consumption can be captured. The calculation method of the 24-hour rolling average and standard deviation of the total energy consumption is shown in formula (4) and formula (5):
[0128]
[0129] Where E rolling mean 24h ——24-hour rolling average of total energy consumption
[0130] E rolling std 24h ——24-hour rolling standard deviation of total energy consumption;
[0131] 2.4 Cross-feature generation
[0132] Cross-features generate new features by combining different features, providing more information and revealing the interactions between environmental variables. Specifically, the method shown in formula (6) is used to combine the features of different variables, expressed as:
[0133] C A,B =A×B (6)
[0134] Where C A,B ——The cross eigenvalue of feature A and feature B
[0135] A——the value of feature A
[0136] B——the value of feature B
[0137] Among them, the five characteristics of temperature, humidity, light, wind speed and total energy consumption are cross-multiplied in pairs to form new cross-features; the four characteristics of plant height, stem thickness, leaf length and number of leaves are also combined in pairs in this way to form cross-features.
[0138] 2.5 Other feature combinations
[0139] By calculating the temperature difference, humidity difference, and new features such as the square and logarithm of temperature and humidity, we can capture the complex environmental parameter change patterns and relationships. The indoor and outdoor temperature difference is shown in formula (7):
[0140] ΔT=T inside_1 -T outside (7)
[0141] Since there are only two climate chambers in the north and south of the greenhouse, the average temperature and humidity in the room are calculated as shown in equations (8) and (9):
[0142] T average =(T inside_1 +T inside_2 ) / 2 (8)
[0143] HD average =(HD inside_1 +HD inside_2 ) / 2 (9)
[0144] Where ΔT is the temperature difference between indoor and outdoor
[0145] T inside_1 ——North temperature in greenhouse
[0146] T inside_2 ——South temperature in greenhouse
[0147] T outside ——Outdoor temperature of greenhouse
[0148] T average ——Average temperature in greenhouse
[0149] HD inside_1 ——Indoor North humidity
[0150] HD inside_2 ——Indoor indoor south humidity
[0151] HD average - Outdoor humidity of the greenhouse;
[0152] 2.6 Outlier Processing
[0153] In order to ensure the stability and reliability of the data, DBSCAN and IQR methods are used to detect and process outliers. DBSCAN is a density-based clustering method that can effectively identify and eliminate outliers; the IQR method detects outliers by calculating the interquartile range, as shown in equations (10) and (11):
[0154] Q lower =Q1-1.5×(Q3-Q1) (10)
[0155] Qupper =Q3+1.5×(Q3-Q1) (11)
[0156] Where Q1 is the first quartile
[0157] Q3——The third quartile
[0158] Q lower ——Data lower limit
[0159] Q upper Data caps
[0160] will be lower than Q lower and higher than Q upper The data points are considered as outliers.
[0161] 2.7 Feature Selection
[0162] In the exploration of improving the prediction accuracy and computational efficiency of the model, the LassoCV method was used for feature selection. By introducing L1 regularization, it realizes the automatic screening and elimination of feature items with low contribution to the model, so as to identify key features that have a significant impact on the target variable.
[26] .
[0163] 3. Model construction and optimization
[0164] 3.1 Algorithm Selection and Model Structure
[0165] Greenhouse energy consumption data is continuous time series data with obvious periodicity and trend. To process these features, Gated Recurrent Unit (GRU), Long Short-Term Memory (LSTM) and Transformer algorithms were selected. GRU and LSTM are variants of recurrent neural networks that can capture long-term dependencies and solve the gradient vanishing and gradient exploding problems in traditional recurrent neural networks. The Transformer model is based on the self-attention mechanism and can process long sequence data in parallel, improving prediction efficiency and accuracy, and is suitable for complex greenhouse energy consumption data.
[0166] Greenhouse energy consumption data includes environmental parameters, equipment energy consumption data, and crop growth data, which are rich in dimensions and complex. To process multi-dimensional data, Gradient Boosting Regressor (GBR), Random Forest Regressor (RF), and Support Vector Regressor (SVR) were selected. GBR and RF, as ensemble learning methods based on decision trees, can efficiently process high-dimensional and nonlinear data. GBR improves the prediction ability of the model through additive models and step-by-step optimization, while RF reduces the risk of overfitting by integrating multiple decision trees and demonstrates strong generalization ability. SVR finds the optimal regression plane in high-dimensional space and uses kernel functions to handle nonlinear problems. It is insensitive to outliers and is suitable for processing high-dimensional data with noise.
[0167] The energy consumption values at similar time points in greenhouse energy consumption data are highly similar. To capture this local similarity feature, the K-NearestNeighbors Regressor (KNN) algorithm was selected. KNN makes predictions through the voting mechanism of neighboring samples, which can intuitively reflect the changes in local data and is suitable for revealing local patterns and structures in greenhouse energy consumption data.
[0168] There are complex nonlinear relationships between the variables in greenhouse energy consumption data. To handle these nonlinear features, Multi-Layer Perceptron Regressor (MLP) was selected. MLP is a feedforward neural network that can fit complex nonlinear functional relationships through the combination of multiple layers of neurons. It is good at capturing complex patterns in data and improving the accuracy of predictions.
[0169] Therefore, in the present invention, five traditional machine learning algorithms and three deep learning algorithms are used to construct a greenhouse total operating energy consumption prediction model to predict the total operating energy consumption after 1 hour.
[0170] 3.2 Model training and parameter optimization
[0171] During the model training and hyperparameter optimization process, the present invention further processes the data, as shown in the following table:
[0172]
[0173] 3.3 Model Evaluation and Interpretation
[0174] To further evaluate the prediction performance of each model, the main steps are as follows:
[0175]
[0176] 4 Results
[0177] 4.1 Data Description
[0178] To facilitate feature engineering, various characteristic data of the greenhouse in one year were visualized and analyzed. Figure 3 The blue line represents the daily average, the orange line represents the daily maximum, and the green line represents the daily minimum. Figure 4 The annual variation trends of temperature, solar radiation intensity and wind speed in the greenhouse outdoor environment are shown respectively. Figure 5 The annual trends of relative humidity, humidity deficit, carbon dioxide concentration, and temperature in the greenhouse indoor environment are shown respectively. Figure 6 The relationship between the total operating energy consumption of the greenhouse and the three outdoor environments and their annual changing trends are shown respectively.
[0179] 4.1.1 Greenhouse outdoor environment
[0180] The annual changes in the outdoor environment of the greenhouse have the following characteristics: the temperature shows significant seasonal fluctuations, with the lowest temperature in winter being about -10℃ and the highest temperature in summer being 35℃. The average temperature is about 25℃ in summer and about 0℃ in winter. The solar radiation intensity fluctuates greatly, with the highest temperature reaching 500W / m 2 The wind speed is relatively stable but fluctuates. At some times, the wind speed increases significantly, reaching a maximum of more than 2m / s, and most of the time it is in the 0-2m / s wind speed range. These changes have an important impact on greenhouse climate control and crop growth.
[0181] 4.1.2 Greenhouse Indoor Environment
[0182] The annual changes in the indoor environment of the greenhouse have the following characteristics: relative humidity fluctuates seasonally, with a maximum of 100% in summer and a minimum of about 40% in winter, and an average humidity of between 70% and 80%; humidity loss is higher in summer, up to 12g / m 3 , lower in winter, with an average value of 4-8g / m 3 The carbon dioxide concentration is higher in winter, up to 300ppm, and significantly lower in summer, with an average value between 100-200ppm; the temperature can reach up to 35℃ in summer and is as low as 15℃ in winter, with an average temperature between 20-25℃. These data show that the humidity, humidity deficit, carbon dioxide concentration and temperature in the greenhouse are significantly affected by seasonal changes.
[0183] 4.1.3 Greenhouse total operating energy consumption and outdoor environment
[0184] The total operating energy consumption of the greenhouse is closely related to the changes in the outdoor environment: in winter and summer, due to the lower and higher outdoor temperatures respectively, the total energy consumption increases significantly; in summer, it can reach up to 200W / m 2The high solar radiation intensity in winter leads to increased cooling demand, while in winter, despite the lower radiation intensity, the heating demand increases and the total energy consumption is still high; in addition, the high wind speed in winter and summer increases heat loss and cold air exchange, further increasing energy consumption.
[0185] In summer, the greenhouse is in a clean state. One of the reasons is that the cost of environmental control is too high. In summer, the outdoor temperature is as high as 30℃ and the solar radiation intensity is as high as 200W / m 2 , causing the temperature in the greenhouse to rise rapidly. In order to maintain a suitable growth environment, a large amount of energy is required for cooling. At the same time, the increase in wind speed in summer will also intensify heat exchange, further increasing the cooling demand. These factors together lead to excessively high environmental control costs, making it uneconomical to maintain greenhouse operations in summer, so the greenhouse is cleared to reduce costs.
[0186] 4.1.4 Energy consumption by item
[0187] The sub-item operation energy consumption of the greenhouse has the following characteristics: the energy consumption of high-pressure sodium lamp supplementary lighting is much higher than other sub-item operation energy consumption, and its trend is roughly the same as the trend of total operation energy consumption, which is higher in spring and autumn, up to 15,000 kWh; the energy consumption of temperature control equipment reaches a peak in summer, up to about 3,000 kWh, and decreases in winter, but still maintains a high level; the energy consumption of circulation fans is higher in spring and summer, up to about 400 kWh in summer; the energy consumption of the recirculation pool circulation pump is the highest in summer, reaching about 15 kWh, and is lower in other seasons. The changes in these sub-item energy consumption reflect the different needs for light, temperature, and humidity control in the greenhouse in different seasons. The overall sub-item operation energy consumption is higher in summer and spring, and relatively lower in winter and autumn.
[0188] Why are other devices running in addition to supplementary lighting in summer? The energy consumption of temperature control equipment is lower in winter? The reasons are as follows: In summer, the greenhouse is ready to be cleared from May, and the crops are no longer supplemented with light; however, during this period, the greenhouse needs to carry out other maintenance operations including disinfection, sterilization, facility inspection and maintenance, so the temperature control equipment and circulation fans will still run and cause energy consumption. For details, see Figure 8 .
[0189] 4.1.5 Crop growth information
[0190] The crop data in the greenhouse has the following characteristics: the growth data is maintained in a relatively stable range, the leaf length is maintained between 30-45cm, the number of leaves is maintained between 10-20, the weekly growth is maintained between 15-35cm, and the stem thickness is maintained between 7-11.
[0191] The results are related to the plant management methods, mainly including vine winding, flower / fruit thinning, vine removal and old leaf removal. Vine winding promotes flowering and fruiting and provides support for the plant, making it easier for workers to operate. At the same time, side branches should be removed to avoid nutrient consumption. Flower / fruit thinning ensures uniform fruiting and balanced plant growth. Vine removal uses hooking or untwisting methods and is performed once a week. Old leaf removal increases air flow, promotes transpiration, prevents diseases, increases fruit light, promotes ripening and facilitates harvesting.
[0192] 4.2 Comparison of feature engineering and model prediction effects
[0193] 4.2.1 Feature Engineering Results
[0194] After a series of feature engineering processes, including data cleaning, feature construction, and feature selection, the final modeling features are selected as shown in the following table:
[0195]
[0196] After feature engineering, crop growth characteristics were judged to have insufficient impact on the total operating energy consumption prediction and were eliminated.
[0197] 4.2.2 Prediction Effects of Multiple Models
[0198] In order to determine the optimal parameter configuration of various models, the Optuna library was used for hyperparameter optimization, and the number of parameter search trials was uniformly set to 100. Optuna is an efficient automated hyperparameter optimization framework that uses the Bayesian optimization algorithm to search for the optimal parameter combination to improve the performance of the model
[27] .
[0199] Parameter optimization setting of GradientBoostingRegressor algorithm
[0200] Hyperparameter name type Value range Optimal value n_estimators Integer 50-300 123 learning_rate Floating point numbers 0.01-1.0(log) 0.03507 max_depth Integer 1-10 6 min_samples_split Integer 2-20 15 min_samples_leaf Integer 1-20 11 subsample Floating point numbers 0.5-1.0 0.6386 max_features Classification sqrt,log2,None log2
[0201] Parameter optimization setting of RandomForestRegressor algorithm
[0202] Hyperparameter name type Value range Optimal value n_estimators Integer 50-300 277 max_depth Integer 2-20 13 min_samples_split Integer 2-20 2 min_samples_leaf Integer 1-20 2 max_features Classification sqrt,log2,None sqrt
[0203] Parameter optimization setting of MLPRegressor algorithm
[0204] Hyperparameter name type Value range Optimal value n_layers Integer 1-3 3 n_units_l0 Integer 50-200 182 n_units_l1 Integer 50-200 (n_layers ≥ 2) 155 n_units_l2 Integer 50-200 (n_layers = 3) 68 activation Classification identity,logistic,tanh,relu tanh solver Classification lbfgs,sgd,adam adam alpha Floating point numbers <![CDATA[1e -5 -1e -1 (log value)]]> 0.01469 learning_rate Classification constant, invscaling, adaptive constant
[0205] Parameter optimization setting of KNeighborsRegressor algorithm
[0206] Hyperparameter name type Value range Optimal value n_neighbors Integer 1-100 18
[0207] Parameter optimization setting of SVR algorithm
[0208]
[0209] Parameter optimization setting of GRU algorithm
[0210] Hyperparameter name type Value range Best gru_hidden_size int 50-150 82 gru_num_layers int 1-3 2 dropout_rate float 0.3-0.7 0.5862 learning_rate float <![CDATA[1e -4 to1e -2 (logscale)]]> 0.0076 weight_decay float <![CDATA[1e -6 to1e -3 (logscale)]]> <![CDATA[1.7914e -06 ]]> patience int 3-10 6 num_epochs int 100-500 417 scheduler_factor float 0.1-0.9 0.1481 scheduler_patience int 2-10 2 optimizer categorical Adam,RMSprop,SGD Adam batch_size int 32-128 (logscale) 96
[0211] Parameter optimization setting of LSTM algorithm
[0212] Hyperparameter name type Value range Optimal value lstm_hidden_size int 50-150 86 lstm_num_layers int 1-3 2 dropout_rate float 0.3-0.7 0.56 learning_rate float <![CDATA[1e -4 to1e -2 (logscale)]]> 0.0031 weight_decay float <![CDATA[1e -6 to1e -3 (logscale)]]> <![CDATA[1.2649e -06 ]]> patience int 3-10 6 num_epochs int 100-500 234 scheduler_factor float 0.1-0.9 0.5243 scheduler_patience int 2-10 6 optimizer categorical Adam,RMSprop,SGD RMSprop batch_size int 32-128 (logscale) 70
[0213] Parameter optimization setting of Transformer algorithm
[0214] Hyperparameter name type Value range Optimal value d_model categorical 16,32,48 16 nhead categorical 4,8,16 8 num_encoder_layers int 2-4 2 dropout_rate float 0.01-0.2 0.03757 lr float <![CDATA[1e -4 to1e -2 (logscale)]]> 0.00557 weight_decay float <![CDATA[1e -6 to1e -4 (logscale)]]> <![CDATA[8.3252e -06 ]]> patience int 7-15 12 num_epochs int 200-500 412 scheduler_factor float 0.5-0.8 0.6051 scheduler_patience int 5-10 7 optimizer categorical Adam,SGD SGD batch_size int 16-64 (logscale) 17
[0215] The running time of the optimal parameter combination obtained by various algorithm models after 100 parameter searches on the test set, as well as the determination coefficient value under the optimal parameter combination are shown in the table:
[0216] Model platform <![CDATA[R 2 ]]> Run time(s) GradientBoostingRegressor Sklearn 0.9371 151.73 KNeighborsRegressor Sklearn 0.9358 6.38 MLPRegressor Sklearn 0.9230 1560.57 RandomForestRegressor Sklearn 0.9403 457.14 SVR Sklearn 0.9352 2247.87 GRU Pytorch (GPU) 0.9391 757.91 LSTM Pytorch (GPU) 0.9371 495.74 Transformer Pytorch (GPU) 0.9386 6615.97
[0217] Traditional machine learning algorithms and deep learning algorithms have their own advantages and disadvantages. As can be seen from the table, the traditional machine learning algorithms on the Sklearn platform have different performance and running time. RandomForestRegressor has an R of 0.9403. 2 The value of KNeighborsRegressor performs best, but the running time is 457.14 seconds, which is time-consuming. 2 The value is slightly lower at 0.9358, but the running time is only 6.38 seconds, which is the fastest among all models. In contrast, the deep learning algorithm shows higher prediction performance on the Pytorch (GPU) platform, among which the R 2 The values are 0.9391 and 0.9371 respectively, and the running time is 757.91 seconds and 495.74 seconds respectively. Although the performance is slightly inferior to RandomForestRegressor, it may have more advantages when processing complex data. 2 The value is 0.9386, but the running time is as high as 6615.97 seconds, which shows that the computing resources are consumed greatly. Therefore, when selecting an algorithm, it is necessary to balance the prediction performance and computing cost. Traditional machine learning algorithms perform well in fast and medium-complexity tasks, while deep learning algorithms have more potential when processing complex tasks.
[0218] 4.3 Model Interpretability Analysis
[0219] In this paper, the machine learning algorithm RandomForestRegressor is superior to the deep learning algorithm in terms of running speed and prediction accuracy. Therefore, the SHAP value (SHapleyAdditive exPlanations) method is used to analyze the interpretability of the RandomForestRegressor prediction model. As a theoretical basis for interpreting model predictions, the SHAP value can quantify the specific contribution of each feature to the model output and reveal the intrinsic connection between the feature and the target variable
[28] .
[0220] 4.3.1 SHAP Heatmap
[0221] Fig. 9 The SHAP heat map shows the distribution of SHAP values of each feature in different samples. The color represents the size of the SHAP value, red represents positive contribution, and blue represents negative contribution.
[0222] The operating status of high-pressure sodium lamps and hot and cold air units significantly affects the total energy consumption of the greenhouse. As can be seen from the figure, the energy consumption of supplementary lights (SL_EC) and hot and cold air units (AHU_EC) in different regions have a very significant impact on the total energy consumption, especially the energy consumption of supplementary lights in the northwest and southwest regions, which shows a higher SHAP value and affects the value predicted by the model, indicating that the equipment operation in these regions has a greater contribution to the total energy consumption. Optimizing the operating strategy of supplementary lights and hot and cold air units can effectively reduce the total energy consumption of the greenhouse and improve energy utilization efficiency.
[0223] 4.3.2 SHAP Decision Diagram
[0224] Fig.10 It is a SHAP decision diagram. Each line represents a sample. The direction of the line indicates how the feature affects the model output value. The color indicates the size of the feature value, from blue (low value) to red (high value). It helps understand how the final prediction value of an instance is gradually accumulated through the contribution of each feature by showing the cumulative change of the SHAP value.
[0225] from Fig.10 It can be seen that the contribution of fill light energy consumption (SL_EC) to the total energy consumption forecast in the northwest and southwest regions changes significantly with the increase of the characteristic value, especially when the characteristic value is high, the SHAP value can reach 0.8 to 1.0, indicating that these characteristics have a great positive impact on energy consumption forecast. Similarly, the impact of the air conditioning unit energy consumption (AHU_EC) in the south area is also very obvious, and the SHAP value fluctuates between 0.4 and 0.8. Although the impact of lag characteristics (such as lag_1h and lag_24h) on energy consumption is relatively low, they still show the time dependence of the total operating energy consumption, and their SHAP values vary between 0 and 0.2.
[0226] 4.3.3 SHAP Scatter Plot
[0227] Fig.11 It is a SHAP scatter plot, which shows the impact of each feature on the model output of all instances, reflecting the global contribution of the feature to the entire data set. The x-axis in the figure represents the SHAP value, each point represents an instance, the color of the point represents the high or low feature value (red is high, blue is low), and the position of the point represents the contribution of the feature to the model output.
[0228] It can be seen from the figure that the equipment energy consumption characteristics (such as SL_EC and AHU_EC) have a greater impact on the model output overall. The SHAP values of the fill light energy consumption in the northwest No.4 and southwest No.4 areas range from 0.05 to 0.15, indicating that these characteristics have an important impact in most instances. Similarly, the SHAP value of the energy consumption of the south-side hot and cold air units is also significant, with an impact range of 0.05 to 0.12. The SHAP values of lag characteristics (such as lag_1h, lag_24h) and time characteristics (such as hour_sin, hour_cos) are small, usually between 0.01 and 0.05, showing that they have a relatively low impact on energy consumption prediction. In addition, the SHAP value of outdoor solar radiation intensity is also low, mainly concentrated between 0 and 0.02.
[0229] The analysis results show that when predicting the total operating energy consumption of a greenhouse, it is necessary to focus on the energy consumption of fill lights and hot and cold air units, while considering the hysteresis effect and rolling characteristics to improve the prediction accuracy.
[0230] In this paper, the total operating energy consumption of a multi-span glass greenhouse is deeply analyzed and predicted by a data-driven approach. The study found that the Random Forest Regressor model, combined with sophisticated feature engineering and hyperparameter optimization, can predict the total operating energy consumption of a greenhouse with high accuracy. The R 2 The value is as high as 0.9403, which shows its effectiveness in capturing the dynamic changes of energy consumption. Through SHAP value analysis, the key factors affecting energy consumption prediction are revealed, providing a clear optimization direction for greenhouse energy saving.
[0231] Feature engineering plays a vital role in building energy consumption prediction models. The study found that whether it is a traditional machine learning algorithm or a deep learning algorithm, through carefully designed feature selection and transformation, the R 2The values all reached above 0.92, indicating that the model has a high prediction accuracy. This result emphasizes the core role of feature engineering in improving model performance, especially in processing high-dimensional data and capturing the intrinsic patterns of data. Through feature engineering, not only the model's ability to understand the dynamics of greenhouse energy consumption is enhanced, but also the model's adaptability to changes in different environmental conditions is improved. Therefore, feature engineering is a key step in achieving efficient and accurate energy consumption prediction, and has reference value for developing more accurate energy management strategies.
[0232] Deep learning algorithms have shown their potential in processing complex data sets, but they have not surpassed traditional machine learning algorithms in terms of prediction accuracy. GRU and LSTM models have shown higher R when predicting the total energy consumption of greenhouse operation. 2 values (0.9391 and 0.9371, respectively), but are similar to the 0.9403 R of the Random Forest Regressor model. 2 There is still a certain gap compared with the previous value. In addition, the deep learning model requires longer time and more computing resources during the training process, which to a certain extent limits its feasibility in practical applications. This phenomenon shows that when choosing a suitable prediction model, it is necessary not only to consider the prediction ability of the model, but also to weigh the computational efficiency of the model and the needs of the actual application scenario. Future research can further explore the optimization methods of deep learning algorithms in energy consumption prediction tasks, and how to combine the advantages of traditional machine learning algorithms to improve the accuracy and efficiency of predictions.
[0233] References
[0234] [1]Mark TESTER, Peter LANGRIDGE. Breeding technologies to increase cropproduction in a changing world[J].Science,2010,327(5967):818-822.
[0235] [2] Zhou Jie, Shi Kai, Xia Xiaojian, et al. Review and Prospect of Vegetable Cultivation Technology in China over the Past 60 Years[J]. Acta Horticulturae Sinica, 2022, 49(10): 2131-2142.
[0236] [3] Li Wenjun, Zhang Panpan, Qu Hao, et al. Research on energy saving and emission reduction technology of intelligent multi-span glass greenhouse[J]. Agricultural Engineering Technology, 2020, 40(28): 16-19.
[0237] [4]E.IDDIO,L.WANG,Y.THOMAS,et al.Energy efficient operation andmodeling for greenhouses:A literature review[J].Renewable and SustainableEnergy Reviews,2020,117:109480.
[0238] [5]Kadir AMASYALI,Nora M.EL-GOHARY.A review of data-driven buildingenergy consumption prediction studies[J].Renewable and Sustainable EnergyReviews,2018,81:1192-1205.
[0239] [6]Mathieu BOURDEAU,Xiao qiang ZHAI,Elyes NEFZAOUI,et al.Modeling andforecasting building energy consumption:A review ofdata-driven techniques[J].Sustainable Cities and Society,2019,48:101533.
[0240] [7]Chirag DEB,Fan ZHANG,Junjing YANG,et al.A review on time seriesforecasting techniques for building energy consumption[J].Renewable andSustainable Energy Reviews,2017,74:902-924.
[0241] [8]Iman GHALEHKHONDABI,EhsanARDJMAND,Gary R.WECKMAN,et al.An overviewofenergy demand forecasting methods published in 2005–2015[J].Energy Systems,2017,8(2):411-447.
[0242] [9]MohammadAzharMAT DAUT,MohammadYusri HASSAN,HayatiABDULLAH,etal.Building electrical energy consumption forecasting analysis usingconventional and artificial intelligence methods:A review[J].Renewable andSustainable Energy Reviews,2017,70:1108-1118.
[0243]
[10] S SEYEDZADEH,FP RAHIMIAN,I GLESK,et al.Machine learning forestimation ofbuilding energy consumption andperformance:a review[M].Springer,2018.
[0244]
[11] Nan WEI,Changjun LI,Xiaolong PENG,et al.Conventional models andartificial intelligence-based models for energy consumption forecasting:Areview[J].Journal of Petroleum Science andEngineering,2019,181:106187.
[0245]
[12] Erick Meira DE OLIVEIRA,Fernando Luiz CYRINO OLIVEIRA.Forecastingmid-long term electric energy consumption through bagging ARIMA andexponential smoothing methods[J].Energy,2018,144:776-788.
[0246]
[13] Sasan BARAK,S.Saeedeh SADEGH.Forecasting energy consumption usingensemble ARIMA–ANFIS hybrid algorithm[J].International Journal ofElectricalPower&Energy Systems,2016,82:92-104.
[0247]
[14] Fan ZHANG,Chirag DEB,Siew Eang LEE,et al.Time series forecastingfor building energy consumption using weighted Support Vector Regression withdifferential evolution optimization technique[J].Energy andBuildings,2016,126:94-103.
[0248]
[15] Nivethitha SOMU,Gauthama Raman M R,Krithi RAMAMRITHAM.A hybridmodel for building energy consumption forecasting using long short termmemory networks[J].AppliedEnergy,2020,261:114131.
[0249]
[16] Nivethitha SOMU,Gauthama RAMAN M R,Krithi RAMAMRITHAM.A deeplearning framework for building energy consumption forecast[J].Renewable andSustainable Energy Reviews,2021,137:110591.
[0250]
[17] Shailendra SINGH,Abdulsalam YASSINE.Big Data Mining of EnergyTime Series for Behavioral Analytics and Energy Consumption Forecasting[J].Energies,2018,11(2):452.
[0251]
[18] Razak OLU-AJAYI,Hafiz ALAKA,Ismail SULAIMON,et al.Building energyconsumption prediction for residential buildings using deep learning andother machine learning techniques[J].Journal ofBuilding Engineering,2022,45:103406.
[0252]
[19] Tao LIU,Zehan TAN,Chengliang XU,et al.Study on deep reinforcementlearning techniques forbuilding energy consumption forecasting[J].EnergyandBuildings,2020,208:109675.
[0253]
[20] Tae-Young KIM,Sung-Bae CHO.Predicting residential energyconsumption using CNN-LSTM neural networks[J].Energy,2019,182:72-81.
[0254]
[21] Jiaoliao CHEN,Fang XU,Dapeng TAN,et al.A control method foragricultural greenhouses heating based on computational fluid dynamics andenergy prediction model[J].Applied Energy,2015,141:106-118.
[0255]
[22] Md Shamim AHAMED,Huiqing GUO,Karen TANINO.A quasi-steady statemodel predicting the heating requirements ofconventional greenhouses incoldregions[J].Information Processing inAgriculture,2018,5(1):33-46.
[0256]
[23] Mario TREJO-PEREA,Gilberto HERRRERA-RUIZ,Jose RIOS-MORENO,etal.Greenhouse energy consumption prediction using neural networks models[J].training,2009,1(1):2.
[0257]
[24] Tang Yunjun, Sun Shuchang. Feature engineering methods in machine learning[J]. Automobile Practical Technology, 2020, (12): 70-72.
[0258]
[25] Yao Hongliang, Ai Liuke, Wang Hao, et al. Stock market trend prediction algorithm based on time series autoregression with moving average lag[J]. Journal of Zhengzhou University (Science Edition), 2018, 50(03): 60-66.
[0259]
[26] Hui ZOU.The adaptive lasso and its oracle properties[J].JournaloftheAmerican statistical association, 2006,101(476):1418-1429.
[0260]
[27] Takuya AKIBA, Shotaro SANO, Toshihiko YANASE, et al. Optuna: A next-generation hyperparameter optimization framework; proceedings of the Proceedings of the 25th ACM SIGKDD international conference on knowledge discovery & data mining, F, 2019[C].
[0261]
[28] Scott M LUNDBERG,Su-In LEE.A unified approach to interpretingmodel predictions[J].Advances in neural information processing systems,2017,30.
Claims
1. A greenhouse energy consumption prediction method based on multi-source data fusion, characterized by: The following steps are involved: 1) Data collection The collected data includes multi-dimensional data such as total greenhouse energy consumption, energy consumption by item, indoor and outdoor environmental parameters and crop growth information; 2) Feature Engineering The feature engineering is to generate features that better represent the essence of the data by processing and transforming the original data. Through the following feature engineering steps, a set of highly representative and predictive feature sets is successfully constructed and extracted, which improves the training efficiency of the model and provides a solid foundation for model training and optimization. 2.1) Temporal feature extraction Time features can capture periodic changes in data. The specific method includes extracting hour, date and month information from the timestamp, performing sine and cosine transformation on this information, extracting hour features, and converting them into sine and cosine forms, as shown in equations (1) and (2): Where H is hour characteristic H sin ——Hourly characteristic after sine conversion H cos ——Hourly characteristic after cosine transformation 2.2) Hysteresis feature construction The lag feature is used to capture the dependency in the time series. By constructing the 1-hour to 24-hour lag feature of the total energy consumption data, the impact of historical data on the current prediction can be better reflected. The lag feature of h hours is constructed as shown in formula (3): AND lag_h =And (t-h) (3) Where E is the total energy consumption of the tomato area. E lag_h ——The total energy consumption value with a lag of h hours at time t t——current time h——lag time, the value range is 1 to 24 hours; 2.3) Rolling statistical features The rolling statistical characteristics can reflect the changing trend and fluctuation of the data. By calculating the 24-hour rolling average, standard deviation, maximum and minimum values of the total energy consumption data, the short-term changing characteristics of the total energy consumption can be captured. The calculation method of the 24-hour rolling average and standard deviation of the total energy consumption is shown in formula (4) and formula (5): Where e rollingmean24h ——24-hour rolling average of total energy consumption E rollingstd24h ——24-hour rolling standard deviation of total energy consumption; 2.4) Cross-feature generation Cross-features generate new features by combining different features, providing more information and revealing the interactions between environmental variables. The method shown in formula (6) is used to combine the features of different variables, which is expressed as: C A,B =A×B (6) In the formula C A,B ——The cross eigenvalue of feature A and feature B A——the value of feature A B——the value of feature B Among them, the five characteristics of temperature, humidity, light, wind speed and total energy consumption are multiplied and crossed in pairs to form new cross characteristics; the four characteristics of plant height, stem thickness, leaf length and leaf number are also combined in pairs in this way to form cross characteristics; 2.5) Other feature combinations By calculating the temperature difference, humidity difference, and new features such as the square and logarithm of temperature and humidity, we can capture the complex environmental parameter change patterns and relationships. The indoor and outdoor temperature difference is shown in formula (7): ΔT=T inside_1 -T outside (7) Since there are only two climate chambers in the north and south of the greenhouse, the average temperature and humidity in the room are calculated as shown in equations (8) and (9): T average =(T inside_1 +T inside_2 ) / 2 (8) HD average =(HD inside_1 +HD inside_2 ) / 2 (9) Where ΔT is the temperature difference between indoor and outdoor T inside_1 ——North temperature in greenhouse T inside_2 ——South temperature in greenhouse T outside ——Outdoor temperature of greenhouse T average ——Average temperature in greenhouse HD inside_1 ——Indoor North humidity HD inside_2 ——Indoor indoor south humidity HD average - Outdoor humidity of the greenhouse; 2.6) Outlier processing In order to ensure the stability and reliability of the data, DBSCAN and IQR methods are used to detect and process outliers. DBSCAN is a density-based clustering method that can effectively identify and eliminate outliers. The IQR method detects outliers by calculating the interquartile range, as shown in formulas (10) and (11): Q lower =Q1-1.5×(Q3-Q1) (10) Q upper =Q3+1.5×(Q3-Q1) (11) Where Q1 is the first quartile Q3——The third quartile Q lower ——Data lower limit Q upper Data caps will be lower than Q lower and higher than Q upper The data points are considered as outliers; 2.7) Feature Selection In the exploration of improving the prediction accuracy and computational efficiency of the model, the LassoCV method was used for feature selection. By introducing L1 regularization, it realizes the automatic screening and elimination of feature items with low contribution to the model, so as to identify key features that have a significant impact on the target variable. 3) Algorithm selection and optimization 3.1) Algorithm selection and model structure Greenhouse energy consumption data is continuous time series data with obvious periodicity and trend. Gated Recurrent Unit, Long Short-Term Memory and Transformer algorithms are selected to solve the gradient vanishing and gradient explosion problems in traditional recurrent neural networks; Transformer algorithm is selected to process long sequence data; Gradient Boosting Regressor, Random Forest Regressor and Support Vector Regressor are selected to process greenhouse energy consumption, equipment energy consumption and crop growth multi-dimensional data; K-Nearest Neighbors Regressor algorithm is selected to predict the voting mechanism of neighboring samples to reveal local patterns and structures in greenhouse energy consumption data; Multi-Layer Perceptron Regressor is selected to capture complex patterns in the data; 3.2) Model training and parameter optimization During model training and hyperparameter optimization, the following processing was done on the data: 3.2.1) Data preparation: Use MinMaxScaler to scale the feature values to [0,1], and divide the dataset into training and test sets with a ratio of 80% and 20%; 3.2.2) Feature selection: The LassoCV method is used for feature selection, and important features are screened by introducing L1 regularization; 3.2.3) Hyperparameter tuning: Use the Optuna framework to perform hyperparameter tuning and automatically search for the optimal parameter combination through the Bayesian optimization algorithm; 3.2.4) Training process: Build a prediction model through the optimal parameter combination, use the training set to train the model, and verify the prediction effect of the model on the test set; 3.3) Model Evaluation To further evaluate the predictive performance of each model, the steps are as follows: 3.3.1) Model loading: Load the saved best model and its optimal parameters 3.3.2) Model prediction: Use the test set to make predictions and obtain prediction results 3.3.3) Performance evaluation: Calculate the mean square error, mean absolute error and R2 coefficient indicators of the model on the test set; 4) Model interpretation The SHAP value method was used to analyze and explain the interpretability of the model with the best prediction performance, and the features that have the greatest impact on energy consumption were extracted for reference by greenhouse operators.
2. The greenhouse energy consumption prediction method based on multi-source data fusion according to claim 1 is characterized in that: The crop growth information includes the number of leaves, leaf length, number of complete ears, growth amount and stem.
3. The greenhouse energy consumption prediction method based on multi-source data fusion according to claim 1 is characterized in that: The indoor and outdoor environmental parameters include indoor and outdoor temperature, humidity, light, and carbon dioxide concentration.
Citation Information
Cited By
Regional short-term carbon emission prediction method and related equipment
CN119783988A