A method for regulating and protecting a distributed micro-grid grid-connected

CN115833245BActive Publication Date: 2026-09-18GUANGDONG POWER GRID CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211625177.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-16
Publication Date
2026-09-18
Estimated Expiration
2042-12-16

AI Technical Summary

Technical Problem

[0006]有鉴于此,本发明旨在解决现有采用人工调度进行微电网蓄电池充放电控制以及并离网控制,难以适应对日益复杂的微电网结构进行调控的问题

Benefits of technology

[0048] In summary, this invention provides a method for regulating and protecting distributed microgrids connected to the grid. It includes employing a two-stage genetic algorithm to stabilize the output power of the distributed microgrid by adjusting the charging and discharging power of the batteries within the microgrid. Simultaneously, it employs a grid dispatching method based on an improved k-nearest neighbor algorithm to screen suitable distributed microgrids for grid connection and disconnection using state change rate and power change rate metrics, achieving grid connection/disconnection control. Finally, for distributed microgrids after grid connection/disconnection control, sensitivity correction is performed for two-stage protection after grid connection or disconnection. This invention, through a two-stage genetic algorithm, can stabilize the output power of the distributed microgrid by adjusting the charging and discharging power of the batteries, reducing the fluctuation degree and state change frequency of the distributed microgrid. Furthermore, the grid dispatching method based on the improved k-nearest neighbor algorithm helps maintain the balance of the power grid system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115833245B_ABST
    Figure CN115833245B_ABST
Patent Text Reader

Abstract

The application provides a kind of distributed micro-grid grid-connected regulation protection method, including using two-section genetic algorithm, can be realized by adjusting the output power of distributed micro-grid regulation by regulating the charge-discharge power of battery in distributed micro-grid;At the same time, the power grid scheduling method based on improved k-neighbor algorithm is also used, and the distributed micro-grid suitable for grid connection and off-grid is screened out by the scale of state change rate and power change rate, to realize grid-connected and off-grid control;Finally, for the distributed micro-grid after grid-connected and off-grid control, the sensitivity correction of two-section protection is carried out after grid-connected or off-grid.The application can realize the output power stability of distributed micro-grid regulation by adjusting the charge-discharge power of battery in distributed micro-grid through two-section genetic algorithm, reduce the fluctuation degree and state replacement frequency of distributed micro-grid.The power grid scheduling method based on improved k-neighbor algorithm can help maintain the balance of power grid system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of microgrid control technology, specifically relating to a control and protection method for distributed microgrid grid connection. Background Technology

[0002] In recent years, with the rapid economic progress, my country's demand for electricity has been expanding. Distributed energy, as a supplement to centralized power supply, is an important way to meet the demand for electricity. Among them, microgrids, as the main form of distributed power grid connection, have received increasing attention.

[0003] Microgrids have complex structures, including various types of power sources and loads. Distributed power generation is subject to random fluctuations due to factors such as weather, environment, and human activity. When the power generation of a distributed microgrid just meets the load demand within the microgrid, the microgrid cannot transmit power to the grid, and is in a disconnected state. When the power generation of a distributed microgrid cannot meet the load demand, the connected microgrid needs to obtain power from the grid system, and in this case, the microgrid acts as a load within the grid. The changes in the load characteristics of a microgrid are mainly related to the power sources within it. For example, a power source within the microgrid may be unable to supply power to the system for a period of time, such as during nighttime when photovoltaic devices cannot generate electricity; in this case, the power source is in standby mode.

[0004] In all of the above scenarios, changes in the microgrid will alter the network topology, leading to changes in the current distribution of the distribution network, a reduction in the current in downstream lines, and consequently, a decrease in the sensitivity of overcurrent protection.

[0005] Currently, the mainstream method in China is to use manual dispatching for microgrid battery charging and discharging control as well as grid connection and disconnection control. This method is difficult to adapt to the increasingly complex microgrid structure. Summary of the Invention

