Distributed secondary control method based on deep reinforcement learning for distributed micro-grid and micro-grid control system

By deploying DDPG agents and graph theory communication models in distributed microgrids, the problem of traditional secondary control methods dependence on central control units and privacy leakage is solved, efficient and stable frequency and voltage control is achieved, and the system robustness and response speed are improved.

CN120582170APending Publication Date: 2025-09-02NANJING SHOUFENG QINGNENG INTELLIGENT CONTROL TECH CO LTD
View PDF 0 Cites 5 Cited by

Patent Information

Application Number
CN202510482405.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-16
Publication Date
2025-09-02

AI Technical Summary

Technical Problem

The existing distributed microgrid secondary control method is highly dependent on the central control unit, and has problems such as large communication overhead, sensitive to precise mathematical modeling and lack of privacy protection. The application of traditional reinforcement learning in power systems has challenges such as slow training convergence speed and insufficient stability.

Method used

Using a distributed secondary control method with deep reinforcement learning, by deploying DDPG agents in a distributed microgrid, a communication graph model is established based on graph theory, so that the distributed power supply only exchanges control signals and voltage information with adjacent power supplies, combined with deep deterministic strategy gradient training and multi-objective reward function, the frequency and voltage control signals are dynamically adjusted to reduce dependence on the central control unit and protect privacy.

Benefits of technology

It improves the robustness and adaptability of the system, reduces communication overhead and computing burden, enhances privacy protection, improves the system's response speed and stability, especially in dynamic load scenarios to avoid control failure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120582170A_ABST
    Figure CN120582170A_ABST
Patent Text Reader

Abstract

The invention relates to the field of clean energy, and provides a distributed secondary control method based on deep reinforcement learning, and the method comprises the steps: S1, deploying a DDPG intelligent agent in a distributed micro-grid, and enabling the DDPG intelligent agent to be used for secondary control; s2, establishing a communication graph model of the distributed micro-grid based on a graph theory, so that each distributed power supply in the distributed micro-grid only exchanges control signals and voltage information with the adjacent distributed power supplies; and S4, regulating and controlling the output power of the distributed power supply by using the intelligent agent, and dynamically regulating the frequency and voltage secondary control signal according to the decision of the intelligent agent. Therefore, the dynamic adaptability and the system-level reliability of the distributed power system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of clean energy, and in particular to a distributed secondary control method based on deep reinforcement learning for a distributed microgrid and a microgrid control system. Background Art

[0002] With the development of distributed energy systems, the control mode of power systems has gradually evolved towards distributed control. In order to solve the volatility of distributed power sources in microgrids and the randomness of load demand, a hierarchical control architecture has been introduced into the power system. This architecture usually includes three layers of control: droop control is mainly responsible for the adaptive regulation of local power sources, quickly responding to voltage and frequency fluctuations, and ensuring the stable operation of the microgrid; secondary control is used to restore the frequency and voltage deviations of the system and coordinate distributed energy units to achieve stable system operation; tertiary control further optimizes the stability of the entire system and realizes energy scheduling and market transactions between different microgrids. Among them, secondary control, as a key link connecting local control and global optimization, plays an important role in operation while maintaining system stability. However, the existing secondary control methods still have the following problems:

[0003] 1. Traditional centralized secondary control methods are highly dependent on a central control unit. If the central controller fails, the entire system may fail. Furthermore, since all nodes need to communicate with the central control unit, network communication overhead is enormous.

[0004] 2. Most existing distributed secondary control methods rely on accurate mathematical modeling. However, due to the complexity and uncertainty of distributed energy systems, it is difficult to construct accurate mathematical models. In addition, the methods are sensitive to parameter changes, which affects the control effect.

[0005] 3. Traditional control methods require the separate acquisition of active power, frequency, voltage, and other information, lacking privacy protection: Traditional secondary control methods require the collection of operating data from multiple distributed nodes, such as active power, frequency, and voltage, which may lead to privacy leakage risks and affect system security.

[0006] To address these challenges, intelligent control technologies have been increasingly applied to distributed secondary control in recent years. Reinforcement learning (RL), owing to its autonomous learning and distributed decision-making capabilities, has garnered significant attention. By continuously learning and adjusting its decisions, RL can adapt to complex dynamic environments and improve the global optimality and robustness of control systems. However, the application of current RL methods to distributed secondary control of power systems remains exploratory, facing challenges such as slow training convergence, insufficient stability, and high communication and computational overhead. Summary of the Invention

[0007] One of the objectives of the present invention is to optimize resource allocation and energy efficiency.

[0008] A second purpose of the present invention is to improve the system response speed and adaptability.

[0009] A third objective of the present invention is to enhance the dynamic adaptability and system-level reliability of distributed power systems.

[0010] In one embodiment of the present invention, a distributed secondary control method based on deep reinforcement learning is proposed for a distributed microgrid, wherein the distributed microgrid includes a distributed power source, and its control hierarchy includes primary control and secondary control. The method includes:

[0011] S1. Deploy DDPG agents in distributed microgrids for secondary control.

[0012] S2. Establishing a communication graph model of the distributed microgrid based on graph theory so that each distributed power source in the distributed microgrid exchanges control signals and voltage information only with its neighboring distributed power sources;

[0013] S4. Apply the intelligent agent to regulate the output power of the distributed power supply, and dynamically adjust the frequency and voltage secondary control signals based on the decision of the intelligent agent.

[0014] Optionally, in some of the above or following embodiments, the distributed secondary control method based on deep reinforcement learning further includes: S3. adopting droop control in the primary control layer to enable each distributed power source to perform adaptive adjustment based on local measurement information;

[0015] Each distributed power source is bound to two DDPG agents, which are responsible for a) frequency recovery and active power balance, and b) voltage control respectively.

[0016] Optionally, in some of the above or following embodiments, the communication graph model includes a communication topology, and the method or its steps further include at least one of the following steps:

[0017] S5. Deploying a plurality of agents in a distributed manner in the distributed microgrid, and training the agent by deep deterministic policy gradient based on the observation data obtained from the communication topology; and / or,

[0018] Initialize the reinforcement learning model through historical data, define the state space, action space and reward function;

[0019] According to the initialized reinforcement learning model, real-time evaluation is performed at each node and power output is adjusted according to the evaluation results to optimize the system performance of the distributed microgrid;

[0020] Based on the data collected during the execution process, the parameters of the reinforcement learning model are updated to improve the adaptability to load changes.

[0021] Optionally, in some of the above or following embodiments, the distributed secondary control method based on deep reinforcement learning further includes:

[0022] Build a Simulink simulation platform for the microgrid, integrate distributed power supply, load, and primary control modules, and simulate island operation mode and random load disturbances to generate training data;

[0023] A communication graph model is established based on the simulation platform. A directed graph G(V, E, A) is used to describe the node topology. Only frequency deviations and voltage amplitudes are exchanged to construct the observation input space of the intelligent agent. V represents the distributed power source. E represents the communication link between the distributed power sources. A is an adjacency matrix, representing the structure of the communication topology.

[0024] The DDPG agent is trained through the observation input space, and the experience replay mechanism is used to reduce data correlation and improve the generalization ability of the secondary control strategy.

[0025] Optionally, in some of the above or following embodiments, the distributed secondary control method based on deep reinforcement learning further includes:

[0026] Design the agent's reward function, combining the logarithmic penalty of the frequency deviation and the square penalty of the voltage deviation,

[0027] forming a composite reward signal to optimize the global control objective;

[0028] Dynamically adjust the weight coefficient in the reward function to adaptively balance the priorities of frequency recovery and voltage stability according to the real-time operating status of the microgrid (such as load fluctuation amplitude);

[0029] The weight coefficients are used to update the Q network parameters of the DDPG agent to ensure the optimal output of the secondary control signal under multi-objective constraints.

[0030] Optionally, in some of the above or following embodiments, the distributed secondary control method based on deep reinforcement learning further includes:

[0031] Setting the hyperparameters of the DDPG agent, including the number of neural network layers, learning rate, and target smoothing factor, to accelerate the convergence of the training process;

[0032] Optimizing the agent's exploration strategy using the hyperparameters, balancing exploration and exploitation through a noise attenuation mechanism, and reducing the risk of overfitting during the training process;

[0033] generating a control action for the distributed power source based on the optimized exploration strategy, ensuring that the secondary control signal realizes active power equalization under privacy protection conditions; and

[0034] The step S4 further includes:

[0035] Applying the trained intelligent agent to the distributed microgrid to monitor and adjust the output power of each distributed power source in real time;

[0036] According to the decision results of the intelligent agent, the frequency and voltage secondary control signals of each distributed power source are dynamically adjusted to ensure that the system can remain stable even when the load fluctuates.

[0037] Optionally, in some of the above or following embodiments, the distributed secondary control method based on deep reinforcement learning or the corresponding steps therein further includes:

[0038] A multi-objective reward function based on logarithmic-exponential coupling is constructed. The exponential decay term of the frequency / voltage deviation is used as input, and a discounted cumulative logarithmic operation is used to generate a dynamic optimization target, providing differentiable guidance for the subsequent policy network.

[0039] Under the constraints of the reward function, a communication privacy model based on Laplacian matrix trace operation is constructed, which embeds the consistency optimization of local gradient signals into the adjacency matrix topology to limit the input information range of the policy network.

[0040] Based on the output of the communication model, the droop control equation is coupled with the reinforcement learning strategy network parameters, and the physical layer droop coefficient and the data layer strategy weight are weighted by the inverse norm of the adjacency matrix to generate a quadratic control increment;

[0041] By utilizing the disturbance response characteristics of the coupled strategy network, a dynamic load disturbance model with determinant nonlinear mapping is embedded, and the reward function weight is adjusted through feedback of the determinant geometric propagation characteristics to form a closed-loop optimization.

[0042] The multi-objective reward function is as follows:

[0043]

[0044] Where s is the system state of the distributed microgrid; a is the control action used to adjust the active / reactive power of the DG; R t is the reward function used to measure the control effect; γ is the discount factor used to determine the balance between long-term vs. short-term optimization.

[0045] Optionally, in some of the above or following embodiments, a distributed quadratic control method based on deep reinforcement learning is provided, wherein:

[0046] Droop control involves the frequency-power equation:

[0047] f i =f * -m i P i

[0048] where f i Indicates the output frequency of the distributed power supply; f * Indicates the reference frequency; P i Represents the output active power of distributed power supply; m i represents the frequency droop coefficient, which determines the slope of the frequency versus power change; and

[0049] Voltage-reactive power equation:

[0050] V i =V * -n i Q i

[0051] Among them, V i Indicates the output voltage amplitude of the distributed power supply; V * Indicates rated voltage; Q i Indicates output reactive power; n i Indicates the voltage droop coefficient.

[0052] The distributed quadratic control method based on deep reinforcement learning according to claim 8, wherein:

[0053] The adjacency matrix is ​​A=[a ij ]∈R N×N , satisfying: If (i,j)∈E, then a ij =1, otherwise a ij =0; the degree matrix is ​​expressed as D=diag{d1,d2,...,d N},in And N i ={j∈V|(i,j)∈,Ej≠i} represents the adjacent nodes directly connected to the i-th distributed generation.

[0054] The distributed quadratic control method based on deep reinforcement learning according to claim 9, wherein:

[0055] Matrix B = diag{b1,b2,...,b N} is used to describe the communication link from the leader to the follower, and satisfies: If the i-th follower can receive information from the leader, then b i =1, otherwise b i =0;

[0056] The designed communication topology of the communication graph model is defined by the following two matrices A and B:

[0057]

[0058] Distributed quadratic control architecture based on reinforcement learning (DDPG)

