Harmonic prediction method based on CEEMDAN-VMD-DBO-TCN-Attention
The power grid data is decomposed and predicted through the CEEMDAN-VMD-DBO-TCN-Attention model, which solves the complex problem of power harmonic pollution, and realizes high accuracy prediction and early warning of harmonic data to ensure the safe operation of the power grid.
Patent Information
- Application Number
- CN202411050929.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-01
- Publication Date
- 2024-12-06
AI Technical Summary
The wide application of new energy power generation systems and nonlinear loads in the power grid leads to complex harmonic pollution of power, seriously affecting the safe and high-quality operation of the power grid, and it is difficult to effectively predict and early warning of existing technologies.
The harmonic prediction method based on CEEMDAN-VMD-DBO-TCN-Attention is used to process the original data through iso-depth binning, and the CEEMDAN-VMD decomposes noise, and the DBO-TCN-Attention model is used to predict, and the prediction results are optimized using an error evaluation function.
It significantly improves the accuracy of the prediction of harmonic data in the power grid, can warning of potential harmonic problems in advance, and reduces the damage caused by harmonics to the power grid.
Smart Images

Figure CN119093326A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power grid management, and more specifically discloses a harmonic prediction method based on CEEMDAN-VMD-DBO-TCN-Attention. Background Art
[0002] With the increasing application of new energy power generation systems, DC transmission devices and nonlinear loads in power grids, power harmonic pollution has become increasingly complex, seriously affecting the safe and high-quality operation of power grids. If the power harmonic monitoring data can be predicted and analyzed, that is, the trend of harmonic monitoring indicators in the future can be inferred in a scientific and reasonable way, and the predicted value can be compared with the national standard limit value, the purpose of harmonic early warning can be achieved, which can draw the attention of power grid operators to potential harmonic problems, so as to take measures in advance to reduce the damage of harmonics to the power grid. Summary of the invention
[0003] The main technical problem solved by the present invention is to provide a harmonic prediction method based on CEEMDAN-VMD-DBO-TCN-Attention, which can solve the problem that power harmonic pollution is becoming increasingly complex and seriously affects the safe and high-quality operation of the power grid.
[0004] To solve the above technical problems, according to one aspect of the present invention, more specifically, a harmonic prediction method based on CEEMDAN-VMD-DBO-TCN-Attention is provided, comprising the following steps:
[0005] S1. Analyze the original data and use the equal-depth binning method to process the noise values and outliers in the data;
[0006] S2, using CEEMDAN-VMD method to decompose the preprocessed data and obtain multiple stationary intrinsic mode components IMF;
[0007] S3, multiple stationary modal components IMF are input into the DBO-TCN-Attention model respectively, and the DBO-TCN-Attention model is used to calculate, analyze and predict the components;
[0008] S4. Select an error evaluation function to perform error calculation on the obtained data.
[0009] Furthermore, in S1, the original data includes: historical harmonic data, current data, phase angle data, and power data.
[0010] Furthermore, in S2, the CEEMDAN-VMD method comprises the following steps:
[0011] 1) Input original data:
[0012] 2) Execute CEEMDAN decomposition algorithm to generate IMF;
[0013] 3) Calculate the sample entropy of each IMF;
[0014] 4) Execute K-Means clustering algorithm to classify sample entropy;
[0015] 5) Based on the clustering results, IMFs are integrated into new IMFs (CO-IMFs);
[0016] 6) Execute the VMD algorithm to further decompose the selected CO-IMFs;
[0017] 7) Integrate the VMD decomposition results and the original data.
[0018] Furthermore, in S2, the decomposition process of the CEEMDAN algorithm includes the following steps:
[0019] Assume E k (·) represents the kth intrinsic mode component obtained after EMD decomposition, while the kth intrinsic mode component obtained by CEEMDAN decomposition is denoted as IMF k . Let v j (t) is a Gaussian white noise signal that satisfies the standard normal distribution, where j = 1, 2, ..., N, represents the number of times white noise is added, and x(t) represents the signal to be decomposed.
[0020] 1. Add Gaussian white noise to the signal to be decomposed x(t) to form a new signal. Then, perform EMD decomposition on the new signal to obtain the first-order intrinsic mode component. Then, average all the generated intrinsic mode components and obtain the first mode component: that is:
[0021]
[0022] 2. Calculate the residual sequence q1(t) after removing the first modal component:
[0023] q1(t)=x(t)-IMF1(t)
[0024] 3. Add the noise component μ to the second residual sequence i Μ i [v m (t)], we can get the second modal component IMF2(t)
[0025]
[0026] 4. Repeat steps 2 and 3 until the residual signal becomes a monotonic function and cannot be further decomposed, then terminate the loop. At this point, the number of intrinsic mode components obtained is k, and the relevant calculation is as follows:
[0027] q i (t) = q i-1 (t)-IMF i (t)
[0028]
[0029]
[0030] Furthermore, in step 3), calculating the sample entropy includes the following steps:
[0031] Let the original time series be denoted as T, the embedding dimension be denoted as e, the similarity tolerance parameter be denoted as r, and the distance between state vectors be denoted as d(s i ,s j ), the number and average value are recorded as A i and A q (e).
[0032] (1) Construction of state vector:
[0033] For a given original time series T = {t1, t2, ..., t N}, select a suitable embedding dimension q to construct a new state vector T = {t i ,t i+1 ,…,t i+q-1}, where i = 1, 2, ..., Nq;
[0034] (2) Calculation of distance:
[0035] The maximum value of the element difference distance between two state vectors is:
[0036] d(s i ,s j )=max(|s i+k -s j+k |);
[0037] (3) Calculation of similarity number:
[0038] Given a similarity tolerance parameter p, the statistical state vector s i and j The number of distances between them that is less than or equal to e i , and define:
[0039]
[0040] Where 1≤i≤Nq;
[0041] (4) Calculation of average value: The average value of
[0042]
[0043] (5) Increase the embedding dimension and calculate the sample entropy: We increase the embedding dimension to q+1 and repeat the above steps to calculate A q+1 (e). When the length of the time series is finite, the sample entropy can be calculated according to the following formula:
[0044]
[0045] Furthermore, in S3, a method for setting the stop condition is as follows:
[0046] The training stops when the iteration accuracy is better than 0.005% or reaches 5000 times; MAE is the mean absolute error, n is the number of training sequences, N is the total number of samples, and Z n is the predicted value, Z ′ n is the actual value.
[0047] The beneficial effects of the harmonic prediction method based on CEEMDAN-VMD-DBO-TCN-Attention of the present invention are as follows: the present invention is applicable to the prediction of power grid harmonic data, and the designed prediction model is predicted by decomposition and noise reduction, which can significantly improve the prediction accuracy of harmonic data. At the same time, in order to improve the parameter adjustment efficiency and enhance the model performance, the DBO algorithm is introduced to optimize the network hyperparameters, and finally the relevant grid parameters can be optimized under different environments. The present invention proposes a harmonic prediction method based on CEEMDAN-VMD-DBO-TCN-Attention, in which, in addition to the historical harmonic data with time characteristics, a variety of power-related indicators, such as phase angle data, are used as the input features of TCN, and then, in order to effectively utilize the TCN-related data, the feature weights of the hidden layer in the TCN layer are strengthened by using the Attention mechanism weighting, and finally the prediction value is obtained, which can significantly improve the prediction accuracy of harmonic data. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The present invention is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0049] Figure 1 A schematic diagram of the method flow chart. DETAILED DESCRIPTION
[0050] The present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.
[0051] According to one aspect of the present invention, Figure 1 As shown, a harmonic prediction method based on CEEMDAN-VMD-DBO-TCN-Attention is provided, including the following steps:
[0052] The first step is to analyze the original data and use the equal-depth binning method to process the noise values and outliers in the data. The original data includes: historical harmonic data, current data, phase angle data, and power data. The original data includes: historical harmonic data, current data, phase angle data, and power data.
[0053] The second step is to use the CEEMDAN-VMD method to decompose the preprocessed data to obtain multiple stable intrinsic modal components IMF. The CEEMDAN-VMD method includes the following steps:
[0054] 1) Input original data:
[0055] 2) Execute CEEMDAN decomposition algorithm to generate IMF;
[0056] 3) Calculate the sample entropy of each IMF;
[0057] 4) Execute K-Means clustering algorithm to classify sample entropy;
[0058] 5) Based on the clustering results, IMFs are integrated into new IMFs (CO-IMFs);
[0059] 6) Execute the VMD algorithm to further decompose the selected CO-IMFs;
[0060] 7) Integrate the VMD decomposition results and the original data.
[0061] The decomposition process of the CEEMDAN algorithm includes the following steps:
[0062] Assume E k (·) represents the kth intrinsic mode component obtained after EMD decomposition, while the kth intrinsic mode component obtained by CEEMDAN decomposition is denoted as IMF k . Let v j (t) is a Gaussian white noise signal that satisfies the standard normal distribution, where j = 1, 2, ..., N, represents the number of times white noise is added, and x(t) represents the signal to be decomposed.
[0063] 1. Add Gaussian white noise to the signal to be decomposed x(t) to form a new signal. Then, perform EMD decomposition on the new signal to obtain the first-order intrinsic mode component. Then, average all the generated intrinsic mode components and obtain the first mode component: that is:
[0064]
[0065] 2. Calculate the residual sequence q1(t) after removing the first modal component:
[0066] q1(t)=x(t)-IMF1(t)
[0067] 3. Add the noise component μ to the second residual sequence i Μ i [v m (t)], we can get the second modal component IMF2(t)
[0068]
[0069] 4. Repeat steps 2 and 3 until the residual signal becomes a monotonic function and cannot be further decomposed, then terminate the loop. At this point, the number of intrinsic mode components obtained is k, and the relevant calculation is as follows:
[0070] q i (t) = q i-1 (t)-IMF i (t)
[0071]
[0072]
[0073] Calculating sample entropy involves the following steps:
[0074] Let the original time series be denoted as T, the embedding dimension be denoted as e, the similarity tolerance parameter be denoted as r, and the distance between state vectors be denoted as d(s i ,s j ), the number and average value are recorded as A i and A q (e).
[0075] (1) Construction of state vector:
[0076] For a given original time series T = {t1, t2, ..., t N}, select a suitable embedding dimension q to construct a new state vector T = {t i ,t i+1 ,…,t i+q-1}, where i = 1, 2, ..., Nq;
[0077] (2) Calculation of distance:
[0078] The maximum value of the element difference distance between two state vectors is:
[0079] d(s i ,s j )=max(|s i+k -s j+k |);
[0080] (3) Calculation of similarity number:
[0081] Given a similarity tolerance parameter p, the statistical state vector s i and j The number of distances between them that is less than or equal to e i , and define:
[0082]
[0083] Where 1≤i≤Nq;
[0084] (4) Calculation of average value: The average value of
[0085]
[0086] (5) Increase the embedding dimension and calculate the sample entropy: We increase the embedding dimension to q+1 and repeat the above steps to calculate A q+1 (e). When the length of the time series is finite, the sample entropy can be calculated according to the following formula:
[0087]
[0088] In the third step, multiple stationary modal components IMF are input into the DBO-TCN-Attention model respectively, and the DBO-TCN-Attention model is used to calculate, analyze and predict the components. One method of setting the stop condition is: when the following formula:
[0089] The training stops when the iteration accuracy is better than 0.005% or reaches 5000 times; MAE is the mean absolute error, n is the number of training sequences, N is the total number of samples, and Z n is the predicted value, Z ′ n is the actual value.
[0090] The fourth step is to select the error evaluation function to perform error calculation on the obtained data.
[0091] The electrical components that appear in this article are all electrical components that exist in reality.
[0092] Of course, the above description is not a limitation of the present invention, and the present invention is not limited to the above examples. Changes, modifications, additions or substitutions made by ordinary technicians in this technical field within the essential scope of the present invention also fall within the protection scope of the present invention.
Claims
1. A harmonic prediction method based on CEEMDAN-VMD-DBO-TCN-Attention, characterized in that: The following steps are involved: S1. Analyze the original data and use the equal-depth binning method to process the noise values and outliers in the data; S2, using CEEMDAN-VMD method to decompose the preprocessed data and obtain multiple stationary intrinsic mode components IMF; S3, multiple stationary modal components IMF are input into the DBO-TCN-Attention model respectively, and the DBO-TCN-Attention model is used to calculate, analyze and predict the components; S4. Select an error evaluation function to perform error calculation on the obtained data.
2. The harmonic prediction method based on CEEMDAN-VMD-DBO-TCN-Attention according to claim 1, characterized in that: In S1, the original data includes: historical harmonic data, current data, phase angle data, and power data.
3. The harmonic prediction method based on CEEMDAN-VMD-DBO-TCN-Attention according to claim 1, characterized in that: In S2, the CEEMDAN-VMD method comprises the following steps: 1) Input original data: 2) Execute CEEMDAN decomposition algorithm to generate IMF; 3) Calculate the sample entropy of each IMF; 4) Execute K-Means clustering algorithm to classify sample entropy; 5) Based on the clustering results, IMFs are integrated into new IMFs (CO-IMFs); 6) Execute the VMD algorithm to further decompose the selected CO-IMFs; 7) Integrate the VMD decomposition results and the original data.
4. The harmonic prediction method based on CEEMDAN-VMD-DBO-TCN-Attention according to claim 1, characterized in that: In S2, the decomposition process of the CEEMDAN algorithm includes the following steps: Assume E k (·) represents the kth intrinsic mode component obtained after EMD decomposition, while the kth intrinsic mode component obtained by CEEMDAN decomposition is denoted as IMF k . Let v j (t) is a Gaussian white noise signal that satisfies the standard normal distribution, where j = 1, 2, ..., N, represents the number of times white noise is added, and x(t) represents the signal to be decomposed.
1. Add Gaussian white noise to the signal to be decomposed x(t) to form a new signal. Then, perform EMD decomposition on the new signal to obtain the first-order intrinsic mode component. Then, average all the generated intrinsic mode components and obtain the first mode component: that is:
2. Calculate the residual sequence q1(t) after removing the first modal component: q1(t)=x(t)-IMF1(t) 3. Add the noise component μ to the second residual sequence i Μ i [v m (t)], we can get the second modal component IMF2(t) 4. Repeat steps 2 and 3 until the residual signal becomes a monotonic function and cannot be further decomposed, then terminate the loop. At this point, the number of intrinsic mode components obtained is k, and the relevant calculation is as follows: q i (t)=q i-1 (t)-IMF i (t) 5. The harmonic prediction method based on CEEMDAN-VMD-DBO-TCN-Attention according to claim 3, characterized in that: In step 3), calculating the sample entropy includes the following steps: Let the original time series be denoted by T, the embedding dimension be denoted by e, the similarity tolerance parameter be denoted by r, and the distance between state vectors be denoted by d(s i ,s j ), the number and average value are recorded as A i and A q (e). (1) Construction of state vector: For a given original time series T = {t1, t2, ..., t N }, select a suitable embedding dimension q to construct a new state vector T = {t i ,t i+1 ,…,t i+q-1 }, where i = 1, 2, ..., Nq; (2) Calculation of distance: The maximum value of the element difference distance between two state vectors is: d(s i ,s j )=max(|s i+k -s j+k |); (3) Calculation of similarity number: Given a similarity tolerance parameter p, the statistical state vector s i and j The number of distances between them that is less than or equal to e i , and define: Where 1≤i≤Nq; (4) Calculation of average value: The average value of (5) Increase the embedding dimension and calculate the sample entropy: We increase the embedding dimension to q+1 and repeat the above steps to calculate A q +1 (e). When the time series length is finite, the sample entropy can be calculated according to the following formula:
6. The harmonic prediction method based on CEEMDAN-VMD-DBO-TCN-Attention according to claim 1, characterized in that: In S3, one method of setting the stop condition is as follows: The training stops when the iteration accuracy is better than 0.005% or reaches 5000 times; MAE is the mean absolute error, n is the number of training sequences, N is the total number of samples, and Z n is the predicted value, Z′ n is the actual value.
