Active distribution network disturbance source positioning method and system based on artificial intelligence

By constructing a sophisticated simulation model and introducing domain adaptation technology, combining lightweight 1D-CNN and Grad-CAM visualization, and integrating a decision tree model, the problems of high computing resource consumption and insufficient interpretability in existing technologies are solved, and more efficient and accurate active distribution network disturbance source positioning is achieved.

CN120597710APending Publication Date: 2025-09-05STATE GRID QINGHAI ELECTRIC POWER COMPANY +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510726508.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-30
Publication Date
2025-09-05

AI Technical Summary

Technical Problem

Existing technologies for locating power quality disturbance sources in active distribution networks consume large amounts of computing resources, rely heavily on model accuracy, have poor adaptability, and lack interpretability, making it difficult to effectively locate disturbance sources in actual power grids.

Method used

An artificial intelligence-based approach is adopted to improve the interpretability and generalization ability of the model by building a refined simulation model, combining data enhancement and transfer learning, introducing domain adaptation technology, using a lightweight 1D-CNN model and Grad-CAM visualization, and integrating a decision tree model.

Benefits of technology

It improves the diversity and authenticity of simulation data, reduces computing resource consumption, enhances the generalization ability and interpretability of the model, and provides more accurate and reliable disturbance source localization results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120597710A_ABST
    Figure CN120597710A_ABST
Patent Text Reader

Abstract

The invention discloses an active distribution network disturbance source positioning method and system based on artificial intelligence, and relates to the technical field of intelligent power distribution systems. The active distribution network disturbance source positioning method and system based on artificial intelligence comprises the following steps: S1, data acquisition and preprocessing; s2, constructing a simulation-data fusion model; s3, designing an interpretable module; s4, positioning analysis; by constructing a finer simulation model and simulating more actual scenes, the diversity and authenticity of simulation data are improved. And a domain self-adaptive technology is introduced, so that the distribution difference between simulation data and actually measured data is reduced. And a lightweight 1D-CNN model and an adaptive learning rate adjustment strategy are adopted, so that the model training speed is increased, and the computing resource consumption is reduced. And a semi-automatic labeling method and a field self-adaptive technology are adopted, so that the dependence on a large amount of actually measured labeling data is reduced. By introducing a space attention mechanism, decision tree integration and other methods, the interpretability of the model is improved from multiple perspectives.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of intelligent power distribution systems, and in particular to an artificial intelligence-based method and system for locating disturbance sources in active distribution networks. Background Art

[0002] During the construction of distribution networks, the location of active power quality disturbance sources is of great significance in many aspects, involving key areas such as safe and stable operation of the power grid, improvement of power quality, reliability of power supply to users, and optimization of power grid planning and operation and maintenance. Currently, there are many methods for locating power quality disturbance sources, including simulation-based and data-driven methods, such as: Simulation model deduction method: Technical principle: Build a power grid simulation model, set up virtual disturbance sources at potential disturbance locations, and locate the real disturbance sources by comparing the errors between simulation data and measured data.

[0003] Advantages: It can simulate complex disturbance scenarios and the positioning results are intuitive.

[0004] Limitations: Depends on model accuracy and consumes large amounts of computing resources.

[0005] Deep Learning and Data Mining: Technical principle: Use convolutional neural networks (CNN) or long short-term memory networks (LSTM) to process time series data from multiple monitoring points, and directly output the location of the disturbance source through the training model.

[0006] Advantages: Highly adaptable and can handle nonlinear disturbances.

[0007] Limitations: Requires a large amount of labeled data and the model has poor interpretability.

[0008] For example, publication number CN117907734A discloses a method, device, electronic device, and storage medium for locating a power quality disturbance source, which belongs to the field of power quality monitoring technology. The locating method includes: obtaining monitoring data from each monitoring point in the power grid system before and after the disturbance; obtaining the upstream and downstream relative positional relationship between the disturbance source and the monitoring point, and preliminarily determining the line or station where the disturbance source is located; constructing a simulation model to simulate the operating state of the power grid system before the fault; setting a virtual disturbance source at the line or station where the disturbance source may be located in the simulation model, and determining the true location of the disturbance source through simulation deduction.

[0009] This patent uses a simulation model deduction method to locate the disturbance source, but the above-mentioned technical problems may exist in actual operation. Summary of the Invention

[0010] In response to the deficiencies of the existing technology, the present invention provides an artificial intelligence-based method and system for locating disturbance sources in an active distribution network, which solves the problems of the above-mentioned technology.

[0011] To achieve the above objectives, the present invention is implemented through the following technical solutions: A method for locating disturbance sources in an active distribution network based on artificial intelligence comprises the following steps: S1 Data Collection and Preprocessing: Use professional tools to build a sophisticated distribution network simulation model, inject different types of disturbances at potential disturbance locations, and set different parameter ranges for each disturbance type. Collect actual operating data through distribution network PMUs or smart meters, synchronously record disturbance events, and use semi-automatic annotation methods combined with expert knowledge and preliminary classification algorithms to annotate and preprocess the data. S2 Simulation-Data Fusion Model Construction: Randomly set the location of disturbance sources in the simulation model to generate simulation annotated data covering various disturbance scenarios, and perform data augmentation operations. At the same time, consider the impact of different seasons and weather factors on the power grid and simulate disturbances on the simulation data. Adopt a transfer learning framework, use simulation data for pre-training, use some measured data for fine-tuning, and introduce domain adaptation technology. S3 interpretability module design: Introducing channel and spatial attention mechanisms into CNN to highlight key features; using Grad-CAM visualization to generate heatmaps and explain model decisions; integrating deep learning models with decision tree models to improve model interpretability; S4 Positioning Analysis: Input measured data, and the model outputs the probability distribution of the disturbance source location and an interpretable report, including attention heat maps and decision tree rule information.