[0059] -Core Innovation: Adopting the Deep Deterministic Policy Gradient (DDPG) method to implement distributed quadratic control, replacing traditional centralized or model-dependent distributed control methods.

[0060] -Advantages:

[0061] - No precise mathematical model is required, and it can adapt to complex dynamic environments through data-driven autonomous learning.

[0062] -Each distributed power source is equipped with an independent intelligent agent, making autonomous decisions, reducing dependence on the central control unit.

[0063] -Supports coordinated optimization of frequency recovery, voltage regulation, and active power balancing.

[0064] The method in some embodiments of the present application or any of steps S1, S2, S3, and S4 therein may further include the following, or as recorded in other parts of the specification of the present application: any of step 1, step 2, step 3, or step 4.

[0065] 1. Construct a multi-objective reward function based on logarithmic-exponential coupling, take the exponential decay term of frequency / voltage deviation as input, generate dynamic optimization objectives through discounted cumulative logarithmic operation, and provide differentiable guidance for subsequent policy networks.

[0066] 2. Under the constraints of the reward function, a communication privacy model based on the Laplace matrix trace operation is constructed, which embeds the consistency optimization of the local gradient signal into the adjacency matrix topology to limit the input information range of the policy network.

[0067] 3. Based on the output of the communication model, the droop control equation is coupled with the reinforcement learning strategy network parameters, and the physical layer droop coefficient and the data layer strategy weight are weighted by the inverse norm of the adjacency matrix to generate a quadratic control increment.

[0068] 4. Utilizing the disturbance response characteristics of the coupled strategy network, a dynamic load disturbance model with determinant nonlinear mapping is embedded, and the reward function weight is adjusted through feedback of the determinant geometric propagation characteristics to form a closed-loop optimization.

[0069] Technical Effects

[0070] a) Dynamic goal orientation: The reward function not only balances multiple objectives but also directly drives subsequent policy network updates through differentiability, solving the disconnect between traditional reward design and application.

[0071] b) Communication-policy cascade constraints: The communication privacy model acts as a pre-filter of the policy network, mathematically limiting the sensitive dimensions of the input data (such as power) and avoiding the overhead of post-processing desensitization.

[0072] c) Physics-data bidirectional coupling: The droop equation provides the physical constraint boundary, and the policy network dynamically softens the boundary through inverse norm weighting, realizing "model-guided learning" instead of traditional one-way dependence.

[0073] d) Closed-loop disturbance adaptation: The determinant operation results of the dynamic disturbance model are fed back to the reward function in real time, forming an adaptive chain of "disturbance perception → strategy adjustment → reward update", which is superior to open-loop anti-interference design.

[0074] 1. Construct a distributed microgrid system and use graph theory to establish the communication topology of the system so that each distributed power source only exchanges control signals and voltage information with its neighboring nodes.

[0075] 2. Deploy an intelligent agent in the system and train it using the DDPG method based on the observation data obtained from the communication topology to optimize the control strategy.

[0076] 3. Apply the trained intelligent agent to regulate the output power of the distributed power supply, and dynamically adjust the frequency and voltage secondary control signals based on the intelligent agent's decision to ensure system stability.

[0077] In another embodiment, the distributed secondary control method based on deep reinforcement learning for a distributed microgrid system or step S1 thereof further includes: constructing a distributed microgrid system and adopting a dynamic adaptive communication topology

[0078] Dynamic topology reconstruction mechanism

[0079] When constructing a microgrid communication topology, a dynamic reconfiguration method based on real-time network load is introduced. This allows each distributed generation (DG) node to dynamically adjust its connection relationship with its neighboring nodes based on the latency and bandwidth of the current communication link. For example, when a node detects that the communication delay of a neighboring node exceeds a threshold, it automatically switches to the next-best neighbor for information exchange, thereby optimizing overall communication efficiency and reducing packet loss.

[0080] Technical effect: Breaking through the limitations of traditional static communication topology, significantly improving communication robustness and real-time performance, especially avoiding control failures caused by single point failures in dynamic load scenarios.

[0081] Quantum encrypted communication channel

[0082] Quantum key distribution (QKD) technology is embedded in inter-node communications, enabling quantum encryption of exchanged control signals and voltage information. The non-cloning properties of quantum entanglement ensure data privacy and anti-eavesdropping capabilities during communication.

[0083] Technical effect: Introducing quantum encryption technology in microgrid communications can completely solve the risk of data eavesdropping in traditional communications, and at the same time conform to the development trend of future quantum secure communications.

[0084] The distributed secondary control method based on deep reinforcement learning for a distributed microgrid system or step S2 thereof further includes: deploying and training a hybrid reinforcement learning framework for an intelligent agent

[0085] Multimodal observation space fusion

[0086] In the agent's observation space, in addition to traditional neighbor control signals and local frequency / voltage changes, the spectral characteristics of environmental noise (such as harmonic components and transient fluctuation frequencies) are further introduced as input dimensions. A convolutional neural network (CNN) is used to extract features from multidimensional time series data, improving the agent's adaptability to complex interference.

[0087] Technical effect: It breaks through the limitation of traditional reinforcement learning that relies only on a single physical quantity, and significantly enhances the recognition and response accuracy of intelligent agents to non-steady-state disturbances through multimodal data fusion.

[0088] Meta-learning driven cross-scenario transfer training

[0089] During training, a meta-learning framework is employed to enable the agent to rapidly transfer knowledge across multiple simulated microgrid scenarios, such as different distributed power generation types and load fluctuation patterns. For example, the MAML method is used to adjust the agent's initial policy parameters, enabling it to converge in new scenarios with only a small number of samples, reducing training costs.

[0090] Technical Effect: Achieve cross-scenario generalization capabilities of intelligent agents, avoid configuring independent training processes for each microgrid, and significantly improve deployment efficiency.

[0091] The distributed secondary control method based on deep reinforcement learning for distributed microgrid system or step S3 thereof further includes: adaptive closed-loop control and safety verification of the intelligent agent

[0092] Real-time defense mechanism against adversarial sample injection

[0093] When the agent executes control actions, adversarial examples are generated in real time to simulate malicious attacks or extreme operating conditions (such as sudden addition or removal of large loads). The agent is required to maintain system stability under the perturbations of the adversarial examples. Adversarial training enhances the robustness of the agent's decision-making.

[0094] Technical effect: It breaks through the defect of traditional control that only relies on normal working conditions training, significantly improves the system's anti-interference ability in extreme scenarios, and avoids the risk of failure caused by model overfitting.

[0095] Blockchain-based decision logging and explainable auditing

[0096] Every control decision made by the intelligent agent (e.g., power adjustment, signal correction) is recorded in a blockchain distributed ledger, and its compliance is verified through zero-knowledge proofs (ZKP). External auditors can trace the decision logic through smart contracts, ensuring the control process is transparent and tamper-proof.

[0097] Technical effect: Solve the regulatory challenges of black-box decision-making in reinforcement learning, and at the same time achieve cross-node decision consistency verification through blockchain technology, thereby improving system credibility and compliance.

[0098] In other embodiments, the following technical solutions are also proposed:

[0099] 1. Existing centralized secondary control methods usually need to rely on a central control unit for global scheduling and decision-making. However, when the central control unit fails or the communication link is interrupted, the system may fail on a large scale. In addition, the communication burden of all nodes is heavy, resulting in delayed response time of the system and excessive network overhead. Solution of the present invention: The present invention adopts a distributed secondary control method to avoid high dependence on the central control unit. Through the autonomous learning and decision-making of distributed intelligent agents (intelligent nodes), each node can independently perform control tasks, thereby improving the robustness and fault tolerance of the system, while reducing communication requirements and improving the stability and response speed of the system.

[0100] 2. Existing distributed secondary control methods usually rely on accurate mathematical modeling. However, due to the complexity and uncertainty of distributed energy systems, accurate mathematical models are difficult to construct, and the methods are very sensitive to parameter changes, which can easily lead to poor control effects. The solution of the present invention: The present invention proposes a data-driven control method based on reinforcement learning (RL). The intelligent agent can achieve efficient control through interactive learning with the environment without the need for precise mathematical modeling. Through reinforcement learning, the intelligent agent can automatically adjust the control strategy to cope with dynamic changes in the system, overcoming the problems of difficult parameter adjustment and insufficient modeling accuracy in traditional PI control.

[0101] 3. Existing distributed secondary control methods typically require separately acquiring sensitive information such as power and frequency from multiple nodes, which can easily expose private data within the system. This solution: By performing control based on secondary control signals without directly acquiring frequency and power values, this method avoids the collection and leakage of private power data and improves system privacy protection.

[0102] The beneficial effects are as follows:

[0103] 1. Reduced Communication Overhead and Method Burden: This invention utilizes a distributed secondary control approach, eliminating the communication dependency of a central control unit in traditional centralized control methods and significantly reducing network communication overhead. Furthermore, through autonomous decision-making and learning by distributed agents, reliance on the central computing unit is reduced, thereby alleviating the system's computational burden and improving its real-time responsiveness.

[0104] 2. Avoiding the need for precise mathematical modeling and parameter sensitivity: By employing a data-driven deep reinforcement learning approach, this paper eliminates the reliance on precise mathematical models found in traditional methods. Deep reinforcement learning can adapt to complex dynamic environments and automatically adjust control strategies, avoiding the unstable control effects caused by parameter sensitivity in traditional methods and improving the robustness and adaptability of the system.

[0105] 3. Protecting system privacy: Traditional distributed secondary control methods require access to sensitive information such as power and frequency from multiple nodes, which poses a risk of privacy leakage. This invention directly obtains secondary control signals for control, avoiding the collection of power data. This effectively protects privacy data in distributed power systems and improves system security and privacy. BRIEF DESCRIPTION OF THE DRAWINGS

[0106] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0107] Figure 1 This is an overall framework diagram of a distributed secondary control method based on deep reinforcement learning for a microgrid distributed power source according to an embodiment of the present invention;

[0108] Figure 2 A reinforcement learning training flow chart of a distributed secondary control method based on deep reinforcement learning for a microgrid distributed power source according to an embodiment of the present application is shown;

[0109] Figure 3 A reinforcement learning reward curve diagram of a distributed secondary control method based on deep reinforcement learning for a microgrid distributed power supply according to an embodiment of the present application is shown;

[0110] Figure 4a-4d A traditional droop control diagram based on a distributed secondary control method based on deep reinforcement learning for a microgrid distributed power source according to an embodiment of the present application is shown;

[0111] Figure 5a-5d A secondary control diagram of a distributed secondary control method based on deep reinforcement learning for a microgrid distributed power source according to an embodiment of the present application is shown;

[0112] Figure 6a-6d A control diagram based on traditional quadratic control is shown;

[0113] Figure 7a-7d A secondary control plug-and-play performance diagram of a distributed secondary control method based on deep reinforcement learning for a microgrid distributed power source according to an embodiment of the present application is shown;

[0114] Figure 8 A flowchart of a distributed secondary control method based on deep reinforcement learning for a microgrid distributed power source according to an embodiment of the present application is shown;

[0115] Figure 9 The external structure diagram and internal circuit module principle diagram of a microgrid control system that applies a distributed secondary control method based on deep reinforcement learning for a microgrid distributed power source according to an embodiment of the present application are shown. DETAILED DESCRIPTION

[0116] In one embodiment of the present application, Figure 8 As shown, a distributed secondary control method based on deep reinforcement learning for distributed power sources in a microgrid is proposed. The distributed microgrid includes distributed power sources, and its control hierarchy includes primary control and secondary control. The method includes three steps S1, S2, and S4: in step S1, a DDPG intelligent agent is deployed in the distributed microgrid for secondary control; in step S2, a communication graph model of the distributed microgrid is established based on graph theory, and each distributed power source in the distributed microgrid optionally exchanges control signals and voltage information only with its adjacent distributed power sources; in step S4, the intelligent agent is applied to regulate the output power of the distributed power source, and the frequency and voltage secondary control signals are dynamically adjusted according to the decision of the intelligent agent.

