Rusboost island detection method applied to direct current microgrid

By using the RUSBoost islanding detection method, a strong classifier is built using historical data of electrical features, which solves the problems of slow detection speed and low accuracy in DC microgrids, and achieves efficient and accurate islanding detection, reducing system complexity and cost.

CN116973654BActive Publication Date: 2026-04-17XIAN UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
XIAN UNIV OF TECH
Filing Date
2023-06-14
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Existing methods for detecting islanding in DC microgrids are slow and have low accuracy. Traditional methods cannot simultaneously address both detection blind spots and power quality issues.

Method used

The RUSBoost islanding detection method is adopted. By collecting historical data of electrical characteristics under grid-connected and islanded conditions, an islanding detection model based on RUSBoost is constructed. Classification and regression decision trees are used for islanding detection. Random undersampling technology is combined to handle the data imbalance problem, and a strong classifier is established for real-time detection.

Benefits of technology

It achieves efficient and accurate island detection, reduces detection blind spots, maintains power quality, and reduces system complexity and cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116973654B_ABST
    Figure CN116973654B_ABST
Patent Text Reader

Abstract

This invention discloses a RUSBoost islanding detection method applied to DC microgrids. Specifically, it involves: collecting historical data of electrical characteristics under both grid-connected and islanded states to form an unbalanced dataset; using the historical data as a training set and preprocessing it to form a training sample set; constructing a weak islanding classifier based on classification and regression decision trees; evaluating the model's correctness using a confusion matrix; and establishing a RUSBoost-based islanding detection model; applying the constructed RUSBoost-based islanding detection model to the microgrid system to classify grid-connected and islanded states based on real-time voltage and current data. This invention applies an ensemble classification algorithm from machine learning to DC microgrids, solving the problems of slow detection speed and low accuracy of existing detection methods.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of DC microgrid islanding detection technology, specifically the RUSBoost islanding detection method applied to DC microgrids. Background Technology

[0002] With the rapid development of new energy sources, distributed generation technology has gradually become an important power support for large power grids. However, the intermittent and fluctuating nature of photovoltaic and wind power generation poses significant challenges to the direct grid connection of distributed power sources. Microgrids, on the other hand, can operate both connected to the main grid and in isolation, greatly improving the distribution system's capacity to accommodate distributed power sources and enhancing energy efficiency. Since distributed photovoltaic systems, energy storage devices, electric vehicles, household appliances, and most loads have DC input / output characteristics, DC microgrids, compared to AC microgrids, not only reduce energy losses in the AC / DC conversion stage but also improve system efficiency and reliability, while offering lower control complexity and construction costs.

[0003] The operation modes of DC microgrids are mainly divided into grid-connected operation and islanded operation. Grid-connected operation means that distributed power sources, loads, energy storage devices, etc. are connected to the main grid, which is used to balance power and maintain the stability of the bus voltage. Islanded operation means that when the main grid is out of service for maintenance or an abnormal fault occurs, the connection between other devices and the main grid is disconnected. Only distributed power sources, loads, and energy storage devices exist in the microgrid. At this time, the bus voltage is affected by the power fluctuations within the system, and the energy storage devices need to change their operating mode to maintain the bus voltage.

[0004] Islanding is further divided into planned islanding and unplanned islanding. Planned islanding occurs when the connection between the main grid and the microgrid is disconnected due to scheduling or manual disconnection. Unplanned islanding occurs when the connection between the main grid and the microgrid is disconnected due to a main grid failure or other reasons. Unplanned islanding can cause certain harm to users or the system. From both a safety and stability perspective, microgrid islanding detection is necessary and essential.

[0005] In DC microgrids, due to the lack of electrical quantities such as frequency and phase, islanding detection relies primarily on changes in the voltage amplitude at the point of common coupling (PCC). Therefore, islanding detection methods applied to DC systems are particularly scarce and challenging. Currently, islanding detection methods can be categorized into three types: remote, passive, and active. Remote methods primarily rely on communication technology to monitor and transmit circuit breaker status information. While this method boasts extremely high accuracy, it is limited by high costs. Passive methods are based on a voltage threshold of the PCC; exceeding the threshold indicates islanding. Passive methods are computationally simple and have a fast response time, but they suffer from a significant non-detection zone (NDZ). Active methods inject small disturbances and detect changes in electrical quantities caused by these disturbances to determine islanding occurrence and reduce or eliminate the detection blind zone. However, the injection of disturbances can affect power quality. It is evident that traditional methods struggle to simultaneously address the need to resolve the detection blind zone and maintain good power quality. However, with the development of artificial intelligence technologies such as machine learning and deep learning, intelligent islanding detection methods based on data mining have gradually emerged to address the problems of traditional islanding detection techniques. Summary of the Invention

