Electric energy quality detection method and system based on big data
By improving the dual-stream cross-mixing mechanism and tensor low-rank reconstruction of the MLP-Mixer network, the problem of disturbance identification and response in multi-source heterogeneous environments in power quality detection is solved, achieving efficient disturbance identification and impact assessment, and improving the accuracy and interpretability of detection results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-24
- Publication Date
- 2026-04-10
AI Technical Summary
Existing power quality detection methods struggle to accurately identify and respond to disturbance events in multi-source heterogeneous environments. The lack of a unified clock reference makes it difficult to align the timing of multi-node sampling information. They also ignore the nonlinear coupling relationship between voltage, current, and frequency, fail to extract key features of disturbance evolution from a global perspective, and lack the ability to deeply model high-dimensional structures.
A dual-stream cross-mixing mechanism based on an improved MLP-Mixer network is adopted. By combining tensor low-rank reconstruction to extract spatial perturbation feature matrix and feature coupling representation matrix, a perturbation representation fusion tensor is constructed. Perturbation potential score is generated by cross-modeling of spatial path and feature path. The propagation trend is judged and the impact range is assessed by combining the perturbation memory vector.
It achieves high sensitivity in disturbance identification and clear source tracing logic, improves the interpretability and accuracy of detection results, and significantly enhances the accuracy of disturbance identification and the comprehensiveness of impact assessment in complex scenarios.
Smart Images