[0117] More specifically, if Figure 1 As shown, the above method or its steps may further include the following sub-steps, where A to F are process nodes.

[0118] A[state observation and data acquisition step]-->B[local communication exchange step];

[0119] B-->C [DDPG agent decision step];

[0120] C-->D[Droop control execution step];

[0121] D-->E[disturbance detection feedback step];

[0122] E-->|Adjust weight step|A;

[0123] E-->|Update experience pool step|F[Critic evaluation step];

[0124] F-->|Gradient feedback step|C.

[0125] 1. State observation and data collection

[0126] ·enter:

[0127] Each distributed generation (DG) node monitors the local status in real time:

[0128] οFrequency deviation: Δω i =ω i -ω ref

[0129] οVoltage deviation: ΔV i =V i -V ref

[0130] οLoad disturbance: ΔP load,i (obtained through local sensors or predictive models)

[0131] Output:

[0132] State vector in is the control signal gradient of the neighboring node.

[0133] Technical effects:

[0134] High-frequency (1kHz) sampling ensures real-time performance and supports millisecond-level response.

[0135] 2. Information exchange under the constraints of local communication topology (matrix A)

[0136] ·enter:

[0137] According to the definition of the adjacency matrix A (such as the ring topology), nodes only exchange data with their direct neighbors:

[0138] οSend: Control signal gradient and voltage amplitude V i

[0139] ο Receive: Neighboring node's and V j

[0140] Output:

[0141] Local information collection Used for policy network input.

[0142] Technical effects:

[0143] The communication bandwidth requirement is reduced by 55.6% (1.152Mbps→0.512Mbps), and the privacy leakage risk is ≤1%.

[0144] 3.DDPG Agent Decision-Making (Actor Network)

[0145] ·enter:

[0146] State vector s i and neighbor information Input to the Actor network μ(s|θ μ ).

[0147] ·deal with:

[0148] οNetwork structure: 4-layer fully connected (input layer 8 → hidden layer 64 → 32 → output layer 2), activation function ReLU, output layer tanh clipping.

[0149] οAction generation:

[0150] Output secondary control incremental signal:

[0151] a i =[ΔP sec,i , ΔQ sec,i ]=μ(s i |θ μ )

[0152] For example, ΔP sec,i ∈[-1, 1]kW (scaled by tanh).

[0153] Output:

[0154] Control instruction a i , guiding local power adjustment.

[0155] Technical effects:

[0156] The overshoot is reduced by 81.25% (0.8Hz→0.15Hz) and the adjustment time is shortened by 60% (5s→2s).

[0157] 4. Droop Control and Power Execution (Matrix B)

[0158] ·enter:

[0159] ΔP generated by the Actor sec,i and ΔQ sec,i , combined with the local droop control equation:

[0160]

[0161] Among them, m i is the dynamically adjusted droop coefficient (optimized by the Critic network).

[0162] ·deal with:

[0163] οPower limit: tanh function constraint P i ∈[-P max , P max ] to prevent the inverter from overloading.

[0164] ο Ripple injection: Superimpose a high-frequency small signal (such as 0.01sin(100πt)) to improve noise immunity.

[0165] Output:

[0166] Actual power output P i and Q i , driving local power generation units.

[0167] Technical effects:

[0168] The risk of equipment overload is reduced by 90% and the dynamic response accuracy is improved by 58%.

[0169] 5. Dynamic disturbance detection and feedback optimization

[0170] ·enter:

[0171] Real-time monitoring of load power change ΔP load , calculate the disturbance propagation matrix:

[0172]

[0173] Where W is the spatiotemporal correlation weight matrix.

[0174] ·deal with:

[0175] ο Determinant sensitivity: Calculate det(I+∈φ). If the value exceeds a threshold (such as 1.001), the reward function weight adjustment is triggered:

[0176] α←α+δ,β←β+δ

[0177] Where δ is the adaptive step size.

[0178] Output:

[0179] The updated reward function parameters α, β are fed back to the DDPG training process.

[0180] Technical effects:

[0181] The load mutation recovery time was shortened from 4s to 1.8s, and the success rate of non-steady-state scenarios was increased to 90%.

[0182] 6. Critic Network Evaluation and Strategy Update

[0183] ·enter:

[0184] Status i 、Action a i , reward R i and the next state s i+1 , stored in the experience replay pool.

[0185] ·deal with:

[0186] οQ value update: Minimize the timing difference error (TD error):

[0187]

[0188] ο Policy update: Gradient ascent to maximize Q value:

[0189]

[0190] Output:

[0191] Updated Actor / Critic network parameters θ μ ,θ Q .

[0192] Technical effects:

[0193] The training convergence speed is increased by 40% (5000 → 3000 iterations), and the strategy stability is enhanced.

[0194] Figure 1 The control process of the microgrid realizes autonomous optimization of secondary control through a closed-loop link of state observation → local communication → DDPG decision → droop execution → disturbance feedback → strategy update. Its main features are:

[0195] 1. Local communication topology (matrix A) reduces communication burden and protects privacy;

[0196] 2. Dynamic droop coefficient (matrix B) improves control accuracy and equipment safety;

[0197] 3. Determinant sensitivity feedback enhances adaptability to non-steady-state scenarios;

[0198] 4. DDPG's end-to-end optimization enables multi-objective collaboration.

[0199] This design comprehensively surpasses traditional methods in key indicators such as bandwidth, overshoot, and disturbance recovery, providing an efficient and secure control paradigm for smart grids.

[0200] In order to at least partially achieve one of the above-mentioned objectives, the present invention provides a distributed secondary control method for distributed power sources in a microgrid based on deep reinforcement learning, comprising:

[0201] Initialize the reinforcement learning model through historical data, define the state space, action space and reward function;

[0202] According to the initialized reinforcement learning model, real-time evaluation is performed at each node and power output is adjusted according to the evaluation results to optimize system performance;

[0203] Based on the data collected during the execution process, the parameters of the reinforcement learning model are updated to improve the adaptability to load changes.

[0204] Local communication graph model for microgrids

[0205] To more accurately describe the communication relationship between distributed generation (DG) in a microgrid, we propose a communication model based on a weighted directed graph and introduce exponentially decaying communication weights and logarithmically optimized information transfer efficiency to consider the following factors:

[0206] 1. Communication distance attenuation (signal strength decays exponentially with distance)

[0207] 2. Node information entropy (measures the uncertainty of node data and affects communication priority)

[0208] 3. Channel capacity limitation (logarithmic function describes the maximum information transmission rate)

[0209] 4. Dynamic topology adaptability (automatic adjustment when DG joins / exits)

[0210] 1. Communication graph model definition

[0211] Assume that the communication topology of the microgrid is a weighted directed graph G(V,E,W), where:

[0212] -V={v1,v2,…,v N} represents a collection of distributed generation (DG) nodes.

[0213] - represents the communication link, (vi,vj)∈E represents the node v i You can v j Send a message.

[0214] - is a weight function that reflects the reliability and efficiency of the communication link.

[0215] 2. Weight function design (considering exponential decay and information entropy)

[0216] Weight w ij Determined by the following factors:

[0217] (1) Communication distance attenuation (exponential model)

[0218] Signal strength changes with distance d ij Attenuation, obeying the exponential decay law:

[0219]

[0220] in:

[0221] -d ij For node v i With v j physical distance.

[0222] -α>0 is the attenuation coefficient (related to the channel medium).

[0223] (2) Node information entropy (logarithmic model)

[0224] Node v i Information entropy H i Reflects the uncertainty of its data (such as the degree of power fluctuation):

[0225]

[0226] where p k For node v i The probability distribution of the state (such as power, voltage).

[0227] Communication weights must prioritize high entropy nodes:

[0228]

[0229] (β is the adjustment coefficient to prevent the weight from approaching 0 when the entropy value is too high)

[0230] (3) Channel capacity limitation (Shannon formula)

[0231] Link (v i ,v j )\)'s maximum information transmission rate C ij Determined by Shannon's formula:

[0232]

[0233] in:

[0234] -B is the channel bandwidth.

[0235] -Pi is the transmit power.

[0236] -N0 is the noise power.

[0237] -γ is the path loss exponent.

[0238] The communication weight needs to be positively correlated with the channel capacity:

[0239]

[0240] 3. Comprehensive weight formula

[0241] Final weight ω ij The weighted geometric mean of the above factors (taking into account the multiplicative effect):

[0242]

[0243] 4. Dynamic topology adjustment (DG plug and play)

[0244] When the new node v k When accessing, its communication link weight is initialized to:

[0245]

[0246] in v k The set of neighbor nodes (dynamically determined by the minimum spanning tree algorithm).

[0247] 5. Communication efficiency optimization goal

[0248] Define the global communication efficiency η as the log harmonic mean of all path weights:

[0249]

[0250] The optimization goal is to maximize η while satisfying:

[0251]

[0252] (C max is the maximum communication load of a single node)

[0253] Model Features

[0254] 1. Physical layer and information layer coupling: consider distance attenuation (physical layer) and information entropy (data layer) simultaneously.

[0255] 2. Dynamic adaptability: Quickly adjust weights through exponential / logarithmic operations, supporting plug-and-play.

[0256] 3. Resource constraints: Shannon's formula ensures that the communication capacity limit is not exceeded.

[0257] In addition, this model can be embedded in the state space design of reinforcement learning frameworks (such as DDPG) as an agent observation Part of the input .

[0258] The distributed secondary control method based on deep reinforcement learning for a distributed microgrid system further includes: a microgrid local communication graph model modeling process (step-by-step description), which also includes the following steps:

[0259] Step 1: Define network nodes and communication links

[0260] Core action: Abstract the distributed units / power sources (such as photovoltaics and energy storage) in the microgrid as nodes of the graph model, and initialize directed communication links between nodes based on physical distance and communication capabilities.

[0261] Node definition: Each distributed generation (DG) or critical load corresponds to a node (e.g., node 1 = photovoltaic, node 2 = energy storage).

[0262] Link initialization: If the nodes can communicate directly (e.g., distance ≤ threshold), a directed edge is established (e.g., node 1 → node 2).

[0263] Step 2: Design dynamic weight rules

[0264] Core action: Bind weight calculation rules and dynamically adjust communication priority based on node status and physical distance.

[0265] Weight input:

[0266] 1. Distance decay factor: The closer the distance, the higher the base weight (such as an exponential decay trend).

[0267] 2. Node state entropy: Calculates node data volatility (such as power / voltage deviation) in real time. The greater the volatility (higher entropy), the lower the communication weight (suppressing low-value data).

[0268] Dynamic Adjustment: A competition mechanism is implemented through the Sigmoid function, which enables high-entropy nodes to actively reduce their communication occupancy for low-entropy nodes.

[0269] Step 3: Embed Plug and Play Mechanism

[0270] Core action: Automatically handle communication topology updates when nodes join / leave.

[0271] New node access: Automatically establishes links with neighboring nodes based on physical distance and initializes weights based on Softmax normalization (closer nodes have higher weights).

[0272] Node exit: The entropy value of the node leaving the network is set to the maximum value, triggering the weight to return to zero, and the neighboring nodes automatically block their communication links.

[0273] Step 4: Integrate communication resource optimization strategies

[0274] Core action: Dynamically allocate channel resources and suppress non-critical communications.

[0275] Priority strategy: High-entropy nodes (such as faulty devices) obtain more bandwidth through weighted competition, while communication traffic of low-entropy nodes (such as stable devices) is compressed.

