SPO-based electric energy quality optimization device

By using an SPO-based power quality optimization device, which employs an isolated forest model and a data deep analysis module to identify anomaly characteristics, the problem of difficulty in identifying complex anomalies in traditional devices is solved, and efficient optimization of power quality in the distribution network is achieved.

CN121744152APending Publication Date: 2026-03-27ANHUI JIANCHI INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-24
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Traditional SPO devices are prone to identification difficulties or misjudgments when identifying complex or superimposed anomalies, and existing technologies are difficult to effectively analyze and optimize the power quality of distribution networks.

Method used

A power quality optimization device based on SPO is adopted, including a power grid data acquisition module, a data processing module, a data deep analysis module, and an optimization execution module. It uses the isolated forest model to quickly analyze abnormal data, identifies abnormal features through the data deep analysis module, generates abnormal feature analysis data, and combines the SPO analysis and decision module to optimize the execution strategy.

Benefits of technology

It enables rapid identification and accurate analysis of abnormal events in the distribution network, avoids the difficulty in identifying atypical anomalies, and improves the accuracy and efficiency of power quality optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121744152A_ABST
    Figure CN121744152A_ABST
Patent Text Reader

Abstract

The invention discloses an SPO-based power quality optimization device, which relates to the technical field of power quality optimization and comprises a power grid data acquisition module, a data processing module, a data depth analysis module, an SPO analysis decision module and an optimization execution module. The power grid data acquisition module is used for acquiring three-phase voltage data and three-phase current data with timestamps of a power grid target node to generate a power grid original data sequence; according to the SPO-based power quality optimization device, abnormal data identified by an isolated forest re-traverses each isolated tree in the isolated forest through a data deep analysis module, and data anomaly caused by feature anomaly of one or more items in the abnormal data is analyzed; the SPO can conveniently search the corresponding control strategy and the control instruction according to the abnormal characteristics to optimize the power quality of the power distribution network, and meanwhile, the abnormal characteristic analysis data is combined with the original analysis result of the SPO and then the control strategy is matched, so that an isolated forest is prevented from neglecting simple and more anomalies.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of power quality optimization, and particularly relates to a power quality optimization device based on SPO. BACKGROUND

[0002] SPO (Smart Power Quality Optimizer) is a new power electronic device for improving the power quality of distribution area, which mainly solves the problems of three-phase imbalance, reactive power, harmonic pollution and voltage fluctuation in distribution network.

[0003] However, in the process of optimizing and analyzing the power quality of the distribution network, the traditional SPO device is prone to the situation that the recognition algorithm of abnormal events is difficult to recognize or misjudges when analyzing complex or multiple abnormal events superimposed on abnormal events because the recognition algorithm is trained based on a single or typical event. SUMMARY

[0004] The purpose of the present application is to provide a power quality optimization device based on SPO to solve the above-mentioned deficiencies in the prior art.

[0005] In order to achieve the above-mentioned purpose, the present application provides the following technical scheme: a power quality optimization device based on SPO, comprising an electric power grid data acquisition module, a data processing module, a data deep analysis module, an SPO analysis and decision module, and an optimization execution module.

[0006] The electric power grid data acquisition module is used to acquire time-stamped three-phase voltage data and three-phase current data of a target node of the electric power grid, and generate an original electric power grid data sequence; wherein the original electric power grid data sequence comprises a three-phase voltage data sequence and a three-phase current data sequence; the target node of the electric power grid can be at a 10kV / 35kV bus of a high-voltage substation, an important feeder outlet, a PCC point of a large industrial user, and a sensitive load and a specific disturbance source. When collecting, a voltage transformer (PT) and a current transformer (CT) can be used to collect voltage signals or current signals of the corresponding target node, and then signal conditioning (such as anti-aliasing filtering and amplification) is performed, and then a high-speed ADC (analog-to-digital converter) is used for sampling, converting continuous analog signals into discrete digital signal sequences.

[0007] The data processing module is used to pre-process, calculate basic parameters and calculate power quality indicators of the original electric power grid data sequence, and finally perform standardization processing to generate a power quality parameter vector.

[0008] The data deep analysis module is configured to input the power quality parameter vector of each node into an isolation forest model, output an abnormal power quality parameter vector, traverse a path feature of each isolated tree in the isolation forest for the abnormal power quality parameter vector, identify a feature causing the abnormal power quality parameter vector to be determined as abnormal, generate abnormal feature analysis data, and add the abnormal feature analysis data to analysis results of the SPO analysis and decision module;

