A Neural Network Training Method for Microchannel Radiator Model
By performing data normalization processing in the BP neural network, the training time of BP neural network when training the microchannel heat sink model is solved, and it is easy to fall into local minimum values and overfitting, achieving a more stable and efficient training process.
Patent Information
- Application Number
- CN202411825624.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-04-08
AI Technical Summary
When training microchannel heat sink models, BP neural networks have problems such as excessive training time and easy to fall into local minimum values and overfitting, especially when training data is small, the training stability is poor.
By performing data normalization processing in the BP neural network, all data samples are forced to be under a unified data distribution and normalized before applying the activation function to stabilize the values of the intermediate output, reduce the risk of overfitting, and improve the attenuation speed of the learning rate.
Through normalization processing, the convergence speed of the BP neural network is improved, the risk of overfitting is reduced, and the training of the microchannel heat sink model is more stable and efficient.
Smart Images

Figure CN119782811A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of microchannel radiators, and in particular to a neural network training method for a microchannel radiator model. Background Art
[0002] Microchannel Radiator The training of the microchannel radiator model is to achieve the role of the reduced-order model by learning the mapping relationship between the input and output parameters in the sample data set (the input parameters are the model geometry parameters and boundary condition parameters; the output is the flow loss coefficient and the fluid temperature rise). The neural network algorithm has good nonlinear fitting ability and can approximate this mapping relationship with arbitrary precision. Among them, the BP neural network is a simple and effective neural network structure. Through forward propagation and error back propagation, the neuron weights are updated to achieve the purpose of data regression. However, the BP neural network has its inherent shortcomings, such as being sensitive to data, resulting in long training time, easy to fall into local minima, and overfitting. In the process of training the microchannel radiator and the shunt network model, the training data limits the stability of the BP neural network training. When the training data is about 150, the neural network training is performed multiple times, and the training effect is quite different. Even if the number of hidden layers is increased, there is no significant improvement. When the training data reaches about 500, the stability of multiple neural network training is effectively improved, which can meet the prediction accuracy requirements, but with the increase of training data, it will inevitably lead to an increase in training time and a slow convergence speed. Summary of the invention
[0003] In view of this, an object of the present invention is to provide a neural network training method for a microchannel radiator model to solve the technical problems mentioned in the prior art.
[0004] A neural network training method for a microchannel radiator model comprises the following steps:
[0005] Set the number of hidden layers, learning rate, number of neurons, activation function, and transfer function of the microchannel radiator model;
[0006] Acquiring input parameters and / or output results of the microchannel radiator to form a data set, normalizing the data set, and dividing the data set into a training set and a test set according to a preset test rate;
[0007] Selecting a learning training function, and performing simulation training on the normalized training set in the microchannel radiator model to construct a training model;
[0008] Calling the training model to perform simulation training on the normalized test set to obtain a predicted value of the test set;
[0009] Through the normalized mapping relationship, the BP neural network performs a denormalization process on the predicted value of the test set to obtain the true value of the test set;
[0010] Calculate the difference between the true value and the predicted value of the test set to obtain a predicted result value;
[0011] The predicted result value is subjected to error back propagation through a BP neural network to update the weights of the output layer and the hidden layer of the microchannel radiator model, so that the output of the microchannel radiator model continuously approaches the predicted value.
[0012] Optionally, the input parameters of the microchannel heat sink are one or more of microchannel width, heat flux, fluid velocity, and the number of microchannels.
[0013] Optionally, the output parameter of the microchannel radiator is one or more of the inlet and outlet temperature difference, average inlet temperature, coolant flow rate, and average pressure of the microchannel.
[0014] Optionally, the training model is a BPNET model, an MLP model or a CNN model.
[0015] Optionally, the number of hidden layers of the microchannel radiator model is two.
[0016] Optionally, the predicted value is obtained by the BP neural network calling a sim function and predicting based on a forward propagation method;
[0017] The true value is obtained by calling the train function of the BP neural network and training based on the forward propagation method.
[0018] Optionally, the forward propagation method is:
[0019] Input the data samples of the input layer into the first hidden layer;
[0020] The first hidden layer has three first neurons, each of which multiplies the data samples input from the input layer by corresponding weights and adds them to obtain a first input parameter, and then maps the three first input parameters through activation functions to obtain three first output parameters, and the three first output parameters are respectively input into the second hidden layer;
[0021] The second hidden layer has two second neurons, each of which multiplies the three first output parameters by corresponding weights and adds them to obtain a second input parameter, and then maps the two second input parameters through an activation function to obtain two second output parameters, and the two second output parameters are respectively input into the output layer;
[0022] The output layer has a third neuron, which multiplies the two second output parameters by corresponding weights and adds them to obtain a third input parameter, and then maps the third input parameter through an activation function to obtain a third output parameter for output.
[0023] Optionally, when the BP neural network performs error back propagation on the prediction result value, it generates increments of the weights of all output layers and hidden layers of the microchannel radiator model, and obtains the gradient of the corresponding weights according to the increments of the weights corresponding to the output layer and the hidden layer, and subtracts the gradient of the corresponding weight from the increment of the weight, so that the weight of the microchannel radiator model develops in the opposite direction of the gradient to update the weights of the output layer and the hidden layer of the microchannel radiator model.
[0024] Optionally, the error back propagation method of the BP neural network is:
[0025] Determine the parameters of the BP neural network according to the training set, and the BP neural network adopts a generalized perceptron learning rule to iteratively update the parameters of the BP neural network, wherein;
[0026] Calculate the mean square error between the output layer of the BP neural network and the target value of the training set;
[0027] The calculated mean square error is transmitted back to each hidden layer of the BP neural network to calculate the parameter change of each hidden layer of the BP neural network;
[0028] The BP neural network is based on a gradient descent strategy, and completes an iterative update of the parameters of the BP neural network according to the negative gradient direction of the parameter change;
[0029] Then, the above steps are repeated to continuously iterate and update the parameters of the BP neural network until the parameters of the BP neural network are within a preset range, and the iterative update is stopped.
[0030] Optionally, the parameters of the BP neural network are the weight and threshold of each neuron in the microchannel radiator model.
[0031] The beneficial effects that the present invention can produce include:
[0032] The present invention provides a neural network training method for a microchannel radiator model. When training the microchannel radiator model, before applying the activation function, the data set is first normalized so that all data samples are forced to be under a uniform data distribution, and then the data set is input to the next layer, so that the values of the intermediate outputs of the entire BP neural network in each layer are more stable, so that the deep neural network is easier to converge and the risk of overfitting of the microchannel radiator model is reduced. In addition, by adding normalization processing to the BP neural network, a large initial learning rate can be used to increase the decay rate of the learning rate during the training process, thereby increasing the convergence speed of the algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 A schematic flow chart of a neural network training method for a microchannel radiator model of the present invention;
[0034] Figure 2 It is a principle diagram of the BP neural network in the present invention training the training set;
[0035] Figure 3 It is the training residual graph of the BPNET model in the present invention;
[0036] Figure 4 It is a training scatter plot of the BPNET model in the present invention;
[0037] Figure 5 is the training residual graph of the MLP model in the present invention;
[0038] Figure 6 is the training residual graph of the MLP model in the present invention;
[0039] Figure 7 is the training residual graph of the CNN model in the present invention;
[0040] Figure 8 It is the training residual graph of the CNN model in the present invention. DETAILED DESCRIPTION
[0041] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0042] See also Figure 1As shown, the present invention provides a neural network training method for a microchannel radiator model, comprising the following steps: setting the number of hidden layers (two layers), learning rate, number of neurons, activation function (using S-type activation function) and transfer function of the microchannel radiator model; obtaining the input parameters and / or output results of the microchannel radiator to form a data set, and normalizing the data set so that the data set is concentrated in E-1, and at the same time dividing the data set into a training set and a test set according to a preset test rate; selecting a learning training function, and performing simulation training on the normalized training set in the microchannel radiator model to construct a training model; wherein the training model is a BPNET model, an MLP model or a CNN model. Calling the training model to perform simulation training on the normalized test set to obtain the predicted value of the test set; through the normalized mapping relationship, the BP neural network performs denormalization on the predicted value of the test set to obtain the true value of the test set; through R 2 The calculation formula calculates the difference between the true value and the predicted value of the test set to obtain the predicted result value; the predicted result value is back-propagated through the BP neural network to update the weights of the output layer and hidden layer of the microchannel radiator model, so that the output of the microchannel radiator model continues to approach the predicted value.
[0043] It should be noted that E-1 is a digital communication standard with a data rate of 2.048Mbps and can transmit 30 channels of voice information. Lines that meet this standard are called E-1 lines. Standards with higher rates include E-2 (8Mbps) and E-3 (34Mbps), which are collectively referred to as E series standards.
[0044] In the above, when training the microchannel radiator model, before applying the activation function, the data set is first normalized so that all data samples are forced to be under a uniform data distribution, and then the data set is input to the next layer to make the values of the intermediate outputs of the entire BP neural network in each layer more stable, so that the deep neural network is easier to converge and the risk of overfitting the microchannel radiator model is reduced. In addition, by adding normalization to the BP neural network, a large initial learning rate can be used to increase the decay rate of the learning rate during the training process, thereby increasing the convergence speed of the algorithm.
[0045] In this embodiment, after the data set is normalized, it is equivalent to using only the linear part of the S-type activation function, which can alleviate the gradient vanishing problem in the back propagation of the S-type activation function. For example, the activation input value of the deep neural network before the nonlinear transformation, as the network depth deepens or during the training process, its distribution gradually shifts or changes, and the overall distribution gradually approaches the upper and lower limits of the value range of the nonlinear function, which will cause the gradient of the low-level neural network to disappear during back propagation; Among them, the BN layer uses certain normalization means to forcibly pull the input value distribution of any neuron in each layer of the neural network back to a standard normal distribution with a mean of 0 and a variance of 1, so that the activation input value falls in the linear region where the nonlinear function is more sensitive to the input, and its corresponding derivative is far away from the derivative saturation region, so that a small change in the input will lead to a large change in the loss function, avoiding the problem of gradient vanishing, and the learning convergence speed is fast, which can greatly speed up the training speed.
[0046] In the above, the input parameters of the microchannel radiator are one or more of microchannel width, heat flux, fluid velocity, and number of microchannels. The output parameters of the microchannel radiator are one or more of the inlet and outlet temperature difference of the microchannel, the average inlet temperature, the coolant flow rate, and the average pressure.
[0047] Furthermore, the predicted value is predicted by the BP neural network by calling the sim function and based on the forward propagation method; the true value is obtained by calling the train function of the BP neural network and training based on the forward propagation method. Specifically, the forward propagation method is: inputting the data sample of the input layer into the first hidden layer; the first hidden layer has three first neurons, each of which multiplies the data sample input by the input layer by the corresponding weight and adds them to obtain a first input parameter, and then the three first input parameters are respectively mapped by the activation function to obtain three first output parameters, and the three first output parameters are respectively input into the second hidden layer; the second hidden layer has two second neurons, each of which multiplies the three first output parameters by the corresponding weight and adds them to obtain a second input parameter, and then the two second input parameters are respectively mapped by the activation function to obtain two second output parameters, and the two second output parameters are respectively input into the output layer; the output layer has a third neuron, the third neuron multiplies the two second output parameters by the corresponding weight and adds them to obtain a third input parameter, and then the third input parameter is mapped by the activation function to obtain the third output parameter for output.
[0048] In this embodiment, the input layer is assumed to have two data samples x1 and x2, and the two data samples x1 and x2 are input into the first hidden layer. The first input parameter e1 of any first neuron is:
[0049] e1=x1w1+x2w2, where w1 is the weight of data sample x1, and w2 is the weight of data sample x2; the first input parameter e1 is mapped through the activation function to obtain the first output parameter f1(e) which is input into the second hidden layer. Similarly, any second neuron multiplies the three first output parameters f1(e) output by the first hidden layer by the corresponding weights and adds them up to obtain a second input parameter e2. The second input parameter e2 is mapped through the activation function to obtain the second output parameter f2(e) which is input into the output layer; the third neuron multiplies the two second output parameters f2(e) by the corresponding weights and adds them up to obtain a third input parameter e3. The third input parameter e3 is mapped through the activation function to obtain the third output parameter f3(e) for output.
[0050] Furthermore, when the BP neural network performs error back propagation on the predicted result value, it generates the increment of the weights of all the output layers and hidden layers of the microchannel radiator model, and obtains the gradient of the corresponding weight according to the increment of the weight corresponding to the output layer and the hidden layer, and subtracts the gradient of the corresponding weight from the increment of the weight, so that the weight of the microchannel radiator model develops in the opposite direction of the gradient, so as to update the weights of the output layer and the hidden layer of the microchannel radiator model. Specifically, the error back propagation method of the BP neural network is as follows: the parameters of the BP neural network are determined according to the training set, and the BP neural network uses the generalized perceptron learning rule (MLP) to iteratively update the parameters of the BP neural network, wherein the mean square error between the output layer and the target value of the training set in the BP neural network is calculated; the calculated mean square error is reversely transmitted to each hidden layer of the BP neural network, and the parameter change of each hidden layer of the BP neural network is calculated; the BP neural network is based on the gradient descent strategy, and the parameters of the BP neural network are iteratively updated once according to the negative gradient direction of the parameter change; then the above steps are repeated to continuously iteratively update the parameters of the BP neural network until the parameters of the BP neural network are within the preset range, and the iterative update is stopped. In the above, the parameters of the BP neural network are the weight and threshold of each neuron in the microchannel radiator model.
[0051] In the above, given the training set D = {(x1, y1), (x2, y2), ..., (x m ,y m )}, the weight and threshold of each neuron in the BP neural network are determined by the training set. Among them, the BP neural network is an iterative learning algorithm. The update of any parameter θ is: θ1=θ0+Δθ, where θ1 is the updated parameter, θ0 is the initial parameter, and Δθ is the parameter change. Specifically, Figure 2 As shown, for any training example (x k ,y k ), assuming that the output of the BP neural network is a(3) =(a1 (3) , a2 (3) ), then the mean square error of the BP neural network on this training example is:
[0052]
[0053] Among them, E k is the mean square error value (or loss value) of the kth sample; I3 is the number of neurons in the output layer; is the output value of the neuron in the jth output layer (the predicted value of the BP neural network), and the superscript (3) indicates the activation value of the third output layer; y j Represents the target value of the neuron in the jth output layer (the true value of the BP neural network).
[0054] In the above, the error of the BP neural network back propagation is the mean square error of all training examples in the training set, and the parameters on the BP neural network are adjusted by this error. The BP neural network is based on the gradient descent strategy and adjusts the parameters in the negative gradient direction of the target, where the parameter change Δθ is:
[0055]
[0056] Among them, the parameter change Δθ determines how to update the parameter θ to reduce the error; η is the learning rate of the microchannel radiator model, which represents the step size of each update of the parameter θ. The learning rate η is a hyperparameter used to control the update amplitude, which is usually a positive number less than 1. If η is too large, it may lead to unstable training; if η is too small, the training process may be very slow; E k is the error (or loss) function, which is used to measure the gap between the predicted value and the actual value. k represents the error of the kth sample; is the error function E k The partial derivative of the parameter θ represents the rate of change of the error relative to the parameter θ, which is used to determine whether the error increases or decreases with the change of the parameter θ, thereby guiding the update direction of the parameter.
[0057] Depend on Figure 2 It can be seen that in the neurons of the output layer, the parameter θ (2) First affect z (3) , which in turn affects the output value a (3) , and finally affects E k :
[0058]
[0059] in, To calculate the loss function E using the chain rule k About weight The partial derivative of is the partial derivative of the loss function with respect to the activation value of the output layer; The partial derivative of the output activation with respect to the weighted input; Weights for weighted input The partial derivative of . is the activation value of the output layer neuron jjj; y j is the target value (true label); is the loss function with respect to the output activation value The partial derivative of , usually used as the error; Weighted input for activation function f The derivative of is the activation value of the hth neuron in the previous layer (hidden layer), reflecting the influence of the combined output error, the derivative of the activation function, and the output of the previous layer on the weight of the current layer. is the assumed activation function, such as the sigmoid function Its derivative is f(x)(1-f(x)), where Replacing it with a specific expression clarifies the specific form of the activation function, making it easier to calculate. The above expression is ultimately simplified to the specific form of the partial derivative of the loss function with respect to the weight parameter:
[0060]
[0061] in, is the error term of the jth output layer neuron; is the loss function E k Weighted input to output layer neurons The partial derivative of Output value and the true value y j The difference between and (i.e., prediction error); is the derivative of the output layer activation function (such as the sigmoid function).
[0062] In the above, when h = 0, The parameters of the output layer θ jh (2) It can be updated to:
[0063]
[0064] in, is the weight from the hth neuron in the hidden layer to the jth neuron in the output layer in the current network; is the loss function E Weight The partial derivative of ; η is the learning rate, which controls the step size of each update.
[0065] Similarly, the parameters θ of the hidden layer hi (1) Updated to:
[0066]
[0067] Among them, E k is the loss function; is the activation value of the hth neuron in the hidden layer; is the weighted input of the hhth neuron in the hidden layer; is the weight from the i-th input neuron to the h-th neuron in the hidden layer. By the chain rule, the gradient is divided into three parts: is the partial derivative of the loss with respect to the hidden layer output; is the derivative of the hidden layer activation function with respect to its input; is the partial derivative of the weighted input of the hidden layer to the weight. l3 is the number of neurons in the output layer, Weight the input to the output layer for the loss The partial derivative of is the partial derivative of the weighted input of the i-th neuron in the output layer with respect to the h-th activation value in the hidden layer (equal to the connection weight ); is the derivative of the hidden layer activation function. The activation function is set to the Sigmoid function In the above, the output layer error Expressed as error term
[0068]
[0069] in, is the error term of the hth neuron in the hidden layer; E k is the loss function; is the activation value of the hth neuron in the hidden layer; l2 is the number of neurons in the output layer; is the error term of the jth neuron in the output layer; is the weight connecting the hth neuron in the hidden layer and the jth neuron in the output layer.
[0070] In the above, the gradient of the weight and the increment of the weight are in a one-to-one correspondence. The increment of each weight is obtained by calculating its corresponding gradient. In the BP algorithm, the process of weight update is to subtract the complete gradient. Subtracting the gradient means adjusting the weight in the opposite direction of the gradient to reduce the error. Specifically:
[0071]
[0072] Among them, η is the learning rate, which controls the update step size; is the partial derivative of the loss function with respect to the weight. Each iteration adjusts the weight along the negative gradient direction to minimize the loss function E k .
[0073] In this embodiment, the performance of the microchannel heat sink model is determined by five evaluation indicators: mean absolute error (MAE), mean square error (MSE), determination coefficient (R 2 ), model size, and test duration.
[0074] In the above, Mean Absolute Error (MAE) is an indicator used to measure the gap between the predicted value and the true value. Its mathematical expression is:
[0075]
[0076] Where m is the number of samples; xi is the i-th input sample; yi is the true value of the i-th sample; h(x i ) is the model h for sample x i The predicted value of .
[0077] The mean squared error (MSE) is used to evaluate the mean of the sum of squares of the prediction errors of the microchannel radiator model. The smaller the value of MSE, the higher the accuracy of the microchannel radiator model prediction.
[0078] Among them, MSE has higher sensitivity to larger errors, and its mathematical expression is:
[0079]
[0080] Where n is the number of samples; f(x) is the model's predicted value for sample x; and y is the true value of the sample.
[0081] Coefficient of determination (R-squared, R 2 ) is an indicator commonly used to measure the degree of fit of the regression microchannel radiator model. Its value range is between 0 and 1. The closer it is to 1, the better the fit of the microchannel radiator model. Its mathematical expression is:
[0082]
[0083] Among them, y i is the true value; j is the model prediction value; y is the mean of all true values; is the residual sum of squares (model error); is the total sum of squares (total variation in the data).
[0084] R2 It can help us understand the extent to which the microchannel heat sink model can explain the variation in the data;
[0085] The model size is the size of the BP neural network and its parameters after the microchannel radiator model is trained;
[0086] The test time is the time required for the microchannel radiator model to complete a set of data tests on a unified platform.
[0087] In this embodiment, the present invention not only introduces MAE, MSE, R 2 , model size and test time, and also performed residual analysis and regression analysis on the regression models based on BPNET, MLP and CNN, thereby observing the residual distribution and regression distribution of each neural network on the microchannel radiator and shunt network CFD simulation data set. Specifically, the present invention can more intuitively observe the learning status of each neural network based on the image features of the residual graph and the scatter plot.
[0088] In the above, Figure 3 It is the residual graph of BPNET (BP neural network) model training, where the residual Figure 1-4 Represents the four outputs of the dataset calibration, the residual Figure 1 is the temperature difference output, the residual Figure 2 is the average inlet temperature output, the residual Figure 3 is the coolant velocity output, residual Figure 4 is the average pressure output; the horizontal axis in the figure is the predicted value of the BPNET model, and the vertical axis is the residual value of the BPNET model. Figure 3 The training residual graph of the BPNET model in the figure shows that the points of the residual graph are evenly distributed around the horizontal axis; Figure 1 The residual distribution range is 20 to -20. Except for a few outliers, all standardized errors are between 10 and -10 and obey the normal distribution. Figure 2 The residual distribution range is 0.8 to -0.8. Excluding a small number of outliers, the standardized error is between 0.4 and -0.4, which conforms to the normal distribution characteristics. Figure 3 The residual distribution range is 1.5 to -1.5, and the standardized error is between 0.5 and -0.5, which obeys the normal distribution. Figure 4 The residual distribution range is 0.3 to -0.2. Excluding a small number of outliers, the standardized error is between 0.3 and -0.2. It should be noted that outliers refer to extremely large and extremely small values in a time series that are far away from the general level of the series.
[0089] In the above, Figure 4This is a scatter plot of BPNET model training. In order to more intuitively demonstrate the prediction performance of the training model built based on BPNET for the test set, the present invention can use R language to draw a scatter plot of the predicted value and the true value of the BPNET model, and use the scatter plot to reveal the degree of fit of the BPNET model to the observed value; wherein the horizontal axis represents the true value, and the vertical axis represents the predicted value, such as Figure 4 The actual and predicted values (outputs 1 to 4) in the scatter plot represent four different outputs. It can be seen that the predicted value and the true value show a strong positive correlation. Among them, the scatter plot has a slight discrete phenomenon between the values 2990 and 3020 in the actual and predicted values (output 2), but it has little impact on the overall trend.
[0090] In the above, Figure 5 This is the residual graph of the MLP (multi-layer perceptron) model training. Figure 1-4 They represent the four outputs of the dataset calibration, and their output content is the same as that of the BPNET model, and they are trained with the same dataset. From the training residual graph of the MLP model, it can be observed that the points of the residual graph are evenly distributed around the horizontal axis, among which the residual Figure 1 The residual distribution range is between 4 and -4. Except for a few outliers, all standardized errors are between 2 and -2 and obey the normal distribution. Figure 2 The residual distribution range is 0.10 to -0.08. Excluding a small number of outliers, the standardized error is between 0.05 and -0.05, which conforms to the normal distribution characteristics. Figure 3 The residual distribution range is 0.3 to -0.4, and the standardized error is between 0.2 and -0.2, which obeys the normal distribution. Figure 4 The residual distribution range is 0.02 to -0.06. Excluding a small number of outliers, the standardized error is between 0.02 and -0.04, which obeys the normal distribution.
[0091] In the above, Figure 6 This is a scatter plot of the MLP model training. In order to more intuitively show the prediction performance of the regression model built based on MLP on the test set, the present invention can use R language to draw a scatter plot of the predicted value and the true value of the MLP model, and use the scatter plot to reveal the degree of fit of the MLP model to the observed value; Figure 6 The actual and predicted values (outputs 1 to 4) in the scatter plot represent four different outputs. It can be seen that the predicted value and the true value show a strong positive correlation. Among them, the scatter plot has a slight discrete phenomenon between the values 2990 and 3020 in the actual and predicted values (output 2), but it has little impact on the overall trend.
[0092] In the above, Figure 7 This is the residual graph of CNN (convolutional neural network) model training. Figure 1-4They represent the four outputs of the dataset calibration, and their output content is the same as that of the MLP model, and they are trained from the same dataset. From the training residual graph of the CNN model, it can be observed that the points of the residual graph are evenly distributed around the horizontal axis, among which the residual Figure 1 The residual distribution range is between 0.03 and -0.03. Except for a few outliers, all standardized errors are between 0.01 and -0.02, which obey the normal distribution. Figure 2 The residual distribution range is 0.03 to -0.03. Excluding a small number of outliers, the standardized error is between 0.01 and -0.01, which conforms to the normal distribution characteristics. Figure 3 The residual distribution range is 0.06 to -0.04, and the standardized error is between 0.02 and -0.02, which obeys the normal distribution. Figure 4 The residual distribution range is 0.06 to -0.06. Excluding a small number of outliers, the standardized error is between 0.02 and -0.02, which obeys the normal distribution.
[0093] In the above, Figure 8 This is a scatter plot of CNN model training. In order to more intuitively show the prediction performance of the regression model built based on CNN on the test set, the present invention can use R language to draw a scatter plot of the predicted value and the true value of the CNN model, and use the scatter plot to reveal the degree of fit of the CNN model to the observed value; Figure 8 The actual and predicted values in the scatter plot (outputs 1 to 4) represent four different outputs. It can be seen that the predicted values and the true values show a strong positive correlation. Figure 8 There are some outliers or slight deviations between the actual and predicted values in the scatter plot (outputs 1 to 4), but they have little impact on the overall prediction.
[0094] Specifically, the performance of the residual graphs trained by the BPNET model, MLP model, and CNN model are analyzed respectively; Figure 3 It can be seen that the residual graph of the BPNET model shows good randomness, but in the residual Figure 1 There are abnormal residual values in the data, with the maximum residual close to 30 and the average residual close to 8. This shows that the BPNET model may not be able to accurately capture the rules and relationships hidden behind the data. This may be because the BPNET model is too simple to express the complexity of the data. Figure 5 It can be seen that the residual graph of the MLP model has a certain degree of homoscedasticity, indicating that the prediction error of the MLP model is consistent throughout the prediction range. At the same time, the residual of the MLP model does not have obvious autocorrelation and multicollinearity, indicating that the MLP model has captured the structural information of the data and has good prediction performance. However, the only defect is that the residual Figure 1The residuals in the figure did not achieve the expected effect. In the figure, the maximum residual is close to 4, and the average residual is close to 1.5, which does not meet the error requirements of the MLP model for simulation data. This shows that the MLP model still does not fully express the complexity of the data, so we introduced the convolutional neural network (CNN). Figure 7 It can be seen that the residual graph of the CNN model performs well, showing an ideal uniform distribution in randomness, no recognizable pattern, and stable homoscedasticity, which shows that the prediction performance of the CNN model is excellent at all levels. The residuals conform to the normal distribution. In addition, there is no significant autocorrelation and multicollinearity in the residuals, which further confirms the superior fitting ability and high predictive performance of the CNN model. Figures 1-2 The maximum residual is 0.03. Figures 3-4 The maximum residual is 0.06, which means there is no systematic deviation. Ideally, if the prediction of the CNN model is perfect, all residuals should be close to 0, which indicates that the features ingested by the CNN model explain most of the differences in the data.
[0095] Specifically, the performance of the scatter plots trained by the BPNET model, MLP model, and CNN model are analyzed respectively; Figure 4 It can be seen that the points in the scatter plot of the BPNET model are distributed around the diagonal line with a slope of 1, and the predicted values are correlated with the true values. However, compared with the MLP model and the CNN model, the points on the scatter plot are more scattered. Although the data points are still distributed along the diagonal line, the larger range of errors makes its prediction performance worse than that of the MLP model and the CNN model. Figure 6 It can be seen that the points in the scatter plot of the MLP model are distributed around the diagonal line with a slope of 1, and the predicted values are strongly correlated with the true values. However, compared with the CNN model, the points on the scatter plot are more scattered, which shows that although there is a strong correlation between the variables, there is still an error compared with the CNN model. Figure 8 It can be seen that the data points in the scatter plot of the CNN model are distributed around a diagonal line with a slope of 1. The predicted value and the true value show a strong correlation, and the data distribution shows a linear positive correlation. Compared with the other two network models, the CNN model has smaller outliers and a more compact data distribution, which shows that the CNN model has a good fitting ability in the prediction task.
[0096] In summary, after analyzing the residual graphs and scatter plots of the above three network models, the following conclusions are drawn: the error between the CNN model prediction and the actual observed data is small and the distribution is more uniform, while other candidate models cannot capture the data distribution characteristics so effectively, where higher predicted values are usually accompanied by higher actual values, showing a strong positive correlation. Considering the scatter plot analysis and residual graph evaluation, the CNN model performs better than other candidate models in the prediction task. It can capture patterns in the data more accurately, thus providing strong support for establishing practical applications. Therefore, the regression model built based on CNN can effectively fit the observed data.
[0097] After training and testing on the experimental data set, the present invention evaluates the performance of the above three network models from six dimensions. The performance evaluation results are shown in Table 1:
[0098] Table 1
[0099]
[0100] It can be seen from Table 1 that LOSS reflects the size of the difference between the model prediction value and the actual value. In the present invention, the loss value of BPNET is 6.01327, the loss value of MLP is 2.67411, and the loss value of CNN is 0.00014. It can be seen that the CNN model performs well in terms of loss value, followed by the MLP model, and the BPNET model has the highest loss value. MAE is used to quantify the average absolute difference between the predicted value and the true value of the network model. The experimental results show that the CNN model has the lowest MAE, the MLP model is in the middle, and the BPNET model has the highest MAE. This shows that the CNN model has more advantages in terms of prediction accuracy. MSE is used to calculate the average value of the square of the difference between the predicted value and the true value. In the present invention, the MSE of the three network models all show a trend similar to MAE, among which the MSE of the CNN model is the lowest, the MLP model is second, and the MSE of the BPNET model is the highest. This further confirms the superiority of the CNN model in terms of prediction accuracy. R 2 It is used to measure the ability of the network model to explain data changes. In the invention, the R 2The values are the same. This shows that the three network models perform similarly in explaining and capturing data changes. Model size, that is, the number of parameters in the network model, can reflect the complexity of the network model; the experimental results show that the CNN model has the largest model size, while the MLP model is in the middle and the BPNET model is the smallest. This shows that the CNN model has a more complex structure and requires more parameters, which may be accompanied by higher storage and computing resource requirements. Test time is a measure of the time consumed by the network model when testing. According to the experimental results, the BPNET model has the shortest test time, followed by the MLP model, and finally the CNN model. Test time can reflect the complexity of the network model and the consumption of computing resources. Simpler network models usually take less time to test.
Claims
1. A neural network training method for a microchannel radiator model, characterized in that: The following steps are involved: Set the number of hidden layers, learning rate, number of neurons, activation function, and transfer function of the microchannel radiator model; Acquiring input parameters and / or output results of the microchannel radiator to form a data set, normalizing the data set, and dividing the data set into a training set and a test set according to a preset test rate; Selecting a learning training function, and performing simulation training on the normalized training set in the microchannel radiator model to construct a training model; Calling the training model to perform simulation training on the normalized test set to obtain a predicted value of the test set; Through the normalized mapping relationship, the BP neural network performs a denormalization process on the predicted value of the test set to obtain the true value of the test set; Calculate the difference between the true value and the predicted value of the test set to obtain a predicted result value; The predicted result value is subjected to error back propagation through a BP neural network to update the weights of the output layer and the hidden layer of the microchannel radiator model, so that the output of the microchannel radiator model continuously approaches the predicted value.
2. The neural network training method for a microchannel radiator model according to claim 1, characterized in that: The input parameters of the microchannel heat sink are one or more of microchannel width, heat flux, fluid velocity, and the number of microchannels.
3. The neural network training method for a microchannel radiator model according to claim 1, characterized in that: The output parameter of the microchannel radiator is one or more of the inlet and outlet temperature difference, average inlet temperature, coolant flow rate, and average pressure of the microchannel.
4. The neural network training method for a microchannel radiator model according to claim 1, characterized in that: The training model is a BPNET model, an MLP model or a CNN model.
5. The neural network training method for a microchannel radiator model according to claim 1, characterized in that: The number of hidden layers of the microchannel radiator model is two.
6. The neural network training method for a microchannel radiator model according to claim 5, characterized in that: The predicted value is obtained by the BP neural network calling the sim function and predicting based on the forward propagation method; The true value is obtained by calling the train function of the BP neural network and training based on the forward propagation method.
7. The neural network training method for a microchannel radiator model according to claim 6, characterized in that: The forward propagation method is: Input the data samples of the input layer into the first hidden layer; The first hidden layer has three first neurons, each of which multiplies the data samples input from the input layer by corresponding weights and adds them to obtain a first input parameter, and then maps the three first input parameters through activation functions to obtain three first output parameters, and the three first output parameters are respectively input into the second hidden layer; The second hidden layer has two second neurons, each of which multiplies the three first output parameters by corresponding weights and adds them to obtain a second input parameter, and then maps the two second input parameters through an activation function to obtain two second output parameters, and the two second output parameters are respectively input into the output layer; The output layer has a third neuron, which multiplies the two second output parameters by corresponding weights and adds them to obtain a third input parameter, and then maps the third input parameter through an activation function to obtain a third output parameter for output.
8. The neural network training method for a microchannel radiator model according to claim 1, characterized in that: When the BP neural network performs error back propagation on the predicted result value, it generates increments of the weights of all output layers and hidden layers of the microchannel radiator model, and obtains the gradient of the corresponding weights according to the increments of the weights corresponding to the output layers and hidden layers. The gradient of the corresponding weights is subtracted from the increment of the weights, so that the weights of the microchannel radiator model develop in the opposite direction of the gradient, so as to update the weights of the output layers and hidden layers of the microchannel radiator model.
9. The neural network training method for a microchannel radiator model according to claim 8, characterized in that: The error back propagation method of the BP neural network is: Determine the parameters of the BP neural network according to the training set, and the BP neural network adopts a generalized perceptron learning rule to iteratively update the parameters of the BP neural network, wherein; Calculate the mean square error between the output layer of the BP neural network and the target value of the training set; The calculated mean square error is transmitted back to each hidden layer of the BP neural network to calculate the parameter change of each hidden layer of the BP neural network; The BP neural network is based on a gradient descent strategy, and completes an iterative update of the parameters of the BP neural network according to the negative gradient direction of the parameter change; Then, the above steps are repeated to continuously iterate and update the parameters of the BP neural network until the parameters of the BP neural network are within a preset range, and the iterative update is stopped.
10. The neural network training method for a microchannel radiator model according to claim 9, characterized in that: The parameters of the BP neural network are the weight and threshold of each neuron in the microchannel radiator model.
Citation Information
Cited By
Robot grinding and polishing processing self-adaptive compensation method based on multi-line laser
CN120734825A