[0006] In view of this, the present invention aims to solve the problem that existing methods of manually scheduling the charging and discharging of microgrid batteries and the on-grid and off-grid control are difficult to adapt to the increasingly complex microgrid structure.

[0007] To solve the above-mentioned technical problems, the present invention provides the following technical solution:

[0008] A method for regulating and protecting distributed microgrids connected to the grid, comprising the following steps:

[0009] Using the range relationship of the output power of each distributed microgrid under different states as a constraint, the output power as the output quantity, and the battery charging and discharging power as the dependent variable, a genetic algorithm is used to determine the battery charging and discharging control strategy for maintaining the stability of each microgrid in its current state.

[0010] Based on the state and power changes of each distributed microgrid, the K-nearest neighbor algorithm is used to classify the distributed microgrids according to the nearest data type in the training database and to control grid connection and disconnection according to the classification results. The data types in the training database are sample types that are suitable for grid connection or should be disconnected from the grid.

[0011] After the grid connection and disconnection control is completed, the sensitivity of the two-stage protection is corrected for the distributed microgrid whose state changes.

[0012] Furthermore, the formula for calculating the output power of a distributed microgrid is as follows:

[0013]

[0014] In the formula, C(P) is the output power of the microgrid, and P PV P represents the power generation capacity of photovoltaic power generation. W P represents the power generation capacity of wind power. Eo P represents the discharge power of the battery. Ei P is the charging power of the battery. S For the power consumption of a fixed load, N i N represents the number of photovoltaic power generation devices included in a photovoltaic power generation system. j N represents the number of wind turbines contained in a wind power generation system. k This refers to the number of batteries contained in the battery pack.

[0015] Furthermore, a genetic algorithm is used to determine the battery charging and discharging control strategy for maintaining the stability of each microgrid in its current state, specifically including:

[0016] The output power is taken as the output quantity, the battery charging and discharging power is taken as the dependent variable, a set of battery charging power and discharging power is taken as a feasible solution, and several feasible solutions are randomly generated as the initial population.

[0017] Set the fitness function corresponding to the microgrid's grid-connected or grid-off state;

[0018] Genetic operations are continuously performed on the initial population until a stopping condition is met to obtain a new population.

[0019] Using the range relationship of output power under the grid-connected and grid-off states of the microgrid as constraints, find the individuals that satisfy the grid-connected and grid-off conditions respectively;

[0020] The best-performing individual battery is selected as the battery charging and discharging control strategy for stabilizing the microgrid in either grid-connected or grid-off state.

[0021] Furthermore, a fitness function corresponding to the microgrid's grid-connected or grid-off states is set, specifically including:

[0022] The microgrid grid connection status satisfies P min <C(P), the corresponding fitness function is set as follows:

[0023]

[0024] In the formula, C(P) is the output power of the microgrid, and P min P is the minimum power required for a microgrid to be connected to the grid. max This represents the maximum power at which the microgrid is connected to the grid.

[0025] The microgrid offline state satisfies C(P)∈(-P) S0 ,+P S0 The corresponding fitness function is set as follows:

[0026]

[0027] In the formula, P S0 The limit for the operating fluctuation range of a fixed load.

[0028] Furthermore, the battery charging and discharging control strategy used to maintain the stability of each microgrid in its current state using a genetic algorithm also needs to meet battery operating conditions, which are as follows:

[0029] S min <S<S max

[0030] In the formula, S is the battery capacity, S min and S max These represent the minimum and maximum capacities of the battery, respectively.

[0031] Furthermore, the K-nearest neighbor algorithm is used to classify distributed microgrids based on the data types of their nearest neighbors in the training database. This includes initializing the training database, which specifically includes:

[0032] A two-dimensional rectangular coordinate system is established with the rate of change of state of the microgrid on the vertical axis and the rate of change of power on the horizontal axis, with the point where both the rate of change of state and the rate of change of power are 0 as the origin;