[0006] The purpose of this invention is to provide a RUSBoost islanding detection method for DC microgrids, which solves the problems of slow detection speed and low accuracy of existing detection methods.

[0007] The technical solution adopted in this invention is a RUSBoost islanding detection method applied to DC microgrids, which is specifically carried out according to the following steps:

[0008] Step 1: Collect historical data of electrical characteristic quantities under grid-connected and islanded conditions respectively to form an unbalanced dataset;

[0009] Step 2: Use historical data as the training set and preprocess it to form a training sample set;

[0010] Step 3: Construct a weak classifier for island detection based on classification and regression decision trees, and then form a strong classifier for island detection. Use the confusion matrix to evaluate the correctness of the model and establish an island detection model based on RUSBoost.

[0011] Step 4: Apply the constructed RUSBoost-based islanding detection model to the microgrid system and classify grid-connected and islanded states based on real-time voltage and current data.

[0012] The invention is further characterized in that,

[0013] Step 1 specifically involves:

[0014] Step 1.1 When the DC microgrid is running in grid connection, the power of the distributed power source, the load and the grid are in dynamic balance. The power balance relationship of the DC microgrid is established as shown in equation (1).

[0015]

[0016] Among them, P L For load power, P G For the output power of the large power grid, P DG For the output power of distributed power sources, U PCC R is the voltage at point PCC. L The load equivalent resistance;

[0017] When operating in an isolated environment and the energy storage unit does not switch its operating mode, the voltage at PCC changes with the power fluctuations within the system. The output power relationship of the distributed power source at this time is shown in equation (2).

[0018]

[0019] In equation (2), U′ PCC ΔU is the voltage at point PCC during islanded operation, and ΔU is the voltage difference between grid-connected operation and islanded operation.

[0020] Step 1.2: Substitute equation (2) into equation (1) to eliminate P. DG The relationship between the voltage change ΔU at the PCC point before and after the occurrence of islanding in the DC microgrid is obtained, as shown in equation (3):

[0021]

[0022] The corresponding change in current ΔI is shown in equation (4):

[0023]

[0024] PCC voltage, load current, PCC voltage change rate, and load current change rate are used as effective characteristic electrical quantities for islanding detection, and relevant historical data are collected. Historical data of electrical characteristic quantities under grid-connected and islanded conditions are collected separately to form an unbalanced dataset, which includes majority class samples and minority class samples. Data under grid-connected conditions are majority class samples, and data under islanded conditions are minority class samples.

[0025] Step 2 specifically involves: sampling an imbalanced dataset using the RUS method, randomly deleting majority class samples to ensure a 1:1 ratio between majority and minority class samples; and establishing a training sample set G, containing feature parameters X and class labels Y, with the data model shown in the following equation:

[0026] G = {X, Y} (5);

[0027] X = {x1, x2, ..., x} i …,x j}T (6);

[0028] Y = {y1, y2, ... y} i …,y j} T (7);

[0029] In the formula: x i y is the value of the feature quantity in the i-th row of samples; j is the total number of samples in the training sample set; i Let i be the category of the sample in the i-th row;

[0030] Among them, the characteristic parameter X refers to the selected islanded characteristic electrical quantity, and the class label Y refers to the operating state of the microgrid, that is, "0" represents the grid-connected state and "1" represents the islanded state.

[0031] Step 3 specifically involves:

[0032] Step 3.1: Construct a weak classifier, i.e., a CART classifier; initialize the weight distribution of each sample in the training sample set G, assigning the same weight to each training sample during the first iteration: w 1i =1 / j, then the initial weight distribution D1 of the training sample set G is:

[0033]

[0034] After g iterations, the weight distribution is D. g By training the CART classification model with the training sample set, we can obtain the k decision tree classifiers H in the g-th iteration. gs (x):

[0035] H gs (x):Y→{-1,1},s=1,2,…k (9);

[0036] Step 3.2: Calculate the classification error rate e for each of the above k decision tree classifiers. gs Choose e gs The smallest classifier is used as the weak classifier H in the g-th iteration. g (x);

