Metering error prediction method, system and equipment for multi-scale bilateral GRU
Through a multi-scale bilateral GRU network, feature extraction and timing analysis of the historical interactive data of charging piles is solved, and the problem of traditional offline verification methods affecting the normal use of charging piles is realized, and the online accurate prediction of charging pile metering errors is achieved.
Patent Information
- Application Number
- CN202411896870.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2044-12-23
AI Technical Summary
The traditional charging pile metering system offline verification method affects the normal use of charging piles and causes economic losses, and cannot effectively predict metering errors.
A multi-scale bilateral GRU network is adopted to obtain the historical interaction data of DC charging piles, generate sequences of different time scales, extract mapping features and perform STL feature decomposition, and combine the bilateral GRU network for timing feature extraction, predict measurement errors, and integrate results through expansion convolution and mean pooling operations.
It realizes online accurate prediction of charging pile metering errors, avoids downtime losses caused by offline verification, and improves the accuracy and reliability of the metering system.
Smart Images

Figure CN120067626A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of on-line monitoring of electric power metering, and particularly relates to a metering error prediction method, system and device based on multi-scale bilateral GRU. Background Art
[0002] As a key device for energy replenishment of electric vehicles, the main function of a charging pile is to provide DC or AC electric energy to charge electric vehicles. As the core component of the charging pile, the metering system's accuracy directly affects the charging cost of users and the energy replenishment efficiency of electric vehicles. However, in actual operation, factors such as equipment aging, sensor failures, environmental factor interference, and software algorithm errors can all lead to inconsistencies between the metering results of the charging pile and the actual charging amount of the charging pile, thereby affecting the interests of users and causing trade disputes.
[0003] To ensure the accuracy of charging pile metering, it is necessary to regularly calibrate the metering system of the charging pile. However, traditional calibration methods need to be carried out when the charging pile is offline, which not only affects the normal use of the charging pile but also causes a large amount of economic losses. Therefore, the traditional offline calibration method can no longer meet the requirements, and the research and application of the charging pile metering error prediction algorithm are key technical problems that need to be solved urgently. Summary of the Invention
[0004] The purpose of the present invention is to provide a metering error prediction method, system and device based on multi-scale bilateral GRU for the above problems existing in the prior art.
[0005] To achieve the above purpose, the technical solution of the present invention is as follows:
[0006] In the first aspect, the present invention proposes a metering error prediction method based on multi-scale bilateral GRU, including:
[0007] S1. Obtain historical interaction data during the charging process of the DC charging pile, and generate sequences of different time scales according to different sampling frequencies for the historical interaction data;
[0008] S2. Extract the mapping features of each scale sequence, and perform STL feature decomposition on the extracted mapping features to obtain the trend term, seasonal term and remainder term after feature decomposition of each scale sequence;
[0009] S3. Construct a new bilateral GRU network, and send the trend term, seasonal term and remainder term after feature decomposition of each scale sequence into the bilateral GRU network for time series feature extraction to obtain the metering error prediction results of each scale sequence;
[0010] S4. Reduce the scale of the metering error prediction results of each scale sequence, and integrate them to obtain the metering error prediction result of the DC charging pile.
[0011] In S3, the new bilateral GRU network includes a gating unit and a linear prediction unit. The specific steps are as follows:
[0012] S31. In the gating unit of the new bilateral GRU network, the reset gate and the update gate are used to extract the temporal features of the trend term and the seasonal term after the decomposition of the sequence features at each scale, and the output results of the trend term and the seasonal term are obtained:
[0013]
[0014] In the above formula, is the hidden state of the seasonal term at time t, that is, the output result of the seasonal term, is the update gate passed by the seasonal term, is the hidden state of the seasonal term at time t-1, is the candidate hidden state of the seasonal term at time t, σ(.) is the Sigmod function, is the weight matrix of the seasonal term update gate, is the temporal feature vector corresponding to the seasonal term at time t, tanh(.) is the hyperbolic tangent function, is the weight matrix of the seasonal term candidate hidden state, is the reset gate passed by the seasonal term, is the weight matrix of the seasonal term reset gate, is the hidden state of the trend term at time t, that is, the output result of the trend term, is the update gate passed by the trend term, is the hidden state of the trend term at time t-1, is the candidate hidden state of the trend term at time t, is the weight matrix of the trend term update gate, is the temporal feature vector corresponding to the trend term at time t, is the weight matrix of the trend term candidate hidden state, is the reset gate passed by the trend term, is the weight matrix of the trend term reset gate;
[0015] In the linear prediction unit of the new bilateral GRU network, the following formula is used to extract the temporal features of the remainder after feature decomposition, and the output result of the remainder is obtained:
[0016]
[0017] In the above formula, is the output result of the remainder, α is the linear smoothing coefficient, is the temporal feature vector corresponding to the remainder at time t, is the initial time series feature vector of the remainder term, and both λ and θ are exponential model coefficients;
[0018] S32. Superimpose the output results of the trend term, seasonal term, and remainder term to obtain the measurement error prediction result of each scale sequence:
[0019]
[0020] In the above formula, Y m is the measurement error prediction result of the m-th scale sequence, T is the total time, is the measurement error prediction result of the m-th scale sequence at time t.
[0021] The said S4 includes:
[0022] S41. Arrange the measurement error prediction results of each scale sequence in descending order of sampling frequency, that is, in the order of increasing time scale as {Y 0 ,..., Y m ,..., Y M};
[0023] S42. Perform dilated convolution operation and average pooling operation on Y M to reduce the time scale of Y M to the same scale as Y M-1 , and obtain the measurement error prediction result after scale reduction AverPool(Dconv M (Y M ))), where AverPool(.) is the average pooling operation, Dconv M(.) is the dilated convolution operation under the M-th scale, and sum the measurement error prediction result after scale reduction AverPool(Dconv M (Y M )) with Y M-1 to obtain the summed measurement error prediction result;
[0024] S43. Perform dilated convolution operation and average pooling operation on the summed measurement error prediction result to reduce it to the same scale as Y M-2 , and sum it with Y M-2 . Repeat this operation process in a loop until the integration of the measurement error prediction results of all scale sequences is completed.
[0025] The said S2 includes:
[0026] S21. Extract the mapping features of each scale sequence in the multi-scale sequence dataset using the following formula:
[0027]
[0028] In the above formula, χ m is the mapping feature of the sequence X m at the m-th scale, is the multi-scale sequence set,
[0029] S22. The following formula is used to perform STL feature decomposition on the mapping features of each scale sequence to obtain the trend term, seasonal term, and remainder term after feature decomposition of each scale sequence:
[0030] STL(χ m ) = (L m , S m , P m );
[0031]
[0032] In the above formula, L m is the trend term, S m is the seasonal term, P m is the remainder term, is the time series feature vector corresponding to the trend term at time t, is the time series feature vector corresponding to the seasonal term at time t, is the time series feature vector corresponding to the remainder term at time t.
[0033] In the second aspect, the present invention proposes a multi-scale bilateral GRU metering error prediction system, including a time scale sequence generation module, a feature extraction and decomposition module, a bilateral GRU network construction module, and a result integration module;
[0034] The time scale sequence generation module is used to obtain historical interaction data during the charging process of the DC charging pile and generate sequences of different time scales according to different sampling frequencies;
[0035] The feature extraction and decomposition module is used to extract the mapping features of each scale sequence and perform STL feature decomposition on the extracted mapping features to obtain the trend term, seasonal term, and remainder term after feature decomposition of each scale sequence;
[0036] The bilateral GRU network construction module is used to construct a new bilateral GRU network, and send the trend term, seasonal term, and remainder term after feature decomposition of each scale sequence into the bilateral GRU network for time series feature extraction to obtain the metering error prediction results of each scale sequence;
[0037] The result integration module is used to perform scale reduction on the metering error prediction results of each scale sequence and integrate them to obtain the metering error prediction result of the DC charging pile.
[0038] The bilateral GRU network construction module includes a result output unit and an output result superposition unit;
[0039] The result output unit is used to perform temporal feature extraction on the trend term and seasonal term after the decomposition of each scale sequence feature by using a reset gate and an update gate in the gated unit of the new bilateral GRU network to obtain the output results of the trend term and the seasonal term, and perform temporal feature extraction on the remaining term after feature decomposition in the linear prediction unit of the new bilateral GRU network to obtain the output result of the remaining term;
[0040]
[0041]
[0042] In the above formula, is the hidden state of the seasonal term at time t, that is, the output result of the seasonal term, is the update gate passed by the seasonal term, is the hidden state of the seasonal term at time t - 1, is the candidate hidden state of the seasonal term at time t, σ(.) is the Sigmod function, is the weight matrix of the seasonal term update gate, is the temporal feature vector corresponding to the seasonal term at time t, tanh(.) is the hyperbolic tangent function, is the weight matrix of the seasonal term candidate hidden state, is the reset gate passed by the seasonal term, is the weight matrix of the seasonal term reset gate, is the hidden state of the trend term at time t, that is, the output result of the trend term, is the update gate passed by the trend term, is the hidden state of the trend term at time t - 1, is the candidate hidden state of the trend term at time t, is the weight matrix of the trend term update gate, is the temporal feature vector corresponding to the trend term at time t, is the weight matrix of the trend term candidate hidden state, is the reset gate passed by the trend term, is the weight matrix of the trend term reset gate, is the output result of the remaining term, α is the linear smoothing coefficient, is the temporal feature vector corresponding to the remaining term at time t, is the initial temporal feature vector of the remaining term, λ and θ are both exponential model coefficients;
[0043] The output result superposition unit is used to superpose the output results of the trend term, seasonal term and remainder term to obtain the measurement error prediction result of each scale sequence:
[0044]
[0045]
[0046] In the above formula, Y m is the measurement error prediction result of the m-th scale sequence, T is the total time, is the measurement error prediction result of the m-th scale sequence at time t.
[0047] The result integration module includes a sequence arrangement unit, a scale reduction unit, and a loop repetition unit;
[0048] The sequence arrangement unit is used to arrange the measurement error prediction results of each scale sequence in descending order of sampling frequency, that is, in the order of increasing time scale as {Y 0 ,..., Y m ,..., Y M};
[0049] The scale reduction unit is used to perform dilated convolution operation and average pooling operation on Y M to reduce the time scale of Y M to the same scale as Y M-1 to obtain the measurement error prediction result after scale reduction AverPool(Dconv M (Y M ))), where AverPool(.) is the average pooling operation, and Dconv M (.) is the dilated convolution operation under the M-th scale, and add the measurement error prediction result after scale reduction AverPool(Dconv M (Y M )) to Y M-1 to obtain the measurement error prediction result after summation;
[0050] The loop repetition unit is used to perform dilated convolution operation and average pooling operation on the measurement error prediction result after summation to reduce it to the same scale as Y M-2 and add it to Y M-2 , and loop and repeat this operation process until the integration of the measurement error prediction results of all scale sequences is completed.
[0051] The feature extraction and decomposition module includes a mapping feature extraction unit and a feature decomposition unit;
[0052] The mapping feature extraction unit is used to extract the mapping features of each scale sequence in the multi-scale sequence dataset by using the following formula:
[0053]
[0054] In the above formula, χ m is the mapping feature of the sequence Xm at the m-th scale, is the multi-scale sequence set,
[0055] The feature decomposition unit is used to perform STL feature decomposition on the mapping features of each scale sequence by using the following formula to obtain the trend term, seasonal term, and remainder term after the feature decomposition of each scale sequence:
[0056] STL(χ n )=(L m , S m , P m );
[0057]
[0058]
[0059] In the above formula, L m is the trend term, S m is the seasonal term, P m is the remainder term, is the time series feature vector corresponding to the trend term at time t, is the time series feature vector corresponding to the seasonal term at time t, is the time series feature vector corresponding to the remainder term at time t.
[0060] Thirdly, the present invention proposes a metering error prediction device for a multi-scale bilateral GRU, including a processor and a memory;
[0061] The memory is used to store computer program code and transmit the computer program code to the processor;
[0062] The processor is used to execute the foregoing metering error prediction method for a multi-scale bilateral GRU according to the instructions in the computer program code.
[0063] Fourthly, the present invention proposes a computer storage medium, on which a computer program is stored;
[0064] When the computer program is executed by a processor, the steps of the foregoing metering error prediction method for a multi-scale bilateral GRU are implemented.
[0065] Compared with the prior art, the beneficial effects of the present invention are:
[0066] 1. The present invention proposes a metering error prediction method, system and device based on multi-scale bilateral GRU. The method first obtains the historical interaction data during the charging process of a DC charging pile, and generates sequences with different time scales according to different sampling frequencies for the historical interaction data; extracts the mapping features of each scale sequence, and performs STL feature decomposition on the extracted mapping features to obtain the trend term, seasonal term and remainder after the feature decomposition of each scale sequence; then constructs a new bilateral GRU network, and sends the trend term, seasonal term and remainder after the feature decomposition of each scale sequence into the bilateral GRU network for time series feature extraction to obtain the metering error prediction results of each scale sequence; finally, reduces the scale of the metering error prediction results of each scale sequence and integrates them to obtain the metering error prediction result of the DC charging pile. This method constructs a new bilateral GRU network, specifically extracts the time series features of the three decomposition terms of each scale sequence, and makes the output of the bilateral GRU network more conform to the hidden state of the current task through multi-dimensional feature extraction, so as to obtain a more accurate metering error prediction result.
[0067] 2. The present invention proposes a metering error prediction method, system and device based on multi-scale bilateral GRU. When integrating the metering error prediction results of the DC charging pile, this method continuously reduces the scale of the large-scale metering error prediction results through dilation convolution operation and mean pooling operation, effectively fuses the metering error prediction results of different time scales, better simulates the fluctuation of the metering error of the charging pile during actual operation, and realizes the online accurate prediction of the metering error of the charging pile. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] Figure 1 is the overall flowchart of the method of the present invention.
[0069] Figure 2 is the structural schematic diagram of the new bilateral GRU network described in Embodiment 1,
[0070] Figure 3 is the integration flowchart of the metering error prediction results described in Embodiment 1.
[0071] Figure 4 is the structural diagram of the system of the present invention.
[0072] Figure 5 is the structural diagram of the device described in Embodiment 3. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0073] The present invention will be further described in detail below in conjunction with the specific embodiments and the accompanying drawings.
[0074] The present invention proposes a measurement error prediction method, system and device based on multi-scale bilateral GRU, which obtains historical interaction data during the charging process of a DC charging pile, including the output voltage, current, state of charge of the battery, charging duration and cumulative electrical energy indication error of the charging pile, and generates sequences of different time scales from the historical interaction data according to different sampling frequencies; extracts the mapping features of each scale sequence, and performs STL feature decomposition on the mapping features of each scale sequence to obtain the trend term, seasonal term and remainder after the feature decomposition of each scale sequence; constructs a new bilateral GRU network to specifically extract the time series features of the three decomposition terms of each scale sequence, and obtains the measurement error prediction results of each scale sequence; finally, reduces the scale of the measurement error prediction results of each scale sequence through dilation convolution operation and average pooling operation, and integrates to obtain the measurement error prediction result of the DC charging pile, realizing the online accurate prediction of the measurement error of the charging pile.
[0075] Embodiment 1:
[0076] As Figure 1 shown, a measurement error prediction method based on multi-scale bilateral GRU is carried out in sequence according to the following steps:
[0077] 1. Obtain the historical interaction data during the charging process of the DC charging pile, and generate sequences of different time scales from the historical interaction data according to different sampling frequencies;
[0078] The historical interaction data during the charging process of the DC charging pile includes the output voltage U, current I, state of charge S of the battery, charging duration T and cumulative electrical energy indication error Ep of the charging pile;
[0079] Since the quantity units and orders of magnitude of various historical interaction data are different, the following formula is used to standardize the obtained data:
[0080]
[0081] In the above formula, is the standardized data value, z is the original data value, μ is the mean of the original data set, and δ is the standard deviation of the original data set;
[0082] Set the standardized historical interaction data sequence X ∈ R T×C , where R is the set of real numbers, T is the length of the sequence X, C is the dimension of the sequence X, and according to different sampling frequencies, the sequence X is divided into sequences of different time scales through moving window averaging to generate a multi-scale sequence data set where m ∈ {0,..., M}, m is the number of scale types, X 0is the minimum time-scale sequence, whose sampling frequency is determined according to the sampling frequency of the actual acquisition device. If the original acquisition data of the device is minute-level data, the minimum time-scale sequence can take data with one data point per minute, including the most refined time-varying data, X M is the maximum time-scale sequence, which contains the overall trend and macroscopic changes of the sequence.
[0083] 2. Extract the mapping features of each scale sequence, and perform STL feature decomposition on the extracted mapping features to obtain the trend term, seasonal term, and remainder term after feature decomposition of each scale sequence;
[0084] Map the multi-scale sequence dataset to the embedding layer for multi-scale deep feature representation. Use the following formula to extract the mapping features of each scale sequence in the multi-scale sequence dataset for feature extraction in the subsequent network structure:
[0085]
[0086] In the above formula, χ m is the mapping feature of the sequence X m under the m-th scale, is the multi-scale sequence set,
[0087] To reduce the complexity of the multi-scale sequence and make the sequence features more intuitive, use the following formula to perform STL feature decomposition on the mapping features of each scale sequence to obtain the trend term, seasonal term, and remainder term after feature decomposition of each scale sequence:
[0088] STL(χ m ) = (L m , S m , P m );
[0089]
[0090] In the above formula, L m is the trend term, S m is the seasonal term, P m is the remainder term, is the time-series feature vector corresponding to the trend term at time t, is the time-series feature vector corresponding to the seasonal term at time t, is the time-series feature vector corresponding to the remainder term at time t.
[0091] 3. Construct a new bilateral GRU network, whose structure is as Figure 2 shown. Send the trend term, seasonal term, and remainder term after feature decomposition of each scale sequence into the bilateral GRU network for time-series feature extraction to obtain the measurement error prediction results of each scale sequence;
[0092] The new bilateral GRU network includes a gating unit and a linear prediction unit. In the gating unit of the new bilateral GRU network, a reset gate and an update gate are used to extract the temporal features of the trend term and the seasonal term after decomposing the sequence features at each scale, and the output results of the trend term and the seasonal term are obtained:
[0093]
[0094]
[0095] In the above formula, is the hidden state of the seasonal term at time t, that is, the output result of the seasonal term, is the update gate passed by the seasonal term, is the hidden state of the seasonal term at time t-1, is the candidate hidden state of the seasonal term at time t, σ(.) is the Sigmod function, is the weight matrix of the update gate of the seasonal term, is the temporal feature vector corresponding to the seasonal term at time t, tanh(.) is the hyperbolic tangent function, is the weight matrix of the candidate hidden state of the seasonal term, is the reset gate passed by the seasonal term, is the weight matrix of the reset gate of the seasonal term, is the hidden state of the trend term at time t, that is, the output result of the trend term, is the update gate passed by the trend term, is the hidden state of the trend term at time t-1, is the candidate hidden state of the trend term at time t, is the weight matrix of the update gate of the trend term, is the temporal feature vector corresponding to the trend term at time t, is the weight matrix of the candidate hidden state of the trend term, is the reset gate passed by the trend term, is the weight matrix of the reset gate of the trend term;
[0096] Since the data residual information contained in the residual term also carries the local features of the original data, in order to utilize it in the final measurement error prediction result, a linear prediction unit is designed in the new bilateral GRU network to specifically extract the local features in the residual term. Different from the non-linear relationship of the reset gate and the update gate in the gating unit, the linear prediction unit directly obtains the output result of the residual term in a linear smoothing manner without considering complex global information, making the extraction effect of local feature information better;
[0097] In the linear prediction unit of the new bilateral GRU network, the following formula is used to extract the temporal features of the remainder after feature decomposition, and the output result of the remainder is obtained:
[0098]
[0099] In the above formula, is the output result of the remainder, α is the linear smoothing coefficient, is the temporal feature vector corresponding to the remainder at time t, is the initial temporal feature vector of the remainder, and both λ and θ are exponential model coefficients;
[0100] By superimposing the output results of the trend term, seasonal term, and remainder, the measurement error prediction result of each scale sequence is obtained:
[0101]
[0102] In the above formula, Y m is the measurement error prediction result of the m-th scale sequence, T is the total time, is the measurement error prediction result of the m-th scale sequence at time t.
[0103] 4. Scale down the measurement error prediction results of each scale sequence and integrate them to obtain the measurement error prediction result of the DC charger;
[0104] Arrange the measurement error prediction results of each scale sequence in the multi-scale sequence dataset in descending order of sampling frequency, that is, in the order of increasing time scale as {Y 0 ,..., Y m ,..., Y M}, where m is the number of time scale types, Y 0 is the measurement error prediction result of the smallest time scale, Y M is the measurement error prediction result of the largest time scale. The measurement error prediction results of different time scales can reveal different frequency characteristics. For high-frequency small-scale data, it is very sensitive to the instantaneous fluctuations of errors and helps to identify sudden changes in errors, while large-scale data is more conducive to long-term trend prediction of errors. For time scale sequences with large error fluctuations, different time scale data at hourly and daily frequencies can be obtained by adjusting minute-level data, which is also sufficient to capture changes in measurement errors;
[0105] The integration process is as shown in Figure 3 . First, perform dilation convolution operation and average pooling operation on Y M at the corresponding scale to reduce the scale of Y M to the same scale as Y M-1The same scale, get the measurement error prediction result AverPool(Dconv M (Y M )), where AverPool(.) is the average pooling operation, Dconv M(.) is the dilated convolution operation at the Mth scale, and the measurement error prediction result AverPool (Dconv M (Y M )) and Y M-1 Sum the result to obtain the summed measurement error prediction result;
[0106] Then the summed measurement error prediction result is subjected to dilated convolution and mean pooling operations to reduce it to the same value as Y M-2 The same scale and with Y M-2 The sum is calculated and the operation is repeated until the summed measurement error prediction result is reduced to the same value as Y 0 The same scale and with Y 0 The sum is used to obtain the measurement error prediction result Y of the DC charging pile out The advantage of this is that the prediction results at a large time scale are often aimed at the trend prediction of the error, and the prediction results will be more accurate if the output error values are integrated and normalized to a small time scale;
[0107] In summary, the following formula is used to calculate the measurement error prediction result of the DC charging pile:
[0108]
[0109] In actual situations, relevant interactive data of the charging process of the DC charging pile to be tested is obtained. If the obtained measurement error prediction result is within the accuracy level of the charger, that is, ±1.0% of level 1, it means that the current charging pile is normal. If the measurement error prediction result exceeds this range, it means that the current error state of the charging pile is abnormal.
[0110] In order to verify the effectiveness of the method of the present invention, RMSE, MAE and MAPE are used as evaluation indicators to compare the deviation between the measurement error prediction results and the actual error values obtained by the mainstream time series prediction algorithms, including RNN, LSTM, GRU and TCN algorithm models, and the method of the present invention. The comparison of the evaluation index results is shown in Table 1:
[0111] Table 1 Evaluation index results
[0112]
[0113] The above results show that the method of the present invention is far lower than other algorithms of the same type in terms of RMSE, MAE, and MAPE, indicating that the method of the present invention has the highest accuracy among algorithms of the same type, and the measurement error prediction results obtained in practical applications are more accurate.
[0114] Example 2:
[0115] As Figure 4 shown, a measurement error prediction system for a multi-scale bilateral GRU includes a time-scale sequence generation module, a feature extraction and decomposition module, a bilateral GRU network construction module, and a result integration module;
[0116] The time-scale sequence generation module is used to obtain historical interaction data during the charging process of a DC charging pile, and generate sequences of different time scales according to different sampling frequencies for the historical interaction data;
[0117] The feature extraction and decomposition module is used to extract the mapping features of each scale sequence, and perform STL feature decomposition on the extracted mapping features to obtain the trend term, seasonal term, and remainder term after the feature decomposition of each scale sequence;
[0118] The bilateral GRU network construction module is used to construct a new bilateral GRU network, and send the trend term, seasonal term, and remainder term after the feature decomposition of each scale sequence into the bilateral GRU network for time series feature extraction to obtain the measurement error prediction results of each scale sequence;
[0119] The result integration module is used to reduce the scale of the measurement error prediction results of each scale sequence and integrate them to obtain the measurement error prediction result of the DC charging pile.
[0120] The feature extraction and decomposition module includes a mapping feature extraction unit and a feature decomposition unit;
[0121] The mapping feature extraction unit is used to extract the mapping features of each scale sequence in the multi-scale sequence dataset by using the following formula:
[0122]
[0123] In the above formula, χ m is the mapping feature of the sequence X m under the m-th scale, is the multi-scale sequence set,
[0124] The feature decomposition unit is used to perform STL feature decomposition on the mapping features of each scale sequence by using the following formula to obtain the trend term, seasonal term, and remainder term after the feature decomposition of each scale sequence:
[0125] STL(χ m )=(Lm , S m , P m );
[0126]
[0127] In the above formula, L m is the trend term, S m is the seasonal term, P m is the residual term, is the time series feature vector corresponding to the trend term at time t, is the time series feature vector corresponding to the seasonal term at time t, is the time series feature vector corresponding to the residual term at time t.
[0128] The bilateral GRU network construction module includes a result output unit and an output result superposition unit;
[0129] The result output unit is used to perform time series feature extraction on the trend term and seasonal term decomposed from the feature of each scale sequence by using the reset gate and update gate in the gated unit of the new bilateral GRU network to obtain the output results of the trend term and seasonal term, and perform time series feature extraction on the residual term decomposed from the feature in the linear prediction unit of the new bilateral GRU network to obtain the output result of the residual term;
[0130]
[0131] In the above formula, is the hidden state of the seasonal term at time t, that is, the output result of the seasonal term, is the update gate passed by the seasonal term, is the hidden state of the seasonal term at time t - 1, is the candidate hidden state of the seasonal term at time t, σ(.) is the Sigmod function, is the weight matrix of the update gate of the seasonal term, is the time series feature vector corresponding to the seasonal term at time t, tanh(.) is the hyperbolic tangent function, is the weight matrix of the candidate hidden state of the seasonal term, is the reset gate passed by the seasonal term, is the weight matrix of the reset gate of the seasonal term, is the hidden state of the trend term at time t, that is, the output result of the trend term, is the update gate passed by the trend term, is the hidden state of the trend term at time t - 1, is the candidate hidden state of the trend term at time t, is the weight matrix of the update gate of the trend term, is the time series feature vector corresponding to the trend term at time t, is the weight matrix of the candidate hidden state of the trend term, is the reset gate passed by the trend term, is the weight matrix of the reset gate of the trend term, is the output result of the remainder term, and α is the linear smoothing coefficient, is the time series feature vector corresponding to the remainder term at time t, is the initial time series feature vector of the remainder term, and both λ and θ are exponential model coefficients;
[0132] The output result superposition unit is used to superpose the output results of the trend term, seasonal term and remainder term to obtain the measurement error prediction result of each scale sequence:
[0133]
[0134] In the above formula, Y m is the measurement error prediction result of the m-th scale sequence, and T is the total time, is the measurement error prediction result of the m-th scale sequence at time t.
[0135] The result integration module includes a sequence arrangement unit, a scale reduction unit, and a cyclic repetition unit;
[0136] The sequence arrangement unit is used to arrange the measurement error prediction results of each scale sequence in descending order of sampling frequency, that is, in the order of increasing time scale as {Y 0 ,..., Y m ,..., Y M};
[0137] The scale reduction unit is used to perform dilated convolution operation and average pooling operation on Y M to reduce the time scale of Y M to the same scale as Y M-1 , and obtain the measurement error prediction result after scale reduction AverPool(Dconv M (Y M ))), where AverPool(.) is the average pooling operation, and Dconv M(.) is the dilated convolution operation at the M-th scale, and sum the measurement error prediction result after scale reduction AverPool(Dconv M (Y M )) with Y M-1 to obtain the measurement error prediction result after summation;
[0138] The cyclic repetition unit is used to perform dilated convolution operation and average pooling operation on the measurement error prediction result after summation to reduce it to the same scale as YM-2 the same scale and with Y M-2 Sum them up, and repeat this operation process in a loop until the integration of the measurement error prediction results of all scale sequences is completed.
[0139] Embodiment 3:
[0140] As Figure 5 shown, a measurement error prediction device for a multi-scale bilateral GRU includes a processor and a memory;
[0141] The memory is used to store computer program codes and transmit the computer program codes to the processor;
[0142] The processor is used to execute the steps of the measurement error prediction method for a multi-scale bilateral GRU described in Embodiment 1 according to the instructions in the computer program codes.
[0143] Embodiment 4:
[0144] A computer storage medium stores a computer program thereon;
[0145] When the computer program is executed by a processor, the steps of the measurement error prediction method for a multi-scale bilateral GRU described in this solution are implemented.
Claims
1. A multi-scale bilateral GRU measurement error prediction method, characterized in that: The method comprises: S1. Obtain historical interaction data during the charging process of the DC charging pile, and generate sequences of different time scales according to different sampling frequencies; S2, extracting the mapping features of each scale sequence, and performing STL feature decomposition on the extracted mapping features to obtain the trend term, seasonal term and residual term after the feature decomposition of each scale sequence; S3. Construct a new bilateral GRU network, and send the trend term, seasonal term and residual term after the decomposition of the features of each scale sequence into the bilateral GRU network to extract the time series features, and obtain the measurement error prediction results of each scale sequence; S4. Downscaling the measurement error prediction results of each scale sequence and integrating them to obtain the measurement error prediction results of the DC charging pile.
2. The method for predicting the measurement error of a multi-scale bilateral GRU according to claim 1, characterized in that: In S3, the new bilateral GRU network includes a gating unit and a linear prediction unit, and the specific steps include: S31. In the gating unit of the new bilateral GRU network, the reset gate and update gate are used to extract the time series features of the trend item and the seasonal item after the feature decomposition of each scale sequence, and the output results of the trend item and the seasonal item are obtained: In the above formula, is the hidden state of the seasonal term at time t, that is, the output result of the seasonal term, is the update gate that the seasonal term passes through, is the hidden state of the seasonal term at time t-1, is the candidate hidden state of the seasonal term at time t, σ(·) is the Sigmod function, Update the gate weight matrix for the seasonal term, is the time series eigenvector corresponding to the seasonal term at time t, tanh(·) is the hyperbolic tangent function, is the weight matrix of the candidate hidden states of the seasonal term, is the reset gate that the seasonal item passes through, Reset the gate weight matrix for the seasonal term, is the hidden state of the trend item at time t, that is, the output result of the trend item, is the update gate that the trend item passes through, is the hidden state of the trend item at time t-1, is the candidate hidden state of the trend item at time t, Update the gate weight matrix for the trend term, is the time series feature vector corresponding to the trend item at time t, is the weight matrix of the candidate hidden state of the trend item, is the reset gate that the trend item passes through, Reset the gate weight matrix for the trend term; In the linear prediction unit of the new bilateral GRU network, the following formula is used to extract the temporal features of the remainder after feature decomposition to obtain the output result of the remainder: In the above formula, is the output result of the remainder, α is the linear smoothing coefficient, is the time series feature vector corresponding to the remainder at time t, is the initial time series feature vector of the remainder, λ and θ are both exponential model coefficients; S32. Superimpose the output results of the trend term, seasonal term and residual term to obtain the measurement error prediction results of each scale series: In the above formula, Y m is the measurement error prediction result of the mth scale sequence, T is the total time, is the measurement error prediction result of the m-th scale sequence at time t.
3. The method for predicting measurement error of a multi-scale bilateral GRU according to claim 1, characterized in that: The S4 includes: S41, the measurement error prediction results of each scale sequence are arranged in the order of {Y0, ..., Y m , ..., Y M }; S42, for Y M Perform dilated convolution and mean pooling operations to make Y M The time scale is reduced to the same as Y M-1 The same scale, get the measurement error prediction result AverPool(Dconv M (Y M )), where AverPool(.) is the average pooling operation, Dconv M (.) is the dilated convolution operation at the Mth scale, and the measurement error prediction result after scale reduction is AverPool (Dconv M (Y M )) and Y M-1 Sum the result to obtain the summed measurement error prediction result; S43, the summed measurement error prediction result is subjected to dilated convolution operation and mean pooling operation to reduce it to the value of Y M-2 The same scale and with Y M-2 Sum and repeat this process cyclically until the integration of the measurement error prediction results of all scale sequences is completed.
4. The method for predicting measurement error of a multi-scale bilateral GRU according to claim 1, characterized in that: The S2 includes: S21. Use the following formula to extract the mapping features of each scale sequence in the multi-scale sequence dataset: In the above formula, χ m is the sequence X at the mth scale m The mapping characteristics of is a multi-scale sequence set, S22. Use the following formula to perform STL feature decomposition on the mapping features of each scale sequence to obtain the trend term, seasonal term and residual term after feature decomposition of each scale sequence: STL(x m )=(L m ,S m ,P m ); In the above formula, L m is the trend term, S m is the seasonal term, P m is the remainder, is the time series feature vector corresponding to the trend item at time t, is the time series feature vector corresponding to the seasonal term at time t, is the time series feature vector corresponding to the remainder at time t.
5. A multi-scale bilateral GRU measurement error prediction system, characterized in that: The system includes a time scale sequence generation module, a feature extraction and decomposition module, a bilateral GRU network construction module, and a result integration module; The time scale sequence generation module is used to obtain the historical interaction data during the charging process of the DC charging pile, and generate sequences of different time scales according to different sampling frequencies from the historical interaction data; The feature extraction and decomposition module is used to extract the mapping features of each scale sequence, and perform STL feature decomposition on the extracted mapping features to obtain the trend term, seasonal term and residual term after the feature decomposition of each scale sequence; The bilateral GRU network construction module is used to construct a new bilateral GRU network, and the trend term, seasonal term and residual term after the decomposition of the features of each scale sequence are sent together into the bilateral GRU network to extract the time series features, so as to obtain the measurement error prediction results of each scale sequence; The result integration module is used to scale down the measurement error prediction results of each scale sequence and integrate them to obtain the measurement error prediction results of the DC charging pile.
6. A multi-scale bilateral GRU measurement error prediction system according to claim 5, characterized in that: The bilateral GRU network construction module includes a result output unit and an output result superposition unit; The result output unit is used to extract the time series features of the trend item and the season item after the feature decomposition of each scale sequence by using the reset gate and the update gate in the gating unit of the new bilateral GRU network, so as to obtain the output results of the trend item and the season item, and to extract the time series features of the residual item after the feature decomposition in the linear prediction unit of the new bilateral GRU network, so as to obtain the output result of the residual item; In the above formula, is the hidden state of the seasonal term at time t, that is, the output result of the seasonal term, is the update gate that the seasonal term passes through, is the hidden state of the seasonal term at time t-1, is the candidate hidden state of the seasonal term at time t, σ(·) is the Sigmod function, Update the gate weight matrix for the seasonal term, is the time series eigenvector corresponding to the seasonal term at time t, tanh(·) is the hyperbolic tangent function, is the weight matrix of the candidate hidden states of the seasonal term, is the reset gate that the seasonal item passes through, Reset the gate weight matrix for the seasonal term, is the hidden state of the trend item at time t, that is, the output result of the trend item, is the update gate that the trend item passes through, is the hidden state of the trend item at time t-1, is the candidate hidden state of the trend item at time t, Update the gate weight matrix for the trend term, is the time series feature vector corresponding to the trend item at time t, is the weight matrix of the candidate hidden state of the trend item, is the reset gate that the trend item passes through, Reset the gate weight matrix for the trend term, is the output result of the remainder, α is the linear smoothing coefficient, is the time series feature vector corresponding to the remainder at time t, is the initial time series feature vector of the remainder, λ and θ are both exponential model coefficients; The output result superposition unit is used to superimpose the output results of the trend term, the seasonal term and the residual term to obtain the measurement error prediction results of each scale sequence: In the above formula, Y m is the measurement error prediction result of the mth scale sequence, T is the total time, is the measurement error prediction result of the m-th scale sequence at time t.
7. The multi-scale bilateral GRU measurement error prediction system according to claim 5, characterized in that: The result integration module includes a sequence arrangement unit, a scale reduction unit, and a cyclic repetition unit; The sequence arrangement unit is used to arrange the measurement error prediction results of each scale sequence in the order of {Y0, ..., Y m , ..., Y M }; The scale reduction unit is used to M Perform dilated convolution and mean pooling operations to make Y M The time scale is reduced to the same as Y M-1 The same scale, get the measurement error prediction result AverPool(Dconv M (Y M )), where AverPool(·) is the average pooling operation, and Dconv M (·) is the dilated convolution operation at the Mth scale, and the measurement error prediction result after scale reduction is AverPool (Dconv M (Y M )) and Y M-1 Sum the result to obtain the summed measurement error prediction result; The cyclic repetition unit is used to perform dilated convolution and mean pooling operations on the summed measurement error prediction results to reduce them to the value of Y M-2 The same scale and with Y M-2 Sum and repeat this process cyclically until the integration of the measurement error prediction results of all scale sequences is completed.
8. The multi-scale bilateral GRU measurement error prediction system according to claim 5, characterized in that: The feature extraction and decomposition module includes a mapping feature extraction unit and a feature decomposition unit; The mapping feature extraction unit is used to extract the mapping features of each scale sequence in the multi-scale sequence data set using the following formula: In the above formula, χ m is the sequence X at the mth scale m The mapping characteristics of is a multi-scale sequence set, The feature decomposition unit is used to perform STL feature decomposition on the mapping features of each scale sequence using the following formula to obtain the trend term, seasonal term and residual term after the feature decomposition of each scale sequence: STL(x m )=(L m ,S m ,P m ); In the above formula, L m is the trend term, S m is the seasonal term, P m is the remainder, is the time series feature vector corresponding to the trend item at time t, is the time series feature vector corresponding to the seasonal term at time t, is the time series feature vector corresponding to the remainder at time t.
9. A multi-scale bilateral GRU measurement error prediction device, characterized in that: including a processor and a memory; The memory is used to store computer program code and transmit the computer program code to the processor; The processor is used to execute the measurement error prediction method of a multi-scale bilateral GRU according to any one of claims 1-4 according to the instructions in the computer program code.
10. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of a method for predicting measurement errors of a multi-scale bilateral GRU according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
STL-SARIMA-GRU power prediction method added with VMD data decomposition
CN116881856A