[0009] The SPO analysis and decision module is configured to perform SPO analysis, diagnosis and decision processing based on the power quality parameter vector, and generate analysis report data and execution command data based on the analysis results after the abnormal feature analysis data is added by the data deep analysis module. The SPO analysis and decision module first analyzes corresponding abnormal diagnosis data according to a data analysis and processing step of an existing SPO, and then obtains a final analysis result by combining the abnormal feature analysis data obtained by the data deep analysis module. The SPO analysis and decision module searches a control strategy and a control instruction corresponding to the final analysis result in a preset knowledge base, so that the optimization execution module executes the control strategy according to the control instruction, and realizes power optimization operation of the power distribution network. The knowledge base is constructed according to industry standards and expert experience, and contains standard solutions for various power quality problems and control instructions set according to the standard solutions.

[0010] The optimization execution module is configured to perform power quality optimization operation according to the execution command data.

[0011] Further, the data processing module generates a power quality parameter vector, including the following steps:

[0012] The power grid original data sequence is subjected to data cleaning (such as removing obvious abnormal points) and noise reduction (such as using wavelet transform and a digital filter to filter white noise) in sequence;

[0013] Then, the voltage effective value, the voltage effective value, the frequency, the active power, the reactive power, the apparent power and the power factor are calculated and processed based on the power grid original data sequence after noise reduction, to generate a voltage effective value sequence, a current effective value sequence, a frequency sequence, an active power sequence, a reactive power sequence, an apparent power sequence and a power factor sequence.

[0014] Based on the original data sequence of the power grid after noise reduction, harmonic spectrum, total harmonic distortion, harmonic content rate, event information, flicker information and voltage unbalance degree information are analyzed and calculated to generate harmonic spectrum data, total harmonic distortion data (THD), harmonic content rate data (HR), event data, flicker data and voltage unbalance degree data, wherein the event information is obtained by the following steps: continuously monitoring the voltage effective value, and determining an event when the voltage effective value exceeds the set threshold (such as 0.1-0.9pu for temporary drop and <0.1pu for interruption); the flicker information is obtained by the following steps: simulating the perception model of human eye to light intensity change, and calculating short-time flicker severity (Pst) and long-time flicker severity (Plt) by analyzing the voltage fluctuation envelope; the voltage unbalance degree can be obtained by using the symmetrical component method to decompose the three-phase voltage into positive, negative and zero sequence components, and the voltage unbalance degree data = (negative sequence component / positive sequence component) x 100%;

[0015] Based on the voltage effective value sequence, current effective value sequence, frequency sequence, active power sequence, reactive power sequence, apparent power sequence, power factor sequence, total harmonic distortion data, harmonic content rate data, event data, flicker data and voltage unbalance degree data after standardization processing, an electric energy quality parameter vector is generated, and in one embodiment, the dimension parameters in each electric energy quality parameter vector are composed of the voltage effective value, current effective value, frequency, active power, reactive power, apparent power, power factor and voltage unbalance degree corresponding to the same time stamp, and the total harmonic distortion, harmonic content rate, duration of the last voltage effective value exceeding the set threshold, the last Pst value and the last Plt value in the set sliding window ending with the time stamp.

[0016] Further, the data deep analysis module outputs the abnormal electric energy quality parameter vector, including the following steps:

[0017] Based on the isolated forest model of the preset parameters, the electric energy quality parameter vector corresponding to the latest time stamp of each power grid target node is analyzed and processed to obtain the abnormal score of each electric energy quality parameter vector;

[0018] It is judged whether the abnormal score of each electric energy quality parameter vector exceeds the set abnormal score threshold, if yes, the corresponding electric energy quality parameter vector is set as an abnormal electric energy quality parameter vector and output, wherein the abnormal score ; Path length: refers to the number of edges required for the sample to pass through the feature selection mode of the isolated tree construction stage from the root node of the tree to the node where the sample is isolated; Indicates the average value of the path length of the sample in all trees in the forest; The average path length of the isolated tree is n, and n is the number of power quality parameter vectors input into the isolated forest model.

[0019] Further, the data deep analysis model generates abnormal feature analysis data, including the following steps:

