A current phase sequence automatic identification method and system

By constructing a spatiotemporal feature extraction model based on a one-dimensional convolutional neural network and an attention mechanism, combined with anomaly detection using a generative adversarial network, the problem of low accuracy in phase sequence recognition under complex working conditions in existing technologies is solved, high-precision and intelligent automatic phase sequence recognition is achieved, and the stability of power grid operation and equipment safety are improved.

CN120632741BActive Publication Date: 2025-10-21SHANGHAI HUAKUN ELECTRICAL CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511113808.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-11
Publication Date
2025-10-21
Estimated Expiration
2045-08-11

AI Technical Summary

Technical Problem

Existing phase sequence identification methods have low accuracy under complex working conditions, especially when there is harmonic interference and load fluctuations. It is difficult to accurately identify the current phase sequence, resulting in motor starting failure or equipment overload, and insufficient system reliability and intelligence.

Method used

A spatiotemporal feature extraction model based on one-dimensional convolutional neural networks and attention mechanism is adopted, combined with anomaly detection of generative adversarial networks to generate highly discriminative spatiotemporal fusion feature vectors, and a diagnostic classifier is used to achieve unsupervised quantitative evaluation and active correction of phase sequence status.

Benefits of technology

It significantly improves the accuracy and robustness of phase sequence identification, can accurately identify phase sequence under complex working conditions, enhances the system's intelligence level and closed-loop control capabilities, and ensures the stability of power grid operation and equipment safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120632741B_ABST
    Figure CN120632741B_ABST
Patent Text Reader

Abstract

The application provides a current phase sequence automatic identification method and system, comprising: collecting three-phase current signals, inputting the preprocessed signals to a space-time feature extraction model; the model extracts deep time sequence features of each phase through a plurality of parallel one-dimensional convolutional neural networks, and then fuses the deep time sequence features by using an attention mechanism to capture the dynamic correlation between each phase and generate a space-time fusion feature vector; inputting the space-time fusion feature vector into a pre-trained generative adversarial network, calculating the deviation degree thereof from the normal state to obtain an anomaly score; if the anomaly score exceeds a threshold value, determining a phase sequence anomaly, and further starting a diagnostic classifier to determine the anomaly type, and finally generating and outputting a phase sequence adjustment control signal corresponding to the type. The application solves the problems of low recognition accuracy and insufficient intelligence of traditional methods under complex working conditions, and realizes high robustness monitoring and active closed-loop correction of the phase sequence.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information technology, and in particular to a method and system for automatically identifying a current phase sequence. Background Art

[0002] Current phase sequence identification is crucial in power systems and is directly related to the stability of grid operation and the safety of equipment. Accurately determining the phase sequence of three-phase current can effectively prevent motor reversal, equipment damage, or system failures caused by phase sequence errors, and is an indispensable technology in the fields of smart grids and industrial automation. However, existing phase sequence identification methods often perform poorly under complex operating conditions, especially when the current waveform is interfered with by harmonics or when the load fluctuates. These methods typically rely on a single waveform feature, such as amplitude or phase angle, and are difficult to adapt to the dynamically changing grid environment, resulting in reduced identification accuracy or an increased risk of misjudgment. In particular, in some practical scenarios, such as when large industrial motors are started, the current waveform may be severely distorted due to harmonics or nonlinear loads. Traditional methods often cannot accurately capture the phase sequence characteristics, which in turn affects the reliability of the system.

[0003] Existing phase sequence identification methods primarily rely on analyzing the characteristics of three-phase current waveforms. For example, the phase angle of the fundamental component is obtained through a Fast Fourier Transform (FFT), and the phase sequence is determined by comparing the phase difference. Alternatively, the phase sequence is determined by detecting the order in which the waveform crosses zero points. However, these methods face significant challenges in practical industrial applications, especially in the presence of large numbers of nonlinear loads (such as inverters and rectifiers) or in transient processes such as the start and stop of large motors. High-order harmonics, transient surges, and voltage noise in the power grid can severely distort the current waveform, causing zero-crossing offsets and leakage in the FFT spectrum. This distorts the features extracted by traditional methods, leading to misjudgment or identification failure of the phase sequence.

[0004] In the field of phase sequence identification, the core challenge lies in extracting reliable features from complex waveforms for accurate judgment. The slope of the current waveform is a key technical attribute, reflecting the dynamic behavior of current in the time dimension. However, due to harmonic interference and load fluctuations, the regularity of the slope variation can be obscured, making a single slope feature insufficient to accurately distinguish the phase relationships between the three phases. For example, in an industrial power grid containing high-order harmonics, the current waveform may exhibit unusual and sudden changes near its peaks and zero crossings, making it difficult for traditional methods to discern the correct phase sequence through simple slope calculations. This complexity of slope features further exacerbates another technical attribute challenge: how to integrate the temporal information and amplitude ratios of the slope variation in a multidimensional feature space to form a reliable basis for phase sequence judgment. This problem manifests itself in real-world applications: when a large motor fails to start due to an incorrect phase sequence, the system may be unable to quickly identify the phase sequence, leading to production halts or equipment overload.

[0005] Therefore, how to accurately identify the current phase sequence by analyzing the deep dynamic characteristics of the current waveform in the time series and combining it with multi-dimensional feature vectors under complex working conditions has become a key issue that needs to be solved urgently. Summary of the Invention

[0006] The purpose of this application is to provide a method and system for automatic identification of current phase sequence, aiming to solve the technical problems existing in the background technology of low accuracy and insufficient intelligence of phase sequence identification under complex working conditions.

[0007] To achieve the above objectives, the present application provides a method for automatically identifying a current phase sequence, the method comprising:

[0008] S1 collects the original time series signal of the three-phase current, and preprocesses the original time series signal to filter out high-order harmonic interference to obtain a pure current waveform sequence of each phase;

