A method for identifying composite power quality disturbances in photovoltaic distribution networks based on mechanism-constrained multi-scale time-frequency attention autoencoders

By using a mechanism-constrained multi-scale time-frequency attention autoencoder and combining it with power quality mechanism indicators, the accuracy and interpretability issues of disturbance identification in photovoltaic grid-connected scenarios are solved, and efficient identification of single and compound power quality disturbances in photovoltaic distribution networks is achieved.

CN123115931APending Publication Date: 2026-11-17NANJING INST OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611184447.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-06
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing disturbance identification methods suffer from insufficient physical interpretability, low accuracy in identifying composite disturbances, and poor generalization ability under weakly labeled sample conditions in photovoltaic grid-connected scenarios, making it difficult to simultaneously identify transient disturbances, continuous disturbances, and composite disturbances.

Method used

A mechanism-constrained multi-scale time-frequency attention autoencoder method is adopted to obtain the time-frequency feature map of disturbance through continuous wavelet transform. Combined with multi-scale disturbance sensing coding, dual-domain time-frequency attention and mechanism-constrained latent space, the automatic identification of power quality disturbances in photovoltaic distribution networks is realized.

Benefits of technology

It improves the accuracy and interpretability of identifying composite power quality disturbances in photovoltaic grid-connected scenarios, and enhances the model's generalization ability under weak labeling and composite disturbance conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123115931A_ABST
    Figure CN123115931A_ABST
Patent Text Reader

Abstract

This invention discloses a method for identifying composite power quality disturbances in photovoltaic distribution networks based on a mechanism-constrained multi-scale time-frequency attention autoencoder. The steps are as follows: Voltage and current signals from monitoring points in the photovoltaic distribution network are collected and filtered, normalized, and segmented to obtain disturbance samples to be identified; a continuous wavelet transform is used to obtain a time-frequency feature map of the disturbance; an MC-MSTFAE model is constructed, and a multi-scale disturbance perception coding module is used to extract multi-scale disturbance features, while a dual-domain time-frequency attention module is used to enhance the disturbance representation in key time and frequency intervals; the enhanced disturbance features are input into a mechanism-constrained latent space module to map and obtain a latent space feature vector containing power quality mechanism features; the model is trained based on a mechanism-constrained loss function; and the trained model is used to output the identification results. This invention can improve the accuracy, generalization ability, and physical interpretability of identifying composite power quality disturbances in photovoltaic distribution networks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the fields of power quality monitoring of distribution networks, photovoltaic grid-connected disturbance identification, time-frequency signal analysis and artificial intelligence diagnostic technology, specifically involving a method for identifying composite power quality disturbances in photovoltaic distribution networks based on a mechanism-constrained multi-scale time-frequency attention autoencoder. Background Technology

[0002] With the rapid integration of distributed photovoltaic (PV) power into industrial and commercial distribution networks and low-voltage distribution areas, the combined effects of inverter switching modulation, power output abrupt changes caused by cloud shadows, impedance variations at the grid connection point, and load nonlinearity lead to power quality disturbances in the distribution network, such as harmonics, voltage fluctuations, voltage sags, and flicker, exhibiting strong randomness, strong coupling, and compound superposition characteristics. Compared to traditional single disturbances, compound power quality disturbances in PV grid-connected scenarios often have characteristics such as short duration, complex spectral composition, unstable amplitude changes, and the simultaneous occurrence of multiple types of disturbances, posing challenges to disturbance identification and mitigation decisions.

[0003] Existing disturbance identification methods typically rely on Fourier transform, wavelet transform, empirical mode decomposition, or deep convolutional neural networks for feature extraction and classification. While these methods can characterize the time-domain, frequency-domain, or time-frequency-domain features of voltage or current signals to some extent, they still have the following shortcomings under conditions of weak labeling, imbalanced samples, and superimposed complex disturbances in photovoltaic distribution networks: First, they rely solely on data-driven features and do not fully utilize power quality mechanism indicators such as total harmonic distortion rate, sag depth, sag duration, and short-time flicker value, resulting in a lack of constraints between model learning results and physical laws; second, they lack the ability to focus on disturbance features at different time and frequency scales, making it difficult to simultaneously identify transient disturbances, continuous disturbances, and complex disturbances; third, traditional classification networks often require a large number of labeled samples, resulting in insufficient generalization ability when the number of monitoring points in actual industrial distribution networks is limited and fault samples are scarce.

