A layered control method and system of master distribution and micro coordination, and a storage medium

CN122993216APending Publication Date: 2026-10-27ZHUHAI XUJIZHI ELECTRIFIED WIRE NETING AUTOMATIONCO +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611065316.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-17
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

传统集中式控制依赖于全局信息和主站计算能力,并且各分层之间职权不明确,难以有效应对分布式、高动态的配微协同场景,导致响应延迟大、通信负担重和排查速度慢的问题

Benefits of technology

[0003]本发明旨在至少解决现有技术中存在的技术问题之一。为此,本发明提出一种主配微协同的分层控制方法、系统及存储介质,该方法响应速度快、通信负担和排查速度快,能够适配不同的配微协同场景。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122993216A_ABST
    Figure CN122993216A_ABST
Patent Text Reader

Abstract

The application discloses a layered control method and system of main distribution micro coordination, and a storage medium, the method comprises the following steps: obtaining operation data of each micro grid layer through the main grid layer, generating control instructions according to the operation data, and uploading the operation data to the main grid layer through the distribution grid layer; generating target operation values of each micro grid layer after receiving the control instructions through the distribution grid layer; controlling the target operation state of the operation terminal after receiving the target operation values through the micro grid layer; obtaining feedback information after the operation terminal operates in the target operation state through the micro grid layer; generating feedback summary information after collecting the feedback information of each micro grid layer through the distribution grid layer, and sending the feedback summary information to the main grid layer. The response speed is fast, the communication burden and troubleshooting speed are fast, and different distribution micro coordination scenes can be adapted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power distribution technology, and in particular to a hierarchical control method, system, and storage medium for main distribution micro-control. Background Technology

[0002] With the advancement of new power system construction, the coupling between the main grid, distribution network, and microgrids is becoming increasingly close. Traditional centralized control relies on global information and the computing power of the master station, and the responsibilities between different layers are not clearly defined, making it difficult to effectively cope with distributed, highly dynamic distribution-microgrid collaborative scenarios. This results in problems such as large response delays, heavy communication burdens, and slow troubleshooting speeds. Therefore, there is an urgent need to develop a hierarchical collaborative control method with high computational efficiency, low communication burden, and fast troubleshooting speed. Summary of the Invention

[0003] This invention aims to solve at least one of the technical problems existing in the prior art. To this end, this invention proposes a hierarchical control method, system, and storage medium for master-slave micro-coordination. This method has fast response speed, fast communication burden and troubleshooting speed, and can be adapted to different master-slave micro-coordination scenarios.

[0004] In a first aspect, embodiments of the present invention provide a hierarchical control method for main grid-distribution-microgrid coordination, applied to a main grid-distribution-microgrid coordinated system, the main grid-distribution-microgrid coordinated system including a main grid layer, a distribution grid layer, and multiple microgrid layers; the hierarchical control method for main grid-distribution-microgrid coordination includes: The main grid layer obtains the operation data of each microgrid layer, generates control commands based on the operation data, and uploads the operation data to the main grid layer through the distribution network layer. After receiving the control command, the distribution network layer generates the target operating values ​​for each microgrid layer. After receiving the target operating value through the microgrid layer, the target operating state of the operating terminal is controlled. The microgrid layer obtains feedback information after the operating terminal operates in the target operating state. The feedback information from each microgrid layer is aggregated by the distribution network layer to generate feedback summary information, which is then sent to the main grid layer.

[0005] The hierarchical control method for main grid, distribution grid, and microgrid layers according to embodiments of the present invention has at least the following beneficial effects: The method adopts a three-layer collaborative control architecture, with the main grid layer, distribution grid layer, and multiple microgrid layers each performing their respective functions. The microgrid layer is responsible for aggregating the operational data of each operating terminal under its jurisdiction, the distribution grid layer is responsible for aggregating the operational data of each of the aforementioned microgrid layers, and the distribution grid layer processes the data before uploading it to the main grid layer. This effectively reduces the workload of the main grid layer; that is, the main grid layer only needs to receive and calculate the aggregated information from the distribution grid layer, greatly improving response speed and effectively reducing communication burden. The main grid layer generates control commands and sends them to the distribution grid layer; after receiving the commands, the distribution grid layer generates target operating values ​​and sends them to each microgrid layer; after receiving the target operating values, the microgrid layer controls the operating terminals until the operating terminals reach the target operating state; finally, the microgrid layer aggregates the feedback information from the operating terminals and uploads it to the distribution grid layer, and the distribution grid layer aggregates the information from each microgrid layer and feeds it back to the main grid layer. Because the responsibilities of each layer are clearly defined and the interaction paths are fixed, the operation records of each step can be traced back, making it possible to clearly determine which layer the problem originates from, which is beneficial for quickly troubleshooting and locating the root cause of the anomaly.

[0006] Optionally, in one embodiment of the present invention, the main network layer includes a first CART model unit, a conversion unit, and an adjustment unit; the step of generating control instructions based on the operating data includes: The conversion unit converts the running data into a feature vector. The control command is obtained by performing forward reasoning calculation on the feature vector through the first CART model unit; The control command is sent to the distribution network layer through the adjustment unit.