[0009] S2. Input the pure current waveform sequence into a preset spatiotemporal feature extraction model to generate a spatiotemporal fusion feature vector representing the current three-phase current state. The spatiotemporal feature extraction model is configured to: first, extract the time dimension features of each phase current waveform sequence using multiple one-dimensional convolutional neural networks in parallel to obtain deep temporal features for each phase; then, fuse the deep temporal features of each phase using an attention mechanism module to capture and quantify the dynamic correlations between the phases, thereby outputting the spatiotemporal fusion feature vector;

[0010] S3. Inputting the spatiotemporal fusion feature vector into a preset anomaly detection module based on a generative adversarial network to calculate an anomaly score that quantifies the current phase sequence state. The anomaly detection module is trained based on a large number of spatiotemporal fusion feature vectors under normal phase sequences and is used to assess the degree of deviation of the input vector from the normal state.

[0011] S4. Determine whether the abnormality score exceeds a preset abnormality threshold; if so, determine that the current phase sequence is abnormal, activate a diagnostic classifier, determine the type of phase sequence abnormality based on the spatiotemporal fusion feature vector, and generate a phase sequence adjustment control signal corresponding to the abnormality type for actively correcting the grid phase sequence.

[0012] Furthermore, as a preferred solution, in step S2, the attention mechanism module adopts a self-attention mechanism to map the deep temporal features of each phase into query, key, and value vectors respectively, and determines the weight distribution between the phases by calculating the dot product similarity between the query vector and all key vectors, and performs weighted summation on the value vectors to obtain an output that integrates global dependencies.

[0013] Furthermore, as a preferred solution, in step S3, the anomaly detection module includes a generator and a discriminator; the calculation process of the anomaly score includes: using the trained generator to reconstruct the input spatiotemporal fusion feature vector, and calculating the reconstruction error between the input vector and the reconstructed vector, and using the reconstruction error as the anomaly score.

[0014] Furthermore, as a preferred solution, in step S4, the diagnostic classifier is a multi-layer perceptron network, which is trained to map the input spatiotemporal fusion feature vector to a predefined set of phase sequence abnormality types, wherein the set includes positive sequence, reverse sequence, missing phase A, missing phase B, and missing phase C.

[0015] Furthermore, as a preferred solution, after determining that the current phase sequence is abnormal, it also includes: starting a preset diagnostic classifier to determine the abnormal type of the phase sequence based on the spatiotemporal fusion feature vector; and generating the phase sequence adjustment control signal corresponding to each abnormal type according to the abnormal type.

[0016] Furthermore, as a preferred solution, in step S1, preprocessing the original time series signal includes: using fast Fourier transform (FFT) to analyze the signal spectrum, setting the amplitude of harmonic components higher than a preset harmonic order (such as the 5th) to zero, and then reconstructing the pure current waveform sequence through inverse fast Fourier transform (IFFT).

[0017] On the other hand, the present application also provides a current phase sequence automatic identification system, the system comprising:

[0018] The signal acquisition and preprocessing module is used to collect the original time series signals of the three-phase current from the power grid, and preprocess the original time series signals to filter out high-order harmonic interference to obtain a pure current waveform sequence of each phase;

[0019] A spatiotemporal feature extraction module is configured to input the pure current waveform sequence into a preset spatiotemporal feature extraction model to generate a spatiotemporal fusion feature vector representing the current three-phase current state. The spatiotemporal feature extraction model first extracts the time dimension features of each phase current through multiple one-dimensional convolutional neural networks in parallel to obtain the deep temporal features of each phase. The deep temporal features of each phase are then fused through an attention mechanism module to capture and quantify the dynamic correlation between the phases.

[0020] An anomaly detection module, configured to input the spatiotemporal fusion feature vector into a preset generative adversarial network-based model to calculate an anomaly score that quantifies the current phase sequence state;

[0021] The control output module is used to determine whether the abnormal score exceeds a preset abnormal threshold; if so, the current phase sequence is determined to be abnormal, and the diagnostic classifier is started to determine the abnormal type of the phase sequence based on the spatiotemporal fusion feature vector, and generate a phase sequence adjustment control signal corresponding to the abnormal type.

[0022] Furthermore, as a preferred solution, the attention mechanism module in the spatiotemporal feature extraction module adopts a self-attention mechanism to perform weighted fusion of the deep temporal features of each phase.

[0023] Furthermore, as a preferred solution, the anomaly detection module includes a generator and a discriminator, and obtains the anomaly score by calculating the reconstruction error between the input vector and the reconstructed vector output by the generator.

[0024] Furthermore, as a preferred solution, the control output module includes a diagnostic classifier, which is used to classify the abnormal spatiotemporal fusion feature vector into a specific phase sequence fault type.

[0025] Furthermore, as a preferred solution, the control output module also includes a pre-trained diagnostic classifier, which is configured to be activated when a phase sequence abnormality is determined, and is used to determine the specific phase sequence abnormality type based on the spatiotemporal fusion feature vector that causes the abnormality, and generate a corresponding phase sequence adjustment control signal accordingly.

[0026] The present invention discloses a method for intelligent detection and adjustment of the phase sequence of three-phase current in a power grid based on multi-dimensional feature extraction. Aiming at the problem of abnormal equipment operation or system failure that may be caused by the phase sequence error of the three-phase current in the power grid, by constructing a feature extraction model based on a one-dimensional convolutional network and an attention mechanism, it can adaptively learn the deep local features in the time dimension and the dynamic correlation between the phases from the original current signal, generate a time-space fusion feature vector with high discrimination, and significantly improve the robustness and accuracy of the phase sequence feature expression under complex working conditions. In addition, the present invention adopts an anomaly detection paradigm based on a generative adversarial network to realize unsupervised quantitative evaluation of the phase sequence state, which can not only identify known faults, but also be sensitive to unknown or new anomalies; and combines with a diagnostic classifier to directly generate an adjustment signal, changing the passive alarm to an active correction, thereby enhancing the intelligence level and closed-loop control capability of the system, significantly improving the accuracy and robustness of phase sequence detection, and effectively ensuring the stability of power grid operation and equipment safety. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0028] Figure 1 This is an overall flow chart of a current phase sequence automatic identification method provided by this application.