[0033] Calculate the distance of each distributed microgrid from the origin in the coordinate system. Record the sample points whose distance from the origin is less than the set value as the third category, and the remaining sample points as the second category.

[0034] In the third category, the sample points located on the horizontal axis are recorded as the first category, and the extracted data points are no longer recorded as the third category;

[0035] The first category is considered as samples suitable for grid connection, the second category as samples that should be disconnected from the grid, and the third category as samples to be classified.

[0036] Furthermore, the definitions or settings for the microgrid's state change rate, power change rate, and setpoints are as follows:

[0037] For the rate of change of state, the rate of change of state from grid-connected to grid-connected is defined as -P. min The rate of change from off-grid to grid-connected power supply is +P. min The state change rate from grid-connected power supply to grid-connected power consumption is -2P. min The rate of change from grid-connected power consumption to grid-connected power supply is +2P. min The rate of change for states that have not changed is 0.

[0038] The power change rate is defined as ΔC(P) / (nΔt), where C(P) is the output power of the microgrid, n is the number of time periods, and Δt is the length of a time period.

[0039] The setting value is set to (P) max -P min ) / nΔt, where P min and P max These represent the minimum and maximum power required for the microgrid to be connected to the main grid, respectively.

[0040] Furthermore, the K-nearest neighbor algorithm is used to classify distributed microgrids based on the nearest neighbor data type in the training database, specifically including:

[0041] For any sample to be classified in the third category, construct a priority queue with a capacity of k, arranged in descending order of distance;

[0042] Randomly select k samples from the remaining two classes in the training database as the initial nearest neighbors and store them in a priority queue;

[0043] Traverse the training database, calculate the distance between the current training sample and the sample to be classified, and continuously update the priority queue with the goal of minimizing the total distance. When all training data has been traversed, take the largest number of class labels of the k training samples in the priority queue as the class label of the sample to be classified.

[0044] Furthermore, the sensitivity correction specifically refers to the sensitivity correction of the time-limited overcurrent protection.

[0045] Furthermore, the sensitivity correction for the time-limited overcurrent protection is specifically performed according to the following formula:

[0046]

[0047] In the formula, ΔI is the setpoint correction parameter. For a protected sensitivity, For the sensitivity of the two-stage protection, R Z = Z0 / (Z0+Z1), where Z0 is the impedance of the distributed microgrid branch, and Z1 is the impedance of the downstream line of the distributed microgrid. This is the corrected setting value for the two-stage protection current. These are the current setting values ​​for the second stage of protection of the original line.

[0048] In summary, this invention provides a method for regulating and protecting distributed microgrids connected to the grid. It includes employing a two-stage genetic algorithm to stabilize the output power of the distributed microgrid by adjusting the charging and discharging power of the batteries within the microgrid. Simultaneously, it employs a grid dispatching method based on an improved k-nearest neighbor algorithm to screen suitable distributed microgrids for grid connection and disconnection using state change rate and power change rate metrics, achieving grid connection / disconnection control. Finally, for distributed microgrids after grid connection / disconnection control, sensitivity correction is performed for two-stage protection after grid connection or disconnection. This invention, through a two-stage genetic algorithm, can stabilize the output power of the distributed microgrid by adjusting the charging and discharging power of the batteries, reducing the fluctuation degree and state change frequency of the distributed microgrid. Furthermore, the grid dispatching method based on the improved k-nearest neighbor algorithm helps maintain the balance of the power grid system. Attached Figure Description

[0049] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the 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.

[0050] Figure 1 A flowchart illustrating a distributed microgrid grid-connected control and protection method provided in an embodiment of the present invention. Detailed Implementation

[0051] To make the objectives, features, and advantages of this invention more apparent and understandable, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0052] For the control of battery charging and discharging in microgrids and the control of grid connection and disconnection, the existing manual scheduling method is difficult to adapt to the increasingly complex microgrid structure.