[0276] Effect example: If a photovoltaic node experiences a sudden drop in power (increase in entropy), its communication weight to stable nodes is reduced by 90%, freeing up bandwidth for critical paths.

[0277] Step 5: Coupling to the Control Framework

[0278] Core action: Integrate communication weight parameters into the control system (such as reinforcement learning state space).

[0279] Observation input: The dynamic weights and local measurements (frequency, voltage) are used as input to the agent.

[0280] Collaborative control: The intelligent agent perceives topological relationships based on weights and dynamically optimizes control strategies (such as prioritizing high-entropy nodes).

[0281] Comparison of technical advantages (vs traditional fixed weight model)

[0282]

[0283] Application Example Description

[0284] Scenario: A certain energy storage node in a microgrid is suddenly overloaded (entropy value surges).

[0285] 1) Step 2 is triggered: the weight of the node to its neighbors drops to nearly zero, avoiding invalid communication occupation.

[0286] 2) Step 4 takes effect: The released bandwidth is allocated to the PV-storage direct connection path, accelerating power regulation.

[0287] 3) Step 5 Feedback: The control system prioritizes adjusting the charging and discharging strategy of the energy storage node based on the weight change.

[0288] Results: Overload recovery time was shortened from 3.2s in the traditional solution to 1.1s, and communication traffic was reduced by 74%.

[0289] Through the above steps, the model realizes the "perception-decision-response" closed loop, significantly improving the stability and efficiency of the microgrid under fluctuating scenarios.

[0290] 1. Optionally, in some of the above or following embodiments, the distributed secondary control method based on deep reinforcement learning also includes the step of "embedding the communication graph model into the state space of the reinforcement learning model", as follows: (Expanded) state space: splicing the communication weight matrix W with the voltage / frequency data to construct a multi-dimensional observation vector of the reinforcement learning agent.

[0291] 2. (Normalization) Input preprocessing: Min-Max scale the elements wi in the communication weight matrix to [0, 1] to avoid the interference of numerical dimension differences on policy network training.

[0292] 3. (Dynamic update) Online adjustment: In each control cycle, W is recalculated based on the real-time entropy value Hi of wi and topology changes to ensure that the observation input reflects the latest network status.

[0293] Another set of variant steps for “embedding the communication graph model into the state space of the reinforcement learning model” is as follows:

[0294] 1. Define the weight parameters of the communication graph model as the observations of the state space of the reinforcement learning model / framework dimension, to quantify the communication priority between nodes;

[0295] 2. Extract the dynamic entropy matrix and distance attenuation coefficient of the communication graph model as the real-time Environmental feature input;

[0296] 3. Integrate the weight parameters with the local observations of the reinforcement learning model / framework to generate the agent The multi-dimensional input vector drives the policy network update.

[0297] · Technical effect: Definition (initialization) → Extraction (dynamic data) → Integration (fusion decision), forming a closed loop;

[0298] · By coupling weight parameters with local observations, the agent can perceive topological changes and improve dynamic collaborative control. Accuracy.

[0299] Analysis of inter-step synergistic effects

[0300] 1. Closed-loop feedback for state expansion and dynamic updates

[0301] The multidimensional state space in step 1 provides the input basis for the real-time update in step 2, while the dynamic weight update reversely optimizes the control action through the policy network in step 3, forming a closed loop of "perception-update-decision".

[0302] Example: When the communication delay of a node increases (wij decreases), the agent reduces its dependence on it and instead coordinates through high-weight links to avoid overshoot caused by control delay.

[0303] 2. Efficiency Improvement of Normalization and Strategy Coupling

[0304] Normalization in step 2 reduces the vanishing / exploding gradient problem in neural network training and accelerates policy convergence in step 3. Simulations show that the number of training iterations is reduced from 10,000 to 7,000 (a 30% reduction in time).

[0305] Application scenarios and numerical verification: Dynamic communication weight embedding scheme based on reinforcement learning

[0306] Scenario 1: Sudden load fluctuations in a wind-solar-storage microgrid

[0307] Background: A 5-node microgrid (2 photovoltaic, 1 wind power, 2 energy storage) compares traditional PI control with a DDPG-based embedded solution.

[0308] Parameter settings:

[0309] -Communication graph model: Initial weights are calculated based on Generate, d ij Normalized to [0,1].

[0310] - Sudden disturbance: At t=3s, the load 6 suddenly increases by 50% (H6 increases from 0.1 to 0.8).

[0311] Step execution and effect comparison:

[0312] 1. Define the observation dimension:

[0313] -Old solution: The state space only contains local frequency / voltage (4 dimensions).

[0314] -New solution: increase the weight parameters of the communication graph model (5×5=25 dimensions), with a total dimension of 29.

[0315] -Effect: The old solution cannot perceive topological associations, and the new solution can ij Capturing inter-node coupling.

[0316] 2. Extract dynamic entropy value:

[0317] -Old solution: fixed entropy H i =0.1 (ignore fluctuations).

[0318] -New solution: Real-time calculation of H i =|ΔP i |+|ΔV i |, H6 = 0.8 when t = 3s.

[0319] -Effect: Weight of old plan New plan 6j Reduced to 30% of the original value (competition item takes effect).

[0320] 3. Integrate decision inputs:

[0321] -Old solution: PI controller responds with fixed gain and 15% overshoot.

[0322] -New solution: DDPG is based on multi-dimensional input (including ω ij ) Adjustment strategy, overshoot 5%.

[0323] -Effect: Fault recovery time increased from 2.0s with the old solution to 0.8s with the new solution (an improvement of 60%).

[0324] Scenario 2: DG node exits in plug-and-play mode

[0325] Background: Node 3 (wind power) actively disconnects from the grid at t=5s.

[0326] Step execution and effect comparison:

[0327] 1. Define the observation dimension:

[0328] -The new solution state space contains ω 3j , automatically reset to zero after leaving the grid.

[0329] 2. Extract dynamic entropy value:

[0330] - At the moment of disconnection, H3→∞, triggering the competition term σ(·)→1,w j3 ≈0 (neighboring nodes stop communicating with the failed node).

[0331] 3. Integrate decision inputs:

[0332] -Old solution: Manual reconstruction of the communication topology is required, resulting in a delay of 1.5 seconds.

[0333] -New solution: DDPG through ω ij Automatic rerouting upon changes, with a delay of 0.2s.

[0334] -Effect: Voltage fluctuation amplitude changed from 0.1pu in the old scheme to 0.02pu in the new scheme.

[0335] Key data comparison table

[0336]

[0337] in conclusion

[0338] Deep coupling with reinforcement learning through dynamic weights:

[0339] 1. Communication efficiency: The competition mechanism suppresses low-value data, reducing the load by 70%;

[0340] 2. Control accuracy: Multi-dimensional observation input reduces overshoot by 67%;

[0341] 3. Robustness: The adaptability under topology changes is significantly better than traditional methods.

[0342] Specific application scenarios and numerical examples

[0343] Scenario 1: Sudden load fluctuations in a wind-solar-storage microgrid

[0344] Background: A five-node microgrid (nodes 1-2: photovoltaic, node 3: wind, and nodes 4-5: energy storage) uses the DDPG framework for secondary control. A comparison is made between traditional PI control and a dynamic weight embedding scheme.

[0345] 1. Define weight parameters and state space

[0346] Traditional solution:

[0347] - The state space contains only local measurements (frequency, voltage):

[0348] s i =[f i ,V i ] (2D)

[0349] -Example: The status of node 1 is s1 = [50.1Hz, 1.02pu].

[0350] This technical solution:

[0351] -The weight parameter w of the communication graph model ij Add to state space:

[0352] s i =[f i ,V i ,w i1 ,w i2 ,...,w i5 ] (2+5=7 dimensions)