[0029] Figure 2 It is a detailed structural diagram of the spatiotemporal feature extraction module in the embodiment of the present application.

[0030] Figure 3 This is a schematic diagram of the working principle of the GAN-based anomaly detection module in an embodiment of the present application.

[0031] Figure 4 This is a functional module diagram of a current phase sequence automatic identification system provided by this application.

[0032] Figure 5 This is a comparison chart of the abnormality scores of the present application method and the traditional threshold method during the transient process of motor startup.

[0033] Figure 6 It is a conceptual diagram of the phase sequence active correction process in an embodiment of the present application. DETAILED DESCRIPTION

[0034] To help those skilled in the art better understand the technical solutions in this specification, the following will provide a clear and complete description of the technical solutions in the embodiments of this specification, in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. All other embodiments derived by those skilled in the art based on the embodiments in this specification without creative effort shall fall within the scope of protection of this specification.

[0035] In the existing technology, the phase sequence identification method mainly relies on the characteristic analysis of the three-phase current waveform, which has the following shortcomings:

[0036] 1. When extracting features, single waveform features (such as zero-crossing points, peak values, or first-order derivatives) are often used. These shallow features have weak anti-interference capabilities and are difficult to accurately capture the dynamic and deep spatiotemporal coupling relationship between three-phase currents under complex operating conditions where harmonics, noise, and transient disturbances coexist. This leads to insufficient feature expression capabilities and easily causes misjudgment.

[0037] 2. Existing identification methods mostly rely on supervised classification models based on preset fault labels. They have limited ability to identify new or complex phase sequence anomalies not included in the training set (such as transient interphase disturbances), and can usually only provide post-event alarms. They lack the ability to quantitatively assess abnormal conditions and proactively adjust them. The intelligence and robustness of the system needs to be improved.

[0038] Example 1

[0039] In view of the above problems, this embodiment provides a detailed process of a method for automatically identifying a current phase sequence. Figures 1 to 3 This method is primarily used to achieve high-precision, intelligent identification and correction of three-phase current phase sequence in complex power grid environments. This method can be executed on edge computing devices or central servers deployed in substations, large factories, or new energy sites.

[0040] S101: Signal acquisition and preprocessing: acquiring original time series signals of three-phase currents and preprocessing the original time series signals to obtain a pure current waveform sequence of each phase.

[0041] First, the system uses high-precision current transformers and high-speed analog-to-digital converters (ADCs) to collect real-time raw time-series signals of the three-phase (A, B, and C) currents from the power grid. To ensure the capture of high-frequency harmonics and transient details, the sampling frequency is set to a high value, such as 20kHz. The collected signal is a discrete time series, for example, 400 data points per phase within 0.02 seconds (one power frequency cycle).

[0042] Preferably, a high-speed data acquisition card supporting synchronous sampling (e.g., NI's cRIO platform or Analog Devices' ADC chip) is used to sample the three-phase current signals at a frequency of 25.6 kHz. This frequency is chosen to accurately capture information up to the 50th harmonic, providing a basis for subsequent refined filtering. Data acquisition is performed in the form of data frames, with each frame consisting of two power frequency cycles (0.04 seconds on a 50 Hz power grid), meaning 1024 sampling points per phase. An overlapping sampling strategy is employed, for example, generating a new data frame every 0.01 seconds with a 75% overlap with the previous frame, to ensure continuous monitoring.

[0043] Since high-order harmonics introduced by devices such as frequency converters and switching power supplies are common in industrial field power grids, these harmonics can seriously interfere with the fundamental waveform and affect the accuracy of phase sequence judgment. Therefore, it is necessary to preprocess the original signal. This embodiment uses digital filtering technology, and the specific steps are:

[0044] 1. Perform a fast Fourier transform (FFT) on the raw data of a window (e.g., 400 points) collected to convert it from the time domain to the frequency domain to obtain the amplitude and phase information of each frequency component.

[0045] 2. Set a harmonic filtering threshold, such as the 5th harmonic. This means retaining the fundamental (50Hz) and its 2nd to 5th harmonics (100Hz to 250Hz), while setting the amplitudes of all frequency components above the 5th harmonic (i.e., frequencies greater than 250Hz) to zero. This filter out most noise and harmonic interference while retaining low-order harmonic information that aids in phase sequence determination, thus avoiding excessive information loss.

[0046] 3. Perform an inverse fast Fourier transform (IFFT) on the processed frequency-domain data to convert it back to the time domain, resulting in a relatively clean and smooth current waveform sequence. This sequence serves as input for subsequent feature extraction. This preprocessing step acts as an ideal low-pass filter, providing a high-quality data source for the subsequent detection model and is the first step in ensuring algorithm robustness.

[0047] Preferably, after completing the frequency domain filtering and reconstructing it back to the time domain through IFFT, a pure waveform sequence with a length of 1024 is obtained. In order to eliminate the influence of the current amplitude change on the model and make the data meet the input requirements of the neural network, standardization is required. This embodiment adopts the Z-score standardization method, that is, for the 1024 points in each data frame, the mean μ and standard deviation σ are calculated, and then each point x is converted: x'=(x-μ) / σ. In this way, the input waveform of each phase is converted into a standard normal distribution sequence with a mean of 0 and a standard deviation of 1, ensuring that the model focuses on the shape and phase relationship of the waveform, rather than the absolute amplitude.

[0048] S102: Extracting spatiotemporal features, inputting the pure current waveform sequence into a preset spatiotemporal feature extraction model to generate a spatiotemporal fusion feature vector representing the current three-phase current state.

