Next Article in Journal
Experimental Determination of the Power Coefficient and Energy-Efficient Operating Zone for a 2.5 MW Wind Turbine Under High-Wind Conditions
Previous Article in Journal
The Optimal Strategy for Supplying Single-Family Homes with Electricity Using Photovoltaic Installations
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Multi-Type Building Integrated Agricultural Microgrid Planning Method Driven by Data Mechanism Fusion

1
State Grid Economic and Technological Research Institute Co., Ltd., Beijing 102209, China
2
College of Electrical Engineering & New Energy, China Three Gorges University, Yichang 443002, China
*
Authors to whom correspondence should be addressed.
Energies 2025, 18(18), 4911; https://doi.org/10.3390/en18184911
Submission received: 9 July 2025 / Revised: 28 August 2025 / Accepted: 9 September 2025 / Published: 16 September 2025

Abstract

With the integration of numerous distributed energy resources (DERs) and buildings with diverse energy demands, the inherent vulnerability of agricultural microgrids poses escalating security threats. Harnessing the regulatory capabilities of diverse building loads and energy storage systems to mitigate voltage excursions caused by DER generation in microgrids is of significant importance. Therefore, a data mechanism fusion-driven microgrid planning method is proposed in this paper, aiming to enhance the security of microgrids and optimize the utilization of DERs. A comprehensive agricultural microgrid model that incorporates intricate constraints of various types of buildings is established, including greenhouses, refrigeration houses and residences. Based on this model, a site selection and capacity determination planning methodology is proposed, taking into account wind turbines (WTs), photovoltaics (PVs), electric boilers (EBs), battery energy storage systems (BESSs), and heat storage devices. To address the limitations of traditional greenhouse models in accurately predicting indoor temperatures, a temperature field prediction method for greenhouses is proposed by leveraging a generalized regression neural network (GRNN) to train and modify the model indicators. Case studies based on a modified IEEE 33-bus system verified the effectiveness and rationality of the proposed method.

1. Introduction

In recent years, the proliferation of smart agricultural equipment has significantly heightened the need for diverse energy sources in rural areas [1], encompassing greenhouse heating, refrigeration houses and the heat and cold energy of residential buildings [2]. This substantial surge in energy demand has precipitated a series of safety concerns within the microgrid of agricultural microgrid [3,4]. For instance, prolonged overloading of the generating units in Vietnam’s coal power plants has led to the malfunction of certain units, resulting in detrimental consequences such as the occurrence of broiler deaths on farms and inadequate farmland irrigation. It led to significant financial losses for farmers. In a village in Henan Province, China, a surge in electricity consumption during summer months, driven by high power requirements and extensive irrigated farmland, resulted in overloaded electricity consumption and frequent local power outages, which ultimately paralyzed the town’s power supply. Evidently, the intricate and diverse energy demands within agricultural microgrid have posed a formidable challenge in power scheduling [5]. Furthermore, the frailty of grid structures in rural areas, coupled with high line resistance, has led to increased transmission losses and diminished voltage [6,7]. Adding DER generation randomly may lead to voltage excursions [8]. Consequently, constructing a microgrid planning method that can enhance the security of microgrids and optimize the utilization of DERs is worth further exploration.
A multitude of studies on the supply, planning and optimal scheduling of electrical energy in agricultural microgrid have been extensively examined by numerous scholars. Ref. [9] proposes a hierarchical distributed alternating direction method of the multiplier-based model predictive control framework, which aims to provide appropriate conditions for the growth of greenhouse’s crops and plants and limit the total amount of electricity exchanged with the main electricity grid. Ref. [10] employs the PV greenhouse rural energy system as its research object, establishing an agrometeorological model and an energy meteorological model, with a focus on the actual situation of rural energy systems in northern China. A regulation flexibility assessment method and a greenhouse load optimization aggregation strategy for modern agricultural microgrid are proposed in [11], which can mitigate grid pressure by flexibly regulating greenhouse load demand. Ref. [12] presents a two-stage stochastic operation method for the multi-energy microgrid, which allows for the optimal scheduling of energy generation, conversion of storage devices under constraints. This approach can handle various uncertainties in renewable energy generation, electricity price and load demand while controlling the indoor temperature to ensure heat comfort for the customers. Planning methods for integrated energy systems have also been proposed in several articles [13,14]. Ref. [15] put forth a novel multilevel extension planning framework for active distribution networks.
When it comes to loads such as greenhouses and refrigeration houses, which require precise regulation of the internal temperature, traditional methods relying solely on the physical model of the building may yield inaccurate results. It potentially causes issues in the overall planning scheme. Therefore, employing the data mechanism fusion-driven method to train and modify the model indicators is essential for obtaining more accurate and reliable results. Ref. [16] introduces a novel scheme based on the integration of the essential components. By using the exploitation of artificial neural network, the performance of the prediction and optimization components is additionally enhanced. Ref. [17] introduces an innovative centralized control scheme designed for a smart network of greenhouses integrated with a microgrid, thus constituting a smart small-scale power grid within the framework of smart grid technology. Some studies have been conducted to compare the effectiveness of various types of neural network algorithms in greenhouse temperature, and the results show that the GRNN [18] algorithm has a greater advantage in terms of accuracy and generalization ability [19].
According to the above-mentioned articles, current studies on planning for agricultural microgrid focus on how to rationally dispatch various types of renewable energy generation [20], improve the efficiency of integrated energy use and ensure the reliability of power supply [21,22,23]. However, for large-scale DER replenishment, planning that considers the energy demands of multiple buildings while taking into account grid security is currently rare. In addition, since agricultural microgrid are mostly self-built and lack unified planning, further disorganized planning on this fragile grid will lead to escalating security threats. While the current study primarily focuses on the integration of distributed energy resources (DERs) and multi-type building loads to enhance voltage stability and energy utilization efficiency, the inclusion of carbon cycle dynamics could indeed provide a more comprehensive environmental assessment, which constitutes a valuable direction for future research. Similarly, although the proposed data mechanism fusion method relies on accurate data acquisition and processing, the current model does not explicitly incorporate robustness mechanisms against communication failures or data interruptions. Such considerations—particularly pertaining to the resilience of control and communication networks—are critical for real-world implementation and will be addressed in subsequent work to further strengthen the operational security of agricultural microgrids.
Therefore, a unified and integrated planning approach is needed to address the above issues. This paper proposes a data mechanism fusion-driven microgrid planning method framework that takes into account enhancing the security of microgrids and optimizing the utilization of DERs. The major contributions of this paper can be summarized as follows:
(1)
A site selection and capacity determination planning methodology for microgrids is proposed, taking into account the characteristics of user demands. This planning method can satisfy intricate constraints of various types of buildings.
(2)
Refined load models for greenhouses, refrigeration houses and residential buildings are developed, taking into account the effect of external temperature changes on the internal temperature of buildings. A temperature field prediction method for greenhouses is proposed by data mechanism fusion driven, which ensures the basic requirements for the growth of plants inside.
(3)
Harnessing the regulatory capabilities of diverse building loads and energy storage systems, voltage excursions caused by DER generation in microgrids are mitigated.
The rest of this paper is arranged as follows: Section 2 shows the structural framework. Section 3 describes the comprehensive agricultural microgrid model that incorporates intricate constraints of various types of buildings. Section 4 presents the data mechanism fusion driven planning methodology. Case studies are tested in Section 5. Section 6 concludes this paper.