[0012] Preferably, the steps of setting the disturbance source position and generating simulation annotation data in step S2 specifically include: S2.1.1 Randomly set the disturbance source position: Line segmentation: Divide each line in the distribution network into segments according to the set length or ratio; Random sampling: Use a random number generator to randomly select the disturbance source location in the segmentation points of each line; Considering multiple disturbance sources: By randomly selecting segmentation points of different lines as the locations of multiple disturbance sources, the complex disturbance conditions in the actual power grid are simulated; S2.1.2 Generate disturbance waveform and position labels: Inject disturbance: Inject disturbance at the randomly selected disturbance source location according to the set disturbance type and parameter range; Collect waveform data: Set appropriate measurement points in the simulation model to collect voltage and current waveform data before and after the disturbance occurs. The selection of measurement points should cover the key nodes of the distribution network. Generate location labels: Generate corresponding location labels for each set of waveform data based on the randomly selected disturbance source location; the location labels are in the form of a combination of line numbers and segment point numbers; S2.1.3 Ensure data is evenly distributed and covers various disturbance scenarios: Statistical analysis: Regularly perform statistical analysis on the generated data to calculate the data percentage of each disturbance type and the distribution frequency of disturbance source locations on different lines and segment points; Adjust the sampling strategy: If the number of data under certain disturbance types, disturbance source locations, or disturbance parameters is found to be too small, adjust the random sampling strategy to increase the data generation ratio; Simulate different operating conditions: Simulate different grid operating conditions during the simulation process, including changing load levels and distributed generation output, and then generate disturbance data under different operating conditions.

[0013] Preferably, the data enhancement operation in step S2 includes adding Gaussian noise, amplitude scaling, and phase shift to the simulation data to simulate the uncertainty of the measured data, specifically including: S2.2.1 Add Gaussian noise: Determine the mean and standard deviation of the Gaussian noise based on the noise level of the actual power grid measurement data; use a random number generator to generate a Gaussian noise sequence with the same length as the simulation data; S2.2.2 Amplitude Scaling: Determine the upper and lower limits of the amplitude scaling factor based on the amplitude variation range of actual power grid measurement data; use a random number generator to generate the scaling factor within the determined range; S2.2.3 Phase offset: Determine the upper and lower limits of the phase offset based on the phase variation range of the actual power grid measurement data; convert the angle value of the phase offset into radians. The conversion formula is: radians = angle × π / 180.

[0014] Preferably, the step of considering the influence of different seasons and weather factors on the power grid and performing corresponding disturbance simulation on the simulation data in step S2 specifically includes: S2.3.1 Establish seasonal and weather model libraries: Establish corresponding model libraries for different seasons and weather conditions, including load models, equipment parameter models, and fault models; S2.3.2 Randomly select season and weather: When generating simulation data, randomly select season and weather type; S2.3.3 Adjust simulation data according to the selected season and weather: According to the selected season and weather type, call the corresponding model from the model library and adjust the simulation data.

[0015] Preferably, the pre-training step in step S2 uses simulation data to train a lightweight 1D-CNN model, extracts disturbance features, and adopts an adaptive learning rate adjustment strategy to accelerate the model convergence speed, specifically including: S2.4.1 Build a lightweight 1D-CNN model. The network architecture design includes: Input layer: Determine the input dimension based on the sampling rate and data length of the simulation data; Convolutional layer: Multiple one-dimensional convolutional layers are used to extract features of different scales; each convolutional layer contains convolution operations, batch normalization, and activation functions; Pooling layer: Add a maximum pooling layer after the convolution layer to reduce the dimension of the feature map; Fully connected layer: Flatten the pooled feature map into a one-dimensional vector and connect it to the fully connected layer for feature integration and classification. Set up two fully connected layers, with 128 neurons in the first layer and 128 neurons in the second layer equal to the number of perturbation categories. Output layer: Use the Softmax activation function to output the probability of each perturbation category; S2.4.2 Learning rate scheduler selection for adaptive learning rate adjustment strategy: Use cosine annealing learning rate scheduler to gradually reduce the learning rate in the form of a cosine function during training; S2.4.3 Model Training: Data loading: Divide the simulation data into training and validation sets, and use torch.utils.data.DataLoader to load the data; Training process: In each epoch, the training set is traversed, the data is input into the model for forward propagation, the loss is calculated, the parameters are updated through backpropagation, and the model performance is evaluated on the validation set.

[0016] Preferably, step S2 uses measured data to fine-tune model parameters to adapt to actual grid characteristics, and introduces domain adaptation technology to reduce the distribution difference between simulation data and measured data, specifically including: Step 2.5.1 Domain Adaptation Technique - Maximum Mean Difference (MMD): MMD is used to measure the difference between the distributions of data from two domains. This distribution difference is measured by calculating the mean difference between the two domain data in the reproducing kernel Hilbert space. MMD is added as a regularization term to the classification loss function, allowing the model to consider both classification performance and domain adaptation during training. Step 2.5.2 Fine-tune model parameters: Data preparation: Mix measured data with simulated data and divide them into training and validation sets; Loss function design: Combine classification loss and MMD loss as the total loss function; Training process: The same method as the pre-training stage is used for training.