[0007] Optionally, in one embodiment of the present invention, the distribution network layer includes a second CART model unit and a multi-microgrid distribution unit; the step of generating target operating values ​​for each microgrid layer after receiving the control command through the distribution network layer includes: The control command is received by the second CART model unit, and the target operating value of each microgrid layer is generated according to the control command. The target operating value is sent to the microgrid layer through the multi-microgrid distribution unit.

[0008] Optionally, in one embodiment of the present invention, receiving the control command through the second CART model unit and generating the target operating value for each of the microgrid layers according to the control command includes: The second CART model unit converts the control commands and the operating data of each microgrid layer into feature vectors. The second CART model unit infers the target operating value of each microgrid layer by reasoning the feature vector.

[0009] Optionally, in one embodiment of the present invention, the microgrid layer includes a third CART model unit; the step of controlling the target operating state of the operating terminal after receiving the target operating value through the microgrid layer includes: After receiving the target running value, the third CART model unit generates a running instruction; The target operating state of the operating terminal is controlled by the operating instructions.

[0010] Optionally, in one embodiment of the present invention, the first CART model unit, the second CART model unit, and the third CART model unit employ the same model generation method, the model generation method comprising: Training samples are generated based on historical operating data and / or simulation data of the main-support-micro collaborative system. The model parameters are obtained by training the training samples. Generate a first CART model, a second CART model, and a third CART model based on the model parameters; The first CART model is deployed to the main grid layer to obtain the first CART model unit, the second CART model is deployed to the distribution grid layer to obtain the second CART model unit, and the third CART model is deployed to the microgrid layer to obtain the third CART model unit.

[0011] Optionally, in one embodiment of the present invention, the first CART model, the second CART model, and the third CART model all adopt a binary tree model structure. The root node of the binary tree model structure is used to input feature vectors, the internal nodes of the binary tree model structure are used to select the optimal feature and splitting threshold according to the Gini coefficient, and the leaf nodes of the binary tree model structure are used to output control action commands.

[0012] Optionally, in one embodiment of the present invention, after sending the feedback summary information to the main network layer, the method further includes: If the feedback summary information indicates that the operating data is within the preset parameter range, the control command will not be generated. When the feedback summary information indicates that the operating data is not within the preset parameter range, the control command is generated.

[0013] In a second aspect, embodiments of the present invention provide a hierarchical control system for master-slave micro-coordination, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the hierarchical control method for master-slave micro-coordination described in the first aspect.

[0014] Thirdly, embodiments of the present invention also provide a computer-readable storage medium storing computer-executable instructions for causing a computer to perform a control method as described in any embodiment of the first aspect.

[0015] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. Attached Figure Description

[0016] The accompanying drawings are provided to further understand the technical solutions of the present invention and constitute a part of the specification. They are used together with the embodiments of the present invention to explain the technical solutions of the present invention, and do not constitute a limitation on the technical solutions of the present invention.

[0017] Figure 1 This is an architecture diagram of a master-slave micro-cooperative hierarchical control provided in one embodiment of the present invention; Figure 2 This is a schematic diagram of a master-slave micro-cooperative hierarchical structure provided in one embodiment of the present invention; Figure 3 This is a logic flowchart of hierarchical control provided in one embodiment of the present invention; Figure 4 This is a flowchart of control instruction generation and execution provided in one embodiment of the present invention; Figure 5 This is a schematic diagram of the structure of a CART decision tree model provided in one embodiment of the present invention; Figure 6 This is a flowchart of closed-loop control for execution and feedback provided in one embodiment of the present invention.

[0018] Reference numerals: Main grid layer 100, main grid dispatch center 110, first CART model unit 120, conversion unit 130, regulation unit 140, distribution network layer 200, distribution network coordination controller 210, second CART model unit 220, multi-microgrid distribution unit 230, microgrid layer 300, microgrid controller 310, third CART model unit 320, and operation terminal 330. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0020] It should be noted that although functional modules are divided in the system diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the system or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0021] This invention provides a hierarchical control method, system, and storage medium for main grid, distribution grid, and microgrid collaboration. The main grid, distribution grid, and microgrid collaborative system adopts a three-layer CART decision tree collaborative control architecture, including a main grid layer, a distribution grid layer, and multiple microgrid layers. The main grid and distribution grid are physically isolated in both directions, and direct cross-layer communication is not supported. Each layer only interacts with its adjacent layer. Control commands are issued level by level, and status feedback is uploaded level by level. Only necessary control parameters are exchanged between layers, thereby effectively reducing the communication burden. Each layer deploys a CART decision tree model, which takes the observable feature variables of the current layer as input and outputs the control strategy of that layer. The CART model has a fast inference speed, does not require iterative optimization, and is suitable for real-time control; the decision tree structure is clear, the control logic is traceable and auditable, and has high interpretability; moreover, the model is lightweight and can be embedded in existing SCADA systems or edge controllers, making it engineering-friendly. It effectively solves the problems of existing methods, such as fixed rules that are difficult to adapt to high-dynamic scenarios, reliance on accurate models leading to poor real-time performance, complex training and lack of interpretability, and difficulty in engineering implementation.

[0022] The embodiments of the present invention will be further described below with reference to the accompanying drawings.