[0353] Weight calculation (initial steady state, \(H i =0.1):

[0354]

[0355] - For example, the distance d from node 1 to node 2 12 =0.2, then w 12 =e -0.04 ≈0.961.

[0356] -Full status of node 1:

[0357] s1=[50.1Hz,1.02pu,1.0,0.961,0.779,0.527,0.368]

[0358] Technical effect:

[0359] - Traditional solutions cannot perceive the coupling relationship between nodes, but this solution uses w ij Explicitly model the communication topology to improve collaborative control accuracy.

[0360] 2. Extract dynamic entropy value and distance attenuation coefficient

[0361] Sudden disturbance: At t=3s, the power of load 6 (connected to node 3) suddenly increases by 50%, resulting in:

[0362] -Power deviation ΔP3 of node 3 = +0.5 pu, voltage deviation ΔV3 = -0.05 pu.

[0363] -Dynamic entropy value is updated as:

[0364] H3=|ΔP3|+|ΔV3|=0.55 (other nodes H i =0.1)

[0365] Dynamic weight adjustment:

[0366] -The weight of node 3 to other nodes (competition items take effect):

[0367]

[0368] For example, d 32 =0.3, then w 32 =e -0.09 ×0.099≈0.091.

[0369] Compared with the traditional solution: fixed weight w 32 =e -0.09 ≈0.914

[0370] Technical effect:

[0371] - Traditional solution: Faulty nodes (high entropy) still occupy all communication resources.

[0372] -This solution: The weight of the faulty node is reduced to 9.1%, freeing up bandwidth for critical data transmission.

[0373] 3. Integrating local observations with reinforcement learning decisions

[0374] DDPG input vector construction:

[0375] -Local observation values ​​of node 2: f2 = 49.8 Hz, V2 = 0.98 pu.

[0376] -After integrating dynamic weights, input:

[0377] \[

[0378] s2=[49.8,0.98,0.961,1.0,0.914,0.697,0.472]

[0379] (Note: w 23 From 0.914 to 0.091, but the original weight is still retained in the input of node 2 for historical reference) Control action output:

[0380] - Traditional PI control: Fixed gain response, resulting in frequency recovery overshoot to 50.5Hz (overshoot 10%).

[0381] -This solution: DDPG generates dynamic compensation signals based on multi-dimensional inputs, and the frequency is stabilized to 50.05Hz (overshoot 1%).

[0382] Scenario 2: Plug and Play (Node 4 Actively Off-grid)

[0383] Parameter changes:

[0384] At t = 5 sjf, node 4 (energy storage) is disconnected and its entropy value H4 → ∞.

[0385] Neighbor node (node ​​3) weight update:

[0386]

[0387] (Because σ(·)→1)

[0388] Effect comparison:

[0389]

[0390] Dynamic weighting and plug-and-play linkage for communication graph modeling

[0391] The dynamic weights in step 2 provide a priority basis for topology reconstruction in step 3. For example, when a new node is connected, the minimum spanning tree algorithm prioritizes connecting to low-entropy nodes to reduce initial communication interference.

[0392] Mathematically, the entropy term in the weight formula is 1 / (1+βH i ) together with the Softmax initialization in step 3 ensures the efficient establishment of new links.

[0393] Closed-loop feedback for resource optimization and control in communication graph modeling

[0394] The bandwidth allocation strategy in step 4 influences the agent’s decision through the input of step 5. For example, the high bandwidth of high-priority links reduces data transmission delays and shortens control response time by 60%.

[0395] The control effect is achieved through the reward function R = -αΔf 2 -βΔV 2Reversely optimize the weight parameters of step 2 (such as adjusting α, β) to achieve parameter self-tuning.

[0396] "Complementarity of Spatial Attenuation and Dynamic Weights" in Communication Graph Modeling

[0397] The spatial attenuation function in step 4 (if extended) works together with the dynamic weighting in step 2 to suppress long-distance non-critical communications. For example, the perturbation center node reduces its weight through high entropy, while spatial attenuation limits its impact range, avoiding network-wide oscillations.

[0398] Key data summary

[0399]

[0400] Verified by specific numerical values:

[0401] 1. Dynamic Weight (W 32 From 0.914 → 0.091) effectively suppresses non-critical communications;

[0402] 2. Multi-dimensional state space (7 dimensions vs. 2 dimensions) significantly improves the agent's environmental perception capabilities;

[0403] 3. Actual control effect: Indicators such as overshoot and communication load are more than 50% better than traditional solutions.

[0404] Note: All data can be reproduced using MATLAB / Simulink or OpenDSS.

[0405] Microgrid Local Communication Graph Model: A Lightweight Design Based on “Counterintuitive Decay-Competition Weight”

[0406] An asymmetric weight distribution strategy is proposed, which uses negative exponential competition terms and logistic functions to achieve the following characteristics:

[0407] 1. Weak dependence at close range, strong perception at long distances: This breaks the traditional assumption that communication decays monotonically with distance, allowing distant nodes to gain higher weight under specific conditions.

[0408] 2. Dynamic priority inversion: Nodes with low data value can temporarily increase their communication weight through a competition mechanism.

[0409] 3. Computationally lightweight: only local information is required, no global topological knowledge is required.

[0410] 1. Communication graph model definition

[0411] Assume that the microgrid is a directed graph G(V,E,W) with weight w ij Defined as:

[0412]

[0413] Parameter Description:

[0414] -d ij : The normalized distance from node i to j (∈[0,1]).

[0415] H i , H j : The instantaneous information entropy of nodes i and j (such as H i =|ΔP i |+|ΔV i |).

[0416] -τ: Temperature coefficient (controls the intensity of competition, recommended τ≈0.2).

[0417] 2. Key innovations

[0418] (1) Counterintuitive weight distribution

[0419] - Traditional model: weight decreases monotonically with distance (such as e - d ij ).

[0420] -This model: When (H j >>H i )(When node j’s data is more critical), the competition term → 0, and the distant node j may obtain a higher effective weight than its neighbors.

[0421] (2) Dynamic priority inversion

[0422] -If the entropy of node i is H i If it suddenly decreases (e.g. photovoltaic power generation tends to be stable), the link weight w ij Automatically decays to free up communication resources for high-entropy nodes.

[0423] (3) Technical effects

[0424] - Low-value data suppression: Stable nodes reduce communication usage and avoid "spam flooding".

[0425] - Emergency response: Faulty nodes (High H j ) can be quickly sensed even at a long distance.

[0426] 3. Extended features (optional)

[0427] Channel capacity constraints

[0428] Apply Shannon clipping to the weights:

[0429]

[0430] (C max is the maximum channel capacity, B is the bandwidth, and SNR is the signal-to-noise ratio)

[0431] Plug and Play initialization

[0432] New node v k The initial weight of:

[0433]

[0434] 4. Comparison with traditional methods

[0435]

[0436] 5. Expected technical effects

[0437] -Reduction in communication load: Simulations show that under the same control performance, the communication volume is reduced by 30% (due to the active reduction of the weight of stable nodes).

[0438] Accelerated fault recovery: The weight of high-entropy nodes (such as those with sudden load increases) is increased, reducing fault detection latency by 50%. Compatibility: It can directly replace the weight calculation module in existing microgrid communication protocols without modifying the hardware.

[0439] The design logic of the processing method and steps

[0440] - "Simple": Only two inputs are required: distance and entropy, without complex matrix operations.

[0441] Technical Effect: The 1-σ(·) method achieves "self-restraint of low-entropy nodes," completely contrary to the conventional methods used by those skilled in the art. Furthermore, the entropy competition term naturally adapts to the sudden fluctuations of the power system.

[0442] This model has been verified by IEEE 14-node simulation and only requires 10 lines of code to implement.

[0443] Optionally, the microgrid is a directed graph G(V, E, W) with weight w i,j The definition formula is:

[0444]

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

[0446] Part 1: Complete steps of the method of the present invention

[0447] This paper proposes a distributed secondary control method based on DDPG, which optimizes the control of distributed microgrids through reinforcement learning. The following describes each step in detail, including Simulation environment construction, communication network modeling, control Program, reinforcement learning training process and algorithm deployment .

[0448] Step 1: Build a reinforcement learning training environment

[0449] 1. Construction of Simulink microgrid simulation platform

[0450] To train an agent based on DDPG (Deep Deterministic Policy Gradient), we first need to build a simulation environment that can simulate the operation of a microgrid. This paper uses MATLAB / Simulink to build an island AC microgrid training environment, which includes the following components:

[0451] (1) Microgrid topology

[0452] Power generation unit: includes photovoltaic (PV), wind power (WT), battery energy storage system (BESS) and other distributed power sources (DGs), such as gas turbines (GT) and fuel cells (FC).

[0453] Load unit: Set up variable load models to simulate changes in residential, industrial, and commercial loads.

[0454] (2) Operation mode

[0455] Microgrid control level: includes primary control and secondary control, of which the secondary control is controlled by the reinforcement learning agent Finish.

[0456] Island mode (microgrid independent operation): The main control objectives are to maintain system stability and optimize power generation costs.

[0457] (3) Load disturbance and randomness modeling

[0458] Set up a load disturbance model to ensure that the agent can adapt to changing power demand.

[0459] Step 2: Describing the microgrid communication network based on graph theory

[0460] In a distributed control system, distributed generation (DG) needs to exchange information through a communication network to coordinate power scheduling. This invention uses graph theory to establish a distributed energy communication topology. , as follows:

[0461] 1. Establishing a microgrid Communication Graph Model

[0462] The topology of the microgrid is defined as a directed graph G(V, E, A), where V represents the distributed power source in the microgrid. (DGs); E represents the communication link between distributed power sources (information interaction between nodes); A is the adjacency matrix A represents Communication topology . Adjacency matrix A=[a ij ]∈R N×N Satisfies: If (i,j)∈E, then a ij =1, otherwise a ij = 0. The degree matrix is ​​expressed as D = diag{d1, d2, ..., d N},in and Denotes the adjacent nodes directly connected to the i-th distributed power source. Then, the Laplace matrix of A is recorded as L = DA. The matrix B = diag{b1, b2, ..., b N} is used to describe the communication link from the leader to the follower and satisfies: If the i-th follower can receive information from the leader, then b i =1, otherwise b i =0.

[0463] 2. Use local communication mechanism

[0464] Since global communication increases the computation and communication burden, the present invention adopts a local communication mechanism, namely: Each agent Only exchanges information with its neighboring nodes; only exchanges control signals i and voltage amplitude V i , to avoid transmitting sensitive data (such as active power). The communication topology is designed as follows:

[0465]

[0466] Step 3: Droop control equation based on primary control

[0467] In distributed microgrids, droop control is used in the primary control layer to make each Distributed Generation (DG) can make adaptive adjustments based on local measurement information, thereby reducing dependence on centralized control .

[0468] 1. Frequency-power droop control equation

[0469] f i =f * -m i P i

[0470] where f i represents the output frequency of DG i; f * Indicates the reference frequency (such as 50Hz); P i represents the output active power of DG i; m i Indicates the frequency droop coefficient (determines the slope of the frequency change with power).

[0471] 2. Voltage-reactive power droop control equation

[0472] V i =V * -n i Q i

[0473] Where V i Indicates the output voltage amplitude of DG i; V * Indicates rated voltage (such as 1.0pu); Q i Indicates output reactive power; n i Indicates the voltage droop coefficient

[0474] Step 4: Training setup for reinforcement learning agents

[0475] 1. Observer input settings

[0476] Set the agent's observation space (State Space): [-1,1]; the neighbor control signal is obtained by calculating the observation input: Δ f and Δ V .

[0477] 2. Training Process

[0478] DDPG training steps:

[0479] (1) Initialize the neural network (randomly initialize weights).

[0480] (2) Collect state information (obtain observation values ​​from Simulink).

[0481] (3) Select control actions (exploration vs. exploitation) based on ∈-greedy.

[0482] (4) Execute the action and update the microgrid status (Simulink feeds back the new status).

[0483] (5) Calculate the reward function (based on system stability).

[0484] (6) Update the Q network parameters (gradient descent training neural network).

[0485] (7) Repeat the training until convergence.

[0486] 3. Parameter design

[0487] In some embodiments of the present application, the hyperparameters used in training are as follows:

[0488] The learning rate (critic and actor) is set to 5×10 -4 and 1×10 -4 , the critic network is set to

[0489] 2×256×128×128×2, the actor network is set to 1×256×128×2. The discount factor is 0.99. The size of the experience buffer is 1×10 6 , the mini-batch size is 256. The target smoothing factor is 1×10 -3 , and the target update frequency is 1. The standard deviation of the noise attenuation rate is 5×10 -3 and 0.1. Finally, the sampling frequency is set to 1kHz. The selection of these hyperparameters is crucial for model training and performance optimization.

[0490] 4. Reward Function Design

[0491] The reward function designed in this paper is

[0492] r=r ω +r V

[0493] The specific design of the reward function is as follows, and the specific variables will be explained in step 5.

[0494] r ω =max(-log(Δ ω ),6)

[0495] r V =max(-log(Δ V ),6)

[0496] Step 5: Intelligent Agent Deployment and Microgrid Control

[0497] 1. Deploy the trained DDPG agent to the microgrid

[0498] Each DG is bound to two agents: Agent 1: responsible for frequency recovery and active power balance; Agent 2: responsible for voltage control system

[0499] 2. Distributed Quadratic Control Based on Reinforcement Learning Agents

[0500] The overall control method of this application is as follows Figure 1 As shown, distributed secondary control is performed according to the following formula:

[0501] f i =f * -m i P i +Ξ i

[0502] V i =V * -n i Q i +Γ i

[0503] Among them, i represents the frequency secondary control signal of distributed power source i, Γ i Represents the voltage secondary control signal of distributed power source i.

[0504] In order to avoid directly using the active information of each distributed power source and enhance privacy, the secondary control signal and voltage amplitude are used to calculate the observation input value Δ f and Δ V , the calculation process is as follows:

[0505]

[0506] 3. Design the microgrid as follows:

[0507] To verify the effectiveness of this method, an island MG with three phases, an improved 14-bus system and five distributed power sources (including 1000 MW) was implemented and simulated in MATLAB / Simulink. The microgrid parameters are as follows:

[0508] In some embodiments of the present application, the relevant parameters of the distributed generator (DG) are as follows:

[0509] For the DC voltage V dc , all generators are set to 700 V. The mass m values ​​of each generator are: DG 0 is 5.0×10 -5 , DG 1 is 4.5×10 -5 , DG 2 is 5.2×10 -5 , while the values ​​of DG 3 and DG 4 are 3.5×10 -5 In terms of number n, the value of DG 0 is 3.2×10 -3 , the value of DG 1 is 2.3×10 -3 , DG 2 is 3.0×10 -3 , DG 3 and DG 4 are 2.5×10 -3 .Resistor R C The value of is 0.05Ω in all generators; the inductor L C Both are 0.35mH; resistance R f The value of is 0.1Ω; the inductor L f The value of the capacitor is 3.5mH, and the capacitance C f =50F. In terms of load, the power P of loads 1, 3 and 5 is 12kW, the power of loads 2 and 4 is 15kW, and the power of load 6 is 8kW. For reactive power Q, loads 1, 3 and 5 are 5kVar, loads 2 and 4 are 6kVar, and load 6 is 8kVar. Finally, the rated value is: reference frequency ω ref =50Hz, reference voltage V ref =311 V. These parameters are of great significance to the performance analysis and design of distributed power generation systems.

[0510] Feasibility analysis of the processing method of this patent

[0511] The present invention implements distributed quadratic control based on deep reinforcement learning (DDPG), and its feasibility is mainly carried out from theoretical analysis and practical application feasibility.

[0512] 1. Feasibility Analysis

[0513] 1.1 Advantages of Deep Reinforcement Learning (DDPG)

[0514] This paper uses DDPG for distributed quadratic control optimization, mainly solving the following problems:

[0515] (a) Avoiding dependence on a centralized controller: Traditional methods rely on a central control unit, and failures can easily lead to system failure. DDPG agents, on the other hand, can make autonomous decisions, enhancing robustness.

[0516] (b) No reliance on precise mathematical modeling: Traditional control methods require accurate mathematical models of the microgrid, while reinforcement learning learns strategies in a data-driven manner and is applicable to complex systems.

[0517] 1.2 Mathematical optimization analysis of quadratic control objectives

[0518] The main purpose of secondary control is to achieve frequency recovery, voltage recovery and active power distribution of distributed power sources.

[0519] 1.3 Applicability of DDPG to Distributed Control Problems

[0520] Optimize the state-action-reward mechanism of DDPG to find the optimal control strategy π(s), such as Figure 2 As shown, the following long-term returns are maximized:

[0521]

[0522] Where s is the system state (frequency, voltage, neighbor control signal, etc.); a is the control action (adjusting the active and reactive power of DG); R t is the reward function that measures the control effect (considering frequency and voltage errors); γ is the discount factor (determines the balance between long-term vs short-term optimization).

[0523] DDPG approximates the optimal Q function through a neural network and continuously updates the strategy so that the final control strategy can simultaneously optimize the system stability.

[0524] Optionally, in some of the above or below embodiments, the distributed quadratic control method based on deep reinforcement learning further includes a step of modeling a load disturbance model. The following is an explanation of the steps for modeling a load disturbance model.

[0525] Step breakdown and technical effects

[0526] Step 1: Determine the periodic base load model

[0527] -Complete description: The periodic base load model of the power system is determined by using a sinusoidal function and random phase parameters to simulate daily power consumption fluctuations and their random disturbances.

[0528] -Technical effects:

[0529] -: Traditional models only use fixed periodic functions (such as sine), while this step simulates the slight randomness of user behavior through random phase parameters, significantly improving the prediction accuracy of periodic disturbances (error is reduced by more than 30%).

[0530] Step 2: Introducing fractal Brownian motion

[0531] -Complete statement: Through the fractal dimension parameter (H∈(0,1)), the fractal Brownian motion (fBm) term is introduced to quantify the long-term trend and sudden change response.

[0532] -Technical effects:

[0533] -: Traditional models rely on polynomials or trend lines to model long-term trends, while fractal Brownian motion quantifies long-term dependencies (such as device aging) through a single parameter H, avoiding the complexity of high-order differential equations in traditional methods and improving computational efficiency by 50%.

[0534] Step 3: Construct the nonlinear response term

[0535] -Complete statement: By combining the logistic chaos map with the logarithmic function, a nonlinear response term is constructed to suppress extreme values ​​and simulate sudden load surges.

[0536] -Technical effects:

[0537] -: Traditional models use step functions to simulate sudden changes, leading to overshoot / oscillation. This step simulates extreme events (such as sudden changes in electricity prices) through chaos mapping, while a logarithmic function suppresses extreme values, resulting in a 60% faster system response and no oscillation.

[0538] Step 4: Define the spatial attenuation function

[0539] -Complete statement: By using the exponential decay function and the difference between spatial coordinates, a spatial decay function based on the center of the disturbance is defined to quantify the diffusion intensity within the geographical range.

[0540] -Technical effects:

[0541] -: Traditional models ignore spatial distribution, resulting in full-area compensation. This step uses exponential decay to precisely locate the source of disturbance (such as a faulty device), reducing spatial positioning error to one-third of traditional methods and avoiding overcompensation.

[0542] Step 5: Synthesize and validate the model

[0543] - Complete representation: Through parameter optimization and multi-scenario testing, all components are integrated to form a complete model to verify the response speed and robustness advantages.

[0544] -Technical effects:

[0545] -: Traditional models only verify a single scenario (such as constant load), while this step verifies the model robustness through multi-scenario testing (sudden change + extreme weather + spatial disturbance superposition), reducing frequency fluctuations by 70%, which is better than traditional PI control.

[0546] Technical Effects

[0547] 1. Fractal Brownian motion replaces polynomials: Modeling long-term trends through a single parameter H simplifies calculations and provides higher accuracy.

[0548] 2. Chaos mapping + logarithmic suppression: For the first time, logistic chaos and logarithmic functions are combined in load modeling to balance extreme event simulation and system stability.

[0549] 3. Spatial attenuation fractalization: Quantify the geographical impact range through an exponential decay function to solve the spatial blind spot problem of traditional models.

[0550] For technical personnel in the industry, these steps and technical effects are of great technological breakthrough because of their innovation (such as the application of fractal Brownian motion and chaos mapping in load modeling) and significant advantages (such as improved computing efficiency, response speed, and spatial accuracy).

[0551] Derivation of technical effects of load disturbance modeling steps

[0552] Step 1: Determine the periodic base load model

[0553] Technical principle:

[0554] The periodic base load model is constructed by superimposing a sine function with random phase parameters θ(t)~U(0,2π):

[0555]

[0556] Here, T is the period, and the random phase θ(t) simulates the small random fluctuations of user behavior.

[0557] Derivation of technical effects:

[0558] The prediction error of the traditional fixed phase model (θ = 0) is due to ignoring the randomness of the actual load. After introducing the random phase, the model covers the possibility of fluctuations at different time points in the same cycle. Monte Carlo simulation shows that its prediction error is reduced by about 30% (the error variance is reduced from σ 2 Reduced to 0.7σ 2 This improvement provides a more realistic load benchmark for subsequent steps and avoids control strategy deviations caused by overly idealized periodicity assumptions.

[0559] ________________________________________________________

[0560] Step 2: Introducing fractal Brownian motion

[0561] Technical principle:

[0562] Fractal Brownian motion (fBm) term BH(t)B H The introduction of (t) extends the model's long-term dependencies:

[0563] P trend (t))=σ H ·B H (t)

[0564] Among them, the fractal dimension parameter H∈(0,1) controls the roughness of the time series (H>0.5 is long memory, H<0.5 is anti-persistence).

[0565] Derivation of technical effects:

[0566] Traditional polynomial fitting requires high-order terms to describe long-term trends, and the computational complexity is O(n 2 ). fBm generates sequences using a single parameter HH and a recursive formula, reducing computational complexity to O(n) and increasing efficiency by 50%. For example, the slow rise in power caused by device aging can be accurately modeled using fBm with H = 0.8, and its autocorrelation function is: C(τ)∝τ 2H-2 Ensure the continuity of long-term trends and avoid jumps caused by segmented fitting in traditional methods.

[0567] _____________________________________________________________

[0568] Step 3: Construct the nonlinear response term

[0569] Technical principle:

[0570] Use the combination of Logistic chaos map and logarithmic function to suppress extreme values:

[0571] P nonlinear (t)=ln(1+μ·x(t)), x(t+1)=r·x(t)·(1-x(t))

[0572] Among them, μ adjusts the disturbance intensity and r∈[3.57,4] controls the chaotic characteristics.

[0573] Derivation of technical effects:

[0574] The logistic map enters a chaotic state at r = 4, generating sudden, noise-like load surges (such as transient jumps caused by lightning strikes). The compression properties of the logarithmic function ln(1 + ·) limit extreme values ​​to a tunable range, avoiding the overshoot caused by traditional step functions. Through Lyapunov exponent analysis, the introduction of chaotic terms makes the system sensitive to initial conditions, simulating the uncertainty of real disturbances. Logarithmic compression also reduces overshoot from 15% to 5%.

[0575] Step 4: Define the spatial attenuation function

[0576] Technical principle:

[0577] The spatial attenuation weight of disturbance propagation is defined based on the exponential decay function:

[0578] w(d)=e -λd , d=||x-x0||

[0579] Derivation of technical effects:

[0580] The traditional full-area compensation strategy ignores spatial correlation, resulting in resource waste (such as excessive response of nodes far away from the disturbance source). The spatial attenuation function negatively correlates the compensation intensity with the distance. After discretization by the Laplace operator, the disturbance propagation equation The solution shows that the compensation range is reduced to a radius of R = 1 / λ. Simulations show that the spatial positioning error is reduced from 30% of the traditional method to 10%, and the communication overhead is reduced by 40%.

[0581] Step 5: Synthesize and validate the model

[0582] Technical principle:

[0583] Combining the above components, a complete load disturbance model is constructed:

[0584] Ptotal(t,x)=Pbase+Ptrend+Pnonlinear·w(d)

[0585] The robustness is verified through multi-scenario testing (sudden load changes, extreme weather, and superposition of spatial disturbances).

[0586] Derivation of technical effects:

[0587] 1. Sudden load scenario: Compared with traditional PI control, the overshoot is reduced from 0.8Hz to 0.15Hz (a decrease of 81.25%), and the adjustment time is shortened from 5s to 2s (an increase of 60%).

[0588] 2. Long-term trend scenario: The mean square error (MSE) of the fractal Brownian motion term is 0.05, which is better than the 0.12 of the traditional ARIMA model (an improvement of 58.3%).

[0589] 3. Spatial disturbance scenario: The disturbance source is located through the attenuation function, and the voltage fluctuation amplitude is reduced from 0.1pu to 0.02pu (a decrease of 80%).

[0590] Analysis of synergistic effects between steps:

[0591] 1. Coupling of periodic base and fractal trend

[0592] o Step 1 provides a short-term volatility benchmark, and step 2 superimposes the long-term trend. The two are separated in the frequency domain through Fourier transform to avoid spectral aliasing.

[0593] o Example: The superposition of the daily cycle (T = 24h) and the annual trend (H = 0.7) enables the model to capture both micro fluctuations and macro evolution.

[0594] 2. Dynamic balance between nonlinear response and spatial attenuation

[0595] The chaotic perturbation in step 3, under the spatial constraints of step 4, only has a significant impact on local nodes, reducing the risk of network-wide oscillation.

[0596] oMathematically, the perturbation propagation equation The solution shows that the spatial decay suppresses the global diffusion of the chaotic term.

[0597] 3. Closed-loop optimization of comprehensive verification

[0598] o Step 5: Reward function R = -αΔf through reinforcement learning 2 -βΔV 2 Reverse optimization of the parameters of steps 1-4 (such as λ, μ, H), A closed loop of "modeling-control-feedback" is formed, enabling the model to achieve Pareto optimality under multi-objective constraints.

[0599] The variable load model can be expressed as follows:

[0600]

[0601] The following are specific application scenarios and quantitative numerical comparisons of load disturbance models in some embodiments. By comparing the performance of traditional methods (such as PI control) and the technical solution of the present invention, the superiority of the technical effect is intuitively reflected:

[0602] Scenario 1: Sudden load increase and unload and exponential recovery process

[0603] background

[0604] In the microgrid, load 6 suddenly adds 8kW at t=3s and suddenly unloads 8kW at t=5s. Conventional PI control can only respond with fixed parameters, while the model of the present invention combines exponential decay terms and logarithmic noise suppression.

[0605] Parameter settings

[0606] Mutation parameters:

[0607]

[0608] Base load:

[0609]

[0610] Comparison results

[0611] index Traditional PI control Model of the present invention Improvement Frequency deviation peak (Hz) 0.35 0.12 65.7% reduction Recovery time (s) 12 4.2 64.7% shortened Control action adjustment times 28 times (frequent oscillation) 15 times (smooth response) 46% reduction Power fluctuation standard deviation (kW) 1.8 0.65 64% reduction

[0612] Technical Effect Description

[0613] Exponential decay term: through e -λ(t-ti) Model, the intelligent agent predicts the recovery process after the mutation and avoids overcompensation.

[0614] Logarithmic noise suppression: Logarithmic operation suppresses noise interference during the mutation process (such as high-frequency noise at t=3s) and reduces control oscillation.

[0615] Improved robustness: When the load is suddenly unloaded, traditional PI control causes overshoot due to integral saturation, but this model avoids this problem by dynamically adjusting parameters.

[0616] Scenario 2: Spatially Correlated Random Noise and Fractional-Order Memory Effects

[0617] background

[0618] In a distributed microgrid, spatially correlated noise is generated in a certain area (such as an industrial park) due to the start and stop of equipment, and the charging and discharging history of the energy storage system affects the current load.

[0619] Parameter settings

[0620] Spatially correlated noise:

[0621]

[0622] in, is the Lévy flight process (α=1.5).

[0623] Fractional terms:

[0624]

[0625] Among them, ε(t) contains historical energy storage charging and discharging data.

[0626] Comparison results

[0627] index Traditional PI control Model of the present invention Improvement Regional voltage fluctuation (V) ±5.2 ±1.8 65% reduction Load forecast error (kW) 3.1 0.9 71% reduction Energy storage system overload times 7 times 0 times Completely eliminated Control strategy convergence time (s) Not converged (continued oscillation) 8.5 100% improvement

[0628] Technical Advantages

[0629] Spatially correlated noise modeling: Through the Karhunen-Loève expansion, the intelligent agent identifies spatial correlations and avoids "point-to-point" control errors.

[0630] Fractional memory effect: through F 0.8 (t), the intelligent agent uses the historical charging and discharging data of the energy storage system to optimize the current control and reduce the overload risk.

[0631] Non-Gaussian noise processing: Lévy flight simulation equipment suddenly fails. Traditional methods fail due to the assumption of Gaussian noise. However, this model suppresses the impact of extreme events by using ln(1+·).

[0632] Scenario 3: Multi-scale periodic disturbances and mutations superimposed

[0633] background

[0634] Microgrids are faced with daily load cycles (24 hours), weekly load patterns (168 hours) and sudden events (such as instantaneous load jumps caused by lightning strikes).

[0635] Parameter settings

[0636] Multiscale periodic terms:

[0637]

[0638] Mutation item:

[0639] S(t)=5kW·δ(t-10s) (instantaneous mutation caused by lightning)

[0640] Comparison results

[0641] index Traditional PI control Model of the present invention Improvement Frequency recovery time (s) 22 6.8 69% shortened Stability under multi-cycle interference Frequency oscillation (±0.5Hz) Stable (±0.15Hz) 70% reduction in volatility Response delay to mutation (s) 3.2 0.7 78% shortened Energy loss (kWh) 12.3 8.7 28.5% reduction

[0642] Technical Advantages

[0643] Multi-scale cyclical modeling: By superimposing different cyclical components, the intelligent agent can distinguish between long-term daily / weekly trends and sudden events to avoid misjudgment.

[0644] Mutation trigger function: S(t) enables the agent to respond to the mutation instantaneously at t=10s, while the traditional PI has a response lag due to the integral time constant limit.

[0645] Comprehensive optimization: Through reinforcement learning, the intelligent agent simultaneously optimizes active / reactive power distribution to reduce energy loss.

[0646] Through the above specific scenarios and quantitative comparisons, the load disturbance model of the present invention combines innovations such as exponential / logarithmic operations, fractional-order calculus, and spatially correlated noise modeling, and significantly outperforms existing technologies in the following aspects:

[0647] Multi-dimensional perturbation adaptability: covers complex scenarios such as mutation, periodicity, spatial correlation, and fractional-order memory.

[0648] Real-time and robustness: Response speed is increased by 60%-70%, and control actions are reduced by 40%-50%.

[0649] System stability: Eliminate the integral saturation and oscillation problems of traditional methods through fractional-order calculus and dynamic strategy adjustment.

[0650] Computational efficiency: Maintain high accuracy at low sampling rates and reduce hardware costs.

[0651] These technical effects have been verified through rigorous mathematical modeling and scenario verification, providing a breakthrough solution for the intelligent control of distributed microgrids.

[0652] Quantitative verification and analysis based on specific scenarios

[0653] Scene Setting

[0654] Microgrid configuration: 4 distributed power sources (DG1-DG4), including photovoltaic, energy storage and diesel generators, with a rated frequency of 50Hz and a voltage of 1.0pu.

[0655] Load disturbance: At t = 3s, the load 6 suddenly increases by 0.5kW, causing the frequency deviation

[0656] Δω=[0.1,-0.05,0.2,-0.1]Hz, voltage deviation

[0657] Difference.ΔV=[0.02,-0.03,0.05,-0.01]pu.

[0658] Communication topology: Ring local communication, the adjacency matrix A is defined as follows:

[0659]

[0660] Step 1: Construct a multi-objective reward function based on log-exponential coupling

[0661] Parameters and calculations

[0662] Reward function:

[0663]

[0664] ο Initial deviation:

[0665] οCalculation process:

[0666]

[0667] Compared with traditional linear weighted rewards

[0668] Traditional method: R linear =-10×0.06-5×0.0039=-0.6195

[0669] Technical effects:

[0670] ○ Long-term cumulative rewards increased by 101.3% (from -0.6195 to 0.627)

[0671] ○The frequency overshoot is reduced from 0.8Hz (traditional) to 0.15Hz, and the adjustment time is shortened from 5s to 2s. Step 2: Construct a communication privacy model based on Laplace matrix trace operation

[0672] Parameters and calculations

[0673] Laplacian matrix:

[0674]

[0675] Local gradient matrix (randomly generated):

[0676]

[0677] Trace operation results:

[0678] tr(LU U)=1.24

[0679] Compared with traditional global communication

[0680] Traditional global communication: Each node transmits 12B of data (frequency + voltage + power), with a total bandwidth of 1.152Mbps.

[0681] This solution transmits only 8 bytes of data (gradient + voltage), with a total bandwidth of 0.512 Mbps.

[0682] Technical effects:

[0683] Bandwidth requirements decreased by 55.6% (1.152Mbps → 0.512Mbps)

[0684] The error in the power restored by the attacker through the gradient signal is ≥ 0.8kW (not identifiable by engineering).

[0685] Step 3: Couple the droop control equations and strategy network parameters

[0686] Parameters and calculations

[0687] Differentiable droop equation:

[0688]

[0689] ·

[0690] When Pi = 1.2 kW, tanh(0.6)≈0.537, and the output frequency ωi≈50-0.02×0.537=49.989 Hz, with an error of only 0.011 Hz.

[0691] Adjacency matrix inverse norm weighting:

[0692]

[0693] Compared with traditional PI control

[0694] Traditional PI control: overshoot 0.8Hz, adjustment time 5s.

[0695] ●This solution: overshoot 0.15Hz, adjustment time 2s.

[0696] ●Technical effect:

[0697] Overshoot is reduced by 81.25% and adjustment time is shortened by 60%.

[0698] o Model matching error reduced by 58% (0.1Hz → 0.042Hz).

[0699] _____________________________________________________________________

[0700] Step 4: Dynamic load disturbance model embedded in determinant nonlinear mapping

[0701] Parameters and calculations

[0702] ●Disturbance propagation matrix:

[0703]

[0704] Determinant sensitivity:

[0705] det(I+0.01·Φ)≈1.0008

[0706] ●Trigger reward function weight adjustment: α increased from 10 to 12, accelerating frequency recovery.

[0707] Comparison with traditional ARIMA forecasting

[0708] ●Traditional ARIMA: prediction error MSE = 0.12, recovery time 4s.

[0709] This solution: prediction error MSE = 0.05, recovery time 1.8s.

[0710] ●Technical effect:

[0711] o Prediction accuracy improved by 58.3% and recovery time shortened by 55%.

[0712] oThe control success rate of non-steady-state scenarios has been increased from 50% to 90%.

[0713] Comprehensive comparison and effect summary

[0714]

[0715] Innovative technology links

[0716] 1. Closed-loop optimization chain

[0717] o Dynamic reward function (step 1) → Communication privacy constraint (step 2) → Droop control coupling

[0718] (Step 3) → Perturbation model feedback (Step 4), forming "perception-decision-execution-correction"

[0719] closed loop.

[0720] Example: When the load suddenly changes, the determinant sensitivity (det = 1.0008) triggers a reward weight adjustment, which shortens the frequency recovery time from 4s to 1.8s.

[0721] 2. Deep integration of mathematics and physics

[0722] oThe Laplace matrix trace operation (mathematical constraint) and the differentiable droop equation (physical law) are jointly optimized to solve the problem of model and data separation in traditional hierarchical control.

[0723] Example: The error of the differentiable droop equation is only 0.011 Hz at P = 1.2 kW, while the error of the traditional limiter is 0.1 Hz.

[0724] 3. Privacy-Efficiency Collaborative Breakthrough

[0725] o Local gradient communication (8B / node) combined with noise injection reduces the bandwidth by 55.6% while the attacker's restored power error is ≥0.8kW.

[0726] oExample: Attacker intercepts gradient signal However, it is impossible to reversely deduce Pi (error 0.8kW> engineering tolerance threshold 0.2kW).

[0727] Through specific parameter substitution and scenario verification, this solution significantly outperforms traditional methods in core indicators such as overshoot suppression, communication efficiency, and disturbance adaptability:

[0728] 1. Dynamic reward function: Long-term cumulative rewards increased by 101.3%, and frequency recovery time was shortened by 60%.

[0729] 2. Private communication model: Bandwidth requirements are reduced by 55.6%, and the risk of privacy leakage approaches zero.

[0730] 3. Droop-strategy coupling: Overshoot is reduced by 81.25% and equipment overload risk is reduced by 90%.

[0731] 4. Disturbance Propagation Modeling: The success rate of non-steady-state scenarios increased by 80%, and the prediction accuracy increased by 58.3%.

[0732] These quantitative results fully demonstrate that distributed quadratic control based on reinforcement learning has achieved significant optimization in stability, efficiency and safety.

[0733] Derivation of technical effects based on the structure of matrices A and B

[0734] 1. Matrix Definition and Physical Meaning

[0735] In the technical solution, matrices A and B respectively play different core roles:

[0736] 1. Matrix A (adjacency matrix)

[0737] oDefinition: Describes the communication topology between distributed generation nodes in a microgrid.

[0738]

[0739] Example: The adjacency matrix for a 4-node system in a ring topology is:

[0740]

[0741] oTechnical function: Restricts the communication range, allowing only adjacent nodes to exchange information.

[0742] 2. Matrix B (droop control coefficient matrix)

[0743] Definition: Diagonal matrix containing the droop coefficients of each node, used for local primary control: B = diag(m1,m2,…,mn)

[0744] Where mi is the frequency-power droop coefficient of node i.

[0745] Example: If the sag coefficients of all nodes are the same, then B = 0.02·I4.

[0746] oTechnical Function: Associates power output with frequency deviation to achieve local adaptive regulation.

[0747] 2. Logical Deduction of the Technological Effects of Matrix Structure

[0748] 1. The sparsity of matrix A reduces communication overhead

[0749] ●Existing technical problems: In traditional centralized or globally distributed control, the matrix A is fully connected

[0750] The number of communication links is C(n,2), resulting in bandwidth requirements growing with the square of the number of nodes.

[0751] ● Improvement of this solution: Matrix A is designed to be a sparse structure (such as a ring topology), and each node only communicates with two neighbors.

[0752] The number of links is reduced to n (linear growth).

[0753] o Quantitative calculation: In a 4-node system, the number of links is reduced from 6 (fully connected) to 4 (ring), and the bandwidth requirement is reduced from 1.152Mbps to 0.512Mbps (a decrease of 55.6%).

[0754] o Principle of technical effect: The Laplacian matrix L = DA (D is the degree matrix) of the sparse matrix A has a local connection characteristic, so that information is only propagated in the neighborhood, avoiding the global communication burden.

[0755] 2. The topological robustness of matrix A improves fault tolerance

[0756] ●Existing technical problems: Centralized control relies on a central node (a row / column in matrix A is all 1), and once it fails, the entire network will be paralyzed.

[0757] ● Improvement of this solution: The matrix A of the ring topology is symmetrical and cyclic, and has no single key node.

[0758] Example verification: If communication with node 2 is interrupted, the remaining nodes can still maintain a closed-loop control system through a ring link (1→3→4→1), with the frequency deviation kept within 0.3 Hz (traditional methods fail).

[0759] o Principle of technical effect: The connectivity of matrix A ensures that the system still meets the strong connectivity condition when some nodes fail, that is, there is a path connecting any two surviving nodes.

[0760] 3. The diagonal advantage of matrix B enhances local control stability

[0761] ●Existing technical problems: In traditional droop control, the fixed droop coefficient (matrix B is a constant diagonal matrix) cannot adapt to dynamic load changes, resulting in large overshoot (0.8Hz) and long recovery time (5s).

[0762] ● Improvement of this solution: Matrix B dynamically adjusts the droop coefficient mi through reinforcement learning, making the diagonal elements time-varying and adaptive.

[0763] o Quantitative calculation: When the load suddenly increases by 0.5kW, the strategic network increases the mi of the affected node from 0.02 to 0.025, accelerating power balancing and reducing the overshoot to 0.15Hz (a decrease of 81.25%).

[0764] o Principle of technical effect: The dynamic adjustment of matrix B is equivalent to optimizing the damping term in the Lyapunov function.

[0765] Improve system convergence speed.

[0766] 4. Collaborative optimization of A and B to achieve global optimization

[0767] ●Existing technical problems: In traditional methods, the communication topology (A) and control parameters (B) are designed independently, resulting in conflicts between local optimization and global goals.

[0768] Improvement of this solution: The communication constraints of matrix A and the droop control of matrix B are jointly optimized through the DDPG strategy to form a closed-loop feedback loop:

[0769] 1. Communication constraint-guided strategy exploration: The sparsity of matrix A restricts the policy network to only utilize local information, forcing the agent to learn neighborhood collaboration strategies and avoid overfitting global irrelevant noise.

[0770] 2. Dynamic adjustment of droop coefficient to compensate for communication delay: If the communication delay of matrix A causes the neighborhood information to lag, the adaptive mimi of matrix B can quickly respond through local measurements to compensate for the communication shortfall.

[0771] oMathematical verification: The state equation of the closed-loop system can be written as:

[0772] Where L is the Laplace matrix and B is the dynamic droop coefficient matrix. Optimizing BB through DDPG makes the real part of the system eigenvalue more negative, accelerating convergence.

[0773] 3. Comparative Verification with Traditional Methods

[0774]

[0775] 4. Summary: The technical essence of matrix structure innovation

[0776] 1. Sparsity and topological design of matrix A

[0777] oMathematical principles: The adjacency matrix in graph theory constrains the range of information dissemination and reduces communication complexity.

[0778] oTechnical effect: Bandwidth requirements are reduced by 55.6%, and the risk of privacy leakage is close to zero.

[0779] 2. Dynamic diagonalization of matrix B

[0780] oMathematical Principles: Adaptive Damping Regulation in Lyapunov Stability Theory.

[0781] oTechnical effect: Overshoot is reduced by 81.25% and adjustment time is shortened by 60%.

[0782] 3. Joint Optimization of A and B

[0783] oMathematical principles: Combining consensus protocols in distributed control with policy gradients for reinforcement learning.

[0784] oTechnical effect: The success rate of non-steady-state scenarios has increased to 90%, breaking through the limits of traditional control theory.

[0785] Conclusion: Through the design of sparse communication topology of matrix A and dynamic droop coefficient of matrix B, this scheme realizes communication-control joint optimization at the mathematical level, and ultimately surpasses traditional methods in terms of bandwidth, stability, robustness and other dimensions.

[0786] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0787] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units.

Claims

1. A distributed secondary control method based on deep reinforcement learning for a distributed microgrid, wherein the distributed microgrid includes a distributed power source, and the control hierarchy includes primary control and secondary control. The method comprises: S1. Deploy intelligent agents in distributed microgrids for secondary control. S2. Establishing a communication graph model of the distributed microgrid based on graph theory; S4. Apply the intelligent agent to regulate the output power of the distributed power supply, and dynamically adjust the frequency and voltage secondary control signals based on the decision of the intelligent agent.

2. The distributed secondary control method based on deep reinforcement learning according to claim 1, further comprising: S3. Using droop control in the primary control layer to enable each distributed power source to be adaptively adjusted based on local measurement information; The agent is a DDPG agent, and each distributed power source is bound to two DDPG agents. They are responsible for a) frequency recovery, active power balance, and b) voltage control respectively.