[0020] Each abnormal power quality parameter vector is input into each isolated tree, and the isolated tree is traversed from the root node of the isolated tree;

[0021] The split features, split thresholds, node depths, parent node sample numbers, and node sample numbers of all non-leaf nodes passed through by each abnormal power quality parameter vector when traversing the isolated tree are recorded, wherein the root node depth is 0, the data of each dimension of the power quality parameter vector corresponds to a type of split feature, the parent node of each node is the node passed through by the abnormal power quality parameter vector in the previous depth node, for example, the parent node of a node with a depth of 1 is the node with a depth of 0 that is passed through by the abnormal power quality parameter vector, and the sample number is the number of all power quality parameter vectors corresponding to the node, if the node is the root node, the parent node sample number is the total number of power quality parameter vectors input into the isolated tree;

[0022] Based on the node depth of each split feature, the proportion of the node sample number to the parent node sample number, and the set effectiveness coefficient, the total weight of each type of split feature of each isolated tree is calculated to generate isolated tree feature total weight data;

[0023] Based on the isolated tree feature total weight data of all types of split features of all isolated trees, the average weight data of each type of classification feature in all isolated trees is calculated and processed to generate split feature average weight data;

[0024] The split feature average weight data of all types of split features is normalized to generate split feature importance score data;

[0025] The Z-score of the split feature importance score data of each type of split feature is calculated to generate split feature importance score data; specifically, the split feature importance score data of a type of split feature is equal to the split feature importance score data of the type of split feature minus the average of the split feature importance score data of all types of split features, and then divided by the standard deviation of the split feature importance score data of all types of split features.

[0026] It is judged whether the split feature importance score data of each type of split feature is greater than the set importance standard deviation threshold, if yes, the corresponding type of split feature is marked as an abnormal feature;

[0027] The feature categories and corresponding split feature importance score data of all marked abnormal features are collected to generate abnormal feature analysis data.

[0028] Further, the total weight of each type of split feature in each isolated tree is calculated based on the node depth of each split feature and the proportion of the number of samples in the node to the number of samples in the parent node, including the following steps:

[0029] For each node on the split path of the abnormal power quality parameter vector in each isolated tree, the split effectiveness data is calculated as 1 minus the proportion of the number of samples in the node to the number of samples in the parent node;

[0030] Based on the split effectiveness data, node depth, and set effectiveness coefficient, the node weight data is calculated by weighted calculation, and the formula is as follows:

[0031] ;

[0032] The total weight data of each type of split feature in each isolated tree is added to generate isolated tree feature total weight data, and each isolated tree feature total weight data corresponds to the total weight of a type of split feature in an isolated tree.

[0033] Further, the set effectiveness coefficient is dynamically reduced as the node depth increases.

[0034] In one embodiment, the shallow node depth threshold and the deep node depth threshold can be set according to the maximum node depth, the effectiveness coefficient in the node weight data formula focuses on the first term when the node depth corresponding to the node weight data is less than the shallow node depth threshold (e.g., the effectiveness data is 0.7-0.9), the effectiveness coefficient in the node weight data formula balances the first and second terms when the node depth corresponding to the node weight data is greater than or equal to the shallow node depth threshold and less than the deep node depth threshold (e.g., the effectiveness data is 0.5-0.6), and the effectiveness coefficient in the node weight data formula focuses on the second term when the node depth corresponding to the node weight data is greater than or equal to the deep node depth threshold (e.g., the effectiveness data is 0.3-0.4).

[0035] Or the effectiveness coefficient gradually decreases within a specified range as the node depth increases, such as:

[0036]

[0037] Where k is a control coefficient.

[0038] Further, the data depth analysis model is also used to analyze the node depth and effectiveness of the abnormal feature appearing in all isolated trees, including the following steps:

[0039] The average effectiveness of each type of split feature in all isolated trees is calculated for the unit node depth, and the feature effectiveness average data is obtained; specifically,

[0040]

[0041] Where t represents the t-th isolated tree, and T is the total number of isolated trees in the isolated forest model. Let i represent all nodes in the t-th isolated tree that correspond to the splitting feature. The i-th node;

[0042] The average node depth of each type of splitting feature in all isolated trees is calculated to generate average feature occurrence depth data; specifically,

[0043]

