Artificial intelligence-based virtual power plant anomaly detection method and system
Patent Information
- Application Number
- CN202611260094.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-19
- Publication Date
- 2026-11-03
AI Technical Summary
Traditional virtual power plant energy storage anomaly detection methods cannot adapt to the differentiated operating baselines of various energy storage subgroups, resulting in frequent false alarms and missed hidden faults, thus reducing the accuracy of anomaly identification.
An artificial intelligence-based approach is adopted to construct a virtual power plant electrical topology map, use an improved label propagation algorithm to divide energy storage equipment into subgroups, and combine graph convolutional networks and long short-term memory networks to build an anomaly detection model. The spatial linkage and temporal features of energy storage equipment are extracted, and the operation modes of different clusters are distinguished by embedding vectors, so as to realize the quantification of anomaly degree and hierarchical early warning.
It significantly improves the accuracy of anomaly identification in energy storage clusters, reduces the probability of false alarms during peak normal operating conditions and missed detection of hidden faults under light load, adapts to the variable operating conditions of virtual power plants, and meets the needs of second-level online monitoring and real-time early warning.
Smart Images

Figure CN123034378A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of deep learning technology, specifically to a method and system for detecting anomalies in virtual power plants based on artificial intelligence. Background Technology
[0002] Virtual power plants rely on communication networks to aggregate diverse and adjustable resources such as distributed energy storage, photovoltaics, and flexible loads to participate in grid dispatch. As a core regulation unit, the charging and discharging conditions of energy storage directly determine the frequency regulation and fluctuation smoothing response capabilities of the virtual power plant. Virtual power plants have numerous energy storage devices and complex electrical topology coupling relationships. Different energy storage clusters exhibit significant differences in their operating baselines and power interaction patterns. If faults such as voltage anomalies, charging and discharging power deviations, and capacity decay occur in energy storage and are not identified in a timely manner, it can easily lead to local power flow imbalances, equipment damage, or even overall dispatch failure. Therefore, accurate real-time anomaly detection for energy storage is a necessary guarantee for the stable operation of virtual power plants.
[0003] Traditional methods for detecting energy storage in virtual power plants primarily rely on fixed threshold judgment. This method involves pre-collecting historical normal ranges of single electrical indicators such as energy storage voltage, current, and SOC, and manually setting constant values as alarm boundaries. During the online monitoring phase, energy storage operating parameters are captured in real time, and the real-time values are directly compared with preset fixed thresholds. If the values exceed the threshold range, it is determined that there is an abnormal risk in the energy storage, and anomaly identification is completed and output.
[0004] However, the energy storage within the virtual power plant belongs to different electrical subgroups, and the power coupling baselines of each subgroup have different distributions. It is impossible to adapt the dynamic operating boundary of all energy storage subgroups by relying on a unified fixed threshold, which often results in false alarms during peak normal operating conditions and missed detection of hidden faults under light load, ultimately greatly reducing the overall accuracy of energy storage anomaly identification. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides a virtual power plant anomaly detection method and system based on artificial intelligence, thereby resolving the problems existing in the background technology.
[0006] To achieve the above objectives, the present invention provides the following technical solution: a virtual power plant anomaly detection method and system based on artificial intelligence, comprising the following steps: Step S1: Construct the electrical topology of the virtual power plant; use the improved label propagation algorithm with centrality anchors to perform community detection on the electrical topology of the virtual power plant to obtain the energy storage device subgroup and energy storage device subgroup ID of the virtual power plant; Step S2: Collect the operating data of the energy storage equipment subgroup under historical normal operating conditions, construct the operating benchmark data of the energy storage equipment subgroup, and perform electrical time domain feature extraction and topological coupling correlation feature extraction on the operating benchmark data of the energy storage equipment subgroup to obtain the benchmark feature data of the energy storage equipment subgroup. Step S3: Construct an anomaly detection model for energy storage equipment subgroups based on autoencoders. Use the baseline feature data of energy storage equipment subgroups and the embedding vector of the corresponding energy storage equipment subgroup ID as the training set, and input them into the energy storage equipment subgroup anomaly detection model for training to obtain the trained energy storage equipment subgroup anomaly detection model. Step S4: Collect real-time energy storage device subgroup feature data and obtain the embedding vector of the corresponding energy storage device subgroup ID. Input them into the trained energy storage device subgroup anomaly detection model. Calculate the reconstruction error based on the reconstruction features output by the energy storage device subgroup anomaly detection model. After normalization, obtain the subgroup anomaly degree index. Divide the anomaly risk level based on the subgroup anomaly degree index. To overcome the shortcomings of traditional fixed-threshold detection methods, which cannot adapt to the differentiated operating baselines of various energy storage subgroups in virtual power plants and frequently generate false alarms and miss latent faults, this invention constructs an integrated anomaly detection scheme that combines topology modeling and temporal graph deep learning. This invention relies on physically weighted electrical topology to accurately divide electrically coupled subgroups. It extracts dual features of equipment spatial linkage and operating condition temporal sequence through graph convolution and temporal networks. Model training can be completed using only normal operating condition samples, without requiring scarce fault-labeled data. Subgroup ID embedding vectors are introduced to distinguish the inherent operating modes of different clusters, and normalized reconstruction errors are used to quantify the severity of anomalies and provide tiered warnings. The scheme balances electrical physical logic and engineering feasibility, identifying both explicit equipment faults such as voltage and capacity degradation and latent topology degradation such as line aging. It adapts to the variable operating conditions of virtual power plants with dynamic branch switching, significantly improving the accuracy of anomaly identification in energy storage clusters.
[0007] Preferably, step S1 includes the following steps: Construct a virtual power plant electrical topology diagram; calculate the betweenness centrality of all nodes in the virtual power plant electrical topology network, and determine the nodes with the highest betweenness centrality ranking by a preset percentage as centrality anchors; assign an initial subgroup label to each centrality anchor, and do not assign labels to non-anchor nodes initially; Perform label iteration update operation: During the iteration process, keep the subgroup labels of all central anchor points fixed; for nodes that are not central anchor points, update the subgroup labels in order of betweenness centrality from small to large, use the normalized weight of the corresponding edge of the neighbor node as the voting weight, calculate the weighted total vote of each subgroup label, and update the subgroup label of the non-central anchor point node to the subgroup label with the highest weighted total vote. After the iteration is completed, nodes with the same subgroup label are divided into the same energy storage device subgroup, and each energy storage device subgroup is assigned a corresponding energy storage device subgroup ID. By using betweenness centrality to select electrical hubs such as buses and converging converters as fixed anchor points, the anchor point labels are kept unchanged during iteration, and only the labels are updated from small to large by edge nodes, thus solving the problems of random walk and subgroup boundary drift in traditional label propagation. The divided energy storage subgroups strictly conform to the actual electrical coupling relationship, and the partitioning results remain stable and reproducible when the topology is added or removed. This provides analytical units with clear boundaries and physical meaning for subsequent coupling degree calculation and cluster-level modeling, reducing the risk of cross-subgroup detection confusion from the source.
[0008] Preferably, the construction of the virtual power plant electrical topology diagram includes the following steps: The energy storage devices, converters, and buses in the virtual power plant are used as network nodes in the electrical topology diagram of the virtual power plant. The energy storage devices, converters, and buses in the virtual power plant are used as network nodes in the electrical topology diagram of the virtual power plant. Two types of topology edges are established: an equipment edge is constructed between the energy storage device and the converter that is directly electrically connected to it, and a bus edge is constructed between the converter and the corresponding bus. For the equipment edge, the Pearson correlation coefficient is calculated based on the historical operating power sequence between the corresponding energy storage device and the converter, and the absolute value of the Pearson correlation coefficient is used as the edge weight of the equipment edge; for the bus edge, the reciprocal of the reactance value of the electrical connection between the converter and the bus is used as the edge weight of the bus edge; Min-Max normalization is performed on all equipment edge weights and bus edge weights respectively to obtain the normalized edge weights; By integrating all network nodes, topology edges, and their corresponding normalized edge weights, the final virtual power plant electrical topology graph is obtained. This study distinguishes between two types of topologies: energy storage-converter equipment edge and converter-bus edge. The absolute value of the Pearson correlation coefficient and the reciprocal of the line reactance are used to characterize dynamic power coupling and static electrical connectivity, respectively. Min-Max values are then uniformly normalized to the non-negative dimensionless interval [0,1]. This eliminates conflicts in dimensions and numerical magnitudes, while also removing the interference of negative Pearson values on graph theory calculations. This ensures that the calculations of betweenness, modularity, and GCN all have a unified physical scale, and that static line weights do not obscure the dynamic linkage characteristics of energy storage.
[0009] Preferably, step S2 includes the following steps: Collect operating baseline data of energy storage equipment subgroups, and extract electrical time-domain features from the operating baseline data of the energy storage equipment subgroups to obtain the time-domain features of the subgroup nodes; The subgroup of energy storage devices is subjected to topological coupling correlation feature extraction based on the operating baseline data to obtain the subgroup coupling degree. The temporal features of the subgroup nodes are associated with the coupling degree of the subgroup to obtain the reference feature data of the energy storage device subgroup. Instead of directly aggregating the overall vector of the subgroup, this method first calculates the multi-dimensional electrical time-domain statistical characteristics of each energy storage, converter, and bus node separately. Then, it solves the global subgroup coupling degree through modularity and stores the results separately. This method not only fully preserves the subtle fluctuations in voltage, SOC, and power of individual devices but also independently quantifies the overall topological compactness of the subgroup. This provides complete basic data for subsequent hierarchical extraction of spatial features by graph convolutional networks, avoiding the loss of individual device fault clues due to premature aggregation.
[0010] Preferably, obtaining the subgroup coupling degree includes the following steps: Determine the set of nodes contained within the energy storage device subgroup; Based on the edge weights and node sets in the electrical topology graph of the virtual power plant, the subgroup coupling degree corresponding to each energy storage device subgroup is calculated using the modularity formula. Based on topological weighted edges, the tightness of internal connections within subgroups is quantified through modular measurements. The actual coupling deviation is calculated using a random connection zero model, and the numerical value directly reflects the stability of the cluster structure. When line joints deteriorate or branch impedance increases, the coupling degree shifts synchronously, serving as an independent topology fault monitoring indicator. This compensates for the inability to identify early, latent line defects without obvious power fluctuations using only electrical quantities, enriching the dimensions of anomaly identification.
[0011] Preferably, step S3 includes the following steps: Construct an anomaly detection model for energy storage device subgroups based on self-encoders; The energy storage device subgroup ID is mapped to a fixed-dimensional embedding vector, and the embedding vector and the reference feature data of the energy storage device subgroup are input into the energy storage device subgroup anomaly detection model. The energy storage device subgroup anomaly detection model is trained with minimizing the reconstruction error as the objective function until the preset training termination condition is met, and the trained energy storage device subgroup anomaly detection model is obtained. Each subgroup ID is mapped to a trainable embedding vector and optimized synchronously with the network parameters. Subgroups with similar topologies automatically cluster their embedding features, while subgroups with different structures are automatically separated. This adds prior information about subgroup identities to the model, effectively distinguishing the normal operating baselines of clusters with different voltages and capacities. During the inference phase, only fixed embedding vectors are retrieved, resulting in low computational overhead. This adapts to the computing power limitations of edge monitoring devices and significantly reduces misjudgments caused by cross-subgroup baseline drift.
[0012] Preferably, the construction of the anomaly detection model for energy storage device subgroups based on autoencoders includes the following steps: The structure of the energy storage device subgroup anomaly detection model consists of two parts: an encoder and a decoder. The encoder includes an input layer, a GCN graph convolutional network layer, a classification pooling module, a long short-term memory network layer, and an encoding dimensionality reduction layer; the decoder includes a decoding dimensionality increase layer and an output layer. The input layer is used to receive the temporal features of subgroup nodes, subgroup coupling degree, and embedding vector from the subgroup reference feature data of the energy storage device subgroup; The GCN graph convolutional network layer is used to receive the temporal features of the subgroup nodes of the input layer and the weighted adjacency matrix of the energy storage device subgroup, and output the spatial coupling feature matrix to the classification pooling module after graph convolution operation. The categorical pooling module is used to perform mean pooling on the spatial coupling feature matrix according to node type to obtain the aggregate vector of each node type, and concatenate the aggregate vector of each node type along the feature dimension to output the basic subgroup-level feature vector. Then, the basic subgroup-level feature vector, the embedding vector of the energy storage device subgroup ID, and the subgroup coupling degree are concatenated along the feature dimension to obtain the subgroup-level feature vector. The Long Short-Term Memory (LSTM) network layer is used to receive the temporal sequence composed of the subgroup-level feature vectors and return the hidden state of the last time step as the temporal feature vector, which is then output to the encoding dimensionality reduction layer. The encoding dimensionality reduction layer is used to compress the temporal feature vector into a low-dimensional latent space vector; The decoding up-dimensionality layer receives the low-dimensional latent space vector and performs up-dimensionality reconstruction to obtain the reconstructed features; The output layer performs a fully connected mapping on the reconstructed features and outputs the reconstructed subgroup-level feature vectors. An encoder is constructed by layering and concatenating graph convolution, classificatory pooling, and long short-term memory networks, and paired with a symmetric decoder to build an autoencoder network. Graph convolution relies on a weighted adjacency matrix specific to each subgroup to mine the electrical spatial coupling between devices; the classificatory pooling module normalizes the feature dimensions of subgroups with different node sizes; and the long short-term memory network captures the temporal evolution patterns of continuous windows. This model completes unsupervised training using only normal samples, relies on feature reconstruction bias to identify anomalies, and overcomes the deficiency of traditional single-time-series models that ignore the electrical linkage of energy storage clusters. It is compatible and adaptable to energy storage subgroups of both large and small sizes.
[0013] Preferably, step S4 includes the following steps: Real-time operation data of each energy storage device subgroup is collected and features are extracted to obtain real-time energy storage device subgroup feature data. The real-time energy storage device subgroup feature data and the embedding vector of the corresponding energy storage device subgroup ID are input into the trained energy storage device subgroup anomaly detection model, and the reconstructed subgroup-level feature vector is output. After error calculation and normalization, the subgroup anomaly index is obtained. The subgroup anomaly index is compared with the preset risk threshold to classify the corresponding anomaly risk level. The system reuses offline complete feature extraction logic to process real-time running data and synchronously retrieves the trained frozen embedding vectors as input to the model, enabling end-to-end online anomaly identification. It can adapt to minor topology changes without retraining the model, and single-sample inference does not require batch zero-padding, reducing online computing power consumption. It can continuously output real-time subgroup feature vectors, meeting the engineering real-time requirements of second-level online monitoring and real-time early warning for virtual power plants.
[0014] Preferably, the output to obtain the subgroup anomaly index includes the following steps: Calculate the instantaneous reconstruction error between the real-time subgroup-level feature vector output by the classification pooling module and the reconstructed real-time subgroup-level feature vector output by the output layer; The instantaneous reconstruction error is normalized using Z-score based on a sliding window to obtain the subgroup anomaly index; Instead of directly using the original reconstruction error, a sliding window is used to statistically distribute the error and perform Z-score standardization to eliminate baseline fluctuations caused by day / night cycles and charge / discharge cycles. Risk is categorized into low, medium, and high levels based on a normal distribution threshold, distinguishing between random measurement noise and actual equipment / topology faults. This mitigates false alarms caused by instantaneous power fluctuations, providing intuitive and quantifiable anomaly classification for easier hierarchical maintenance and handling.
[0015] Preferably, an artificial intelligence-based virtual power plant anomaly detection system includes: Topology building module: Used to construct an electrical topology diagram of the virtual power plant, including edge weights, by using energy storage devices, converters, and buses as network nodes. Subgroup partitioning module: used to calculate the betweenness centrality of each node in the electrical topology diagram of the virtual power plant to determine the centrality anchor point, and to execute the improved label propagation algorithm based on the centrality anchor point to obtain the energy storage device subgroup and the corresponding energy storage device subgroup ID; Feature extraction module: used to collect historical operating data of energy storage equipment subgroup, extract electrical time domain features and extract topological coupling correlation features based on the electrical topology map of the virtual power plant, and fuse them to obtain the baseline feature data of energy storage equipment subgroup; Model building and training module: used to build an anomaly detection model for energy storage device subgroups; mapping each energy storage device subgroup ID to a fixed-dimensional embedding vector, using the embedding vector and energy storage device subgroup feature data as training samples, and simultaneously optimizing the embedding vector and model parameters during training to obtain the energy storage device subgroup anomaly detection model; Anomaly detection and classification module: It is used to collect real-time energy storage device subgroup feature data and input it together with the embedded vector into the energy storage device subgroup anomaly detection model. Based on the output reconstruction features, it calculates the reconstruction error, obtains the subgroup anomaly degree index after normalization, and classifies the anomaly risk level according to the subgroup anomaly degree index.
[0016] This invention provides an artificial intelligence-based method for detecting anomalies in virtual power plants, involving deep learning technology, which has the following beneficial effects: (1) An improved label propagation algorithm with centrality anchors is used to partition the energy storage equipment subgroups. Compared with the traditional unconstrained label propagation algorithm and static physical partitioning method, it has multiple technical advantages. This method selects core network hub nodes such as buses and aggregation converters as centrality anchors and fixes the anchor labels throughout the process. This fundamentally suppresses the defects of random label walk and frequent drift of subgroup partitioning boundaries during the iteration process of traditional label propagation. At the same time, it updates the labels of edge device nodes in the order of increasing betweenness centrality, weakens the interference caused by the partitioning results of edge nodes, and ensures that the subgroup partitioning results are stable and reproducible. The algorithm relies on the complete electrical topology with Pearson power weight and line reactance weight to complete community mining. The partitioned energy storage subgroups strictly match the actual dynamic power coupling and static electrical connection relationship of the equipment, rather than simply relying on the physical wiring distance partitioning. Even if there are topology dynamic changes such as branch switching and energy storage addition and reduction in the virtual power plant, it can still output energy storage subgroups with clear boundaries and self-consistent electrical logic, providing stable and physically meaningful analysis units for subsequent multi-dimensional feature extraction and subgroup-level anomaly modeling.
[0017] (2) An autoencoder integrating graph convolutional networks and long short-term memory networks is constructed as an anomaly detection model for energy storage equipment subgroups. This model achieves joint modeling of topological spatial features and temporal operational features, effectively overcoming the inherent defects of traditional fixed threshold detection methods that rely solely on a single electrical index of a single device and ignore cluster coupling relationships. The graph convolutional network, relying on the weighted adjacency matrix of each subgroup, simultaneously extracts the topological coupling features of static line constraints and dynamic power linkage between energy storage, converters, and buses. The long short-term memory network captures the temporal evolution of energy storage cluster operating conditions under continuous statistical windows, achieving the fusion of spatial topology and temporal change information. The model can be trained using only historical normal operating condition samples, eliminating the need to collect scarce and incomplete fault labeling samples, significantly reducing the cost of dataset construction. An internal categorized pooling module is set up to uniformly convert energy storage subgroups with varying node sizes into fixed-dimensional subgroup feature vectors, making it compatible with energy storage clusters of significantly different sizes. The model quantifies the degree of anomaly by combining reconstruction error with sliding window Z-score normalization, forming a hierarchical early warning mechanism. It abandons the globally unified alarm threshold and can adapt to the differentiated operating baselines of each subgroup, significantly reducing the probability of false alarms during peak normal operating conditions and missed detection of hidden faults under light load.
[0018] (3) Mapping the energy storage device subgroup ID to a trainable fixed-dimensional embedding vector and fusing it with the feature data of the energy storage device subgroup effectively solves the model recognition confusion problem caused by the differences in the topology and inherent operating baseline of different energy storage subgroups. The embedding vector digitally represents the inherent topological attributes of each subgroup in a low-dimensional feature space, and the embedding matrix and the autoencoder network parameters are optimized synchronously. During the training process, the corresponding embedding vectors of subgroups with similar topologies and similar operating rules automatically cluster together, and the vectors of subgroups with large topological differences are automatically distinguished, allowing the model to autonomously identify the normal operating baseline boundary of different clusters. In the online real-time inference stage, it is only necessary to directly retrieve the trained fixed embedding vector based on the subgroup ID, without adding additional topology comparison and subgroup classification and discrimination logic, reducing the inference computation overhead; the dimension of the embedding vector is controllable, which will not cause the overall input feature dimension explosion, adapting to the computing power limitation of the virtual power plant edge embedded monitoring equipment, avoiding abnormal misjudgment caused by the difference in operating conditions across subgroups from the bottom layer, and further improving the overall anomaly recognition accuracy. Attached Figure Description
[0019] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a flowchart illustrating the steps of the artificial intelligence-based virtual power plant anomaly detection method proposed in this invention. Figure 2 This is a step hierarchy diagram of obtaining the reference feature data of the energy storage equipment subgroup in the artificial intelligence-based virtual power plant anomaly detection method proposed in this invention; Figure 3 This is a step hierarchy diagram of obtaining the trained energy storage equipment subgroup anomaly detection module in the artificial intelligence-based virtual power plant anomaly detection method proposed in this invention. Detailed Implementation
[0021] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0022] Please see Figure 1 This invention provides a technical solution: an anomaly detection method for virtual power plants based on artificial intelligence.
[0023] Step S1: Construct the electrical topology of the virtual power plant; use the improved label propagation algorithm with central anchor points to perform community detection on the electrical topology of the virtual power plant to obtain the energy storage device subgroup and energy storage device subgroup ID of the virtual power plant.
[0024] Step S1 aims to construct a virtual power plant electrical topology map and achieve accurate partitioning of energy storage device subgroups based on an improved tag propagation algorithm.
[0025] First, based on the primary electrical wiring topology within the virtual power plant, the physical equipment is abstractly modeled: energy storage devices, converters, and busbars are defined as network nodes in the virtual power plant's electrical topology diagram. Two types of topology edges are established: device edges are constructed between energy storage devices and their directly electrically connected converters, and busbar edges are constructed between converters and their corresponding connected busbars. This topology diagram is a targeted topology focused on energy storage anomaly detection, including only core electrical components directly involved in energy storage power transmission, excluding other equipment such as photovoltaics, flexible loads, transformers, grid connection points, and their corresponding connecting branches. The reasons are as follows: First, the core detection target of this invention is the abnormal operation of the energy storage itself; fluctuations in the operating conditions of non-energy storage devices are external interference, and including them would dilute the energy storage anomaly characteristics and increase the false alarm rate. Second, the strong correlation range of energy storage power coupling is concentrated in the direct connection links; remote devices have no decisive influence on the division of energy storage subgroups, and including them would only blur the true electrical boundaries of the subgroups. Third, limiting the core nodes allows for control of the topology scale, reducing the computational overhead of community detection and subsequent graph convolution, and adapting to the computing power requirements of real-time detection on the edge side. The energy storage device subgroup discovered by the community is a complete electrical set that includes three types of nodes: energy storage devices belonging to the same electrical coupling unit, supporting converters, and busbars. It does not only include energy storage devices.
[0026] Regarding the assignment of edge weights, the weights of the device edges are calculated based on the Pearson correlation coefficient of the historical operating power sequence of the corresponding energy storage device and the converter, thereby quantifying the dynamic coupling strength between the two.
[0027] In one embodiment, active power sampling data from the energy storage device and the converter over the past 30 days are collected. The two data streams are collected synchronously using a unified clock to ensure that the same sampling index corresponds to the power value at the same time, covering the complete charge-discharge cycle of the energy storage device. The sampling frequency is set to 1 minute / time, striking a balance between the ability to capture detailed power transient changes and data throughput, avoiding distortion in correlation calculations due to excessively large sampling intervals. To eliminate the influence of data dimensions and quantify linear correlation, the Pearson correlation coefficient formula is used to calculate the weight of the device's edge. The specific formula is as follows: ; in, Indicates the first The measured active power of the energy storage device at each sampling time. Indicates the first Measured active power values of the converter at each sampling time. and Let represent the arithmetic mean of the corresponding power series, respectively. This represents the number of sampling points. (Calculated...) The range of values is A positive value, and the closer it is to 1, the higher the synchronization of power changes between the energy storage device and the converter during that period, the stronger the dynamic coupling, and the higher the topology weight of the corresponding device edge. Taking the absolute value of the Pearson correlation coefficient aims to quantify only the strength of power coupling, without distinguishing between positive and negative correlations in the charging and discharging directions, which is consistent with the evaluation logic of electrical coupling tightness.
[0028] The weight of the busbar side is determined based on the reciprocal of the reactance value of the electrical connection between the strain gauge and the busbar, thereby quantifying the static electrical transmission capacity between the two.
[0029] In one embodiment, the primary electrical wiring parameters stored in the virtual power plant monitoring system are read to obtain the impedance per unit length of the cable connecting the converter and the bus, as well as the total cable length, thereby calculating the total line impedance. Considering that power transmission in an AC system is mainly affected by the reactance component, the reactance value in the total line impedance is selected. As a benchmark, the weight of the busbar edge is calculated. for: ; in, This refers to the reactance value of the electrical connection between the converter and the bus, expressed in ohms. To be a zero constant with the dimension of reactance, it is usually taken as Since a smaller line impedance results in a tighter electrical connection between nodes and a stronger power transmission capability, the reciprocal of the impedance is used as a weight to give converters and buses with tight physical connections a higher connection weight in the topology diagram.
[0030] To eliminate the difference in numerical magnitude caused by different units, the above calculations were performed... and Normalization fusion is performed. Specifically, the minimum and maximum values of the two types of edge weights are statistically analyzed across the entire virtual power plant electrical topology graph. Then, the Min-Max normalization method is applied to linearly map both types of edge weights to the interval [0,1]. Min-Max normalization is performed independently on the two types of edge weights to ensure that dynamic coupling features and static connection features have equal numerical contribution weights in the topology graph, preventing one type of edge from dominating the community partitioning results due to dimensional advantage. Although device edge weights are naturally in the [0,1] interval, the total device edge weights may be concentrated in a narrow interval. Normalization can amplify the differences in coupling strength between different device edges, improving the discriminative power of community partitioning.
[0031] After completing the node definition, topology edge definition, and edge weight assignment, the node set containing energy storage devices, converters, and buses is integrated with the edge set containing device edges, bus edges, and their corresponding weights to construct the virtual power plant electrical topology graph.
[0032] It should be noted that in the electrical topology diagram of this virtual power plant, nodes represent physical electrical entities, while edge weights simultaneously carry the dynamic operating coupling strength between energy storage devices and converters, as well as the static electrical transmission capacity between converters and buses. Thus, this topology diagram fully depicts the physical connection relationships and energy transmission characteristics between electrical components within the virtual power plant.
[0033] After obtaining the electrical topology of the virtual power plant, an improved label propagation algorithm that introduces central anchors is executed to achieve community discovery.
[0034] In one embodiment, the betweenness centrality of all nodes in the virtual power plant electrical topology graph is first calculated. Before calculating the node betweenness centrality, the edge weights characterizing the coupling strength need to be converted into the equivalent path cost required for solving the shortest path problem. The conversion formula is c = Where w is the normalized weight of a single topological edge, and c is the equivalent transmission cost of the corresponding branch. This is a dimensionless divisible constant, defaulting to 0. This transformation is solely for preventing computational overflow of zero-weight edges. It ensures the accuracy of the physical meaning: the higher the branch coupling strength, the closer w is to 1, and the closer the equivalent path cost c is to the minimum value of 1, indicating less energy transmission obstruction and shorter electrical distance for that branch, making it more likely to be selected in the shortest path traversal. The resulting equivalent path cost matrix will serve as the distance benchmark for solving the shortest path problem, used for subsequent betweenness centrality calculations. After obtaining the shortest paths for all node pairs based on the equivalent path cost matrix, the centrality value of each node is calculated using the following formula: ,in, Let s and t represent the betweenness centrality of node v, and let s and t be any two distinct nodes in the topological graph that are not equal to node v. The summation is performed by traversing the entire graph to find all nodes that satisfy s. v t's node pairs, This represents the node calculated based on the equivalent path cost. To the node The total number of shortest paths, This represents the number of paths passing through node v in the aforementioned shortest path. The betweenness centrality value quantifies a node's mediating control ability over energy transmission within the network by summing the percentage of its occurrence in the shortest paths of all node pairs in the entire network. A higher value indicates a stronger mediating role for the node in the network topology. Based on the calculated betweenness centrality value, nodes with values within the top preset percentage are identified as centrality anchors. These anchors typically correspond to main buses with complex electrical connections or converters that aggregate multiple branches. In this embodiment, the preset percentage is 15%. In a typical virtual power plant topology, this percentage of nodes is sufficient to cover the main buses and key aggregation converters in the system. This effectively suppresses random walks during tag propagation without disrupting naturally formed electrical coupling relationships, ensuring that the subgroup partitioning results have both physical meaning and stability.
[0035] In the iterative initialization phase, a unique initial subgroup label is assigned to each central anchor point; all non-anchor nodes are initially unlabeled, and are updated only by referring to the assigned labels of their neighbors during the first iteration. In the iterative update phase of the label propagation algorithm, the subgroup labels of all central anchor points are forcibly fixed, and label updates are performed only on non-anchor nodes. For each non-anchor node to be updated, it is traversed in ascending order of its betweenness centrality value. When updating a non-anchor node, its directly connected nodes in the virtual power plant electrical topology graph are traversed as neighbors, and the subgroup label distribution of these neighbors is statistically analyzed. The normalized weight of the corresponding edges is used as the voting weight to calculate the weighted total votes for each subgroup label. The subgroup label of the non-anchor node is updated to the subgroup label with the highest weighted total vote among its neighbors. If multiple subgroup labels have the same weighted total vote, one of them is randomly selected as the update result. By prioritizing the updating of edge nodes with smaller betweenness centrality values, the interference of the initial labels on the subgroup boundaries can be reduced, improving the stability of the partitioning. The iteration terminates when the labels of all non-anchor nodes remain unchanged in two consecutive iterations, or when the number of iterations reaches the preset maximum number of iterations. In this embodiment, the maximum number of iterations is preferably 100, which was determined through pre-experiment calibration. The improved label propagation algorithm was run on various virtual power plant electrical topology samples of different sizes, and the number of iterations required for the subgroup partitioning results to stabilize was recorded. Statistical results show that this value is usually distributed between 30 and 80. In order to balance convergence reliability and computational efficiency, the maximum number of iterations was determined to be 100 to ensure that convergence requirements under extreme operating conditions are covered.
[0036] Finally, nodes with the same subgroup label are grouped into the same energy storage device subgroup, and each subgroup is assigned a unique energy storage device subgroup ID, such as G01, G02, etc. This energy storage device subgroup ID serves as a key index for distinguishing different subgroup structures during subsequent feature extraction and model training.
[0037] It should be noted that in the complex electrical environment of a virtual power plant, energy storage devices are usually strongly coupled with converters and buses in electrical circuits. Furthermore, the topology of a virtual power plant is often dynamically adjusted with the scheduling strategy, making it difficult for traditional static partitioning methods based on physical connection thresholds to adapt to changing operating conditions and easily causing subgroup partitioning boundary drift. The improved tag propagation algorithm, which introduces centrality anchors, aims to overcome the instability of energy storage device subgroup partitioning caused by random initialization and iterative oscillations in traditional tag propagation algorithms. By calculating the betweenness centrality of nodes, it accurately locks key hub nodes that play a mediating role in energy transmission in the topology, such as the main bus and key converters that converge multiple branches, as fixed anchors, forcing their tags not to participate in iterative updates. This ensures that the partitioned energy storage device subgroups strictly follow the electrical and physical connection logic and dynamic coupling characteristics while suppressing random walks and preserving the core connection features of the topology. It provides a physically meaningful and clearly defined analysis unit for subsequent steps such as calculating subgroup coupling degree based on modularity, extracting subgroup coupling degree, and constructing an autoencoder anomaly detection model for specific subgroup structures. This enables the model to accurately identify anomalies based on the overall reconstruction error of the subgroup rather than being disturbed by random fluctuations of individual devices.
[0038] Step S2: Collect operating data of the energy storage equipment subgroup under historical normal operating conditions, construct the operating benchmark data of the energy storage equipment subgroup, and perform electrical time domain feature extraction and topological coupling correlation feature extraction on the operating benchmark data of the energy storage equipment subgroup to obtain the benchmark feature data of the energy storage equipment subgroup.
[0039] Please see Figure 2 In the specific implementation of step S2, firstly, based on the energy storage device subgroups and their corresponding energy storage device subgroup IDs obtained in step S1, the operating data of each energy storage device subgroup under historical normal working conditions is collected in a targeted manner to construct the operating benchmark data of the energy storage device subgroups.
[0040] In one embodiment, operational data is first collected in a differentiated manner based on node type: for energy storage device nodes, their terminal voltage, charging and discharging current, and state of charge (SOC) are collected; for converter nodes, their output active power and reactive power are collected; and for bus nodes, their voltage phase is collected. The sampling frequency is set to 1Hz to ensure the capture of steady-state operating characteristics. To ensure data purity, communication packet loss and distortion points are first removed from the data: communication packet loss is identified by verifying the continuity of data packet timestamps. If there is only a short-term data gap of no more than two consecutive sampling periods, linear interpolation is used to complete the data based on the electrical quantity values of adjacent valid sampling points before and after the missing period, avoiding gaps in time-series data. If there is a timestamp interruption of three or more consecutive sampling periods, the data for that period is deemed invalid and removed. For the electrical quantity data itself, physical boundary thresholds are set according to the safe operating limits of the electrical equipment. For example, the physical boundary of the energy storage terminal voltage is set to ±15% of the rated voltage, and the physical boundary of the charging and discharging current is set to 1.2 times the rated current. Specific values can be determined by referring to the corresponding equipment's factory technical specifications. If the collected value exceeds this physical boundary, it is determined as a distortion point and removed. Secondly, considering subsequent anomalies... The detection model needs to learn the operating mode of the equipment under normal dynamic characteristics and exclude transient data caused by sudden changes in dispatch commands or grid disturbances. In specific implementation, the start-stop signals and power command change rate of the energy storage equipment are monitored. Only data samples of the energy storage equipment operating within the rated power range and with the relative change rate of the subgroup power command below a preset threshold are retained. The relative change rate refers to the ratio of the change in power command to the rated power within 1 minute. In this embodiment, the 5% threshold corresponds to the power command fluctuation not exceeding 5% of the rated power per minute. This is adapted to the steady-state regulation accuracy requirements of conventional primary frequency regulation and automatic generation control in virtual power plants. It can ensure that while eliminating transient response data during severe grid frequency fluctuations or emergency power support, the stable operating characteristics under normal economic dispatch are fully preserved. This ensures that the benchmark dataset only contains the operating characteristics of the equipment under approximately steady-state conditions, avoiding interference from transient characteristics on the model's fitting of normal modes.
[0041] It should be noted that the time-domain feature extraction in this step uses a 1Hz sampling frequency, which is independent of the 1-minute sampling frequency used in step S1 for topology edge weight calculation and has a different applicable scenario. The specific differences are as follows: When extracting time-domain features, the sampling frequency is 1Hz to capture the microscopic operating characteristics of the device within a 5-minute statistical window, such as voltage fluctuations and SOC change rate. If sampling is used at 1 minute / sample, second-level transient fluctuation details will be lost, causing short-term statistics such as standard deviation and waveform factor to fail to accurately reflect the real-time health status of the device. Using 1Hz sampling can fully cover the state changes, which are typically second-level, within the device's control cycle, ensuring that the extracted feature vector has sufficient anomaly resolution. The Pearson correlation coefficient is sampled at 1 minute / sample to quantify the macroscopic dynamic coupling trend between the energy storage device and the converter over a period of up to 30 days. Because the Pearson correlation coefficient is extremely sensitive to short-term random fluctuations, if high-frequency sampling at 1Hz is used, even small measurement noise will cause distortion in the correlation calculation. Using 1 minute / sample can effectively filter out second-level electromagnetic interference and communication jitter while retaining the synchronicity characteristics of power changes, ensuring the physical stability of the topology edge weights.
[0042] After data cleaning, electrical time-domain features were extracted from the operating baseline data of the energy storage equipment subgroup to obtain the time-domain features of the subgroup nodes.
[0043] In one embodiment, basic statistics are calculated for each node within the energy storage device subgroup within a statistical window. The length of this statistical window is set to 5 minutes, which is adapted to the response delay characteristics of the energy storage device's thermal management system and the adjustment cycle of the grid's automatic generation control. This allows for the capture of short-term dynamic behavior of the devices while avoiding statistical feature distortion caused by an excessively short window. The statistical window slides across the time-series data in 1-minute increments to achieve overlapping sampling of data while maintaining feature temporal resolution, thereby improving the sample diversity for subsequent model training.
[0044] For energy storage device nodes, statistics are extracted in two dimensions: voltage and current. For the voltage dimension, the mean, standard deviation, peak-to-valley difference, and waveform factor of the voltage amplitude within the window are calculated. The peak-to-valley difference is the difference between the maximum and minimum values of the parameter within the window, used to characterize the fluctuation amplitude of the parameter. The waveform factor is the effective value of the signal within the window. with arithmetic mean The ratio, i.e. = For the current dimension, the mean, standard deviation, peak-to-valley difference, and waveform factor of the current amplitude within the window are calculated, where the waveform factor is used to quantify the degree of distortion of the current waveform. Simultaneously, the rate of change of the state of charge (SOC) is included in the feature dimension. This SOC rate of change refers to the change per unit time within the statistical window, i.e., the difference between the SOC value at the end of the window and the initial SOC value divided by the window duration. It is used to characterize the charging and discharging activity of the energy storage device on a short timescale, with units of % / min, representing the magnitude of SOC change per minute.
[0045] For converter nodes, calculate the mean, standard deviation, and peak-to-valley difference of active and reactive power respectively; for bus nodes, calculate the mean and standard deviation of voltage phase.
[0046] Specifically, to eliminate the uncertainty in input dimensions caused by differences in topology scale among different energy storage device subgroups, it is necessary to standardize and encapsulate the aforementioned node-level statistical features. Specifically, the feature vectors of all nodes within the subgroup are stacked along the row direction. Before stacking, the feature dimensions of each type of node are uniformly aligned: using the 9-dimensional feature of energy storage nodes as a baseline, the 6-dimensional feature of converter nodes is padded with 3 zero components, and the 2-dimensional feature of bus nodes is padded with 7 zero components. The feature dimensions of different types of nodes are set according to their operating characteristics and anomaly representation capabilities. The operating status of converter and bus nodes can be fully characterized by core indicators such as power and phase, without the need to extract additional dimensions such as waveform factors and rate of change, thus controlling the input dimension while ensuring feature recognizability. This unifies the feature dimensions of each node to a uniform value. The nine features are, in order: mean voltage, standard deviation voltage, peak-to-valley voltage difference, voltage waveform factor, mean current, standard deviation current, peak-to-valley current difference, current waveform factor, and SOC rate of change. Missing dimensions for converter and bus nodes are filled with zero values to ensure dimension alignment. Zero-value filling is merely an engineering technique for dimension alignment; since GCN message passing only occurs between physically connected nodes, and subsequent categorical pooling only aggregates valid node features, zero-filling will not substantially interfere with the feature extraction results. This constructs the temporal features of the subgroup nodes. ,in This represents the total number of nodes within the current subgroup g. During the stacking process, nodes are deterministically ordered according to a fixed topology template bound to the subgroup ID. The specific rules are as follows: first, nodes are ordered by type priority, in the order of energy storage nodes, converter nodes, and bus nodes; for multiple nodes of the same type, they are ordered in ascending order according to their predefined physical numbers in the virtual power plant system. This fixed topology order ensures the comparability of the position indices of nodes of the same type in different subgroups, providing a stable topology reference for message passing in subsequent GCN graph convolutional network layers.
[0047] After obtaining the temporal characteristics of the subgroup nodes, the topological coupling correlation features of the energy storage device subgroup operation benchmark data are extracted to obtain the subgroup coupling degree. This step aims to reflect the structural stability of the subgroup by quantifying the connection tightness between nodes within the subgroup.
[0048] In one embodiment, the set of nodes within the current energy storage device subgroup and the edge weights of the connections between nodes are first determined, i.e., the device edge weights and bus edge weights constructed in step S1; then, the modularity formula is introduced to calculate the subgroup coupling degree. Modularity is a core indicator for measuring the quality of subgroup partitioning, and its calculation formula is as follows: ; in, This indicates the subgroup coupling degree of the current energy storage device subgroup. Represents a node With nodes Edge weights between them This represents the weighted degree of node h, which is the sum of the weights of all edges connected to that node. This represents the sum of the edge weights within the current energy storage device subgroup. and Representing nodes respectively and nodes The subgroup ID of the energy storage device to which it belongs. For the Kronecker function, when the node and nodes Belonging to the same energy storage device subgroup ID The value is 1 if the condition is met, and 0 otherwise. This formula quantifies the tightness of the connections within a subgroup by calculating the difference between the actual edge weights and the expected values of random connections. A larger positive value indicates stronger coupling and more independent structure within the subgroup.
[0049] The temporal features of the subgroup nodes are associated and stored with the subgroup coupling degree to obtain the energy storage device subgroup baseline feature data. In one embodiment, the temporal feature matrix of the subgroup nodes is represented as follows: ,in This represents the total number of actual device nodes within the current subgroup. The first nine columns represent the electrical time-domain characteristics of each node, namely the statistical characteristics of voltage, current, SOC, and phase. The subgroup coupling degree is... This is stored separately as an independent global attribute of the subgroup, representing the overall topological coupling strength of the subgroup. Its value originates from the modularity calculation result defined in step S1. The resulting... Node temporal characteristics and The subgroup coupling degree together constitutes the baseline feature data of the energy storage device subgroup. That is, using the subgroup ID of the energy storage device as an index, the temporal features and subgroup coupling degree of the corresponding subgroup nodes under the same energy storage device subgroup are bound to the same index item to obtain the baseline feature data of the energy storage device subgroup. This data serves as the input sample for the subsequent anomaly detection model.
[0050] Step S3: Construct an anomaly detection model for energy storage device subgroups based on autoencoders. Use the baseline feature data of the energy storage device subgroups and the embedding vector of the corresponding energy storage device subgroup ID as the training set, and input them into the energy storage device subgroup anomaly detection model for training to obtain the trained energy storage device subgroup anomaly detection model.
[0051] Please see Figure 3 An anomaly detection model for energy storage device subgroups based on an autoencoder is constructed. In one embodiment, the anomaly detection model for energy storage device subgroups adopts an encoder-decoder architecture, and the specific structural parameters are configured as follows: The encoder consists of an input layer, a GCN graph convolutional network layer, a classification pooling module, a long short-term memory network layer, and an encoding dimensionality reduction layer.
[0052] The input layer receives the time-domain features of the subgroup nodes from the baseline feature data of the energy storage device subgroup output in step S2. Each energy storage device subgroup contains several energy storage devices, several converters, and several busbars. The total number of nodes varies between subgroups due to different configuration scales. Specifically, the receiving dimension is... Temporal characteristics of subgroup nodes and independent subgroup coupling degree It also receives the embedding vector corresponding to the current subgroup ID. It should be noted that, due to the different number of nodes in different subgroups... There are differences; model training and inference employ a batch-based dynamic dimensionality adaptation strategy. During the batch processing phase, the maximum number of nodes across all subgroups within the current batch is extracted and denoted as... For batches with fewer than [number of nodes] The subgroup of nodes is temporarily padded with zeros at the end of the row dimension of its node temporal feature matrix to unify the size of the single-sample feature matrix. ×9 to meet the tensor alignment requirements of GPU parallel computing. Zero padding only expands the node count dimension; the feature dimension remains unchanged at 9. The zero-padding rows correspond to virtual placeholder nodes, which are not real electrical devices and do not participate in the fixed sorting rules of the subgroup nodes. This zero-padding operation is only a temporary data preprocessing measure and becomes invalid after a single batch of computation; it is retained throughout the data storage and single-sample inference stages. The original dynamic size.
[0053] The GCN (Graph Convolutional Network) layer uses a weighted adjacency matrix specific to each energy storage device subgroup as its topological input. This weighted adjacency matrix is a pre-constructed and bound static structural parameter for each independent energy storage device subgroup ID. Its construction, filling, and binding logic is as follows: First, a weighted adjacency matrix is independently constructed based on the subgroup topology. Before model training, for each energy storage device subgroup obtained in step S1, a weighted adjacency matrix specific to that subgroup is constructed based on the connection relationships between its internal device nodes. The initial size of this matrix is... , The matrix elements represent the total number of actual nodes in the current subgroup. Deterministic filling is performed strictly according to the edge weights defined in step S1, with all other non-connected positions and the matrix diagonal set to zero. To adapt to the message passing mechanism of GCN, normalization preprocessing is performed on the adjacency matrix during filling: Normalization preprocessing is performed on the weighted adjacency matrix A, first by adding the identity matrix I to construct an adjacency matrix with self-loops: And then Perform symmetric normalization to obtain the final normalized adjacency matrix: ,in, The normalized matrix, For a self-loop adjacency matrix The corresponding weighted degree matrix is a diagonal matrix, where each diagonal element represents the weighted degree of the corresponding node, which is the sum of the weights of all edges connected to that node plus 1. This eliminates numerical bias caused by uneven distribution of node degrees, ensuring stable feature aggregation. Simultaneously, the GCN graph convolutional network layer adopts a first-order graph convolutional architecture with a convolution order of 1, allowing nodes to directly aggregate features from their physically connected first-order neighbor nodes. This aligns with the physical law that energy in a virtual power plant is transmitted only along directly connected electrical lines. The GCN layer has 128 convolutional kernels (kernel weights are learned through model training), resulting in 128 output feature channels. During model training and inference, the GCN graph convolutional network layer performs graph convolution operations on the temporal feature matrix of the subgroup nodes output from the input layer and the weighted adjacency matrix specific to the current subgroup. After element-wise ReLU activation nonlinear transformation and Dropout random deactivation regularization, the final output size is... A spatial coupling feature matrix of ×128 is used. Next, a one-to-one mapping between the weighted adjacency matrix and subgroup IDs is established. Before model training, a subgroup ID embedding lookup table is constructed synchronously, mapping subgroup IDs to unique integer indices, and binding these indices to the adjacency matrix for storage. Simultaneously, this integer index also serves as the retrieval key for the embedding lookup table. When the model loads this matrix for batch processing, dynamic expansion is performed synchronously: based on the current batch... The value will be the original The adjacency matrix is expanded to The fixed size of the extension position, i.e., the row and column weights of the corresponding zero-filling node region, is set to zero to ensure that the zero-filling node neither sends nor receives information during message transmission. At the same time, when performing normalization preprocessing on the adjacency matrix, i.e., adding the identity matrix to construct self-loops, the self-loops are strictly limited to being added only to the diagonal positions corresponding to the original real nodes. The diagonal elements corresponding to the zero-filling placeholder nodes are still forcibly set to zero to avoid virtual invalid nodes generating false self-loop associations and to ensure that the spatial coupling features extracted by the GCN layer only come from real physical electrical connections.
[0054] Classification pooling module: The classification pooling module receives the output of the GCN graph convolutional network layer. The spatial coupling feature matrix is 128×128, grouped along the node dimension by energy storage, converter, and bus type. Mean pooling is then performed on the effective node features (i.e., the 128-dimensional spatial coupling feature vectors of each node) within each group to obtain aggregated vectors for the three types of equipment. If a category is missing, the zero vector is retained. The three aggregated vectors are then concatenated along the feature dimension to form the basic subgroup-level feature vector for the current window. Embedding concatenation is performed here: the basic subgroup-level feature vector is combined with the retrieved subgroup ID embedding vector and the independent subgroup coupling degree. The original values are concatenated to form the subgroup-level feature vector of the current window, which is then fed into the Long Short-Term Memory (LSTM) network layer. By concatenating the embedding vectors after pooling, redundant copying of the embedding vectors at the node level is avoided, significantly reducing the computational load.
[0055] It should be noted that the subgroup ID embedding vector and the subgroup coupling degree Q are static features that remain constant when the topology remains unchanged. Incorporating them into the model input and reconstruction target will not lead to a substantial decrease in anomaly detection sensitivity, but rather has the following benefits: First, introducing the subgroup ID embedding vector as prior knowledge can achieve subgroup feature decoupling, helping the model establish a subgroup-specific operating baseline in the feature space. For example, when different subgroups experience voltage baseline drift due to differences in voltage level or capacity configuration, the embedding vector can provide the model with a clear subgroup identity, enabling it to accurately distinguish subgroup A. The system distinguishes between normal high voltage and abnormal high voltage in subgroup B, avoiding misjudgments caused by cross-subgroup baseline confusion. Secondly, the subgroup coupling degree Q, as a quantitative indicator of topology stability, will directly reflect hidden faults at the topology level if it degrades slightly due to line aging, loose joints, or poor contact. For example, when the Q value drops from 0.9 to 0.7 due to increased contact resistance, the model, having learned the Q value under normal topology, will see its reconstructed output deviate from the true value, becoming a sensitive indicator of structural faults. This compensates for the insensitivity of relying solely on electrical quantity detection to early topology degradation. Furthermore, the static feature accounts for a very small proportion of the overall reconstructed output, and its error dilution effect on dynamic electrical features is negligible.
[0056] The Long Short-Term Memory (LSTM) network layer receives a sequence of subgroup-level feature vectors stacked chronologically from five consecutive statistical windows, with a time step of 5 corresponding to five consecutive 5-minute windows, used to capture the dynamic evolution of the subgroup's running state. The hidden layer has 64 neurons and returns the hidden state of the last time step as the temporal feature vector. The encoding dimensionality reduction layer receives this 64-dimensional temporal feature vector as input and consists of two fully connected layers: the first fully connected layer has 32 neurons with the ReLU activation function, mapping the 64-dimensional temporal feature vector to 32-dimensional intermediate features; the second fully connected layer has 16 neurons with the ReLU activation function, further mapping and compressing the 32-dimensional intermediate features to output a 16-dimensional low-dimensional latent space vector. This 16-dimensional low-dimensional latent space vector is the final output of the encoder, with a dimension significantly lower than that of the subgroup-level feature vector, forcing the model to learn the low-dimensional essential representation of normal features.
[0057] The decoder section is symmetrically structured with the encoder, specifically including a decoding upscaling layer and an output layer. The decoding upscaling layer consists of two fully connected layers stacked sequentially: the first fully connected layer receives the 16-dimensional low-dimensional latent space vector output from the encoding downscaling layer as input, has 64 neurons, uses ReLU activation, maps and upscales it, outputting 64-dimensional upscaled features; the second fully connected layer has 32 neurons, also using ReLU activation, receives the 64-dimensional upscaled features, further performs feature transformation and dimension adaptation, outputting 32-dimensional reconstructed features. Subsequently, the output layer receives the 32-dimensional reconstructed features. This output layer is a fully connected layer whose number of neurons is strictly equal to the total dimension of the subgroup-level feature vectors fed into the Long Short-Term Memory (LSTM) network layer. A linear activation function is used to map and restore the 32-dimensional reconstructed features to a reconstructed subgroup-level feature vector with dimensions completely consistent with the original subgroup-level feature vector. This is used to calculate the reconstruction error with the real subgroup-level feature vector to train the model. The reconstructed subgroup-level feature vectors are compared with the subgroup-level feature vectors output by the class-based pooling module in the encoder to calculate the reconstruction error.
[0058] The energy storage device subgroup ID is mapped to a fixed-dimensional embedding vector, and the embedding vector and the reference feature data of the energy storage device subgroup are input into the energy storage device subgroup anomaly detection model. The energy storage device subgroup anomaly detection model is trained with minimizing the reconstruction error as the objective function until the preset training termination condition is met, and the trained energy storage device subgroup anomaly detection model is obtained.
[0059] In one embodiment, a subgroup ID embedding lookup table is pre-constructed. This lookup table contains a trainable embedding matrix, where the number of rows corresponds to the total number of energy storage device subgroups, and the number of columns is the embedding dimension, which is set to 1 / 3 of the dimension of the basic subgroup-level features output by categorical pooling. This dimension is used to characterize the inherent attribute differences of different subgroup topologies in a low-dimensional space. Experiments have shown that when the embedding dimension is set to 1 / 3 of the dimension of the basic subgroup-level features, the model achieves the optimal F1 score for anomaly detection on the validation set. If the dimension is less than 1 / 4, the model struggles to distinguish subgroups with similar topologies in a low-dimensional space, leading to an increase in the false negative rate. If the dimension is greater than 1 / 2, the ID information weight is too high, and the model easily overlooks subtle changes in electrical quantities, resulting in an increase in the false positive rate. Subsequently, a feature concatenation operation is employed, with a fixed concatenation order: the basic subgroup-level feature vector, the subgroup ID embedding vector, and the subgroup coupling degree Q are concatenated along the feature dimension to form the subgroup-level feature vector for the current window, which is then fed into the Long Short-Term Memory (LSTM) network layer. This concatenation operation enables the model to distinguish the differences in physical characteristics of different subgroups when processing input, avoiding misjudgments caused by the different inherent operating points of different subgroups. The embedding matrix is randomly assigned values using a normal distribution during the initialization phase; that is, each value in the matrix is independently and randomly sampled from a normal distribution N(0,0.01) with a mean of 0 and a standard deviation of 0.01. A mean of 0 ensures that the embedding vectors of each subgroup are on the same numerical scale at the beginning of training, preventing individual subgroups from dominating gradient updates due to excessively large or small initial values. A standard deviation of 0.01 is a small variance initialization, which allows the embedding vectors to be in a small perturbation region near the origin in the early stage of model training. This matches the numerical scale of the subsequently concatenated basic subgroup-level feature vectors, thus providing a stable gradient starting point for backpropagation and avoiding gradient explosion or vanishing in the early stage of training.
[0060] With the goal of minimizing reconstruction error, the mean squared error function is chosen as the loss function, and its calculation formula is as follows: ; in, This represents the value of the reconstruction loss function. The dimension of the subgroup-level eigenvectors is represented. The eigenvector of the subgroup level represents the eigenvector of the eigengroup level. The numerical value of the dimension. This represents the first subgroup-level feature vector after reconstruction at the output layer of the energy storage device subgroup anomaly detection model. The loss function, by calculating the mean squared Euclidean distance between the two, forces the model to learn a low-dimensional representation of the characteristic manifold of the energy storage device subgroup under normal operating conditions.
[0061] During training, the Adam optimizer is used to update the model parameters. The initial learning rate is set to 0.001, the batch size to 128, and the maximum number of training epochs to 200. The training and validation sets are hierarchically divided in a 7:3 ratio, and stratified sampling based on the energy storage subgroup ID ensures consistent subgroup distribution across the two datasets. The validation set loss is calculated every 5 iterations. Specifically, the embedding matrix in the subgroup ID embedding lookup table serves as a trainable parameter of the model and is jointly optimized with the model's main weights during training. In each backpropagation calculation, the gradient of the reconstruction error flows not only to the GCN graph convolutional network layer, long short-term memory network layer, encoding dimensionality reduction layer in the encoder, and decoding dimensionality increase layer and output layer in the decoder, but also to the embedding matrix, whose values are synchronously updated by the optimizer. Each row in the embedding matrix corresponds to a trainable parameter for an energy storage device subgroup ID, and its update is driven solely by the reconstruction error gradient generated by the training samples appearing under that subgroup ID. Through this joint training mechanism, the vectors in the embedding matrix no longer maintain their initial random state, but gradually converge with training iterations: for subgroups with similar topological structures, the corresponding embedding vectors gradually become closer in the high-dimensional feature space, while for subgroups with significantly different topological structures, the vector distance gradually increases. To prevent overfitting and improve generalization ability, an early stopping mechanism is introduced, terminating training when the validation set loss does not decrease for 10 consecutive rounds; after training, the model encoder and decoder weights and the complete embedding matrix are synchronously and persistently stored in a unified binary file format to obtain the trained energy storage device subgroup anomaly detection model; during the online real-time inference stage, after loading the weight file, all parameters of the embedding matrix are frozen, and gradient updates are prohibited. To ensure complete reproducibility of the experiment, a fixed global random seed is used throughout the training process: the embedding matrix initialization seed, the GCN / LSTM network weight initialization seed, the Dropout random deactivation seed, and the training sample batch shuffling seed are all set to a fixed integer of 1024, eliminating the result bias caused by all random variables.
[0062] It should be noted that, considering the dynamic adjustment of electrical topology caused by the switching of energy storage units and changes in circuit breaker status within the virtual power plant, this invention supports real-time reconstruction of the adjacency matrix. During operation, electrical primary topology switching signals such as circuit breaker opening and closing status and grid-connected / off-grid commands are collected synchronously in real time from the virtual power plant monitoring system. When a change in the internal topology of a subgroup is detected, the edge weight recalculation logic in step S1 is triggered, dynamically updating the weight values of the corresponding edges in the weighted adjacency matrix specific to that subgroup, and rebinding the updated adjacency matrix to the corresponding subgroup ID. For minor local topology changes such as switching on and off of individual energy storage units within a subgroup and fine-tuning of line reactance parameters, only local changes in physical connections are involved, without changes to the subgroup ID or retraining of the embedding vector: Subgroup ID remains constant: For example, atomic group G01 is still considered G01 after topology adjustment, maintaining its unique identifier and ensuring the continuity of historical operating data and anomaly detection logic; Embedding vector freezing: Since the subgroup ID remains unchanged, the retrieved subgroup ID embedding vector remains unchanged. Minor topology changes do not alter the core topology architecture and overall operating baseline of the subgroup, and the inherent structural attributes of the subgroup represented by the embedding vector still hold, normally supporting the model to complete feature association; Model parameter reuse: Because the model uses a categorical pooling module, after a slight increase or decrease in the number of subgroup nodes, the feature dimension input to the Long Short-Term Memory network layer remains constant; and the model has the ability to generalize to minor fluctuations in topology features. Limited fluctuations in the subgroup coupling degree Q will not cause abnormal jumps in reconstruction error, and anomaly detection is still dominated by dynamic electrical quantity features. Therefore, there is no need to retrain the weight parameters of the encoder and decoder. If a subgroup undergoes a significant structural topology change, such as a node size change exceeding 30% or the addition or removal of core buses or main collector converters, resulting in a fundamental change in the subgroup's electrical properties, incremental fine-tuning of the model based on the newly added operational data is necessary. During this fine-tuning phase, the learning rate of the main model is reduced to 1 / 10 of the original learning rate (0.0001), and the learning rate of the embedding matrix is further reduced to 1 / 20 of the original learning rate (0.00005). This reduces the update magnitude of the original subgroup embedding vectors, only slightly correcting the embedding representation of the changed subgroups, and simultaneously optimizing the embedding vectors and the model's main weights to ensure that anomaly detection accuracy is not affected. This design achieves soft decoupling between minor changes in physical topology and the model's feature space. For typical local topology adjustments in virtual power plants, only updating the adjacency matrix is needed to adapt to changes in subgroup topology, eliminating the need for full retraining of model parameters and significantly reducing model maintenance costs associated with adjustments to virtual power plant operation. Step S4: Collect real-time energy storage device subgroup feature data and obtain the embedding vector of the corresponding energy storage device subgroup ID. Input them together into the trained energy storage device subgroup anomaly detection model. Obtain the subgroup anomaly degree index based on the reconstruction error output by the energy storage device subgroup anomaly detection model. Divide the anomaly risk level based on the subgroup anomaly degree index.
[0063] Real-time operational data of each energy storage device subgroup is collected and features are extracted to obtain real-time energy storage device subgroup feature data. The real-time energy storage device subgroup feature data and the embedding vector of the corresponding energy storage device subgroup ID are input into the trained energy storage device subgroup anomaly detection model, and the reconstructed subgroup-level feature vector is output. After error calculation and normalization, the subgroup anomaly index is obtained.
[0064] In practice, the feature extraction process described in step S2 is followed, but the temporary zero-padding alignment operation required for batch processing is not performed in real-time single-sample inference scenarios. Real-time running data is collected in 5-minute statistical windows to extract the electrical time-domain statistical features of each node within the current subgroup and calculate the subgroup coupling scalar. The output dimension is The real-time node temporal feature matrix. The subgroup coupling degree Q is an inherent property of the topology. When the topology has not changed, the historical calculation value is directly reused, without repeated calculation for each statistical window. The Q value is only updated synchronously when a topology change is detected. At the same time, the subgroup ID of the current energy storage device under test is obtained, and the subgroup ID is converted into a preset unique integer index. Based on this index, two parallel searches are performed: one retrieves the matching subgroup embedding vector from the trained embedding lookup table, and the other retrieves the subgroup-specific embedding vector with a size of [missing information] based on the pre-stored topology mapping table that corresponds one-to-one between the subgroup ID and the local weighted adjacency matrix. The weighted adjacency matrix is used. Throughout the real-time inference process, all embedding parameters in the embedding lookup table and the weighted adjacency matrix parameters bound to each subgroup remain frozen, and gradient updates are no longer performed. Since only a single subgroup is independently input into the model, there is no parallel batch processing of multiple subgroups, and there is no need to perform dimensional expansion and zero-padding on the feature matrix and adjacency matrix.
[0065] Unlike the batch training phase, the real-time inference phase does not require scaling or zero-padding of the feature matrix and adjacency matrix. Since inference is currently performed on only a single subgroup, the GCN graph convolutional network layers directly use the original size of that subgroup. Adjacency matrix pairs Message passing is performed based on node features, and the output dimension is... The spatial coupling characteristics are then analyzed. Subsequently, a categorical pooling module aggregates the variable-dimensional node features into concatenated subgroup-level feature vectors of constant dimension: energy storage, converter, and bus-level aggregated vectors. Feature association is then performed here: the basic subgroup-level feature vectors, the retrieved subgroup ID embedding vectors, and the independent subgroup coupling degrees are combined. The feature vectors are concatenated along the feature dimension to form the real-time subgroup-level feature vector at the current moment. To meet the input sequence length requirements of the Long Short-Term Memory (LSTM) network layer, the system incorporates a sliding window caching mechanism: for each energy storage device subgroup to be tested, an independent first-in-first-out (FIFO) cache queue is established, with a queue length of 5, to store the real-time subgroup-level feature vectors of 5 consecutive statistical windows. When the first statistical window arrives, the feature vector of that window is copied 5 times to fill the cache queue, ensuring the integrity of the input sequence during the initial inference phase. As subsequent windows continue to arrive, whenever the real-time subgroup-level feature vector of the current window is received, it is pushed to the tail of the cache queue, and the oldest historical feature vector at the head of the queue is popped, always maintaining that the queue contains the latest 5 consecutive window features. During inference, the sequence of 5 feature vectors stacked in chronological order in the cache queue is directly read as the input to the LSM network layer, ensuring that the data organization is completely consistent with that during the real-time inference and model training phases. The LSM network layer receives this sequence and extracts the temporal evolution pattern, then compresses it to a 16-dimensional latent space vector through an encoding dimensionality reduction layer, and inputs it to the decoder for reconstruction.
[0066] Calculate the instantaneous reconstruction error between the real-time subgroup-level feature vector output by the classification pooling module and the reconstructed real-time subgroup-level feature vector output by the output layer.
[0067] In one embodiment, the encoder sequentially extracts spatial coupling and temporal evolution features through a GCN graph convolutional network layer and a long short-term memory network layer, and compresses them to a 16-dimensional latent space vector through an encoding dimensionality reduction layer. During this process, the output of the GCN graph convolutional network layer is processed by a classification pooling module to form a real-time subgroup-level feature vector. This vector simultaneously contains spatial coupling information of energy storage, PCS (converter), and bus within the subgroup, as well as the overall topological coupling strength of the subgroup, representing the model's essential representation of the current subgroup's operating state. The decoder then performs dimensionality upscaling reconstruction on this 16-dimensional latent vector, ultimately outputting a reconstructed real-time subgroup-level feature vector with dimensions completely identical to the aforementioned subgroup-level feature vector. The deviation between the reconstructed real-time subgroup-level feature vector and the original real-time subgroup-level feature vector is calculated and used as the basis for anomaly detection. The reconstruction error is selected as the basic metric, and its calculation uses the mean squared error function, with the following formula: ,in, This represents the instantaneous reconstruction error at the current moment. This represents the dimension of the real-time subgroup-level feature vector. Represents the th element in the real-time subgroup-level feature vector. The original value of the dimension. The first eigenvector represents the reconstructed real-time subgroup-level feature vector. Dimensionality. Because the model is trained using only samples from normal operating conditions, its reconstruction error for normal patterns is extremely small, while its reconstruction error for abnormal states that deviate from normal patterns is relatively large.
[0068] The instantaneous reconstruction error is normalized using Z-score based on a sliding window to obtain a subgroup anomaly index. The subgroup anomaly index is then compared with a preset risk threshold to classify the corresponding anomaly risk level.
[0069] In one embodiment, to further eliminate the impact of random fluctuations within a single window and quantify the degree of anomaly, the subgroup anomaly index is used. As the final evaluation metric, the reconstruction error distribution within the sliding window is normalized to obtain... The specific calculation method is as follows: record the average historical reconstruction error of the past 100 consecutive statistical windows. Standard deviation of historical reconstruction error Experiments have shown that when the historical window length is set to 100 statistical windows, the model's anomaly detection F1 score on the validation set reaches its peak. This duration effectively covers the typical deep charge-discharge cycle of an energy storage system, ensuring statistical significance of the historical distribution. Therefore, this embodiment uses 100 windows. The instantaneous reconstruction error at the current moment is then calculated. The Z-score value relative to the historical distribution, i.e. .
[0070] It should be noted that if the number of available historical statistical windows is less than 100, differentiated processing will be applied in two scenarios: When the number of valid historical windows is greater than or equal to 10 but less than 100, the mean and standard deviation of all currently collected valid instantaneous reconstruction error samples will be directly calculated to obtain the subgroup anomaly index through Z-score normalization, and the risk level will still be classified according to the preset threshold; when the number of valid historical windows is less than 10, the Z-score normalization classification logic will not be enabled. The valid historical window mentioned here specifically refers to a statistical window that has completed data cleaning, has no communication distortion, has no long-term packet loss, and is in a stable control state; if a window is determined to be invalid, it will be directly removed and will not be included in the number of valid historical windows. Only the original value of the instantaneous reconstruction error at each moment will be stored in real time, and no risk warning signal will be output externally. Once the cumulative number of valid historical windows reaches 10, the system will automatically switch to the normalization classification mode to solve the cold start problem of not being able to quantify the degree of anomaly due to the lack of sufficient historical distribution samples in the early stage of deployment. The selection of 10 samples is based on the following: when the number of samples is less than 10, the mean and standard deviation calculated from a small number of instantaneous reconstruction error samples are highly random and cannot form a stable error distribution. The Z-score subgroup anomaly index calculated based on this distribution is severely distorted and is prone to generating a large number of false alarms. On the other hand, 10 statistical windows correspond to a runtime of 50 minutes, which only requires a short time to accumulate basic statistical samples, taking into account both the real-time nature of the early warning and the reliability of the statistical results.
[0071] The subgroup's abnormality index This reflects the degree to which the current reconstruction error deviates from historical normal levels; the larger the value, the greater the deviation of the current operating state from the normal manifold. Specifically, when... When the risk threshold is exceeded, the energy storage device subgroup is determined to be abnormal, and based on... The size of the abnormal risk level is used to classify the risk level. In one embodiment, three risk levels are set: when When the risk level is determined to be low, it indicates that the operating status has slightly deviated from the normal baseline and requires attention; when When the risk level is determined to be medium, it indicates that there are observable anomalies in coupling relationships or equipment performance degradation within the subgroup, requiring an early warning; when When a high-risk level is reached, it indicates a serious fault in the subgroup or a failure in topology connectivity, requiring immediate execution of offline protection or maintenance commands. The risk level thresholds of 3 and 5 are set based on the following: Under normal operating conditions, reconstruction errors mainly consist of acquisition noise and minor fluctuations in operating conditions, and their values approximately follow a normal distribution. Therefore, the risk thresholds can be set with reference to the statistical characteristics of a normal distribution. (Referring to the normal distribution...) in principle, As a Z-score indicator of reconstruction error relative to the historical normal distribution, its historical normal segment should be concentrated around 0 in steady state; when When the value is >3, it corresponds to an extreme probability of approximately 0.135% in the one-sided tail of the normal distribution, which can effectively filter out false alarms caused by data acquisition noise and instantaneous power fluctuations; when When the threshold is >5, the probability of a single-tailed error in the normal distribution is far below 0.0001%, indicating a significant departure from the normal distribution range and a clear physical anomaly. Experiments have verified that when the low-risk threshold is set to 3, false alarms caused by data acquisition noise or instantaneous power fluctuations can be effectively filtered out, maintaining sensitivity while keeping the false alarm rate within an acceptable range. When the medium-risk threshold is set to 5, substantial topological loosening or equipment performance degradation within the subgroup can be accurately detected. At this point, the reconstruction error has significantly deviated from the normal distribution range and has a clear physical anomaly.
[0072] Through the above steps, a complete judgment process from real-time feature input to anomaly risk classification is realized, which effectively improves the robustness and interpretability of anomaly detection for energy storage equipment subgroups.
[0073] Furthermore, based on the above method embodiments, the present invention also provides an artificial intelligence-based virtual power plant anomaly detection system, including a memory, a processor, and computer programs stored in the memory. These programs are adapted to be loaded and executed by the processor to implement the above-described artificial intelligence-based virtual power plant anomaly detection method. The system includes: Topology building module: Used to construct an electrical topology diagram of the virtual power plant, including edge weights, by using energy storage devices, converters, and buses as network nodes. Subgroup partitioning module: used to calculate the betweenness centrality of each node in the electrical topology diagram of the virtual power plant to determine the centrality anchor point, and to execute the improved label propagation algorithm based on the centrality anchor point to obtain the energy storage device subgroup and the corresponding energy storage device subgroup ID; Feature extraction module: used to collect historical operating data of energy storage equipment subgroup, extract electrical time domain features and extract topological coupling correlation features based on the electrical topology map of the virtual power plant, and fuse them to obtain the baseline feature data of energy storage equipment subgroup; Model building and training module: used to build an anomaly detection model for energy storage device subgroups; mapping each energy storage device subgroup ID to a fixed-dimensional embedding vector, using the embedding vector and energy storage device subgroup feature data as training samples, and simultaneously optimizing the embedding vector and model parameters during training to obtain the energy storage device subgroup anomaly detection model; Anomaly detection and classification module: It is used to collect real-time energy storage device subgroup feature data and input it together with the embedded vector into the energy storage device subgroup anomaly detection model. Based on the output reconstruction features, it calculates the reconstruction error, obtains the subgroup anomaly degree index after normalization, and classifies the anomaly risk level according to the subgroup anomaly degree index.
[0074] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, the phrase "comprising an element defined as..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0075] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. An artificial intelligence-based method for detecting anomalies in a virtual power plant, characterized in that: Includes the following steps: Step S1: Construct the electrical topology diagram of the virtual power plant; An improved label propagation algorithm incorporating central anchor points is used to perform community detection on the electrical topology graph of a virtual power plant, resulting in the energy storage device subgroup and energy storage device subgroup ID of the virtual power plant. Step S2: Collect the operating data of the energy storage equipment subgroup under historical normal operating conditions, construct the operating benchmark data of the energy storage equipment subgroup, and perform electrical time domain feature extraction and topological coupling correlation feature extraction on the operating benchmark data of the energy storage equipment subgroup to obtain the benchmark feature data of the energy storage equipment subgroup. Step S3: Construct an anomaly detection model for energy storage equipment subgroups based on autoencoders. Use the baseline feature data of energy storage equipment subgroups and the embedding vector of the corresponding energy storage equipment subgroup ID as the training set, and input them into the energy storage equipment subgroup anomaly detection model for training to obtain the trained energy storage equipment subgroup anomaly detection model. Step S4: Collect real-time energy storage device subgroup feature data and obtain the embedding vector of the corresponding energy storage device subgroup ID. Input them into the trained energy storage device subgroup anomaly detection model. Calculate the reconstruction error based on the reconstruction features output by the energy storage device subgroup anomaly detection model. After normalization, obtain the subgroup anomaly degree index. Divide the anomaly risk level based on the subgroup anomaly degree index.
2. The artificial intelligence-based virtual power plant anomaly detection method according to claim 1, characterized in that: Step S1 includes the following steps: Construct a virtual power plant electrical topology diagram; calculate the betweenness centrality of all nodes in the virtual power plant electrical topology network, and determine the nodes with the highest betweenness centrality ranking by a preset percentage as centrality anchors; assign an initial subgroup label to each centrality anchor, and do not assign labels to non-anchor nodes initially; Perform label iteration update operation: During the iteration process, keep the subgroup labels of all central anchor points fixed; for nodes that are not central anchor points, update the subgroup labels in order of betweenness centrality from small to large, use the normalized weight of the corresponding edge of the neighbor node as the voting weight, calculate the weighted total vote of each subgroup label, and update the subgroup label of the non-central anchor point node to the subgroup label with the highest weighted total vote. After the iteration is completed, nodes with the same subgroup label are divided into the same energy storage device subgroup, and each energy storage device subgroup is assigned a corresponding energy storage device subgroup ID.
3. The artificial intelligence-based virtual power plant anomaly detection method according to claim 2, characterized in that: The construction of the virtual power plant electrical topology diagram includes the following steps: The energy storage devices, converters, and buses in the virtual power plant are used as network nodes in the electrical topology diagram of the virtual power plant. Two types of topology edges are established: an equipment edge is constructed between the energy storage device and the converter that is directly electrically connected to it, and a bus edge is constructed between the converter and the corresponding bus. For the equipment edge, the Pearson correlation coefficient is calculated based on the historical operating power sequence between the corresponding energy storage device and the converter, and the absolute value of the Pearson correlation coefficient is used as the edge weight of the equipment edge; for the bus edge, the reciprocal of the reactance value of the electrical connection between the converter and the bus is used as the edge weight of the bus edge; Min-Max normalization is performed on all equipment edge weights and bus edge weights respectively to obtain the normalized edge weights; By integrating all network nodes, topology edges, and their corresponding normalized edge weights, the final virtual power plant electrical topology graph is obtained.
4. The artificial intelligence-based virtual power plant anomaly detection method according to claim 2, characterized in that: The calculation of the betweenness centrality of all nodes in the virtual power plant electrical topology network includes the following steps: Convert the normalized edge weights into equivalent path costs; The shortest path between all node pairs in the electrical topology of the virtual power plant is found based on the equivalent path cost, and the betweenness centrality of each node is calculated using the betweenness centrality formula.
5. The artificial intelligence-based virtual power plant anomaly detection method according to claim 1, characterized in that: Step S2 includes the following steps: Collect operating baseline data of energy storage equipment subgroups, and extract electrical time-domain features from the operating baseline data of the energy storage equipment subgroups to obtain the time-domain features of the subgroup nodes; The subgroup of energy storage devices is subjected to topological coupling correlation feature extraction based on the operating baseline data to obtain the subgroup coupling degree. The temporal features of the subgroup nodes are associated with and stored with the coupling degree of the subgroup to obtain the reference feature data of the energy storage device subgroup.
6. The artificial intelligence-based virtual power plant anomaly detection method according to claim 5, characterized in that: Obtaining the temporal features of the subgroup nodes includes the following steps: For network nodes with energy storage device type, extract the mean, standard deviation, peak-to-valley difference, and waveform factor of voltage dimension, the mean, standard deviation, peak-to-valley difference, and waveform factor of current dimension, and the rate of change of state of charge (SOC) per unit time. For network nodes with converter type, extract the mean, standard deviation, peak-to-valley difference of active power, and the mean, standard deviation, peak-to-valley difference of reactive power. For network nodes with a node type of bus, extract the mean and standard deviation of the voltage phase.
7. The artificial intelligence-based virtual power plant anomaly detection method according to claim 5, characterized in that: Obtaining the subgroup coupling degree includes the following steps: Determine the set of nodes contained within the energy storage device subgroup; Based on the edge weights and node sets in the electrical topology graph of the virtual power plant, the subgroup coupling degree corresponding to each energy storage device subgroup is calculated using the modularity formula.
8. The artificial intelligence-based virtual power plant anomaly detection method according to claim 5, characterized in that: The step of associating and storing the temporal features of the subgroup nodes with the coupling degree of the subgroup includes the following steps: Using the energy storage device subgroup ID as an index, the temporal characteristics and subgroup coupling degree of the corresponding subgroup nodes under the same energy storage device subgroup are bound to the same index item to obtain the benchmark characteristic data of the energy storage device subgroup.
9. The artificial intelligence-based virtual power plant anomaly detection method according to claim 1, characterized in that: Step S3 includes the following steps: Construct an anomaly detection model for energy storage device subgroups based on self-encoders; The energy storage device subgroup ID is mapped to a fixed-dimensional embedding vector, and the embedding vector and the reference feature data of the energy storage device subgroup are input into the energy storage device subgroup anomaly detection model. The energy storage device subgroup anomaly detection model is trained with minimizing the reconstruction error as the objective function until the preset training termination condition is met, and the trained energy storage device subgroup anomaly detection model is obtained.
10. The artificial intelligence-based virtual power plant anomaly detection method according to claim 9, characterized in that: The construction of the energy storage device subgroup anomaly detection model based on self-encoder includes the following steps: The structure of the energy storage device subgroup anomaly detection model consists of two parts: an encoder and a decoder. The encoder includes an input layer, a GCN graph convolutional network layer, a classification pooling module, a long short-term memory network layer, and an encoding dimensionality reduction layer; the decoder includes a decoding dimensionality increase layer and an output layer. The input layer is used to receive the temporal features of subgroup nodes, subgroup coupling degree, and embedding vector from the subgroup reference feature data of the energy storage device subgroup; The GCN graph convolutional network layer is used to receive the temporal features of the subgroup nodes of the input layer and the weighted adjacency matrix of the energy storage device subgroup, and output the spatial coupling feature matrix to the classification pooling module after graph convolution operation. The categorical pooling module is used to perform mean pooling on the spatial coupling feature matrix according to node type to obtain the aggregate vector of each node type, and concatenate the aggregate vector of each node type along the feature dimension to output the basic subgroup-level feature vector. Then, the basic subgroup-level feature vector, the embedding vector of the energy storage device subgroup ID, and the subgroup coupling degree are concatenated along the feature dimension to obtain the subgroup-level feature vector. The Long Short-Term Memory (LSTM) network layer is used to receive a temporal sequence composed of subgroup-level feature vectors and return the hidden state of the last time step as a temporal feature vector, which is then output to the encoding dimensionality reduction layer. The encoding dimensionality reduction layer is used to compress the temporal feature vector into a low-dimensional latent space vector; The decoding up-dimensionality layer receives the low-dimensional latent space vector and performs up-dimensionality reconstruction to obtain the reconstructed features; The output layer performs a fully connected mapping on the reconstructed features and outputs the reconstructed subgroup-level feature vectors.
11. The artificial intelligence-based virtual power plant anomaly detection method according to claim 9, characterized in that: The step of mapping the energy storage device subgroup ID to a fixed-dimensional embedding vector includes the following steps: Pre-construct a subgroup ID embedding lookup table containing a trainable embedding matrix; The corresponding embedding vector is obtained by retrieving the subgroup ID embedding lookup table based on the subgroup ID of the energy storage device to be detected.
12. The artificial intelligence-based virtual power plant anomaly detection method according to claim 9, characterized in that: The pre-constructed subgroup ID embedding lookup table containing a trainable embedding matrix includes the following steps: Establish a mapping relationship between energy storage device subgroup IDs and corresponding embedding vectors to obtain a subgroup ID embedding lookup table.
13. The artificial intelligence-based virtual power plant anomaly detection method according to claim 1, characterized in that: Step S4 includes the following steps: Real-time operational data of each energy storage device subgroup is collected and features are extracted to obtain real-time energy storage device subgroup feature data. The real-time energy storage device subgroup feature data and the embedding vector of the corresponding energy storage device subgroup ID are input into the trained energy storage device subgroup anomaly detection model, and the reconstructed subgroup-level feature vector is output. After error calculation and normalization, the subgroup anomaly degree index is obtained. The subgroup anomaly degree index is compared with the preset risk threshold to classify the corresponding anomaly risk level.
14. The artificial intelligence-based virtual power plant anomaly detection method according to claim 13, characterized in that: The subgroup anomaly index obtained after error calculation and normalization includes the following steps: Calculate the instantaneous reconstruction error between the real-time subgroup-level feature vector output by the classification pooling module and the reconstructed real-time subgroup-level feature vector output by the output layer; The instantaneous reconstruction error is normalized using Z-score based on a sliding window to obtain the subgroup anomaly index.
15. An AI-based virtual power plant anomaly detection system, the system being used to implement the AI-based virtual power plant anomaly detection method according to any one of claims 1-14, the system comprising: Topology building module: Used to construct an electrical topology diagram of the virtual power plant, including edge weights, by using energy storage devices, converters, and buses as network nodes. Subgroup partitioning module: used to calculate the betweenness centrality of each node in the electrical topology diagram of the virtual power plant to determine the centrality anchor point, and to execute the improved label propagation algorithm based on the centrality anchor point to obtain the energy storage device subgroup and the corresponding energy storage device subgroup ID; Feature extraction module: used to collect historical operating data of energy storage equipment subgroup, extract electrical time domain features and extract topological coupling correlation features based on the electrical topology map of the virtual power plant, and fuse them to obtain the baseline feature data of energy storage equipment subgroup; Model building and training module: used to build an anomaly detection model for energy storage device subgroups; mapping each energy storage device subgroup ID to a fixed-dimensional embedding vector, using the embedding vector and energy storage device subgroup feature data as training samples, and simultaneously optimizing the embedding vector and model parameters during training to obtain the energy storage device subgroup anomaly detection model; Anomaly detection and classification module: It is used to collect real-time energy storage device subgroup feature data and input it together with the embedded vector into the energy storage device subgroup anomaly detection model. Based on the output reconstruction features, it calculates the reconstruction error, obtains the subgroup anomaly degree index after normalization, and classifies the anomaly risk level according to the subgroup anomaly degree index.
