Voltage sag analysis method based on 1d v-net deep learning model
A voltage sag analysis method is constructed by using a 1D V-net deep learning model, which solves the problems of low accuracy and increased parameters in existing voltage sag analysis techniques, and achieves more efficient voltage sag feature identification and localization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-10
- Publication Date
- 2026-03-31
AI Technical Summary
In existing voltage sag analysis methods, unidirectional loop networks have low positioning accuracy, while bidirectional loop networks have significantly increased parameters, making accurate analysis difficult.
A 1D V-net-based deep learning model is adopted. By constructing a neural network structure with input, compression, decompression and output sections, and training it with power grid system operating data, the model autonomously learns voltage sag feature information, avoiding the cumbersome feature extraction process.
It improves the accuracy of voltage sag disturbance type classification and start/end time location, while reducing model parameters, thus achieving more efficient voltage sag analysis.
Smart Images

Figure CN114487568B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of power quality measurement and analysis technology in power systems, specifically involving a voltage sag analysis method based on a 1D V-net deep learning model. Background Technology
[0002] Power quality is directly related to the safe and efficient operation of the power system. In recent years, voltage sag has become a major concern in power quality management, and is a problem that urgently needs to be solved by both academia and industry. Statistics show that over 80% of power quality complaints received by the power sector are caused by voltage sag. Voltage sag not only causes huge economic losses to stakeholders but can also have significant social impacts, especially for high-end manufacturing industries. Therefore, voltage sag has become a critical issue for modern power grids.
[0003] Voltage sags have a significant negative impact on power grid reliability, and accurate analysis of voltage sags is a key issue that needs to be addressed promptly after a voltage sag event occurs. Currently, research on voltage sag analysis methods primarily involves deriving mechanisms or mathematical models. However, with the large-scale integration of distributed generation, the complexity of the power grid operating environment is constantly increasing, and the diversity of system operating modes is growing. Analysis based on model mechanisms inevitably involves simplified assumptions or the omission of system parameters, making accurate voltage sag analysis difficult.
[0004] Unlike physical models, data-driven methods reveal the essence and relationships of things through data. Because these methods do not require assumptions or simplifications, nor rely on mechanisms, but depend on data reflecting the true state of the system, and can comprehensively analyze historical and current data, data-driven methods are suitable for solving voltage sag analysis problems. However, current data-driven voltage sag analysis methods still face the following challenges that urgently need to be addressed:
[0005] (1) Unidirectional recurrent networks composed of RNN, LSTM, GRU and other structures essentially achieve voltage sag analysis by using historical information and current input information. However, at the start and end of the voltage sag signal, due to the lack of sufficient historical information or the extremely small correlation between the current signal and the historical signal, or even the reverse correlation, the accuracy is low.
[0006] (2) Bidirectional recurrent network structures such as RNN, LSTM, and GRU essentially use a bidirectional structure to obtain dependent data for future moments, thereby ensuring sufficient information to support the start and end times of the signal and enabling accurate voltage sag analysis. However, when using a bidirectional structure, the number of model parameters will increase exponentially. Summary of the Invention
[0007] The purpose of this invention is to provide a voltage sag analysis method based on the 1D V-net deep learning model, which solves the problems of low positioning accuracy of unidirectional recurrent networks and exponential increase in parameters of bidirectional recurrent neural networks in existing analysis methods.
[0008] The technical solution adopted in this invention is a voltage sag analysis method based on a 1D V-net deep learning model, which is implemented according to the following steps:
[0009] Step 1: Based on the power network system to be tested, number the types of operating conditions. Under different operating conditions of the power network system, change the short-circuit capacity, grounding resistance, duration, start and end time, load capacity, and line impedance of the power network system respectively, and collect the bus voltage data under each operating condition as the voltage sag sample data under each operating condition.
[0010] Step 2: Calculate the root mean square value of voltage under each operating condition by the number of voltage sag samples. If the root mean square value of voltage drops to 10% to 90% of the rated value, then form a set of voltage sag data samples A for the voltage and the corresponding operating condition. At the same time, mark the start and end times of the voltage sag, mark the voltage sampled data value within the duration as 0, and mark the remaining sampled data value as 1.
[0011] Step 3: Label all voltage sag data samples according to the operating condition type number, and combine the start and end times of the voltage sag to form multiple sets of voltage sag data samples B.
[0012] Step 4: Divide the multiple sets of voltage sag data samples B into a training sample set, a validation sample set, and a test sample set according to a ratio of 7:2:1;
[0013] Step 5: Construct the model structure of the 1D V-net deep learning model;
[0014] Step 6: Train the 1D V-net deep learning model offline using the training sample set;
[0015] Step 7: Combine the data in the validation sample set to perform performance analysis on the 1D V-net deep learning model obtained after training in Step 6, evaluate the model overfitting and generalization ability, and obtain the optimal 1D V-net deep learning model.
[0016] Step 8: Input the test sample set data into the optimal 1D V-net deep learning model, and test the model obtained after training; evaluate the model's generalization ability, and if it does not meet the requirements, retrain the model.
[0017] Step 9: Use the tested 1D V-net deep learning model with good model generalization ability for online application to determine the type and start and end times of voltage sag disturbances.
[0018] The invention is further characterized by:
[0019] The operating conditions in step 1 include motor starting, transformer switching, single-phase short circuit, two-phase short circuit, and three-phase short circuit. The operating conditions are numbered as follows: motor starting, transformer switching, single-phase short circuit, two-phase short circuit, and three-phase short circuit are sequentially labeled as number 1 to 5.
[0020] The specific process for calculating the root mean square voltage value under each operating condition using the voltage sag sample number in step 2 is as follows:
[0021] The root mean square value of the voltage data collected in step 1 is calculated according to the following formula (1):
[0022]
[0023] Where N is the number of data points collected in each period, x1, x2, x3, ..., x N The data values corresponding to each sampling data point in each period are listed in turn.
[0024] In step 5, the 1D V-net deep learning model's structure horizontally comprises four parts: input, compression, decompression, and output.
[0025] The input part contains a 1D convolutional layer. The input data passes through the 1D convolutional layer to obtain the output, which is then fed into the compression channel as input. At the same time, since the input part is the interface of the overall model, the voltage sag monitoring data is subjected to max-min normalization to obtain the detection data.
[0026] The formula for max-min normalization is:
[0027]
[0028] Where x is the collected monitoring data value, x* is the processed monitoring data, and x... min To minimize the monitored data, x max This represents the maximum value of the monitored data.
[0029] The compression channel consists of three 1D convolutional layers. All outputs are passed through a ReLU activation function before being fed to the next layer or stage. Each convolutional layer in each stage uses residual channels to form a residual block. In the compression channel, the data output from each stage passes through a one-dimensional convolutional layer with a kernel size of 1×2 and a stride of 2, achieving downsampling of the data. In the compression path, the size of the data in the time dimension decreases layer by layer, and its size is as follows:
[0030]
[0031] Where steps is the length of the input sequence, s n The length of the data in the time dimension of the current stage is the data size and resolution reduction in the time dimension in the compression channel. With the reduction in size, the model fuses the features extracted from the data and focuses on classifying the current data. The final output of each stage is passed to the decompression channel through a jump connection.
[0032] In the decompression channel section, the top layer is the output stage, and the bottom layer is the decompression stage. The decompression stage contains 3 1D convolutional layers, each with a size of 1×3. The output data is output after passing through the ReLU activation function. Each stage uses residual channels to form residual blocks. The output data is upsampled, and the time scale of the output data becomes twice the original after each stage, thus increasing the resolution.
[0033] The output section includes a 1D convolutional layer with a size of 1×1, a stride of 1, a softmax activation function, and 5 convolutional kernels, representing 5 voltage sag perturbation types. It receives the first-stage output data from the compression channel, combines it with the upsampled data after the output of the compression stage, and sends it to the output section.
[0034] Step 6 is as follows: Initialize parameters using global random initialization, train the constructed 1DV-net deep learning model, and iterate through every training data in the training set in each training iteration. Each iteration is called a generation, allowing the neural network model to undergo multiple generations of training. During the training process, the cross-entropy loss function is used as an evaluation of the model's accuracy. Using the backpropagation algorithm, after multiple generations of training, the optimal neural network model parameters are finally obtained, and the optimal approximate solution for each parameter of the neural network is obtained, thus obtaining the optimal deep neural network model and completing the offline training of the model.
[0035] Step 7 involves testing the offline-trained 1D V-net deep learning model using validation sample set data to obtain multiple sets of accuracy rates for voltage sag perturbation type classification and voltage sag start and end time localization. If the deviations of both voltage sag perturbation type classification accuracy and voltage sag start and end time localization accuracy exceed 3%, overfitting occurs, requiring readjustment of the 1D V-net deep learning model's hyperparameters, modification of the number of neurons, and adjustment of the regularization coefficient. The process then returns to step 6 for training, and overfitting is assessed again after training until no overfitting occurs, resulting in the optimal 1D V-net deep learning model.
[0036] Step 9 is as follows: Using the real-time voltage data that has been actually monitored, calculate the root mean square value of the real-time voltage data, input it into the tested optimal 1D V-net deep learning model, and output the data as the required voltage sag disturbance type classification result and start and end time location result.
[0037] The beneficial effects of this invention are:
[0038] (1) The present invention can learn the voltage sag characteristics caused by motor starting, transformer switching, single-phase short circuit, two-phase short circuit and three-phase short circuit directly from the original monitoring data, avoiding the tedious manual feature extraction process based on human experience.
[0039] (2) Compared with the unidirectional recurrent network structure composed of RNN, LSTM, GRU and other structures, the present invention can improve the accuracy of voltage sag disturbance type classification and the accuracy of voltage sag start and end time location.
[0040] (3) Compared with bidirectional recurrent network structures such as RNN, LSTM, and GRU, this invention can ensure the accuracy of voltage sag disturbance type classification and voltage sag start and end time location while reducing model parameters. Attached Figure Description
[0041] Figure 1 This is a flowchart of the process for constructing a 1D V-net deep learning model according to the present invention;
[0042] Figure 2 This is a graph showing the relationship between the number of generations and the loss value during the model training process of this invention.
[0043] Figure 3 This is a schematic diagram showing the changes in the accuracy of voltage transient disturbance type classification and the accuracy of voltage sag start and end time location in this invention;
[0044] Figure 4 This is a schematic diagram showing the changes in the accuracy of voltage transient disturbance type classification and the accuracy of voltage sag start and end time location for a unidirectional loop network based on a unidirectional GRU structure. Detailed Implementation
[0045] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments.
[0046] The present invention provides a voltage sag analysis method based on a 1D V-net deep learning model, which is implemented according to the following steps:
[0047] In conjunction with the power network system under test, the types of operating conditions occurring in the power network system include: motor starting, transformer switching, and various voltage dips caused by short-circuit conditions (including single-phase, two-phase, and three-phase short-circuit conditions). Monitoring data can be obtained through two methods: first, using power quality monitoring equipment or other measuring instruments to collect data from all devices; second, using simulation software, such as Matlab / Simulink, to build a simulation model and obtain data through simulation. The following principles should be followed during data collection: a) For line short-circuit conditions, change the cause, location, line load, start and end times, and transition resistance; for motor starting, change the start time, line load, and upstream transformer capacity; for transformer switching, change the switching time, line load, and transformer capacity; b) Gaussian white noise needs to be added to the selected test samples; c) The number of data points collected in each cycle (i.e., the sampling frequency) should satisfy Shannon's sampling theorem.
[0048] The operating conditions (motor starting, transformer switching, single-phase short circuit, two-phase short circuit, and three-phase short circuit) are numbered 1 to 5. Under these 5 operating conditions, the short-circuit capacity, grounding resistance, duration, start and end time, load capacity, and line impedance in the power network system are changed respectively. The bus voltage data under each operating condition is collected as voltage sag sample data for each operating condition.
[0049] The root mean square (RMS) value of voltage under each operating condition is calculated for the voltage sag sample data. The RMS value of the voltage data collected in step 1 is calculated according to the following formula (1):
[0050]
[0051] Where N is the number of data points collected in each period, x1, x2, x3, ..., x N The data values corresponding to each sampling data point in each period are listed in turn.
[0052] If the root mean square value of the voltage drops to 10% to 90% of the rated value, then the voltage and the corresponding operating condition are formed into a set of voltage sag data sample A. At the same time, the start and end times of the voltage sag are marked, the voltage sample data value within the duration is marked as 0, and the remaining sample data value is marked as 1.
[0053] All voltage sag data samples are labeled according to the operating condition type number, and combined with the start and end times of the voltage sag to form multiple sets of voltage sag data samples B;
[0054] The multiple sets of voltage sag data samples B are divided into a training sample set, a validation sample set, and a test sample set in a ratio of 7:2:1.
[0055] The model structure of the 1D V-net deep learning model consists of four parts horizontally: input, compression channel, decompression channel, and output.
[0056] The input part contains a 1D convolutional layer. The input data passes through the 1D convolutional layer to obtain the output, which is then fed into the compression channel as input. At the same time, since the input part is the interface of the overall model, the voltage sag monitoring data needs to be subjected to max-min normalization to obtain the detection data.
[0057] The formula for max-min normalization is:
[0058]
[0059] Where x is the collected monitoring data value, x* is the processed monitoring data, and x... min To minimize the monitored data, x max This represents the maximum value of the monitored data.
[0060] The compression channel consists of three 1D convolutional layers. All outputs are passed through a ReLU activation function before being fed to the next layer or stage. Each convolutional layer in each stage uses residual channels to form a residual block. In the compression channel, the data output from each stage passes through a one-dimensional convolutional layer with a kernel size of 1×2 and a stride of 2, achieving downsampling of the data. In the compression path, the size of the data in the time dimension decreases layer by layer, and its size is as follows:
[0061]
[0062] Where steps is the length of the input sequence, s n The length of the data in the time dimension of the current stage is the data size and resolution reduction in the time dimension in the compression channel. With the reduction in size, the model fuses the features extracted from the data and focuses on classifying the current data. The final output of each stage is passed to the decompression channel through a jump connection.
[0063] In the decompression channel, the top layer is the output stage, and the bottom layer is the decompression stage. The decompression stage contains three 1D convolutional layers, each with a size of 1×3. The output data is output after passing through the ReLU activation function. Each stage uses residual channels to form residual blocks, and the output data is upsampled. After each stage, the time scale of the output data becomes twice the original, increasing the resolution. In the decompression channel, each stage receives data from the compression channel passed from the jump connection. This data maintains high resolution and contains more information on the start and end times of voltage sags, but has less information on the classification of voltage sag perturbation types.
[0064] The output section consists of a single 1D convolutional layer with a size of 1×1, a stride of 1, and a softmax activation function. It has five convolutional kernels, representing five voltage sag perturbation types. This layer receives the first-stage output data from the compressed channels and combines it with the upsampled data from the compressed stage before feeding it into the output section. The output layer can combine the descriptions of the 16 channels to obtain the type of the current sampling point, enabling the identification of the start and end times of each voltage sag event.
[0065] The parameters are initialized using global random initialization. The constructed 1DV-net deep learning model is trained, and each training iteration iterates through every training data point in the training set. Each iteration is called a generation, allowing the neural network model to undergo multiple generations of training. During the training process, the cross-entropy loss function is used as an evaluation of the model's accuracy. Using the backpropagation algorithm, the optimal neural network model parameters are finally obtained after multiple generations of training. The optimal approximate solution for each parameter of the neural network is obtained, thus obtaining the optimal deep neural network model and completing the offline training of the model.
[0066] The 1D V-net deep learning model trained offline was tested using validation sample set data to obtain multiple sets of accuracy rates for voltage sag perturbation type classification and voltage sag start and end time localization. When the deviations of both voltage sag perturbation type classification accuracy and voltage sag start and end time localization accuracy exceed 3%, overfitting occurs, and the hyperparameters of the 1D V-net deep learning model need to be readjusted, the number of neurons changed, and the regularization coefficient modified. Then, return to step 6 for training, and perform overfitting judgment again after training until no overfitting occurs, thus obtaining the optimal 1D V-net deep learning model.
[0067] Input the test sample set data into the optimal 1D V-net deep learning model, test the model obtained after training, evaluate the model's generalization ability, and if it does not meet the requirements, the model needs to be retrained.
[0068] Using real-time voltage data that has been actually monitored, the root mean square value of the real-time voltage data is calculated. The data is then input into the tested, optimal 1D V-net deep learning model that has good model generalization ability. The output data is the required voltage sag disturbance type classification result and start and end time location result.
[0069] Example
[0070] Matlab / Simulink simulation software was used to obtain 100 data points for each voltage sag type through simulation. The following principles should be followed during data collection: a) For line short-circuit conditions, the cause, location, line load, start and end times, and transition resistance should be changed; for motor starting, the start time, line load, and upstream transformer capacity should be changed; for transformer switching, the switching time, line load, and transformer capacity should be changed; b) Gaussian white noise should be added to the selected test samples; c) The number of data points collected in each cycle (i.e., the sampling frequency) should satisfy Shannon's sampling theorem.
[0071] The overall process of voltage sag based on the 1D V-net deep learning model in this invention is as follows: Figure 1 As shown in the figure, the voltage sag analysis method based on the 1D V-net deep learning model of this invention was used for analysis, and the training accuracy, testing accuracy, and loss value during the model training process were recorded and statistically analyzed. The relationship between the number of generations and the loss value during the model training process is shown in the figure. Figure 2 As shown, according to Figure 2 As shown by the curve, training accuracy gradually increases and the loss value gradually decreases with the increase in the number of training generations. The relationship between the number of generations and accuracy is as follows: Figure 3 As shown, according to Figure 3 It can be seen that the analysis method of the present invention achieves an accuracy of 99.98% on the test set.
[0072] Through the above methods, the voltage sag analysis method based on the 1D V-net deep learning model of this invention can directly learn the voltage sag characteristics caused by motor starting, transformer switching, single-phase short circuit, two-phase short circuit and three-phase short circuit from the original monitoring data, avoiding the tedious manual feature extraction process based on human experience.
[0073] To compare with the test results in the embodiments of the present invention, a unidirectional loop network composed of a unidirectional GRU structure is used as an example. Figure 4 The results are the test results for this model. Compared with unidirectional recurrent network structures such as RNN, LSTM, and GRU, this invention can improve the accuracy of voltage sag disturbance type classification and the accuracy of voltage sag start and end time location.
[0074] Compared with bidirectional recurrent network structures such as RNN, LSTM, and GRU, this invention can ensure the accuracy of voltage sag disturbance type classification and voltage sag start and end time location while reducing model parameters, thus avoiding a significant increase in model parameters.
Claims
1.A voltage sag analysis method based on a 1D V-net deep learning model, characterized in that, The following steps are implemented in detail: Step 1, according to the power network system to be detected, the operating condition types are numbered, and in different operating conditions of the power network system, the short-circuit capacity, grounding resistance, duration, start and end time, load capacity, and line impedance in the power network system are changed respectively, the bus voltage data under each operating condition is collected as voltage sag sample data under each operating condition; Step 2, the root mean square value of voltage under each operating condition is calculated by the number of voltage sag samples, if the root mean square value of voltage is decreased to 10% to 90% of the rated value, a group of voltage sag data samples A is formed with the voltage and the corresponding operating condition, and the start and end time of the voltage sag is labeled, the voltage sampling data value in the duration is marked as 0, and the remaining sampling data value is marked as 1; Step 3, all voltage sag data samples are labeled according to the operating condition type number, and combined with the start and end time of the voltage sag, a plurality of voltage sag data samples B are formed; Step 4, the plurality of voltage sag data samples B are divided into training sample set: verification sample set: test sample set according to 7:2:1; Step 5, the model structure of 1D V-net deep learning model is constructed; Step 6, the 1D V-net deep learning model is trained offline by using the training sample set; Step 7, the performance of the 1D V-net deep learning model obtained after step 6 is trained is analyzed combined with the data in the verification sample set, the overfitting of the model and the generalization ability of the model are evaluated, and the optimal 1D V-net deep learning model is obtained; Step 8, the test sample set data is input into the optimal 1D V-net deep learning model, and the model obtained after training is tested; the generalization ability of the model is evaluated, and if it does not meet the requirements, the model is retrained; Step 9, the 1D V-net deep learning model with good model generalization ability after testing is used for online application to determine the voltage sag disturbance type and start and end time; The operating condition types in step 1 include motor starting, transformer switching, single-phase short circuit, two-phase short circuit and three-phase short circuit, and the operating condition types are sequentially labeled as numbers 1-5; The specific process of calculating the root mean square value of voltage under each operating condition by the number of voltage sag samples in step 2 is as follows: The root mean square value of voltage data collected in step 1 is calculated according to the following formula (1): (1); wherein, N the number of data points collected for each cycle, x 1, x 2, x 3,..., x N in turn the data values corresponding to each of the sampled data points within each cycle; The model structure of the 1D V-net deep learning model in step 5 includes four parts in the horizontal direction: input part, compression channel part, decompression channel part and output part: The input part includes one 1D convolution layer, the input data is obtained after passing through the 1D convolution layer, and the output data enters the compression channel as input; at the same time, since the input part is the interface of the whole model, the voltage sag monitoring data needs to be normalized by maximum and minimum to obtain the detection data; The maximum and minimum normalization formula is: (2); wherein, x is a monitoring data acquisition value, x is a processed monitoring data, x min is a monitoring data minimum value, x max is a monitoring data maximum value; The compression channel part comprises three 1D convolution layers, and all outputs are output to the next layer or the next stage after being activated by a Relu activation function. Each stage of the convolution layer uses a residual channel to form a residual block. In the compression channel, the data output of each stage is subjected to a one-dimensional convolution layer, the convolution kernel size of which is 1x2 and the step is 2, so as to realize the downsampling process of the data. In the compression path, the size of the data in the time dimension decreases layer by layer, and the size is: (3); wherein steps is the length of the input sequence, s n is the length of the time dimension of the current stage data, in the compression channel, the size of the data in the time dimension is reduced, the resolution is reduced, with the reduction of the size, the model fuses the features extracted from the data and focuses on the classification of the current data, the final output obtained by each stage is transmitted to the decompression channel through the jump connection; The uppermost stage of the decompression channel part is an output stage, and the lower stage is a decompression stage. The decompression stage comprises three 1D convolution layers, each of which has a size of 1x3. The output data is output after being activated by a Relu activation function. Each stage uses a residual channel to form a residual block. The output data is subjected to upsampling, and the time scale of the output data after each stage becomes twice the original time scale, and the resolution increases. The output part comprises a 1D convolution layer as an output layer, which has a size of 1x1, a step of 1, and a Softmax activation function. The output layer has five convolution kernels, representing five voltage sag disturbance types. The first stage output data in the decompression channel and the upsampled data after the output of the decompression stage are combined and sent to the output part. The output layer obtains the type of the current sampling point, realizes the identification of the start and end time of each voltage sag event. 2.The voltage sag analysis method based on the 1D V-net deep learning model according to claim 1, wherein, Step 6: The parameters are initialized in a global random initialization manner, the constructed 1D V-net deep learning model is trained, each training data in the training set is traversed each time, each traversal is called a generation, the neural network model is trained for multiple generations, and the cross-entropy loss function is used as the evaluation of the accuracy of the model during the training process. After multiple generations of training, the optimal neural network model parameters are obtained, the optimal approximate solution of each parameter of the neural network is obtained, and thus the optimal deep neural network model is obtained, and the offline training of the model is completed. 3.The voltage sag analysis method based on the 1D V-net deep learning model of claim 1, wherein, Step 7: The 1D V-net deep learning model after offline training is tested by using the validation sample set data, and multiple groups of voltage sag disturbance type classification accuracy and voltage sag start and end time positioning accuracy are obtained. When the voltage sag disturbance type classification accuracy and the voltage sag start and end time positioning accuracy deviate by more than 3%, overfitting occurs, and the hyperparameters of the 1D V-net deep learning model need to be adjusted, the number of neurons needs to be changed, and the regularization coefficient needs to be modified. Return to step 6 for training, and perform overfitting judgment again after training until no overfitting occurs, and the optimal 1D V-net deep learning model is obtained. 4.The voltage sag analysis method based on the 1D V-net deep learning model of claim 1, wherein, Step 9: The actual monitored real-time voltage data is used to calculate the root mean square value of the real-time voltage data, and the optimal 1D V-net deep learning model after testing is input. The output data is the voltage sag disturbance type classification result and the start and end time positioning result.
Citation Information
Patent Citations
Training method and device of power quality disturbance signal classification model
CN113657220A