[0023] like Figure 1 and 2 As shown, Figure 1 and 2 This is an architecture diagram of a main grid-distribution-microgrid collaborative system provided in one embodiment of the present invention. The main grid-distribution-microgrid collaborative system includes a main grid layer 100, a distribution grid layer 200, and multiple microgrid layers 300. Figure 3 As shown, the hierarchical control method of master-slave micro-coordination includes: Step S10: Obtain the operation data of each microgrid layer 300 through the main grid layer 100, generate control commands based on the operation data, and upload the operation data to the main grid layer 100 through the distribution network layer 200. Step S20: After receiving control commands through the distribution network layer 200, generate target operating values ​​for each microgrid layer 300; Step S30: After receiving the target operating value through the microgrid layer 300, control the target operating state of the operating terminal 330; Step S40: Obtain feedback information from the operation terminal 330 after it has been running through the microgrid layer 300; Step S50: The feedback information from each microgrid layer 300 is aggregated by the distribution network layer 200 to generate feedback summary information, and then the feedback summary information is sent to the main grid layer 100.

[0024] In one embodiment, such as Figure 2 As shown, the main grid layer 100 is equipped with a main grid dispatch center 110, which is responsible for collecting data such as main grid frequency, tie-line power, and system inertia estimation, and performing preprocessing and feature extraction before inputting the data into the first CART model 120. The distribution network layer 200 is equipped with a distribution network coordination controller 210, which is responsible for collecting data such as voltage and power deviation at each microgrid connection point, and main grid commands, performing feature extraction before inputting the data into the second CART model 220. The microgrid layer 300 is equipped with a microgrid controller 310, which is responsible for collecting local data such as energy storage SOC, photovoltaic / wind power output, and load, performing feature extraction before inputting the data into the third CART model 320.

[0025] It should be noted that the main grid layer 100, distribution grid layer 200, and microgrid layer 300 all need to collect data, but the data sources differ. The microgrid layer 300 directly collects raw data from the operation terminal 330, which can be achieved through sensors, inverter communication, and other means. The distribution grid layer 200 collects microgrid operation data from each microgrid layer 300, and the main grid layer 100 collects distribution grid operation data from the distribution grid layer 200. Furthermore, the data sources for the main grid layer 100, distribution grid layer 200, and microgrid layer 300 are not limited to obtaining aggregated data from lower layers; each layer is also equipped with corresponding measurement units, which are used to directly acquire the overall operation data of their respective layer.

[0026] It should be noted that the main grid layer 100 obtains data from two sources: directly acquired data and lower-level aggregated data. Directly acquired data refers to obtaining global data, such as frequency and tie-line power, directly from the main grid SCADA system or phasor measurement unit. Lower-level aggregated data is obtained through a hierarchical aggregation method, that is, the operating data of each microgrid layer 300 is first uploaded to the distribution network layer 200, and the distribution network layer 200 aggregates the operating data of each microgrid layer 300 before uploading it to the main grid layer 100.

[0027] It should be noted that the communication mechanism follows a hierarchical order of main grid layer > distribution network layer > microgrid layer. Control commands are issued level by level, and status feedback is uploaded level by level. This strictly regulates the interaction order of commands and feedback between layers, and direct cross-layer communication is not supported. Main grid layer 100 and distribution network layer 200 are physically isolated in opposite directions. Information is typically transmitted via E-files, including topology, real-time data, and various operation commands. Figure 4As shown, the main grid layer 100 issues regional regulation commands; the distribution grid layer 299, after CART decision-making, decomposes the power target value to each microgrid layer 300; the microgrid layer 300 then generates specific equipment commands through CART decision-making; the actuator, i.e., the operating terminal 330, feeds back the status to the microgrid layer 300, which then aggregates the data from the local controller, and the distribution grid layer 200 feeds it back to the main grid layer 100. Allowing cross-layer communication would compromise the decoupling and scalability of the hierarchical control system and increase system complexity and communication burden.

[0028] In one embodiment, the main network layer 100 includes a first CART model unit 120, a conversion unit 130, and an adjustment unit 140. The process of generating control commands from running data is as follows: the conversion unit 130 first converts the running data into feature vectors, and then inputs the feature vectors into the first CART model unit 120 to infer control commands. Finally, the adjustment unit 140 sends the control commands to the distribution network layer 200.

[0029] In one embodiment, the main grid layer 100 is equipped with a main grid dispatch center 110, which has three core functional units: a conversion unit 130, a first CART model unit 120, and a regulation unit 140. The main grid layer 100 is responsible for regional power balance and frequency regulation. Specifically, the conversion unit 130 converts the collected operating data, such as main grid frequency, tie-line power, and system inertia estimation, into feature vectors; the first CART model unit 120 performs forward reasoning calculations on these feature vectors and outputs regional regulation commands as control commands; the regulation unit 140 sends these control commands to the distribution network layer 200, and simultaneously receives operating data reported by each distribution network layer 200 and feeds it back to the main grid layer 100 for the next round of decision-making. Finally, the main grid layer 100 completes the regional power balance and frequency regulation tasks of this layer by using grid operating data as input and regional regulation commands as output.