[0053] Based on this, the present invention provides a regulation and protection method for grid-connected distributed microgrids. In one embodiment of the present invention, a two-stage genetic algorithm is used to regulate the output power of the distributed microgrid by adjusting the charging and discharging power of the batteries in the distributed microgrid; simultaneously, a grid dispatching method based on an improved k-nearest neighbor algorithm is used to screen suitable distributed microgrids for grid connection and disconnection by using the scales of state change rate and power change rate, thereby realizing grid connection and disconnection control; finally, for the distributed microgrid after grid connection and disconnection control, the sensitivity of the two-stage protection is corrected after grid connection or disconnection.

[0054] The following is a detailed description of an embodiment of the control and protection method for distributed microgrid grid connection according to the present invention.

[0055] Please see Figure 1 This embodiment provides a control and protection method for distributed microgrid grid connection, including the following steps:

[0056] S100: Using the range relationship of the output power of each distributed microgrid under different states as a constraint, the output power as the output quantity, and the battery charging and discharging power as the dependent variable, a genetic algorithm is used to determine the battery charging and discharging control strategy for maintaining the stability of each microgrid in its current state.

[0057] S200: Based on the state and power changes of each distributed microgrid, the K-nearest neighbor algorithm is used to classify the distributed microgrid according to the nearest data type in the training database and to control grid connection and disconnection according to the classification results. The data types in the training database are sample types that are suitable for grid connection or should be disconnected from the grid.

[0058] S300: After the grid connection and disconnection control is completed, the sensitivity of the two-stage protection is corrected for the distributed microgrid whose state changes.

[0059] This embodiment provides a control and protection method for grid-connected distributed microgrids. It includes employing a two-stage genetic algorithm to stabilize the output power of the distributed microgrid by adjusting the charging and discharging power of the batteries. Simultaneously, it employs a grid dispatching method based on an improved k-nearest neighbor algorithm, using state change rate and power change rate metrics to select suitable distributed microgrids for grid connection and disconnection, achieving grid connection / disconnection control. Finally, for distributed microgrids after grid connection / disconnection control, sensitivity correction of the two-stage protection is performed after grid connection or disconnection.

[0060] In an optional embodiment, the regulation and protection method provided in this embodiment is applied to a distribution network model containing a distributed microgrid, wherein the distributed microgrid includes at least photovoltaic power generation, wind power generation, batteries, and stationary loads. The output power model of the microgrid is established as follows:

[0061]

[0062] In the formula, C(P) is the output power of the microgrid; P PV P represents the power generation capacity of photovoltaic power generation. PVmin <P PV <P PVmax ;P W P represents the power generation capacity of wind power. Wmin <P W <P Wmax ;P Eo P represents the discharge power of the battery. Eomin <P Eo <P Eomax ;P Ei P is the charging power of the battery. Eimin <P Ei <P Eimax ;P S For the power consumption of a fixed load, N i N represents the number of photovoltaic power generation devices included in a photovoltaic power generation system. j N represents the number of wind turbines contained in a wind power generation system. k This refers to the number of batteries contained in the battery pack.

[0063] The constraint condition for C(P) is: P min <C(P)<P max P min and P max These represent the minimum and maximum power required for the microgrid to be connected to the mains grid, respectively. (Exceeding P) max This can cause the overcurrent protection sensitivity of the downstream lines of the distributed microgrid to fail to meet safety requirements. This range is the grid connection constraint condition of C(P). C(P) that does not fall within this range means that the microgrid needs to disconnect from the grid or obtain electricity from the grid. There is also a requirement for C(P): the fluctuation range of C(P) should be as small as possible.

[0064] To achieve this effect, the battery storage needs to be adjusted in real time. When the total power of photovoltaic and wind power generation is large, the battery is charged to maintain C(P) within the above constraints. When the total power of photovoltaic and wind power generation is small, the battery is discharged to the fixed load to maintain C(P) within the above constraints.