2. Framework

The framework of the data mechanism fusion-driven microgrid planning method is shown in Figure 1.
Setting up WTs and PVs at different nodes of the microgrid mitigates the pressure on the main grid and ensures self-sufficiency of electricity within the agricultural microgrid through DERs. The microgrid is equipped with electric boilers and electric refrigeration equipment, absorbing electric energy for heating/cooling to meet the energy demands of various buildings. However, the presence of PVs and WTs may lead to voltage rise. Thus, in Figure 1, the proposed planning framework aims to mitigate voltage excursions by regulatory capabilities of diverse building loads and energy storage systems. When the energy consumption capacity of these buildings is insufficient, electrical and heat energy storage devices can be fully utilized to further mitigate voltage overload and optimize the utilization of DERs.

3. Equipment and Building Models

3.1. Energy Equipment Model

(1)
Wind Turbine Generator
Wind speed directly determines the amount of power output. Considering that the wind power system can be connected to the grid, the aerodynamic performance leads to the cut-in wind speed V i n (the minimum wind speed required for the unit to be able to generate electricity on-grid) and the cut-out wind speed V o u t (the maximum wind speed limit for the unit to be able to generate electricity on-grid). Therefore, the output power of a wind turbine at a given time P t w can be modelled as follows:
P t w = { 0 ,   V t V i n   o r   V t V o u t P r W V t V i n V r V i n ,   V i n V t V r P r W ,   V r V t V o u t
0 P t W P m a x W
where V t denotes the actual wind speed at time t, V r indicates the rated wind speed, and P r W denotes the rated power of a single wind turbine. Equation (2) indicates that wind power cannot exceed the maximum output limit.
(2)
Photovoltaic Generator
The output power of PV is related to the light intensity. It can be expressed as follows:
P t P V = 0.15 × A P V η P V E t
0 P t PV P m a x PV
where A P V indicates photovoltaic panel area. η P V represents the efficiency under standard test conditions. E t represents the average light intensity at moment t . Equation (3) shows that PV cannot exceed the maximum output limit.
(3)
Electric Boiler
The electric boilers convert the coupling between electrical and heat energy, which plays an important role in the operation of the integrated energy system. The commonly used mathematical model for electric boilers is as follows:
P t E B , h e a t = P t E B η E B
Q t E B = P t E B , h e a t Δ t
0 P t E B P m a x E B
where P t E B , h e a t indicates the heat power generated when the electric boiler operates at the moment t , P t E B indicates the electric power consumed by the electric boiler, η E B indicates the conversion efficiency of electric-heat operation, and Q t E B indicates the heat generated by the electric boiler. Constraint (7) indicates that the power of the electric boiler cannot exceed the maximum power of the equipment.
(4)
Battery Energy Storage System
A commonly used mathematical model for BESS is shown below:
E t = E t 1 + Δ t P t e - charge η e - charge S e + Δ t P t e - discharge S e η e - discharge
0 E t BESS 1
0 P t c h a r g e τ c h a P m a x c h a
0 P t d i s c h a r g e τ d i s P m a x d i s
0 τ c h a + τ d i s 1
where E t and E t 1 denote the amount of electricity stored in BESS at time t and time t 1 . P t e - charge and P t e - discharge denotes the charging and discharging power of BESS at time t respectively. η e - charge and η e - discharge represent the charging and discharging efficiency. S e shows the maximum capacity of BESS. τ represents the charging and discharging state, which is a 0–1 variable. Equations (9)–(12) show the operation requirements of BESS.
(5)
Heat Storage
The commonly used mathematical model for heat storage (HS) is as follows:
H t = H t 1 ( 1 α ) + Δ t P t h - store η h - store S h + Δ t P t h - release S h η h - release
0 H t h e a t 1
0 P t s t o r e τ s P m a x s
0 P t r e l e a s e τ r P m a x r
0 τ s + τ r 1
where H t and H t 1 denote the amount of heat stored in storage at time t and time t 1 . P t h - store and P t h - release denote the storing and releasing heat of storage at time t , respectively. η h - store and η h - release represent the storing and releasing efficiency. S h shows the maximum capacity of heat storage. τ represents the storing and releasing state, which is a 0–1 variable. Equations (14)–(17) show the operation requirements of the heat storage.

3.2. General Electric Load Model

(1)
LED
Compared with other light sources, LED fill light has the advantages of high efficiency, high brightness, low heat generation and good heat dissipation. The mathematical model is as follows:
P t l i g h t = S G H φ 0 C η l i g h t 1000 ( I s e t τ I t ) k l i g h t
where P t l i g h t indicates the power consumption of supplementary lighting equipment in the greenhouse at time t. S G H means the area of greenhouses. φ 0 indicates the luminous flux per unit area. C indicates the correction factor. η l i g h t indicates the photoelectric conversion efficiency of the fill-in lamp. I s e t shows the set light intensity. τ denotes greenhouse transmittance. I t denotes natural light intensity at time t . k l i g h t indicates the illuminance conversion factor, which is related to the type of fill light.
(2)
Electric Irrigation
Different crops require different amounts of water at different stages, so the total power consumption of electric irrigation depends on the daily water requirement of the crop. The mathematical model of electric irrigation is as follows:
W = A t = 1 n [ K c E T t 0 ]
P w a t e r = W K W
where W represents the total daily water requirement of the crop. A means the planted area of the greenhouse. n represents the total number of irrigation periods in the greenhouse. K c represents the crop coefficient. E T t 0 shows the reference evapotranspiration at time t . P w a t e r represents the total electricity consumption of the irrigation equipment. K W represents the pump conversion efficiency.

3.3. Mult-Type Building Model

(1)
Refrigeration House
To ensure that the refrigeration houses’ temperature reaches the requirements, the electric refrigeration equipment absorbs electrical energy to produce cold energy. In this paper, only the refrigeration part is set up for agricultural microgrid, not freezers. This can be obtained from the conservation of energy:
Q t c o l d = Q t w + Q t b
Q t c o l d = η c o l d P t c o l d Δ t
Q t w = μ A c o l d ( T t o u t T t c o l d )
Q t b = m ( T t c o l d T t 1 c o l d ) 3600 + m q b
0 Q t c o l d Q m a x c o l d
T m i n c o l d T t c o l d T m a x c o l d
where Q t c o l d presents the total load consumed by the refrigeration house at the moment t , η c o l d presents the efficiency of electric refrigeration, and P t c o l d shows the refrigeration power of the greenhouse at the moment t. Q t w shows the heat passing through the enclosure structure of the refrigeration house. μ presents the heat transfer coefficient of the wall of the refrigeration house. A c o l d presents the surface area of the enclosure structure of the refrigeration house. T t c o l d and T t 1 c o l d indicates the temperatures in the refrigeration house at the moment of t and t 1 separately. T t o u t indicates the outside temperature at the moment of t , Q t b indicates the respiratory heat of crops stored in the refrigeration house. m means the total amount of crops. q b shows the respiratory heat per unit mass of crops.
(2)
Greenhouse
A Greenhouse is a closed system with a constant exchange of energy with the outside world. As a whole, the heat stored in the greenhouse is equal to the difference between the heat entering the greenhouse and the heat loss. According to the principle of conservation of energy, the following expressions are relevant:
ρ V c T t G H t = Q t G H Q t S Q t f
Q t G H = η G H P t G H Δ t
Q t S = A s K s ( T t o u t T t G H )
Q t f = ρ V f c ( T t o u t T t G H )
where ρ indicates the density of air in the greenhouse, c indicates the constant pressure specific heat capacity of room air, and V indicates the volume of air in the temperature chamber. T t G H represents the temperature in the greenhouse at time t . Q t G H represents greenhouse heating capacity, η G H represents the heating efficiency, and P t G H represents the heating power for greenhouse. Q t S shows the enclosure structure heat dissipation. A s and K s means heat transfer area and transfer coefficient of greenhouse enclosure structure, separately. Q t f represents ventilation-induced air heat dissipation, and V f represents the amount of ventilation.
By discretizing (25), the relationship between temperature and heating power in the greenhouse can be obtained as follows:
T t + 1 G H = ( 1 μ 1 ) T t G H + μ 2 P t G H + μ 1 T t o u t
0 Q t G H Q m a x G H
T m i n G H T t G H T m a x G H
where μ 1 = ( A s K s + ρ V f c ) / ρ Vc indicates the greenhouse’s insulation capacity and μ 2 = η / ρ V c indicates the heat supply capacity of the greenhouse.
(3)
Residential Building
Residential buildings are essentially the same as greenhouses and refrigeration houses [24]. Only some of the parameter values are different.

3.4. Objective Function

In this paper, the equal annual value cost is used to calculate the average daily investment and operation cost of the system. The microgrid planning for agricultural microgrid is based on the objective of minimizing investment and operating costs [25]. Therefore, the objective function is expressed as follows:
m i n   f   = i Φ P V C i P V α i P V   + j Φ W C j W T α j W T + k Φ B E S S C k B E S S α k B E S S + l Φ E B C l E B α l E B + m Φ h e a t C m h e a t α m h e a t + s Φ s γ s C s o p
where C P V / W T / B E S S / E B / h e a t represents PV/WT/BESS/EB/HS investment and operating costs, respectively. α are the decision variables. γ s means the probability of occurrence of scenes. C s o p are the costs of operating the system.

3.5. Constraints

Constraints (1)~(20)
Constraints (25)~(26)
Constraints (31)~(33)
P t W + P t P V + P t B E S S + P t g r i d = P t l o a d
Q t E B + Q t h e a t = Q t H l o a d
P b q , t LN = g b q V b , t V q , t 2 b b q ( θ b , t θ q , t )
Q b q , t LN = b b q V b , t V q , t 2 g b q ( θ b , t θ q , t )
P b q , t LN cos 2 k π N + Q b q , t LN sin 2 k π N S b q LN cos π N , k 1 , 2 N
| P t l i n e | P m a x l i n e
u m i n n u t n u m a x n
θ min n θ t n θ m a x n
where b b q and g b q are the susceptance and conductance values of the line between node b and q, respectively. P b q , t L N , Q b q , t L N represents the active and reactive power of the line between node b and q at time t. V is the square of the node voltage amplitude. θ is the voltage phase angle, and u t n represents the voltage of node n at time t .
Constraint (35) indicates the power balance constraints and (36) indicates the heat balance. Constraints (37)–(39) are the linearized power flow calculation equation. Constrain (40) represents the line power transfer limit. Constraints (41) and (42) show the constraint of voltage amplitude and phase angle.

3.6. Robust Optimization Model

To ensure the reliability of the microgrid planning scheme against fluctuations in renewable energy output and load demand, this section introduces a robust optimization method based on a budget uncertainty set, building upon the deterministic model presented above.
The forecast errors of photovoltaic output P t P V , wind turbine output P t W , and electrical/thermal loads P t l o a d / Q t H l o a d are considered.
The core idea of robust optimization is to find an optimal solution that remains feasible under the worst-case scenario within a known bounded set of uncertain parameters, as shown in (43):
Ξ = { P t P V = P ^ t P V + γ η t P V | γ [ 1 , 1 ] , t | γ | Γ }
where Γ is the budget (or conservatism) parameter, controlling the number of uncertain parameters that can simultaneously reach their bounds.
In the process of solving robust programming problems, NP-hard problems are often difficult to solve, and the lower bound of the optimal solution of the original problem can be found by the dual problem method as shown in the Formula (44).
min j p i j + Γ i z i s . t .        z i + p i j a ^ i j | x j * |         i , j p i j 0           j z i 0               i
The min–max problem can be transformed into a linear program problem by the proposed method that can be processed by an off-the-shelf solver.

4. Temperature Field Prediction Driven by Data Mechanism Fusion

Developing accurate internal temperature predictions, particularly in greenhouses, requires more than relying solely on heat transfer models. Therefore, refinement of model parameters is essential through the utilization of extensive datasets and neural network training. This approach ensures enhanced accuracy in temperature forecasting, thereby aligning agricultural microgrid planning results more closely with practical requirements. From the previous literature review, the GRNN algorithm has a greater advantage in terms of accuracy and generalization ability.

4.1. The Concept of Data Mechanism Fusion

In this study, data-mechanism fusion is defined as a methodology that integrates data-driven algorithms with physical mechanism-based models. Its core lies in utilizing data-driven algorithms (such as GRNN) and clustering algorithms (such as k-means) to learn from historical data, cluster scenarios, and correct key parameters in the mechanism model that are difficult to precisely determine. This process results in a hybrid model that combines physical interpretability with high predictive accuracy. This approach overcomes the limitations of pure mechanism-based models, such as insufficient accuracy, as well as the drawbacks of pure data-driven models, such as poor interpretability and weak extrapolation capability. Additionally, it addresses the issue of an excessive number of typical scenarios. This methodology is particularly suitable for applications such as microgrid planning, where high model reliability and interpretability are critical.

4.2. GRNN Algorithm

To implement the data-driven component of our proposed data-mechanism fusion approach, we employ the Generalized Regression Neural Network (GRNN). GRNN is a radial neural network algorithm based on a non-parametric kernel regression approach [18]. The algorithm uses non-parametric density estimation to establish the relationship between independent and dependent variables in training samples. It then calculates the regression value of the dependent variable based on the independent variable. Unlike traditional neural network algorithms, the GRNN algorithm does not require the definition of the neural network’s structure, as it only needs smooth factor parameters. Due to its strong nonlinear mapping capability and high fault tolerance, the algorithm is suitable for analyzing the correlation between environmental variables and internal temperature points within a building, such as a greenhouse. The theoretical foundation of GRNN resides in nonlinear kernel regression analysis, wherein the regression relationship between the dependent variable y and the independent variable x is not delineated by a prescriptive formula, but rather inferred from the analysis of the formation of a probability density function. This approach facilitates the determination of the maximum probability density under the given conditions of the independent variable.
In this approach, the joint probability density function of the variables x and y as f ( x , y ) is defined, and the probability density function of the dependent variable is calculated given the independent variable X, i.e., the conditional mean Y ˆ of this probability density function.
Y ˆ = E [ y X ] = + y f ( X , y ) d y + f ( X , y ) d y
The probability density function f ˆ ( X , Y ) can be obtained from the training samples by nonparametric estimation:
f ˆ ( X , Y ) = 1 ( 2 π ) ( p + 1 ) n i 2 σ ( p + 1 ) × i = 1 n e x p [ ( X X i ) T ( X X i ) 2 δ 2 ] e x p [ ( Y Y i ) 2 δ 2 ]
where n is the number of samples, and p is the dimension of the independent variable. X i , Y i . are the sample observations of the random variables x , y . δ is the smoothing factor.
Replacing f(x,y) with the probability density estimate f ˆ ( X , Y ) in (43), the output of the neural network is obtained by simplifying the integration operation shown below:
Y ˆ ( X ) = i = 1 n y i exp [ ( X X i ) T ( X X i ) 2 δ 2 ] i = 1 n exp [ ( X X i ) T ( X X i ) 2 δ 2 ]
where Y ˆ ( X ) is the neural network output value.

4.3. GRNN Structure

GRNN comprises four distinct layers, including the input layer, pattern layer, summation layer and output layer [18]. The structure is shown in Figure 2.
The input layer is the independent variable set in the study. The main external factors affecting the internal temperature of the greenhouse are illumination intensity, external temperature and time series, so the number of neurons in the input layer is three.
The pattern layer is a hidden regression layer trained on the samples, and the data are obtained from the input layer data by Gaussian transfer function. The number of neurons in the pattern layer is equal to the number of neurons in the input layer. The transfer function for information transfer between neurons is as follows:
f ( i ) = e x p [ ( X X i ) T ( X X i ) 2 δ 2 ] ( i = 1 , 2 , , n )
where X is the input variable of the neural network; X i   is the learning sample of the i-th neuron.
The summation layer uses two different types of neurons to weigh and sum the neuron data in the pattern layer. The weighting methods of the summation layer are divided into direct summation and weighted summation. Direct summation is the sum of the data of the pattern layer according to the weight of 1. S D is the output value of direct summing.
S D = i = 1 n f ( i ) = i = 1 n exp [ ( X X i ) T ( X X i ) 2 δ 2 ]
Weighted summation is the process of weighting and summing the pattern layer data by taking y i , the elements of the pattern layer output sample Y, as weights. S N is the weighted sum output value.
S N = i = 1 n y i f ( i ) = i = 1 n y i exp [ ( X X i ) T ( X X i ) 2 δ 2 ]
The result of the final operation is passed to the output layer. Then the output layer divides the two results of the summation layer to obtain the estimation result Y ˆ .
Y ˆ = S N S D

4.4. Parameter Modification of Building Model Based on GRNN

To assess the reliability of the prediction results more effectively, it is necessary to conduct a comprehensive fitting of the greenhouse temperature field following the acquisition of the predicted data. This involves the fitting of a two-dimensional temperature field incorporating known temperature values at specific sampling points, with particular emphasis on ensuring the continuity of the temperature field. The cubic spline interpolation method is well-suited for achieving such a fit. The temperature at any given point along the cross-section of the temperature sampling site can be derived through cubic spline interpolation fitting methodology, from which the greenhouse temperature field can be visualized by combining the relevant functions within MATLAB R2023a software.
Modifications to the parameters of the building model based GRNN present a viable avenue for mitigating the shortcomings inherent in traditional greenhouse models concerning the precise forecast of indoor temperatures. This endeavor lays the groundwork for the data mechanism fusion driven microgrid planning method.

4.5. Clustering of Typical Scenarios Based on k-Means

To address the variability and uncertainty of renewable energy generation, this study employs the k-means clustering method to extract typical operational scenarios from historical data. The k-means algorithm partitions the data into k clusters by minimizing the within-cluster variance, with the centroid of each cluster representing a typical scenario. This approach ensures robustness in planning while maintaining computational efficiency.
The clustering objective function is proposed as follows:
m i n i = 1 k x ϵ C i x μ i 2
where k denotes the number of clusters; C i represents the i -th cluster; x is the data point in feature space; μ i denotes Centroid of cluster C i .
Among them, the silhouette coefficient serves as an evaluation metric for assessing the performance of k-means clustering. By combining both cohesion (intra-cluster similarity) and separation (inter-cluster dissimilarity), it can be used to compare different clustering algorithms or different parameter settings on the same dataset. The magnitude of the silhouette value reflects how well each sample fits within its assigned cluster. A higher silhouette value indicates stronger cluster membership. The formula for calculating the silhouette coefficient is as follows:
S ( i ) = min ( b ) d m a x ( min ( b ) , d )
where d represents the standardized distance between the i -th data point and other points within the same cluster. b denotes the standardized distance between the i -th point and points in the nearest neighboring cluster. The silhouette value S ( i ) ranges from [−1, 1]. A higher S ( i ) indicates better clustering quality. When S ( i ) <   0 , it suggests the point is likely assigned to an incorrect cluster.
The scenario selection methodology employs k-means clustering (k = 3) to identify representative operational scenarios from historical renewable generation data, with the optimal cluster count determined by maximizing the average silhouette coefficient (S = 0.62 ± 0.08). The clustering objective function yields three distinct scenario centroids: (1) High Renewable Output Scenario ( μ 1 = [8.2 m/s wind, 850 W/m2 irradiance]), characterizing conditions with abundant resources where generation exceeds 120% of nominal capacity; (2) Low Renewable Output Scenario ( μ 2 = [3.1 m/s, 180 W/m2]) representing critical deficit periods below 40% capacity; and (3) Fluctuating Output Scenario ( μ 3 = [5.7 ± 2.3 m/s, 450 ± 210 W/m2]) capturing high-variability states with coefficient of variation CV > 0.35. These scenarios are integrated into a chance-constrained optimization framework through probability weights w = [ 0.32 ,   0.25 ,   0.43 ] derived from cluster populations, ensuring robust microgrid design while reducing the computational complexity from O ( n 2 ) to O ( k n )   for n = 15 , 000 historical observations.

5. Case Studies

This paper is based on a city in northern China. This area is under the influence of high westerly circulation most of the year, with an average wind speed of 2.16 m/s (force 2), and the maximum wind speed of 17 m/s (force 8) occurs on average 9 times over the years, with a maximum of 25 times during the year. The local average monthly temperatures for 2023–2024 are shown in Figure 3. The average winter temperature is −7 °C to 3 °C, with good sunshine and many sunny days.
The crop grown in the greenhouses of this agricultural microgrid is tomatoes, which are planted in September and October and harvested from November to June. Tomatoes grow best at temperatures ranging from 15 °C to 30 °C, with a temperature range of 20 °C to 25 °C being optimal. The greenhouse uses LED fill-in lights with adjustable power, assuming the same light intensity per square meter inside the greenhouse.
Only refrigeration houses are contained, no freezers. There are 5000 kg of apples stored in every cold room. Apples are stored at a minimum temperature of no less than 0 °C and a maximum temperature of no more than 2 °C. 0.25 kg apple generates 2 J of respiratory heat per hour.
In this paper, an IEEE 33-bus system model is used, which is shown in Figure 4. There are 10 buildings of three different types in the system, including 4 greenhouses, 4 refrigeration houses and 2 residential houses. There are 11 WTs, 11 PVs and 14 BESS as candidates. The above planning model is solved by calling Yalmip and Cplex packages using MATLAB software.
The outputs of the WTs and PVs under typical day scenarios in winter are shown in Figure 5.
The planning results of the microgrid are shown in Table 1. √ means the equipment is planned at that node, while × means that equipment is not planned. Wind turbines are planned at 11 locations and photovoltaic units are planned at 6 locations, where wind power accounts for the mainstay of electric energy to meet the low-carbon energy needs of agriculture. Energy storage units are put into 10 places for to utilize their regulatory capabilities.
To meet the heat energy demands of different buildings in the agricultural microgrid, four groups of EBs and heat storage units are included. They are used to convert the excess power and store the heat energy in the buildings to improve the energy utilizations and mitigate voltage excursions caused by DER generation.
To demonstrate the economic advantages of the proposed data mechanism fusion-driven planning method, a traditional benchmark scheme is established for comparison. In this benchmark, all building loads (including greenhouses, refrigeration houses, and residences) are treated as fixed, non-adjustable loads, neglecting their inherent thermal inertia and regulatory potential. The planning model for the benchmark case only considers the installation of additional energy storage (BESS) and conversion devices (EB, HS) to mitigate voltage excursions caused by DERs, without leveraging the flexibility of building loads.
The average daily investment and operating cost is shown in Table 2. The percentage of investment in each component is shown in Figure 6.
The node voltages of the microgrid for a typical day scenario in winter before and after optimization are shown in Figure 7. The building in Figure 7a is not designed to be adjustable, whereas the building in Figure 7b has the capacity for upward and downward adjustment. Comparing Figure 7a,b shows that the midday voltage in Figure 7b is significantly lower, i.e., the red part is reduced. This indicates that without flexible building consumption, the voltage will be lifted due to the increase in DER generation. Analyzing Figure 7b in conjunction with the planning scenario for Table 1, it can be seen that node 18 has only WT in operation, with low morning loads and relatively high node voltages. In contrast, since nodes 22, 24 and 25 have both wind turbines and photovoltaic units in operation, the high output of the photovoltaic units from 10:00 a.m. to 17:00 a.m. makes the voltage in the middle of the day significantly higher than the other periods. However, the presence of buildings reduces some of the voltages. Especially in nodes 22 and 25, where greenhouses, refrigeration houses and residential buildings have diverse energy demands, the microgrid realizes energy consumption through different buildings, thus mitigating voltage excursions. The voltage fluctuation rate comparison is listed in Appendix A.
When considering greenhouse temperatures, only the heat field conditions near the bottom crop need to be controlled. Therefore, the model indicators need to be trained and refined by data mechanism fusion.
Temperature data from critical points along the greenhouse cross-section are gathered under standard conditions. MATLAB software is employed to model the comprehensive temperature distribution across the entire cross-sectional area. The solar greenhouse’s structural specifications are as follows: length 50 m × width (inner span) 10 m, ridge height 4.5 m, oriented north–south, with a hot-dip galvanized double-arch welded frame, front roof angle to the ground of 62°, daylighting angle of 15° and rear roof tilt angle of 38°. The rear and hill-facing walls feature a composite structure comprising a 37 cm thick solid red brick shale layer combined with a 5cm thick phenolic board, ensuring structural integrity and insulation efficiency.
Under this planning scenario, greenhouse and refrigeration house temperatures are controlled within the required limits. The electricity/cooling/heating requirements of the residential houses are also met.
Figure 8a, Figure 8b, Figure 8c and Figure 8d are the predicted temperature fields of the greenhouse at 7:00, 12:00, 17:00, and 22:00, respectively. Combined with the prediction of the greenhouse temperature field distribution, the microgrid planning is optimized to enhance the security of microgrids and optimize the utilization of DERs. The optimization results indicate that the planning scheme remains unaltered.
To quantitatively evaluate the superiority of the proposed data mechanism fusion model over the traditional physical model, we compared their prediction performance against actual measurement data collected over 30 days. The Root Mean Square Error (RMSE) and Mean Absolute Error (MAE) were adopted as evaluation metrics, as defined in Equations (54) and (55):
R M S E = 1 N i = 1 N ( y i y ^ i ) 2
M A E = 1 N i = 1 N | y i y ^ i |
where y i is the actual measured temperature, y ^ i is the predicted temperature, and N is the number of data points.
The results, summarized in Table 3, clearly indicate that our proposed model significantly outperforms the traditional physical model, with errors reduced by approximately 74%. This high prediction accuracy is the foundation for the reliability of the subsequent microgrid planning results.

6. Conclusions

This paper presents a data mechanism fusion-driven microgrid planning method that considers intricate constraints of various types of buildings and the agricultural microgrid’s vulnerability. Various equipment and refined load models including greenhouses, refrigeration houses and residential buildings are constructed to form a complete agricultural microgrid model. To address the limitations of traditional greenhouse models, a temperature field prediction method for greenhouses is proposed by data mechanism fusion, which ensures the basic requirements for the growth of plants inside. Case studies validate the effectiveness and rationality of the proposed method, which demonstrate that the planning methodology can mitigate voltage excursions, ensure the safety of the microgrid and improve the utilization of DERs. Future work will focus on several promising directions to further enhance the proposed framework: (i) integrating carbon cycle dynamics and life-cycle assessment (LCA) into the planning model to evaluate the environmental impact and achieve low-carbon operation of agricultural microgrids; (ii) expanding the model to incorporate a broader range of energy carriers, such as biogas and biomass, exploring their synergies with electrical and thermal systems for greater sustainability and self-sufficiency.

Author Contributions

Investigation, N.W. and Z.A.; resources, Q.C. and Z.G.; writing—original draft preparation, N.W. and Y.G.; formal analysis, Q.C. and Y.F.; writing—review and editing, N.W. and C.L.; Methodology, N.W., Z.A. and C.L.; Validation, Z.A. and Q.C.; Software, Z.G.; Visualization, Z.G. and Y.G.; Supervision, Y.F. and C.L. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by the project “Research on Optimization Planning Technology for Wind-Solar-Thermal-Energy Storage-Transmission system in Desert-Gobi-Wasteland Base with Inter-regional Power Delivery under Carbon Market Environment” [Project No. ZZKJ-2025-04].

Data Availability Statement

Data supporting the findings of this study are available from the corresponding authors upon reasonable request. The data are not publicly available due to the large size and complex format of the datasets.

Conflicts of Interest

Authors Nan Wei, Zhi An, Qichao Chen, Zun Guo and Yichuan Fu were employed by the company State Grid Economic and Technological Research Institute Co., Ltd. The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

Appendix A

Table A1. The voltage reduction rate of a typical node at a typical time.
Table A1. The voltage reduction rate of a typical node at a typical time.
Time14151617181920
Before Optimization1.03080.98411.03131.00330.98170.95370.9958
After Optimization1.01440.98410.97770.97970.98170.94150.9958
Voltage Reduction Rate1.5%05.1%2.4%01.3%0

References

  1. Zhang, H.; Liang, S.; Wu, K.; Qiu, Y.; Cai, Y.; Chan, G.; Wang, S.; Zhou, D.; Zhou, Y.; Li, Z. Using agrophotovoltaics to reduce carbon emissions and global rural poverty. Innovation 2022, 3, 100311. [Google Scholar] [CrossRef] [PubMed]
  2. Kocaman, A.S.; Ozyoruk, E.; Taneja, S.; Modi, V. A stochastic framework to evaluate the impact of agricultural load flexibility on the sizing of renewable energy systems. Renew. Energy 2020, 152, 1067–1078. [Google Scholar] [CrossRef]
  3. Zhang, T.; Yang, J.; Jin, K.; Jing, T. Local power consumption method of distributed photovoltaic generation in rural distribution network based on blockchain. IET Gener. Transm. Distrib. 2023, 17, 1409–1418. [Google Scholar] [CrossRef]
  4. Chawda, G.S.; Shaik, A.G. Enhancement of wind energy penetration levels in rural grid using ADALINE-LMS controlled distribution static compensator. IEEE Trans. Sustain. Energy 2022, 13, 135–145. [Google Scholar] [CrossRef]
  5. de la Cruz, J.; Wu, Y.; Candelo-Becerra, J.E.; Vasquez, J.C.; Guerrero, J.M. Review of networked microgrid protection: Architectures, challenges, solutions, and future trends. CSEE J. Power Energy Syst. 2024, 10, 448–467. [Google Scholar] [CrossRef]
  6. Liu, B.; Liang, W.; Wang, Y.; Zhao, Z.; Tian, Q.; Li, X. Influence of distributed generation on fault characteristics and relay protection of rural distribution network. J. Phys. Conf. Ser. 2024, 2728, 1–8. [Google Scholar] [CrossRef]
  7. Sarkar, T.; Dan, K.A.; Ghosh, S.; Bhattacharya, K.D.; Saha, H. Interfacing solar PV power plant with rural distribution grid: Challenges and possible solutions. Int. J. Sustain. Energy 2018, 37, 999–1018. [Google Scholar] [CrossRef]
  8. Liu, B.; Zhu, B.; Guan, Z.; Mao, C.; Wang, D. Energy router interconnection system: A solution for new distribution network architecture toward future carbon neutrality. Energy Convers. Econ. 2022, 3, 181–200. [Google Scholar] [CrossRef]
  9. Rezaei, E.; Dagdougui, H.; Ojand, K. Hierarchical distributed energy management framework for multiple greenhouses considering demand response. IEEE Trans. Sustain. Energy 2023, 14, 453–464. [Google Scholar] [CrossRef]
  10. Fu, X.; Zhou, Y. Collaborative optimization of PV greenhouses and clean energy systems in rural areas. IEEE Trans. Sustain. Energy 2023, 14, 642–656. [Google Scholar] [CrossRef]
  11. Xia, S.; Cai, L.; Tong, M.; Cai, L.; Tong, M.; Wu, T.; Li, P.; Gao, X. Regulation flexibility assessment and optimal aggregation strategy of greenhouse loads in modern agricultural parks. Prot. Control Mod. Power Syst. 2024, 9, 98–111. [Google Scholar] [CrossRef]
  12. Chen, Y.; Feng, X.; Li, Z.; Xu, Y.; Miragha, A. Multi-stage coordinated operation of a multi-energy microgrid with residential demand response under diverse uncertainties. Energy Convers. Econ. 2020, 1, 20–33. [Google Scholar] [CrossRef]
  13. Su, B.; Wang, R.; Wang, M.; Wang, M.; Zhao, Q.; Lv, Y.; Gao, H. Low-carbon economic dispatch of integrated energy systems in industrial parks considering comprehensive demand response and multi-hydrogen supply. Appl. Sci. 2024, 14, 2381. [Google Scholar] [CrossRef]
  14. Chen, W.; Chang, X.; Li, J. A day-ahead optimal scheduling model of an integrated energy system for a facility agricultural-industrial park. IET Energy Syst. Integr. 2023, 5, 261–274. [Google Scholar] [CrossRef]
  15. Kabirifar, M.; Fotuhi-Firuzabad, M.; Moeini-Aghtaie, M.; Pourghaderi, N.; Dehghanian, P. A bi-level framework for expansion planning in active power distribution networks. IEEE Trans. Power Syst. 2022, 37, 2639–2654. [Google Scholar] [CrossRef]
  16. Ullah, I.; Fayaz, M.; Aman, M.; Kim, D. Toward autonomous farming: A novel scheme based on learning to prediction and optimization for smart greenhouse environment control. IEEE Internet Things J. 2022, 9, 25300–25323. [Google Scholar] [CrossRef]
  17. Ouammi, A.; Achour, Y.; Zejli, D.; Dagdougui, H. Supervisory model predictive control for optimal energy management of networked smart greenhouses integrated microgrid. IEEE Trans. Autom. Sci. Eng. 2020, 17, 117–128. [Google Scholar] [CrossRef]
  18. Specht, D.F. A general regression neural network. IEEE Trans. Neural Netw. 1991, 2, 568–576. [Google Scholar] [CrossRef]
  19. Ge, L.; Xian, Y.; Wang, Z.; Gao, B.; Chi, F.; Sun, K. A GWO-GRNN based model for short-term load forecasting of regional distribution network. CSEE J. Power Energy Syst. 2020, 7, 1093–1101. [Google Scholar]
  20. Zhang, W.; Xu, C. Capacity configuration optimization of photovoltaic-battery-electrolysis hybrid system for hydrogen generation considering dynamic efficiency and cost learning. Energy Convers. Econ. 2024, 5, 78–92. [Google Scholar] [CrossRef]
  21. Ding, S.; Zeng, J.; Hu, Z.; Yang, Y. A peer-2-peer management and secure policy of the energy internet in smart microgrids. IEEE Trans. Ind Inform. 2022, 18, 5689–5697. [Google Scholar] [CrossRef]
  22. Li, W.; Wangm, Q. Stochastic production simulation for generating capacity reliability evaluation in power systems with high renewable penetration. Energy Convers. Econ. 2020, 1, 210–220. [Google Scholar] [CrossRef]
  23. Dong, W.; Zhang, L.; Zhang, D.; Cui, Q. Hierarchical multi-objective planning for integrated energy systems in smart parks considering operational characteristics. CSEE J. Power Energy Syst. 2022, 8, 1760–1771. [Google Scholar]
  24. Zhang, T.; Wang, J.; Zhong, H.; Li, G.; Zhou, M.; Zhao, D. Soft open point planning in renewable-dominated distribution grids with building thermal storage. CSEE J. Power Energy Syst. 2023, 9, 244–253. [Google Scholar]
  25. Wang, F.; Harindintwali, J.D.; Yuan, Z.; Wang, M.; Wang, F.; Li, S.; Yin, Z. Technologies and perspectives for achieving carbon neutrality. Innovation 2021, 2, 100180. [Google Scholar] [CrossRef]
Figure 1. The framework of agricultural microgrid planning method.
Figure 1. The framework of agricultural microgrid planning method.
Energies 18 04911 g001
Figure 2. General regression neural network structure.
Figure 2. General regression neural network structure.
Energies 18 04911 g002
Figure 3. Monthly temperatures for 2023–2024.
Figure 3. Monthly temperatures for 2023–2024.
Energies 18 04911 g003
Figure 4. IEEE 33-bus system.
Figure 4. IEEE 33-bus system.
Energies 18 04911 g004
Figure 5. The outputs of the WT and PV units.
Figure 5. The outputs of the WT and PV units.
Energies 18 04911 g005
Figure 6. Percentage of investment in each component.
Figure 6. Percentage of investment in each component.
Energies 18 04911 g006
Figure 7. Voltage of microgrid.
Figure 7. Voltage of microgrid.
Energies 18 04911 g007
Figure 8. The predicted temperature field of the greenhouse at different times.
Figure 8. The predicted temperature field of the greenhouse at different times.
Energies 18 04911 g008
Table 1. Planning results.
Table 1. Planning results.
Planning Scheme
Node34131822242527303233
WT
Node34131822242527303233
PV×××××
Node3491112151618222324
BESS××××
Node252933
BESS
Table 2. Average daily investment and operating cost.
Table 2. Average daily investment and operating cost.
WTPVBESSEBHS
Cost (CNY)123,900 28,936 19,308 25,745 5149
Benchmark Cost (CNY)123,900 28,936 31,200 41,500 8300
Cost Reduction Rate0% 0% 38.1% 38.0% 38.0%
Table 3. The comparison of RMSE and MAE between the traditional model and proposed model.
Table 3. The comparison of RMSE and MAE between the traditional model and proposed model.
Model TypeRMSE (°C)MAE (°C)
Traditional Model1.851.52
Proposed Model0.480.38
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Wei, N.; An, Z.; Chen, Q.; Guo, Z.; Fu, Y.; Guo, Y.; Li, C. Multi-Type Building Integrated Agricultural Microgrid Planning Method Driven by Data Mechanism Fusion. Energies 2025, 18, 4911. https://doi.org/10.3390/en18184911

AMA Style

Wei N, An Z, Chen Q, Guo Z, Fu Y, Guo Y, Li C. Multi-Type Building Integrated Agricultural Microgrid Planning Method Driven by Data Mechanism Fusion. Energies. 2025; 18(18):4911. https://doi.org/10.3390/en18184911

Chicago/Turabian Style

Wei, Nan, Zhi An, Qichao Chen, Zun Guo, Yichuan Fu, Yingliang Guo, and Chenyang Li. 2025. "Multi-Type Building Integrated Agricultural Microgrid Planning Method Driven by Data Mechanism Fusion" Energies 18, no. 18: 4911. https://doi.org/10.3390/en18184911

APA Style

Wei, N., An, Z., Chen, Q., Guo, Z., Fu, Y., Guo, Y., & Li, C. (2025). Multi-Type Building Integrated Agricultural Microgrid Planning Method Driven by Data Mechanism Fusion. Energies, 18(18), 4911. https://doi.org/10.3390/en18184911

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop