Flexible load resource real-time deduction method, system, equipment and medium
By applying the real-time deduction method of flexible load resources in the power system and using the squid optimization algorithm to optimize the prediction model of the gated recurrent unit neural network, the problem of insufficient accuracy in power resource analysis and deduction is solved, and more accurate power demand forecasts and power grids are achieved. Stability adjustment.
Patent Information
- Application Number
- CN202411206985.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2025-01-24
AI Technical Summary
In the prior art, the accuracy of power resource analysis and deduction is insufficient, making it difficult to effectively predict and adjust the operating status of the power system, resulting in unstability of the power grid.
A flexible load resource real -time deduction method is proposed. By obtaining the power response data of the typical customer flexible load at the current time, the predictive value of the power response data is obtained by the pre -constructed forecast model for calculation. The prediction model is based on squid optimization algorithm for parameter optimization of the door control cycle unit neural network.
It has improved the accuracy of resource analysis and deduction, can better capture the dynamicity of load data, reduce the risk of the model in the local optimal solution, and enhance the ability to regulate the operating status of the power system.
Smart Images

Figure CN119358373A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of power demand response communication network, and specifically to a method, system, device and medium for real-time deduction of flexible load resources. Background Art
[0002] In the power system, frequency response and voltage response are two important dynamic response scenarios, which are crucial to ensure the safe, stable and economical operation of the power system. When the system is subject to certain disturbances, the system frequency and voltage fluctuate, and the system is in an unstable state. For customer flexible loads in various complex scenarios such as frequency response and voltage response, it becomes an important challenge to accurately predict their power demand response and effectively adjust the operating state of the power system. In order to better adjust the power generation and transmission systems to maintain the stability of the power grid and prevent problems such as overload and voltage instability, multi-level feature extraction is adopted to extract features from both the time domain and the frequency domain, which can more efficiently respond to emergencies or abnormal load fluctuations in the data and restore the system to a stable state in a timely manner.
[0003] At present, the method for power resource analysis is mainly to use machine learning related knowledge for prediction, but the prediction accuracy needs to be improved; therefore, how to improve the accuracy of resource analysis and deduction is a problem that needs to be solved urgently. Summary of the invention
[0004] In order to solve the problem of how to improve the accuracy of resource analysis and deduction in the prior art, this application proposes a flexible load resource real-time deduction method, including:
[0005] Obtain the power response data of typical customer flexible loads at the current moment;
[0006] Calculating based on the power response data using a pre-built prediction model to obtain a predicted value of the power response data at the next moment of the current moment;
[0007] The prediction model is constructed by using a gated recurrent unit neural network after parameter optimization using the squid optimization algorithm based on the power response data input of a typical customer's flexible load at the current moment to obtain the predicted value of the power response data at the next moment. Preferably, it also includes a model construction process; the model construction process specifically includes:
[0008] Taking the minimum average absolute percentage error between the predicted value of the power response data and the actual value of the power response data as the optimization goal;
[0009] The number of hidden layers, the number of neurons in the hidden layer, the number of neurons in the fully connected layer, the total number of iterations, the range of the batch size, and the range of the learning rate are set to construct a gated recurrent unit neural network; based on the power response data of typical customer flexible loads at historical moments, the whale optimization algorithm is used to optimize the parameters of the gated recurrent unit neural network to obtain the optimal solution of the batch size and the optimal solution of the learning rate;
[0010] Based on the optimal solution of the batch size and the optimal solution of the learning rate, the gated recurrent unit neural network is reconfigured to build a prediction model, and the power response data of the typical customer flexible load at the current moment is combined to calculate the predicted value of the power response data at the next moment.
[0011] Preferably, the power response data of typical customer flexible loads at historical moments is used to optimize the parameters of the gated recurrent unit neural network using a whale optimization algorithm to obtain an optimal solution for the batch size and an optimal solution for the learning rate, including:
[0012] Randomly generate the positions of the initial whale population based on the range of batch sizes and the range of learning rates;
[0013] Based on the initial position of the whale population and the power response data of the typical customer flexible load at the historical moment, the fitness function is calculated to obtain the fitness function value of the whale population, and the optimal fitness function value is screened out;
[0014] Use the position update formula of the whale optimization algorithm to update the whale's position and calculate the latest fitness function value;
[0015] Determine whether the latest fitness function value is better than the optimal fitness function value, if so, update the latest fitness function value to the optimal fitness function value; otherwise, continue iterative optimization until the total number of iterations is reached;
[0016] Based on the optimal fitness function value, the optimal solution for the batch size and the optimal solution for the learning rate are calculated.
[0017] Preferably, the fitness function is a mean square error between a predicted value of the power response data and an actual value of the power response data.
[0018] Preferably, the calculation based on the power response data using a pre-built prediction model to obtain a predicted value of the power response data at the next moment of the current moment includes:
[0019] The predicted value calculated based on the power response data combined with the gated recurrent unit neural network is passed to the fully connected layer for processing to obtain the predicted value of the power response data at the next moment of the current moment.
[0020] Preferably, the method further comprises: preprocessing the power response data to obtain preprocessed power response data; the preprocessing the power response data to obtain preprocessed power response data specifically comprises:
[0021] Perform outlier processing and missing value filling based on the power response data to obtain outlier-processed power response data;
[0022] Based on the power response data after abnormal processing, discrete cosine transformation is performed and time-frequency information is extracted to obtain pre-processed power response data.
[0023] Preferably, performing abnormal value processing and filling missing values based on the power response data to obtain abnormal value processed power response data includes:
[0024] Using a filter to perform abnormal value detection on the power response data to filter out abnormal data;
[0025] Replacing the abnormal data with a median value of a window of a set length to obtain power response data after abnormal value processing;
[0026] The missing values in the power response data after abnormal value processing are filled by using the Lagrange interpolation method to obtain the power response data after abnormal value processing.
[0027] Preferably, the performing discrete cosine transform and extracting time-frequency information on the power response data after the abnormal processing to obtain the pre-processed power response data includes:
[0028] Loading the power response data after the abnormal processing into a one-dimensional array of a set length and dividing it into a plurality of blocks of the same size;
[0029] Performing discrete cosine transformation on the plurality of blocks of the same size to obtain power response data after discrete cosine transformation;
[0030] Based on the power response data after discrete cosine transformation, the power response data with time-frequency information is extracted by using residual chain or residual block for calculation to obtain preprocessed power response data.
[0031] Preferably, the typical customer flexible loads include: one or more of direct-heating electric heating, electric cooling, variable-frequency induction motors and distributed energy storage.
[0032] Based on the same application concept, this application also proposes a flexible load resource real-time deduction system, including:
[0033] A data acquisition module is used to obtain the power response data of the typical customer's flexible load at the current moment;
[0034] A data prediction module, used to calculate based on the power response data using a pre-built prediction model to obtain a predicted value of the power response data at the next moment of the current moment;
[0035] The prediction model is constructed by inputting the power response data of typical customer flexible load at the current moment and using the gated recurrent unit neural network after parameter optimization using the squid optimization algorithm to obtain the predicted value of the power response data at the next moment.
[0036] Preferably, it also includes a model building module, and the model building module includes:
[0037] An optimization target setting submodule, used to minimize the average absolute percentage error between the predicted value of the power response data and the actual value of the power response data as an optimization target;
[0038] The parameter setting submodule is used to set the number of hidden layers, the number of neurons in the hidden layer, the number of neurons in the fully connected layer, the total number of iterations, the range of the batch size, and the range of the learning rate to construct a gated recurrent unit neural network;
[0039] A parameter optimization submodule, for optimizing the parameters of the gated recurrent unit neural network using a whale optimization algorithm based on the power response data of typical customer flexible loads at historical moments, to obtain an optimal solution for the batch size and an optimal solution for the learning rate;
[0040] The model configuration submodule is used to reconfigure the gated recurrent unit neural network to build a prediction model based on the optimal solution of the batch size and the optimal solution of the learning rate, and calculate the predicted value of the power response data at the next moment in combination with the power response data of the typical customer flexible load at the current moment.
[0041] Preferably, the parameter optimization submodule is specifically used for:
[0042] Randomly generate the positions of the initial whale population based on the range of batch sizes and the range of learning rates;
[0043] Based on the initial position of the whale population and the power response data of the typical customer flexible load at the historical moment, the fitness function is calculated to obtain the fitness function value of the whale population, and the optimal fitness function value is screened out;
[0044] Use the position update formula of the whale optimization algorithm to update the whale's position and calculate the latest fitness function value;
[0045] Determine whether the latest fitness function value is better than the optimal fitness function value, if so, update the latest fitness function value to the optimal fitness function value; otherwise, continue iterative optimization until the total number of iterations is reached;
[0046] Based on the optimal fitness function value, the optimal solution for the batch size and the optimal solution for the learning rate are calculated.
[0047] Preferably, the fitness function in the parameter optimization submodule is the mean square error between the predicted value of the power response data and the actual value of the power response data.
[0048] Preferably, the data prediction module is used to:
[0049] The predicted value calculated based on the power response data combined with the gated recurrent unit neural network is passed to the fully connected layer for processing to obtain the predicted value of the power response data at the next moment of the current moment.
[0050] Preferably, it also includes a data preprocessing module; the data preprocessing module includes:
[0051] An outlier processing submodule, used to process outliers and fill missing values based on the power response data to obtain power response data after outlier processing;
[0052] The discrete cosine transform submodule is used to perform discrete cosine transform and extract time-frequency information based on the power response data after the abnormality processing to obtain the pre-processed power response data.
[0053] Preferably, the outlier processing submodule is specifically used for:
[0054] Using a filter to perform abnormal value detection on the power response data to filter out abnormal data;
[0055] Replacing the abnormal data with a median value of a window of a set length to obtain power response data after abnormal value processing;
[0056] The missing values in the power response data after abnormal value processing are filled by using the Lagrange interpolation method to obtain the power response data after abnormal value processing.
[0057] Preferably, the discrete cosine transform submodule is specifically used for:
[0058] Loading the power response data after the abnormal processing into a one-dimensional array of a set length and dividing it into a plurality of blocks of the same size;
[0059] Performing discrete cosine transformation on the plurality of blocks of the same size to obtain power response data after discrete cosine transformation;
[0060] Based on the power response data after discrete cosine transformation, the power response data with time-frequency information is extracted by using residual chain or residual block for calculation to obtain preprocessed power response data.
[0061] Preferably, the typical customer flexible loads in the data acquisition module include: one or more of direct-heated electric heating, electric cooling, variable-frequency induction motors and distributed energy storage.
[0062] On the other hand, the present application also proposes an electronic device, comprising: at least one processor and a memory; the memory and the processor are connected via a bus;
[0063] The memory is used to store one or more programs;
[0064] When the one or more programs are executed by the at least one processor, a flexible load resource real-time deduction method as described above is implemented.
[0065] On the other hand, the present application further proposes a readable storage medium having an execution program stored thereon, and when the execution program is executed, a flexible load resource real-time deduction method as described above is implemented.
[0066] Compared with the prior art, the beneficial effects of this application are:
[0067] A method, system, device and medium for real-time deduction of flexible load resources, including: obtaining power response data of a typical customer flexible load at the current moment; calculating based on the power response data using a pre-built prediction model to obtain a predicted value of the power response data at the next moment of the current moment; wherein the prediction model is constructed by inputting the power response data of the typical customer flexible load at the current moment into a gated recurrent unit neural network after parameter optimization using a squid optimization algorithm to obtain the predicted value of the power response data at the next moment; the present application uses the squid optimization algorithm to perform parameter optimization on the gated recurrent unit neural network, which can reduce the risk of the model falling into a local optimal solution, improve the probability of finding a global optimal solution, and also improve the load prediction accuracy to better capture the dynamics of load data; using the prediction model to predict power response data improves the accuracy of resource analysis and deduction;
[0068] In the data processing process of the present application, discrete cosine transform is performed to extract frequency domain features representing the main trends of loads in the power response data. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] Figure 1 A flow chart of a flexible load resource real-time deduction method of the present application;
[0070] Figure 2 This is a flowchart of the application;
[0071] Figure 3 A structural diagram of a flexible load resource real-time deduction system for this application;
[0072] Figure 4 A diagram of an electronic device for this application. DETAILED DESCRIPTION
[0073] In order to improve the accuracy of resource analysis and deduction, a flexible load resource real-time deduction method is designed, which can make accurate predictions on the power demand of typical customer flexible loads, and can effectively handle emergencies or abnormal load fluctuations in power demand. It not only has powerful feature extraction capabilities, but also can handle long-term dependencies in data. In order to better understand this application, the content of this application is further explained below in conjunction with the drawings and embodiments of the specification.
[0074] Embodiment 1:
[0075] A real-time simulation method for flexible load resources, the specific process is as follows: Figure 1 As shown, including:
[0076] Step 1, obtaining the power response data of the typical customer's flexible load at the current moment;
[0077] Step 2, performing calculations based on the power response data using a pre-built prediction model to obtain a predicted value of the power response data at the next moment of the current moment;
[0078] The prediction model is constructed by inputting the power response data of typical customer flexible load at the current moment and using the gated recurrent unit neural network after parameter optimization using the squid optimization algorithm to obtain the predicted value of the power response data at the next moment.
[0079] Combine the following Figure 2 This embodiment is described in detail:
[0080] Before step 1, a model building process is also included, and the model building process specifically includes:
[0081] The optimization objective is to minimize the average absolute percentage error between the predicted value of the power response data and the actual value of the power response data. The specific expression is:
[0082]
[0083] Wherein, MAPE is the mean absolute percentage error; N is the number of power response data; i is the ranking of power response data; Y i is the true value of the i-th power response data; is the predicted value of the i-th power response data.
[0084] Initialize the model parameters to be optimized, set the number of hidden layers, the number of neurons in the hidden layer, the number of neurons in the fully connected layer, the total number of iterations num, the batch size s, the learning rate r, and set the corresponding range.
[0085] In the defined hyperparameter search space, the initial whale population is randomly generated, and the power response data with time-frequency information is input into the model. The value of each parameter is evaluated according to the fitness value to see whether it is the current optimal one. The WOA whale optimization algorithm is used to search for the parameters to be optimized of the gated recurrent neural network. In each iteration, the position of the whale is updated according to the position update formula of the WOA algorithm. A and C are coefficient vectors used to control the swimming mode of the whale. The whale position update formula is:
[0086] A=2×α×r 1 -α
[0087] C=2×r 2
[0088] X j (t+1)=X * -e b·l ·|C·X * -X j |·cos 2π·l
[0089] Where A is the first coefficient vector; C is the second coefficient vector; α is the control coefficient vector, a linear decreasing vector from 2 to 0; r 1 is the first random number in the interval [0, 1]; r 2 is the second random number in the interval [0, 1]; X j (t+1) is the position of the jth whale at time t+1; X * is the optimal position currently found; X j is the current position of the jth whale; e b·l To control the search range; b is a constant that defines the shape of the logarithmic spiral, usually set to 1; l is a random number in the range of [-1,1].
[0090] Based on the updated position of the whale group, the fitness value is recalculated. If the fitness value of the new position is better than the current optimal solution, the optimal solution is updated. The iteration is repeated and compared. If the maximum number of iterations is reached, the optimal solution r_best for the learning rate and the optimal solution s_best for the batch size are obtained, the model is reconfigured, and training is performed.
[0091] This model uses mean square error as the fitness function:
[0092]
[0093] Where, MSE is the mean square error; N is the number of power response data; i is the order of the power response data; Y i is the true value of the i-th power response data; Predict the value for the ith power response data. Improve the prediction performance of the model by minimizing the MSE.
[0094] Before step 1, a data preprocessing process is also included, and the data and processing process specifically includes:
[0095] Preprocess the power response data of four typical customer flexible loads, including direct-heating electric heating, electric cooling, variable-frequency induction motors, and distributed energy storage, including filling missing values and outlier processing;
[0096] First, the operating characteristics of four typical customer flexible loads, including direct electric heating, electric cooling, variable frequency induction motors, and distributed energy storage, are analyzed:
[0097] (1) Direct electric heating:
[0098] Air source heat pump is selected as the representative of the typical load of direct heating electric heating, and its mathematical model is:
[0099]
[0100] In the formula, K cop The coefficient of performance of the air source heat pump; P out is the output power of the air source heat pump, kW; P in is the input power of the air source heat pump, kW.
[0101] (2) Electric refrigeration:
[0102] Taking central air conditioning as the representative of typical load of electric refrigeration, its adjustable capacity increase is expressed as:
[0103]
[0104] Where P DR For adjustable capacity increase; P AC is the measured power of a single refrigerator in cooling state; P AC,t is the actual operating power of the corresponding refrigeration unit.
[0105] (3) Variable frequency induction motor:
[0106] The variable frequency induction motor is selected as a representative. Under variable frequency control, the output power of the motor can be changed by adjusting the frequency and voltage input to the motor. Its mathematical model is:
[0107]
[0108] Where P output is the output power of the variable frequency induction motor; V is the actual voltage value; I is the actual current value; is the actual power factor; μ is the motor efficiency.
[0109] (4) Distributed energy storage:
[0110] Distributed photovoltaics are selected as the representative of typical loads of distributed energy storage, and its output power is expressed as:
[0111]
[0112] Where P PV is the output power of the photovoltaic cell; P m is the maximum test power under standard test conditions; G is the light intensity; G STC is the light intensity under standard test conditions; k is the power temperature coefficient; T is the photovoltaic cell temperature; T R is the temperature under rated conditions.
[0113] Then, fill in missing values and outliers in the data:
[0114] In the power system, if the difference in the power data between two adjacent time points is large or the status of the same device in different data sources is inconsistent, it may cause abnormal changes in the power response data and contradictions. The Hampel filter is used to detect outliers in the data. For the historical response data of customer flexible loads, the median and absolute deviation are used to measure the discreteness of the data, so as to determine which data are outliers. A window with a length of 2k+1 is selected, and the median absolute deviation (MAD) is used to determine the validity of the data. If the data is judged to be valid, the data is output; if it is judged to be singular data, the data is replaced by the median in the window.
[0115] In the power system, the power response data may be missing due to sensor failure, communication interruption or problems with the data recording system. We can select known data points near the missing values as interpolation nodes and use the Lagrange interpolation method to construct an interpolation polynomial L(x). This polynomial will substitute the x value corresponding to the missing value into L(x) through these known interpolation nodes. The calculated L(x) value is the fill in for the missing value.
[0116]
[0117] s i =cM(|x j -m i |)
[0118] A=B-(n-1) / 2,…,B+(n-1) / 2
[0119] Where: y i is the i-th power response data after filtering; x i is the original i-th power response data; m i For xi The median of the data in the window centered at the center; h is the threshold parameter; s i For x i The absolute deviation median of the data in the window centered at x; S is the sign function; c is a constant with a value of 1.4826; M is the median function; n is the window size; x j are other data points equally divided in the window; a is the index in the window; B is the power response data index.
[0120] The Lagrange interpolation method is used to fill the missing values. For a given k+1 point (w 0 ,y 0 ), (w 1 ,y 1 ),...,(w k ,y k ), find a polynomial L(w) of degree not exceeding k such that L(w z )=y z This holds true for all z (z=0, 1, ..., k).
[0121]
[0122] Where L(w) is the interpolation polynomial; j is the order of data points; k is the total number of data points; y j is the power response data of the jth data point; z is the order of the feature points; w z is the data of the zth feature point; w j is the missing j-th feature point; l j (w) is the Lagrange basic polynomial; w is the characteristic point.
[0123] The power response data after abnormal processing is loaded into a one-dimensional array of length N. The signal is divided into several blocks of the same size and a border is added to the edge of each block. Then, DCT discrete cosine transform is performed on each block, and the corresponding cosine coefficient matrix is calculated. The transformation formula is:
[0124]
[0125] In the formula, F u is the power response data after discrete cosine transformation; f x is the original power response data; x is the index of the time domain, and its value range is [0, 1, 2, ..., N-1]; N is the number of power response data; a u is the transform coefficient in the frequency domain; u is the index in the frequency domain, and its value range is 0, 1, 2, ..., N-1.
[0126] The cosine coefficient matrix is quantized and rounded to integer values. The quantization matrix is used to discard the coefficients of the high-frequency part to reduce redundant information, retain some important coefficients, and discard the remaining coefficients.
[0127] Residual links and residual blocks are introduced into the network to realize cross-layer connection of data. Residual blocks are the basic units of residual networks. Each residual block consists of one or more weight layers, an activation function, and an identity mapping. Through the superposition of identity mapping and residual mapping, the network can retain the original input information while learning new features. The output formula of the residual block is:
[0128] X l+1 =F(X l ,W i )+X l
[0129] In the formula, X l+1 is the output of the l-th layer residual unit; X l is the input of the l-th layer residual unit; F(X l ,W i ) is the output after passing through several layers of grids and activation functions; W i is the weight parameter of the neural network.
[0130] In step 1, obtaining the power response data of the typical customer flexible load at the current moment specifically includes:
[0131] Obtain the power response data of four typical customer flexible loads, including direct electric heating, electric cooling, variable frequency induction motor and distributed energy storage, at the current moment.
[0132] In step 2, the calculation based on the power response data using a pre-built prediction model to obtain the predicted value of the power response data at the next moment of the current moment specifically includes:
[0133] Set the input dimension of the prediction model network according to the dimension of the power response data after discrete cosine transformation to ensure that the input data of each time step can be processed correctly;
[0134] The power response data is divided into a training set and a test set in chronological order. For example, the most recent response data is used as the test set. The model is trained using the training set, and the prediction error is calculated through forward propagation. The weights and biases of the model are adjusted through the back propagation algorithm and optimizer. The output is passed to one or more fully connected layers. After processing by the fully connected layer, the predicted value of the power response data at the next moment is generated.
[0135] Embodiment 2:
[0136] A flexible load resource real-time simulation system, the structure is as follows Figure 3 As shown, including:
[0137] A data acquisition module is used to obtain the power response data of the typical customer's flexible load at the current moment;
[0138] A data prediction module, used to calculate based on the power response data using a pre-built prediction model to obtain a predicted value of the power response data at the next moment of the current moment;
[0139] The prediction model is constructed by inputting the power response data of typical customer flexible load at the current moment and using the gated recurrent unit neural network after parameter optimization using the squid optimization algorithm to obtain the predicted value of the power response data at the next moment.
[0140] Also included is a model building module, the model building module comprising:
[0141] An optimization target setting submodule, used to minimize the average absolute percentage error between the predicted value of the power response data and the actual value of the power response data as an optimization target;
[0142] The parameter setting submodule is used to set the number of hidden layers, the number of neurons in the hidden layer, the number of neurons in the fully connected layer, the total number of iterations, the range of the batch size, and the range of the learning rate to construct a gated recurrent unit neural network;
[0143] A parameter optimization submodule, for optimizing the parameters of the gated recurrent unit neural network using a whale optimization algorithm based on the power response data of typical customer flexible loads at historical moments, to obtain an optimal solution for the batch size and an optimal solution for the learning rate;
[0144] The model configuration submodule is used to reconfigure the gated recurrent unit neural network to build a prediction model based on the optimal solution of the batch size and the optimal solution of the learning rate, and calculate the predicted value of the power response data at the next moment in combination with the power response data of the typical customer flexible load at the current moment.
[0145] Parameter optimization submodule, specifically used for:
[0146] Randomly generate the positions of the initial whale population based on the range of batch sizes and the range of learning rates;
[0147] Based on the initial position of the whale population and the power response data of the typical customer flexible load at the historical moment, the fitness function is calculated to obtain the fitness function value of the whale population, and the optimal fitness function value is screened out;
[0148] Use the position update formula of the whale optimization algorithm to update the whale's position and calculate the latest fitness function value;
[0149] Determine whether the latest fitness function value is better than the optimal fitness function value, if so, update the latest fitness function value to the optimal fitness function value; otherwise, continue iterative optimization until the total number of iterations is reached;
[0150] Based on the optimal fitness function value, the optimal solution for the batch size and the optimal solution for the learning rate are calculated.
[0151] The fitness function in the parameter optimization submodule is the mean square error between the predicted value of the power response data and the actual value of the power response data.
[0152] Data prediction module, used for:
[0153] The predicted value calculated based on the power response data combined with the gated recurrent unit neural network is passed to the fully connected layer for processing to obtain the predicted value of the power response data at the next moment of the current moment.
[0154] It also includes a data preprocessing module; the data preprocessing module includes:
[0155] An outlier processing submodule, used to process outliers and fill missing values based on the power response data to obtain power response data after outlier processing;
[0156] The discrete cosine transform submodule is used to perform discrete cosine transform and extract time-frequency information based on the power response data after the abnormality processing to obtain the pre-processed power response data.
[0157] The outlier processing submodule is specifically used for:
[0158] Using a filter to perform abnormal value detection on the power response data to filter out abnormal data;
[0159] Replacing the abnormal data with a median value of a window of a set length to obtain power response data after abnormal value processing;
[0160] The missing values in the power response data after abnormal value processing are filled by using the Lagrange interpolation method to obtain the power response data after abnormal value processing.
[0161] The discrete cosine transform submodule is specifically used for:
[0162] Loading the power response data after the abnormal processing into a one-dimensional array of a set length and dividing it into a plurality of blocks of the same size;
[0163] Performing discrete cosine transformation on the plurality of blocks of the same size to obtain power response data after discrete cosine transformation;
[0164] Based on the power response data after discrete cosine transformation, the power response data with time-frequency information is extracted by using residual chain or residual block for calculation to obtain preprocessed power response data.
[0165] Typical customer flexible loads in the data acquisition module include: one or more of direct-heat electric heating, electric cooling, variable frequency induction motors and distributed energy storage.
[0166] Embodiment 3:
[0167] like Figure 4 As shown, the present invention also provides an electronic device, which may be a computer device, a single-chip device, an intelligent mobile device, etc. The electronic device in this embodiment may include a processor, a memory, a transceiver component, etc. The memory, the processor, and the transceiver component are connected via a bus; the memory may be used to store an execution program, and an exemplary execution program may include instructions; the processor is used to execute the instructions stored in the memory. The memory may also be used to store data, which may be called and / or modified when the instructions are executed.
[0168] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), or application-specific integrated circuits.
[0169] (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., which are the computing core and control core of the terminal, and are suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions in the storage medium to implement the corresponding method flow or corresponding function, so as to realize a step of real-time deduction of flexible load resources in the above-mentioned embodiment.
[0170] Example 4
[0171] Based on the same inventive concept, the present invention also provides a readable storage medium, specifically an electronic device readable storage medium (Memory), which is a memory device in an electronic device for storing programs and data. It can be understood that the storage medium here can include both built-in storage media in electronic devices and, of course, extended storage media supported by electronic devices. The storage medium provides a storage space, which stores the operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by a processor are also stored in the storage space, and these instructions can be one or more execution programs (including program codes). It should be noted that the storage medium here can be a high-speed RAM memory or a non-volatile memory, such as at least one disk storage. The processor loads and executes one or more instructions stored in the storage medium, which can implement a step of real-time deduction of a flexible load resource in the above embodiment.
[0172] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0173] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0174] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0175] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0176] The above are merely embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application are included in the scope of the claims of the present application to be approved.
Claims
1. A method for real-time simulation of flexible load resources, characterized in that: include: Obtain the power response data of typical customer flexible loads at the current moment; Calculating based on the power response data using a pre-built prediction model to obtain a predicted value of the power response data at the next moment of the current moment; The prediction model is constructed by inputting the power response data of typical customer flexible load at the current moment and using the gated recurrent unit neural network after parameter optimization using the squid optimization algorithm to obtain the predicted value of the power response data at the next moment.
2. The method according to claim 1, characterized in that The model building process is also included; the model building process specifically includes: Taking the minimum average absolute percentage error between the predicted value of the power response data and the actual value of the power response data as the optimization goal; The number of hidden layers, the number of neurons in the hidden layer, the number of neurons in the fully connected layer, the total number of iterations, the range of the batch size, and the range of the learning rate are set to construct a gated recurrent unit neural network; based on the power response data of typical customer flexible loads at historical moments, the whale optimization algorithm is used to optimize the parameters of the gated recurrent unit neural network to obtain the optimal solution of the batch size and the optimal solution of the learning rate; Based on the optimal solution of the batch size and the optimal solution of the learning rate, the gated recurrent unit neural network is reconfigured to build a prediction model, and the power response data of the typical customer flexible load at the current moment is combined to calculate the predicted value of the power response data at the next moment.
3. The method according to claim 2, characterized in that The power response data of typical customer flexible loads at historical moments is used to optimize the parameters of the gated recurrent unit neural network using the whale optimization algorithm to obtain the optimal solution of the batch size and the optimal solution of the learning rate, including: Randomly generate the positions of the initial whale population based on the range of batch sizes and the range of learning rates; Based on the initial position of the whale population and the power response data of the typical customer flexible load at the historical moment, the fitness function is calculated to obtain the fitness function value of the whale population, and the optimal fitness function value is screened out; Use the position update formula of the whale optimization algorithm to update the whale's position and calculate the latest fitness function value; Determine whether the latest fitness function value is better than the optimal fitness function value, if so, update the latest fitness function value to the optimal fitness function value; otherwise, continue iterative optimization until the total number of iterations is reached; Based on the optimal fitness function value, the optimal solution for the batch size and the optimal solution for the learning rate are calculated.
4. The method according to claim 3, characterized in that The fitness function is a mean square error between a predicted value of the power response data and an actual value of the power response data.
5. The method according to claim 1, characterized in that The calculating based on the power response data using a pre-built prediction model to obtain a prediction value of the power response data at the next moment of the current moment includes: The predicted value calculated based on the power response data combined with the gated recurrent unit neural network is passed to the fully connected layer for processing to obtain the predicted value of the power response data at the next moment of the current moment.
6. The method according to claim 1, characterized in that Also includes: Preprocessing the power response data to obtain preprocessed power response data; The preprocessing of the power response data to obtain the preprocessed power response data specifically includes: Perform outlier processing and missing value filling based on the power response data to obtain outlier-processed power response data; Based on the power response data after abnormal processing, discrete cosine transformation is performed and time-frequency information is extracted to obtain pre-processed power response data.
7. The method according to claim 6, characterized in that The performing outlier processing and filling missing values based on the power response data to obtain the power response data after the outlier processing includes: Using a filter to perform abnormal value detection on the power response data to filter out abnormal data; Replacing the abnormal data with a median value of a window of a set length to obtain power response data after abnormal value processing; The missing values in the power response data after abnormal value processing are filled by using the Lagrange interpolation method to obtain the power response data after abnormal value processing.
8. The method according to claim 6, characterized in that The method of performing discrete cosine transform and extracting time-frequency information on the power response data after the abnormal processing to obtain pre-processed power response data includes: Loading the power response data after the abnormal processing into a one-dimensional array of a set length and dividing it into a plurality of blocks of the same size; Performing discrete cosine transformation on the plurality of blocks of the same size to obtain power response data after discrete cosine transformation; Based on the power response data after discrete cosine transformation, the power response data with time-frequency information is extracted by using residual chain or residual block for calculation to obtain preprocessed power response data.
9. The method according to claim 1, characterized in that: The typical customer flexible loads include: one or more of direct-heating electric heating, electric cooling, variable-frequency induction motors, and distributed energy storage.
10. A flexible load resource real-time simulation system, characterized in that: include: A data acquisition module is used to obtain the power response data of the typical customer's flexible load at the current moment; A data prediction module, used to calculate based on the power response data using a pre-built prediction model to obtain a predicted value of the power response data at the next moment of the current moment; The prediction model is constructed by inputting the power response data of typical customer flexible load at the current moment and using the gated recurrent unit neural network after parameter optimization using the squid optimization algorithm to obtain the predicted value of the power response data at the next moment.
11. The system according to claim 10, characterized in that Also included is a model building module, the model building module comprising: An optimization target setting submodule, used to minimize the average absolute percentage error between the predicted value of the power response data and the actual value of the power response data as an optimization target; The parameter setting submodule is used to set the number of hidden layers, the number of neurons in the hidden layer, the number of neurons in the fully connected layer, the total number of iterations, the range of the batch size, and the range of the learning rate to construct a gated recurrent unit neural network; A parameter optimization submodule, for optimizing the parameters of the gated recurrent unit neural network using a whale optimization algorithm based on the power response data of typical customer flexible loads at historical moments, to obtain an optimal solution for the batch size and an optimal solution for the learning rate; The model configuration submodule is used to reconfigure the gated recurrent unit neural network to build a prediction model based on the optimal solution of the batch size and the optimal solution of the learning rate, and calculate the predicted value of the power response data at the next moment in combination with the power response data of the typical customer flexible load at the current moment.
12. The system according to claim 11, characterized in that The parameter optimization submodule is specifically used for: Randomly generate the positions of the initial whale population based on the range of batch sizes and the range of learning rates; Based on the initial position of the whale population and the power response data of the typical customer flexible load at the historical moment, the fitness function is calculated to obtain the fitness function value of the whale population, and the optimal fitness function value is screened out; Use the position update formula of the whale optimization algorithm to update the whale's position and calculate the latest fitness function value; Determine whether the latest fitness function value is better than the optimal fitness function value, if so, update the latest fitness function value to the optimal fitness function value; otherwise, continue iterative optimization until the total number of iterations is reached; Based on the optimal fitness function value, the optimal solution for the batch size and the optimal solution for the learning rate are calculated.
13. The system according to claim 12, characterized in that The fitness function in the parameter optimization submodule is the mean square error between the predicted value of the power response data and the actual value of the power response data.
14. The system according to claim 10, characterized in that The data prediction module is used to: The predicted value calculated based on the power response data combined with the gated recurrent unit neural network is passed to the fully connected layer for processing to obtain the predicted value of the power response data at the next moment of the current moment.
15. The system according to claim 10, characterized in that It also includes a data preprocessing module; The data preprocessing module comprises: An outlier processing submodule, used to process outliers and fill missing values based on the power response data to obtain power response data after outlier processing; The discrete cosine transform submodule is used to perform discrete cosine transform and extract time-frequency information based on the power response data after the abnormality processing to obtain the pre-processed power response data.
16. The system according to claim 15, characterized in that The outlier processing submodule is specifically used for: Using a filter to perform abnormal value detection on the power response data to filter out abnormal data; Replacing the abnormal data with a median value of a window of a set length to obtain power response data after abnormal value processing; The missing values in the power response data after abnormal value processing are filled by using the Lagrange interpolation method to obtain the power response data after abnormal value processing.
17. The system according to claim 15, characterized in that The discrete cosine transform submodule is specifically used for: Loading the power response data after the abnormal processing into a one-dimensional array of a set length and dividing it into a plurality of blocks of the same size; Performing discrete cosine transformation on the plurality of blocks of the same size to obtain power response data after discrete cosine transformation; Based on the power response data after discrete cosine transformation, the power response data with time-frequency information is extracted by using residual chain or residual block for calculation to obtain preprocessed power response data.
18. The system according to claim 10, characterized in that Typical customer flexible loads in the data acquisition module include: one or more of direct-heat electric heating, electric cooling, variable frequency induction motors and distributed energy storage.
19. An electronic device, characterized in that: include: at least one processor and memory; The memory and the processor are connected via a bus; The memory is used to store one or more programs; When the one or more programs are executed by the at least one processor, a flexible load resource real-time deduction method as described in any one of claims 1 to 9 is implemented.
20. A readable storage medium, characterized in that: An execution program is stored thereon, and when the execution program is executed, a flexible load resource real-time deduction method as described in any one of claims 1 to 9 is implemented.