[0065] However, since the capacity of a battery is limited, when calculating and allocating the battery's charging and discharging power, it is also necessary to determine the battery capacity, that is, to ensure that the battery's state of charge meets the battery operating conditions. The constraint condition is: S min <S<S max S min For the minimum battery capacity, S max This is the maximum capacity of the battery.

[0066] In one optional embodiment, a two-stage genetic algorithm is employed to stabilize the output power of the distributed microgrid by adjusting the charging and discharging power of the batteries in the distributed microgrid. The specific process of the genetic algorithm is as follows:

[0067] 1) Using C(P) as the output, the battery charging power P Ei and discharge power P Eo As the dependent variable, P Eo The variable interval (P) Eomin P Eomax ) and P Ei The variable interval (P) Eimin P Eimax The data is divided into M intervals, and each interval is assigned a corresponding... The bit encoding concatenates a set of PEo and PEi intervals to form a... The code is digit-wise, and N codes are randomly generated as the initial population. Each code is a feasible solution, and the midpoint value of the interval is the corresponding power value.

[0068] 2) Set the fitness function.

[0069] When P min When < C(P),

[0070]

[0071] In the formula, C(P) is the output power of the microgrid, and P min P is the minimum power required for a microgrid to be connected to the grid. max This represents the maximum power at which the microgrid is connected to the grid.

[0072] When C(P)∈(-P) S0 ,+P S0 The corresponding fitness function is set as follows:

[0073]

[0074] In the formula, P S0 The limit for the operating fluctuation range of a fixed load.

[0075] Each individual is numerically evaluated, and individuals with high fitness values ​​are selected for gene manipulation, while individuals with low fitness are eliminated.

[0076] 3) Through a series of genetic operations (replication, crossover, mutation), individuals cluster together to form a new generation of population, which continues until a certain condition is met. The stopping condition is reaching maximum fitness or reaching the maximum number of cycles. The maximum fitness is adjusted according to the actual power grid conditions, and is set to 0.6 in the reference example of this embodiment. Similarly, the maximum number of cycles is adjusted according to the actual power grid conditions.

[0077] 4) The result of the genetic algorithm is based on the best performing individual among the offspring.

[0078] Following the above genetic manipulation steps, first follow P min Given the constraint condition <C(P), find the individual that satisfies the grid connection condition, that is, by allocating and controlling the charging and discharging of the storage battery, so that the microgrid can stably and continuously supply power to the grid.

[0079] When the microgrid does not satisfy P min When the condition is <C(P), then according to C(P)∈(-P) S0 ,+P S0 The constraints of P s0 This represents the operating fluctuation range of a fixed load. When the microgrid disconnects from the grid, the individual microgrids that meet this condition are identified, and the charging and discharging of the batteries are controlled to maintain the microgrid's operational balance.

[0080] The corresponding battery charging and discharging control strategies are obtained under the two constraints mentioned above, thus realizing the application of the two-stage genetic algorithm in this embodiment.

[0081] When the microgrid cannot meet the above conditions, the microgrid needs to be connected to the grid and obtain power from the grid. Calculate the load required by the corresponding distributed microgrid.

[0082] Using the above method, the genetic algorithm can effectively cope with the fluctuations of various power sources in the distributed microgrid caused by external factors. By controlling the charging and discharging of the distributed batteries, the output power of the distributed microgrid can be kept stable, thereby maintaining the grid-connected power transmission and grid-off states.

[0083] Although the above methods have tried to maintain the balance of the distributed microgrid as much as possible, this balance is based on the length of the time period detected by the algorithm. Theoretically, the shorter the time period, the more accurate the algorithm results and the higher the balance, but the corresponding computational requirements are also greater and the response time is longer. Since photovoltaic power generation has obvious time correlation (it changes during the day due to light intensity and is zero at night), the detection time period Δt can be set to a multiple of 0.5h, generally 0.5h or 1h can be selected. That is, detection and algorithm calculation are performed every time period to update the state of the distributed microgrid. Therefore, although the distributed microgrid can maintain the output power balance by distributing batteries, it will still experience small power fluctuations due to sudden environmental changes.