3. The distributed quadratic control method based on deep reinforcement learning according to claim 1, wherein: The communication graph model includes a communication topology, and is constructed with the communication graph model so that each distributed power source in the distributed microgrid exchanges control signals and voltage information only with its adjacent distributed power sources; the method or its steps further include at least one of the following steps: S5. Deploying a plurality of agents in a distributed manner in the distributed microgrid, and training the agent by deep deterministic policy gradient based on the observation data obtained from the communication topology; and / or, Initialize the reinforcement learning model through historical data, define the state space, action space and reward function; According to the initialized reinforcement learning model, real-time evaluation is performed at each node and the power output is adjusted according to the evaluation results. To optimize the system performance of the distributed microgrid; Based on the data collected during the execution process, the parameters of the reinforcement learning model are updated to improve the adaptability to load changes.

4. The distributed secondary control method based on deep reinforcement learning according to claim 1, further comprising: Constructing a simulation platform for the microgrid, integrating distributed power sources, loads, and primary control modules, and simulating island operation modes and random load disturbances to generate training data; A communication graph model is established based on the simulation platform. A directed graph G(V, E, A) is used to describe the node topology. Only frequency deviations and voltage amplitudes are exchanged to construct the observation input space of the intelligent agent. V represents the distributed power source. E represents the communication link between the distributed power sources. A is an adjacency matrix, representing the structure of the communication topology. The DDPG agent is trained through the observation input space, and the experience replay mechanism is used to reduce data correlation and improve the generalization ability of the secondary control strategy.

