Air conditioning system modeling method based on BP neural network and RF random forest
By combining the combined model of BP neural network and RF random forest and TRNSYS software, the central air conditioning system is modeled, and the problems of poor applicability and overfitting of individual models in the existing technology are solved, and the operation status of the central air conditioning system is realized. Accurate simulation and accuracy improvement.
Patent Information
- Application Number
- CN202411512347.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2025-02-18
AI Technical Summary
The existing air-conditioning system modeling methods have problems such as poor applicability of a single model, easy to overfit, and insufficient selection of influencing factors of the model.
A combined model based on BP neural network and RF random forest was adopted, combined with TRNSYS software, and the central air conditioning system was modeled. This method uses the combination of BP neural network and RF random forest to reduce the risk of a single model and improve the overall fitting effect.
Accurate simulation of the operating status of the central air conditioning system is achieved, modeling accuracy is improved, and the problem of poor adaptability of a single model is solved.
Smart Images

Figure CN119472275A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of central air-conditioning system equipment modeling, and in particular relates to an air-conditioning system modeling method based on BP neural network and RF random forest. Background Art
[0002] The operating equipment of the central air-conditioning system is mainly divided into three categories: cold and heat source equipment, water circulation equipment and terminal air treatment equipment. As a highly coupled complex system, the operating parameters affect each other. Therefore, the revelation and response of the operating mechanism and physical characteristics of the central air-conditioning system need to be achieved through effective system modeling. The modeling of traditional air-conditioning systems usually adopts two methods: the white box modeling method based on the physical model and the gray box modeling method based on the empirical model.
[0003] Among them, white box modeling requires a complete understanding of the internal operating rules of the system and equipment, and depicts the relationship between input and output based on the physical meaning and details of each parameter of the equipment. Therefore, this modeling method is also called physical modeling. The development of the physical model of the HVAC system is based on basic physical laws such as energy, mass, heat transfer, momentum and flow. By establishing a set of equations of these physical laws, a set of mathematical equations are derived or solved to accurately describe the physical operation process of the system. In recent years, with the innovation of science and technology, the operating rules of most equipment in the air-conditioning system can be represented by establishing a white box model, such as indoor area model, cooling and heating coil model, unit model, water valve model, fan and water pump model, etc. This modeling method has high accuracy, but it is widely used in the research and development design stage of equipment. It is necessary to verify the performance of each component of the air-conditioning system through experimental testing and simulation analysis. At the same time, researchers need to have a detailed understanding of the operating principle of the central air-conditioning system, which is time-consuming and labor-intensive.
[0004] The gray box model retains the variable parameters of the physical model, while the coefficients and related parameters in the model are calculated by the system identification method based on experimental data. Although this modeling method is easy to operate, it requires a clear functional relationship between device variables, and cannot effectively handle models with high-dimensional variables and multiple undetermined parameters, and is not suitable for complex coupled devices.
[0005] At present, a black box modeling method has been proposed based on big data technology combined with machine learning. This modeling method does not require a clear equipment operation mechanism and complex fitting functions. It only needs to find the relationship between input variables and output variables based on the actual equipment operation data set or performance curve, and conduct training and learning based on historical data to describe the nonlinear links of the system and equipment. It is also called a data-driven model.
[0006] At present, in the modeling research of various equipment in central air-conditioning systems, most of them only use a single algorithm to model the equipment. The determined model can only perform well in different data sets or different fields, and there are defects of overfitting or instability when facing a certain problem. In addition, the host energy consumption model of the central air-conditioning system mostly uses hot and cold water set temperatures, building load, chilled water inlet temperature and outdoor dry-bulb temperature as dependent variables of host energy consumption, but the host energy consumption is affected by many factors, resulting in low model accuracy. Summary of the invention
[0007] The purpose of the present invention is to solve the problems of poor applicability of a single model in existing modeling methods, easy overfitting, and incomplete selection of model influencing factors. A modeling method for an air-conditioning system based on BP neural network and RF random forest is proposed.
[0008] The technical solution of the present invention is: a method for modeling an air conditioning system based on BP neural network and RF random forest, comprising the following steps:
[0009] S1. Obtain the operation data of the central air-conditioning system and pre-process the operation data;
[0010] S2. Set the hyperparameters of the model and use the preprocessed data to build a BP neural network-RF random forest combination model;
[0011] S3. Based on the BP neural network-RF random forest combined model and TRNSYS software, the host model, water pump model and terminal model of the central air-conditioning system are established to complete the equipment modeling of the central air-conditioning system.
[0012] The beneficial effects of the present invention are:
[0013] The present invention combines BP neural network with RF random forest to construct a BP neural network-RF random forest combination model, and combines it with TRNSYS software to model central air-conditioning system equipment, which solves the problem of poor adaptability of a single model and can accurately simulate the operating status of the central air-conditioning system.
[0014] Preferably, the preprocessing in step S1 includes abnormal data identification, abnormal data and missing data processing, and data smoothing and noise reduction processing;
[0015] The abnormal data identification adopts the quartile difference criterion, specifically: according to the upper and lower quartiles of the operating data, the upper and lower thresholds of the operating data are calculated, and the data exceeding the threshold is the abnormal data;
[0016] The calculation formulas for the upper and lower thresholds of the operating data are:
[0017]
[0018] Among them, UT represents the upper threshold of the operating data, LT represents the lower threshold of the operating data, and Q 3 represents the upper quartile of the running data, Q 1 represents the lower quartile of the running data, Q 3L Indicates the location of the upper quartile of the running data, Q 1L Indicates the position of the lower quartile of the running data, and l is the total number of running data;
[0019] The abnormal data and missing data are processed by interpolation method, and the specific calculation formula is:
[0020]
[0021] Among them, u i represents the i-th missing data, u 0 Indicates the two data before the missing value, u 1 Represents the two data after the missing value, v i Indicates the sampling time corresponding to the missing value, v 0 Indicates the sampling time corresponding to the data before the missing value, v 1 Indicates the sampling time corresponding to the missing value.
[0022] The beneficial effects of the above preferred solution are:
[0023] By adopting the interquartile range criterion and interpolation method to identify abnormal data and process missing data, the problem of abnormal and missing recorded data due to electromagnetic interference, power outages and other factors during data collection is solved. At the same time, the problem of spike data in sample data caused by the influence of electromagnetic signals on sensors, resulting in unstable data sets or even erroneous data, is solved, thereby improving the modeling accuracy of the central air-conditioning system.
[0024] Preferably, the step S2 specifically includes the following sub-steps:
[0025] S21. setting the hyperparameters of the model, using the preprocessed data to train the BP neural network and the RF random forest model respectively, and obtaining the fitting results of the BP neural network and the RF random forest model;
[0026] S22. Calculate the deviation matrix A;
[0027] S23. According to the Lagrange multiplier method and the deviation matrix A, the weight w of the trained BP neural network is calculated 1 and the weights w of the trained RF random forest model 2 ;
[0028] S24. According to the fitting results of BP neural network, RF random forest model, weight w 1 and weight w 2 , the BP neural network-RF random forest combination model is calculated.
[0029] Preferably, the calculation formula of the deviation matrix A is:
[0030]
[0031] Where N represents the total number of sample data sets, e 1i Represents the absolute error of the BP neural network, e 2i Represents the absolute error of the RF random forest model;
[0032] The weight w 1 and weight w 2 The calculation formula is:
[0033]
[0034] Where E represents the identity matrix,
[0035] The expression formula of the BP neural network-RF random forest combination model is:
[0036] y total =w 1 ×y BP +w 2 ×y RF
[0037] Among them, y total represents the final fitting result of the BP neural network-RF random forest combination model, y BP Represents the fitting result of BP neural network, y RF Represents the fitting results of the RF random forest model.
[0038] The beneficial effects of the above preferred solution are:
[0039] Through the above preferred scheme, the BP neural network and RF random forest models are combined to construct a BP neural network-RF random forest combination model. By utilizing diversity, the risk of a single model is reduced and the overall fitting effect is improved.
[0040] Preferably, the host model in step S3 includes a host energy consumption model, a host COP model, a host temperature model, and a host flow model; the host energy consumption model is divided into a summer host energy consumption model and a winter host energy consumption model;
[0041] The input parameters of the host energy consumption model include outdoor dry bulb temperature, outdoor relative humidity, host set temperature, water pump set frequency, host cooling / heating and control signal, and the output parameter is host energy consumption;
[0042] The input parameters of the host COP model include host cooling / heating, host energy consumption and control signal, and the output parameter is host COP;
[0043] The input parameters of the host temperature model are the host set temperature and the control signal, and the output parameter is the host outlet water temperature;
[0044] The input parameters of the host flow model are the host water inlet flow and the control signal, and the output parameter is the host water outlet flow.
[0045] Preferably, the host energy consumption model is constructed based on a BP neural network-RF random forest combination model, and the expression formula of the host energy consumption model is:
[0046]
[0047] Among them, P ashp(t) Tdb is the host operation energy consumption at the current moment (t) is the outdoor dry-bulb temperature at the current moment, RH (t) is the outdoor relative humidity at the current moment, Tset (t) Set the temperature of the host's cold and hot water supply at the current moment, Nset (t) Set the pump frequency at the current moment, Q (t) is the cooling and heating capacity of the host at the current moment, f 1 (·) is the functional relationship between host energy consumption and other parameters, obtained by the BP neural network-RF random forest combination model, Q c Indicates the summer cooling load, that is, the cooling capacity of the host in summer, Q h represents the winter heat load, i.e. the heating capacity of the main engine in winter, c p represents the specific heat capacity of water, G represents the flow rate of hot and cold water, t r With t s They are the return water temperature and supply water temperature of hot and cold water respectively;
[0048] The host COP model is constructed using TRNSYS software, and the expression formula of the host COP model is:
[0049] COP=Q / P ashp
[0050] Among them, Q represents the host cooling / heat, P ashp Indicates the host energy consumption;
[0051] The host temperature model is constructed using TRNSYS software, and the expression formula of the host temperature model is:
[0052] T out(ashp) =T set(ashp)
[0053] Among them, T out(ashp) Indicates the outlet water temperature of the main engine, T set(ashp) Indicates the host water supply set temperature;
[0054] The host traffic model is constructed using TRNSYS software, and the host traffic model is expressed as follows:
[0055] G out(ashp) =G in(ashp)
[0056] Among them, G out(ashp) Indicates the water flow rate of the host, G in(ashp) Indicates the water flow rate of the host.
[0057] Preferably, the water pump model in step S3 includes a water pump energy consumption model, a water pump flow model and a water pump temperature model;
[0058] The input parameters of the water pump energy consumption model are the water pump set frequency and the control signal, and the output parameter is the water pump energy consumption;
[0059] The input parameters of the water pump flow model include the water pump set frequency and control signal, and the output parameter is the water pump outlet flow;
[0060] The input parameters of the water pump temperature model are the water pump inlet water temperature and the control signal, and the output parameter is the water pump outlet water temperature.
[0061] Preferably, the water pump energy consumption model is constructed based on a BP neural network-RF random forest combination model, and the expression formula of the water pump energy consumption model is:
[0062] P pump(t) =f 3 (Nset (t) )
[0063] Among them, P pump(t) represents the energy consumption of the pump at time t, Nset (t) represents the pump setting frequency at time t, f 3 (·) represents the functional relationship between the water pump energy consumption and the water pump set frequency, which is obtained by the BP neural network-RF random forest combination model;
[0064] The water pump flow model is constructed based on the BP neural network-RF random forest combination model, and the expression formula of the water pump flow model is:
[0065] Gpump(t) =f 2 (Nset (t) )
[0066] Among them, G pump(t) represents the pump flow rate at time t, f 2 (·) represents the functional relationship between the water pump flow rate and the water pump set frequency, which is obtained by the BP neural network-RF random forest combination model;
[0067] The water pump temperature model is constructed using TRNSYS software, and the expression formula of the water pump temperature model is:
[0068] T out(pump) =T in(pump)
[0069] Among them, T out(pump) Pump outlet water temperature, T in(pump) Indicates the water pump inlet temperature.
[0070] Preferably, the terminal model in step S3 is constructed using TRNSYS software; the terminal model input parameters include terminal water inlet temperature, building load, terminal water inlet flow rate and control signal; and the output parameters include terminal water outlet temperature and terminal water outlet flow rate.
[0071] Preferably, the calculation formula of the terminal outlet water temperature is:
[0072]
[0073] in, Indicates the summer end water temperature, Indicates the terminal outlet water temperature in winter, t in(terminal) represents the terminal water inlet temperature, Q represents the host cooling / heating, c represents the specific heat capacity of hot and cold water, and G represents the hot and cold water flow rate;
[0074] The calculation formula of the terminal water flow rate is:
[0075] G out(terminal) =G in(terminal)
[0076] Among them, G out(terminal) Indicates the end water flow rate, G in(terminal) Indicates the terminal water inlet flow rate.
[0077] The beneficial effects of the above preferred solution are:
[0078] The above-mentioned preferred scheme takes into account the main factors affecting the operating performance of the air source heat pump host, such as outdoor dry-bulb temperature, outdoor relative humidity, host hot and cold water supply set temperature, water pump set frequency, and cooling and heating capacity, and uses the BP neural network-RF random forest combination model and TRNSYS software to respectively construct the models of the host module, water pump module and terminal module of the central air-conditioning system, which can accurately simulate the operating status of the central air-conditioning system equipment and improve the model accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0079] Figure 1 Shown is a flow chart of the air conditioning system modeling method based on BP neural network and RF random forest.
[0080] Figure 2 The figure shows the MPAE of the summer host energy consumption model under different numbers of hidden layer neurons in Example 1 of the present invention.
[0081] Figure 3 Shown is the fitting result of the summer host energy consumption model in Example 1 of the present invention.
[0082] Figure 4 The figure shows the relative error comparison result of the summer host energy consumption model in Example 1 of the present invention.
[0083] Figure 5 Shown is the fitting result of the winter host energy consumption model in Example 1 of the present invention.
[0084] Figure 6 The figure shows the relative error comparison result of the winter host energy consumption model in Example 1 of the present invention.
[0085] Figure 7 Shown is the fitting result of the water pump flow model in Example 1 of the present invention.
[0086] Figure 8 The figure shows the relative error comparison result of the water pump flow model in Example 1 of the present invention.
[0087] Fig. 9 Shown is the fitting result of the water pump energy consumption model in Example 1 of the present invention.
[0088] Fig.10 The figure shows the relative error comparison result of the water pump energy consumption model in Example 1 of the present invention. DETAILED DESCRIPTION
[0089] Now, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings. It should be understood that the embodiments shown and described in the accompanying drawings are only exemplary and are intended to explain the principles and spirit of the present invention, rather than to limit the scope of the present invention.
[0090] Embodiment 1:
[0091] like Figure 1 As shown, a method for modeling an air conditioning system based on a BP neural network and an RF random forest specifically includes the following steps:
[0092] S1. Obtain the operation data of the central air-conditioning system and pre-process the operation data;
[0093] S2. Set the hyperparameters of the model and use the preprocessed data to build a BP neural network-RF random forest combination model;
[0094] S3. Based on the BP neural network-RF random forest combination model and the Type155 component in the TRNSYS software, the host model, water pump model and terminal model of the central air-conditioning system are established to complete the equipment modeling of the central air-conditioning system.
[0095] In this embodiment, during data collection, the device may occasionally experience abnormalities or missing data due to factors such as electromagnetic interference and power outages. At the same time, since the sensor is affected by electromagnetic signals, spike data is generated in the sample data, resulting in an unstable data set or even erroneous data, which affects the subsequent modeling accuracy. Therefore, in step S1, pre-processing operations such as abnormal data identification, abnormal data and missing data processing, and data smoothing and noise reduction are required for the operating data.
[0096] In this embodiment, the abnormal data identification adopts the quartile difference criterion, specifically: according to the upper and lower quartiles of the operating data, the upper and lower thresholds of the operating data are calculated, and the data exceeding the threshold is the abnormal data;
[0097] The calculation formulas for the upper and lower thresholds of the operating data are:
[0098]
[0099] Among them, UT represents the upper threshold of the operating data, LT represents the lower threshold of the operating data, and Q 3 represents the upper quartile of the running data, Q 1 represents the lower quartile of the running data, and calculates Q 3 and Q 1 When , we first need to arrange the running data from small to large and calculate the position Q of the upper and lower quartiles. 3L and Q 1L In order to determine the value, the calculation formula is:
[0100]
[0101] Among them, Q 3L Indicates the location of the upper quartile of the running data, Q 1LIt represents the position of the lower quartile of the running data, and l is the total number of running data.
[0102] In this embodiment, an interpolation method is used to perform interpolation filling processing on abnormal data and missing data. The specific calculation formula is:
[0103]
[0104] Among them, u i represents the i-th missing data, u 0 Indicates the two data before the missing value, u 1 Represents the two data after the missing value, v i Indicates the sampling time corresponding to the missing value, v 0 Indicates the sampling time corresponding to the data before the missing value, v 1 Indicates the sampling time corresponding to the missing value.
[0105] In this embodiment, the "smooth" function in MATLAB is used for noise reduction. The algorithm first takes N data before and after the Mth data to construct a data set, then removes the maximum and minimum values from the 2N+1 data in the data set and calculates the average value of the remaining data, which is the result after noise reduction of the Mth data. The program performs the same processing on the M+(1...J)th data in turn to complete the smooth noise reduction processing of all data.
[0106] In this embodiment, step S2 specifically includes the following sub-steps:
[0107] S21. setting the hyperparameters of the model, using the preprocessed data to train the BP neural network and the RF random forest model respectively, and obtaining the fitting results of the BP neural network and the RF random forest model;
[0108] S22. Calculate the deviation matrix A. The specific calculation formula is:
[0109]
[0110] Where N represents the total number of sample data sets, e 1i Represents the absolute error of the BP neural network, e 2i Represents the absolute error of the RF random forest model;
[0111] S23. According to the Lagrange multiplier method and the deviation matrix A, the weight w of the trained BP neural network is calculated 1 and the weights w of the trained RF random forest model 2 , the specific calculation formula is:
[0112]
[0113] Where E represents the identity matrix,
[0114] S24. According to the fitting results of BP neural network, RF random forest model, weight w 1 and weight w 2 , the BP neural network-RF random forest combination model is calculated, and the specific formula is:
[0115] y total =w 1 ×y BP +w 2 ×y RF
[0116] Among them, y total represents the final fitting result of the BP neural network-RF random forest combination model, y BP Represents the fitting result of BP neural network, y RF Represents the fitting results of the RF random forest model.
[0117] In this embodiment, the host model in step S3 includes a host energy consumption model, a host COP model, a host temperature model, and a host flow model; the host energy consumption model is divided into a summer host energy consumption model and a winter host energy consumption model.
[0118] In this embodiment, the host energy consumption model is constructed based on the BP neural network-RF random forest combination model, the input parameters include outdoor dry bulb temperature, outdoor relative humidity, host set temperature, water pump set frequency, host cooling / heating and control signal, the output parameter is the host energy consumption, the input parameters are preprocessed, and 60% of the sample data are used as a training set, 20% of the data are used as a validation set, and the remaining 20% of the data are used as a test set to train the BP neural network-RF random forest combination model, specifically: first, MATLAB is used to write a BP neural network algorithm, and the parameters of the summer / winter host BP neural network and RF random forest model are set, as shown in Table 1; secondly, the hidden layer neuron determination formula is used to optimize the number of hidden layer neurons, and the mean absolute percentage error (MAPE) of the training set results is used as the objective function to calculate the fitting result of the summer host energy consumption as shown in Figure 2 As shown, the optimal number of hidden layer neurons when using BP neural network to fit the summer host energy consumption is 8, at this time the model MAPE is the lowest, at about 5.24%; and the winter host model has the best effect when the number of hidden layer neurons is 7, so the number of hidden layer neurons of the BP neural network winter host energy consumption model is determined to be 7.
[0119] Table 1 Parameters of BP neural network and RF random forest host energy consumption model in summer
[0120]
[0121] 100 sets of data were selected to compare the fitting effects of BP neural network and RF random forest. The fitting results and relative error comparison results are shown in the figure. Figure 3 , Figure 4 , Figure 5 and Figure 6 As shown, it can be seen that due to the randomness of feature selection and sample data selection of random forest, the model has strong generalization ability and is not easy to overfit, so that the relative error range in the BP neural network model is between -10%-15%, while the model results of RF random forest can be controlled within -5%-7%.
[0122] The BP neural network, RF random forest and combined model are analyzed using the model evaluation index. The comparison results of the error index of the summer host energy consumption model are shown in Table 2. The fitting error of the RF random forest model is lower than that of the BP neural network model. The weight w of the BP neural network is calculated. 1 = 0.1523 and the weight w of the RF random forest model 2 =0.8477, and brought it into the combined algorithm to model the summer host energy consumption model. According to Table 2, the MAPE of the combined model and the RF random forest model are both around 3%, but their maximum relative error Max|RE| is lower than that of the random forest model. The comparison results of the error indicators of the winter host energy consumption model are shown in Table 3. The fitting error of the RF random forest model is lower than that of the BP neural network model. The weight w of the BP neural network is calculated. 1 = -0.2149 and the weight w of the RF random forest model 2 =1.2149, and brought it into the combined algorithm to model the winter host energy consumption model. According to Table 2, it can be seen that the MAPE of the combined model and the RF random forest model are both around 3%, but their maximum relative error Max|RE| is lower than that of the random forest model.
[0123] In summary, the expression formula of the host energy consumption model is:
[0124]
[0125] Among them, P ashp(t) The current host operating energy consumption, in kW, Tdb (t) is the outdoor dry-bulb temperature at the current moment, in °C, RH (t) is the current outdoor relative humidity, %, Tset (t) Set the cold and hot water supply temperature of the host at the current moment, in °C, Nset (t)Set the pump frequency at the current moment in Hz, Q (t) The cooling capacity of the host at the current moment, in kW, f 1 (·) is the functional relationship between host energy consumption and other parameters, obtained by the BP neural network-RF random forest combination model, Q c Indicates summer cooling load, i.e. the cooling capacity of the main unit in summer, in kW, Q h Indicates winter heat load, that is, the heating capacity of the host in winter, in kW, c p represents the specific heat capacity of water, c p =4.19kJ / (kg·K), G represents the flow rate of hot and cold water, the unit is kg / s, t r With t s They are the return water temperature and supply water temperature of hot and cold water respectively, in °C.
[0126] Table 2 Comparison results of error index of main engine energy consumption model in summer
[0127]
[0128] Table 3 Comparison results of error index of winter main engine energy consumption model
[0129]
[0130]
[0131] The host COP model is constructed using the Type 155 component in the TRNSYS software. The input parameters include host cooling / heat, host energy consumption and control signal. The output parameter is the host COP. Therefore, the expression formula of the host COP model is:
[0132] COP=Q / P ashp
[0133] Among them, Q represents the host cooling / heat, P ashp Indicates the host power consumption.
[0134] The host temperature model is constructed using the Type 155 component in the TRNSYS software. The input parameters are the host set temperature and control signal, and the output parameter is the host outlet water temperature. Therefore, the expression formula of the host temperature model is:
[0135] T out(ashp) =T set(ashp)
[0136] Among them, T out(ashp) Indicates the outlet water temperature of the main engine, T set(ashp) Indicates the host water supply set temperature.
[0137] The host flow model is constructed using the Type 155 component in the TRNSYS software. The input parameters are the host water inflow and the control signal, and the output parameter is the host water outflow. Therefore, the expression formula of the host flow model is:
[0138] G out(ashp) =G in(ashp)
[0139] Among them, G out(ashp) Indicates the water flow rate of the host, G in(ashp) Indicates the water flow rate of the host.
[0140] In this embodiment, the water pump model in step S3 includes a water pump energy consumption model, a water pump flow model and a water pump temperature model;
[0141] The water pump flow model is constructed based on the BP neural network-RF random forest combined model. The input parameters of the water pump flow model include the water pump set frequency and control signal, and the output parameter is the water pump outlet flow. First, the BP neural network is used to establish the water pump flow model. According to the analysis of the water pump operation performance, the number of hidden layer neurons of the water pump flow model is determined to be between 2 and 12. The trial and error method calculates that the model effect is best when the number of hidden layer neurons is 6, and the error is about 2.03%. Therefore, the number of hidden layer neurons of the BP neural network water pump flow model is determined to be 6. The specific parameters of the BP neural network and RF random forest water pump flow model are shown in Table 4.
[0142] Table 4 Parameters of BP neural network and RF random forest water pump flow model
[0143]
[0144] 100 sets of data were selected to compare the results of the BP neural network and the RF random forest model. The comparison results of the two models are as follows: Figure 7 and Figure 8 As shown in the table, the fitting results of the two pump flow models have no significant difference. The relative errors of the two models are about -5%-6%, and the prediction effects tend to be consistent. The specific evaluation indicators of the two models are sorted out. As shown in the table, the overall model accuracy of the BP neural network is slightly better than that of the RF random forest. The weight w of the BP neural network is calculated. 1 = 1.0119 and the weight w of the RF random forest model 2 =-0.0119, and brought it into the combined model. The fitting results, relative error and model evaluation indicators under the combined model are statistically shown in Table 5. It is found that the MAPE of the combined model is similar to the results of the other two models, both around 2%, but its MSE, RMSE, MAE and Max|RE| are lower than those of the other two models.
[0145] Table 5 Comparison results of pump flow model error indicators
[0146]
[0147] Therefore, the expression formula of the water pump flow model is:
[0148] G pump(t) =f 2 (Nset (t) )
[0149] Among them, G pump(t) Indicates the pump flow rate at time t, in m 3 / h,f 2 (·) represents the functional relationship between the water pump flow rate and the water pump set frequency, which is obtained by the BP neural network-RF random forest combination model.
[0150] The water pump energy consumption model is constructed based on the BP neural network-RF random forest combined model. The input parameters of the water pump energy consumption model are the water pump setting frequency and control signal, and the output parameter is the water pump energy consumption. The specific parameters of the BP neural network and RF random forest water pump energy consumption models are shown in Table 4. The model effect is best when the number of hidden layer neurons of the BP neural network water pump energy consumption model is 9, and the average absolute percentage error is less than 1%. Therefore, the number of hidden layer neurons of the BP neural network water pump energy consumption model is determined to be 9. The final comparison results of the two models are shown in Fig. 9 and Fig.10 As shown in Table 6, 100 sets of data were selected to compare the results of the two models. It can be found that there is no significant difference in the fitting results of the two water pump energy consumption models, and the prediction effects tend to be consistent. The specific evaluation indicators of the two models are sorted out, as shown in Table 6. It is also found that the model accuracy of the BP neural network is better than that of the RF random forest. The weight w of the BP neural network is 1 = 1.0169 and the weight w of the RF random forest model 2 =-0.0169, and the weights are brought into the combined model. Finally, the fitting results, relative errors and model evaluation indicators under the combined model are statistically analyzed as shown in Table 6. It is found that its MAPE is similar to that of the BP neural network model, but the MSE, RMSE, MAE and Max|RE| of the combined model are lower than those of the other two models.
[0151] Table 6 Comparison results between the combined model and the identification model
[0152]
[0153] In summary, the expression formula of the water pump energy consumption model is:
[0154] P pump(t) =f 3 (Nset(t) )
[0155] Among them, P pump(t) Indicates the energy consumption of the pump at time t, in kW, Nset (t) Indicates the pump set frequency at time t, in Hz, f 3 (·) represents the functional relationship between the water pump energy consumption and the water pump set frequency, which is obtained by the BP neural network-RF random forest combination model.
[0156] The water pump temperature model is constructed using the Type155 component in the TRNSYS software. The input parameters are the water pump inlet temperature and the control signal, and the output parameter is the water pump outlet temperature. Therefore, the expression formula of the water pump temperature model is:
[0157] T out(pump) =T in(pump)
[0158] Among them, T out(pump) Pump outlet water temperature, T in(pump) Indicates the water pump inlet temperature.
[0159] In this embodiment, the terminal model in step S3 is constructed using the Type155 component in the TRNSYS software; the terminal model input parameters include the terminal water inlet temperature, building load, terminal water inlet flow rate and control signal; the output parameters include the terminal water outlet temperature and the terminal water outlet flow rate.
[0160] The calculation formula of the terminal outlet water temperature is:
[0161]
[0162] in, Indicates the summer end water temperature, Indicates the terminal outlet water temperature in winter, t in(terminal) It represents the terminal water inlet temperature, Q represents the host cooling / heating, c represents the specific heat capacity of hot and cold water, and G represents the flow rate of hot and cold water.
[0163] The calculation formula of the terminal water flow rate is:
[0164] G out(terminal) =G in(terminal)
[0165] Among them, G out(terminal) Indicates the end water flow rate, G in(terminal) Indicates the terminal water inlet flow rate.
[0166] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the principles of the present invention, and should be understood that the protection scope of the present invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific variations and combinations that do not deviate from the essence of the present invention based on the technical revelations disclosed by the present invention, and these variations and combinations are still within the protection scope of the present invention.
Claims
1. A method for modeling an air conditioning system based on BP neural network and RF random forest, characterized in that: The method specifically comprises the following steps: S1. Obtain the operation data of the central air-conditioning system and pre-process the operation data; S2. Set the hyperparameters of the model and use the preprocessed data to build a BP neural network-RF random forest combination model; S3. Based on the BP neural network-RF random forest combination model and TRNSYS software, the host model, water pump model and terminal model of the central air-conditioning system are established to complete the equipment modeling of the central air-conditioning system.
2. The air conditioning system modeling method based on BP neural network and RF random forest according to claim 1 is characterized in that: The preprocessing in step S1 includes abnormal data identification, abnormal data and missing data processing, and data smoothing and noise reduction processing; The abnormal data identification adopts the quartile difference criterion, specifically: according to the upper and lower quartiles of the operating data, the upper and lower thresholds of the operating data are calculated, and the data exceeding the threshold is the abnormal data; The calculation formulas for the upper and lower thresholds of the operating data are: Among them, UT represents the upper threshold of the operating data, LT represents the lower threshold of the operating data, Q3 represents the upper quartile of the operating data, Q1 represents the lower quartile of the operating data, and Q 3L Indicates the location of the upper quartile of the running data, Q 1L Indicates the position of the lower quartile of the running data, and l is the total number of running data; The abnormal data and missing data are processed by interpolation method, and the specific calculation formula is: Among them, u i represents the i-th missing data, u0 represents the two data before the missing value, u1 represents the two data after the missing value, and v i It represents the sampling time corresponding to the missing value, v0 represents the sampling time corresponding to the data before the missing value, and v1 represents the sampling time corresponding to the data after the missing value.
3. The air conditioning system modeling method based on BP neural network and RF random forest according to claim 1 is characterized in that: The step S2 specifically includes the following sub-steps: S21. setting the hyperparameters of the model, using the preprocessed data to train the BP neural network and the RF random forest model respectively, and obtaining the fitting results of the BP neural network and the RF random forest model; S22. Calculate the deviation matrix A; S23. According to the Lagrange multiplier method and the bias matrix A, the weight w1 of the trained BP neural network and the weight w2 of the trained RF random forest model are calculated; S24. According to the fitting results of the BP neural network, the fitting results of the RF random forest model, the weight w1 and the weight w2, a BP neural network-RF random forest combination model is calculated.
4. The air conditioning system modeling method based on BP neural network and RF random forest according to claim 3 is characterized in that: The calculation formula of the deviation matrix A is: Where N represents the total number of sample data sets, e 1i Represents the absolute error of the BP neural network, e 2i Represents the absolute error of the RF random forest model; The calculation formulas of the weight w1 and weight w2 are: Where E represents the identity matrix, The expression formula of the BP neural network-RF random forest combination model is: and total =w1×y BP +w2×y RF Among them, y total represents the final fitting result of the BP neural network-RF random forest combination model, y BP Represents the fitting result of BP neural network, y RF Represents the fitting results of the RF random forest model.
5. The air conditioning system modeling method based on BP neural network and RF random forest according to claim 1 is characterized in that: The host model in step S3 includes a host energy consumption model, a host COP model, a host temperature model, and a host flow model; the host energy consumption model is divided into a summer host energy consumption model and a winter host energy consumption model; The input parameters of the host energy consumption model include outdoor dry bulb temperature, outdoor relative humidity, host set temperature, water pump set frequency, host cooling / heating and control signal, and the output parameter is host energy consumption; The input parameters of the host COP model include host cooling / heating, host energy consumption and control signal, and the output parameter is host COP; The input parameters of the host temperature model are the host set temperature and the control signal, and the output parameter is the host outlet water temperature; The input parameters of the host flow model are the host water inlet flow and the control signal, and the output parameter is the host water outlet flow.
6. The air conditioning system modeling method based on BP neural network and RF random forest according to claim 5 is characterized in that: The host energy consumption model is constructed based on the BP neural network-RF random forest combination model, and the expression formula of the host energy consumption model is: Among them, P ashp(t) Tdb is the host operation energy consumption at the current moment (t) is the outdoor dry-bulb temperature at the current moment, RH (t) is the outdoor relative humidity at the current moment, Tset (t) Set the temperature of the host's cold and hot water supply at the current moment, Nset (t) Set the pump frequency at the current moment, Q (t) is the cooling and heating capacity of the host at the current moment, f1(·) is the functional relationship between the host energy consumption and other parameters, obtained by the BP neural network-RF random forest combination model; Q c Indicates the summer cooling load, that is, the cooling capacity of the host in summer, Q h represents the winter heat load, i.e. the heating capacity of the main engine in winter, c p represents the specific heat capacity of water, G represents the flow rate of hot and cold water, t r With t s They are the return water temperature and supply water temperature of hot and cold water respectively; The host COP model is constructed using TRNSYS software, and the expression formula of the host COP model is: COP=Q / P ashp Among them, Q represents the host cooling / heat, P ashp Indicates the host energy consumption; The host temperature model is constructed using TRNSYS software, and the expression formula of the host temperature model is: T out(ashp) =T set(ashp) Among them, T out(ashp) Indicates the outlet water temperature of the main engine, T set(ashp) Indicates the host water supply set temperature; The host traffic model is constructed using TRNSYS software, and the host traffic model is expressed as follows: G out(ashp) =G in(ashp) Among them, G out(ashp) Indicates the water flow rate of the host, G in(ashp) Indicates the water flow rate of the host.
7. The air conditioning system modeling method based on BP neural network and RF random forest according to claim 1 is characterized in that: The water pump model in step S3 includes a water pump energy consumption model, a water pump flow model and a water pump temperature model; The input parameters of the water pump energy consumption model are the water pump set frequency and the control signal, and the output parameter is the water pump energy consumption; The input parameters of the water pump flow model include the water pump set frequency and control signal, and the output parameter is the water pump outlet flow; The input parameters of the water pump temperature model are the water pump inlet water temperature and the control signal, and the output parameter is the water pump outlet water temperature.
8. The air conditioning system modeling method based on BP neural network and RF random forest according to claim 7 is characterized in that: The water pump energy consumption model is constructed based on the BP neural network-RF random forest combination model. The expression formula of the water pump energy consumption model is: P pump(t) =f3(Nset (t) ) Among them, P pump(t) represents the energy consumption of the pump at time t, Nset (t) represents the pump setting frequency at time t, f3(·) represents the functional relationship between the pump energy consumption and the pump setting frequency, which is obtained by the BP neural network-RF random forest combination model; The water pump flow model is constructed based on the BP neural network-RF random forest combination model, and the expression formula of the water pump flow model is: G pump(t) =f2(Nset (t) ) Among them, G pump(t) represents the pump flow rate at time t, f2(·) represents the functional relationship between the pump flow rate and the pump setting frequency, which is obtained by the BP neural network-RF random forest combination model; The water pump temperature model is constructed using TRNSYS software, and the expression formula of the water pump temperature model is: T out(pump) =T in(pump) Among them, T out(pump) Pump outlet water temperature, T in(pump) Indicates the water pump inlet temperature.
9. The air conditioning system modeling method based on BP neural network and RF random forest according to claim 1 is characterized in that: The terminal model in step S3 is constructed using TRNSYS software; the terminal model input parameters include terminal water inlet temperature, building load, terminal water inlet flow rate and control signal; the output parameters include terminal water outlet temperature and terminal water outlet flow rate.
10. The air conditioning system modeling method based on BP neural network and RF random forest according to claim 9, characterized in that: The calculation formula of the terminal outlet water temperature is: in, Indicates the summer end water temperature, Indicates the terminal outlet water temperature in winter, t in(terminal) represents the terminal water inlet temperature, Q represents the host cooling / heating, c represents the specific heat capacity of hot and cold water, and G represents the hot and cold water flow rate; The calculation formula of the terminal water flow rate is: G out(terminal) =G in(terminal) Among them, G out(terminal) Indicates the end water flow rate, G in(terminal) Indicates the terminal water inlet flow rate.
Citation Information
Cited By
Cooling load prediction and energy-saving optimization system and method based on large model
CN121655079A