[0084] In an optional embodiment, the present invention employs a grid dispatching method based on an improved K-nearest neighbor algorithm. This method acquires information on the rate of change of the state (grid-connected power supply, grid disconnection, grid-connected power consumption) of a distributed microgrid over time (state change rate), and simultaneously acquires information on the rate of change of the output power of the distributed microgrid over a time period (power change rate). Considering that the power grid system requires stable distributed power sources, the distributed microgrids can be classified based on the state change rate and power change rate. Theoretically, the smaller the state change rate and power change rate, the more stable the state of the distributed microgrid, making it suitable for long-term grid connection. Therefore, the microgrids are classified according to their suitability for grid connection and their suitability for grid disconnection. Every n time intervals, data information of each distributed microgrid within that time period is collected. Based on the improved K-nearest neighbor algorithm and the nearest neighbor data type in the training database, the distributed microgrids are classified. Each distributed microgrid then performs grid connection and disconnection operations according to the classification results.

[0085] The improved K-nearest neighbor algorithm of this invention is specifically implemented as follows: the rate of change of state from grid-connected power supply to grid-off power supply is defined as -P. min The rate of change from off-grid to grid-connected power supply is defined as +P. min The rate of change of state from grid-connected power supply to grid-connected power consumption is defined as -2P. min The rate of change of state from grid-connected power consumption to grid-connected power supply is defined as 2P. min The rate of change of a state without change is defined as 0. The rate of change of power of a distributed microgrid is ΔC(P) / (nΔt) over n time periods, where Δt is the length of a time period.

[0086] One improvement of the algorithm in this invention is that the training database can be initialized in the following way: A two-dimensional coordinate system with the rate of change of state (y-axis) and the rate of change of power (x-axis) is established. Points with a rate of change of state of 0 and a rate of change of power of 0 are selected as the system reference point, i.e., the origin. Then, the distance of each distributed microgrid from the origin in the coordinate system is calculated, and points with a distance less than (P) are selected.max -P min ) / nΔt sample data is recorded as a third category w3, other sample data is recorded as a second category w2. In the third category, sample data on the x-axis is selected and recorded as a first category w1, and the extracted data is no longer recorded as the third category w3. The first category w1 is samples suitable for grid connection, the second category w2 is samples that should be disconnected from the grid, and the third category w3 is used as samples to be classified.

[0087] When determining the sample of the third category w3, select the k samples closest to the sample, and the category with the largest proportion among the k samples is the category of the sample. At the beginning of the algorithm, a priority queue with capacity k, arranged in descending order of distance, is constructed to store the nearest neighbors of the test sample. Moreover, k samples are randomly selected from the training data (classified first-category and second-category samples) as the initial nearest neighbor samples. Calculate the distances from the sample to be classified to these k nearest neighbors respectively, and store the labels and distances of the training samples in the priority queue. Then, traverse the training data, calculate the distance between the current training sample and the data to be classified, and compare the obtained distance L with the maximum distance in the priority queue. If L≥Lmax, eliminate the training sample and traverse the next one; if L<Lmax, delete the training sample with the maximum distance in the current priority queue, and store the current training sample in the priority queue. After all training data have been traversed, calculate the majority of the category labels of the k training samples in the priority queue, and use it as the category label of the sample to be classified. In order to achieve high accuracy of the algorithm, different k values are set for retraining, and finally the k value with the highest accuracy is selected.