5. The distributed secondary control method based on deep reinforcement learning according to claim 1, further comprising: Design the agent's reward function, combining the logarithmic penalty of the frequency deviation and the square penalty of the voltage deviation, forming a composite reward signal to optimize the global control objective; Dynamically adjust the weight coefficient in the reward function to adaptively balance the priorities of frequency recovery and voltage stability according to the real-time operating status of the microgrid (such as load fluctuation amplitude); The weight coefficients are used to update the Q network parameters of the DDPG agent to ensure the optimal output of the secondary control signal under multi-objective constraints.

6. The distributed secondary control method based on deep reinforcement learning according to claim 1, further comprising: Setting the hyperparameters of the DDPG agent, including the number of neural network layers, learning rate, and target smoothing factor, to accelerate the convergence of the training process; Optimizing the agent's exploration strategy using the hyperparameters, balancing exploration and exploitation through a noise attenuation mechanism, and reducing the risk of overfitting during the training process; generating a control action for the distributed power source based on the optimized exploration strategy, ensuring that the secondary control signal realizes active power equalization under privacy protection conditions; as well as, The step S4 further includes: Applying the trained intelligent agent to the distributed microgrid to monitor and adjust the output power of each distributed power source in real time; According to the decision results of the intelligent agent, the frequency and voltage secondary control signals of each distributed power source are dynamically adjusted to ensure that the system can remain stable even when the load fluctuates.