[0049] Traditional feature extraction methods (such as calculating phase difference) are single-dimensional and cannot fully reflect the dynamic characteristics of complex waveforms. This embodiment constructs a spatiotemporal feature extraction model, whose structure is as follows: Figure 2 As shown in Figure 2, it is possible to deeply mine the correlation information within and between waveforms. The model mainly consists of two parts: a parallel three-way one-dimensional convolutional neural network (1D-CNN) and a downstream attention mechanism module.

[0050] 1. One-dimensional convolutional neural network (1D-CNN) extracts deep temporal features:

[0051] The clean current waveform sequences (e.g., vectors of length 400) for phases A, B, and C are fed into three 1D-CNNs with identical structures but independent parameters. Each 1D-CNN consists of multiple convolutional layers, activation function layers (such as ReLU or LeakyReLU), and pooling layers.

[0052] Convolutional layer: Multiple convolution kernels of different sizes (e.g., kernels of sizes 3, 5, and 7) are used to slide across the time dimension, capturing local waveform patterns at different time scales. For example, smaller convolution kernels can learn microscopic features such as the slope and inflection points of a waveform, while larger convolution kernels can learn macroscopic features such as the waveform contour within half a cycle.

[0053] Activation function: Introduces nonlinearity, enabling the network to learn more complex patterns.

[0054] Pooling layer (such as max pooling): downsamples the feature map, reduces the number of parameters, extracts the most significant features, and enhances the translation invariance of the model.

[0055] By stacking multiple layers of CNNs, the network automatically and hierarchically learns abstract time series features from the raw waveform, from low-level to high-level. Ultimately, each 1D-CNN outputs a fixed-length vector (e.g., 128 dimensions), which is the "deep time series feature" of the phase current. It contains far richer information than a single phase angle or amplitude.

[0056] 2. Attention Mechanism integrates spatiotemporal relationships:

[0057] The three-phase electricity is a whole, and the relationship between them is the key to determine the phase sequence. In order to quantify this relationship, Figure 2 As shown, this embodiment introduces a self-attention mechanism module.

[0058] The three-phase deep temporal feature vectors (three 128-dimensional vectors) obtained in the previous step are used as input. Inside the attention module:

[0059] Each input vector is linearly transformed into three different vectors: query (Q), key (K), and value (V).

[0060] Calculate the dot product of phase A's Q vector with the K vectors of phases A, B, and C to obtain the "attention" score of phase A relative to the other phases (including itself). This score reflects the strength of its association with the other phases under the current waveform. Normalize the scores using the Softmax function to obtain the weight coefficients.

[0061] These weight coefficients are used to perform a weighted summation of the V vectors of phases A, B, and C to obtain the final output of phase A. This output vector not only contains the information of phase A itself, but also dynamically integrates the most relevant information from phases B and C.

[0062] The same operation is performed for phases B and C. Finally, the three-phase output vectors are concatenated or weighted again to form a final, fixed-length "space-time fusion feature vector" (for example, 256 dimensions). This vector contains both the deep dynamic information of each phase's current waveform (in the time domain) and the coupling relationship information (in the spatial domain) of the interdependence and mutual influence between the three phases, providing a solid foundation for subsequent accurate judgment.

[0063] S103: GAN-based anomaly detection: input the spatiotemporal fusion feature vector into a preset anomaly detection module based on a generative model to calculate an anomaly score that quantifies the current phase sequence state.

[0064] Traditional classifiers require various fault labels, such as "positive sequence," "reverse sequence," and "phase loss." However, actual faults are so diverse that they are difficult to exhaustively enumerate. This embodiment uses an unsupervised anomaly detection method that simply learns "what is normal" and can identify all "abnormal" ones.

[0065] 1. Model training:

[0066] In the offline phase, massive amounts of (e.g., millions of cycles) three-phase current data are collected under various normal loads and confirmed to be standard positive sequence (ABC). Figure 3 As shown, these data are passed through the spatiotemporal feature extraction model of S102 to obtain a large number of "normal spatiotemporal fusion feature vectors".

[0067] These normal feature vectors are used to train a generative adversarial network (GAN), specifically AnoGAN or its variants. This network consists of a generator (G) and a discriminator (D). The generator attempts to learn the underlying distribution of normal feature vectors, while the discriminator attempts to distinguish between real normal vectors and those forged by the generator. Through adversarial training, the generator is ultimately able to very accurately reproduce (or "understand") the feature space under normal phase sequence conditions.

[0068] Generator (G): A multi-layer perceptron (MLP). Its input is a 100-dimensional random noise vector z (sampled from a standard normal distribution), and its output is a 384-dimensional vector that strives to be indistinguishable from the true spatiotemporal fusion feature vector. Its structure can be: input layer (100) -> fully connected layer (256) -> LeakyReLU -> fully connected layer (512) -> LeakyReLU -> fully connected layer (384) -> Tanh activation function.

[0069] Discriminator (D): Also an MLP. Its input is a 384-dimensional feature vector (real or generated) and its output is a scalar value (representing "realness" in WGAN). Its structure can be: Input layer (384) -> Fully connected layer (512) -> LeakyReLU -> Dropout (0.3) -> Fully connected layer (256) -> LeakyReLU -> Dropout (0.3) -> Fully connected layer (1).

[0070] Offline training: Use a large number (e.g., 1 million) of normal spatiotemporal fusion feature vectors collected and extracted under various normal working conditions for adversarial training until the discriminator cannot effectively distinguish between real samples and generator samples, and the generator can produce very realistic normal features.

[0071] 2. Online detection:

[0072] like Figure 3 As shown, when the system is running, the spatiotemporal fusion feature vector Z generated in real time by S102 is input into the trained generator G. Since the generator G has only recognized normal features, it will try its best to reconstruct the input Z into a normal feature vector G(Z) that it believes is closest.

[0073] Then, the difference between the input vector Z and the reconstructed vector G(Z) is calculated, such as their Euclidean distance or Manhattan distance. This difference value is defined as the "anomaly score".

