Power system time series data generation method and system
Through the power system time series data generation method based on the Transformer model, the problems of insufficient data accuracy and reliability in the existing technology are solved, and high-precision power system time series data generation is achieved to support the safe and stable operation and development plan of the power system.
Patent Information
- Application Number
- CN202411794032.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2044-12-09
AI Technical Summary
Existing power system time series data generation schemes are unable to fully capture complex multi-scale dependency characteristics, resulting in low accuracy and reliability of the generated data, which cannot meet the needs of modern power systems.
A power system time series data generation method based on the Transformer model is adopted, including data preprocessing, building a Transformer basic network, self-attention mechanism and frequency decomposition. Time series data that conforms to statistical characteristics and physical laws is generated through training and filtering.
It achieves higher reliability and better accuracy of power system time series data, and can generate data that meets the safe and stable operation and development plan of the power system.
Smart Images

Figure CN119740028B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of electrical automation, and in particular relates to a method and system for generating time series data of a power system. Background Art
[0002] With the development of economy and technology and the improvement of people's living standards, electricity has become an indispensable secondary energy source in people's production and life, bringing endless convenience to people's production and life. Therefore, ensuring a stable and reliable supply of electricity has become one of the most important tasks of the power system.
[0003] As power systems grow in size, the generation of time-series data is becoming increasingly important. Reliable and accurate generation of time-series data can provide data assurance for the safe and stable operation of power systems and the formulation of development plans.
[0004] Currently, traditional solutions for generating time-series data for power systems generally rely on linear or simple nonlinear models. While simple and feasible, these solutions struggle to fully capture complex multi-scale dependencies, resulting in low accuracy and reliability in the generated data. Existing solutions of this type no longer meet the time-series data generation requirements of today's power systems. Summary of the Invention
[0005] One of the objectives of the present invention is to provide a method for generating time series data of a power system with high reliability and good accuracy.
[0006] A second object of the present invention is to provide a system for implementing the method for generating time series data of a power system.
[0007] The method for generating time series data of a power system provided by the present invention comprises the following steps:
[0008] S1. Obtain historical time series data information of the power system;
[0009] S2. Preprocess the data information obtained in step S1 to obtain a training data set;
[0010] S3. Build a primary model for generating power system time series data based on the Transformer model;
[0011] S4. Using the training data set obtained in step S2, the primary model for generating power system time series data constructed in step S3 is trained to obtain a power system time series data generation model;
[0012] S5. Using the power system time series data generation model obtained in step S4, generate primary power system time series data;
[0013] S6. Filter the data generated in step S5, output the power system time series data that conforms to the statistical characteristics and physical laws, and complete the generation of the target power system time series data.
[0014] The pre-processing described in step S2 specifically includes the following steps:
[0015] The historical time series data obtained in step S1 is expressed as where y t represents the output data of the power system sampled at the tth time step; T represents the total number of time steps;
[0016] For missing data, the following formula is used for interpolation:
[0017] f(x)=a i +b i (xx i )+c i (xx i ) 2 +d i (xx i ) 3
[0018] Where f(x) is the interpolated data; x i is the horizontal coordinate value of the known data point; x is the horizontal coordinate value of the interpolated data; a i is the first interpolation coefficient; b i is the second interpolation coefficient; c i is the third interpolation coefficient; d i is the fourth interpolation coefficient;
[0019] Perform outlier data detection: If the data y t satisfy Then determine the data y t is abnormal data; among them, is the mean of the time series data, α is the set threshold and its value is k times the standard deviation σ of the time series data, and k is the set coefficient;
[0020] Correction of abnormal point data: for abnormal point data y t , use the following formula to correct it:
[0021]
[0022] In the formula is the corrected data; y t-1 is the data value of the previous data of the abnormal point data; y t+1 The data value of the next data point after the abnormal point data;
[0023] Through the above preprocessing, we finally get the preprocessed time series data
[0024] The step S3 described above is based on the Transformer model to construct a primary model for generating power system time series data, which specifically includes the following steps:
[0025] The constructed power system time series data generates a primary model. The processing process includes the following steps:
[0026] Based on the Transformer model, build the Transformer basic network;
[0027] The time series data obtained in step S2 Input into the Transformer basic network to obtain a multi-scale feature vector
[0028] The obtained multi-scale feature vector Perform frequency decomposition to obtain the subsequence after frequency decomposition in, is the data component of the tth time step at frequency k;
[0029] Subsequence after frequency decomposition Input into the Transformer basic network to obtain the generated time series data prediction value under frequency band k
[0030] According to the predicted values of the time series data in each frequency band, the generated time series data is obtained for Where K is the total number of frequency bands.
[0031] The Transformer model is based on the Transformer basic network, which specifically includes the following steps:
[0032] The input data of the Transformer basic network is represented as yy t is the input data of the tth time step, and T is the total number of time steps;
[0033] Embedding layer processing: input data After processing through the embedding layer, the input feature sequence is obtained xx t is the feature vector of the tth time step in the feature space;
[0034] Processing of self-attention mechanism: In the self-attention mechanism, the query matrix Q, key matrix K and value matrix V of the input feature sequence are expressed as
[0035] Q=W q XX
[0036] K=W k XX
[0037] V=W v XX
[0038] Where W q is the weight matrix of the query matrix; W k is the key matrix weight matrix; W v is the weight matrix of the value matrix; XX is the input feature matrix, and XX={xx1,xx2,...,xx T};
[0039] In the process of self-attention mechanism processing, the sparse representation of the attention weight matrix A is set:
[0040] When j∈S(i), when When A ij =0; where A ij is the attention score between the i-th query and the j-th key; Q i is the query matrix; S(i) is the i The key dependency point set of K j or K j' is the key matrix; j' is the index variable of the candidate key; d is the scaling factor of the feature dimension;
[0041] During the self-attention mechanism processing, the following steps are used to dynamically adjust the attention window: by calculating the similarity score between the query and all keys, the keys that exceed the set threshold are selected as the scope of attention calculation. Specifically, the model first calculates the relevance score between the query and each key through dot product or other similarity measurement methods, and sets a fixed threshold. When the relevance score of a key is greater than the threshold, it is included in the window range for subsequent attention weight calculation. This solution can dynamically adjust the window according to the actual content of the input data, ensuring that the scope of attention is accurate and has high computational efficiency.
[0042] Output of the self-attention mechanism: The output feature matrix O of the self-attention mechanism is O=AV;
[0043] Processing of the fully connected layer: The output feature matrix O output by the self-attention mechanism is mapped back to the time series output space through the fully connected layer to obtain the output of the Transformer basic network.
[0044] The multi-scale feature vector obtained by Perform frequency decomposition to obtain the subsequence after frequency decomposition The specific steps include:
[0045] The obtained multi-scale feature vector The frequency decomposition is performed using the following formula:
[0046]
[0047] In the formula is the data component of the tth time step at frequency k; ψ k is the selected basis function; N is the number of basis functions.
[0048] The training described in step S4 specifically includes the following steps:
[0049] The following formula is used as the loss function of the kth frequency band:
[0050]
[0051] Where L (k) is the loss function value of the kth frequency band; is the predicted value of the time series data under the generated frequency band k; is the actual time series data value under frequency band k;
[0052] The following formula is used as the total loss function:
[0053]
[0054] Where L is the total loss function value;
[0055] During training, the model is trained by minimizing the total loss function.
[0056] Step S6, in which the data generated in step S5 is filtered to output power system time series data that conforms to statistical characteristics and physical laws, specifically includes the following steps:
[0057] The overall distribution difference between the generated data and the real data is calculated using the following formula:
[0058]
[0059] Where ES is the energy fraction; is the predicted value at another time step t';
[0060] The consistency between the generated data and the real data is calculated using the following formula:
[0061]
[0062] Where CRPS is the continuous ranking probability score; is the cumulative distribution function of the generated data; I(z≥y t ) is the indicator function, which represents the real data distribution; z is the distribution evaluation variable;
[0063] The load balancing error of the generated data is calculated using the following formula:
[0064]
[0065] Where ε t is the load balance error; D t is the load demand at time t; L t is the system loss;
[0066] The fluctuation range of the generated data is calculated using the following formula:
[0067]
[0068] In the formula is the fluctuation range of the generated data;
[0069] Using Fourier transform, the main periodic component P of the generated data is extracted k ;
[0070] According to the generated data, the physical laws are modified: if ε t If the value is greater than the set threshold, the generated data will be corrected until ε t Less than the set threshold to ensure that the generated data meets the load balance; if If the value is greater than the set threshold, the generated data will be corrected until is less than the set threshold to ensure that the generated data fluctuation is within the set range; if P k If the set threshold is exceeded, the main periodic component of the generated data is adjusted to ensure that the fluctuation amplitude and periodic characteristics of the generated data meet the set requirements;
[0071] Ultimately, the output is power system time series data that conforms to statistical characteristics and physical laws.
[0072] The present invention also provides a system for realizing the method for generating time series data of the power system, comprising a data acquisition module, a data processing module, a model construction module, a model training module, a preliminary generation module and a data generation module; the data acquisition module, the data processing module, the model construction module, the model training module, the preliminary generation module and the data generation module are connected in series in sequence; the data acquisition module is used to acquire the historical time series data information of the power system and upload the data information to the data processing module; the data processing module is used to pre-process the acquired data information according to the received data information to obtain a training data set and upload the data information to the model construction module; the model construction module is used to construct a training data set based on the Transformer model according to the received data information. The power system time series data generates a primary model and uploads the data information to the model training module; the model training module is used to train the power system time series data generation primary model constructed in step S3 based on the received data information and the obtained training data set, obtain the power system time series data generation model, and upload the data information to the preliminary generation module; the preliminary generation module is used to generate primary power system time series data based on the received data information and the obtained power system time series data generation model, and upload the data information to the data generation module; the data generation module is used to filter the generated data based on the received data information, output the power system time series data that conforms to the statistical characteristics and physical laws, and complete the generation of the time series data of the target power system.
[0073] The power system time series data generation method and system provided by the present invention not only realizes the generation of power system time series data, but also has higher reliability and better accuracy by acquiring, analyzing and processing historical time series data, training a data generation model constructed based on the Transformer model, and correcting the final generated data. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] Figure 1 Schematic diagram of the process flow of the present invention.
[0075] Figure 2 Schematic diagram of the functional modules of the system of the present invention. DETAILED DESCRIPTION
[0076] like Figure 1 The method flow chart of the present invention is shown as follows: The method for generating time series data of a power system provided by the present invention comprises the following steps:
[0077] S1. Obtain historical time series data information of the power system;
[0078] S2. Preprocess the data information obtained in step S1 to obtain a training data set; specifically, the steps include:
[0079] The historical time series data obtained in step S1 is expressed as where y t represents the output data of the power system sampled at the tth time step; T represents the total number of time steps;
[0080] For missing data, the following formula is used for interpolation:
[0081] f(x)=a i +b i (xx i )+c i (xx i ) 2 +d i (xx i ) 3
[0082] Where f(x) is the interpolated data; x i is the horizontal coordinate value of the known data point; x is the horizontal coordinate value of the interpolated data; a i is the first interpolation coefficient; b i is the second interpolation coefficient; c i is the third interpolation coefficient; d i is the fourth interpolation coefficient; the first to fourth interpolation coefficients are calculated based on known adjacent data points and smoothness conditions to ensure smooth connections between interpolation segments, thereby maintaining local continuity and consistency of time series data;
[0083] Perform outlier data detection: If the data y t satisfy Then determine the data y t is abnormal data; among them, is the mean of the time series data, α is the set threshold and its value is k times the standard deviation σ of the time series data, and k is the set coefficient;
[0084] Correction of abnormal point data: for abnormal point data y t , use the following formula to correct it:
[0085]
[0086] In the formula is the corrected data; y t-1 is the data value of the previous data of the abnormal point data; y t+1 The data value of the data after the outlier data is obtained. This correction scheme not only maintains the reasonable volatility of the data, but also avoids the interference of the outlier data on the overall trend, thereby improving the accuracy and consistency of the data.
[0087] Through the above preprocessing, we finally get the preprocessed time series data
[0088] S3. Based on the Transformer model, construct a primary model for generating power system time series data. This includes the following steps:
[0089] The constructed power system time series data generates a primary model. The processing process includes the following steps:
[0090] Based on the Transformer model, build the Transformer basic network; specifically, the following steps are included:
[0091] The input data of the Transformer basic network is represented as yy t is the input data of the tth time step, and T is the total number of time steps;
[0092] Embedding layer processing: input data After processing through the embedding layer, the input feature sequence is obtained xx t is the feature vector of the tth time step in the feature space;
[0093] Processing of self-attention mechanism: In the self-attention mechanism, the query matrix Q, key matrix K and value matrix V of the input feature sequence are expressed as
[0094] Q=W q XX
[0095] K=W k XX
[0096] V=W v XX
[0097] Where W q is the weight matrix of the query matrix; W k is the key matrix weight matrix; W v is the weight matrix of the value matrix; XX is the input feature matrix, and XX={xx1,xx2,...,xx T};W q 、W k and W v A feature space for mapping input features to queries, keys, and values;
[0098] In the process of self-attention mechanism, in order to avoid wasting computing resources in the case of long-term dependence, only the key time steps that have a greater impact on the output are focused on; therefore, the sparse representation of the attention weight matrix A is set:
[0099] When j∈S(i), when When A ij =0; where A ij is the attention score between the i-th query and the j-th key; Q i is the query matrix; S(i) is the i The key dependency point set of K j or K j' is the key matrix; j' is the index variable of the candidate key; d is the scaling factor of the feature dimension; the above sparse scheme automatically filters important time steps and only retains the positions that have a greater impact on the current time step, thereby achieving effective modeling of long-term dependencies;
[0100] During the self-attention mechanism processing, the following steps are used to dynamically adjust the attention window: by calculating the similarity score between the query and all keys, the keys that exceed the set threshold are screened out as the scope of attention calculation; specifically, the model first calculates the relevance score between the query and each key through dot product or other similarity measurement methods, and sets a fixed threshold. When the relevance score of a key is greater than the threshold, it is included in the window range for subsequent attention weight calculation; this scheme can dynamically adjust the window according to the actual content of the input data, ensuring that the focus range is accurate and has high computational efficiency; this scheme of dynamically adjusting the attention window makes the attention window more focused on local time steps when short-term changes are drastic; and when long-term changes are stable, the window range is automatically expanded to cover longer time dependencies, ensuring that the model can flexibly switch between short-term fluctuations and long-term trends;
[0101] Output of the self-attention mechanism: The output feature matrix O of the self-attention mechanism is O=AV;
[0102] Fully connected layer processing: The output feature matrix O output by the self-attention mechanism is mapped back to the time series output space through the fully connected layer to obtain the output of the Transformer basic network;
[0103] By leveraging a sparse attention mechanism and a dynamic window adjustment strategy, the constructed Transformer basic network not only effectively captures the multi-scale characteristics of power system data, but also significantly improves computational efficiency in modeling long-term dependencies.
[0104] The time series data obtained in step S2 Input into the Transformer basic network to obtain a multi-scale feature vector
[0105] The obtained multi-scale feature vector Perform frequency decomposition to obtain the subsequence after frequency decomposition in, is the data component of the tth time step at frequency k; through frequency decomposition, multiple subsequences with different frequencies are obtained to model the short-term fluctuation and long-term trend characteristics of power system time series data respectively; specifically, the following steps are included:
[0106] The obtained multi-scale feature vector The frequency decomposition is performed using the following formula:
[0107]
[0108] In the formula is the data component of the tth time step at frequency k; ψ k is the selected basis function; N is the number of odd functions;
[0109] Subsequence after frequency decomposition Input into the Transformer basic network to obtain the generated time series data prediction value under frequency band k To learn the temporal dependency characteristics at each scale, the feature vectors of each frequency band pass through the model in sequence to gradually improve the modeling accuracy of short-term fluctuations and long-term trends;
[0110] According to the predicted values of the time series data in each frequency band, the generated time series data is obtained for Where K is the total number of frequency bands. By integrating the features of different frequency bands, the resulting data contains both global trends and short-term fluctuation information, achieving a unified expression of multi-scale information.
[0111] S4. Using the training data set obtained in step S2, the primary model for generating power system time series data constructed in step S3 is trained to obtain a power system time series data generation model;
[0112] In specific implementation, the training process includes the following steps:
[0113] The following formula is used as the loss function of the kth frequency band:
[0114]
[0115] Where L (k) is the loss function value of the kth frequency band; is the predicted value of the time series data under the generated frequency band k; is the actual time series data value under frequency band k;
[0116] The following formula is used as the total loss function:
[0117]
[0118] Where L is the total loss function value;
[0119] During training, the model is trained by minimizing the total loss function;
[0120] S5. Using the power system time series data generation model obtained in step S4, generate primary power system time series data;
[0121] S6. Filter the data generated in step S5, output the power system time series data that conforms to the statistical characteristics and physical laws, and complete the generation of the target power system time series data; specifically, the following steps are included:
[0122] The overall distribution difference between the generated data and the real data is calculated using the following formula:
[0123]
[0124] Where ES is the energy fraction; is the predicted value at another time step t';
[0125] The consistency between the generated data and the real data is calculated using the following formula:
[0126]
[0127] Where CRPS is the continuous ranking probability score; is the cumulative distribution function of the generated data; I(z≥y t ) is the indicator function, which represents the real data distribution; z is the distribution evaluation variable;
[0128] After completing the statistical feature evaluation, the physical mechanism of the power system is embedded to verify the physical consistency of the generated data and ensure that the data meets the core constraints of power system analysis;
[0129] The load balancing error of the generated data is calculated using the following formula:
[0130]
[0131] Where ε t is the load balance error; D t is the load demand at time t; L t is the system loss;
[0132] The fluctuation range of the generated data is calculated using the following formula:
[0133]
[0134] In the formula is the fluctuation range of the generated data;
[0135] Using Fourier transform, the main periodic component P of the generated data is extracted k ;
[0136] According to the generated data, the physical laws are modified: if ε t If the value is greater than the set threshold, the generated data will be corrected until ε t Less than the set threshold to ensure that the generated data meets the load balance; if If the value is greater than the set threshold, the generated data will be corrected until is less than the set threshold to ensure that the generated data fluctuation is within the set range; if P k If the set threshold is exceeded, the main periodic component of the generated data is adjusted to ensure that the fluctuation amplitude and periodic characteristics of the generated data meet the set requirements, including the target range and physical laws.
[0137] Ultimately, the output is power system time series data that conforms to statistical characteristics and physical laws.
[0138] like Figure 2 The figure shows a functional module diagram of the system of the present invention: the system disclosed in the present invention for realizing the method for generating time series data of the power system comprises a data acquisition module, a data processing module, a model construction module, a model training module, a preliminary generation module and a data generation module; the data acquisition module, the data processing module, the model construction module, the model training module, the preliminary generation module and the data generation module are connected in series in sequence; the data acquisition module is used to acquire the historical time series data information of the power system and upload the data information to the data processing module; the data processing module is used to pre-process the acquired data information according to the received data information to obtain a training data set and upload the data information to the model construction module; the model construction module is used to, based on the received data information, mer model, construct a primary model for power system time series data generation, and upload the data information to the model training module; the model training module is used to train the primary model for power system time series data generation constructed in step S3 based on the received data information and the obtained training data set, obtain the power system time series data generation model, and upload the data information to the preliminary generation module; the preliminary generation module is used to generate primary power system time series data based on the received data information and the obtained power system time series data generation model, and upload the data information to the data generation module; the data generation module is used to filter the generated data based on the received data information, output the power system time series data that conforms to the statistical characteristics and physical laws, and complete the generation of the time series data of the target power system.
Claims
1. A method for generating time series data of a power system, comprising the following steps: S1. Obtain historical time-series data of the power system; S2 preprocesses the data information obtained in step S1 to obtain a training data set; the preprocessing comprises the following steps: The historical time series data obtained in step S1 is expressed as ,in represents the output data of the power system sampled at the tth time step; T represents the total number of time steps; For missing data, the following formula is used for interpolation: In the formula The data for interpolation padding; is the horizontal coordinate value of the known data point; The horizontal coordinate value of the interpolated data; is the first interpolation coefficient; is the second interpolation coefficient; is the third interpolation coefficient; is the fourth interpolation coefficient; Perform outlier data detection: If the data satisfy , then determine the data is abnormal data; among them, is the mean of the time series data, is the set threshold and its value is the standard deviation of the time series data of times, is the set coefficient; Correction of abnormal point data: for abnormal point data , use the following formula to correct it: In the formula is the corrected data; The data value of the previous data of the abnormal point data; The data value of the next data point after the abnormal point data; Through the above preprocessing, we finally get the preprocessed time series data ; S3. Build a primary model for generating power system time series data based on the Transformer model; S4. Using the training data set obtained in step S2, the power system time series data generated in step S3 is trained to generate a primary model to obtain a power system time series data generation model; S5. The power system time series data generation model obtained in step S4 is used to generate primary power system time series data; S6. Filter the data generated in step S5, output the power system time series data that conforms to the statistical characteristics and physical laws, and complete the generation of the target power system time series data.
2. The method for generating time series data of a power system according to claim 1, characterized in that The step S3 described above is based on the Transformer model to construct a primary model for generating power system time series data, which specifically includes the following steps: The constructed power system time series data generates a primary model. The processing process includes the following steps: Based on the Transformer model, build the Transformer basic network; The time series data obtained in step S2 Input into the Transformer basic network to obtain a multi-scale feature vector ; The obtained multi-scale feature vector , perform frequency decomposition and obtain the subsequence after frequency decomposition ;in, is the data component of the tth time step at frequency k; Subsequence after frequency decomposition Input into the Transformer basic network to obtain the generated time series data prediction value under frequency band k ; According to the predicted values of the time series data in each frequency band, the generated time series data is obtained for ; where K is the total number of frequency bands.
3. The method for generating time series data of a power system according to claim 2, characterized in that The Transformer model is based on the Transformer basic network, which specifically includes the following steps: The input data of the Transformer basic network is represented as , is the input data of the tth time step, and T is the total number of time steps; Embedding layer processing: input data , processed by the embedding layer, the input feature sequence is obtained , is the feature vector of the tth time step in the feature space; Processing of self-attention mechanism: In the self-attention mechanism, the query matrix Q, key matrix K and value matrix V of the input feature sequence are expressed as In the formula is the weight matrix of the query matrix; is the key matrix weight matrix; is the weight matrix of the value matrix; is the input feature matrix, and ; In the process of self-attention mechanism processing, set the attention weight matrix Sparse representation of : when hour, ;when hour, ;in, is the attention score between the i-th query and the j-th key; is the query matrix; For A set of key dependency points; or is the bond matrix; The index variable for the candidate key; is the scaling factor of the feature dimension; During the self-attention mechanism processing, the following steps are used to dynamically adjust the attention window: calculate the similarity score between the query and all keys, and filter out the keys whose similarity scores exceed the set threshold as the scope of attention calculation; Output of the self-attention mechanism: Get the output feature matrix of the self-attention mechanism for ; Processing of the fully connected layer: the output feature matrix of the self-attention mechanism , mapped back to the time series output space through the fully connected layer to obtain the output of the Transformer basic network.
4. The method for generating time series data of a power system according to claim 3, characterized in that The multi-scale feature vector obtained by , perform frequency decomposition and obtain the subsequence after frequency decomposition , specifically including the following steps: The obtained multi-scale feature vector , use the following formula to perform frequency decomposition: In the formula is the data component of the tth time step at frequency k; is the selected basis function; N is the number of basis functions.
5. The method for generating time series data of a power system according to claim 4, characterized in that The training described in step S4 specifically includes the following steps: The following formula is used as the loss function of the kth frequency band: In the formula is the loss function value of the kth frequency band; is the predicted value of the time series data under the generated frequency band k; is the actual time series data value under frequency band k; The following formula is used as the total loss function: In the formula is the total loss function value; During training, the model is trained by minimizing the total loss function.
6. The method for generating time series data of a power system according to claim 5, characterized in that Step S6, in which the data generated in step S5 is filtered to output power system time series data that conforms to statistical characteristics and physical laws, specifically includes the following steps: The overall distribution difference between the generated data and the real data is calculated using the following formula: In the formula is the energy fraction; For another time step The predicted value of The consistency between the generated data and the real data is calculated using the following formula: In the formula is the continuous ranking probability score; is the cumulative distribution function for the generated data; is the indicator function, which represents the real data distribution; Evaluate variables for distributions; The load balancing error of the generated data is calculated using the following formula: In the formula is the load balancing error; is the load demand at time t; is the system loss; The fluctuation range of the generated data is calculated using the following formula: In the formula is the fluctuation range of the generated data; Use Fourier transform to extract the main periodic components of the generated data ; According to the generated data, the physical laws are modified: if If the value is greater than the set threshold, the generated data will be corrected until Less than the set threshold to ensure that the generated data meets the load balance; if If the value is greater than the set threshold, the generated data will be corrected until is less than the set threshold to ensure that the generated data fluctuation is within the set range; if If the set threshold is exceeded, the main periodic component of the generated data is adjusted to ensure that the fluctuation amplitude and periodic characteristics of the generated data meet the set requirements; Ultimately, the output is power system time series data that conforms to statistical characteristics and physical laws.
7. A system for implementing the method for generating time series data of a power system according to any one of claims 1 to 6, characterized in that It includes a data acquisition module, a data processing module, a model construction module, a model training module, a preliminary generation module and a data generation module; the data acquisition module, the data processing module, the model construction module, the model training module, the preliminary generation module and the data generation module are connected in series in sequence; the data acquisition module is used to obtain the historical time series data information of the power system and upload the data information to the data processing module; The data processing module is used to pre-process the acquired data information according to the received data information, obtain the training data set, and upload the data information to the model construction module; The model building module is used to build a primary model of power system time series data based on the received data information and the Transformer model, and upload the data information to the model training module; The model training module is used to train the primary model for generating the power system time series data constructed in step S3 based on the received data information and the obtained training data set, obtain the power system time series data generation model, and upload the data information to the preliminary generation module; The preliminary generation module is used to generate primary power system time series data based on the received data information and adopt the obtained power system time series data generation model, and upload the data information to the data generation module; The data generation module is used to filter the generated data according to the received data information, output the power system time series data that conforms to the statistical characteristics and physical laws, and complete the generation of the target power system time series data.
Citation Information
Patent Citations
Water quality early warning method based on Informer model
CN114385614A
Prediction method, system and equipment for mechanical drilling speed time sequence characteristics based on Transform model and medium
CN116822580A