[0044] Where t represents the t-th isolated tree, and T is the total number of isolated trees in the isolated forest model. Let i represent all nodes in the t-th isolated tree that correspond to the splitting feature. The i-th node;

[0045] The average data of feature validity and the average data of feature occurrence depth are added to the abnormal feature analysis data.

[0046] Furthermore, the data depth analysis module is also used to add the power quality parameters before the abnormal power quality parameter vector is standardized and the corresponding recorded abnormal scores to the abnormal feature analysis data.

[0047] The abnormal feature analysis data can have zero to multiple sets, with the number of sets corresponding to the number of abnormal power quality parameter vectors. Each set of data includes: power quality parameters before the abnormal power quality parameter vector is standardized, abnormal score, abnormal features (there can be multiple) and corresponding split feature importance score data, feature validity average data, and feature occurrence depth average data.

[0048] Beneficial effects:

[0049] Compared with existing technologies, the SPO-based power quality optimization device provided by this invention, by setting up a power grid data acquisition module, a data processing module, and a data depth analysis module, can quickly analyze abnormal data in the data collected from each target distribution network node using the isolated forest model, without the need for feature matching and identification, thus avoiding the problem of not being able to identify atypical anomalies not recorded by the algorithm.

[0050] Compared with existing technologies, the SPO-based power quality optimization device provided by this invention can also re-traverse each isolated tree in the isolated forest through the data deep analysis module to analyze which one or more features in the abnormal data caused the data anomaly. This makes it convenient for SPO to search for corresponding control strategies and control commands based on the anomaly features to optimize the power quality of the distribution network.

[0051] Compared with existing technologies, the SPO-based power quality optimization device provided by this invention can also combine the abnormal feature analysis data analyzed by the data depth analysis module with the original SPO analysis results before matching the control strategy, thereby avoiding the isolation forest from ignoring simple and numerous anomalies and ensuring the accuracy of SPO anomaly identification. Attached Figure Description

[0052] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.

[0053] Figure 1 A system structure block diagram provided for embodiments of the present invention;

[0054] Figure 2 A diagram illustrating the system operation steps provided in this embodiment of the invention;

[0055] Figure 3 This is a schematic diagram of step S5 provided in an embodiment of the present invention;

[0056] Figure 4 This is a schematic diagram of step S5.3 provided in an embodiment of the present invention. Detailed Implementation

[0057] To enable those skilled in the art to better understand the technical solution of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings.

[0058] Exemplary embodiments will be described more fully below with reference to the accompanying drawings; however, these exemplary embodiments may be embodied in different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will enable those skilled in the art to fully understand the scope of this disclosure.

[0059] Where there is no conflict, the various embodiments of this disclosure and the features thereof in the embodiments may be combined with each other.

[0060] As used herein, the term “and / or” includes any and all combinations of one or more related enumerated entries.

[0061] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. As used herein, the singular forms “a” and “the” are also intended to include the plural forms unless the context clearly indicates otherwise. It will also be understood that when the terms “comprising” and / or “made of” are used in this specification, the presence of the stated feature, integral, step, operation, element, and / or component is specified, but the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof is not excluded.

[0062] The embodiments described herein can be described with reference to plan views and / or cross-sectional views using the ideal schematic diagrams of this disclosure. Therefore, the example illustrations can be modified according to manufacturing techniques and / or tolerances. Therefore, the embodiments are not limited to those shown in the drawings, but include modifications to configurations formed based on manufacturing processes. Therefore, the areas illustrated in the drawings are schematic in nature, and the shapes of the areas shown in the figures illustrate specific shapes of areas of an element, but are not intended to be limiting.

[0063] Unless otherwise specified, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having the same meaning as they have in the context of the relevant art and this disclosure.

[0064] Please see Figure 1 The SPO-based power quality optimization device includes a power grid data acquisition module, a data processing module, a data deep analysis module, an SPO analysis and decision-making module, and an optimization execution module.

[0065] The power grid data acquisition module is used to collect timestamped three-phase voltage and three-phase current data from target nodes in the power grid, generating a raw power grid data sequence. This raw data sequence includes both three-phase voltage and current data sequences. Target nodes can be 10kV / 35kV busbars of high-voltage substations, important feeder outlets, PCC points of large industrial users, sensitive loads, and specific disturbance sources. During data acquisition, voltage transformers (PTs) and current transformers (CTs) can be used to collect the voltage or current signals of the corresponding target nodes. Signal conditioning (such as anti-aliasing filtering and amplification) is then performed, followed by sampling via a high-speed ADC (analog-to-digital converter) to convert the continuous analog signal into a discrete digital signal sequence.