Figure CN121834604A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of power system monitoring, in particular to a power quality detection method and system based on big data. BACKGROUND
[0002] With the development of new power systems towards high proportion of new energy and high informationization, power quality problems are becoming increasingly complex, and traditional detection methods have been difficult to meet the needs of accurate identification and response of disturbance events in a multi-source heterogeneous environment. Existing power quality detection methods mostly rely on single-point monitoring and static threshold judgment, which are difficult to adapt to the actual situation of a large number of distributed nodes, large data volume and strong dynamic characteristics in modern power grids. The main problems are as follows: The monitoring data lacks a unified time reference, making it difficult to align the time sequence of multi-node sampling information, and unable to accurately track the disturbance process; traditional disturbance identification methods ignore the nonlinear coupling relationship between voltage, current and frequency, making it difficult to extract key features of disturbance evolution from a global perspective, affecting comprehensive identification of abnormal events; most methods do not have the ability to depict the history of disturbance response and the propagation path, making it impossible to infer the starting position and impact range of the disturbance, resulting in isolated results and delayed response; in the processing of multi-dimensional signals, existing models lack deep modeling capabilities for high-dimensional structures in feature extraction and channel mixing, and cannot fully exploit the potential of big data in power quality analysis.
[0003] Therefore, how to provide a power quality detection method and system based on big data is a problem that needs to be solved by those skilled in the art. SUMMARY
[0004] One object of the present application is to provide a power quality detection method and system based on big data. The present application introduces a double-flow cross-mixing mechanism based on an improved MLP-Mixer network, fuses a spatial disturbance feature matrix and a feature coupling representation matrix extracted by tensor low-rank reconstruction, constructs a disturbance representation fusion tensor, generates a disturbance potential score through cross-modeling of spatial paths and feature paths, and combines a disturbance memory vector for propagation trend judgment and impact range evaluation, having the advantages of sensitive disturbance identification, clear traceability logic and strong interpretability of detection results.
[0005] The power quality detection method based on big data according to an embodiment of the present application comprises the following steps: Step one: collecting power quality data of multiple monitoring nodes in a power system under a unified time reference to form an original data tensor; Step two: extracting disturbance response from the original data tensor, mapping the second-order response of each monitoring node after disturbance into a disturbance memory vector, and collecting to form a disturbance memory tensor and storing it in a disturbance memory pool; Step three: input the original data tensor into the improved MLP-Mixer network, which includes a spatial path and a feature path for performing patch mixing and channel mixing operations respectively to generate a disturbance representation fusion tensor; Step four: introduce a double-flow cross-mixing mechanism in the improved MLP-Mixer network, based on the disturbance representation fusion tensor, generate a disturbance potential score through cross modeling of the spatial path and the feature path; Step five: determine whether there is a disturbance risk according to the disturbance potential score, and output a preliminary detection result; Step six: trace the preliminary detection result in combination with the disturbance memory tensor to obtain a disturbance propagation trend; Step seven: according to the preliminary detection result and the disturbance propagation trend, evaluate the disturbance influence range, and output the power quality detection result.
[0006] Optionally, the step one is specifically: Collecting power quality data of multiple monitoring nodes in the power system, including substation feeder, user access point and distribution transformer, the power quality data including voltage, current and frequency; The sampling frequency of the power quality data is not less than 10 kHz, and the clock alignment of the data of each monitoring node is realized through a unified time synchronization protocol; Arrange the power quality data collected by each monitoring node in a set sampling time window in chronological order to construct an original data tensor.
[0007] Optionally, the step two is specifically: In a set time window, the voltage, current and frequency signals of each monitoring node in the original data tensor are subjected to disturbance detection, and the amplitude variation rate and frequency deviation rate of adjacent sampling points are calculated; When the amplitude variation rate exceeds the preset variation threshold or the frequency deviation rate exceeds the preset reference frequency deviation range, the sampling point is determined as a disturbance mutation point; Taking the disturbance mutation point as the center, the signal segments of a set time length before and after the disturbance mutation point are respectively taken as the pre-disturbance baseline segment and the post-disturbance response segment, and the post-disturbance response segment is subjected to second-order difference operation to extract the second-order response features of the monitoring node in the disturbance process; The second-order response features are subjected to time decay weighting processing, specifically: according to the time interval after the disturbance, each sampling point is assigned a time decay weight coefficient, the time decay weight coefficient and the time interval of the sampling point are inversely related, the shorter the time interval, the greater the weight coefficient, and the longer the time interval, the smaller the weight coefficient, so as to highlight the contribution of the initial disturbance features and suppress the influence of noise in the later period; The second-order response features after time decay weighting processing are summed and normalized in time sequence to obtain a disturbance memory vector of the monitoring node identifying the disturbance mutation point; if the monitoring node does not identify the disturbance mutation point within the set time window, the corresponding disturbance memory vector is set as a zero vector, and the disturbance memory vectors are aggregated according to node indexes to form a disturbance memory tensor, which is stored in a disturbance memory pool.
[0008] Optionally, the step three is specifically: The original data tensor is divided into disturbance input blocks according to a unified time window, each disturbance input block including voltage, current and frequency sampling sequences of the monitoring node in a time period; each disturbance input block is encoded with node index and time position, and is input into the improved MLP-Mixer network for processing; The improved MLP-Mixer network includes two main structures of a spatial path and a feature path, the spatial path performing patch mixing operation, and the feature path performing channel mixing operation; The patch mixing operation specifically includes: constructing a node feature matrix for data of different monitoring nodes in the same time step, introducing a tensor low-rank reconstruction algorithm to perform high-dimensional structure decomposition and compression reconstruction on the node feature matrix to obtain a spatial disturbance feature matrix between monitoring nodes; The channel mixing operation specifically includes: extracting a rate of change, an amplitude offset and a fluctuation feature for time sequence data of voltage, current and frequency in the same monitoring node, stacking the multi-dimensional feature vectors in the channel direction to obtain a feature coupling representation matrix in the monitoring node; The spatial disturbance feature matrix and the feature coupling representation matrix are fused and spliced in the node index dimension to obtain a disturbance representation fusion tensor.
[0009] Optionally, the tensor low-rank reconstruction algorithm is introduced to perform high-dimensional structure decomposition and compression reconstruction on the node feature matrix to obtain a spatial disturbance feature matrix between monitoring nodes, specifically: The node feature matrix is taken as input data, the node feature matrix taking monitoring nodes as row dimension and voltage, current and frequency power quality features as column dimension, representing power quality states of each monitoring node in the same time step; A tensor low-rank reconstruction algorithm based on Tucker decomposition is adopted to embed and expand the node feature matrix into a three-order tensor through dimension lifting, and the three-order tensor is unfolded into two matrices along the node dimension and the feature dimension to obtain a node dimension unfolding matrix and a feature dimension unfolding matrix; The node dimension unfolding matrix is subjected to matrix singular value decomposition, and the node dimension unfolding matrix is expressed as a product of a left singular matrix, a singular value diagonal matrix and a right singular matrix; performing independent matrix singular value decomposition on the matrix of the feature dimension to obtain another group of left singular matrix, singular value diagonal matrix and right singular matrix; extracting the two groups of singular value vectors, summing singular value squares of each group and calculating cumulative energy proportion, and determining target low rank dimension K of node dimension and target low rank dimension M of feature dimension when the cumulative energy proportion first exceeds the set energy threshold; retaining the first K and the first M singular values and corresponding singular vectors, and respectively constructing orthogonal factor matrices of node dimension direction and feature dimension direction; performing tensor product of the original third-order tensor and the transpose of the orthogonal factor matrix of the node dimension direction to act on the node dimension, realizing feature compression of the original data in the spatial distribution direction; and performing tensor product of the original third-order tensor and the transpose of the orthogonal factor matrix of the feature dimension direction to act on the feature dimension, realizing principal component extraction of the power quality feature direction, and obtaining a low rank core tensor representing the main structure mode of the disturbance; performing tensor product operation of the orthogonal factor matrices of the node dimension direction and the feature dimension direction and the low rank core tensor respectively, simultaneously completing information restoration in the node dimension and the feature dimension, and obtaining a spatial disturbance feature matrix with stable structure and compressed dimension.
[0010] Optionally, the step four is specifically: inputting the disturbance representation fusion tensor into the spatial path and the feature path for parallel processing, the spatial path taking the monitoring node dimension as the processing axis, mapping the disturbance distribution relationship between nodes through the row-by-row multilayer perceptron; the feature path taking the voltage, current and frequency feature dimension as the processing axis, mapping the combination relationship between various power quality features through the column-by-column multilayer perceptron; after completing the respective mixing operations of the spatial path and the feature path in each processing layer, performing linear mapping on the output result of the spatial path along the node dimension direction to obtain the spatial path intermediate representation consistent with the input dimension of the feature path, and adding the spatial path intermediate representation as a residual signal to the input of the next layer of the feature path; at the same time, performing linear mapping on the output result of the feature path along the feature dimension direction to obtain the feature path intermediate representation consistent with the input dimension of the spatial path, and adding the feature path intermediate representation as a residual signal to the input of the next layer of the spatial path; after completing the cross modeling of all processing layers, extracting the embedding representation of each monitoring node from the output of the last layer of the spatial path, mapping the embedding representation to a one-dimensional disturbance response intensity value through a fully connected layer, and performing nonlinear compression through a Sigmoid activation function, and finally obtaining the disturbance potential score of each monitoring node.
[0011] Optionally, the step five is specifically: comparing the disturbance potential score with a preset disturbance identification threshold, when the disturbance potential score of the monitoring node is higher than the preset disturbance identification threshold, determining that the monitoring node has a disturbance risk, and generating a preliminary detection result; The preliminary detection result includes the node number, occurrence time, disturbance potential score and abnormal type of the node with a disturbance risk, and the abnormal type includes voltage step change, current sudden change and frequency deviation.
[0012] Optionally, the step six is specifically: The disturbance memory vector corresponding to the monitoring node with a disturbance risk in the preliminary detection result is taken as a target vector of the current disturbance, the historical disturbance memory vectors of other monitoring nodes are extracted from the disturbance memory tensor to construct a candidate vector set; The similarity score between the target vector of the current disturbance and each candidate vector is calculated by using cosine similarity, and according to the size of the similarity score, in combination with the relative order of each disturbance memory vector in time, the propagation path of the disturbance signal between the monitoring nodes is speculated, and the disturbance propagation trend reflecting the starting position and propagation direction of the disturbance is output.
[0013] Optionally, the step seven is specifically: According to the monitoring node marked as having a disturbance in the preliminary detection result, in combination with the propagation path recorded in the disturbance propagation trend, all monitoring nodes affected by the disturbance are identified; The number of nodes affected by the disturbance is counted, and the maximum disturbance potential score and the corresponding node number are extracted; The starting node of the disturbance, the number of affected nodes, the maximum disturbance potential score and the corresponding node number are taken as the power quality detection result.
[0014] The power quality detection system based on big data according to the embodiment of the application includes the following modules: A data acquisition module is configured to acquire power quality data of a plurality of monitoring nodes in a power system under a unified time reference, and construct an original data tensor; A disturbance response extraction module is configured to calculate the second-order response of the monitoring nodes after a disturbance based on the original data tensor, generate a disturbance memory vector, and aggregate to form a disturbance memory tensor, which is stored in a disturbance memory pool; A disturbance modeling module is configured to input the original data tensor into an improved MLP-Mixer network, the improved MLP-Mixer network including a spatial path and a feature path, respectively configured to perform patch mixing and channel mixing operations, and generate a disturbance feature fusion tensor; A double-flow cross mixing module is used to introduce a double-flow cross modeling mechanism of spatial paths and feature paths in the improved MLP-Mixer network, to perform multi-layer cross fusion, and to generate disturbance potential scores of each monitoring node based on the output of the last layer of the spatial path. A disturbance detection module is used to compare the disturbance potential scores with a preset disturbance identification threshold, to determine whether there is a disturbance risk, and to output a preliminary detection result. A traceability analysis module is used to combine the disturbance memory tensor, to use the cosine similarity and response time sequence analysis method to perform traceability judgment on the preliminary detection result, and to output a disturbance propagation trend. An influence evaluation module is used to combine the preliminary detection result and the disturbance propagation trend, to evaluate the disturbance influence range, to count the number of affected nodes, and to output the power quality detection result.
[0015] The present application has the following advantages: The present application constructs an improved MLP-Mixer network that fuses tensor low-rank reconstruction and double-flow cross mixing mechanism, and proposes to use the original data tensor collected in a unified time base as input, to use the dimensionality reduction algorithm based on Tucker decomposition, to extract disturbance principal components through node dimension and feature dimension singular value decomposition in the Patch mixing structure, and to construct a low-rank core tensor to compress and retain the disturbance structure, and to improve the stability of spatial modeling. In the channel feature modeling process, the disturbance response second-order difference and time decay weighting are introduced to generate a disturbance memory vector, forming a disturbance memory tensor, solving the problem of ignoring historical dynamics in traditional methods. The node-feature cross residual mapping is introduced between the spatial path and the feature path of the multi-layer perceptron, realizing the information interaction and fusion modeling of multi-dimensional disturbance features, and obtaining the disturbance potential scores of each node through full connection and Sigmoid activation in the last layer output. Combined with the historical response vector recorded in the disturbance memory tensor, the cosine similarity and time sequence information are used to infer the disturbance starting position and propagation path, and finally realize the disturbance range evaluation and power quality detection result output, significantly improving the accuracy of disturbance identification, the reliability of starting tracking and the comprehensiveness of influence evaluation in complex scenarios. BRIEF DESCRIPTION OF DRAWINGS
[0016] The accompanying drawings are included to provide a further understanding of the application, and constitute a part of the specification, together with the embodiments of the application, to explain the application, and do not constitute a limitation on the application. In the drawings: Figure 1 The overall flowchart of the power quality detection method based on big data proposed by the present application; Figure 2 The structure schematic diagram of the power quality detection system based on big data proposed by the present application. Detailed Implementation
[0017] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0018] refer to Figure 1 The power quality detection method based on big data includes the following steps: Step 1: Collect power quality data from multiple monitoring nodes in the power system under a unified time reference to form the raw data tensor; Step 2: Extract the perturbation response from the original data tensor, map the second-order response of each monitoring node after the perturbation to a perturbation memory vector, summarize them to form a perturbation memory tensor and store it in the perturbation memory pool; Step 3: Input the original data tensor into the improved MLP-Mixer network. The improved MLP-Mixer network includes a spatial path and a feature path, which are used to perform Patch mixing and Channel mixing operations, respectively, to generate a perturbation representation fusion tensor. Step 4: The improved MLP-Mixer network introduces a dual-stream cross-mixing mechanism. Based on the perturbation representation fusion tensor, the perturbation potential score is generated through the cross-modeling of the spatial path and the feature path. Step 5: Determine whether there is a disturbance risk based on the disturbance potential score, and output the preliminary detection results; Step Six: Combine the perturbation memory tensor to perform source tracing judgment on the preliminary detection results and obtain the perturbation propagation trend; Step 7: Based on the preliminary detection results and the disturbance propagation trend, assess the scope of the disturbance impact and output the power quality detection results.
[0019] In this embodiment, step one specifically includes: The system collects power quality data from multiple monitoring nodes in the power system, including substation feeders, user access points, and distribution transformers. The power quality data includes voltage, current, and frequency. The sampling frequency of the power quality data is not less than 10kHz, and clock alignment of the data of each monitoring node is achieved through a unified time synchronization protocol. The power quality data collected by each monitoring node within a set sampling time window are arranged in chronological order to construct the original data tensor, which is represented as [number of nodes, time series length, feature dimension], where the feature dimension is 3.
[0020] In this embodiment, step two specifically includes: Within a set time window, disturbance detection is performed on the voltage, current and frequency signals of each monitoring node in the original data tensor, and the amplitude variation rate and frequency offset rate of adjacent sampling points are calculated; When the amplitude variation rate exceeds a preset variation threshold or the frequency offset rate exceeds a preset reference frequency deviation range, the sampling point is determined as a disturbance mutation point; The signal segments of a set time length before and after the disturbance mutation point are respectively taken as a pre-disturbance baseline segment and a post-disturbance response segment, second-order difference operation is performed on the post-disturbance response segment, and second-order response characteristics of the monitoring node in the disturbance process are extracted; In the present application, the second-order response characteristics refer to the second-order change trend of each monitoring node within a short time after a disturbance event occurs in the power grid, which is specifically embodied in the nonlinear fluctuation mode of the voltage, current and frequency signals in the post-disturbance response segment, and not only reflects the direct influence of the disturbance on a single physical quantity, but also reveals the coupling response relationship between different power quality parameters.
[0021] Specifically, the voltage may exhibit overshoot, subsidence or oscillation after the disturbance occurs, and the change trend may still exhibit an increasing or decreasing trend after the first-order change, and the second-order change can reflect whether the fluctuation is persistent or restorative; the current response usually changes synchronously with the voltage, but the response amplitude and phase may be different under the influence of load coupling, inductance / capacitance network and other structures, and the second-order response reveals the inertia or acceleration response of the current to the disturbance; as an indicator of the overall stability of the system, the frequency may not fluctuate obviously at the initial stage of the disturbance, but will slowly deviate due to energy imbalance or control lag, and the second-order characteristics are helpful for capturing the evolution path of the frequency deviation trend.
[0022] To extract the above-mentioned second-order response characteristics, the present application performs second-order difference operation on the voltage, current and frequency signals in the post-disturbance response segment, that is, based on the numerical values of the consecutive sampling points, the change rate of the change rate is calculated to obtain the acceleration response trend of each physical quantity under the action of the disturbance, and the second-order difference results are synchronized, fused and normalized on a unified time axis to construct a multi-dimensional second-order response vector reflecting the disturbance response intensity, persistence and coupling characteristics between multiple quantities; The second-order response characteristics are subjected to time decay weighting processing, specifically: according to the time interval after the disturbance occurs, a time decay weight coefficient is assigned to each sampling point, the time decay weight coefficient is inversely proportional to the time interval of the sampling point, the weight coefficient is larger when the time interval is shorter, and the weight coefficient is smaller when the time interval is longer, so as to highlight the contribution of the initial stage characteristics and suppress the influence of the noise in the later stage; The second-order response features after all time attenuation weighting processing are summed and normalized in time sequence to obtain a disturbance memory vector of a monitoring node identifying a disturbance mutation point; if the monitoring node does not identify a disturbance mutation point within a set time window, the corresponding disturbance memory vector is set as a zero vector, and is aggregated according to a node index to form a disturbance memory tensor, which is stored in a disturbance memory pool.
[0023] In the embodiment, the step three is specifically: The original data tensor is divided into disturbance input blocks according to a unified time window, each disturbance input block including voltage, current and frequency sampling sequences of the monitoring node in a time period; each disturbance input block is encoded with node index and time position, and is input into the improved MLP-Mixer network for processing; The improved MLP-Mixer network includes two main structures of a spatial path and a feature path, the spatial path performing a Patch mixing operation, and the feature path performing a Channel mixing operation; The Patch mixing operation specifically includes: for data of different monitoring nodes in the same time step, a node feature matrix is constructed, a tensor low-rank reconstruction algorithm is introduced to perform high-dimensional structure decomposition and compression reconstruction on the node feature matrix, and a spatial disturbance feature matrix between the monitoring nodes is obtained; The Channel mixing operation specifically includes: for time sequence data of voltage, current and frequency in the same monitoring node, a rate of change, an amplitude offset and a fluctuation feature are extracted, a multi-dimensional feature vector is stacked in a channel direction, and a feature coupling representation matrix in the monitoring node is obtained through linear mapping; The spatial disturbance feature matrix and the feature coupling representation matrix are fused and spliced in the node index dimension to obtain a disturbance representation fusion tensor; In the present application, in order to fully exert the advantages of the MLP-Mixer network architecture in modeling the decoupling of spatial and channel features, a structure mapping mechanism is proposed to convert the three-dimensional structure of the original data tensor [number of nodes, time sequence length, feature dimension] in power quality detection into the Patch and Channel input mode suitable for the MLP-Mixer network. Specifically, by setting a unified time window, the voltage, current and frequency signals of each monitoring node are input as channel features of a single Patch, and the signal blocks of multiple monitoring nodes in the same time step are constructed into a Patch sequence, thereby completing the mapping of the physical tensor to the network structure tensor, which not only ensures the structural integrity of the original power physical signals in time sequence and space, but also adapts the efficient representation ability of the MLP-Mixer network verified in the image field.
[0024] In the embodiment, the introduction tensor low-rank reconstruction algorithm decomposes and compresses the node feature matrix in high dimension, to obtain the spatial disturbance feature matrix between monitoring nodes, specifically: The node feature matrix is taken as input data, and the node feature matrix is represented as the power quality state of each monitoring node at the same time step, with monitoring nodes as row dimensions and voltage, current and frequency power quality features as column dimensions; The tensor low-rank reconstruction algorithm based on Tucker decomposition is adopted to expand the node feature matrix into a three-order tensor through dimension embedding, to obtain a node dimension expansion matrix and a feature dimension expansion matrix by unfolding the three-order tensor along the node dimension and the feature dimension; The matrix singular value decomposition is performed on the node dimension expansion matrix, and the node dimension expansion matrix is expressed as the product of a left singular matrix, a singular value diagonal matrix and a right singular matrix; The independent matrix singular value decomposition is performed on the feature dimension expansion matrix, to obtain another group of left singular matrix, singular value diagonal matrix and right singular matrix; The two groups of singular value vectors are extracted, the sum of squares of singular values of each group is calculated, and the cumulative energy ratio is calculated. When the cumulative energy ratio first exceeds the set energy threshold, the target low-rank dimension K of the node dimension and the target low-rank dimension M of the feature dimension are determined respectively; The first K and the first M singular values and the corresponding singular vectors are retained, and the orthogonal factor matrices in the node dimension direction and the feature dimension direction are constructed respectively. The orthogonal factor matrices represent the main projection axis of the disturbance response in the spatial distribution in the node dimension direction, and represent the main change mode of the disturbance feature in the feature dimension direction; Specifically, after performing the singular value decomposition of the node dimension and feature dimension expansion matrix, the left singular matrix, singular value diagonal matrix and right singular matrix are obtained respectively. To construct the orthogonal factor matrices in the node dimension direction and the feature dimension direction, first, the singular values are arranged in descending order according to the size, and the first K and the first M main singular values are extracted as the low-rank representation basis representing the main disturbance energy of the node dimension and the feature dimension respectively. Then, the left singular vectors corresponding to the retained singular values are intercepted to form the orthogonal basis matrix in the node dimension direction, denoted as ; the corresponding right singular vectors are intercepted to form the orthogonal basis matrix in the feature dimension direction, denoted as The above two orthogonal basis matrices form a column vector group in the corresponding dimension respectively, and each column vector corresponds to an orthogonal projection direction of the main component of the disturbance, ensuring that the signal feature maintains linear independence and orthogonality while compressing the representation of the spatial disturbance structure; The left singular matrix of the node dimension expansion matrix is extracted to obtain the orthogonal factor matrix of the node dimension direction, and the right singular matrix of the feature dimension expansion matrix is extracted to obtain the orthogonal factor matrix of the feature dimension direction, which are used as orthogonal mapping bases in the tensor low-rank reconstruction process and participate in the construction of the core tensor and the compressed representation of the disturbance feature. The original third-order tensor is multiplied by the transpose of the orthogonal factor matrix of the node dimension direction to act on the node dimension, so as to realize the feature compression of the original data in the spatial distribution direction; and the original third-order tensor is multiplied by the transpose of the orthogonal factor matrix of the feature dimension direction to act on the feature dimension, so as to realize the principal component extraction of the power quality feature direction, and obtain a low-rank core tensor representing the main structure mode of the disturbance. The orthogonal factor matrices of the node dimension direction and the feature dimension direction are respectively multiplied by the low-rank core tensor to simultaneously complete information restoration in the node dimension and the feature dimension, so as to obtain a spatial disturbance feature matrix with compressed dimension but stable structure.
[0025] In the embodiment, the step four is specifically: The disturbance representation fusion tensor is input into the spatial path and the feature path for parallel processing, the spatial path takes the monitoring node dimension as the processing axis, and the disturbance distribution relationship between nodes is mapped through the row-by-row multilayer perceptron; the feature path takes the voltage, current and frequency feature dimension as the processing axis, and the combination relationship between various power quality features is mapped through the column-by-column multilayer perceptron. After completing the respective mixing operations of the spatial path and the feature path at each processing layer, the output result of the spatial path is linearly mapped along the node dimension direction to obtain a spatial path intermediate representation consistent with the input dimension of the feature path, and the spatial path intermediate representation is added as a residual signal to the input of the next layer of the feature path; at the same time, the output result of the feature path is linearly mapped along the feature dimension direction to obtain a feature path intermediate representation consistent with the input dimension of the spatial path, and the feature path intermediate representation is added as a residual signal to the input of the next layer of the spatial path, so as to realize the bidirectional cross-fusion of the two paths between layers. Through the cross-modeling process of multiple iterations, the spatial path gradually introduces the local disturbance coupling information in the feature path, and the feature path gradually absorbs the node-related features in the spatial path, so as to realize the synchronous dynamic modulation of the node and the feature in two dimensions. After completing the cross-modeling at all processing layers, the embedding representation of each monitoring node is extracted from the output of the last layer of the spatial path, the embedding representation is mapped to a one-dimensional disturbance response intensity value through a fully connected layer, and is nonlinearly compressed through a Sigmoid activation function, so as to finally obtain the disturbance potential score of each monitoring node. In the double-flow cross-mixing mechanism, the spatial path is always modeled around the node dimension, each layer integrates the disturbance mode feedback information from the feature path, and the representation ability of the node to the overall disturbance feature is strengthened layer by layer. The output of the last layer of the spatial path has fully integrated the local disturbance feature and the global structure information, and the embedding representation formed can accurately reflect the participation degree and response intensity of each monitoring node in the whole disturbance process, has good discriminability and distinguishability, and is used to generate the disturbance potential score, which not only maintains spatial consistency, but also improves the effectiveness of abnormal node identification.
[0026] In the embodiment, step five is specifically: The disturbance potential score is compared with a preset disturbance identification threshold value, when the disturbance potential score of the monitoring node is higher than the preset disturbance identification threshold value, it is determined that the monitoring node has a disturbance risk, and a preliminary detection result is generated; The preliminary detection result includes the node number, occurrence time, disturbance potential score and abnormal type of the node with disturbance risk. The abnormal type includes voltage sudden change, current sudden change and frequency deviation.
[0027] In the embodiment, step six is specifically: The disturbance memory vector corresponding to the monitoring node with disturbance risk in the preliminary detection result is taken as the target vector of the current disturbance, the historical disturbance memory vectors of other monitoring nodes are extracted from the disturbance memory tensor to construct a candidate vector set; The similarity score between the target vector of the current disturbance and each candidate vector is calculated by using cosine similarity, and according to the size of the similarity score, in combination with the relative order of each disturbance memory vector in time, the propagation path of the disturbance signal between the monitoring nodes is speculated, and the disturbance propagation trend reflecting the starting position and propagation direction of the disturbance is output; Specifically, first, the disturbance memory vectors corresponding to the multiple monitoring nodes determined to have disturbance risk in the preliminary detection result are extracted, and the similarity between the disturbance memory vectors of the monitoring nodes and other nodes is calculated. The similarity uses cosine similarity as a measurement index to measure the direction consistency of the disturbance responses of two nodes in the feature space. The closer the value is to 1, the more similar the disturbance response modes of the two nodes are, and the stronger the correlation possibility is.
[0028] After obtaining the pairwise similarity scores of the disturbance memory vectors between the nodes, the response time difference of different nodes is compared by combining the time positions of the disturbance memory vectors of the nodes in the original tensor, i.e. the sampling time corresponding to the disturbance mutation point. If the cosine similarity of the disturbance memory vector of monitoring node A and the disturbance memory vector of monitoring node B is greater than a set similarity threshold value, and the disturbance time corresponding to monitoring node A is earlier than that of monitoring node B, it is speculated that the disturbance may propagate from monitoring node A to monitoring node B.
[0029] Through the above similarity-time sequence joint analysis method, a set of directed association edges can be established between multiple disturbance nodes, and a disturbance propagation graph is formed. In the disturbance propagation graph, the starting node corresponds to the monitoring location where the disturbance event first occurs, and the connected monitoring nodes form a propagation path in order of response time and similarity. The final output disturbance propagation trend information includes the disturbance starting node number, the node sequence on the propagation link, and the corresponding time sequence, which can clearly reflect the diffusion direction and impact range of the disturbance in the power grid.
[0030] In the embodiment, the step seven is specifically: According to the monitoring nodes marked as existing disturbances in the preliminary detection result, in combination with the propagation path recorded in the disturbance propagation trend, all monitoring nodes affected by the disturbance are identified; The number of nodes affected by the disturbance is counted, and the maximum disturbance potential score and the corresponding node number are extracted; The disturbance starting node, the number of affected nodes, the maximum disturbance potential score and the corresponding node number are output as the power quality detection result.
[0031] Reference Figure 2 , the power quality detection system based on big data includes the following modules: A data acquisition module is used to acquire power quality data of multiple monitoring nodes in a power system under a unified time reference, and to construct an original data tensor; A disturbance response extraction module is used to calculate the second-order response of the monitoring nodes after the disturbance based on the original data tensor, generate a disturbance memory vector, and aggregate to form a disturbance memory tensor, which is stored in a disturbance memory pool; A disturbance modeling module is used to input the original data tensor into an improved MLP-Mixer network, which includes a spatial path and a feature path for performing patch mixing and channel mixing operations, respectively, to generate a disturbance representation fusion tensor; A dual-flow cross-mixing module is used to introduce a dual-flow cross-modeling mechanism of the spatial path and the feature path in the improved MLP-Mixer network, perform multi-layer cross-fusion, and generate disturbance potential scores of each monitoring node based on the last layer output of the spatial path; A disturbance detection module is used to compare the disturbance potential scores with a preset disturbance identification threshold to determine whether there is a disturbance risk, and to output a preliminary detection result; A traceability analysis module is used to combine the disturbance memory tensor and use the cosine similarity and response time sequence analysis method to perform traceability judgment on the preliminary detection result, and to output a disturbance propagation trend; An impact assessment module is configured to combine the preliminary detection result with the disturbance propagation trend, assess the disturbance impact range, count the number of affected nodes, and output the power quality detection result. Embodiments
[0032] To verify the feasibility of the application in implementation, the application is applied to the operation monitoring scene of a medium-voltage power distribution system in a certain regional power grid. The system covers multiple transformer substation feeder lines, user access points, and power distribution transformer monitoring nodes, totaling 96 power quality monitoring terminals, covering typical load types in urban areas and industrial parks, including high-energy-consuming enterprises, residential areas, and office buildings. The monitoring terminals continuously collect voltage, current, and frequency data at a sampling frequency of 10 kHz, and realize data synchronization through a unified time mechanism to build an original data tensor for disturbance detection and modeling analysis.
[0033] In this experiment, the system runs continuously for 48 hours, and the total amount of raw data processed is about 248 GB. First, the disturbance response extraction module of the application is used to identify disturbances in the original data tensor, successfully detecting 16 disturbance mutation events. Then, the system inputs the processed data into the improved MLP-Mixer network to complete node disturbance structure modeling and feature coupling modeling in the spatial path and feature path, respectively. In the network structure, Tucker decomposition is used to perform tensor dimensioning and low-rank reconstruction processing on the node feature matrix, and the extracted spatial disturbance feature matrix clearly shows the energy distribution and local similarity of the disturbance among nodes. By introducing a double-flow cross-mixing mechanism, information injection between the feature path and the spatial path is realized in each layer, making the network have stronger modeling capability at multiple scales. In actual modeling, compared with the model without the cross-mechanism, the average prediction error of the disturbance potential score decreases by 18.2%, especially at the edge nodes.
[0034] To further verify the effectiveness of disturbance identification and propagation trend analysis, the system compares the detected disturbance potential score with the set threshold to output the preliminary detection result.
[0035] In the impact range assessment stage, the preliminary detection result is traced back to the disturbance memory tensor to obtain the disturbance propagation trend; according to the preliminary detection result and the disturbance propagation trend, the disturbance impact range is assessed, and the power quality detection result is output, including the disturbance starting node, the number of affected nodes, the maximum disturbance potential score, and the corresponding node number, which provides a key reference for fault isolation and protection strategies. To more intuitively show the detection effect of the application, the following is a partial disturbance event detection data summary table.
[0036] Table 1 Partial disturbance event detection data summary table Disturbance Number Starting Node First Detection Node Maximum Score Node Disturbance Propagation Path Number of Affected Nodes Maximum Potential Score Out-of-limit Indicator Type D001 Node_53 Node_57 Node_59 Node_53→55→56→57→58→59 12 0.92 Voltage Drop D002 Node_12 Node_13 Node_17 Node_12→13→15→17 7 0.78 Current Rise D003 Node_41 Node_44 Node_46 Node_41→42→44→45→46 9 0.84 Frequency Offset D004 Node_08 Node_08 Node_10 Node_08→09→10 4 0.69 Current Drop D005 Node_30 Node_33 Node_35 Node_30→32→33→35 6 0.81 Voltage Rise According to the disturbance detection results in the above table 1, it can be seen that the method of the application can effectively identify multiple types of power disturbance events and accurately output their propagation path and influence range. Taking disturbance number D001 as an example, the disturbance starts from Node_53 and propagates to Node_59 along the path, with a cumulative number of affected nodes reaching 12, a maximum disturbance potential score of 0.92, and an out-of-limit index type of voltage drop, indicating that the disturbance has a wide propagation range, high intensity, and poses a significant threat to system stability. In D002 and D003, although the propagation path is relatively short, the number of affected nodes is 7 and 9 respectively, but different types of disturbance characteristics (current rise and frequency shift) are identified, demonstrating the method's ability to identify multiple types of disturbance signals. D004 and D005 have smaller disturbance ranges, with 4 and 6 affected nodes respectively, and relatively low disturbance potential scores, indicating that the method can distinguish between disturbance intensities.
[0037] In this embodiment, by constructing an improved MLP-Mixer network and fusing the disturbance memory tensor, the recognition accuracy and spatial tracing ability of the power disturbance event are effectively improved. Through the double-flow cross-mixing mechanism, the spatial distribution information and power quality characteristics between monitoring nodes are cooperatively modeled, enhancing the model's ability to perceive complex disturbance patterns. At the same time, the introduction of the tensor low-rank reconstruction method performs well in feature compression and fidelity, significantly improving the accuracy and robustness of disturbance detection, and ultimately enabling accurate judgment of the disturbance starting location, propagation path, and influence range, providing strong data support and decision-making basis for power grid operation safety and energy efficiency management.
[0038] The above describes only the preferred specific embodiments of the application, but the protection scope of the application is not limited thereto. Any skilled person in the art, according to the technical solution and inventive concept of the application, can make equivalent replacements or changes within the technical scope disclosed by the application, which should be covered within the protection scope of the application.
Claims
1. A power quality detection method based on big data, characterized in that, The method comprises the following steps: Step one: collecting power quality data of multiple monitoring nodes in a power system under a unified time reference to form an original data tensor; Step two: extracting disturbance response from the original data tensor, mapping the second-order response of each monitoring node after disturbance into a disturbance memory vector, and collecting to form a disturbance memory tensor and storing in a disturbance memory pool; Step three: inputting the original data tensor into an improved MLP-Mixer network, which includes a spatial path and a feature path for performing patch mixing and channel mixing operations respectively to generate a disturbance representation fusion tensor; Step four: introducing a double-flow cross-mixing mechanism in the improved MLP-Mixer network, generating a disturbance potential score based on the disturbance representation fusion tensor through cross modeling of the spatial path and the feature path; Step five: determining whether there is a disturbance risk according to the disturbance potential score, and outputting a preliminary detection result; Step six: combining the disturbance memory tensor to trace the preliminary detection result to obtain a disturbance propagation trend; Step seven: evaluating the disturbance influence range according to the preliminary detection result and the disturbance propagation trend, and outputting the power quality detection result.
2. The big data based power quality detection method according to claim 1, wherein, The step one is specifically: Collecting power quality data of multiple monitoring nodes including substation feeder, user access point and distribution transformer in a power system, the power quality data including voltage, current and frequency; The sampling frequency of the power quality data is not less than 10 kHz, and the clock alignment of the data of each monitoring node is realized through a unified time synchronization protocol; Arranging the power quality data collected by each monitoring node in a set sampling time window in time sequence to construct an original data tensor.
3. The big data based power quality detection method according to claim 1, wherein, The step two is specifically: In a set time window, the voltage, current and frequency signals of each monitoring node in the original data tensor are subjected to disturbance detection, and the amplitude change rate and frequency offset rate of adjacent sampling points are calculated; When the amplitude change rate exceeds a preset change threshold or the frequency offset rate exceeds a preset reference frequency deviation range, the sampling point is determined as a disturbance mutation point; Taking the disturbance mutation point as the center, the signal segments of a set time length before and after the center are respectively taken as the pre-disturbance baseline segment and the post-disturbance response segment, and the post-disturbance response segment is subjected to second-order difference operation to extract the second-order response characteristics of the monitoring node in the disturbance process; The second-order response characteristics are subjected to time decay weighting processing, specifically: according to the time interval after the disturbance, a time decay weight coefficient is assigned to each sampling point, and the time decay weight coefficient is inversely proportional to the time interval of the sampling point; Summing and normalizing all the second-order response characteristics subjected to time decay weighting processing in time sequence to obtain the disturbance memory vector of the monitoring node where the disturbance mutation point is identified; if no disturbance mutation point is identified in the set time window, the corresponding disturbance memory vector is set as a zero vector, and the disturbance memory tensor is collected according to the node index and stored in the disturbance memory pool.
4. The big data based power quality detection method of claim 1, wherein, The step three is specifically: The original data tensor is divided into disturbance input blocks according to a unified time window, each disturbance input block including voltage, current and frequency sampling sequences of a monitoring node in a time period; each disturbance input block is coded with node index coding and time position coding, and is input into the improved MLP-Mixer network for processing; The improved MLP-Mixer network includes two main structures of a spatial path and a feature path, the spatial path performing Patch mixing operation, and the feature path performing Channel mixing operation; The Patch mixing operation specifically includes: for data of different monitoring nodes in the same time step, a node feature matrix is constructed, a tensor low-rank reconstruction algorithm is introduced to perform high-dimensional structure decomposition and compression reconstruction on the node feature matrix, and a spatial disturbance feature matrix between monitoring nodes is obtained; The Channel mixing operation specifically includes: for time sequence data of voltage, current and frequency in the same monitoring node, a rate of change, an amplitude offset and a fluctuation feature are extracted, a multi-dimensional feature vector is stacked in the channel direction, and a feature coupling representation matrix in the monitoring node is obtained through linear mapping; The spatial disturbance feature matrix and the feature coupling representation matrix are fused and spliced in the node index dimension to obtain a disturbance representation fusion tensor.
5. The big data based power quality detection method of claim 4, wherein, The tensor low-rank reconstruction algorithm is introduced to perform high-dimensional structure decomposition and compression reconstruction on the node feature matrix to obtain a spatial disturbance feature matrix between monitoring nodes, specifically as follows: The node feature matrix is taken as input data, the node feature matrix has monitoring nodes as row dimension and voltage, current and frequency power quality features as column dimension, and represents power quality states of each monitoring node in the same time step; A tensor low-rank reconstruction algorithm based on Tucker decomposition is adopted, the node feature matrix is embedded and expanded into a three-order tensor through dimension lifting, the three-order tensor is unfolded into two matrices along the node dimension and the feature dimension to obtain a node dimension unfolding matrix and a feature dimension unfolding matrix; The node dimension unfolding matrix is subjected to matrix singular value decomposition, and the node dimension unfolding matrix is expressed as the product of a left singular matrix, a singular value diagonal matrix and a right singular matrix; The feature dimension unfolding matrix is subjected to independent matrix singular value decomposition to obtain another group of left singular matrix, singular value diagonal matrix and right singular matrix; Two groups of singular value vectors are extracted, the sum of squares of singular values of each group is calculated, and the cumulative energy ratio is calculated, when the cumulative energy ratio first exceeds a set energy threshold, the target low-rank dimension K of the node dimension and the target low-rank dimension M of the feature dimension are determined respectively; The first K singular values and the corresponding singular vectors are reserved, and orthogonal factor matrices in the node dimension direction and the feature dimension direction are constructed respectively; The original three-order tensor is subjected to tensor multiplication with the transpose of the orthogonal factor matrix in the node dimension direction, and is subjected to tensor multiplication with the transpose of the orthogonal factor matrix in the feature dimension direction to obtain a low-rank core tensor; The orthogonal factor matrices in the node dimension direction and the feature dimension direction are subjected to tensor multiplication operation with the low-rank core tensor respectively, information restoration is completed in the node dimension and the feature dimension simultaneously, and a spatial disturbance feature matrix is obtained.
6. The big data based power quality detection method of claim 1, wherein, The step four specifically includes: The disturbance characterization fusion tensor is input into a spatial path and a feature path for parallel processing, the spatial path takes the node dimension of the monitoring node as a processing axis, and a multi-layer perceptron is used to map the disturbance distribution relationship between nodes row by row; the feature path takes the voltage, current and frequency feature dimension as a processing axis, and a multi-layer perceptron is used to map the combination relationship between various power quality features column by column; After the respective mixing operations of the spatial path and the feature path are completed at each processing layer, the output result of the spatial path is linearly mapped along the node dimension direction to obtain a spatial path intermediate representation consistent with the input dimension of the feature path, and the spatial path intermediate representation is added as a residual signal to the input of the next layer of the feature path; at the same time, the output result of the feature path is linearly mapped along the feature dimension direction to obtain a feature path intermediate representation consistent with the input dimension of the spatial path, and the feature path intermediate representation is added as a residual signal to the input of the next layer of the spatial path; After the cross modeling of all processing layers is completed, the embedding representation of each monitoring node is extracted from the output of the last layer of the spatial path, the embedding representation is mapped to a one-dimensional disturbance response intensity value through a fully connected layer, and is nonlinearly compressed through a Sigmoid activation function, and finally the disturbance potential score of each monitoring node is obtained.
7. The big data based power quality detection method of claim 1, wherein, The step five is specifically: The disturbance potential score is compared with a preset disturbance identification threshold value, when the disturbance potential score of the monitoring node is higher than the preset disturbance identification threshold value, it is determined that the monitoring node has a disturbance risk, and a preliminary detection result is generated; The preliminary detection result includes the node number, occurrence time, disturbance potential score and abnormal type of the monitoring node with a disturbance risk, and the abnormal type includes voltage sudden change, current sudden change and frequency deviation.
8. The big data based power quality detection method of claim 1, wherein, The step six is specifically: The disturbance memory vector corresponding to the monitoring node with a disturbance risk in the preliminary detection result is taken as a target vector of the current disturbance, the historical disturbance memory vectors of other monitoring nodes are extracted from the disturbance memory tensor to construct a candidate vector set; The similarity scores between the target vector of the current disturbance and each candidate vector are calculated by using cosine similarity, according to the size of the similarity scores, in combination with the relative order of each disturbance memory vector in time, the propagation path of the disturbance signal between monitoring nodes is speculated, and a disturbance propagation trend reflecting the starting position and propagation direction of the disturbance is output.
9. The big data based power quality detection method of claim 1, wherein, The step seven is specifically: According to the monitoring node marked as having a disturbance in the preliminary detection result, in combination with the propagation path recorded in the disturbance propagation trend, all monitoring nodes affected by the disturbance are identified; The number of nodes affected by the disturbance is counted, and the maximum disturbance potential score and the corresponding node number are extracted; The disturbance starting node, the number of affected nodes, the maximum disturbance potential score and the corresponding node number are taken as the power quality detection result output.
10. A power quality detection system based on big data, performing the power quality detection method based on big data according to any one of claims 1 to 9, characterized in that, The data acquisition module is used to acquire power quality data of a plurality of monitoring nodes in a power system under a unified time reference, and construct an original data tensor. The disturbance response extraction module is used to calculate the second-order response of the monitoring node after the disturbance based on the original data tensor, generate the disturbance memory vector, and summarize it to form a disturbance memory tensor, which is stored in the disturbance memory pool. The perturbation modeling module is used to input the original data tensor into the improved MLP-Mixer network, which includes a spatial path and a feature path, used to perform Patch mixing and Channel mixing operations respectively to generate a perturbation representation fusion tensor. The dual-stream cross-mixing module is used to introduce a dual-stream cross-modeling mechanism of spatial path and feature path in the improved MLP-Mixer network, perform multi-layer cross-fusion, and generate the perturbation potential score of each monitoring node based on the output of the last layer of spatial path. The disturbance detection module is used to compare the disturbance potential score with the preset disturbance identification threshold to determine whether there is a disturbance risk and output the preliminary detection results; The source analysis module is used to combine the perturbation memory tensor and use cosine similarity and response time series analysis methods to make source judgment on the preliminary detection results and output the perturbation propagation trend. The impact assessment module is used to combine preliminary detection results with the disturbance propagation trend to assess the scope of the disturbance's impact, count the number of affected nodes, and output power quality detection results.