[0088] In an alternative embodiment, since grid connection and disconnection will cause changes in the sensitivity of the relay protection of the line, in order to avoid short-circuit faults on the line during grid connection or disconnection, and avoid false fault detection or delayed protection caused by sensitivity changes generated by grid connection or disconnection, sensitivity correction needs to be performed after grid connection or disconnection. After grid connection, the downstream current of the distributed microgrid increases and the sensitivity increases, so that when a short-circuit fault occurs, normal detection and protection action can still be performed. After disconnection from the grid, the downstream current of the distributed microgrid decreases, and the protection sensitivity to short-circuit faults decreases, so correction is required. To avoid false triggering, the sensitivity corrected herein is the sensitivity of the time-limited over-current quick-break protection. The specific steps are: when the topology of the power line changes, record the branch current I of the distributed microgrid before and after disconnection cp0 , I cp1 , the setting value correction parameter of time-limited current protection wherein is the sensitivity of the first-stage protection, is the sensitivity of the second-stage protection, R Z= Z0 / (Z0+Z1), where Z0 is the impedance of the distributed microgrid branch, and Z1 is the impedance of the downstream line of the distributed microgrid. Corrected two-stage protection current setting value. These are the current setting values ​​for the second stage of protection of the original line.

[0089] This embodiment provides a control and protection method for distributed microgrid grid connection. Compared with the traditional method of manual dispatching, the present invention has at least the following advantages:

[0090] 1. A two-stage genetic algorithm was designed, which can regulate the output power of the distributed microgrid by adjusting the charging and discharging power of the batteries in the distributed microgrid, thereby reducing the fluctuation degree and state change frequency of the distributed microgrid.

[0091] 2. A grid dispatching method based on an improved K-nearest neighbor algorithm was designed. By using the scales of state change rate and power change rate, distributed microgrids suitable for grid connection and disconnection were selected, which can help maintain the balance of the grid system.

[0092] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for regulating and protecting distributed microgrids connected to the grid, characterized in that, Includes the following steps: Using the range relationship of the output power of each distributed microgrid under different states as a constraint, the output power as the output quantity, and the battery charging and discharging power as the dependent variable, a genetic algorithm is used to determine the battery charging and discharging control strategy for maintaining the stability of each microgrid in its current state. Based on the state and power changes of each distributed microgrid, the K-nearest neighbor algorithm is used to classify the distributed microgrids according to the nearest data type in the training database and to control grid connection and disconnection according to the classification results. The data types in the training database are sample types that are suitable for grid connection or should be disconnected from the grid. After the grid connection and disconnection control is completed, the sensitivity of the two-stage protection is corrected for the distributed microgrid whose state has changed. A genetic algorithm is used to determine the battery charging and discharging control strategy for maintaining the stability of each microgrid in its current state, specifically including: The output power is taken as the output quantity, the battery charging and discharging power is taken as the dependent variable, a set of battery charging power and discharging power is taken as a feasible solution, and several feasible solutions are randomly generated as the initial population. Set the fitness function corresponding to the microgrid's grid-connected or grid-off state; Genetic operations are continuously performed on the initial population until a stopping condition is met to obtain a new population. Using the range relationship of the output power in the grid-connected and grid-off states of the microgrid as constraints, individuals that satisfy the grid-connected and grid-off conditions are obtained respectively; The best-performing individual battery is used as the battery charging and discharging control strategy to keep the microgrid stable in grid-connected or grid-off states. The K-nearest neighbor algorithm is used to classify distributed microgrids based on the data type of the nearest neighbor in the training database. This classification includes initializing the training database, which specifically includes: A two-dimensional rectangular coordinate system is established with the rate of change of state of the microgrid on the vertical axis and the rate of change of power on the horizontal axis, with the point where both the rate of change of state and the rate of change of power are 0 as the origin; Calculate the distance of each distributed microgrid from the origin in the coordinate system. Record the sample points whose distance from the origin is less than the set value as the third category, and the remaining sample points as the second category. In the third category, the sample points located on the horizontal axis are recorded as the first category, and the extracted data points are no longer recorded as the third category; The first category is used as the sample suitable for grid connection, the second category is used as the sample that should be disconnected from the grid, and the third category is used as the sample to be classified. The K-nearest neighbor algorithm is used to classify distributed microgrids based on the data type of their nearest neighbors in the training database. Specifically, this includes: For any sample to be classified in the third category, construct a priority queue with a capacity of k, arranged in descending order of distance; Randomly select k samples from the remaining two categories in the training database as the initial nearest neighbor samples and store them in the priority queue; The training database is traversed, the distance between the current training sample and the sample to be classified is calculated, and the priority queue is continuously updated with the goal of minimizing the total distance. When all training data has been traversed, the largest number of class labels of the k training samples in the priority queue is taken as the class label of the sample to be classified.