[0066] The data processing module is used to preprocess the original power grid data sequence, calculate and process basic parameters and power quality indicators, and finally perform standardization to generate a power quality parameter vector.

[0067] The data deep analysis module is used to input the power quality parameter vectors of each node into the isolated forest model, output abnormal power quality parameter vectors, and then traverse the path features of each isolated tree in the isolated forest to identify the features that cause the abnormal power quality parameter vector to be judged as abnormal, generate abnormal feature analysis data, and add the abnormal feature analysis data to the analysis results of the SPO analysis decision module.

[0068] The SPO analysis and decision-making module performs SPO analysis, diagnosis, and decision processing based on power quality parameter vectors. It generates analysis report data and execution command data based on the analysis results after adding anomaly feature analysis data from the data depth analysis module. The SPO analysis and decision-making module first analyzes the corresponding anomaly diagnostic data according to the existing SPO data analysis and processing steps, and then combines this with the anomaly feature analysis data obtained from the data depth analysis module to obtain the final analysis result. It then searches a pre-set knowledge base for the control strategies and control commands corresponding to the final analysis result, so that the optimization execution module can execute the control strategies according to the control commands to achieve power optimization operations in the distribution network. The knowledge base is built based on industry standards and expert experience, and includes standard solutions for various power quality problems and control commands set according to these standard solutions.

[0069] The optimization execution module is used to perform power quality optimization operations based on the execution command data.

[0070] Please see Figures 2-4 The SPO-based power quality optimization device provided by this invention operates through the following steps:

[0071] S1. The power grid data acquisition module acquires timestamped three-phase voltage and three-phase current data of the target nodes of the power grid and generates the original power grid data sequence.

[0072] S2. The data processing module preprocesses the raw power grid data sequence, calculates basic parameters and power quality indicators, and finally performs standardization to generate a power quality parameter vector. This includes the following steps:

[0073] S2.1 Perform data cleaning (such as removing obvious outliers) and noise reduction (such as using wavelet transform and digital filters to remove white noise) on the original power grid data sequence.

[0074] S2.2 Then, based on the original power grid data sequence after noise reduction, the effective voltage value, frequency, active power, reactive power, apparent power and power factor are calculated and processed to generate the effective voltage value sequence, effective current value sequence, frequency sequence, active power sequence, reactive power sequence, apparent power sequence and power factor sequence.

[0075] S2.3. Based on the noise-reduced original power grid data sequence, the harmonic spectrum, total harmonic distortion (THD), harmonic content (HR), event information, flicker information, and voltage imbalance information are analyzed and calculated to generate harmonic spectrum data, total harmonic distortion (THD) data, harmonic content (HR) data, event data, flicker data, and voltage imbalance data, respectively. Event information is obtained through the following steps: continuously monitoring the effective voltage value; when it exceeds a set threshold (e.g., a temporary drop to 0.1-0.9 pu, and an interruption to <0.1 pu), it is determined as an event. Flicker information is obtained through the following steps: simulating the human eye's perception of light intensity changes, short-term flicker severity (Pst) and long-term flicker severity (Plt) are calculated by analyzing the voltage fluctuation envelope. Voltage imbalance can be achieved by using the symmetrical component method to decompose the three-phase voltage into positive-sequence, negative-sequence, and zero-sequence components. Voltage imbalance data = (negative-sequence component / positive-sequence component) × 100%.

[0076] S2.4. Based on the standardized voltage RMS value sequence, current RMS value sequence, frequency sequence, active power sequence, reactive power sequence, apparent power sequence, power factor sequence, total harmonic distortion rate data, harmonic content rate data, event data, flicker data, and voltage imbalance data, a power quality parameter vector is generated. In one embodiment, the dimension parameters in each power quality parameter vector consist of the voltage RMS value, current RMS value, frequency, active power, reactive power, apparent power, power factor, and voltage imbalance corresponding to the same timestamp, and the total harmonic distortion rate, harmonic content rate, duration of the most recent voltage RMS value exceeding the set threshold, the most recent Pst value, and the most recent Plt value within the set sliding window ending at that timestamp.