[0017] Preferably, step S3 of interpretability module design specifically includes: S3.1 Attention Mechanism: Using the convolutional block attention module, we consider both channel and spatial attention information. We introduce channel attention into CNN to automatically weight features of different frequency bands and highlight perturbation-related features. Furthermore, we combine the spatial attention mechanism to focus on the importance of different time points for perturbation localization. S3.2 Grad-CAM visualization: Gradient backpropagation is performed on the disturbance source locations output by the model to generate a heat map showing which time series segments or frequency bands contribute most to the location results. Key areas in the heat map are further analyzed, combining grid topology and device characteristics to explain the reasons for the disturbance source location. S3.3 Decision tree integration: Integrate the deep learning model with the decision tree model, and use the interpretability of the decision tree to explain the decision-making process of the deep learning model; first, use the deep learning model to predict the measured data to obtain the probability distribution of the disturbance source location; then, use the intermediate features of the deep learning model as input to train the decision tree model and learn the decision rules of the deep learning model.

[0018] The present invention also discloses an artificial intelligence-based positioning of active distribution network disturbance sources, including a data acquisition and preprocessing module, a simulation-data fusion model construction module, an interpretability module and a positioning analysis module, which are used to implement steps S1 to S4 in sequence.

[0019] Preferably, a cloud database is also included for storing the annotation data and system operation logs, and regularly backing up the annotation data.

[0020] The present invention provides an artificial intelligence-based method and system for locating disturbance sources in active distribution networks. Compared with existing technologies, this method has the following advantages: 1. This AI-based method and system for locating active distribution network disturbance sources improves the diversity and authenticity of simulation data by building more sophisticated simulation models and simulating more real-world scenarios. Furthermore, the introduction of domain adaptation technology reduces the distribution discrepancies between simulated and measured data, enhancing the model's generalization capabilities. The use of a lightweight 1D-CNN model and an adaptive learning rate adjustment strategy accelerates model training and reduces computing resource consumption. The use of semi-automatic labeling methods and domain adaptation technology reduces reliance on large amounts of measured labeled data and reduces manual labeling costs. By introducing methods such as spatial attention mechanisms and decision tree ensembles, the model's interpretability is improved from multiple perspectives, enabling users to better understand the model's decision-making process and positioning results.

[0021] 2. This AI-based method and system for locating disturbance sources in active distribution networks can more comprehensively simulate the complexities of actual power grids by setting up multiple disturbance source location generation methods and enriching disturbance scenarios, thereby improving data diversity and authenticity. Data augmentation simulates the uncertainty of measured data, taking into account the influence of factors such as season and weather, making the data more realistic. Pre-training uses a lightweight 1D-CNN model and an adaptive learning rate adjustment strategy to accelerate convergence. Fine-tuning using measured data and introducing domain adaptation technology effectively reduces the distribution difference between simulated and measured data, improving model generalization capabilities. Overall, this method optimizes multiple aspects, from data generation and model training to domain adaptation, enhancing the model's accuracy and adaptability in locating power quality disturbance sources in actual power grids, providing a more reliable technical means for resolving power quality issues in active distribution networks.

[0022] 3. This AI-based method and system for locating disturbance sources in active distribution networks introduces a convolutional block attention module to automatically weight different features from the channel and spatial dimensions, highlighting disturbance-related features and enhancing the model's ability to capture key information. Grad-CAM visualization technology generates heat maps that intuitively display the contribution of time series segments or frequency bands to the positioning results. It combines grid characteristics to explain the reasons for positioning and improve the transparency of model decisions. Furthermore, deep learning is integrated with decision trees, leveraging the interpretability of decision trees to analyze deep learning decision rules and achieve intuitive visualization of the model's decision-making process. These improvements not only improve the model's accuracy in locating disturbance sources but also greatly enhance the model's interpretability, providing grid operations and maintenance personnel with a clearer and more reliable basis for decision-making. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 It is a schematic diagram of the overall steps of the present invention; Figure 2 This is a system module block diagram of the present invention. DETAILED DESCRIPTION