[0037] Among them, the classification error rate e gs Represents the classifier H gs (x) The sum of weights corresponding to the error-classified samples:

[0038]

[0039] In the formula: I is the total number of misclassified samples; w gi Let be the weight of the i-th sample in the training sample set during the g-th iteration;

[0040] Calculate the weak classifier H g The weight α of (x) in the strong classifier g ;

[0041]

[0042] The weight distribution D of the training sample set used in the (g+1)th iteration is updated. g+1 ;

[0043] Let the total number of iterations be K. Repeat step 3.2 to obtain all weak classifiers. Then, combine the K weak classifiers with the classifier weights in a linear combination to form the final strong classifier.

[0044] Step 3.3: After constructing the strong classifier, import historical data into the strong classifier for verification, and establish a confusion matrix to evaluate the performance of the algorithm. This completes the construction of the island detection model based on RUSBoost.

[0045] In step 4, specifically: embed an islanding detection model based on RUSBoost into the microgrid system, collect data on islanding characteristics in real time according to the actual operation of the microgrid, and determine islanding and grid connection in real time. The grid connection status is "0" and the islanding status is "1". When the islanding detection model outputs "1", it means that the islanding status has been detected.

[0046] The beneficial effects of this invention are as follows: This method applies ensemble classification algorithms from machine learning to DC microgrids to complete the real-time islanding detection process. First, historical data of electrical characteristics during grid-connected and islanded operation are extracted and discretized. Training and test sets are obtained according to a certain ratio. Then, the RUS method is used for sampling, and the randomly undersampled subset of the training set is input into the Boost method to obtain a training model. This model is then applied to the DC microgrid for real-time islanding detection. Compared with traditional active and passive methods, this method not only combines the advantages of small blind zones in active methods with the high detection speed of passive methods, but also eliminates the need for threshold tuning and other issues, does not inject disturbances into the system, and provides better power quality. During grid-connected operation, the islanding detection method will not misclassify load power fluctuations or photovoltaic power fluctuations as islanding. Compared to remote communication methods, the islanding detection method does not require the construction of communication lines, resulting in a simpler structure and lower cost. Attached Figure Description

[0047] Figure 1 This is a diagram of the overall architecture of the DC microgrid in the method of this invention;

[0048] Figure 2 This is the equivalent circuit diagram of the DC microgrid grid-connected mode in the method of this invention;

[0049] Figure 3 This is the equivalent circuit diagram of the DC power grid islanding mode in the method of this invention;

[0050] Figure 4 This is a structural diagram of the CART algorithm for weak classifiers in this invention;

[0051] Figure 5 This is a diagram of the DC microgrid simulation system architecture of the present invention;

[0052] Figure 6 This is a flowchart of the RUSBoost algorithm applied to DC microgrids according to the present invention;

[0053] Figure 7 This is the confusion matrix diagram during the verification of the RUSBoost algorithm model of this invention;

[0054] Figure 8 This is a flowchart of the RUSBoost islanding detection method of the present invention applied to DC microgrids;

[0055] Figure 9 This is a comparison diagram of PCC voltage for load changes and photovoltaic power changes during grid-connected operation in the method of this invention;

[0056] Figure 10 This is a comparison chart of PCC voltages under different loads during islanded operation in the method of this invention;

[0057] Figure 11 This is a simulation result diagram of the RUSBoost islanding detection method under load changes during grid-connected operation;

[0058] Figure 12 This is a simulation result diagram of the RUSBoost islanding detection method for changes in photovoltaic power during grid-connected operation;

[0059] Figure 13 This is a simulation result of the islands detected by the RUSBoost island detection method. Detailed Implementation

[0060] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments.

[0061] Example 1

[0062] The overall architecture of the DC microgrid of this invention is as follows: Figure 1 As shown, it includes distributed power sources, loads, energy storage units, and the main power grid. The equivalent model of a DC microgrid during grid-connected operation is as follows: Figure 2As shown, it mainly includes distributed generation, the power grid, and loads. Distributed generation in a DC microgrid, such as photovoltaic cells, is generally controlled to operate at maximum power output, i.e., MPPT control mode, to maximize the acquisition of solar energy, thus it can be equivalent to a power management unit. Since the energy of the main power grid is much greater than that of the distributed generation system, the main power grid is usually needed to maintain the bus voltage. Therefore, the grid-connected interface converter often acts as a voltage management control unit to maintain the stability of the system bus voltage. When the circuit breaker CB is closed, the system is in grid-connected operation, with the main power grid and distributed generation jointly supplying power to the load, while the grid-connected converter controls the bus voltage stability. When the circuit breaker CB is open, the system operates in islanded mode, such as... Figure 3 As shown, the power consumed by the load is provided only by distributed power sources, and the bus voltage fluctuates with the changes in the load inside the system.