[0077] S3, the SPO analysis and decision module performs SPO analysis based on the power quality parameter vector to obtain the analysis results. The SPO analysis process is common knowledge under existing technology and is directly applied here without modification. Therefore, it will not be described in detail in this technical solution, and it will not cause any trouble to this technical solution in the field.

[0078] S4, the data deep analysis module is used to input the power quality parameter vectors of each node into the isolated forest model and output the abnormal power quality parameter vectors, including the following steps:

[0079] S4.1 Based on the isolated forest model with preset parameters, the power quality parameter vector corresponding to the most recent timestamp of each power grid target node is analyzed and processed to obtain the anomaly score of each power quality parameter vector.

[0080] S4.2 Determine whether the anomaly score of each power quality parameter vector exceeds the set anomaly score threshold. If so, set the corresponding power quality parameter vector as an abnormal power quality parameter vector and output it, where the anomaly score is... ; Path length: refers to the number of edges required for a sample to reach the isolated node from the root node of the tree through the feature selection method in the construction phase of the isolated tree; This represents the average path length of the sample across all trees in the forest. denoted as the average path length of the isolated trees, and n is the number of power quality parameter vectors input to the isolated forest model.

[0081] S5. The data depth analysis module traverses the path characteristics of each isolated tree in the isolated forest for the abnormal power quality parameter vector, identifies the features that cause the abnormal power quality parameter vector to be judged as abnormal, and generates abnormal feature analysis data, including the following steps:

[0082] S5.1 Input each abnormal power quality parameter vector into each isolated tree, and traverse the isolated tree from the root node;

[0083] S5.2 Record the splitting features, splitting thresholds, node depths, parent node sample counts, and local node sample counts used by all non-leaf nodes traversed when each abnormal power quality parameter vector traverses the isolated tree. The root node has a depth of 0. Each dimension of the power quality parameter vector corresponds to a splitting feature. The parent node of each node is the node traversed by the abnormal power quality parameter vector in the node at the previous depth. For example, if the depth of this node is 1, its parent node is the node with a depth of 0 that has been traversed by the abnormal power quality parameter vector. The sample count is the total number of power quality parameter vectors in the corresponding node. If this node is the root node, then the sample count of its parent node is the total number of power quality parameter vectors input to the isolated tree.

[0084] S5.3. Based on the node depth of each splitting feature, the proportion of the number of samples in the current node to the number of samples in the parent node, and the set validity coefficient, calculate the total weight of each type of splitting feature for each isolated tree, and generate the total weight data of isolated tree features, including the following steps:

[0085] S5.3.1 For each node on the splitting path of the abnormal power quality parameter vector in each isolated tree, calculate 1 minus the proportion of the number of samples of the corresponding node to the number of samples of the parent node to obtain the splitting validity data.

[0086] S5.3.2. Based on the splitting validity data, node depth, and the set validity coefficient, a weighted calculation is performed to obtain the node weight data, as shown in the following formula:

[0087] ;

[0088] S5.3.3. Add up the weight data of all nodes of each type of split feature in each isolated tree to generate the total weight data of isolated tree features. Each total weight data of isolated tree features corresponds to the total weight of a type of split feature of an isolated tree.

[0089] Furthermore, the effectiveness coefficient is set to decrease dynamically as the node depth increases;

[0090] In one embodiment, shallow node depth thresholds and deep node depth thresholds can be set according to the maximum node depth. When the node depth corresponding to the node weight data is less than the shallow node depth threshold, the validity coefficient emphasizes the first term in the node weight data formula (e.g., validity data is 0.7-0.9). When the node depth corresponding to the node weight data is greater than or equal to the shallow node depth threshold but less than the deep node depth threshold, the validity coefficient balances the first and second terms in the node weight data formula (e.g., validity data is 0.5-0.6). When the node depth corresponding to the node weight data is greater than or equal to the deep node depth threshold, the validity coefficient emphasizes the second term in the node weight data formula (e.g., validity data is 0.3-0.4).

[0091] Alternatively, the effectiveness coefficient may gradually decrease within a specified range as the node depth increases, such as:

[0092]

[0093] Where k is the control coefficient.

[0094] S5.4 Based on the total weight data of the isolated tree features of all categories of the isolated trees, calculate and process the average weight data of each category feature in all isolated trees to generate the average weight data of the split features.