[0030] In one specific embodiment, the main grid dispatch center 110 is responsible for a regional power grid, and has a subordinate distribution network coordination controller 210. The distribution network coordination controller 210 manages three microgrid controllers 310, namely the first controller MG1, the second controller MG2, and the third controller MG3. Assuming the current main grid frequency is 49.8Hz, lower than the normal main grid frequency of 50Hz, in order to maintain frequency stability, this region must increase power generation or reduce power consumption. Let K = 12.5MW / Hz, then: Δ P = 12.5×(49.8 50) = +2.5MW. After the first CART model unit 120 makes a decision, the regulating unit 140 issues a control command, which means that the entire area should generate or use 2.5 MW more or less power within 15 minutes. It should be noted that the main grid layer 100 does not need to know the details of power redistribution in each distribution network layer 200, that is, it does not need to know the specific details of power distribution within the microgrid layer 300. Its control objective is only to ensure the accurate execution of the global total power command value, that is, 2.5 MW. After receiving the control command from the main grid layer 100, the second CART model unit 220 of the distribution network coordination controller 210 generates three distribution network commands, namely, MG1 increases by 1.5 MW, MG2 increases by 0.5 MW, and MG3 increases by 0.5 MW. After receiving the corresponding target operating values ​​from the distribution network layer 200, the three microgrid controllers 310, each with its own CART model unit 320, determine the execution instructions based on the status of the operating terminals 330. For example, the energy storage device of MG1 changes from charging to discharging, the photovoltaic device of MG2 starts generating electricity, and MG3 starts cutting off some unnecessary loads. After each operating terminal 330 completes its execution, it feeds back the execution status to the distribution network coordination controller 210. The distribution network coordination controller 210 packages the execution status of each operating terminal 330 and uploads it to the main grid dispatch center 110, ultimately achieving the overall regional target of generating or reducing power consumption by 2.5 MW within 15 minutes. If the execution result is not within the preset range of the network-wide target value, the main grid dispatch center 110 generates new control instructions to complete a new round of power regulation until the frequency returns to the rated allowable range. Therefore, at the control and coordination level, the main grid layer 100 only needs to issue the global total power command value and does not need to intervene in the power redistribution process of the distribution network layer 200; similarly, the distribution network layer 200 does not need to know the execution details of each terminal in the microgrid layer 300. The responsibilities between layers are clearly defined, and each layer only needs to transmit power commands and aggregation status, resulting in a light communication burden; a single-layer failure does not affect the autonomous operation of other layers, resulting in high system reliability.

[0031] It should be noted that to convert the raw operating data into a feature vector usable by the model, the data needs to be preprocessed first. For example, take the current collected value, and then combine it with the historical data of the previous few sampling points to calculate the average value, forming a set of values. Finally, after normalization, concatenate them in order to form a multi-dimensional feature vector, which can then be input into the CART model for inference. For example, suppose the system frequency is 49.92Hz, the tie-line switching power is 210MW, and the system inertia is 3.2 seconds at the current time. Simultaneously, take the frequency data of the previous two sampling points and calculate the average value as 49.935, and take the power data of the previous two sampling points and calculate the average value as 205. Arrange the five values ​​of the current collected value (49.92, 210, 3.2) and the average value (49.935, 205) in order, that is, the original feature sequence is [49.92, 210, 3.2, 49.935, 205]. After normalization, the values ​​in the sequence are scaled to a uniform range, forming the feature vector for the actual input model, such as [0.45, 0.78, 0.62, 0.50, 0.03]. Each position corresponds one-to-one with the original feature sequence. Specifically, the first 0.45 corresponds to the value normalized to 49.92, the second 0.78 corresponds to the value normalized to 210, and so on. This feature vector can then be input into the first CART model unit 120 for inference.

[0032] In one embodiment, the second CART model unit 220 receives control commands and generates target operating values ​​for each of the microgrid layers 300 according to the control commands, and finally sends the target operating values ​​to the microgrid layers 300 through the multi-microgrid distribution unit 300.

[0033] In one embodiment, the distribution network layer 200 is equipped with a distribution network coordination controller 210, which includes a second CART model unit 220 and a multi-microgrid distribution unit 230. The distribution network coordination controller 210 has three core functions: CART model decision-making, neighboring layer communication, and device control. The input to the distribution network layer 200 consists of observable characteristic variables of the current layer, including the voltage and power deviation at each microgrid connection point, as well as control commands issued by the main grid layer. The distribution network layer 200 is responsible for power coordination and voltage support among multiple microgrid layers 300. The CART model decision-making function is executed by the second CART model unit 220: this unit runs a pre-trained CART decision tree model, receives control commands from the main grid layer 100, and, combined with local characteristic variables, determines the power setpoint for each microgrid layer 300, thus generating the target operating value for each microgrid layer 300. The neighboring layer communication function is responsible for information exchange with the main grid layer 100 and the microgrid layer 300. It receives control commands from the main grid layer 100 and distributes the decomposed power target values ​​to each microgrid layer 300. The equipment control function is responsible for command conversion, command distribution, and data acquisition: it converts the power setpoints determined by the second CART model unit 220 into executable equipment operation commands for each microgrid layer 300, and the multi-microgrid distribution unit 230 is responsible for distributing these commands. Simultaneously, it is responsible for real-time acquisition of the operating data of each microgrid layer 300 for the next round of decision-making. Finally, the distribution network layer 200 uses the control commands from the main grid layer 100 as input and the power setpoints of each microgrid layer 300 as output to complete the hierarchical coordination control task of this layer.

