Fuel cell microgrid load forecasting method and system based on deep belief network
Through feature selection and parameter optimization of deep belief networks, the problems of feature identification and change law capture in fuel cell microgrid load forecasting are solved, achieving more accurate and stable load forecasting.
Patent Information
- Application Number
- CN202510914931.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-03
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2045-07-03
AI Technical Summary
Existing load forecasting methods fail to effectively identify the unique hydrogen-electricity-heat multi-energy coupling characteristics of fuel cell microgrids, and it is difficult to accurately capture the load variation patterns, resulting in limited prediction accuracy.
A method based on deep belief network is adopted to screen key features, optimize model structure and training parameters through feature selection, structural parameter optimization and training parameter optimization, combined with the first evaluation index, response speed adaptability index and fluctuation characteristic matching index, to improve prediction accuracy and stability.
The accuracy, stability and adaptability of fuel cell microgrid load forecasting are improved, which can better capture the load variation pattern, reduce the amount of calculation and improve the model generalization ability.
Smart Images

Figure CN120414539B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of power grid load forecasting, and relates to a fuel cell microgrid load forecasting method and system based on a deep belief network. Background Art
[0002] In the power system sector, load forecasting is a critical component in ensuring safe and economical operation of power systems and scientific management of power grids. With the increasing application of fuel cells in power grids, fuel cell microgrids have become a research hotspot. Load forecasting for fuel cell microgrids is a key technology for optimizing smart grid dispatch. Deep Belief Networks (DBNs), as effective deep learning models, consist of a stack of multiple layers of restricted Boltzmann machines (RBMs). They possess powerful feature learning capabilities and the ability to model complex nonlinear relationships. They have demonstrated promising potential for load forecasting, and research continues to explore their applications in this area.
[0003] At present, existing load forecasting methods include: Patent publication number CN109816144A proposes a short-term load forecasting method based on distributed memory parallel computing to optimize deep belief networks, which uses the Spark framework to read load data and uses an improved parallel particle swarm algorithm to optimize the weights and bias values of the DBN network to perform short-term load forecasting; Chinese patent CN116245205A discloses a load forecasting method based on CSO optimized deep belief networks, which selects similar day sample sets through an improved grey correlation analysis method and combines the vertical and horizontal cross algorithm to optimize the DBN model to predict park energy demand.
[0004] However, the feature selection mechanism of the existing technology has not been optimized for the unique hydrogen-electricity-heat multi-energy coupling characteristics of fuel cell microgrids, and it is difficult to effectively identify the nonlinear relationship between key characteristics such as the operating voltage and current of the fuel cell stack and the load; in addition, the existing load forecasting method is mainly aimed at the short-term load forecasting of conventional power grids, and does not consider the special operating characteristics of fuel cell microgrids, making it difficult for the optimized model to meet the load forecasting needs of fuel cell microgrids in actual applications, and may not be able to accurately capture the changing laws of the fuel cell microgrid load, resulting in limited prediction accuracy. Summary of the Invention
[0005] To address the shortcomings of existing technologies, the present invention addresses the difficulties existing fuel cell load forecasting methods face in identifying the nonlinear relationship between key fuel cell features and load, as well as their inability to specifically capture the changing patterns of grid load. This paper provides a fuel cell microgrid load forecasting method and system based on a deep belief network. First, through feature selection, this method accurately filters key features from high-dimensional data, improving the representativeness of the model training and test sets and reducing the computational burden caused by redundant data. Second, by combining the first evaluation metric, the response speed adaptability metric, and the fluctuation characteristic matching metric, the model's structural and training parameters are optimized, effectively improving the stability and generalization capabilities of fuel cell predictions.
[0006] The present invention adopts the following technical solution. On one hand, the present invention provides a fuel cell microgrid load prediction method based on a deep belief network, comprising the following steps:
[0007] Step 1: Collect power load data, meteorological data, date data and fuel cell operation data, and perform data preprocessing;
[0008] Step 2: Perform feature selection on the preprocessed data and determine the optimal feature combination as the training set;
[0009] Step 3: Set the structural parameters of the deep belief network load forecasting model, input the training set into the model for training, and calculate the first evaluation index of the trained model; combine the first evaluation index and the structural parameters to optimize the structure of the deep belief network load forecasting model and determine the optimal structural parameters;
[0010] Step 4: Train the deep belief network load prediction model based on the optimal structural parameters through different training parameters and calculate the first evaluation index and the second evaluation index to solve the optimal training parameters; combine the optimal training parameters and the optimal structural parameters to optimize the deep belief network load prediction model.
[0011] Preferably, step 2 includes:
[0012] Step 2.1, perform random initial feature combinations on the preprocessed collected data, and treat each feature combination as an individual;
[0013] Step 2.2, calculate the feature matching degree of each individual, the formula is as follows:
[0014] ;
[0015] in, Represents feature combinations The feature matching degree; represents the selected feature combination; express Medium Features sequence; represents the historical load series; express and covariance of express The standard deviation of express The standard deviation of Indicates the number of features in the selected feature combination; Indicates the total number of features; and represents the weight parameter;
[0016] Step 2.3: Based on the feature matching degree of each individual obtained in step 2.2, the feature combination is updated through roulette wheel selection, crossover operation and mutation operation;
[0017] Step 2.4, repeat steps 2.2 to 2.3; until the rate of change of the feature matching degree for a predetermined number of consecutive iterations is less than the predetermined rate of change, and output the current optimal individual as the optimal feature combination.
[0018] Preferably, step 3 includes:
[0019] Step 3.1, set the structural parameter constraints, which include the number of hidden layers and the number of nodes per layer;
[0020] Step 3.2, according to the constraints of step 3.1, initialize multiple sets of structural parameters; based on the initialized structural parameters, construct a deep belief network load forecasting model, and input the training set for training;
[0021] Step 3.3, respectively calculating the first evaluation index after multiple groups of model training based on structural parameters;
[0022] Step 3.4, combining multiple groups of structural parameters and the corresponding first evaluation indicators to calculate the structural fitness; optimizing the structure of the deep belief network load forecasting model through a genetic algorithm to determine the optimal structural parameters.
[0023] Preferably, the first evaluation index is composed of mean square error MSE, root mean square error RMSE, mean absolute error MAE and determination coefficient R 2 It is obtained by weighted combination. The specific formula is:
[0024] ;
[0025] in, is the first evaluation indicator; and is the weight coefficient.
[0026] Preferably, the specific calculation formula for the structural fitness in step 3.4 is:
[0027] ;
[0028] Where, Represents structural parameters The structural fitness of represents an exponential function with a natural constant as its base; Represents structural parameters The first evaluation indicator corresponding to the trained model; Represents structural parameters The number of hidden layers in ; Represents structural parameters The The number of nodes in the hidden layer; Indicates the maximum number of nodes in each hidden layer.
[0029] Preferably, step 4 includes:
[0030] Step 4.1, set the initial temperature, end temperature and temperature drop rate;
[0031] Step 4.2: Randomly generate an initial solution, including the initial model learning rate, Boltzmann machine learning rate, number of iterations, batch size, and number of training steps; set training parameter constraints;
[0032] Step 4.3: Based on the initial solution, the deep belief network load forecasting model based on the optimal structural parameters is trained, the first evaluation index and the second evaluation index are calculated, and the objective function value is determined; the second evaluation index includes a response speed adaptability index and a fluctuation characteristic matching index;
[0033] Step 4.4: Based on the predetermined perturbation range, the current solution is perturbed to generate a new solution and determine its objective function value; the Metropolis criterion is used to determine whether to update the new solution to the current solution; and the current temperature is updated based on the temperature drop rate.
[0034] Step 4.5: Repeat step 4.4 until the current temperature drops to the termination temperature, and output the current solution as the optimal training parameters.
[0035] Preferably, the constraints on the training parameters in step 4.2 include:
[0036] Model learning rate In the interval Internal, Boltzmann machine learning rate In the interval In, the number of iterations In the interval Internal batch size In the interval In, the number of training steps In the interval Inside.
[0037] Preferably, the specific calculation process of the response speed adaptability index in step 4.3 includes:
[0038] Step 4.3.1, based on the predicted value of the fuel cell microgrid load change and the actual value of the fuel cell microgrid load change, calculate the cross-correlation function between the predicted load change curve and the actual load change curve ;
[0039] Step 4.3.2, Maximization , calculate the response speed adaptability index, the specific formula is:
[0040] ;
[0041] Where, represents the response speed adaptability index; Indicates the time lag at which the cross-correlation function is maximum.
[0042] Preferably, the specific calculation process of the volatility characteristic matching index in step 4.3 includes:
[0043] Step 4.3.3: Based on the forecast load sequence, obtain the fluctuation range of the forecast load; combine it with the fluctuation range of the actual load to determine the fluctuation range matching index;
[0044] Step 4.3.4: Obtain the spectrum of the predicted load sequence and the actual load sequence through fast Fourier transform, and determine the spectrum cross-correlation function ;
[0045] Step 4.3.5, maximize the value obtained in step 4.34 , determine the fluctuation frequency matching index;
[0046] Step 4.3.6, weighting the fluctuation amplitude matching index and the fluctuation frequency matching index to obtain the fluctuation characteristic matching index.
[0047] A second aspect of the present invention provides a fuel cell microgrid load forecasting system based on a deep belief network, comprising:
[0048] Data acquisition module, which collects power load data, meteorological data, date data and fuel cell data and performs data preprocessing;
[0049] Feature selection module, which performs feature selection on the preprocessed data and determines the optimal feature combination as the training set;
[0050] The model structure optimization module sets the structural parameters of the deep belief network load forecasting model, inputs the training set into the model for training, and calculates the first evaluation index of the trained model; combines the first evaluation index and the structural parameters to optimize the structure of the deep belief network load forecasting model and determine the optimal structural parameters;
[0051] The model training parameter optimization module trains the deep belief network load prediction model based on the optimal structural parameters through different training parameters and calculates the first evaluation index and the second evaluation index to solve the optimal training parameters; combines the optimal training parameters and the optimal structural parameters to optimize the deep belief network load prediction model.
[0052] Compared with the prior art, the beneficial effects of the present invention include at least:
[0053] 1. This invention introduces a feature selection method that effectively screens feature combinations highly correlated with fuel cell microgrid loads from high-dimensional data. This method designs feature matching based on feature correlation and feature selection ratio, making the feature selection process more discriminative and adaptable. This makes the resulting training set more accurate and further reduces the model's computational complexity.
[0054] 2. This invention utilizes a first evaluation metric, a response speed adaptability metric, and a fluctuation characteristics matching metric to conduct a multi-faceted, comprehensive evaluation of the fuel cell microgrid load forecasting model's performance. The first evaluation metric comprehensively reflects forecast accuracy; the response speed adaptability metric uses a cross-correlation function to assess the temporal response matching between forecasts and actual load variations, thereby evaluating the model's ability to respond to rapid load changes; and the fluctuation characteristics matching metric evaluates the matching between forecasts and actual data based on both fluctuation amplitude and spectral characteristics, demonstrating the model's ability to capture load fluctuation characteristics. This multi-metric fusion evaluation mechanism improves the accuracy, stability, and adaptability of the forecasting system.
[0055] 3. This method optimizes the model structure based on the first evaluation metric. By setting reasonable hidden layer parameter constraints to limit the search space and constructing a structural fitness based on the first evaluation metric and structural parameters, the parameter optimization process is more efficient and the results are more accurate. This method not only improves the model's generalization and stability, but also makes the model structure more suitable for fuel cell microgrid load prediction.
[0056] 4. This invention optimizes the training parameters of the deep belief network load forecasting model, enabling intelligent adjustment of training parameters such as the model learning rate, number of iterations, and number of training steps. This method utilizes the Metropolis criterion and iterative optimization methods to select different training parameters and train the optimized deep belief network load forecasting model. The model is then evaluated using evaluation metrics to determine the optimal training parameters, effectively improving the model's prediction accuracy and training efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 This is a flow chart of a fuel cell microgrid load forecasting method based on a deep belief network provided by the present invention;
[0058] Figure 2 It is a flow chart of feature selection optimization provided by the present invention;
[0059] Figure 3 It is a structural diagram of the deep belief network RBM model provided by the present invention. DETAILED DESCRIPTION
[0060] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. The embodiments described in this application are only part of the embodiments of the present invention, not all of them. Based on the spirit of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0061] Example 1
[0062] Example 1 of the present invention discloses a fuel cell microgrid load prediction method based on a deep belief network, see Figure 1 , the specific steps of the method include:
[0063] Step 1: Collect power load data, meteorological data, date data and fuel cell operation data and perform data preprocessing.
[0064] Furthermore, data is collected every hour. Power load data includes the output power of the fuel cell microgrid, the real-time load value of each feeder node, and the power load change rate. Meteorological data includes ambient temperature, relative humidity, atmospheric pressure, solar radiation intensity, wind speed, wind direction, extreme weather indicators, and precipitation probability. Extreme weather indicators include heavy rain, high temperature, and freezing. Date data includes holiday indicators and month indicators. Holiday indicators include weekdays, weekends, and statutory holidays. Fuel cell operation data includes peak and off-peak hours, cumulative operation time, fuel cell fuel supply pressure, fuel supply flow, fuel cell stack operating voltage, and operating current. Cumulative operation time refers to the total operation time of the fuel cell from the time it was put into use to the current moment, reflecting the actual total operating time of the fuel cell.
[0065] Furthermore, the data preprocessing in step 1 includes:
[0066] For digital data, clean the data to remove outliers and noise; normalize the data to make them in the same dimension;
[0067] For categorical data, one-hot encoding is used to convert it into numerical data to facilitate model processing;
[0068] After preprocessing, the various data types are aligned by timestamp and horizontally spliced into a single record. For example, a record at a certain moment may contain power load data, meteorological data, date data, and fuel cell operation data at that moment.
[0069] Step 2: Perform feature selection on the preprocessed data and determine the optimal feature combination as the training set.
[0070] Furthermore, if Figure 2 As shown, step 2 includes:
[0071] Step 2.1: Randomly combine the initial features of each preprocessed data set, and treat each feature combination as an individual (1 indicates selection, 0 indicates non-selection). The feature combination is a combination of different parameters collected in step 1, and each feature combination includes 12 parameters, i.e., 12 features.
[0072] Step 2.2 calculates the feature matching degree of each individual, the formula is as follows:
[0073] ;
[0074] in, Represents feature combinations The feature matching degree; represents the selected feature combination; express Medium Features sequence; represents the historical load series; express and covariance of express The standard deviation of express The standard deviation of Indicates the number of features in the selected feature combination; Indicates the total number of features; and represents the weight parameter, and ;
[0075] Step 2.3: Based on the feature matching degree of each individual obtained in step 2.2, the feature combination is updated through roulette wheel selection, crossover operation and mutation operation;
[0076] Step 2.4: Repeat steps 2.2 to 2.3 until the matching degree change rate for a predetermined number of consecutive iterations is less than the predetermined change rate, i.e., the feature matching degree no longer increases significantly. Output the current optimal individual as the optimal feature combination. The data corresponding to the optimal feature combination is used as the training set, i.e., the input data for model training.
[0077] In this embodiment, The value is 1, which is used to balance the weight of relevance and number of features; The value is 0.1, which is used to control the strength of the feature quantity penalty term; the predetermined number of iterations is 20, and the predetermined change rate is 0.01%.
[0078] Step 3: Set the structural parameters of the deep belief network load prediction model, input the training set into the model for training, and calculate the first evaluation index of the trained model; combine the first evaluation index and the structural parameters to optimize the structure of the deep belief network load prediction model and determine the optimal structural parameters.
[0079] Furthermore, the specific steps of step 3 are as follows:
[0080] Step 3.1, set the structural parameter constraints, which include the number of hidden layers and the number of nodes per layer; specifically: the number of hidden layers L Satisfy 2≤ L ≤5 to adapt to the complexity of fuel cell microgrids and avoid overfitting. Number of nodes per layer N l Satisfy 10≤ N l ≤50, ensuring that the model can capture detailed features without being too complex.
[0081] In step 3.2, multiple sets of structural parameters are initialized according to the constraints of step 3.1; based on the initialized structural parameters, a deep belief network load forecasting model is constructed and the training set is input for training.
[0082] Specifically, a deep belief network model based on the restricted Boltzmann machine is built, and parameters such as the number of neural network layers and the number of neurons in each layer are set;
[0083] Restricted Boltzmann Machine (RBM) consists of two layers, the visible layer and the hidden layer, which are bidirectionally connected. The visible layer is also called the input layer, which is used to input the original data. The visible layer and the hidden layer are connected by weights. Connection. Figure 2 As shown, The layer becomes the visible layer. The layer becomes the hidden layer, Called the bias, the weights in the input and output layers Represents a specific function, input After and The specific function can calculate the output ;
[0084] If in RBM, the visual layer has nodes, and the hidden layer has The energy of the system composed of nodes can be obtained by the energy formula:
[0085] ;
[0086] Where, For visible nodes The offset of For hidden nodes The offset of is the connection weight between the visible node vi and the hidden node hj.
[0087] If the states of the node vectors in the visible layer and the hidden layer are both 1, their joint probability distribution can be derived from the energy function:
[0088] ;
[0089] in, is the normalization constant;
[0090] The energy function of an RBM with binary visible and latent units is given by:
[0091] ;
[0092] Where, is the neuron state vector of the visual layer; is the neuron state vector of the hidden layer; and are the bias vectors for the visual layer and the hidden layer respectively; is the weight matrix between the visible layer and the hidden layer;
[0093] Given a visual layer Hidden layer The conditional probability of And given hidden layer Visible layer The conditional probability of , the specific formula is:
[0094] ;
[0095] ;
[0096] If the visual layer Determine the hidden layer unit The probability of the binary state being 1 is:
[0097] ;
[0098] Similarly, when the hidden layer state is determined, the visible layer unit The probability of the binary state being 1 is:
[0099] ;
[0100] Among them, the two formulas Represents the activation function, specifically .
[0101] In this embodiment, the RBM method uses "alternating Gibbs sampling" to sample from the joint distribution. Starting from a random sample, all features are first calculated and updated, and then the variable values are calculated and updated. These two processes are then iterated. After training an RBM layer, the output value of the hidden layer will serve as the input of the next RBM layer. During the training process, the following formula is used for calculation and update:
[0102] ;
[0103] ;
[0104] ;
[0105] Each RBM layer is trained separately. Only when the previous RBM layer is fully trained, the previous output will be passed to the next RBM layer as the input, and then the next RBM layer will be trained. Finally, the model results are output through the BP layer.
[0106] The training set is input into the deep belief network load forecasting model, and the restricted Boltzmann machine is trained layer by layer;
[0107] The DBN training process consists of two steps: pre-training and fine-tuning. Pre-training involves unsupervised training of each RBM layer. Fine-tuning involves supervised training of the final BP network layer, which receives the output of the previous RBM layer as input.
[0108] Step 3.3, respectively calculate the first evaluation index after multiple groups of model training based on structural parameters; specifically, the first evaluation index is composed of mean square error MSE, root mean square error RMSE, mean absolute error MAE and determination coefficient R 2 It is obtained by weighted combination. The specific formula is:
[0109] ;
[0110] in, It is the first evaluation index; MSE, RMSE and MAE have the same dimension and can be directly weighted; R 2 is a dimensionless index, which is converted into error form; and is the weight coefficient.
[0111] In this embodiment, the design principle of the weight coefficient is to assign weights according to the importance of each indicator in evaluating the performance of the model. MSE and RMSE are sensitive to outliers and are suitable for measuring the overall error of the model; MAE is not sensitive to outliers and is suitable for measuring the average error; R 2 Measure the explanatory power of the model. Based on this, the weight distribution of each indicator is as follows:
[0112] =0.3: MSE is sensitive to outliers and gives them a medium weight.
[0113] =0.3: RMSE is similar to MSE, but more intuitive and gives equal weight.
[0114] =0.2: MAE is insensitive to outliers and gives them lower weights.
[0115] =0.2:(1-R 2 ) is used to supplement the explanatory power of the model and is given a lower weight.
[0116] Based on the above weight coefficients, the calculation formula for the first evaluation index is:
[0117] ;
[0118] In the formula, the smaller the value of CEII is, the smaller the comprehensive error of the model is and the stronger the explanatory power is, so the model performance is better.
[0119] Step 3.4, combining multiple sets of structural parameters and corresponding first evaluation indicators to calculate structural fitness; optimizing the structure of the deep belief network load forecasting model through genetic algorithm to determine the optimal structural parameters; the specific implementation process includes:
[0120] Structural parameter optimization is performed based on a genetic algorithm. The optimization goal, i.e., structural fitness, is to improve the performance of the DBN fuel cell microgrid load forecasting model, minimize the first evaluation index (CEII) and model complexity (the total number of hidden layer nodes), and balance the prediction accuracy and model complexity. The specific formula is:
[0121] ;
[0122] Where, Represents structural parameters structural fitness; represents an exponential function with a natural constant as its base; Represents structural parameters The first evaluation indicator corresponding to the trained model; Represents structural parameters The number of hidden layers in ; Represents structural parameters The The number of nodes in the hidden layer; Indicates the maximum number of nodes in each hidden layer.
[0123] Step 4: Train the deep belief network load prediction model based on the optimal structural parameters through different training parameters and calculate the first evaluation index and the second evaluation index to solve the optimal training parameters; combine the optimal training parameters and the optimal structural parameters to optimize the deep belief network load prediction model.
[0124] Furthermore, the specific steps of step 4 are as follows:
[0125] Step 4.1, set the initial temperature , termination temperature and temperature drop rate ;in, , , The value range is usually between [0.80, 0.99]. .
[0126] Step 4.2, randomly generate initial solution , the solution represents a set of model parameters, including the initial model learning rate, Boltzmann machine learning rate, number of iterations, batch size and number of training steps; based on experience and prior knowledge, set training parameter constraints, specifically including: model learning rate Limit the Boltzmann machine learning rate to the interval [0.0001, 0.1] In the interval [0.00001, 0.01], the number of iterations In the interval [100, 1000], the batch size In the interval [32, 512], the number of training steps In the interval [500, 5000].
[0127] Step 4.3, based on the initial solution , train the deep belief network load forecasting model based on the optimal structural parameters, calculate the first evaluation index and the second evaluation index, and determine the objective function value ; The second evaluation index includes the response speed adaptability index and the fluctuation characteristic matching index.
[0128] In this embodiment, the optimization objective is to simultaneously minimize CEII, V, and W to optimize the fuel cell microgrid load forecasting model. CEII comprehensively reflects the error between the model's predictions and the actual values and is one of the key optimization objectives. The response speed adaptability index, V, measures the model's adaptability to the fuel cell microgrid's response speed, while the fluctuation characteristics matching index, W, measures the degree of match between the model's predictions and the actual load fluctuation characteristics.
[0129] Furthermore, the specific construction process of the response speed adaptability index V includes:
[0130] Step 4.3.1, let t be the time step, is the predicted value of the fuel cell microgrid load change predicted by the model at time t, is the true value of the fuel cell microgrid load change at time t. and , calculate the cross-correlation function between the predicted load change curve and the actual load change curve :
[0131] ;
[0132] Where N is the total number of time steps, and are the average values of the predicted load change and the actual load change, is the time lag.
[0133] Step 4.3.2, Maximization , calculate the response speed adaptability index V, the specific formula is expressed as:
[0134] ;
[0135] Where, represents the time lag at which the cross-correlation function is maximum; The smaller it is, the closer the time delay between the predicted load change and the actual load change is; the closer the V value is to 1, the better the model's adaptability to the response speed of the fuel cell microgrid.
[0136] Furthermore, the specific construction process of the volatility characteristic matching index W includes:
[0137] Step 4.3.3: Based on the forecast load sequence, obtain the fluctuation range of the forecast load; combine it with the fluctuation range of the actual load to determine the fluctuation range matching index; the specific implementation process is as follows:
[0138] set up To predict the load fluctuation, the maximum value of the load sequence can be calculated With minimum value The difference is obtained, that is ; is the actual load fluctuation amplitude, ; then the volatility matching index for:
[0139] ;
[0140] Where, The closer the value is to 1, the higher the matching degree between the fluctuation range of the predicted load and the actual load;
[0141] Step 4.3.4, forecast load sequence and actual load series Perform fast Fourier transform to obtain the corresponding spectrum and , where f is the frequency. Calculate the spectral cross-correlation function for:
[0142] ;
[0143] in, and is the frequency range of interest, and are the average values of the predicted spectrum and the actual spectrum, is the frequency offset;
[0144] Step 4.3.5, find the Get the maximum value , Fluctuation Frequency Matching Index for:
[0145] ;
[0146] Step 4.3.6, Comprehensive Volatility Matching Indicator and the volatility frequency matching indicator , and obtain the fluctuation characteristic matching index W:
[0147] ;
[0148] in, and is the weight coefficient, which is set according to the importance of fluctuation amplitude and frequency matching; in this embodiment, and The closer the W value is to 1, the higher the degree of match between the model prediction results and the actual load fluctuation characteristics.
[0149] Step 4.4: Based on the predetermined perturbation range, the current solution is perturbed to generate a new solution and determine its objective function value; the Metropolis criterion is used to determine whether to update the new solution to the current solution; and the current temperature is updated according to the temperature drop rate. The specific implementation process is as follows:
[0150] Step 4.4.1: Perturb the current solution x at the current temperature T to generate a new solution x'; the specific formula is:
[0151] ;
[0152] Where, is the perturbation of the model learning rate, and In the interval [-0.0001, 0.0001]; To limit the perturbation of the Boltzmann machine learning rate, and In the interval [-0.00001, 0.00001]; is the perturbation of the number of iterations, and In the interval [-10, 10]; is the perturbation of the batch size, and In the interval [-4, 4]; is the perturbation of the training step number, and In the interval [-50, 50];
[0153] Step 4.4.2, substitute the new solution x' into the model and calculate the new objective function value ;
[0154] Step 4.4.3, calculate the change in the objective function value , the difference calculation in vector form is adopted here;
[0155] Step 4.4.4, determine whether to accept the new solution according to the Metropolis criterion; if the new solution is better in all objectives, directly accept the new solution, that is, x = x'; if only some objective function values are better, calculate the acceptance probability , where is the maximum value of the change in each objective function value in
[0156] Step 4.4.5, decrease the temperature according to the temperature decrease rate , that is .
[0157] Step 4.5, repeat Step 4.4 until the temperature T drops to the termination temperature , then stop the optimization and output the model parameter value corresponding to the current solution x as the optimal training parameter.
[0158] Furthermore, based on the optimal training parameter, train and test the load prediction model of the deep belief network after structure optimization; collect the actual power load data, meteorological data, date data and fuel cell operation data according to Step 1, and predict the actual fuel cell microgrid load through the trained load prediction model of the deep belief network.
[0159] Embodiment 2
[0160] Embodiment 2 provided by the present invention discloses a fuel cell microgrid load prediction system based on a deep belief network to implement Figure 1 the steps of the method shown, and the system includes:
[0161] A data acquisition module, which acquires power load data, meteorological data, date data and fuel cell data and performs data preprocessing; ...
[0162] A feature selection module, which performs feature selection on the preprocessed data and determines the optimal feature combination as the training set;
[0163] A model structure optimization module, which sets the structure parameters of the load prediction model of the deep belief network, inputs the training set into the model for training, and calculates the first evaluation index of the trained model; combines the first evaluation index and the structure parameters to optimize the structure of the load prediction model of the deep belief network and determines the optimal structure parameters;
[0164] The model training parameter optimization module trains the deep belief network load prediction model based on the optimal structural parameters through different training parameters and calculates the first evaluation index and the second evaluation index to solve the optimal training parameters; combines the optimal training parameters and the optimal structural parameters to optimize the deep belief network load prediction model.
[0165] Compared with the prior art, the beneficial effects of the present invention include at least:
[0166] 1. This invention introduces a feature selection method that effectively screens feature combinations highly correlated with fuel cell microgrid loads from high-dimensional data. This method designs feature matching based on feature correlation and feature selection ratio, making the feature selection process more discriminative and adaptable. This makes the resulting training set more accurate and further reduces the model's computational complexity.
[0167] 2. This invention utilizes a first evaluation metric, a response speed adaptability metric, and a fluctuation characteristics matching metric to conduct a multi-faceted, comprehensive evaluation of the fuel cell microgrid load forecasting model's performance. The first evaluation metric comprehensively reflects forecast accuracy; the response speed adaptability metric uses a cross-correlation function to assess the temporal response matching between forecasts and actual load variations, thereby evaluating the model's ability to respond to rapid load changes; and the fluctuation characteristics matching metric evaluates the matching between forecasts and actual data based on both fluctuation amplitude and spectral characteristics, demonstrating the model's ability to capture load fluctuation characteristics. This multi-metric fusion evaluation mechanism improves the accuracy, stability, and adaptability of the forecasting system.
[0168] 3. This method optimizes the model structure based on the first evaluation metric. By setting reasonable hidden layer parameter constraints to limit the search space and constructing a structural fitness based on the first evaluation metric and structural parameters, the parameter optimization process is more efficient and the results are more accurate. This method not only improves the model's generalization and stability, but also makes the model structure more suitable for fuel cell microgrid load prediction.
[0169] 4. This invention optimizes the training parameters of the deep belief network load forecasting model, enabling intelligent adjustment of training parameters such as the model learning rate, number of iterations, and number of training steps. This method utilizes the Metropolis criterion and iterative optimization methods to select different training parameters and train the optimized deep belief network load forecasting model. The model is then evaluated using evaluation metrics to determine the optimal training parameters, effectively improving the model's prediction accuracy and training efficiency.
[0170] The present disclosure may be a system, method and / or computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.
[0171] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered by the scope of protection of the claims of the present invention.
Claims
1. A fuel cell microgrid load forecasting method based on deep belief network, characterized by: include: Step 1: Collect power load data, meteorological data, date data and fuel cell operation data, and perform data preprocessing; Step 2: Perform feature selection on the preprocessed data and determine the optimal feature combination as the training set; Step 3: Set the structural parameters of the deep belief network load forecasting model, input the training set into the model for training, and calculate the first evaluation index of the trained model; combine the first evaluation index and the structural parameters to optimize the structure of the deep belief network load forecasting model and determine the optimal structural parameters; wherein, the first evaluation index is composed of mean square error (MSE), root mean square error (RMSE), mean absolute error (MAE), and determination coefficient (R). 2 Obtained by weighted combination; Step 4: Train the deep belief network load forecasting model based on the optimal structural parameters through different training parameters and calculate the first evaluation index and the second evaluation index to solve the optimal training parameters; combine the optimal training parameters and the optimal structural parameters to optimize the deep belief network load forecasting model; the second evaluation index includes a response speed adaptability index and a fluctuation characteristic matching index.
2. The fuel cell microgrid load forecasting method based on deep belief network according to claim 1 is characterized by: Step 2 includes: Step 2.1, perform random initial feature combinations on the preprocessed collected data, and treat each feature combination as an individual; Step 2.2, calculate the feature matching degree of each individual, the formula is as follows: ; in, Represents feature combinations The feature matching degree; represents the selected feature combination; express Medium Features sequence; represents the historical load series; express and covariance of express The standard deviation of express The standard deviation of Indicates the number of features in the selected feature combination; Indicates the total number of features; and represents the weight parameter; Step 2.3: Based on the feature matching degree of each individual obtained in step 2.2, the feature combination is updated through roulette wheel selection, crossover operation and mutation operation; Step 2.4, repeat steps 2.2 to 2.3; until the rate of change of the feature matching degree for a predetermined number of consecutive iterations is less than the predetermined rate of change, and output the current optimal individual as the optimal feature combination.
3. The fuel cell microgrid load forecasting method based on deep belief network according to claim 1 is characterized in that: Step 3 includes: Step 3.1, set the structural parameter constraints, which include the number of hidden layers and the number of nodes per layer; Step 3.2, according to the constraints of step 3.1, initialize multiple sets of structural parameters; based on the initialized structural parameters, construct a deep belief network load forecasting model, and input the training set for training; Step 3.3, respectively calculating the first evaluation index after multiple groups of model training based on structural parameters; Step 3.4, combining multiple groups of structural parameters and the corresponding first evaluation indicators to calculate the structural fitness; optimizing the structure of the deep belief network load forecasting model through a genetic algorithm to determine the optimal structural parameters.
4. The fuel cell microgrid load forecasting method based on deep belief network according to claim 1 or 3, characterized in that: The specific formula of the first evaluation indicator is: ; in, is the first evaluation indicator; and is the weight coefficient.
5. The fuel cell microgrid load forecasting method based on deep belief network according to claim 3 is characterized by: The specific calculation formula for the structural fitness described in step 3.4 is: ; Where, Represents structural parameters The structural fitness of represents an exponential function with a natural constant as its base; Represents structural parameters The first evaluation indicator corresponding to the trained model; Represents structural parameters The number of hidden layers in ; Represents structural parameters The The number of nodes in the hidden layer; Indicates the maximum number of nodes in each hidden layer.
6. The fuel cell microgrid load forecasting method based on deep belief network according to claim 1 is characterized in that: Step 4 includes: Step 4.1, set the initial temperature, end temperature and temperature drop rate; Step 4.2: Randomly generate an initial solution, including the initial model learning rate, Boltzmann machine learning rate, number of iterations, batch size, and number of training steps; set training parameter constraints; Step 4.3: Based on the initial solution, training the deep belief network load forecasting model based on the optimal structural parameters, calculating the first evaluation index and the second evaluation index, and determining the objective function value; Step 4.4: Based on the predetermined perturbation range, the current solution is perturbed to generate a new solution and determine its objective function value; the Metropolis criterion is used to determine whether to update the new solution to the current solution; and the current temperature is updated based on the temperature drop rate. Step 4.5: Repeat step 4.4 until the current temperature drops to the termination temperature, and output the current solution as the optimal training parameters.
7. The fuel cell microgrid load forecasting method based on deep belief network according to claim 6 is characterized in that: The constraints on the training parameters in step 4.2 include: Model learning rate In the interval Internal, Boltzmann machine learning rate In the interval In, the number of iterations In the interval Internal batch size In the interval In, the number of training steps In the interval Inside.
8. The fuel cell microgrid load forecasting method based on deep belief network according to claim 6 is characterized in that: The specific calculation process of the response speed adaptability index in step 4.3 includes: Step 4.3.1, based on the predicted value of the fuel cell microgrid load change and the actual value of the fuel cell microgrid load change, calculate the cross-correlation function between the predicted load change curve and the actual load change curve ; Step 4.3.2, Maximization , calculate the response speed adaptability index, the specific formula is: ; Where, represents the response speed adaptability index; Indicates the time lag at which the cross-correlation function is maximum.
9. The fuel cell microgrid load forecasting method based on deep belief network according to claim 6, characterized in that: The specific calculation process of the volatility characteristic matching index in step 4.3 includes: Step 4.3.3: Based on the forecast load sequence, obtain the fluctuation range of the forecast load; combine it with the fluctuation range of the actual load to determine the fluctuation range matching index; Step 4.3.4: Obtain the spectrum of the predicted load sequence and the actual load sequence through fast Fourier transform, and determine the spectrum cross-correlation function ; Step 4.3.5, maximize the value obtained in step 4.34 , determine the fluctuation frequency matching index; Step 4.3.6, weighting the fluctuation amplitude matching index and the fluctuation frequency matching index to obtain the fluctuation characteristic matching index.
10. A fuel cell microgrid load forecasting system based on a deep belief network, which executes a fuel cell microgrid load forecasting method based on a deep belief network according to any one of claims 1 to 9, characterized in that: include: Data acquisition module, which collects power load data, meteorological data, date data and fuel cell data and performs data preprocessing; Feature selection module, which performs feature selection on the preprocessed data and determines the optimal feature combination as the training set; The model structure optimization module sets the structural parameters of the deep belief network load forecasting model, inputs the training set into the model for training, and calculates the first evaluation index of the trained model; combines the first evaluation index and the structural parameters to optimize the structure of the deep belief network load forecasting model and determine the optimal structural parameters; wherein, the first evaluation index is composed of the mean square error (MSE), the root mean square error (RMSE), the mean absolute error (MAE), and the determination coefficient (R) 2 Obtained by weighted combination; The model training parameter optimization module trains the deep belief network load forecasting model based on the optimal structural parameters through different training parameters and calculates the first evaluation index and the second evaluation index to solve the optimal training parameters; combines the optimal training parameters and the optimal structural parameters to optimize the deep belief network load forecasting model; the second evaluation index includes the response speed adaptability index and the fluctuation characteristic matching index.
Citation Information
Patent Citations
A short-term load prediction method for optimizing a deep belief network through distributed memory parallel computing
CN109816144A
Load prediction method based on CSO optimization deep belief network
CN116245205A
Power load prediction method and system based on deep belief network
CN110580543A
Air conditioner cooling load prediction method based on adaptive deep belief network
CN111598225A