[0095] S5.5 Normalize the average weight data of split features for all categories to generate split feature importance score data.

[0096] S5.6 Calculate the Z-score of the split feature importance score data for each type of split feature, and generate the split feature importance score data; specifically, the split feature importance score data for a type of split feature is equal to the split feature importance score data for that type of split feature minus the average of the split feature importance score data for all types of split features, and then divided by the standard deviation of the split feature importance score data for all types of split features.

[0097] S5.7 Determine whether the importance score data of each type of split feature is greater than the set importance standard deviation threshold. If so, mark the split feature of the corresponding category as an abnormal feature.

[0098] S5.8 Collect the feature categories and corresponding importance scores of all split features marked as anomalous features, and generate anomalous feature analysis data. Furthermore, the power quality parameters before the normalization of the anomalous power quality parameter vector and the corresponding anomalous scores can be added to the anomalous feature analysis data.

[0099] S5.9 The data depth analysis model is also used to analyze the node depth and validity of anomaly features appearing in all isolated trees, and adds them to the anomaly feature analysis data, including the following steps:

[0100] S5.9.1 Calculate the average effectiveness of each type of splitting feature at a unit node depth across all isolated trees to obtain the average feature effectiveness data; specifically,

[0101]

[0102] Where t represents the t-th isolated tree, and T is the total number of isolated trees in the isolated forest model. Let i represent all nodes in the t-th isolated tree that correspond to the splitting feature. The i-th node;

[0103] S5.9.2 Calculate the average node depth of each type of splitting feature across all isolated trees, generating average feature occurrence depth data; specifically,

[0104]

[0105] Where t represents the t-th isolated tree, and T is the total number of isolated trees in the isolated forest model. Let i represent all nodes in the t-th isolated tree that correspond to the splitting feature. The i-th node;

[0106] S5.9.3 Add the average data of feature validity and the average data of feature occurrence depth to the abnormal feature analysis data;

[0107] The abnormal feature analysis data can have zero to multiple sets, with the number of sets corresponding to the number of abnormal power quality parameter vectors. Each set of data includes: power quality parameters before the abnormal power quality parameter vector is standardized, abnormal score, abnormal features (there can be multiple) and corresponding split feature importance score data, feature validity average data, and feature occurrence depth average data.

[0108] S6, the data depth analysis module adds the abnormal feature analysis data to the analysis results of the SPO analysis and decision module.

[0109] The S7 and SPO analysis and decision-making modules perform diagnosis and decision processing based on the analysis results, and generate analysis report data and execution command data based on the analysis results after adding abnormal feature analysis data based on the data depth analysis module.

[0110] S8, the optimization execution module, is used to perform power quality optimization operations based on the execution command data.

[0111] The foregoing has only described certain exemplary embodiments of the present invention by way of illustration. Undoubtedly, those skilled in the art can modify the described embodiments in various ways without departing from the spirit and scope of the present invention. Therefore, the foregoing drawings and descriptions are illustrative in nature and should not be construed as limiting the scope of protection of the claims of the present invention.

Claims

1. A power quality optimization device based on SPO, characterized in that, The power grid data acquisition module, the data processing module, the data deep analysis module, the SPO analysis decision module, and the optimization execution module are included. The power grid data acquisition module is configured to collect time-stamped three-phase voltage data and three-phase current data of a target node of a power grid, and generate a power grid original data sequence. The data processing module is configured to preprocess, calculate basic parameters, and calculate power quality indicators of the power grid original data sequence, and finally perform standardization processing to generate a power quality parameter vector. The data deep analysis module is configured to input the power quality parameter vector of each node into an isolation forest model, output an abnormal power quality parameter vector, traverse the path characteristics of each isolated tree in the isolation forest for the abnormal power quality parameter vector, identify the characteristics that cause the abnormal power quality parameter vector to be determined as abnormal, generate abnormal feature analysis data, and add the abnormal feature analysis data to the analysis result of the SPO analysis decision module. The SPO analysis decision module is configured to perform SPO analysis, diagnosis, and decision processing based on the power quality parameter vector, and generate analysis report data and execution command data based on the analysis result after the data deep analysis module adds the abnormal feature analysis data. The optimization execution module is configured to perform power quality optimization work according to the execution command data.