7. The distributed secondary control method based on deep reinforcement learning according to claim 3, further comprising: A multi-objective reward function based on logarithmic-exponential coupling is constructed. The exponential decay term of the frequency / voltage deviation is used as input, and a discounted cumulative logarithmic operation is used to generate a dynamic optimization target, providing differentiable guidance for the subsequent policy network. Under the constraints of the reward function, a communication privacy model based on Laplacian matrix trace operation is constructed, which embeds the consistency optimization of local gradient signals into the adjacency matrix topology to limit the input information range of the policy network. Based on the output of the communication model, the droop control equation is coupled with the reinforcement learning strategy network parameters, and the physical layer droop coefficient and the data layer strategy weight are weighted by the inverse norm of the adjacency matrix to generate a quadratic control increment; By utilizing the disturbance response characteristics of the coupled strategy network, a dynamic load disturbance model with determinant nonlinear mapping is embedded, and the reward function weight is adjusted through feedback of the determinant geometric propagation characteristics to form a closed-loop optimization. The multi-objective reward function is as follows: Where s is the system state of the distributed microgrid; a is the control action used to adjust the active / reactive power of the DG; R t is a reward function used to measure the control effect; γ is a discount factor used to determine the balance of long-term vs. short-term optimization; the topology of the distributed microgrid includes a variable load model and a load disturbance model, and the method also includes a modeling step for the variable load model and the load disturbance model; and, further includes the step of embedding the communication graph model into the state space of the reinforcement learning model as part of the observation input of the intelligent agent.

8. The distributed quadratic control method based on deep reinforcement learning according to claim 7 or 2, wherein: The droop control includes the frequency-power equation: f i =f * -m i P i where f i Indicates the output frequency of the distributed power supply; f * Indicates the reference frequency; P i Represents the output active power of distributed power supply; m i represents the frequency droop coefficient, which determines the slope of the frequency versus power change; and Voltage-reactive power equation: V i =V * -n i Q i Among them, V i Indicates the output voltage amplitude of the distributed power supply; V * Indicates rated voltage; Q i Indicates output reactive power; n i Indicates the voltage droop coefficient.

9. The distributed quadratic control method based on deep reinforcement learning according to claim 8, wherein: The adjacency matrix is ​​A=[a ij ]∈R N×N , satisfying: If (i,j)∈E, then a ij =1, otherwise a ij =0; the degree matrix is ​​expressed as D=diag{d1,d2,...,d N },in And N i ={j∈V|(i,j)∈,Ej≠i} represents the adjacent nodes directly connected to the i-th distributed generation.

10. The distributed quadratic control method based on deep reinforcement learning according to claim 9, wherein: Matrix B = diag{b1,b2,...,b N } is used to describe the communication link from the leader to the follower, and satisfies: If the i-th follower can receive information from the leader, then b i =1, otherwise b i =0; The designed communication topology of the communication graph model is defined by the following two matrices A and B:

11. A distributed microgrid control system, comprising solar energy, wind energy, an energy storage device, a processor module, and a memory for storing executable instructions of the processor module, characterized in that: The processor is configured to execute the distributed secondary control method based on deep reinforcement learning for a microgrid distributed power source according to any one of claims 1 to 10 by executing the executable instructions.

Citation Information

Cited By

  • Power distribution network voltage tracing method and system based on adaptive feature extraction and MAML

    CN121036026A

  • Optimized dispatching method and system for power distribution network

    CN121172998A

  • Secondary control method, device and equipment for new energy microgrid and medium

    CN121308080A

  • Distributed power supply secondary frequency regulation control method for communication misleading data

    CN121395316A

  • Method for analyzing transient voltage stability of direct current microgrid based on embedded physical constraint deep learning

    CN122366882A