[0063] Example 2

[0064] This invention applies to the RUSBoost islanding detection method for DC microgrids, and is specifically carried out according to the following steps:

[0065] Step 1: Analyze the architecture of the DC microgrid system and calculate the changes in electrical quantities of PCC voltage and load current after islanding occurs. Determine if the voltage, current, and related quantities are islanding characteristics. Then, use the characteristic electrical quantities related to PCC voltage, load current, voltage change rate, current change rate, and PCC voltage as islanding characteristic electrical quantities, and extract their historical data to form an unbalanced dataset. Specifically:

[0066] Step 1.1 When the DC microgrid is running in grid connection, the power of the distributed power source, the load and the grid are in dynamic balance. The power balance relationship of the DC microgrid is established as shown in equation (1).

[0067]

[0068] Among them, P L For load power, P G For the output power of the large power grid, P DG For the output power of distributed power sources, U PCC R is the voltage at point PCC. L The load equivalent resistance;

[0069] When operating in an isolated environment and the energy storage unit does not switch its working mode, there are only local loads and distributed power sources in the system. The power required by the load is provided only by the distributed power sources. At this time, the voltage at PCC changes with the power fluctuation in the system. The output power relationship of the distributed power sources is shown in equation (2).

[0070]

[0071] In equation (2), UP ′ CC ΔU is the voltage at the PCC point during islanded operation, and ΔU is the voltage difference between grid-connected operation and islanded operation. When it exceeds a certain threshold, it means that the bus voltage fluctuates with the internal power of the system, and the system is in islanded operation mode.

[0072] Step 1.2: Substitute equation (2) into equation (1) to eliminate P. DG The relationship between the voltage change ΔU at the PCC point before and after the occurrence of islanding in the DC microgrid is obtained, as shown in equation (3):

[0073]

[0074] The corresponding change in current ΔI is shown in equation (4):

[0075]

[0076] As can be seen from equations (3) and (4), the change in current is similar to the change in voltage. After islanding occurs, the load current will also change, and this change varies according to the power difference. Therefore, the PCC voltage, load current, PCC voltage change rate, and load current change rate are used as effective characteristic electrical quantities for islanding detection and relevant historical data are collected.

[0077] During grid-connected operation, the grid-connected converter maintains the bus voltage stability, thereby ensuring system stability. During islanded operation, the connection with the main power grid is disconnected, and its load power is provided solely by distributed generation. Historical data of electrical characteristics under both grid-connected and islanded states are collected to form an unbalanced dataset, which includes majority class samples and minority class samples. The data under grid-connected state represents the majority class samples, and the data under islanded state represents the minority class samples; as shown in Figure 1:

[0078] Table 1 Data Acquisition under Different Operating Conditions

[0079]

[0080] The system was instructed to change its operating conditions according to Table 1 at 0.3s. Then, data was collected between 0.2s and 0.4s during the simulation. The data was then arranged according to the electrical quantities of the island detection characteristics to form a sample data training set, as shown in Table 2.

[0081] Table 2 Sample Data Training Set

[0082]

[0083] X represents the characteristic electrical quantity parameter, Y represents the class label, "0" represents grid-connected status, and "1" represents islanded status.

[0084] Step 2: Use the historical data extracted in Step 1 as the training set, and use the Random Undersampling (RUS) method to preprocess the training set to form the training sample set G.

[0085] Specifically, the RUS method is used to sample this imbalanced dataset. By randomly deleting majority class samples, the ratio of majority class samples to minority class samples is maintained at 1:1. This forms a training sample set G, which includes feature parameters X and class labels Y. Its data model is shown in the following equation:

[0086] G = {X, Y} (5);

[0087] X = {x1, x2, ..., x} i …,x j} T (6);

[0088] Y = {y1, y2, ... y} i …,y j} T (7);

[0089] In the formula: x i y is the value of the feature quantity in the i-th row of samples; j is the total number of samples in the training sample set; i Let be the category of the sample in the i-th row.