2. The SPO-based power quality optimization device of claim 1, wherein, The data processing module generates a power quality parameter vector, including the following steps: The power grid original data sequence is first cleaned and denoised. Then, the voltage effective value, the voltage effective value, the frequency, the active power, the reactive power, the apparent power, and the power factor are calculated based on the denoised power grid original data sequence to generate a voltage effective value sequence, a current effective value sequence, a frequency sequence, an active power sequence, a reactive power sequence, an apparent power sequence, and a power factor sequence. Harmonic spectrum data, total harmonic distortion rate data, each harmonic content rate data, event data, flicker data, and voltage unbalance degree data are generated by analyzing and calculating the harmonic spectrum, total harmonic distortion rate, each harmonic content rate, event information, flicker information, and voltage unbalance degree information based on the denoised power grid original data sequence. The power quality parameter vector is generated based on the voltage effective value sequence, the current effective value sequence, the frequency sequence, the active power sequence, the reactive power sequence, the apparent power sequence, the power factor sequence, the total harmonic distortion rate data, the each harmonic content rate data, the event data, the flicker data, and the voltage unbalance degree data after standardization processing.

3. The SPO-based power quality optimization device of claim 1, wherein, The data deep analysis module outputs an abnormal power quality parameter vector, including the following steps: Based on the isolation forest model of the preset parameters, the power quality parameter vector corresponding to the latest time stamp of each power grid target node is analyzed and processed to obtain the abnormal score of each power quality parameter vector. If the abnormal score of each power quality parameter vector exceeds the set abnormal score threshold, the corresponding power quality parameter vector is set as an abnormal power quality parameter vector and output.

4. The SPO-based power quality optimization device of claim 1, wherein, The data deep analysis model generates abnormal feature analysis data, including the following steps: Input each abnormal power quality parameter vector into each isolated tree respectively, and traverse the isolated tree from the root node of the isolated tree; Record the split feature, split threshold, node depth, parent node sample number, and current node sample number used by all non-leaf nodes passed through by each abnormal power quality parameter vector when traversing the isolated tree; Calculate the total weight of each type of split feature in each isolated tree based on the node depth, the proportion of the current node sample number to the parent node sample number, and the setting effectiveness coefficient, and generate isolated tree feature total weight data; Calculate the average weight data of each type of classification feature in all isolated trees based on the isolated tree feature total weight data of all types of split features of all isolated trees, and generate split feature average weight data; Perform normalization processing on the split feature average weight data of all types of split features, and generate split feature importance score data; Calculate the Z-score of the split feature importance score data of each type of split feature, and generate split feature importance score data; Determine whether the split feature importance score data of each type of split feature is greater than the set importance standard deviation threshold, and if so, mark the corresponding type of split feature as an abnormal feature; Collect the feature categories and corresponding split feature importance score data of all split features marked as abnormal features, and generate abnormal feature analysis data.

5. The SPO-based power quality optimization device of claim 4, wherein, The calculation of the total weight of each type of split feature in each isolated tree based on the node depth and the proportion of the current node sample number to the parent node sample number includes the following steps: For each node on the split path of the abnormal power quality parameter vector in each isolated tree, calculate 1 minus the proportion of the corresponding current node sample number to the parent node sample number to obtain split effectiveness data; Based on the split effectiveness data, node depth, and setting effectiveness coefficient, perform weighted calculation to obtain node weight data, and the formula is as follows: ; Add all node weight data of each type of split feature in each isolated tree to generate isolated tree feature total weight data.

6. The SPO-based power quality optimization device of claim 3, wherein, The data depth analysis module is also used to add the power quality parameters before normalization processing of the abnormal power quality parameter vector and the corresponding recorded abnormal score to the abnormal feature analysis data.

7. The SPO-based power quality optimization device of claim 4, wherein, The setting effectiveness coefficient dynamically decreases as the node depth increases.

8. The SPO-based power quality optimization device of claim 1, wherein, The data depth analysis model is also used to analyze the comprehensive node depth and effectiveness of the abnormal feature appearing in all isolated trees, including the following steps: Calculate the average effectiveness of each type of split feature in all isolated trees per unit node depth to obtain feature effectiveness average data; Calculate the average node depth of each type of split feature appearing in all isolated trees to generate feature appearance depth average data; Add the feature effectiveness average data and feature appearance depth average data to the abnormal feature analysis data.