[0024] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0025] See Figure 1 The present invention discloses a method for locating disturbance sources in active distribution networks based on artificial intelligence, and provides the following three technical solutions: The first implementation method includes the following steps: S1 data collection and preprocessing: S1.1 Determine the distribution network simulation model: Use tools such as PSCAD / EMTDC and DIgSILENT to build a detailed and accurate distribution network simulation model, covering various common grid topologies such as radial and ring. Also, set reasonable line parameters (resistance, reactance, capacitance, etc.), equipment characteristics (transformer ratio, capacity, etc.), and load model (constant power, constant current, etc.). Line parameters are set as follows: Resistance R = r0·l, reactance X = x0·l, capacitance C = c0·l (r0, x0, c0 are the unit length parameters of resistance, reactance, and capacitance respectively, and l is the line length); The transformer ratio is , where V primary is the primary side voltage, V secondary is the secondary side voltage, and the rated capacity of the transformer is S rated ; Load model: constant power load P=P0, P0 is the constant power value of the load; constant current load I=I0, I0 is the constant current value of the load; Inject different types of disturbances (voltage sag, harmonics, oscillation, etc.) at potential disturbance locations (such as distributed power sources and load nodes), and set different parameter ranges for each disturbance type; Simulate different operating conditions (such as different load levels, distributed power output changes) to generate richer voltage / current waveform data and disturbance labels (location, type); Inject voltage sag (voltage sag amplitude V sag =bV nom , where b is the sag ratio, b∈[0.1, 0.9], V nom is the rated voltage), total harmonic distortion (THD≤5%), oscillation frequency (f osc ∈[1, 10] Hz); Operating conditions: load level P load ∈[0.5P base , 1.5P base ], indicating that the load power varies between 50% and 150% of the base load; the output of distributed power generation P DG ∈[0,P DG,max ], indicating that the output power of the distributed power source varies between 0 and its maximum output; S1.2 Measured data: Collect actual operating data through distribution network PMU or smart meter, with a sampling rate of f s ≥1kHz, synchronously record disturbance event timestamps; use semi-automatic annotation methods, combined with expert knowledge and preliminary classification algorithms, to reduce manual annotation workload; S1.3 Data preprocessing: Normalization (Min-Max Scaling): Scale the data to the [0, 1] range to avoid the impact of different dimensional data on model training; Normalization: , which means scaling the data X to the interval [0, 1], where X min and X max are the minimum and maximum values ​​of the data respectively; Noise filtering (wavelet threshold denoising): effectively remove noise interference in data and improve data quality; the threshold in wavelet threshold denoising , where σ is the standard deviation of Gaussian noise and N is the signal length; Sliding window segmentation time series data: According to the disturbance characteristics and model input requirements, the sliding window size T is reasonably set w and step length T s , split the time series data into samples suitable for model input, and randomly crop the window size T w ′ ∈[0.8T w , T w ]; Data enhancement: Data enhancement operations are also performed on the measured data, such as random cropping and flipping, to increase data diversity and reduce the risk of overfitting; S2 Simulation-Data Fusion Model Construction: Randomly set the location of disturbance sources in the simulation model to generate simulation annotated data covering various disturbance scenarios, and perform data augmentation operations. At the same time, consider the impact of different seasons and weather factors on the power grid and simulate disturbances on the simulation data. Adopt a transfer learning framework, use simulation data for pre-training, use some measured data for fine-tuning, and introduce domain adaptation technology. S3 interpretability module design: Introducing channel and spatial attention mechanisms into CNN to highlight key features; using Grad-CAM visualization to generate heatmaps and explain model decisions; integrating deep learning models with decision tree models to improve model interpretability; S4 Positioning Analysis: Input measured data, and the model outputs a probability distribution of the disturbance source location and an interpretable report, including attention heat maps and decision tree rule information, to help users understand the model's decision-making process and positioning results.

[0026] By building more sophisticated simulation models and simulating more real-world scenarios, the diversity and realism of simulation data were improved. Furthermore, the introduction of domain adaptation technology reduced the distribution discrepancies between simulated and measured data, enhancing the model's generalization capabilities. The use of a lightweight 1D-CNN model and an adaptive learning rate adjustment strategy accelerated model training and reduced computing resource consumption. The use of semi-automatic labeling methods and domain adaptation technology reduced reliance on large amounts of measured labeled data and lowered manual labeling costs. By introducing methods such as spatial attention mechanisms and decision tree ensembles, the model's interpretability was improved from multiple perspectives, enabling users to better understand the model's decision-making process and positioning results.

[0027] The second embodiment differs from the first embodiment mainly in that the steps of setting the disturbance source position and generating simulation annotation data in step S2 specifically include: S2.1.1 Randomly set the disturbance source position: Line segmentation: divide each line in the distribution network into segments according to the set length or ratio; divide the Lkm line into M segments, and the segmentation point coordinates , i∈{0, 1, …, M}, where L is the total length of the line and M is the number of segments; Random sampling: Use a random number generator to randomly select the disturbance source position in the segmentation points of each line; the disturbance source position x dist ~Uniform(0, L) (indicates that the disturbance source position is randomly distributed between 0 and L) and is assigned to the nearest segment point ; Considering multiple disturbance sources: By randomly selecting K different line segmentation points as the locations of multiple disturbance sources, the complex disturbance situation in the actual power grid is simulated; S2.1.2 Generate disturbance waveform and position labels: Inject disturbance: Inject disturbance at the randomly selected disturbance source location according to the set disturbance type and parameter range; Disturbance injection: voltage sag waveform V(t)=αV nom u(t−t0) u(t0+T sag −t), where u(t) is the step function, t0 is the start time of the sag, and T sag is the duration of the sag, α is a coefficient between 0 and 1, i.e. 0<α<1; Collect waveform data: Set appropriate measurement points in the simulation model to collect voltage and current waveform data before and after the disturbance occurs. The selection of measurement points should cover the key nodes of the distribution network. Generate position labels: Generate corresponding position labels for each set of waveform data based on the randomly selected disturbance source position; the position label is a combination of line number and segment point number, expressed as: Label = (LineID, SegID), LineID represents the line number, and SegID represents the segment point number; S2.1.3 Ensure data is evenly distributed and covers various disturbance scenarios: Statistical analysis: Regularly perform statistical analysis on the generated data to calculate the data proportion of each disturbance type, the distribution frequency of the disturbance source location on different lines and segment points; calculate the proportion of each disturbance type , where p a Indicates the proportion of the ath disturbance type, n a represents the number of data of the ath disturbance type, and N represents the total number of data of all disturbance types; Adjust the sampling strategy: If the number of data under certain disturbance types, disturbance source locations, or disturbance parameters is found to be too small, adjust the random sampling strategy to increase the data generation ratio; Simulate different operating conditions: During the simulation process, different grid operating conditions are simulated, including changing load levels (such as peak load and valley load) and distributed power output (such as photovoltaic output under different light intensities and wind power output under different wind speeds), and then generating disturbance data under different operating conditions.