[0090] Among them, the characteristic parameter X refers to the selected islanded characteristic electrical quantity, such as PCC voltage, load current, voltage change rate, current change rate, etc.; the class label Y refers to the operating status of the microgrid, that is, "0" represents the grid-connected state and "1" represents the islanded state.

[0091] The training set processed by the RUS algorithm has a significantly reduced sample size, and the algorithm's time complexity is reduced due to the randomness of sample removal.

[0092] Step 3: Following Step 2, construct the island weak classifier based on the Classification and Regression Tree (CART) decision tree, and use the RUSBoost algorithm from the ensemble Boosting method to construct the island strong classifier. Then, use the confusion matrix to evaluate the model's correctness and establish an island detection model based on RUSBoost; specifically:

[0093] Step 3.1: Construct a weak classifier, i.e., a CART classifier; initialize the weight distribution of each sample in the training sample set G, assigning the same weight to each training sample during the first iteration: w 1i =1 / j, then the initial weight distribution D1 of the training sample set G is:

[0094]

[0095] After g iterations, the weight distribution is D. g By training the CART classification model with the training sample set, we can obtain the k decision tree classifiers H in the g-th iteration. gs (x):

[0096] H gs (x):Y→{-1,1},s=1,2,…k (9);

[0097] Step 3.2: Calculate the classification error rate e for each of the above k decision tree classifiers. gs Choose e gs The smallest classifier is used as the weak classifier H in the g-th iteration. g (x);

[0098] Among them, the classification error rate e gs Represents the classifier H gs (x) The sum of weights corresponding to the error-classified samples:

[0099]

[0100] In the formula: I is the total number of misclassified samples; w gi Let be the weight of the i-th sample in the training sample set during the g-th iteration;

[0101] Calculate the weak classifier H g The weight α of (x) in the strong classifier g ;

[0102]

[0103] The weight distribution D of the training sample set used in the (g+1)th iteration is updated. g+1 In the g-th iteration, the weights of samples misclassified by the weak classifier increase, while the weights of correctly classified samples decrease.

[0104] Let the total number of iterations be K. Repeat step 3.2 to obtain all weak classifiers. Then, combine the K weak classifiers with the classifier weights in a linear combination to form the final strong classifier.

[0105] Step 3.3: After constructing the strong classifier, import historical data into the strong classifier for verification and establish a confusion matrix to evaluate the performance of the algorithm, as shown in Table 3, where TN and TP represent the total number of accurate classifications, and FN and FP represent the total number of misclassifications.

[0106] Table 3 Confusion Matrix

[0107]

[0108] The classification model accuracy is:

[0109]

[0110] A higher accuracy rate (closer to 1) indicates better islanding detection performance. This model is then applied to a DC microgrid system for real-time detection of grid-connected and islanded states.

[0111] Step 4: Apply the constructed RUSBoost-based islanding detection model to the microgrid system and classify grid-connected and islanded states based on real-time voltage and current data.

[0112] Specifically, an islanding detection model based on RUSBoost is embedded in the microgrid system. Based on the actual operating conditions of the microgrid, data on islanding characteristics are collected in real time, and the status of islanding or grid connection is determined in real time. Grid connection is represented by "0", and islanding is represented by "1". When the islanding detection model outputs "1", it indicates that an islanding state has been detected.

[0113] This invention presents a RUSBoost islanding detection method for DC microgrids. This method applies the Random Undersampling Boosting (RUSBoost) algorithm from the field of data mining to islanding detection. It trains the algorithm using historical data of effective electrical quantities in the microgrid, thus evaluating the islanding detection problem as a binary classification problem. Because there are dependencies between the weak classifiers in the RUSBoost algorithm, sample weights are adjusted in real time to address misclassification, thereby ensuring higher classification accuracy. Compared to AdaBoost, a boosting ensemble algorithm, RUSBoost solves the problem of decreased classification accuracy caused by data imbalance in AdaBoost.

[0114] Figure 4 This is a structural diagram of the CART algorithm, a weak classifier in this invention. The CART algorithm is a common machine learning method frequently used as a weak classifier in ensemble learning. CART consists of a root node, numerous internal decision nodes, and a final leaf node. The root node and decision nodes represent the decision conditions, while the leaf nodes represent the classification results. CART employs a recursive partitioning approach, dividing the data into subsets through decision nodes, and then further dividing them into smaller subsets through other decision nodes, until all subsets belong to a single class.