[0034] In one embodiment, the distribution network layer 200 uses the second CART model unit 220 to convert the control commands issued by the main grid layer 100 and the operating data of each microgrid layer 300 into feature vectors, and then performs inference on the feature vectors to generate the target operating values ​​for each microgrid layer 300. For example, suppose the distribution network layer 200 has three microgrids MG1, MG2 and MG3 under its jurisdiction, and it currently receives a "peak shaving" control command issued by the main grid layer 300. The distribution network layer 200 simultaneously collects the current operating data of MG1, MG2 and MG3: MG1 grid connection point voltage 0.98, power deviation +0.5, energy storage SOC 0.8; MG2 grid connection point voltage 0.95, power deviation -0.3, energy storage SOC 0.4; MG3 grid connection point voltage 1.02, power deviation +0.2, energy storage SOC 0.6. These data and control commands are sequentially concatenated into a multi-dimensional feature vector, namely [1, 0.98, 0.5, 0.8, 0.95, -0.3, 0.4, 1.02, 0.2, 0.6], which is then input into the second CART model unit 220 for inference. The output power setpoints for MG1, MG2, and MG3 are -50kW, +30kW, and -10kW, respectively, thereby realizing the coordinated power allocation of the distribution network layer 200 to each microgrid layer 300.

[0035] In some embodiments of the present invention, the third CART model unit 320 receives the corresponding target running value and generates a running instruction, thereby controlling the target running state of the running terminal 330 through the running instruction.

[0036] In some embodiments of the present invention, the microgrid layer 300 is provided with a microgrid controller 310, the microgrid controller 310 is provided with a third CART model unit 320 and a running terminal 330, the microgrid controller is an embedded device that implements three functions: CART decision, distribution network communication and device control. The third CART model unit 320 runs a pre-trained CART decision tree model. Based on the real-time characteristics of the microgrid, such as voltage, frequency, energy storage state of charge, and photovoltaic output, it calculates specific operating instructions for each operating terminal 330, such as "energy storage discharge 50kW", "photovoltaic power limiting 20kW", or "load shedding 10kW". Distribution network communication involves exchanging information with the distribution network layer via a communication protocol, receiving target operating values ​​from the distribution network layer 200, such as requiring the microgrid layer 300 to perform peak shaving of 100kW, and uploading the real-time operating status of the microgrid layer 300, including current total power, remaining energy storage capacity, and photovoltaic / wind power forecasts. Equipment control is responsible for issuing operating instructions to each operating terminal 330 and controlling their target operating status, specifically including three functions: instruction conversion, instruction issuance, and status acquisition. Instruction conversion receives the operating instructions output by the third CART model 320 and converts them into executable instructions for the operating terminals 330. Specifically, the decision results of the third CART model 320 are translated into physical signals or protocol messages that the operating terminal 330 can recognize. For example, "energy storage discharge 50kW" is encoded into a message according to the communication protocol and sent to the storage device. The instruction issuance sends the converted message to the corresponding operating terminal 330 through the physical interface. Status acquisition is responsible for collecting the actual operating status of each operating terminal 330, including actual power, energy storage SOC, load operation status, etc. Acquisition methods include periodic acquisition and event-triggered acquisition. Periodic acquisition refers to timed acquisition, such as reading regular operating data every 10 minutes. Event-triggered acquisition refers to acquisition triggered by actual operating conditions, such as receiving fault alarms actively reported by the receiving device.

[0037] In one embodiment, the first CART model unit 120, the second CART model unit 220, and the third CART model unit 320 adopt the same model generation method. The model generation method includes four steps: first, generating training samples based on historical operating data and / or simulation data of the main grid, distribution grid, and microgrid collaborative system; second, obtaining model parameters through training the training samples; third, generating the first CART model, the second CART model, and the third CART model based on the model parameters; and finally, deploying the first CART model to the main grid layer 100 to obtain the first CART model unit 120, deploying the second CART model 220 to the distribution grid layer 200 to obtain the second CART model unit 220, and deploying the third CART model to the microgrid layer 300 to obtain the third CART model unit 320.