[0028] The data enhancement operation in step S2 includes adding Gaussian noise, amplitude scaling, and phase shift to the simulation data to simulate the uncertainty of the measured data, specifically including: S2.2.1 Adding Gaussian noise: Gaussian noise is a common random noise whose probability density function follows a normal distribution. Adding Gaussian noise to the simulation data can simulate the random errors introduced by factors such as sensor accuracy and electromagnetic interference in the actual measurement process. According to the noise level of the actual power grid measurement data, the mean and standard deviation of the Gaussian noise are determined. A random number generator is used to generate a Gaussian noise sequence with the same length as the simulation data. The noise sequence ϵ(t)~N(0,σ0 2 ), Gaussian noise standard deviation σ0=0.02·std(X), where std(X) is the standard deviation of data X; S2.2.2 Amplitude Scaling: In actual power grids, the amplitude of the collected signal may differ from the actual value due to factors such as the range limitations of the measurement equipment and attenuation during signal transmission. Amplitude scaling can simulate this amplitude variation. The upper and lower limits of the amplitude scaling factor are determined based on the amplitude variation range of the actual power grid measurement data. A random number generator is used to generate the scaling factor within the specified range. The scaling factor β is approximately uniform (0.8, 1.2). S2.2.3 Phase offset: In the power grid, due to factors such as signal transmission delay and equipment phase error, the collected signal phase may deviate from the actual value. Phase offset can simulate this phase change; according to the phase change range of the actual power grid measurement data, the upper and lower limits of the phase offset are determined; the angle value of the phase offset is converted to radian value. The radian conversion formula is: radian , θ is the angle value, the offset angle θ~Uniform(−10°, 10°); In step S2, the influence of different seasons, weather and other factors on the power grid is considered, and the corresponding disturbance simulation is performed on the simulation data, specifically including: 1. Seasonal impacts include: summer: Load characteristics: High summer temperatures lead to increased use of air conditioners and other cooling equipment, significantly increasing grid load and creating a load curve with distinct daily peaks and valleys. This load variation can be simulated in simulation data, for example by adding load simulation data during high daytime temperatures.

[0029] Equipment temperature: In high-temperature environments, power equipment's heat dissipation deteriorates, potentially leading to performance degradation, such as increased transformer temperature and resistance. Equipment parameters can be adjusted in the simulation model, such as increasing line resistance or reducing transformer capacity, to simulate the impact of these performance changes on the grid.

[0030] winter: Load characteristics: Winter temperatures are low, and heating usage increases significantly, which also increases grid load. However, load characteristics differ from summer, with potential nighttime peaks. Adjust the load simulation data accordingly in the simulation data.

[0031] Snow and ice disasters: Winter can cause ice and snow to cover lines, increasing line weight and resistance, and even causing line breakage and other faults. Line ice cover can be simulated in the simulation model, increasing line resistance and simulating line breakage.

[0032] 2. The impact of different weather conditions include: Thunderstorm weather: Lightning overvoltage: When lightning strikes power grid equipment or lines, it generates extremely high overvoltages, potentially damaging the equipment's insulation. Lightning overvoltage waveforms can be injected into simulation data to simulate the effects of lightning on the power grid. Lightning overvoltage waveforms typically have high amplitudes and short durations, and can be approximated using a double exponential function.

[0033] Windy weather: Line Galloping: Strong winds can cause transmission lines to gallop, leading to variations in line spacing and potentially even phase-to-phase short circuits. Line galloping can be simulated in simulation models, for example by varying line geometry or introducing dynamic impedance variations.

[0034] Tree fall: Strong winds can knock down trees, which can impact power lines or equipment, causing failures. The impact of tree fall on the power grid can be simulated in simulation models, for example by setting line breakage or equipment failures.

[0035] 3. Specific operation process: S2.3.1 Establish seasonal and weather model libraries: Establish corresponding model libraries for different seasons and weather conditions, including load models, equipment parameter models, fault models, etc.

[0036] S2.3.2 Randomly select seasons and weather types: When generating simulation data, randomly select seasons and weather types. For example, you can use a random number generator to randomly select a season from the four seasons of spring, summer, autumn, and winter, and then randomly select a weather type from the corresponding weather type of that season (such as sunny, rainy, snowy, windy, etc.).

[0037] S2.3.3 Adjust simulation data based on the selected season and weather: Based on the selected season and weather type, call the corresponding model from the model library and adjust the simulation data. For example, if summer thunderstorm weather is selected, inject the lightning overvoltage waveform according to the above method and adjust the load simulation data and equipment parameters.

[0038] Through the above operations, Gaussian noise, amplitude scaling, phase offset, etc. can be added to the simulation data to simulate the uncertainty of the measured data. The impact of factors such as different seasons and weather on the power grid can be considered, and corresponding disturbance simulation can be performed on the simulation data, thereby improving the authenticity and diversity of the simulation data and providing more reliable data support for the training of deep learning positioning models.