[0074] Working Principle: If the current phase sequence is normal, then Z itself lies within the normal feature space, and the generator G can easily and perfectly reconstruct it. As a result, Z and G(Z) are very close, and the anomaly score is low. Conversely, if the phase sequence is abnormal (such as reverse sequence, phase loss, or severe imbalance), the generated Z will deviate from the normal feature space, and the generator G cannot effectively reconstruct it, resulting in a huge difference between Z and G(Z), and the anomaly score will increase sharply.

[0075] Preferably, the calculation of the anomaly score combines the reconstruction loss and the discrimination loss:

[0076] Residual Loss: First, we need to find a latent vector z' such that G(z') is closest to Z_real. This is achieved through an iterative optimization method, such as gradient descent, minimizing ||Z_real - G(z)||^2 to find the optimal z. Once found, the reconstruction loss L_R = ||Z_real - G(z')||_1 (using the L1 norm to be more robust to outliers).

[0077] Discrimination Loss: Z_real and its reconstructed version G(z') are fed into an intermediate layer of the discriminator D (e.g., after the second fully connected layer), extracting their feature representations f(Z_real) and f(G(z')). Discrimination loss L_D = ||f(Z_real) - f(G(z'))||_2 (using the L2 norm). This measures the semantic difference between the real sample and its "normalized" version as seen by the discriminator.

[0078] Final anomaly score: Anomaly_Score = (1-λ) * L_R + λ*L_D. λ is a weight hyperparameter (e.g., 0.2) that balances the two losses. This combined score is more stable and sensitive than the reconstruction error alone. The weight hyperparameter λ is preferably between 0.1 and 0.3. A smaller λ value places greater emphasis on the sample's reconstruction error and is suitable for detecting faults with significant structural differences. Properly introducing a discriminant loss (λ > 0) helps increase sensitivity to subtle anomalies at the edge of the normal sample distribution. The weight hyperparameter λ is preferably between 0.1 and 0.3. A smaller λ value places greater emphasis on the sample's reconstruction error and is suitable for detecting faults with significant structural differences. Properly introducing a discriminant loss (λ > 0) helps increase sensitivity to subtle anomalies at the edge of the normal sample distribution.

[0079] S104: hierarchical decision-making and closed-loop control, determining whether the abnormality score exceeds a preset abnormality threshold; if so, determining that the current phase sequence is abnormal, and generating a phase sequence adjustment control signal.

[0080] 1. Abnormal judgment:

[0081] The system sets a dynamic or fixed abnormality threshold. The real-time abnormality score calculated in S103 is compared with this threshold. If the abnormality score remains below the threshold, the system determines that the current phase sequence is normal and continues monitoring. If the abnormality score exceeds the threshold, the abnormality handling process is immediately triggered.

[0082] Preferably, the calculated Anomaly_Score is compared with a preset dynamic threshold T. The threshold T can be determined based on historical anomaly score statistics during normal operation (such as the 99.9% percentile) and can be fine-tuned based on parameters such as the average system load.

[0083] 2. Fault diagnosis:

[0084] Once an anomaly is identified, the system needs to understand the problem. At this point, the spatiotemporal fusion feature vector Z that caused the abnormality score to exceed the threshold is input into a small, pre-trained diagnostic classifier. This classifier can be a simple multi-layer perceptron (MLP) or support vector machine (SVM). It is trained offline using feature vectors with clear labels (e.g., positive order, reversed order ACB, reversed order BAC, missing phase A, missing phase B, missing phase C). The classifier's task is to perform fine-grained classification on feature vectors that have been confirmed to be "abnormal."

[0085] For example, once Anomaly_Score > T, the feature vector Z_real causing the anomaly is immediately fed into an independent diagnostic classifier. This classifier is a small MLP with the following structure: input layer (384) -> fully connected layer (128, ReLU) -> fully connected layer (64, ReLU) -> output layer (5, Softmax). The output layer has 5 neurons, corresponding to the probabilities of the five states: "positive order", "reverse order", "missing phase A", "missing phase B", and "missing phase C".

[0086] 3. Active correction:

[0087] Based on the probability distribution of the diagnostic classifier's output, the class with the highest probability is selected as the diagnosis result. For example, if the output is [0.01, 0.98, 0.0, 0.0, 0.01], it is determined to be "reverse sequence." The control module queries the built-in "fault-control code" mapping table, finds the control code corresponding to "reverse sequence" (for example, 0xB1), and sends this control code to the phase sequence adjustment execution module (PLC) via an industrial bus (such as CANopen or Modbus). The PLC executes the relay logic to swap phases B and C. After the correction is complete, the system collects and analyzes the signal again to confirm that the abnormal score has returned to the normal range, forming a complete closed-loop control process of detection-diagnosis-correction-verification.

[0088] Example 2

[0089] This embodiment describes a current phase sequence automatic identification system that implements the above method, and its functional modules are as follows: Figure 4 The system can be integrated into an independent intelligent monitoring device or as a functional subsystem of a large SCADA system.

[0090] The system mainly includes the following modules:

[0091] 1. Signal acquisition and preprocessing module 101:

[0092] In terms of hardware, this module can include three high-precision, wideband, open-type or closed-type current transformers, as well as a multi-channel synchronous ADC with at least 16-bit accuracy and a sampling rate of no less than 20kHz. In terms of software, it embeds real-time firmware running on a digital signal processor (DSP) or FPGA. This firmware controls the synchronous sampling of the ADC and caches the acquired digital signals. It also implements an efficient FFT and IFFT algorithm library. Once a data window (e.g., 400 data points for a power frequency cycle) is acquired, the firmware immediately executes the preprocessing process described in S101 to filter out high-order harmonics and transmit the pure A, B, and C three-phase waveform sequence via an internal bus to the next module.

[0093] 2. Spatiotemporal feature extraction module 102:

[0094] This module is responsible for understanding and analyzing data. It is typically implemented on a dedicated AI accelerator chip, such as the NVIDIA Jetson series, Google Coral TPU, or a specially designed ASIC. The core of this module is the spatiotemporal feature extraction model described in S102.

[0095] Hardware Implementation: Parallel computing cores within AI chips (such as CUDA cores or Tensor Cores) are used to efficiently execute the convolution and pooling operations of 1D-CNN. Three-way CNNs can be processed in parallel, significantly improving processing speed.

[0096] Software Implementation: The model structure (CNN and Attention) is defined using a deep learning framework such as TensorFlow or PyTorch, optimized, and compiled into a format that can run efficiently on the target hardware. After receiving the three-phase clean waveform, the module performs forward propagation (inference), calculating and outputting a high-dimensional spatiotemporal fusion feature vector within milliseconds.

[0097] 3. Anomaly detection module 103:

[0098] This module is responsible for issuing alerts. It is deployed on the same AI chip as the feature extraction module, or is a logically independent processing unit. This module solidifies the generator G model of the offline-trained GAN described in S103.

[0099] When receiving the feature vector Z from the spatiotemporal feature extraction module, it performs the following operations:

[0100] Call the generator G model, perform forward propagation on Z, and obtain the reconstructed vector G(Z).

[0101] At the hardware level, vector operation instructions are used to quickly calculate the norm distance (i.e., reconstruction error) between Z and G(Z) to obtain the final anomaly score.

[0102] This abnormality is output to the control output module.

[0103] 4. Control output module 104:

[0104] This module is the decision-making center of the system and can be handled by a microcontroller (MCU) or a high-priority thread on the main CPU.

[0105] Threshold comparison: The module maintains a configurable anomaly threshold. It receives anomaly scores from the anomaly detection module in real time and performs comparisons.

[0106] Diagnostic Classifier: The diagnostic classifier model described in S104 is embedded in the module. Once the abnormality score exceeds the threshold, the MCU immediately feeds the corresponding spatiotemporal fusion feature vector into the classifier for inference to determine the specific fault type.

[0107] Control Signal Generation: Based on the output of the diagnostic classifier, the module queries a pre-set fault-action mapping table. For example, if it finds that "reverse sequence" corresponds to "switch phases B and C," it generates a set of digital control instructions that conform to a communication protocol (such as Modbus or CAN). These instructions are sent to the phase sequence adjustment execution module.

[0108] Preferably, to train the spatiotemporal feature extraction model and anomaly detection module, those skilled in the art can construct a mixed dataset. Normal phase sequence data can be collected from actual operating currents at multiple different industrial sites (e.g., including motors, inverters, linear loads, etc.) under different operating conditions, totaling no less than 10,000 power frequency cycles. Abnormal phase sequence data can be constructed by programmatically simulating normal data (e.g., swapping phase B and C data points to generate reversed-sequence samples, or setting a phase's data to zero to generate a phase-loss sample) and a small amount of measured fault data. To improve model generalization, data augmentation operations such as random noise and small-amplitude phase jitter can also be applied to the training data.

[0109] 5. Phase sequence adjustment execution module 105:

[0110] This module is responsible for performing physical operations. It can be a high-voltage control unit separate from the main controller.

[0111] Receiving instructions: The module receives instructions from the control output module through the communication interface.

[0112] Driving Relays: The internal PLC or driver circuit interprets the instructions and outputs a control voltage to drive a specific industrial-grade high-power relay or solid-state switch array to close or open, for example, to swap phases B and C.

[0113] Status feedback: After execution is completed, the module can feedback the operation completion signal to the main control system to achieve closed-loop confirmation.

[0114] Through the collaborative work of the above modules, this system realizes the full process automation from signal acquisition to intelligent analysis and then to active closed-loop control, improving the reliability of phase sequence identification and the security of the power grid.

[0115] Example 3

[0116] This embodiment describes in detail the actual execution process of the method of the present invention in conjunction with a wind farm grid connection control application scenario.

[0117] Scenario description:

[0118] At a large wind farm, a 1.5MW wind turbine had its output-side B and C cables mistakenly swapped after annual maintenance. The turbine was about to be connected to the grid. The intelligent phase sequence identification system of the present invention was deployed before the turbine's grid-connected circuit breaker, serving as a last-ditch intelligent defense before grid connection.

[0119] Detailed application process:

[0120] After the wind turbine controller issues the "prepare for grid connection" command, the system begins to execute the following detailed steps:

[0121] 1. S101: Signal feature acquisition and preprocessing before grid connection

[0122] The system does not wait for the main circuit breaker to close. Instead, while the grid-connected circuit breaker is still open, it collects the "no-load" three-phase voltage signals generated by the inverter through a collection channel connected to the voltage transformer (PT). The sampling frequency is 25.6kHz, and 1024 points are collected per phase within a 0.04-second window.

[0123] The collected raw voltage waveform is fed into the DSP for processing. FFT analysis reveals that, in addition to the 50Hz fundamental, high-frequency harmonic components such as 5kHz and 7kHz are present, generated by the switching of the inverter's IGBTs. The preprocessing firmware resets the amplitudes of all harmonic components above 250Hz to zero, then reconstructs the waveform back into the time domain using IFFT. The resulting clean waveform sequence exhibits a distinct ACB phase sequence due to the reversed connection of phases B and C. Finally, these three waveforms are Z-score normalized to generate three normalized tensors of shape .

[0124] 2.S102: Real-time spatiotemporal feature extraction and abnormal relationship capture

[0125] These three normalized tensors are fed into the system's spatiotemporal feature extraction module 102 and passed through three 1D-CNN modules in parallel. After two levels of convolution and pooling, and finally global average pooling, three 128-dimensional deep temporal feature vectors are generated.

[0126] Next, these three vectors are stacked into a sequence and fed into a four-head self-attention module. When calculating the attention weights, the model discovers that the query vector Q_C, representing the features of phase C, pays unusually high attention to the key vector K_B, representing the features of phase B, while paying less attention to K_A than would be expected under a normal ABC phase sequence. The reverse is also true. This "misaligned" attention pattern is captured by all four attention heads. After multi-head concatenation and a final linear transformation, the model outputs a 384-dimensional spatiotemporal fusion feature vector. The numerical distribution of this vector differs significantly from the feature distribution of all normal (ABC) phase sequences learned during training.

[0127] 3.S103: Quantitative evaluation of abnormality

[0128] This 384-dimensional anomaly feature vector Z_ACB is fed into the pre-trained GAN anomaly detection module. First, the module finds the optimal mapping point z' for Z_ACB in the latent space through 100 iterations of gradient descent. Then, the generator G is used to reconstruct its "normalized" version G(z').

[0129] When calculating the reconstruction loss, L_R, because the generator has never learned the inverse order relationship represented by Z_ACB, the reconstruction differs significantly from the original input. The calculated value of L_R is 0.92. Simultaneously, the discriminant loss, L_D, also yields a high value of 0.65. According to the formula Anomaly_Score = 0.8 * L_R + 0.2 * L_D, the final calculated anomaly score is as high as 0.86, far exceeding the baseline of less than 0.1 during normal operation.

[0130] 4.S104: Immediate Decision-Making and Proactive Intervention

[0131] Judgment: The control unit compares the abnormality score of 0.86 with the preset threshold value of 0.4 and determines it as a serious abnormality.

[0132] Diagnosis: The system immediately halts the grid connection process and locks the grid-connected circuit breaker, preventing it from closing. Simultaneously, the feature vector Z_ACB is input into the diagnostic classifier. The classifier's softmax layer outputs the following probability distribution: [Positive: 0.01, Reverse: 0.99, Missing A: 0.0, Missing B: 0.0, Missing C: 0.0].

[0133] Control: Based on the diagnosis result of "reverse order", the system performs the following actions:

[0134] a. Send an emergency stop command to the fan main controller through the internal bus, along with the fault code "P-01: Phase Sequence Error".

[0135] b. Report a top-priority alarm to the wind farm's central monitoring center (SCADA system): "A phase sequence error (reverse sequence) was detected before wind turbine #17 was connected to the grid. It has been automatically locked. Please send personnel to check the B and C phase connections immediately!"

[0136] c. (In systems with automatic calibration hardware) Send control code 0xB1 to the PLC. The PLC activates the relay group to automatically and logically swap the B and C phase cables connected to the wind turbine output. After the swap is complete, the system automatically restarts the pre-grid connection test process.

[0137] To more intuitively illustrate the robustness advantage of the present invention in transient processes, please refer to Figure 5 . Figure 5 This is a comparative diagram, where the horizontal axis represents time (unit: second) and the vertical axis represents the normalized abnormality measurement value, which is used to show the response difference between the method of the present invention and the traditional method in a typical motor startup or new energy grid-connected transient process.

[0138] The graph contains three curves:

[0139] The red dashed line represents the "abnormal score of the present invention's method." As can be seen, during the 0.2- to 0.5-second period during which the transient occurs, the abnormal score calculated by the present invention exhibits only a smooth, small bump, with its peak value well below the threshold that could lead to misjudgment. This demonstrates that the present invention's spatiotemporal feature extraction model is able to deeply understand that this transient process represents normal dynamic behavior of the power grid, rather than a structural phase sequence error, and therefore exhibits extremely high stability.

[0140] The blue dashed line represents the "traditional slope change" method, which relies on detecting sudden changes in the waveform derivative (slope). At the initial stage of the transient (approximately 0.3 seconds), this method's measurement produces a sharp, intense spike, with an amplitude far exceeding normal levels. This is because the traditional method cannot distinguish between a transient impulse and a true fault, misinterpreting the transient as an anomaly.

[0141] The green dotted line represents the "traditional method false positive threshold." This is a fixed threshold used by traditional methods to determine if something is abnormal. As shown in the figure, the spike pulse from the traditional method easily exceeds this threshold.

[0142] In summary, Figure 5 The results show that under the same transient disturbance, traditional methods can generate erroneous alarms (i.e., false positives) due to their limitations, potentially leading to unnecessary downtime or manual intervention. In contrast, the proposed method, leveraging a deep learning model's profound understanding of waveform dynamics, effectively suppresses transient disturbances and accurately distinguishes normal dynamics from true faults, thus avoiding false positives. This demonstrates the proposed method's exceptional robustness and reliability under complex operating conditions.

[0143] Finally, in order to illustrate the complete closed-loop control process from detection to active correction of the present invention, Figure 6 The flowchart shows how the system can automatically diagnose and correct a typical "reverse sequence" fault when it detects it.

[0144] The process specifically includes the following steps:

[0145] The process begins when the system detects an abnormal state before grid connection, such as the starting node indicated by "actual phase sequence detected as ACB". This state is determined based on the abnormality score calculated in step S103 significantly exceeding the preset threshold.

[0146] Once an anomaly is identified, the system immediately passes the spatiotemporal fusion feature vector that caused the anomaly to the diagnostic classifier. As shown in the "Diagnostic Classifier Determines 'Reverse'" node in the figure, the classifier accurately identifies the anomaly as a "reverse" fault type based on the characteristics of the input vector.

[0147] Based on the "reverse sequence" diagnostic result, the control output module queries its internal "fault-action" mapping table and generates a clear, executable control instruction: "Generate control signal (switch phases B and C)." This signal is not just a simple alarm; it contains instructions for specific corrective actions.

[0148] This control signal is sent to the phase sequence adjustment execution module (for example, a PLC-controlled relay group). As shown in the "Drive Relays to Perform Swap" node in the figure, the execution module precisely drives the physical switch according to the command, swapping the electrical connections of phases B and C.

[0149] After the physical calibration is complete, the system's electrical connections are restored to the correct ABC phase sequence. At this point, the system performs a verification test. If the calculated anomaly score falls back to the normal range and below the threshold, the system state transitions to the final node, "Phase sequence restored to ABC," completing the closed-loop calibration process.

[0150] pass Figure 6The process shown in this paper demonstrates a complete closed-loop control capability, from intelligent perception and precise diagnosis to autonomous execution. It transforms passive fault alarms into active fault intervention and repair, significantly improving the system's automation level and fault handling efficiency, ensuring the safe and stable operation of the power system.

[0151] Through the above process, the present invention completes the entire process of detection, diagnosis, locking and alarm before the faulty wind turbine causes any actual impact on the large power grid. In contrast, the traditional method must wait for the circuit breaker to be closed and the reverse current to be injected before it can react. By then, the superior protection may have been triggered, causing economic losses and power grid disturbances. The present invention has achieved a leap from post-response to pre-prevention. Its high-precision and high-intelligence features have demonstrated obvious technical advantages in wind power grid-connected scenarios with extremely high requirements for power quality and operational reliability. As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, ordinary technicians in this field should understand that they can still modify the technical solutions recorded in the above embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for automatically identifying current phase sequence, characterized in that: The method comprises: Collecting the original time series signals of the three-phase current, and preprocessing the original time series signals to filter out high-order harmonic interference to obtain a pure current waveform sequence of each phase; The pure current waveform sequence is input into a preset spatiotemporal feature extraction model to generate a spatiotemporal fusion feature vector representing the current three-phase current state. The spatiotemporal feature extraction model is configured to: first, extract the time dimension features of each phase current waveform sequence through multiple parallel one-dimensional convolutional neural networks to obtain the deep time series features of each phase; then, fuse the deep time series features of each phase through an attention mechanism module to capture and quantify the dynamic correlation between the phases, thereby outputting the spatiotemporal fusion feature vector; The spatiotemporal fusion feature vector is input into a preset anomaly detection module based on a generative model to calculate an anomaly score that quantifies the current phase sequence state; the anomaly detection module is trained based on a large number of spatiotemporal fusion feature vectors under normal phase sequences and is used to evaluate the degree of deviation of the input vector from the normal state; Determine whether the abnormal score exceeds a preset abnormal threshold; if so, determine that the current phase sequence is abnormal, start the diagnostic classifier, determine the abnormal type of the phase sequence based on the time-space fusion feature vector, and generate a phase sequence adjustment control signal corresponding to the abnormal type for actively correcting the phase sequence of the power grid.

2. The method according to claim 1, characterized in that The attention mechanism module adopts the self-attention mechanism to map the deep temporal features of each phase into query, key, and value vectors respectively. The weight distribution between the phases is determined by calculating the dot product similarity between the query vector and all key vectors, and the value vectors are weighted summed to obtain an output that integrates global dependencies.

3. The method according to claim 1 or 2, characterized in that The anomaly detection module includes a generator and a discriminator; the calculation process of the anomaly score includes: using the trained generator to reconstruct the input spatiotemporal fusion feature vector, and calculating the reconstruction error between the input vector and the reconstructed vector, and using the reconstruction error as the anomaly score.

4. The method according to claim 1, wherein After determining that the current phase sequence is abnormal, the method further includes: Starting a preset diagnostic classifier to determine the abnormal type of the phase sequence according to the spatiotemporal fusion feature vector; And according to the abnormality type, the phase sequence adjustment control signal corresponding to each one is generated.

5. The method according to claim 4, characterized in that The diagnostic classifier is a multi-layer perceptron network, which is trained to map the input spatiotemporal fusion feature vector to a predefined phase sequence abnormality type set, which includes positive sequence, reverse sequence, phase A missing, phase B missing, and phase C missing.

6. The method according to claim 4, characterized in that Preprocessing the original time series signal includes: analyzing the signal spectrum using fast Fourier transform (FFT), setting the amplitude of harmonic components higher than a preset harmonic order to zero, and then reconstructing the pure current waveform sequence through inverse fast Fourier transform (IFFT).

7. A current phase sequence automatic identification system, characterized in that: The system comprises: The signal acquisition and preprocessing module is used to collect the original time series signals of the three-phase current, and preprocess the original time series signals to filter out high-order harmonic interference to obtain a pure current waveform sequence of each phase; A spatiotemporal feature extraction module is configured to input the pure current waveform sequence into a preset spatiotemporal feature extraction model to generate a spatiotemporal fusion feature vector representing the current three-phase current state. The spatiotemporal feature extraction model first extracts the time dimension features of each phase current through multiple one-dimensional convolutional neural networks in parallel to obtain the deep temporal features of each phase. The deep temporal features of each phase are then fused through an attention mechanism module to capture and quantify the dynamic correlation between the phases. An anomaly detection module, configured to input the spatiotemporal fusion feature vector into a preset generative adversarial network-based model to calculate an anomaly score that quantifies the current phase sequence state; The control output module is used to determine whether the abnormal score exceeds a preset abnormal threshold; if so, the current phase sequence is determined to be abnormal, and the diagnostic classifier is started to determine the abnormal type of the phase sequence based on the spatiotemporal fusion feature vector, and generate a phase sequence adjustment control signal corresponding to the abnormal type.

8. The system according to claim 7, characterized in that The attention mechanism module in the spatiotemporal feature extraction module adopts a self-attention mechanism to perform weighted fusion of the deep temporal features of each phase.

9. The system according to claim 7 or 8, characterized in that The anomaly detection module includes a generator and a discriminator, and obtains the anomaly score by calculating the reconstruction error between the input vector and the reconstructed vector output by the generator.

10. The system according to claim 7, wherein: The control output module also includes a pre-trained diagnostic classifier, which is configured to be activated when a phase sequence abnormality is determined, and is used to determine the specific phase sequence abnormality type based on the spatiotemporal fusion feature vector causing the abnormality, and generate a corresponding phase sequence adjustment control signal accordingly.

Citation Information

Patent Citations

  • Sewage treatment process abnormal working condition identification method and system based on deep neural network

    CN119691568A

  • Bioelectrical impedance lung cancer detection method based on artificial intelligence

    CN120296317A