[0038] In one embodiment, after the offline training phase of the CART model is completed, the model parameters are fixed. These parameters specifically include three parts: first, the overall tree structure of the decision tree, i.e., the complete path from the root node to each leaf node. Specifically, the overall tree structure defines the order and hierarchical relationship between the splitting conditions; for example, judging time first, then photovoltaic power, and finally SOC, forming a complete decision path from the root node to the leaf node; second, the splitting thresholds at each internal node, such as judgment conditions like "whether the time is greater than 12:00" and "whether the photovoltaic power is not less than 15kW"; and third, the output values ​​stored at each leaf node, i.e., the final charging and discharging power values. Taking this embodiment as an example, suppose a CART model for microgrid energy storage charging and discharging control needs to be trained. During the training phase, historical data from the past year with a sampling period of 5 minutes is collected. Each data point includes time, voltage, photovoltaic output, load, energy storage SOC, and the actual optimal charging and discharging power. The model algorithm identifies patterns during node splitting, such as "when the time is greater than 12:00 and the photovoltaic power is below 10kW, execute a 10kW charging operation"; and "when the time is not greater than 12:00, the photovoltaic power is not less than 15kW, and the SOC is not higher than 60%, execute a 15kW charging operation." This indicates that the decision tree has two paths: one is "when the time is greater than 12:00 and the photovoltaic power is below 10kW, execute a 10kW charging operation"; the other is "when the time is not greater than 12:00, the photovoltaic power is not less than 15kW, and the SOC is not higher than 60%, execute a 15kW charging operation." This pattern categorizes "charging" and "discharging" in historical samples, and the training samples also generate specific target values ​​for charging and discharging power as a reference. Therefore, during the inference phase, only the current time, voltage, photovoltaic power, load, and SOC need to be input. The model can then make decisions layer by layer along the tree structure based on the input values, ultimately inferring and directly outputting the charging and discharging power command. For example, assuming it's 9:00 AM, the photovoltaic output is 20kW, and the State of Charge (SOC) is 55%, satisfying the conditions of time ≤ 12:00, photovoltaic output ≥ 15kW, and SOC ≤ 60%, the model's inference output command for charging and discharging is 15kW, utilizing excess photovoltaic power to charge the energy storage. Therefore, the CART model is essentially a set of nested conditional statements. Once trained, the learned patterns from the sample data can be applied to real-time data at any given time. The inference process only involves numerical comparison operations, without complex matrix operations or iterative optimization. Thus, the inference time is typically in the millisecond or even microsecond range, far faster than traditional control methods that require online optimization solutions. This makes the CART model highly suitable for deployment on microgrid controllers 310 with limited computing resources.

[0039] In one embodiment, the training samples include historical operating data and simulated main-distribution-microgrid coordinated scenarios. The former originates from actual power grid measurement records, while the latter is generated through power system simulation tools, including Matlab / Simulink and PSCAD, to simulate various situations such as power / frequency fluctuations and equipment failures. Each sample contains system state characteristics and corresponding optimal coordinated control commands. System state characteristics include node voltage, power, and energy storage SOC. Training data is stored in each layer's own database or storage medium. The controllers / dispatch centers of each layer store historical measurement data, such as voltage, power, and switch status, in their databases, which can be retained for months to years. Each layer independently trains its own CART model using its historical data. Specifically, the main grid dispatch center trains the main grid CART model using main grid historical data, the distribution network coordination controller trains the distribution network CART model using distribution network historical data, and the microgrid controller 310 trains the microgrid CART model using microgrid historical data. Because each layer has different characteristics and control objectives, the main grid layer only cares about whether the overall power regulation target of the region has been achieved, without needing to know details such as the energy storage SOC or load composition within each microgrid. The microgrid layer only needs to respond to the power commands received at its level and does not need to know the system inertia estimate of the main grid. Independent databases facilitate independent management by each layer, which only needs to manage its own data, simplifying management. Each layer only stores characteristic data related to its own control, without needing to store a full copy of the data, saving storage space.

[0040] In one embodiment, the first CART model 120, the second CART model 220, and the third CART model 320 all adopt a binary tree model structure, wherein the root node of the binary tree model structure is used to input feature vectors, the internal nodes of the binary tree model structure are used to select the optimal feature and split threshold according to the Gini coefficient, and the leaf nodes of the binary tree model structure are used to output control action commands.

[0041] It's important to note that the CART model uses a binary tree structure, which includes internal nodes and leaf nodes. The first internal node is defined as the root node. The root node represents the "first question" or "first judgment" in your entire decision-making process. Each independent CART model has exactly one root node. During training, the algorithm takes all training samples, iterates through all features and thresholds, and finds the feature and threshold that causes the Gini coefficient to decrease the most—the optimal feature and splitting threshold—which serves as the splitting rule for the root node. The root node divides the data into two piles. The left-hand internal nodes only take this left-hand pile of data and re-iterate through the features and thresholds in their own smaller dataset to select the locally optimal splitting rule. The right-hand nodes do the same.

[0042] It's important to note that the core purpose of node splitting in the CART model is to quickly match the appropriate command to the actual data. Each record in the historical data contains a feature vector at that time, such as load size, battery SOC, time period, and the final control command executed. Assume there are three typical samples in the historical data: Sample A has a load of 60kW, SOC of 90%, and time of 10:00, at which the "discharge" command was executed; Sample B has a load of 20kW, SOC of 85%, and time of 14:00, at which the "no discharge" command was executed; Sample C has a load of 80kW, SOC of 60%, and time of 19:00, at which the "discharge" command was also executed. During model training, the algorithm traverses all features and all possible thresholds at the root node to see which splitting method results in the most consistent historical commands on the same side. The algorithm attempts to divide the data based on whether the load exceeds 40kW: Samples A and C are assigned to the right, and both have a history of "discharge," making them very pure; Sample B is assigned to the left, with a history of "no discharge," also very pure. The model begins training at the root node, aiming to select the most effective condition from all features to divide the three sets of data. The Gini coefficient is calculated as follows: within a node, the Gini coefficient equals 1 minus the sum of the squares of the probabilities of each category; the smaller the coefficient, the more consistent the sample categories within the node. Of the three samples, two discharged and one did not discharge. The probabilities of each category are 2 / 3 and 1 / 3, respectively. Therefore, the Gini coefficient of the parent node is calculated as: 1 - (2 / 3)² - (1 / 3)² ≈ 0.444.