[0039] The pre-training step in step S2 uses simulation data to train a lightweight 1D-CNN model, extracts perturbation features, and adopts an adaptive learning rate adjustment strategy to accelerate the model convergence speed, specifically including: S2.4.1 Build a lightweight 1D-CNN model. The network architecture design includes: Input layer: Determine the input dimension D based on the sampling rate and data length of the simulation data in =f s ·T w ,For example, if the sampling rate is 10kHz and the data length is 1000 samples, the input dimension is 1×1000; Convolutional layer: Multiple one-dimensional convolutional layers are used to extract features of different scales; each convolutional layer contains a convolution operation, batch normalization (Batch Normalization) and an activation function (such as ReLU); the output formula of the convolutional layer is: F d =ReLU(BN(Conv1D(F d−1 , k d , s d ))), k d ∈{3, 5}, s d =1; where k d is the convolution kernel size, s d is the step size, ReLU is the activation function, and BN is batch normalization; Pooling layer: Add a maximum pooling layer after the convolution layer to reduce the dimension of the feature map and reduce the amount of calculation; Fully connected layer: Flatten the pooled feature map into a one-dimensional vector and connect it to the fully connected layer for feature integration and classification; set up two fully connected layers, the number of neurons in the first layer is 128, and the number of neurons in the second layer is the number of disturbance categories (such as voltage sag, harmonics, oscillation, etc.), that is, FC1(128)→FC2(C), where C is the number of disturbance categories; Output layer: Use the Softmax activation function to output the probability of each perturbation category; S2.4.2 Learning rate scheduler selection for adaptive learning rate adjustment strategy: Use the cosine annealing learning rate scheduler (CosineAnnealingLR) to gradually reduce the learning rate in the form of a cosine function during training; the cosine annealing formula is: , where η min and η max are the minimum and maximum learning rates respectively, t is the current iteration number, and T is the total iteration number; S2.4.3 Model Training: Data loading: Divide the simulation data into training and validation sets, and use torch.utils.data.DataLoader to load the data (torch.utils.data.DataLoader is a tool class in PyTorch that is used to load datasets and automatically implement small-batch data processing, data shuffling, and multi-threaded acceleration. It plays a key role in model training and testing). Training process: In each epoch, the training set is traversed, the data is input into the model for forward propagation, the loss is calculated, the parameters are updated through backpropagation, and the model performance is evaluated on the validation set.

[0040] Step S2 uses the measured data to fine-tune the model parameters to adapt to the actual power grid characteristics, and introduces domain adaptation technology to reduce the distribution difference between the simulation data and the measured data. Specifically, the steps include: Step 2.5.1 Domain Adaptation Technique - Maximum Mean Difference (MMD): MMD is used to measure the difference between the distributions of data from two domains. The distribution difference is measured by calculating the mean difference between the two domain data in the reproducing kernel Hilbert space. MMD is added as a regularization term to the classification loss function, allowing the model to consider both classification performance and domain adaptation during training. The MMD loss formula is expressed as: ; where ϕ is the kernel map, H is RKHS (reproducing kernel Hilbert space), n s and n t are the number of samples in the source domain and target domain respectively; Step 2.5.2 Fine-tune model parameters: Data preparation: Mix the measured data with the simulated data and divide them into training set and validation set; the total loss formula is expressed as: L=L CE +γL MMD , where γ is the weight, L CE is the cross entropy loss; Loss function design: Combine classification loss and MMD loss as the total loss function; Training process: The same method as the pre-training stage is used for training.

[0041] By setting up multiple disturbance source location generation methods and enriching disturbance scenarios, the method can more comprehensively simulate the complex conditions of actual power grids, improving data diversity and authenticity. Data augmentation simulates the uncertainty of measured data and considers factors such as season and weather to make the data more realistic. Pre-training uses a lightweight 1D-CNN model and an adaptive learning rate adjustment strategy to accelerate convergence. Fine-tuning using measured data and introducing domain adaptation techniques effectively reduces the distribution discrepancy between simulated and measured data, improving model generalization. Overall, this method optimizes multiple aspects, from data generation and model training to domain adaptation, enhancing the model's accuracy and adaptability in locating power quality disturbance sources in actual power grids, providing a more reliable technical means for resolving power quality issues in active distribution networks.

[0042] The third embodiment differs from the first embodiment mainly in that the interpretability module design in step S3 specifically includes: S3.1 Attention Mechanism: Using the Convolutional Block Attention Module (CBAM), it considers attention information in both channel and spatial dimensions. It introduces the channel attention (Squeeze-and-Excitation, SE module) into CNN to automatically weight features of different frequency bands (such as fundamental and harmonics) to highlight perturbation-related features. Furthermore, it combines the spatial attention mechanism to focus on the importance of different time points for perturbation localization. Channel attention is expressed as: s c =σ(MLP(AvgPool(F))+MLP(MaxPool(F))), where F is the feature map, σ is the Sigmoid function, MLP is the multi-layer perceptron, AvgPool and MaxPool are average pooling and maximum pooling respectively; Spatial attention is expressed as: s s =σ(Conv([AvgPool(F);MaxPool(F)])), where Conv is the convolution operation; S3.2 Grad-CAM visualization: Gradient backpropagation is performed on the disturbance source locations output by the model to generate a heat map, showing which time series segments or frequency bands contribute most to the positioning results. Key areas in the heat map are further analyzed, and the reasons for the disturbance source location are explained by combining the grid topology and device characteristics. For example, if the heat map shows that signals in a specific frequency band contribute significantly to the positioning results within a certain time period, the association between the signals in that frequency band and specific devices in the grid can be analyzed to explain the model's decision logic. The gradient back propagation formula is: ; Among them, y c is the category score, A k Represents the hth feature map, Z is the normalization factor, u and v are used to traverse the feature map A h The index of the element in; The formula for generating the heat map is: ; S3.3 Decision tree integration: Integrate the deep learning model with the decision tree model, and use the interpretability of the decision tree to explain the decision-making process of the deep learning model; first, use the deep learning model to predict the measured data to obtain the probability distribution of the disturbance source location; then, use the intermediate features of the deep learning model as input to train the decision tree model and learn the decision rules of the deep learning model; through the visualization of the decision tree, you can intuitively understand how the model makes decisions based on different features, thereby improving the interpretability of the model.