[0115] Figure 5 The diagram shows the architecture of a DC microgrid simulation system. Photovoltaics serve as a distributed power source, employing an MPPT control strategy to maximize its output power. The grid-connected inverter uses traditional grid-connected control, specifically a dual closed-loop voltage and current control strategy, to increase the bus voltage and control the grid-connected current to meet grid requirements, while simultaneously enabling bidirectional energy flow within the inverter.

[0116] Figure 6 This is a flowchart of the RUSBoost algorithm in the RUSBoost islanding detection method applied to DC microgrids in this invention. First, sample weights are initialized. In the first iteration, each sample is assigned the same weight. Then, undersampling is performed on the majority class samples. A subset of samples is randomly selected from the majority class samples for undersampling, making the number of majority class samples roughly equal to the number of minority class samples, thus forming a training set. Next, training is performed on the training set, and misclassified data is combined with other data to form a new training set. Training is restarted, and the sample weights are adjusted according to the accuracy of the classifiers, resulting in several weak classifiers. Finally, the sample weights are updated based on the classification error of the weak classifiers, increasing the weights of those with larger classification errors and decreasing the weights of those with smaller classification errors. This combines multiple weak classifiers into a strong classifier, which is then classified using a majority voting method, resulting in the RUSBoost-based classification algorithm. Figure 7 This is a confusion matrix diagram used in the model verification of the RUSBoost algorithm in this invention, which shows its accuracy. The model has a high accuracy rate and can better distinguish between grid-connected and islanded states.

[0117] Figure 8 This is a diagram illustrating the architecture of the RUSBoost islanding detection method applied to DC microgrids according to the present invention. Based on the architecture diagram, a simulation circuit was built in MATLAB to simulate the initial state photovoltaic output power P. PV The load power is 10kW, P L The initial value is 10kW, and the DC bus voltage is 400V. Then, relevant real-time voltage and current data are extracted to form a feature set, and the RUSBoost algorithm is used to classify the data to obtain the classification result, thereby determining the islanding status in real time.

[0118] Example 3

[0119] First, during grid-connected operation, a PCC voltage comparison chart is obtained based on load changes and photovoltaic power changes, such as... Figure 9 As shown, the load power P is set at 0.3s. L The output power is 10.5kW. At this time, the bus voltage fluctuates downward by about 5V, and then recovers to 400V after 0.05s. Under the same conditions, the illuminance is set to jump from 1000 to 1200 at 0.3s, and the photovoltaic output power P... PV At a power output of 12kW, the bus voltage fluctuates upwards by 5V before quickly returning to 400V. This demonstrates that during grid-connected operation, the bus voltage experiences short-term fluctuations due to load and photovoltaic power changes, before returning to normal. During islanded operation, the impact of load changes on the bus voltage is as follows: Figure 10As shown, in the initial state, the photovoltaic output power and the load power are the same, both at 10kW. At this time, the system switches to islanded operation in 0.3s, and the bus voltage remains unchanged at 400V. When the load increases to 10.5kW, the bus voltage under islanded operation will decrease accordingly to meet power balance. When the load decreases to 9.5kW, the bus voltage under islanded operation will also increase accordingly.

[0120] When operating in grid-connected mode, the load is reduced at 0.3s, and the load power is changed from P. L The voltage was reduced from 10kW to 9kW. The bus voltage change and islanding detection classification results are as follows: Figure 11 As shown, at 0.3s, due to a decrease in load, the bus voltage briefly rises before returning to normal. At this time, the islanding detection still identifies the system as grid-connected and does not misclassify it as islanded. Under the same conditions, with the light intensity increased at 0.3s, the photovoltaic output power increases from 10kW to 12kW. The bus voltage change and islanding detection classification results at this time are as follows. Figure 12 As shown, at 0.3s, the photovoltaic power increases, and the bus voltage also briefly rises. At this time, the islanding detection still identifies it as grid-connected and does not misclassify this situation as islanded. However, when switching from grid-connected to islanded operation, with the initial photovoltaic power set to 10kW and the load power to 10.5kW, the bus voltage and islanding detection classification results are as follows. Figure 13 As shown, the system switched from grid-connected operation to islanded operation at 0.3s. However, the photovoltaic power was insufficient to provide the load. At this time, the bus voltage began to drop. The intelligent islanding detection algorithm successfully detected the islanding state at 0.33s. At the same time, it was detected as being in grid-connected state before this time, realizing real-time detection of the islanding state of the DC microgrid system.