[0043] First, when dividing by "whether the load is greater than 40kW", there is only sample B on the left and samples A and C on the right. Both sides are completely pure, and the Gini coefficient is 1-(2 / 2)²=0. After splitting, the weighted Gini coefficient is (1 / 3)×0+(2 / 3)×0=0, and the Gini coefficient decreases by 0.444.

[0044] Secondly, based on whether the SOC is greater than 70%, the left side contains only sample C with the instruction "discharge," and the Gini coefficient is 1 - (1 / 1)² = 0. The right side contains samples A and B with instructions "discharge" and "no discharge," respectively, and the Gini coefficient is 1 - (1 / 2)² - (1 / 2)² = 0.5. After the split, the weighted Gini coefficient is (1 / 3) × 0 + (2 / 3) × 0.5 = 0.333, which is 0.111 lower than the parent node's 0.444.

[0045] Finally, the division was based on whether the time was greater than 12 o'clock: the left side contained only sample A, with the instruction "discharge", and the Gini coefficient was 1 - (1 / 1)² = 0; the right side contained samples B and C, with instructions "no discharge" and "discharge" respectively, and the Gini coefficient was 1 - (1 / 2)² - (1 / 2)² = 0.5. After the split, the weighted Gini coefficient was (1 / 3) × 0 + (2 / 3) × 0.5 = 0.333, which was 0.111 lower than the parent node's 0.444. The Gini coefficient decreases for the three divisions as follows: load division decreased by 0.444, SOC division decreased by 0.111, and time division decreased by 0.111. The Gini coefficient decreased the most for "whether the load is greater than 40kW". Historical data records load as the optimal feature and 40kW as the optimal split threshold.

[0046] Therefore, during online decision-making, the model receives a new set of current actual data as an input feature vector, showing that the current load is 65kW. After this feature vector enters the root node of the binary tree, the model decision condition selected by that node based on the Gini coefficient is executed, namely "whether the load is greater than 40kW", and the result is "yes". Thus, according to this decision condition, the feature vector is branched to the right branch. The instructions for the samples A and C corresponding to this branch in history are both "discharge", and finally it reaches the leaf node, from which the "discharge" control action instruction is output.

[0047] It should be noted that, as Figure 5 As shown, the internal nodes select the optimal splitting feature and the optimal splitting threshold based on the Gini coefficient minimization criterion. The optimal splitting feature and the optimal splitting threshold constitute the model decision conditions, which in turn constitute the splitting rules of the internal nodes. At this point, according to the splitting rules, the feature vector is split at the internal nodes to the corresponding leaf nodes, and finally, the leaf nodes output control action commands. Without splitting rules, each new data point would have to be compared with massive amounts of historical data, which is extremely inefficient. The essence of splitting is to use the fewest judgment conditions to quickly classify new data into the most similar operating condition category in history, thereby reusing the successful control experience at that time and greatly improving the online response speed.

[0048] In one embodiment, after the feedback summary information is sent to the main network layer 100, if the running data exceeds the preset parameter range, it means that the control result is not as expected. Therefore, a new control command needs to be generated to make the next round of decision-making. Otherwise, the decision-making is stopped and the system starts to wait for the next cycle or trigger event.

[0049] In one embodiment, the control method achieves closed-loop control through a cyclic mechanism of execution and feedback. For example... Figure 6As shown, after startup, data from each layer is continuously collected, features are extracted and fed into the CART model. If triggering conditions are met, such as timing cycles or voltage / power limit exceedances, control commands are generated and executed, and feedback is provided before continuing to the next round. If the conditions are not met, the model waits and then re-collects data. Specifically, after the control commands are sent to the actuators, the execution results are fed back to the corresponding layer through the data acquisition module to trigger the next round of decision-making. Specifically, after the feedback summary information is sent to the main network layer 100, if the operating data is within the preset parameter range, no control commands are generated, and the model directly enters the next round of monitoring. If the operating data is not within the preset parameter range, control commands are generated and sent for execution, and the execution results are fed back again for the next round of re-collection and judgment. The feedback mechanism can be used for operating status monitoring and anomaly detection. When the feedback summary information deviates from the preset parameter range, control commands are generated in a timely manner for adjustment and correction. If multiple rounds of feedback fail to return to the preset parameter range, an anomaly alarm is triggered. Furthermore, the execution data is accumulated as historical samples for subsequent periodic offline retraining. The model periodically learns new operating data, thereby continuously adapting to fluctuations in new energy output and load changes, and continuously enhancing the adaptability of the control strategy.