[0004] Therefore, a method for identifying composite power quality disturbances in photovoltaic distribution networks based on a mechanism-constrained multi-scale time-frequency attention autoencoder is urgently needed. Summary of the Invention

[0005] To address the shortcomings of existing methods, such as insufficient physical interpretability, low accuracy in identifying complex disturbances, and poor generalization ability under weakly labeled sample conditions, this invention provides a method for identifying complex power quality disturbances in photovoltaic distribution networks based on a mechanism-constrained multi-scale time-frequency attention autoencoder. By inputting the disturbance time-frequency feature map obtained from continuous wavelet transform into the mechanism-constrained multi-scale time-frequency attention autoencoder, and utilizing multi-scale disturbance sensing coding, dual-domain time-frequency attention enhancement, latent space mechanism constraints, and classification output, the method achieves automatic identification of single and complex power quality disturbances in photovoltaic distribution networks. This enables the model to automatically learn deep time-frequency features from the voltage and current signals of the photovoltaic distribution network, while also being constrained by power quality mechanism indicators in the latent space. This improves the accuracy and interpretability of identifying harmonic disturbances, voltage fluctuation disturbances, voltage sag disturbances, flicker disturbances, and complex disturbances.

[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution:

[0007] This invention provides a method for identifying composite power quality disturbances in photovoltaic distribution networks based on a mechanism-constrained multi-scale time-frequency attention autoencoder, comprising the following steps:

[0008] S1. Collect voltage and current signals from monitoring points in the photovoltaic power distribution network, and perform filtering and noise reduction, missing value removal, amplitude normalization, phase synchronization, and disturbance event segmentation to obtain disturbance samples to be identified.

[0009] S2. Perform time-frequency transformation on the disturbance sample to be identified using continuous wavelet transform to obtain the time-frequency feature map of the disturbance;

[0010] S3. Construct an MC-MSTFAE model, input the perturbation time-frequency feature map into the time-frequency representation module of the MC-MSTFAE model for feature standardization preprocessing, and obtain a standardized perturbation time-frequency feature map;

[0011] S4. Using the multi-scale perturbation sensing coding module of the MC-MSTFAE model, multi-scale feature extraction is performed on the standardized perturbation time-frequency feature map to obtain multi-scale perturbation features;

[0012] S5. Using the dual-domain time-frequency attention module built into the MC-MSTFAE model, establish time-dimensional attention weights and frequency-dimensional attention weights respectively, and perform enhancement processing on the multi-scale perturbation features to obtain perturbation enhancement features.

[0013] S6. Input the perturbation enhancement features into the mechanism constraint latent space module, map them to obtain a latent space feature vector containing power quality mechanism features, and iteratively train the MC-MSTFAE model through a preset mechanism constraint loss function to optimize the model parameters;

[0014] S7. Input the photovoltaic distribution network disturbance sample to be identified into the trained MC-MSTFAE model, and output the identification result based on the latent space feature vector of the model.

[0015] Preferably, in step S2, continuous wavelet transform is used to map the one-dimensional perturbation sample to be identified into a two-dimensional time-frequency feature map. The two-dimensional time-frequency feature map is used to characterize the energy distribution characteristics of the perturbation sample at different time positions and different frequency scales, and its expression is:

[0016]

[0017] Where x(t) is the perturbation sample to be identified, ψ is the mother wavelet function, a is the scaling factor, b is the translation factor, and W... x (a,b) are the time-frequency coefficients of the perturbation sample at different time locations and at different frequency scales.

[0018] Preferably, in step S3, the MC-MSTFAE model is a mechanism-constrained multi-scale time-frequency attention autoencoder, which takes the perturbation time-frequency feature map obtained by continuous wavelet transform as input and takes perturbation time-frequency feature reconstruction, mechanism index consistency constraint and perturbation type identification as joint training objectives.

[0019] The MC-MSTFAE model includes a time-frequency representation module, a multi-scale perturbation-aware coding module, a dual-domain time-frequency attention module, a mechanism-constrained latent space module, a decoding and reconstruction module, and a classification output module. The time-frequency representation module receives the perturbation time-frequency feature map generated by continuous wavelet transform and performs feature standardization preprocessing. The multi-scale perturbation-aware coding module extracts feature information of the perturbation signal at different time and frequency scales. The dual-domain time-frequency attention module enhances the perturbation feature representation capability in key time and frequency intervals. The mechanism-constrained latent space module learns latent space feature representations that conform to the physical mechanisms of power quality. The decoding and reconstruction module reconstructs the perturbation time-frequency features from the latent space features, thereby generating a reconstruction loss. The classification output module outputs the recognition probability of various perturbations based on the latent space feature vectors, completing the perturbation type determination.

[0020] Preferably, the multi-scale perturbation sensing coding module includes at least three parallel feature extraction branches. Each feature extraction branch uses different receptive field convolution kernels to extract features, and forms multi-scale perturbation features through feature splicing or feature fusion. The different receptive field convolution kernels are used to extract harmonic perturbation features, voltage fluctuation features, and voltage sag features, respectively.

[0021] Preferably, the dual-domain time-frequency attention module includes a time-dimensional attention unit and a frequency-dimensional attention unit. The dual-domain time-frequency attention module uses the time-dimensional attention weight and the frequency-dimensional attention weight to jointly enhance the multi-scale perturbation features. The time-dimensional attention unit is used to calculate the importance weight of the perturbation signal in different time intervals. The frequency-dimensional attention unit is used to calculate the importance weight of the perturbation signal in different frequency intervals.

[0022] Preferably, in step S6, the mechanism-constrained latent space module constructs a latent space feature vector including power quality mechanism features, as expressed below:

[0023]

[0024] Where THD represents the total harmonic distortion rate, D s T represents the voltage sag depth. s P represents the duration of the voltage sag. st Indicates the short-time flicker value;

[0025] Then, the mechanism-constrained loss function is reconstructed using the aforementioned mechanism feature vectors, as shown in the following expression:

[0026]

[0027] Among them, L rec For reconstruction loss, L H To preserve the total harmonic distortion loss, L S For voltage sag characteristic holding loss, L F To preserve the flicker characteristics, L cls For classification loss, α, β, γ, and δ are loss weight coefficients;

[0028] The total harmonic distortion rate retention loss is used to constrain the difference in total harmonic distortion rate between the reconstructed signal and the original signal. The voltage sag retention loss is used to constrain the difference in sag depth and duration between the reconstructed signal and the original signal. The flicker retention loss is used to constrain the difference in flicker severity index between the reconstructed signal and the original signal.

[0029] Preferably, the total harmonic distortion (THD) is calculated based on the effective value of the fundamental voltage and the effective values ​​of each harmonic voltage:

[0030]

[0031] Where U1 is the effective value of the fundamental voltage, U n Here, represents the effective value of the nth harmonic voltage, and N is the highest harmonic order involved in the calculation.

[0032] The voltage sag depth D sCalculated based on the lowest effective voltage value and the rated voltage during the voltage sag process:

[0033]

[0034] Among them, U min U is the lowest effective voltage value during the voltage sag process. N Rated voltage;

[0035] The voltage sag duration T s Calculated based on the start and end times of the voltage sag:

[0036]

[0037] Among them, t s Let t be the time when the voltage sag begins. e This is the moment when the voltage sag ends;

[0038] The short-time flicker value P st Calculated based on voltage envelope fluctuation sequence or preset flicker measurement model, it is used to characterize the human eye's visual sensitivity caused by voltage fluctuations within a short time scale.

[0039] Preferably, in step S7, the identification result is a single power quality disturbance or a composite power quality disturbance result. The single disturbance includes one of harmonic disturbance, voltage fluctuation disturbance, voltage flicker disturbance, and voltage sag disturbance. The composite power quality disturbance is a disturbance formed by superimposing at least one of the single disturbances.

[0040] The rules for determining the identification results are as follows: if the output probability of only a single disturbance category is greater than the preset single disturbance threshold, it is determined to be the corresponding single power quality disturbance; if the output probability of at least two disturbance categories is greater than the preset composite discrimination threshold at the same time, it is determined to be a composite power quality disturbance, and the specific combination type of the superimposed disturbance is output.

[0041] Preferably, in step S1, the disturbance event segmentation processing method is as follows: based on the effective voltage value, harmonic content, and the abrupt change threshold of the flicker index, the continuous monitoring signal is sliced ​​into sliding windows to obtain time window samples containing information about before the disturbance occurs, during the disturbance, and after the disturbance recovers. The time window samples are then labeled with corresponding disturbance type tags, including harmonic disturbance, voltage fluctuation disturbance, voltage flicker disturbance, voltage sag disturbance, and composite power quality disturbance.

[0042] Compared with the prior art, the present invention has the following beneficial effects:

[0043] This invention combines continuous wavelet transform, mechanistic-constrained multi-scale time-frequency attention autoencoder, and power quality physical indices. Based on data-driven feature learning, it introduces mechanistic constraints such as total harmonic distortion rate, voltage sag depth, voltage sag duration, and short-time flicker value, enabling latent space features to possess both discriminative and physical consistency. This can improve the accuracy, stability, and interpretability of identifying composite power quality disturbances in photovoltaic grid-connected scenarios. Attached Figure Description

[0044] Figure 1 This is an overall flowchart of the photovoltaic power distribution network composite power quality disturbance identification method according to an embodiment of the present invention;

[0045] Figure 2 This is a schematic diagram of the MC-MSTFAE model structure according to an embodiment of the present invention;

[0046] Figure 3 This is a schematic diagram illustrating the construction of latent space features constrained by the mechanism in an embodiment of the present invention;

[0047] Figure 4 This is a schematic diagram of a typical photovoltaic access node in the test system of an embodiment of the present invention;

[0048] Figure 5 This is a comparison chart of the overall accuracy of different identification methods in embodiments of the present invention;

[0049] Figure 6 This is a diagram showing the identification indexes for each disturbance category in the MC-MSTFAE model of this invention. Detailed Implementation

[0050] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.

[0051] like Figure 1 As shown, this embodiment provides a method for identifying composite power quality disturbances in photovoltaic distribution networks based on a mechanism-constrained multi-scale time-frequency attention autoencoder, including the following steps:

[0052] S1. Collect voltage and current signals from monitoring points in the photovoltaic power distribution network, and perform filtering and noise reduction, missing value removal, amplitude normalization, phase synchronization, and disturbance event segmentation to obtain disturbance samples to be identified.

[0053] S2. Perform time-frequency transformation on the disturbance sample to be identified using continuous wavelet transform to obtain the time-frequency feature map of the disturbance;

[0054] S3. Construct an MC-MSTFAE model, input the perturbation time-frequency feature map into the time-frequency representation module of the MC-MSTFAE model for feature standardization preprocessing, and obtain a standardized perturbation time-frequency feature map;

[0055] S4. Using the multi-scale perturbation sensing coding module of the MC-MSTFAE model, multi-scale feature extraction is performed on the standardized perturbation time-frequency feature map to obtain multi-scale perturbation features;

[0056] S5. Using the dual-domain time-frequency attention module built into the MC-MSTFAE model, establish time-dimensional attention weights and frequency-dimensional attention weights respectively, and perform enhancement processing on the multi-scale perturbation features to obtain perturbation enhancement features.

[0057] S6. Input the perturbation enhancement features into the mechanism constraint latent space module, map them to obtain a latent space feature vector containing power quality mechanism features, and iteratively train the MC-MSTFAE model through a preset mechanism constraint loss function to optimize the model parameters;

[0058] S7. Input the photovoltaic distribution network disturbance sample to be identified into the trained MC-MSTFAE model, and output the identification result based on the latent space feature vector of the model.

[0059] In this embodiment, the data acquisition targets can be the three-phase voltage and current signals at the photovoltaic grid connection point, key feeder nodes, or load busbars in the industrial park. For the sampled raw signals, low-pass or band-pass filtering is first used to remove high-frequency noise and measurement anomalies. Then, disturbance triggering conditions are set according to voltage RMS value abrupt changes, harmonic content changes, or flicker index changes. The continuous monitoring signals are sliced ​​into sliding windows to obtain time window samples containing information before, during, and after the disturbance occurs. The time window samples are labeled with corresponding disturbance type tags, including harmonic disturbances, voltage fluctuation disturbances, voltage flicker disturbances, voltage sag disturbances, and composite power quality disturbances.

[0060] In this embodiment, continuous wavelet transform is used to convert the one-dimensional disturbance signal of the disturbance sample to be identified into a two-dimensional time-frequency graph. Continuous wavelet transform can simultaneously characterize the disturbance occurrence time, the disturbance duration interval, and the frequency component distribution, and has good expressive ability for transient disturbances, continuous harmonics, and voltage fluctuations caused by rapid changes in photovoltaic power output. The converted time-frequency feature graph is used as the input to the MC-MSTFAE model. The two-dimensional time-frequency feature graph is used to characterize the energy distribution characteristics of the disturbance sample at different time positions and different frequency scales, and its expression is:

[0061]

[0062] Where x(t) is the perturbation sample to be identified, ψ is the mother wavelet function, a is the scaling factor, b is the translation factor, and W... x (a,b) are the time-frequency coefficients of the perturbation sample at different time locations and at different frequency scales.

[0063] In this embodiment, the MC-MSTFAE model structure is as follows: Figure 2 As shown, the system includes a time-frequency representation module, a multi-scale perturbation-aware coding module, a dual-domain time-frequency attention module, a mechanism-constrained latent space module, a decoding and reconstruction module, and a classification output module. The multi-scale perturbation-aware coding module includes at least three parallel feature extraction branches. Each feature extraction branch uses different receptive field convolutional kernels for feature extraction, and forms multi-scale perturbation features through feature concatenation or feature fusion. Different receptive field convolutional kernels are used to extract harmonic perturbation features, voltage fluctuation features, and voltage sag features, respectively.

[0064] In this embodiment, MC-MSTFAE is an abbreviation for Mechanism-Constrained Multi-Scale Time-Frequency Attention AutoEncoder. The qualifiers in this name correspond to the key technical components of the model: Mechanism-Constrained corresponds to the mechanistic constraint latent space and mechanistic constraint loss; Multi-Scale corresponds to multi-scale perturbation-aware encoding; Time-Frequency Attention corresponds to time-dimensional attention and frequency-dimensional attention; and AutoEncoder corresponds to the reconstruction learning structure consisting of an encoder, a latent space module, and a decoder.

[0065] Specifically, the encoder first performs multi-scale feature extraction on the time-frequency feature map of the disturbance, compressing disturbances of different durations, frequency distributions, and intensities into latent space feature vectors; the latent space module explicitly introduces THD and D into these latent space feature vectors. s T s and P st The mechanism indicators constrain the hidden space to establish a correspondence between different dimensions of the hidden space and harmonic distortion, sag severity, sag duration and flicker intensity; the decoder then reconstructs the time-frequency feature map of the disturbance from the hidden space feature vectors to ensure that the compressed hidden space features still contain the main time-frequency information of the original disturbance.

[0066] Compared to ordinary autoencoders used only for unsupervised dimensionality reduction, the MC-MSTFAE model does not merely aim to minimize the numerical reconstruction error between input and output. Instead, it combines reconstruction learning, classification learning, and power quality mechanism consistency constraints during training. Therefore, when identifying composite disturbances, the model can not only provide the disturbance category but also, through the latent space, determine the THD and D... s T s and P st The relevant features explain the physical basis for the formation of disturbance categories.

[0067] In this embodiment, the dual-domain time-frequency attention module generates attention weights along the time axis and frequency axis, respectively. The time-dimensional attention is used to enhance key moment features during the disturbance initiation, peak, and recovery phases; the frequency-dimensional attention is used to enhance key frequency features near the fundamental frequency, major harmonic bands, and flicker-sensitive bands. Through dual-domain attention weighting, the model can reduce interference from non-critical background components and improve the ability to identify weak feature components in composite disturbances.

[0068] In this embodiment, the mechanism-constrained latent space module is as follows: Figure 3 As shown, the latent space features are not only automatically learned by the encoder, but are also constrained by the latent space feature vector H, which includes features related to the power quality mechanism. The feature vector is as follows:

[0069]

[0070] Where THD represents the total harmonic distortion rate, D s T represents the voltage sag depth. s P represents the duration of the voltage sag. st This represents the short-time flicker value. By incorporating the aforementioned mechanistic indicators into the loss function, the latent space characteristics of the model can be made consistent with the physical meaning of power quality.

[0071] Specifically, during the training phase, MC-MSTFAE simultaneously performs a perturbation time-frequency feature reconstruction task and a perturbation type classification task. The reconstruction task enables the model to learn the main structural features of the perturbation signal, the classification task enables the model to learn the discrimination boundaries between different perturbation types, and the mechanism constraint task enables the reconstructed signal to compare with the original signal in terms of THD and D. s T s and P st Maintain consistency across metrics. The mechanistic constraint loss function is:

[0072]

[0073] Among them, L rec The mean square error between the original time-frequency plot and the reconstructed time-frequency plot is used; L H Use the absolute or squared value of the THD difference between the original signal and the reconstructed signal; L S The weighted sum of the difference in descent depth and the difference in descent duration is used; L F The difference in short-time flicker values ​​between the original signal and the reconstructed signal is used; L cls Cross-entropy loss is used.

[0074] Total harmonic distortion (THD) is calculated based on the effective value of the fundamental voltage and the effective values ​​of each harmonic voltage:

[0075]

[0076] Where U1 is the effective value of the fundamental voltage, U n Here, represents the effective value of the nth harmonic voltage, and N is the highest harmonic order involved in the calculation.

[0077] Voltage sag depth D s Calculated based on the lowest effective voltage value and the rated voltage during the voltage sag process:

[0078]

[0079] Among them, U min U is the lowest effective voltage value during the voltage sag process. N Rated voltage;

[0080] Voltage sag duration T s Calculated based on the start and end times of the voltage sag:

[0081]

[0082] Among them, t s Let t be the time when the voltage sag begins. e This is the moment when the voltage sag ends;

[0083] Short-time flicker value P st Calculated based on voltage envelope fluctuation sequence or preset flicker measurement model, it is used to characterize the human eye's visual sensitivity caused by voltage fluctuations within a short time scale.

[0084] During the identification phase, the disturbance samples to be identified are input into the trained MC-MSTFAE model after continuous wavelet transform. The model outputs the probability value of each disturbance category. When the probability of only one category among harmonic disturbance, voltage fluctuation disturbance, voltage flicker disturbance, or voltage sag disturbance exceeds the threshold, the corresponding single disturbance category is output; when the probabilities of two or more categories simultaneously exceed the composite discrimination threshold, the composite power quality disturbance category and its component types are output.

[0085] In one specific embodiment, to verify the effectiveness of the method in identifying composite power quality disturbances in photovoltaic distribution networks, a system is constructed as follows: Figure 4 The IEEE 33-node distribution network test system is shown, and nodes 2, 4, 16, 20, 24, and 30 are selected as typical photovoltaic (PV) access and power quality observation nodes. These typical nodes cover the near-end, middle, branch, and end nodes of the feeder, and can reflect the spatial impact of changes in PV access location on disturbance characteristics such as harmonics, voltage fluctuations, and voltage sags.

[0086] In this embodiment, photovoltaic (PV) access capacities of 0MW, 0.5MW, 1MW, 1.5MW, 2MW, and 2.5MW are set, along with access methods such as single-point centralized access, two-point distributed access, and three-point distributed access. Operating weather conditions, including sunny, cloudy, and overcast days, are also set. For each operating condition, data such as node voltage, current, harmonic distortion rate, voltage fluctuation, and voltage sag depth are collected or simulated, and disturbance samples and their time-frequency characteristic maps are generated according to the aforementioned steps.

[0087] Furthermore, the samples with different capacities, access locations, weather conditions, and disturbance types are divided into training samples, validation samples, and test samples, with the test samples not participating in model training. The test samples include harmonic disturbances, voltage fluctuation disturbances, voltage flicker disturbances, voltage sag disturbances, and composite power quality disturbances formed by the superposition of two or more types of disturbances, used to verify the MC-MSTFAE's ability to identify single and composite disturbances.

[0088] In one specific embodiment, accuracy, recall, and F1 score were used as evaluation indicators for recognition performance. The trained MC-MSTFAE was tested, and the recognition results for various disturbances are shown in Table 1. Table 1 shows that the MC-MSTFAE has high recognition indicators for harmonic disturbances, voltage fluctuation disturbances, voltage flicker disturbances, voltage sag disturbances, and composite power quality disturbances. Specifically, the accuracy for composite power quality disturbances was 97.6%, the recall was 97.1%, and the F1 score was 97.3%, indicating that this method can identify composite power quality disturbances under multiple disturbance superposition conditions in photovoltaic distribution networks.

[0089] Table 1: MC-MSTFAE recognition performance under different perturbation categories.

[0090]

[0091] Furthermore, the MC-MSTFAE is compared with Support Vector Machine (SVM), Convolutional Neural Network (CNN), Ordinary Autoencoder (AE), and a similarly structured model after removing mechanistic constraint loss, to demonstrate the accuracy of recognition. Figure 5 As shown. By Figure 5 It can be seen that the overall recognition accuracy of the complete MC-MSTFAE is 98.1%, which is higher than that of SVM, CNN, AE, and the model without mechanistic constraints. The accuracy, recall, and F1 score for each perturbation category are as follows: Figure 6 As shown, by Figure 6 It can be seen that the complete MC-MSTFAE maintains a high recognition index under all perturbation categories, indicating that the multi-scale time-frequency attention structure can enhance the feature extraction capability of composite perturbations, and the mechanism-constrained latent space can improve the model's interpretable recognition capability of harmonic, wave, flicker and transient features.

[0092] Based on the above identification results, it can be seen that... Figure 4 The test system and multi-condition samples shown are used not only to form a perturbation time-frequency feature dataset, but also to verify the classification and recognition performance of the method. Compared to models that rely solely on data-driven features, this invention utilizes THD and D... s T s and P st The mechanism-constrained loss function modifies the latent space feature distribution, enabling the model to maintain a high recognition accuracy even under conditions of weak labels and superimposed compound perturbations.

[0093] The method described in this embodiment can be deployed in an online power quality monitoring system for a park distribution network, a photovoltaic grid connection impact assessment system, or a distribution automation master station. For newly added photovoltaic access points, historical monitoring samples and simulation samples can be used to pre-train the model, and then a small number of field samples can be used to fine-tune the model parameters, thereby adapting to disturbance identification tasks under different photovoltaic capacities, different inverter types, and different distribution network impedance conditions.

[0094] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A photovoltaic distribution network composite power quality disturbance identification method based on mechanism constraint multi-scale time-frequency attention autoencoder, characterized in that, Includes the following steps: S1. Collect voltage and current signals from monitoring points in the photovoltaic power distribution network, and perform filtering and noise reduction, missing value removal, amplitude normalization, phase synchronization, and disturbance event segmentation to obtain disturbance samples to be identified. S2. Perform time-frequency transformation on the disturbance sample to be identified using continuous wavelet transform to obtain the time-frequency feature map of the disturbance; S3. Construct an MC-MSTFAE model, input the perturbation time-frequency feature map into the time-frequency representation module of the MC-MSTFAE model for feature standardization preprocessing, and obtain a standardized perturbation time-frequency feature map; S4. Using the multi-scale perturbation sensing coding module of the MC-MSTFAE model, multi-scale feature extraction is performed on the standardized perturbation time-frequency feature map to obtain multi-scale perturbation features; S5. Using the dual-domain time-frequency attention module built into the MC-MSTFAE model, establish time-dimensional attention weights and frequency-dimensional attention weights respectively, and perform enhancement processing on the multi-scale perturbation features to obtain perturbation enhancement features. S6. Input the perturbation enhancement features into the mechanism constraint latent space module, map them to obtain a latent space feature vector containing power quality mechanism features, and iteratively train the MC-MSTFAE model through a preset mechanism constraint loss function to optimize the model parameters; S7. Input the photovoltaic distribution network disturbance sample to be identified into the trained MC-MSTFAE model, and output the identification result based on the latent space feature vector of the model.

2. The method of claim 1, wherein, In step S2, continuous wavelet transform is used to map the one-dimensional perturbation sample to be identified into a two-dimensional time-frequency feature map. The two-dimensional time-frequency feature map is used to characterize the energy distribution characteristics of the perturbation sample at different time positions and different frequency scales, and its expression is: Wherein, x(t) is the disturbance sample to be identified, ψ is the mother wavelet function, a is the scale factor, b is the translation factor, W x (a, b) is the time-frequency coefficient of the disturbance sample at different time positions and different frequency scales.

3. The method of claim 1, wherein, In step S3, the MC-MSTFAE model is a mechanism-constrained multi-scale time-frequency attention autoencoder, which takes the perturbation time-frequency feature map obtained by continuous wavelet transform as input and the perturbation time-frequency feature reconstruction, mechanism index consistency constraint and perturbation type identification as joint training objectives. The MC-MSTFAE model includes a time-frequency representation module, a multi-scale perturbation-aware coding module, a dual-domain time-frequency attention module, a mechanism-constrained latent space module, a decoding and reconstruction module, and a classification output module. The time-frequency representation module receives the perturbation time-frequency feature map generated by continuous wavelet transform and performs feature standardization preprocessing. The multi-scale perturbation-aware coding module extracts feature information of the perturbation signal at different time and frequency scales. The dual-domain time-frequency attention module enhances the perturbation feature representation capability in key time and frequency intervals. The mechanism-constrained latent space module learns latent space feature representations that conform to the physical mechanisms of power quality. The decoding and reconstruction module reconstructs the perturbation time-frequency features from the latent space features, thereby generating a reconstruction loss. The classification output module outputs the recognition probability of various perturbations based on the latent space feature vectors, completing the perturbation type determination.

4. The method of claim 3, wherein, The multi-scale perturbation sensing coding module includes at least three parallel feature extraction branches. Each feature extraction branch uses different receptive field convolution kernels to extract features and forms multi-scale perturbation features through feature splicing or feature fusion. The different receptive field convolution kernels are used to extract harmonic perturbation features, voltage fluctuation features, and voltage sag features, respectively.

5. The method of claim 3, wherein, The dual-domain time-frequency attention module includes a time-dimensional attention unit and a frequency-dimensional attention unit. The dual-domain time-frequency attention module uses time-dimensional attention weights and frequency-dimensional attention weights to jointly enhance the multi-scale perturbation features. The time-dimensional attention unit is used to calculate the importance weights of the perturbation signal in different time intervals. The frequency-dimensional attention unit is used to calculate the importance weights of the perturbation signal in different frequency intervals.

6. The method of claim 1, wherein, In step S6, the mechanism-constrained latent space module constructs a latent space feature vector containing power quality mechanism features, expressed as follows: wherein THD represents total harmonic distortion, D s represents voltage sag depth, T s represents voltage sag duration, P st represents short-term flicker value; Then, the mechanism-constrained loss function is reconstructed using the aforementioned mechanism feature vectors, as shown in the following expression: wherein L rec is the reconstruction loss, L H is the total harmonic distortion preservation loss, L S is the voltage sag feature preservation loss, L F is the flicker feature preservation loss, L cls is the classification loss, and a, b, g, and d are loss weight coefficients. The total harmonic distortion rate retention loss is used to constrain the difference in total harmonic distortion rate between the reconstructed signal and the original signal. The voltage sag retention loss is used to constrain the difference in sag depth and duration between the reconstructed signal and the original signal. The flicker retention loss is used to constrain the difference in flicker severity index between the reconstructed signal and the original signal.

7. The method of claim 6, wherein, The total harmonic distortion (THD) is calculated based on the effective value of the fundamental voltage and the effective values ​​of each harmonic voltage: Wherein, U1 is the fundamental voltage effective value, U n is the nth harmonic voltage effective value, N is the highest harmonic number involved in the calculation; The voltage dip depth D s According to the calculation of the minimum voltage effective value and the rated voltage during the voltage dip process: wherein U min is the minimum voltage effective value during the voltage dip, U N is the rated voltage; The voltage sag duration T s According to the voltage sag start time and end time calculation: wherein t s is the voltage sag start time, t e is the voltage sag end time; The short-time flicker value P st The short-time flicker value P is calculated from the voltage envelope fluctuation sequence or a pre-set flicker measurement model for characterizing the degree of human visual sensitivity caused by voltage fluctuations within a short time scale.

8. The method of claim 1, wherein: In step S7, the identification result is a single power quality disturbance or a composite power quality disturbance result. The single disturbance includes one of harmonic disturbance, voltage fluctuation disturbance, voltage flicker disturbance, and voltage sag disturbance. The composite power quality disturbance is a disturbance formed by superimposing at least one of the single disturbances. The rules for determining the identification results are as follows: if the output probability of only a single disturbance category is greater than the preset single disturbance threshold, it is determined to be the corresponding single power quality disturbance; if the output probability of at least two disturbance categories is greater than the preset composite discrimination threshold at the same time, it is determined to be a composite power quality disturbance, and the specific combination type of the superimposed disturbance is output.

9. The method of claim 1, wherein: In step S1, the segmented processing method for the disturbance event is as follows: based on the effective voltage value, harmonic content, and the abrupt change threshold of the flicker index, the continuous monitoring signal is sliced ​​into sliding windows to obtain time window samples containing information about before the disturbance occurs, during the disturbance, and after the disturbance recovers. The time window samples are then labeled with corresponding disturbance type tags, including harmonic disturbance, voltage fluctuation disturbance, voltage flicker disturbance, voltage sag disturbance, and composite power quality disturbance.