[0043] By introducing a convolutional block attention module (CBAM), different features are automatically weighted from the channel and spatial dimensions, highlighting disturbance-related features and enhancing the model's ability to capture key information. Grad-CAM visualization technology generates heat maps that intuitively display the contribution of time series segments or frequency bands to the positioning results. This technology, combined with grid characteristics, explains the reasons for positioning and improves the transparency of model decisions. Furthermore, by integrating deep learning with decision trees, the interpretability of decision trees is leveraged to analyze deep learning decision rules, enabling intuitive visualization of the model's decision-making process. These improvements not only improve the model's accuracy in locating disturbance sources but also significantly enhance its interpretability, providing grid operators with clearer and more reliable decision-making basis.

[0044] See Figure 2 The present invention also discloses an artificial intelligence-based positioning of active distribution network disturbance sources, including a data acquisition and preprocessing module, a simulation-data fusion model construction module, an interpretability module and a positioning analysis module, which are used to implement steps S1 to S4 in sequence; it also includes a cloud database for storing labeled data and system operation logs, and regularly backing up labeled data.

[0045] Meanwhile, the contents not described in detail in this specification belong to the prior art known to those skilled in the art.

[0046] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus.

[0047] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.

Claims

1. The method for locating disturbance sources in active distribution networks based on artificial intelligence is characterized by: include: S1 Data Collection and Preprocessing: Use professional tools to build a sophisticated distribution network simulation model, inject different types of disturbances at potential disturbance locations, and set different parameter ranges for each disturbance type. Collect actual operating data through distribution network PMUs or smart meters, synchronously record disturbance events, and use semi-automatic annotation methods combined with expert knowledge and preliminary classification algorithms to annotate and preprocess the data. S2 Simulation-Data Fusion Model Construction: Randomly set the location of disturbance sources in the simulation model to generate simulation annotated data covering various disturbance scenarios, and perform data augmentation operations. At the same time, consider the impact of different seasons and weather factors on the power grid and simulate disturbances on the simulation data. Adopt a transfer learning framework, use simulation data for pre-training, use some measured data for fine-tuning, and introduce domain adaptation technology. S3 interpretability module design: Introducing channel and spatial attention mechanisms into CNN to highlight key features; using Grad-CAM visualization to generate heatmaps and explain model decisions; integrating deep learning models with decision tree models to improve model interpretability; S4 Positioning Analysis: Input measured data, and the model outputs the probability distribution of the disturbance source location and an interpretable report, including attention heat maps and decision tree rule information.

2. The method for locating disturbance sources in active distribution networks based on artificial intelligence according to claim 1, characterized in that: The steps of setting the disturbance source position and generating simulation annotation data in step S2 specifically include: S2.1.1 Randomly set the disturbance source position: Line segmentation: Divide each line in the distribution network into segments according to the set length or ratio; Random sampling: Use a random number generator to randomly select the disturbance source location in the segmentation points of each line; Considering multiple disturbance sources: By randomly selecting segmentation points of different lines as the locations of multiple disturbance sources, the complex disturbance conditions in the actual power grid are simulated; S2.1.2 Generate disturbance waveform and position labels: Inject disturbance: Inject disturbance at the randomly selected disturbance source location according to the set disturbance type and parameter range; Collect waveform data: Set appropriate measurement points in the simulation model to collect voltage and current waveform data before and after the disturbance occurs. The selection of measurement points should cover the key nodes of the distribution network. Generate location labels: Generate corresponding location labels for each set of waveform data based on the randomly selected disturbance source location; the location labels are in the form of a combination of line numbers and segment point numbers; S2.1.3 Ensure data is evenly distributed and covers various disturbance scenarios: Statistical analysis: Regularly perform statistical analysis on the generated data to calculate the data percentage of each disturbance type and the distribution frequency of disturbance source locations on different lines and segment points; Adjust the sampling strategy: If the number of data under certain disturbance types, disturbance source locations, or disturbance parameters is found to be too small, adjust the random sampling strategy to increase the data generation ratio; Simulate different operating conditions: Simulate different grid operating conditions during the simulation process, including changing load levels and distributed generation output, and then generate disturbance data under different operating conditions.

