Heat exchange system data coordination method based on variational auto-encoder
By introducing physical constraints and segmented training methods into the variational autoencoder model, the problems of data coordination technical accuracy and physical constraint satisfaction are solved, coordination accuracy and generalization performance are improved, and rapid iterative convergence is achieved.
Patent Information
- Application Number
- CN202410552473.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-07
- Publication Date
- 2024-09-24
AI Technical Summary
Existing data coordination technology based on variational autoencoders has shortcomings in accuracy and physical constraint satisfaction, and has low generalization performance.
Construct a variational autoencoder model including encoder E and decoder D, give the decoder output layer physical meaning, expand the loss function through regularization, obtain synthetic samples based on hidden variable probability distribution sampling, and establish enthalpy grid linear interpolation model, accelerate the iterative calculation of physical loss terms, and use the segmented training method to speed up the iterative convergence of the model.
Improves the accuracy of data reconciliation and model interpretability, ensures results meet physical laws, enhances generalization performance, and significantly reduces training time.
Smart Images

Figure CN118690787A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of heat exchange system data coordination, and in particular to a heat exchange system data coordination method based on variational autoencoder. Background Art
[0002] Traditional data coordination technology can improve data quality and reduce measurement uncertainty by establishing an objective function and supplemented by constraints such as mass-energy conservation. Most of these methods require the construction of an accurate mechanism model of the system and are very time-consuming to calculate. In engineering practice, the mechanism model of complex processes is also difficult to obtain. Data coordination based on variational autoencoders has been a research hotspot in this field for several years. This method does not require the establishment of complex and accurate process models and is completely data-driven, but it cannot guarantee that the results strictly meet physical constraints and has poor interpretability. At the same time, it is affected by the selection of training data and cannot meet all dynamic processes, and the generalization performance is not high. Therefore, how to combine variational autoencoders and physical constraints on the existing basis to improve the accuracy of coordination is an urgent problem to be solved. Summary of the invention
[0003] Purpose of the invention: The purpose of the present invention is to provide a data coordination method for a heat exchange system based on a variational autoencoder, so as to solve the problems that the existing data coordination technology based on a variational autoencoder has low accuracy, the results do not satisfy the laws of physics, and have poor interpretability and generalization performance.
[0004] Technical solution: The present invention provides a method for coordinating heat exchange system data based on a variational autoencoder, comprising the following steps:
[0005] (1) Construct a variational autoencoder data coordination model including encoder E and decoder D;
[0006] (2) Give specific physical meanings to the output variables of each neuron in the output layer of decoder D, and then expand the control equations containing these physical variables into loss functions through regularization;
[0007] (3) Obtain synthetic samples based on latent variable probability distribution sampling as a supplementary medium for physical constraints;
[0008] (4) Train the constructed data coordination model and establish a gridded linear interpolation model for enthalpy values to accelerate the iterative calculation of physical loss terms;
[0009] (5) Use segmented training to accelerate the iterative convergence of the model and fix the weights after achieving the optimal effect; call the model weights to coordinate the real-time running data.
[0010] Furthermore, the step (1) is specifically as follows: the encoder E projects the training data into a low-dimensional latent space, extracts the probability distribution mean μ and standard deviation σ, obtains the latent variable Z = μ + ε × σ through reparameterized sampling, and sends it to the decoder D for decoding to obtain the reconstruction result of the training data
[0011] Among them, ε represents random sampling from the standard normal distribution N(0.1), Represents the reconstructed value of the i-th parameter, and the parameters of the model are optimized through training; the encoder E and the decoder D are both fully connected layers connected in sequence.
[0012] Furthermore, the step (2) is specifically as follows: the loss function expression formula is as follows:
[0013] Loss function = λ VAE E VAE +λ p E p +ERR penalty
[0014] Among them, E VAE is the variational autoencoder loss term, E p is the physical loss term, ERR penalty is the penalty function term. VAE and λ p are the coefficients of the variational autoencoder loss term and the physical loss term, respectively;
[0015] Among them, the variational autoencoder loss function term E VAE The expression is as follows
[0016]
[0017] Among them, the sample data at time t = s is x s ={x s1 ,x s2 ,…,x sk}, k is the number of model parameters, x sk is the kth variable value in the sth training sample, is the reconstructed value of the kth variable in the sth training sample. j and σ j They are respectively the expectation and variance of the jth latent variable probability distribution of the input data projected into the latent space by the encoder;
[0018] The physical loss expression is as follows
[0019]
[0020] in, is the network output vector with dimension k. In this model, It consists of two parts, namely, the reconstruction value of the model for the input data And the data obtained by decoding the synthetic sample as a supplementary medium for physical constraints Right now P l is the weight of each equality constraint in the physical loss term, l 0 is the number of equality constraints, f l (·) is the lth equality constraint equation;
[0021] Among them, the physical loss term mainly includes the mass conservation and energy conservation of each device in the heat exchange system. The specific expression is as follows:
[0022]
[0023] In the formula, m in and m out is the inlet and outlet mass flow rate of each device in the heat exchange system, h in and h out is the corresponding inlet and outlet enthalpy. The penalty function term ERR penalty The value of E VAE The specific expressions are as follows:
[0024]
[0025] In the formula, λ e is the penalty coefficient, E VAE is the variational autoencoder loss term, and ε is the piecewise control limit.
[0026] Furthermore, the specific process of step (3) is as follows: pre-train the model to obtain the probability distribution N of the latent variables in the latent space j (μ j ,σ j ), and then during the training process, latent variable synthetic samples z are generated by sampling from the above distribution synthetic ~N(μ j ,σ j ), and then input into the decoder, and after decoding, participate in the calculation of physical loss items.
[0027] Furthermore, in step (4), the enthalpy gridding linear interpolation model is as follows:
[0028] Select the appropriate range and step size to construct a two-dimensional grid of temperature and pressure (T i ,Pj)∈R i×j , calculate and record the enthalpy value h at each node in the grid i,j, establish the enthalpy grid linear proxy model f(T,P); in the process of model training, according to the temperature T and pressure P, quickly locate in the temperature and pressure two-dimensional grid to obtain the closest grid coordinate point (T i ,P j ), the approximate result of the enthalpy at a specific temperature and pressure is obtained by linear interpolation; the expression is as follows:
[0029] h(T,P)≈f(T,P)=h i,j -(T i -T)*(h i,j -h i-1,j ).
[0030] Furthermore, in step (5), the specific process of using the segmented training method to accelerate the iterative convergence of the model is as follows:
[0031] During the training process, a variational autoencoder loss term threshold ε is given. When the variational autoencoder loss term is greater than this value, that is, E VAE When ≥ε, no physical loss term is calculated, that is, E p =0, and add the penalty function term ERR penalty , the specific value is several times the regression loss term, that is, ERR penalty =λ e E VAE ; When the regression loss term is not greater than the threshold, that is, E VAE ≤ε, let ERR penalty = 0, calculate the physical loss term, and the loss function at this time is E VAe With E p Weighted sum.
[0032] The present invention provides a heat exchange system data coordination system based on a variational autoencoder, comprising:
[0033] Data coordination module: used to build a variational autoencoder data coordination model including encoder E and decoder D;
[0034] Loss function module: used to give specific physical meanings to the output variables of each neuron in the output layer of decoder D, and then expand the control equations containing these physical variables into loss functions through regularization;
[0035] Supplementary medium module: used to obtain synthetic samples based on latent variable probability distribution sampling as a supplementary medium for physical constraints;
[0036] Iteration module: used to train the constructed data coordination model and establish the enthalpy grid linear interpolation model to accelerate the iterative calculation of physical loss terms;
[0037] Coordination module: used to accelerate the iterative convergence of the model using the segmented training method, fix the weights after achieving the optimal effect; call the model weights to coordinate the real-time running data.
[0038] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages: extracting hidden variables from the original sample through the feature coding structure, then decoding and reconstructing through the decoder, comprehensively considering the mass conservation and energy conservation constraints, expanding them into loss functions through regularization, obtaining synthetic samples based on the hidden variable probability distribution sampling, as a supplementary medium for physical constraints, and establishing an enthalpy gridded linear interpolation model to accelerate the iterative calculation of the physical loss term, while using the segmented training method to further accelerate the iterative convergence of the model, greatly reducing the time required for training. Compared with the original method, this method can not only ensure that the results meet the laws of physics, but also have higher accuracy, and the interpretability and generalization ability of the model have also been enhanced to a certain extent. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 It is a schematic diagram of the process of the present invention;
[0040] Figure 2 It is a schematic diagram of the heat exchange system of the present invention;
[0041] Figure 3 is a schematic diagram of a data coordination model of the present invention;
[0042] Figure 4 It is a flow chart of segmented training of the present invention;
[0043] FIG. 5( a ) is a scatter plot comparing data before and after data coordination of the present invention, and FIG. 5( b ) is a comparison diagram of outlier reconstruction effects. DETAILED DESCRIPTION
[0044] The technical solution of the present invention is further described below in conjunction with the accompanying drawings.
[0045] like Figure 1 As shown, a data coordination method for a heat exchange system based on a variational autoencoder according to an embodiment of the present invention comprises the following steps:
[0046] (1) Figure 3 As shown in the figure, a variational autoencoder data coordination model including encoder E and decoder D is constructed; specifically, encoder E projects the training data into a low-dimensional latent space, extracts the mean μ and standard deviation σ of the probability distribution, obtains the latent variable Z = μ + ε × σ through reparameterized sampling, and sends it to decoder D for decoding to obtain the reconstruction result of the training data.
[0047] Among them, ε represents random sampling from the standard normal distribution N(0.1), Represents the reconstructed value of the i-th parameter, and the parameters of the model are optimized through training; the encoder E and the decoder D are both fully connected layers connected in sequence.
[0048] (2) Give specific physical meanings to the output variables of each neuron in the output layer of the decoder D, and then expand the control equations containing these physical variables into a loss function through regularization; specifically, the loss function expression formula is as follows:
[0049] Loss function = λ VAE E VAE +λ p E p +ERR penalty
[0050] Among them, E VAE is the variational autoencoder loss term, E p is the physical loss term, ERR penalty is the penalty function term. VAE and λ p are the coefficients of the variational autoencoder loss term and the physical loss term, respectively;
[0051] Among them, the variational autoencoder loss function term E VAE The expression is as follows
[0052]
[0053] Among them, the sample data at time t = s is x s ={x s1 ,x s2 ,…,x sk}, k is the number of model parameters, x sk is the kth variable value in the sth training sample, is the reconstructed value of the kth variable in the sth training sample. j and σ j They are respectively the expectation and variance of the jth latent variable probability distribution of the input data projected into the latent space by the encoder;
[0054] The physical loss expression is as follows
[0055]
[0056] in, is the network output vector with dimension k. In this model, It consists of two parts, namely, the reconstruction value of the model for the input data And the data obtained by decoding the synthetic sample as a supplementary medium for physical constraints Right now P lis the weight of each equality constraint in the physical loss term, l 0 is the number of equality constraints, f l (·) is the lth equality constraint equation;
[0057] Among them, the physical loss term mainly includes the mass conservation and energy conservation of each device in the heat exchange system. The specific expression is as follows:
[0058]
[0059] In the formula, m in and m out is the inlet and outlet mass flow rate of each device in the heat exchange system, h in and h out is the corresponding inlet and outlet enthalpy. The penalty function term ERR penalty The value of E VAE The specific expressions are as follows:
[0060]
[0061] In the formula, λ e is the penalty coefficient, E VAE is the variational autoencoder loss term, and ε is the piecewise control limit.
[0062] (3) Based on the latent variable probability distribution sampling, synthetic samples are obtained as a supplementary medium for physical constraints. The specific process is as follows: pre-train the model to obtain the latent variable probability distribution N in the latent space. j (μ j ,σ j ), and then during the training process, latent variable synthetic samples z are generated by sampling from the above distribution synthetic ~N(μ j ,σ j ), and then input into the decoder, and after decoding, participate in the calculation of physical loss items.
[0063] (4) Train the constructed data coordination model and establish an enthalpy grid linear interpolation model to accelerate the iterative calculation of the physical loss term; the enthalpy grid linear interpolation model is as follows:
[0064] Select the appropriate range and step size to construct a two-dimensional grid of temperature and pressure (T i ,P j )∈R i×j , calculate and record the enthalpy value h at each node in the grid i,j , establish the enthalpy grid linear proxy model f(T,P); in the process of model training, according to the temperature T and pressure P, quickly locate in the temperature and pressure two-dimensional grid to obtain the closest grid coordinate point (T i ,Pj ), the approximate result of the enthalpy at a specific temperature and pressure is obtained by linear interpolation; the expression is as follows:
[0065] h(T,P)≈f(T,P)=h i,j -(T i -T)*(h i,j -h i-1,j )
[0066] (5) Figure 4 As shown in the figure, the segmented training method is used to speed up the iterative convergence of the model, and the weight is fixed after the optimal effect is achieved; the model weight is called to coordinate the real-time running data. The specific process of using the segmented training method to speed up the iterative convergence of the model is as follows:
[0067] During the training process, a variational autoencoder loss term threshold ε is given. When the variational autoencoder loss term is greater than this value, that is, E VAE When ≥ε, no physical loss term is calculated, that is, E p =0, and add the penalty function term ERR penalty , the specific value is several times the regression loss term, that is, ERR penalty =λ e E VAE ; When the regression loss term is not greater than the threshold, that is, E VAE ≤ε, let ERR penalty = 0, calculate the physical loss term, and the loss function at this time is E VAE With E p Weighted sum.
[0068] Combined with experimental data, the present invention provides optional specific implementation schemes as follows:
[0069] Take a 1000MW power plant high-voltage heater system as an example. Figure 2 As shown in Table 1, the relevant measurement points and constraints selected from the historical operation database are shown in Table 1 and Table 2 respectively:
[0070] Table 1 List of measuring points
[0071]
[0072] Table 2 Constraint list
[0073]
[0074] The training set contains 2000 groups of samples, and the test sets I and II contain 300 and 1210 groups of samples respectively. Figure 5(a) is a scatter plot of the test set I before and after coordination. The discreteness of the data has been significantly suppressed. At the same time, the data after coordination strictly meets the conservation of mass, and the average energy conservation deviation of the samples is reduced to 0.72% before coordination. The bias is added to the data in the test set II and reconstructed through the coordination model. The result is shown in Figure 5(b). The data coordination model based on the embedded mass-energy conservation heat exchange system proposed in the present invention can effectively reconstruct outliers.
[0075] The embodiment of the present invention further provides a heat exchange system data coordination system based on a variational autoencoder, comprising:
[0076] Data coordination module: used to build a variational autoencoder data coordination model including encoder E and decoder D;
[0077] Loss function module: used to give specific physical meanings to the output variables of each neuron in the output layer of decoder D, and then expand the control equations containing these physical variables into loss functions through regularization;
[0078] Supplementary medium module: used to obtain synthetic samples based on latent variable probability distribution sampling as a supplementary medium for physical constraints;
[0079] Iteration module: used to train the constructed data coordination model and establish the enthalpy grid linear interpolation model to accelerate the iterative calculation of physical loss terms;
[0080] Coordination module: used to accelerate the iterative convergence of the model using the segmented training method, fix the weights after achieving the optimal effect; call the model weights to coordinate the real-time running data.
Claims
1. A data coordination method for a heat exchange system based on a variational autoencoder, characterized in that: The following steps are involved: (1) Construct a variational autoencoder data coordination model including encoder E and decoder D; (2) Give specific physical meanings to the output variables of each neuron in the output layer of decoder D, and then expand the control equations containing these physical variables into loss functions through regularization; (3) Obtain synthetic samples based on latent variable probability distribution sampling as a supplementary medium for physical constraints; (4) Train the constructed data coordination model and establish a gridded linear interpolation model for enthalpy values to accelerate the iterative calculation of physical loss terms; (5) Use segmented training to speed up the iterative convergence of the model and fix the weights after achieving the optimal effect; Call model weights to coordinate real-time running data.
2. According to claim 1, a heat exchange system data coordination method based on variational autoencoder is characterized in that: The step (1) is specifically as follows: the encoder E projects the training data into a low-dimensional latent space, extracts the probability distribution mean μ and standard deviation σ, obtains the latent variable Z=μ+ε×σ through reparameterized sampling, and sends it to the decoder D for decoding to obtain the reconstruction result of the training data. Among them, ε represents random sampling from the standard normal distribution N(0.1), Represents the reconstructed value of the i-th parameter, and the parameters of the model are optimized through training; the encoder E and the decoder D are both fully connected layers connected in sequence.
3. The method for data coordination of a heat exchange system based on a variational autoencoder according to claim 1, characterized in that: The step (2) is specifically as follows: The loss function expression formula is as follows: Loss function=λ VAE E VAE +λ p E p +ERR penalty R Among them, E VAE is the variational autoencoder loss term, E p is the physical loss term, E penalty is the penalty function term. VAE and λ p are the coefficients of the variational autoencoder loss term and the physical loss term, respectively; Among them, the variational autoencoder loss function term E VAE The expression is as follows Among them, the sample data at time t = s is x s ={x s1 ,x s2 ,…,x sk }, k is the number of model parameters, x sk is the kth variable value in the sth training sample, is the reconstructed value of the kth variable in the sth training sample. j and σ j They are respectively the expectation and variance of the jth latent variable probability distribution of the input data projected into the latent space by the encoder; The physical loss expression is as follows in, is the network output vector with dimension k. In this model, It consists of two parts, namely, the reconstruction value of the model for the input data And the data obtained by decoding the synthetic sample as a supplementary medium for physical constraints Right now P l is the weight of each equality constraint in the physical loss term, l0 is the number of equality constraints, f l (·) is the lth equality constraint equation; Among them, the physical loss term mainly includes the mass conservation and energy conservation of each device in the heat exchange system. The specific expression is as follows: In the formula, m in and m out is the inlet and outlet mass flow rate of each device in the heat exchange system, h in and h out is the corresponding inlet and outlet enthalpy. The penalty function term ERR penalty The value of E VAE The specific expressions are as follows: In the formula, λ e is the penalty coefficient, E VAE is the variational autoencoder loss term, and ε is the piecewise control limit.
4. The method for data coordination of a heat exchange system based on a variational autoencoder according to claim 1, characterized in that: The specific process of step (3) is as follows: pre-train the model to obtain the probability distribution N of the latent variables in the latent space j (μ j ,σ j ), and then during the training process, latent variable synthetic samples z are generated by sampling from the above distribution synthetic ~N(μ j ,σ j ), and then input into the decoder, and after decoding, participate in the calculation of physical loss items.
5. The method for data coordination of a heat exchange system based on a variational autoencoder according to claim 1, characterized in that: In the step (4), the enthalpy gridding linear interpolation model is as follows: Select the appropriate range and step size to construct a two-dimensional grid of temperature and pressure (T i ,P j )∈R i×j , calculate and record the enthalpy value h at each node in the grid i,j , establish the enthalpy grid linear proxy model f(T,P); in the process of model training, according to the temperature T and pressure P, quickly locate in the temperature and pressure two-dimensional grid to obtain the closest grid coordinate point (T i ,P j ), the approximate result of the enthalpy at a specific temperature and pressure is obtained by linear interpolation; the expression is as follows: h(T,P)≈f(T,P)=h i,j -(T i -T)*(h i,j -h i-1,j )。 6. The method for data coordination of a heat exchange system based on a variational autoencoder according to claim 1, characterized in that: In step (5), the specific process of using the segmented training method to accelerate the iterative convergence of the model is as follows: During the training process, a variational autoencoder loss term threshold ε is given. When the variational autoencoder loss term is greater than this value, that is, E VAE >ε, no physical loss term is calculated, that is, E p =0, and add the penalty function term ERR penalty , the specific value is several times the regression loss term, that is, ERR penalty =λ e E VAE ; When the regression loss term is not greater than the threshold, that is, E VAE ≤ε, let ERR penalty = 0, calculate the physical loss term, and the loss function at this time is E VAE With E p Weighted sum.
7. A heat exchange system data coordination system based on variational autoencoder, characterized in that: include: Data coordination module: used to build a variational autoencoder data coordination model including encoder E and decoder D; Loss function module: used to give specific physical meanings to the output variables of each neuron in the output layer of decoder D, and then expand the control equations containing these physical variables into loss functions through regularization; Supplementary medium module: used to obtain synthetic samples based on latent variable probability distribution sampling as a supplementary medium for physical constraints; Iteration module: used to train the constructed data coordination model and establish the enthalpy grid linear interpolation model to accelerate the iterative calculation of physical loss terms; Coordination module: used to accelerate the iterative convergence of the model using the segmented training method and fix the weights after achieving the optimal effect; Call model weights to coordinate real-time running data.
Citation Information
Cited By
Satellite infrared multi-probe metadata homogenization method based on variational self-coding
CN121599003A
Satellite infrared multi-detector data homogenization method based on variational autoencoding
CN121599003B