Claims

1. A RUSBoost island detection method applied to a direct-current microgrid, characterized in that, Please follow these steps: Step 1: Collect historical data of electrical characteristics under grid-connected and islanded conditions respectively to form an unbalanced dataset; specifically: Step 1.1 When the DC microgrid is running in grid connection, the power of the distributed power source, the load and the grid are in dynamic balance. The power balance relationship of the DC microgrid is established as shown in equation (1). (1); in, For load power, Output power to the large power grid For distributed power supply output power, The voltage at point PCC. The load equivalent resistance; When operating in an isolated environment and the energy storage unit does not switch its operating mode, the voltage at PCC changes with the power fluctuations within the system. At this time, the output power relationship of the distributed power source is shown in equation (2). (2); In equation (2), This refers to the voltage at the PCC point during islanded operation. This represents the voltage difference between grid-connected and islanded operation. Step 1.2: Substitute equation (2) into equation (1) to eliminate... The voltage change at point PCC before and after islanding in the DC microgrid was obtained. The relationship is shown in equation (3): (3); Then the corresponding current change amount As shown in equation (4): (4); PCC voltage, load current, PCC voltage change rate, and load current change rate are used as effective characteristic electrical quantities for islanding detection, and relevant historical data are collected. Historical data of electrical characteristic quantities under grid-connected and islanded conditions are collected separately to form an unbalanced dataset, which includes majority class samples and minority class samples. Data under grid-connected conditions are majority class samples, and data under islanded conditions are minority class samples. Step 2: Use historical data as the training set and preprocess it to form a training sample set; Step 3: Construct a weak classifier for island detection based on classification and regression decision trees, then form a strong classifier for island detection. Use the confusion matrix to evaluate the model's correctness, and establish an island detection model based on RUSBoost; specifically: Step 3.1: Construct a weak classifier, i.e., a CART classifier; initialize the weight distribution of each sample in the training sample set G, assigning the same weight to each training sample during the first iteration: w 1i = If 1 / j, then the training sample set G Initial weight distribution D 1 is: (8); After g iterations, the CART classification model is trained using the training sample set with weight distribution D g , and g decision tree classifiers k H gs ( x ) are obtained in the gth iteration.​ (9); Step 3.2, regarding the above k Each decision tree classifier calculates its classification error rate. e gs ,choose e gs The smallest classifier is used as the weak classifier in the g-th iteration. H g ( x ); Among them, classification error rate e gs Represents the classifier H gs ( x The sum of the weights corresponding to the error classification samples: (10); In the formula: I is the total number of misclassified samples; w gi is the weight of the i-th sample in the training sample set at the g-th iteration. Computing weak classifiers H g ( x )Weight proportion in strong classifiers ; (11); update g weight distribution of the training sample set used in the +1 iteration D g+1 ; Let the total number of iterations be... K Repeat step 3.2 to obtain all weak classifiers, then... K A weak classifier is linearly combined with the classifier weights to form the final strong classifier. Step 3.3: After constructing the strong classifier, import historical data into the strong classifier for verification, and build a confusion matrix to evaluate the performance of the algorithm. This will establish an island detection model based on RUSBoost. Step 4: Apply the constructed RUSBoost-based islanding detection model to the microgrid system and classify grid-connected and islanded states based on real-time voltage and current data. Specifically, embed the RUSBoost-based islanding detection model into the microgrid system, collect islanding characteristic data in real time according to the actual operation of the microgrid, and determine islanding and grid connection in real time. Grid connection state is "0", and islanding state is "1". When the islanding detection model outputs "1", it means that an islanding state has been detected.

2. The RUSBoost islanding detection method applied to a DC microgrid according to claim 1, characterized in that, In step 2, specifically: the imbalanced dataset is sampled using the RUS method, and majority class samples are randomly deleted to ensure that the ratio of majority class samples to minority class samples is 1:1; a training sample set G is then established, containing feature parameters. X and class tags Y Its data model is shown in the following formula: (5); (6); (7); In the formula: x i For the first i The numerical values ​​of the features in the row sample; j is the total number of samples in the training sample set; y i For the first i The category of the row sample; Among them, feature parameters X Refers to the selected islanded characteristic electrical quantity, class label. Y This refers to the operating status of a microgrid, where "0" represents grid-connected status and "1" represents islanded status.