2. The control and protection method for distributed microgrid grid connection according to claim 1, characterized in that, The formula for calculating the output power of the distributed microgrid is as follows: In the formula, The output power of the microgrid. The power generation capacity of photovoltaic power generation, The power generation capacity of wind power generation, This refers to the discharge power of the battery. The charging power of the battery. For the power consumption of a fixed load, This refers to the number of photovoltaic power generation devices included in a photovoltaic power generation unit. This refers to the number of wind turbines included in a wind power generation system. This refers to the number of batteries contained in the battery pack.

3. The control and protection method for distributed microgrid grid connection according to claim 1, characterized in that, Set the fitness function corresponding to the microgrid's grid-connected or grid-off states, specifically including: The microgrid grid connection status meets the requirements. The corresponding fitness function is set as follows: In the formula, The output power of the microgrid. This represents the minimum power required for a microgrid to be connected to the mains grid. This represents the maximum power at which the microgrid is connected to the grid. The microgrid offline state satisfies The corresponding fitness function is set as follows: In the formula, The limit for the operating fluctuation range of a fixed load.

4. The control and protection method for distributed microgrid grid connection according to claim 1, characterized in that, The genetic algorithm is used to determine the battery charging and discharging control strategy for maintaining the stability of each microgrid in its current state. This also requires meeting specific battery operating conditions, which are as follows: In the formula, For battery capacity, and These represent the minimum and maximum capacities of the battery, respectively.

5. The control and protection method for distributed microgrid grid connection according to claim 1, characterized in that, The definitions or settings of the microgrid's state change rate, power change rate, and setpoints are as follows: For the aforementioned rate of change of state, the rate of change of state from grid-connected power supply to grid-connected power supply is defined as: The rate of change from off-grid to grid-connected power supply is The rate of change from grid-connected power supply to grid-connected power consumption is _____. The rate of change from grid-connected power consumption to grid-connected power supply is _____. The rate of change for states that have not changed is 0. The power change rate is defined as follows: ,in, The output power of the microgrid. Number of time periods The length of a time period; The set value is set to ,in, and These represent the minimum and maximum power required for the microgrid to be connected to the main grid, respectively.

6. The control and protection method for distributed microgrid grid connection according to claim 1, characterized in that, The sensitivity correction specifically refers to the sensitivity correction of the time-limited overcurrent protection.

7. The control and protection method for distributed microgrid grid connection according to claim 6, characterized in that, The sensitivity correction for time-limited overcurrent instantaneous trip protection is specifically performed according to the following formula: In the formula, The parameter is used to correct the setting value. For a protected sensitivity, For the sensitivity of the two-stage protection, ,in, The impedance of a distributed microgrid branch. The impedance of the downstream lines of the distributed microgrid. This is the corrected setting value for the two-stage protection current. These are the current setting values ​​for the second stage of protection of the original line.

Citation Information

Patent Citations

  • Microgrid dispatching method based on optimization storage battery charging-discharging strategy

    CN107425534A

  • Optimal dispatching method and system for alternating current and direct current hybrid micro-grid system

    CN115296348A