3. The method for locating disturbance sources in active distribution networks based on artificial intelligence according to claim 1, characterized in that: The data enhancement operation in step S2 includes adding Gaussian noise, amplitude scaling, and phase shift to the simulation data to simulate the uncertainty of the measured data, specifically including: S2.2.1 Add Gaussian noise: Determine the mean and standard deviation of the Gaussian noise based on the noise level of the actual power grid measurement data; use a random number generator to generate a Gaussian noise sequence with the same length as the simulation data; S2.2.2 Amplitude Scaling: Determine the upper and lower limits of the amplitude scaling factor based on the amplitude variation range of actual power grid measurement data; use a random number generator to generate the scaling factor within the determined range; S2.2.3 Phase offset: Determine the upper and lower limits of the phase offset based on the phase variation range of the actual power grid measurement data; convert the angle value of the phase offset into radians. The conversion formula is: radians = angle × π / 180.

4. The method for locating disturbance sources in active distribution networks based on artificial intelligence according to claim 1, characterized in that: In step S2, the steps of considering the influence of different seasons and weather factors on the power grid and performing corresponding disturbance simulation on the simulation data specifically include: S2.3.1 Establish seasonal and weather model libraries: Establish corresponding model libraries for different seasons and weather conditions, including load models, equipment parameter models, and fault models; S2.3.2 Randomly select season and weather: When generating simulation data, randomly select season and weather type; S2.3.3 Adjust simulation data according to the selected season and weather: According to the selected season and weather type, call the corresponding model from the model library and adjust the simulation data.

5. The method for locating disturbance sources in active distribution networks based on artificial intelligence according to claim 1, characterized in that: The pre-training step in step S2 uses simulation data to train a lightweight 1D-CNN model, extracts perturbation features, and adopts an adaptive learning rate adjustment strategy to accelerate the model convergence speed, specifically including: S2.4.1 Build a lightweight 1D-CNN model. The network architecture design includes: Input layer: Determine the input dimension based on the sampling rate and data length of the simulation data; Convolutional layer: Multiple one-dimensional convolutional layers are used to extract features of different scales; each convolutional layer contains convolution operations, batch normalization, and activation functions; Pooling layer: Add a maximum pooling layer after the convolution layer to reduce the dimension of the feature map; Fully connected layer: Flatten the pooled feature map into a one-dimensional vector and connect it to the fully connected layer for feature integration and classification. Set up two fully connected layers, with 128 neurons in the first layer and 128 neurons in the second layer equal to the number of perturbation categories. Output layer: Use the Softmax activation function to output the probability of each perturbation category; S2.4.2 Learning rate scheduler selection for adaptive learning rate adjustment strategy: Use cosine annealing learning rate scheduler to gradually reduce the learning rate in the form of a cosine function during training; S2.4.3 Model Training: Data loading: Divide the simulation data into training and validation sets, and use torch.utils.data.DataLoader to load the data; Training process: In each epoch, the training set is traversed, the data is input into the model for forward propagation, the loss is calculated, the parameters are updated through backpropagation, and the model performance is evaluated on the validation set.

6. The method for locating disturbance sources in active distribution networks based on artificial intelligence according to claim 1, characterized in that: Step S2 uses the measured data to fine-tune the model parameters to adapt to the actual power grid characteristics, and introduces domain adaptation technology to reduce the distribution difference between the simulation data and the measured data. Specifically, the steps include: Step 2.5.1 Domain Adaptation Technique - Maximum Mean Difference (MMD): MMD is used to measure the difference between the distributions of data from two domains. This distribution difference is measured by calculating the mean difference between the two domain data in the reproducing kernel Hilbert space. MMD is added as a regularization term to the classification loss function, allowing the model to consider both classification performance and domain adaptation during training. Step 2.5.2 Fine-tune model parameters: Data preparation: Mix measured data with simulated data and divide them into training and validation sets; Loss function design: Combine classification loss and MMD loss as the total loss function; Training process: The same method as the pre-training stage is used for training.

7. The method for locating disturbance sources in active distribution networks based on artificial intelligence according to claim 1, characterized in that: Step S3: Interpretability module design specifically includes: S3.1 Attention Mechanism: Using the convolutional block attention module, we consider both channel and spatial attention information. We introduce channel attention into CNN to automatically weight features of different frequency bands and highlight perturbation-related features. Furthermore, we combine the spatial attention mechanism to focus on the importance of different time points for perturbation localization. S3.2 Grad-CAM visualization: Gradient backpropagation is performed on the disturbance source locations output by the model to generate a heat map showing which time series segments or frequency bands contribute most to the location results. Key areas in the heat map are further analyzed, combining grid topology and device characteristics to explain the reasons for the disturbance source location. S3.3 Decision tree integration: Integrate the deep learning model with the decision tree model, and use the interpretability of the decision tree to explain the decision-making process of the deep learning model; first, use the deep learning model to predict the measured data to obtain the probability distribution of the disturbance source location; then, use the intermediate features of the deep learning model as input to train the decision tree model and learn the decision rules of the deep learning model.

8. Artificial intelligence-based positioning of active distribution network disturbance sources, used to implement the artificial intelligence-based positioning method of active distribution network disturbance sources according to any one of claims 1 to 7, characterized in that: It includes a data acquisition and preprocessing module, a simulation-data fusion model construction module, an interpretability module and a positioning analysis module, which are used to implement steps S1 to S4 in sequence.

9. The artificial intelligence-based active distribution network disturbance source location method according to claim 8, characterized in that: It also includes a cloud database for storing annotation data and system operation logs, and regularly backing up annotation data.

Citation Information

Patent Citations

  • Power quality disturbance source positioning method and device, electronic equipment and storage medium

    CN117907734A