[0050] The hierarchical control method for primary, secondary, and micro-level coordinated control according to embodiments of the present invention has at least the following beneficial effects: By independently deploying CART decision tree models at each layer, response speed can be improved. Furthermore, CART models have fast inference speeds, require no iterative optimization, are suitable for real-time control, enhance adaptability, and the models can be periodically retrained to adapt to fluctuations in new energy output and load changes, reducing communication burden. Hierarchical decision-making only requires exchanging a small number of control parameters, avoiding global data acquisition and improving interpretability. The decision tree structure is clear, the control logic is traceable and auditable, and the engineering deployment is friendly, requiring no high-computing platform and can be embedded in existing SCADA or edge controllers. It effectively solves the problems of existing methods having fixed rules, difficulty adapting to highly dynamic scenarios, reliance on precise models, poor real-time performance, complex training, lack of interpretability, and difficulty in engineering implementation.

[0051] In a second aspect, embodiments of the present invention provide a hierarchical control system for master-slave micro-coordination, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the hierarchical control method for master-slave micro-coordination described in the first aspect.

[0052] It is evident that the content of the above method embodiments is applicable to this system embodiment. The specific functions implemented in this system embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.

[0053] Thirdly, one embodiment of the present invention provides a computer-readable storage medium storing computer-executable instructions for causing a computer to perform a control method as described in any embodiment of the first aspect.

[0054] It will be understood by those skilled in the art that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0055] The above is a detailed description of the preferred embodiments of the present invention. However, the present invention is not limited to the above embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention. All such equivalent modifications or substitutions are included within the scope defined by the claims of the present invention.

Claims

1. A hierarchical control method for master-slave micro-coordination, characterized in that, It is applied to a main grid-distribution-micro grid collaborative system, which includes a main grid layer, a distribution grid layer, and multiple microgrid layers; The hierarchical control method of master-slave micro-coordination includes: The main grid layer obtains the operation data of each microgrid layer, generates control commands based on the operation data, and uploads the operation data to the main grid layer through the distribution network layer. After receiving the control command, the distribution network layer generates the target operating values ​​for each microgrid layer. After receiving the target operating value through the microgrid layer, the target operating state of the operating terminal is controlled. The microgrid layer obtains feedback information after the operating terminal operates in the target operating state. The feedback information from each microgrid layer is aggregated by the distribution network layer to generate feedback summary information, which is then sent to the main grid layer.

2. The hierarchical control method for master-slave micro-coordination according to claim 1, characterized in that, The main network layer includes a first CART model unit, a conversion unit, and an adjustment unit; the generation of control commands based on the operating data includes: The conversion unit converts the running data into a feature vector. The control command is obtained by performing forward reasoning calculation on the feature vector through the first CART model unit; The control command is sent to the distribution network layer through the adjustment unit.

3. The hierarchical control method for master-slave micro-coordination according to claim 2, characterized in that, The distribution network layer includes a second CART model unit and a multi-microgrid distribution unit; the process of generating target operating values ​​for each microgrid layer after receiving the control command through the distribution network layer includes: The control command is received by the second CART model unit, and the target operating value of each microgrid layer is generated according to the control command. The target operating value is sent to the microgrid layer through the multi-microgrid distribution unit.

4. The hierarchical control method for master-slave micro-coordination according to claim 3, characterized in that, The step of receiving the control command through the second CART model unit and generating the target operating value for each of the microgrid layers according to the control command includes: The second CART model unit converts the control commands and the operating data of each microgrid layer into feature vectors. The second CART model unit infers the target operating value of each microgrid layer by reasoning the feature vector.

5. The hierarchical control method for master-slave micro-coordination according to claim 3, characterized in that, The microgrid layer includes a third CART model unit; the step of controlling the target operating state of the operating terminal after receiving the target operating value through the microgrid layer includes: After receiving the target running value, the third CART model unit generates a running instruction; The target operating state of the operating terminal is controlled by the operating instructions.

6. The hierarchical control method for master-slave micro-coordination according to claim 5, characterized in that, The first CART model unit, the second CART model unit, and the third CART model unit employ the same model generation method, which includes: Training samples are generated based on historical operating data and / or simulation data of the main-support-micro collaborative system. The model parameters are obtained by training the training samples. Generate a first CART model, a second CART model, and a third CART model based on the model parameters; The first CART model is deployed to the main grid layer to obtain the first CART model unit, the second CART model is deployed to the distribution grid layer to obtain the second CART model unit, and the third CART model is deployed to the microgrid layer to obtain the third CART model unit.

7. The hierarchical control method for master-slave micro-coordination according to claim 6, characterized in that, The first CART model, the second CART model, and the third CART model all adopt a binary tree model structure. The root node of the binary tree model structure is used to input feature vectors, the internal nodes of the binary tree model structure are used to select the optimal feature and the optimal splitting threshold according to the Gini coefficient, and the leaf nodes of the binary tree model structure are used to output control action commands.

8. The hierarchical control method for master-slave micro-coordination according to claim 1, characterized in that, After sending the feedback summary information to the main network layer, the process further includes: If the feedback summary information indicates that the operating data is within the preset parameter range, the control command will not be generated. When the feedback summary information indicates that the operating data is not within the preset parameter range, the control command is generated.

9. A hierarchical control system with master-slave micro-coordination, characterized in that, The system includes a controller, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the hierarchical control method of master-slave micro-coordination as described in any one of claims 1-8.

10. A computer storage medium, characterized in that, The computer storage medium stores computer-executable instructions, which are used to execute the hierarchical control method of master-slave micro-coordination as described in any one of claims 1-8.