CMAB-based main and distribution network dynamic joint simulation method for providing secondary frequency modulation by flexible load

By adopting the dynamic joint simulation framework of the HELICS platform and the CUCB-Avg algorithm in the power grid, combined with the constant frequency control method, the problems of insufficient frequency simulation accuracy and single frequency modulation strategy are solved, and efficient secondary frequency modulation and user response management are achieved. Improves the accuracy and efficiency of grid frequency adjustment.

CN119051072APending Publication Date: 2024-11-29LIYANG RES INST OF SOUTHEAST UNIV +2
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411127316.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-16
Publication Date
2024-11-29

AI Technical Summary

Technical Problem

The existing grid frequency simulation methods fail to fully consider the distribution network topology and its interaction with the main network, resulting in insufficient simulation accuracy. The frequency modulation strategies are mostly based on static models, making it difficult to dynamically adjust the load aggregation strategy, affecting the secondary frequency modulation effect.

Method used

Using the dynamic joint simulation framework of the main distribution network based on the HELICS platform, online learning is performed by combining multi-arm slot machine problem modeling and CUCB-Avg algorithm, dynamically adjusting user index value sorting, optimizing load aggregation strategy, and combining constant frequency control method to calculate automatic power generation Control the command value to ensure time synchronization and information exchange between the main network and the distribution network.

Benefits of technology

Improve the accuracy of grid frequency simulation and the efficiency of secondary frequency modulation, can better adapt to changes in user response behavior, shorten the secondary frequency modulation time, reduce the deviation of aggregate power and the regret of user response, and ensure frequency modulation operation efficient and reliable.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119051072A_ABST
    Figure CN119051072A_ABST
Patent Text Reader

Abstract

The invention discloses a CMAB-based main and distribution network dynamic joint simulation method for providing secondary frequency modulation by a flexible load. The method comprises the following steps: providing a main and distribution network dynamic joint simulation framework based on an HELICS platform; designing a strategy that flexible load aggregation participates in secondary frequency modulation under a dynamic joint simulation framework of the main and distribution networks; considering the willingness of a load user to participate in secondary frequency modulation, and adopting a CMAB algorithm based on CUCB-Avg to carry out modeling on the uncertainty of user response; user index value sorting is updated through online learning, and users with high response probability are selected to participate in frequency modulation; and simulating and analyzing the dynamic frequency characteristics of the main and distribution network system. According to the method, the influence of distribution network power flow on the main network and the uncertainty of user response are considered, the dynamic frequency characteristics of the main and distribution network system are researched more accurately, the uncertainty of the user response is considered, the actual aggregation deviation of the load is reduced, the secondary frequency modulation time is shortened, and the range of the affected users is narrowed; and the secondary frequency modulation effect of the power system is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of power system frequency regulation, and in particular relates to a main distribution network dynamic joint simulation method for providing secondary frequency regulation based on CMAB flexible load. Background Art

[0002] In order to address the problem of global warming and promote the transformation of the energy system towards a low-carbon direction, renewable energy represented by photovoltaic and wind power is gradually replacing traditional power generation equipment. However, the intermittent and low inertia characteristics of renewable energy have brought significant fluctuations to the grid frequency, which has put forward higher requirements for grid frequency regulation.

[0003] The advancement of Internet of Things technology enables various flexible loads in the power distribution network to be aggregated and regulated, providing a new idea for solving the problem of insufficient secondary frequency regulation capacity of the power grid. Traditional power grid frequency simulation methods usually treat the distribution network as a load node of the main grid, or establish an equivalent frequency model. This simplified processing ignores the topological structure of the distribution network and its interaction with the main grid, resulting in a large deviation between the simulated frequency and the actual frequency.

[0004] Existing secondary frequency regulation technologies mainly model the load based on its own operating characteristics, focusing on user comfort and fairness in frequency regulation, but fail to fully consider the impact of the uncertainty of actual user responses on the secondary frequency regulation effect. This may cause the aggregated flexible load power to deviate from the secondary frequency regulation control target, thus affecting the frequency regulation effect.

[0005] For example, in existing studies, the response behavior of flexible loads is mostly based on static models, assuming that users can respond on time every time they request frequency modulation. However, in practical applications, there is a large degree of uncertainty in the response behavior of users, which directly affects the effect of load aggregation. The lack of a strategy for dynamic adjustment based on user response uncertainty has led to low efficiency of existing frequency modulation methods in dealing with changes in user response behavior, and unsatisfactory frequency modulation effects.

[0006] In summary, the prior art has deficiencies in the following aspects:

[0007] Insufficient simulation accuracy: Traditional methods fail to fully consider the internal topology of the distribution network and its interaction with the main grid, resulting in deviations between frequency simulation results and actual conditions.

[0008] Single response strategy: Existing frequency regulation strategies are mostly based on static models and fail to dynamically adjust load aggregation strategies, making it difficult to cope with changes in user response behavior.

[0009] The frequency regulation effect is limited: the lack of comprehensive consideration of user response uncertainty leads to a deviation between the aggregated flexible load power and the control target, affecting the frequency regulation effect.

[0010] In view of the above problems, it is necessary to propose a new method to improve the accuracy of grid frequency simulation and dynamically adjust the strategy of flexible load aggregation participating in frequency regulation, so as to better cope with the uncertainty of user response and improve the efficiency of secondary frequency regulation. Summary of the invention

[0011] In view of the problems of insufficient simulation accuracy, single response strategy, limited frequency modulation effect, etc., the present invention proposes a main-distribution network dynamic joint simulation method for providing secondary frequency modulation based on CMAB flexible load, establishes a main-distribution network dynamic joint simulation framework through the HELICS platform, ensures the time synchronization and information exchange between the main network and the distribution network, establishes a main-distribution network dynamic joint simulation framework through the HELICS platform, models the problem of flexible load aggregation participating in frequency modulation as a combined multi-armed tiger machine (CMAB) problem, and uses the CUCB-Avg algorithm to perform online learning and user index value sorting, calculates the uncertainty of users participating in frequency modulation through the CUCB-Avg algorithm, aggregates users with high response probability for secondary frequency modulation, optimizes the load aggregation strategy and performs frequency modulation operations, and uses the main-distribution network dynamic joint simulation framework and the CUCB-Avg algorithm to simulate and analyze the dynamic frequency characteristics of the power grid, verifies the accuracy of the simulation framework and the effectiveness of the frequency modulation strategy, ensures the reliability and stability of the system in practical applications, effectively solves the problems of insufficient simulation accuracy, single response strategy and limited frequency modulation effect, and improves the accuracy of power grid frequency simulation and the efficiency of secondary frequency modulation.

[0012] In order to achieve the above object, the present invention is implemented by the following technical solution: comprising the following steps:

[0013] S1: Based on the Hierarchical Engine for Large-Scale Infrastructure Co-simulation (HELICS) platform, a dynamic co-simulation framework for transmission and distribution (TD) is established.

[0014] S2: In the simulation framework, a strategy for batch aggregation of flexible loads in the distribution network to participate in secondary frequency regulation is designed, and the constant frequency control FFC method is adopted to calculate the automatic generation control AGC command value and send it to the load aggregator;

[0015] S3: The problem of flexible load aggregation participating in frequency regulation is modeled as a combinatorial multi-armed bandit (CMAB) problem, taking into account the response willingness and response uncertainty of load users;

[0016] S4: Perform online learning based on the Combinatorial upper confidence bound-average (CUCB-Avg) algorithm. The uncertainty of users participating in frequency modulation is calculated through the combined confidence interval upper bound-average CUCB-Avg algorithm. The user index value ranking is dynamically updated, and users with high response probability are aggregated to participate in secondary frequency modulation. The load aggregation strategy is optimized and the frequency modulation operation is performed.

[0017] S5: Using the main and distribution network dynamic joint simulation framework and the CUCB-Avg algorithm, the dynamic frequency characteristics of the power grid are simulated and analyzed to verify the accuracy of the simulation framework and the effectiveness of the frequency regulation strategy.

[0018] A further improvement of the present invention is that in step S1, a dynamic joint simulation framework of the main and distribution networks is established based on the hierarchical engine HELICS platform, and the specific steps are as follows:

[0019] The differential and algebraic equations (DAE) of the power system are established, and the model of the main grid is shown as follows:

[0020]

[0021] 0 = g T (x T ,y T ,u T ) (1)

[0022] The distribution network model is shown as follows:

[0023]

[0024] 0 = g D (x D ,y D ,u D ) (2)

[0025] In the formula, f T and g T They represent the differential equation and algebraic equation of the main network respectively; f D and g D Respectively represent the differential equation and algebraic equation of the distribution network; x T and x D They are the differential states of the main network and the distribution network respectively; Indicates x T The differential of Indicates x D The differential of y T and Dare the algebraic variables of the main network and distribution network respectively; u T is the input of the main grid, i.e. the power of the feeder head node; u D It is the input of the distribution network and is the source voltage at the distribution network substation port.

[0026] A further improvement of the present invention is that in step S1, a dynamic joint simulation framework of the main and distribution networks is established based on the hierarchical engine HELICS platform, further comprising the following steps:

[0027] 1) On the hierarchical engine HELICS platform, a main and distribution network interconnection system is built, and the HELICS platform is used to achieve time synchronization and information exchange between the main network and the distribution network;

[0028] 2) Complete the synchronization of simulation time between the main network and the distribution network, and serve as a platform for the exchange of information between the main network and the distribution network models within each simulation step, so as to interact between the main network and the distribution network;

[0029] 3) The main network sends the voltage amplitude V of the distribution network connection node to the distribution network m and voltage phase angle V a , the distribution network receives and uses the voltage amplitude V m and voltage phase angle V a Perform power flow calculation to obtain the active power P of the distribution network head node;

[0030] 4) The distribution network sends the calculated active power P to the main network, which receives and uses the active power P to calculate the power flow and update the voltage amplitude V m and voltage phase angle V a , and send it to the distribution network;

[0031] 5) Repeat steps 3) and 4) until the simulation process is completed.

[0032] A further improvement of the present invention is that in step S2, a constant frequency control (Flat frequency control, FFC) method is used to calculate an automatic generation control (Automatic generation control, AGC) instruction value, including the following steps:

[0033] The constant frequency control FFC method is adopted to calculate the AGC instruction through the regional control error ACE, and the dead zone is set to avoid excessive response of the load. The calculation of ACE is shown as follows:

[0034] P ACE,t =10K AGC (f t -f N ) (3)

[0035] Where P ACE,t is the regional control error; KAGC is the secondary frequency modulation coefficient of the system MW / 0.1Hz; f t is the frequency at time t; f N is the rated frequency of the system;

[0036] The secondary frequency modulation target value P is obtained by proportional integration of ACE. AGC,t , as shown below:

[0037]

[0038] In the formula, K P and K I is the coefficient of the PI controller; is the integral function from t1 to t2;

[0039] Considering the limitation of secondary frequency regulation reserve capacity, the ultimate target power D of secondary frequency regulation is SFR,t As shown below:

[0040]

[0041] In the formula, is the maximum available capacity of secondary frequency modulation at time t;

[0042] In order to better simulate the actual load response, the secondary frequency regulation target power is divided into multiple sub-targets, and the load responds in batches.

[0043] A further improvement of the present invention is that in step S3, the problem of flexible load aggregation participating in frequency modulation is modeled as a combined multi-armed bandit CMAB problem, which specifically includes the following steps:

[0044] Considering the uncertainty of load user response, each user has a probability of responding and exiting, which are independent of each other;

[0045] In the simulation, the reduction of user power is modeled as a probability function X following a Bernoulli distribution. i,t ~Bern(p i ), each user can i Response, or with probability 1-p i Exit Response;

[0046] The load aggregation target is the target value D at each moment. t The user who performs the optimization selection selects a subset of users from the available users based on algorithm z

[0047] Make the actual aggregation amount as close to the target power as possible;

[0048] The size of the user subset selected each time is not fixed and depends on the corresponding expected value and target value.

[0049] A further improvement of the present invention is that step S3 further includes the following steps:

[0050] The performance of algorithm z at time t can be expressed by the loss function Evaluation, the smaller the loss, the better the performance of the algorithm. The formula of the loss function is as follows:

[0051]

[0052] In the formula, is the set of users selected by algorithm z at time t; P i,t is the power of user i at time t; X i,t is the response of user i at time t; D t is the target aggregate power at time t;

[0053] In order to obtain the theoretical optimal curve of the load aggregation upper limit, the minimum loss expectation is used as the optimization comparison benchmark. The algorithm considers the ideal case, in which the optimal subset is selected when the user response probability distribution and the total user capacity are known. Based on the previous step loss, the regret value is defined as the difference between the loss of the offline algorithm and the online algorithm over a period of time, as shown in the following formula:

[0054]

[0055] In the formula, T is the total time; is the loss of algorithm z at time t; is the offline optimal algorithm z at time t * loss.

[0056] A further improvement of the present invention is that in step S4, the uncertainty of user participation in frequency modulation is calculated by combining the confidence interval upper bound-average value CUCB-Avg algorithm, and the specific steps are as follows:

[0057] Input the number of users n and the target power D t >0, confidence parameter α>0;

[0058] Initialize each user’s response probability p i,t and the number of selections T i,t ;

[0059] For each time step t=2,...,T, calculate the upper bound U of the confidence interval for user i i,t , and ensure that it is less than 1:

[0060]

[0061] In the formula, pi,t-1 is the response probability of user i at time t-1; α is the parameter used to balance exploration and preservation; T i,t-1 is the number of times user i is selected at time t-1.

[0062] A further improvement of the present invention is that it further comprises the following steps:

[0063] Will U i,t Sort in non-increasing order: U σ(t,1) ≥…≥U σ(t,n) ;

[0064] Find the smallest k t ≥0 such that:

[0065]

[0066] Or when equation (10) is satisfied:

[0067]

[0068] Let k t =n;

[0069] Select a subset of users

[0070] For each selected user i, perform the following steps:

[0071]

[0072] In the formula, p i,t is the response probability of user i at time t; T i,t-1 is the number of times user i is selected at time t-1; p i,t-1 is the response probability of user i at time t-1; X t,i is the response of user i at time t; T i,t is the number of times user i is selected at time t.

[0073] A further improvement of the present invention is that the CUCB-Avg algorithm considers both the sample mean and the upper limit of the confidence interval, and the specific steps are as follows:

[0074] Calculate the upper bound of the confidence interval U based on the user's current estimated probability and confidence interval i,t , and sort the users in non-increasing order according to the upper bound;

[0075] The U i,t It consists of two parts. The first part represents the current estimated response probability p of user i. i,t , reflecting the estimation of its preservation;

[0076] The second part represents uncertainty, which is used to determine the upper bound of the confidence interval and reflects the degree of exploration;

[0077] T i,t represents the number of times user i is selected at time t;

[0078] α>0 is a parameter that adjusts the upper bound of the confidence interval and is used to balance exploration and conservation;

[0079] User response probability p i,t The calculation of is as follows:

[0080]

[0081] In the formula, p i,t is the response probability of user i at time t; T i,t is the number of times user i is selected at time t; X t,i is the response of user i at time t; I i,t Select the set of the i-th user for time t.

[0082] The terms and their definitions are as follows:

[0083] Dynamic joint simulation framework of the main and distribution network: A dynamic joint simulation environment of the main and distribution network (Transmission and Distribution) established based on the hierarchical engine HELICS platform, which is used to simulate the interaction and dynamic frequency characteristics between the main and distribution networks.

[0084] Flexible load: refers to the power load that can be adjusted in real time according to the needs of the power grid, such as adjustable temperature control equipment, electric vehicle charging stations, etc. These loads can participate in the frequency regulation of the power grid without significantly reducing the comfort of users.

[0085] Combinatorial multi-armed bandit (CMAB) problem: A variant of the multi-armed bandit problem where each decision is not to select an arm (or user) but to select a subset of users to maximize the cumulative benefit or minimize the loss. In power systems, it is often used to model load aggregation problems.

[0086] Combined Confidence Interval Upper Bound-Average CUCB-Avg Algorithm: An online learning algorithm that combines the confidence interval upper bound (UCB) and the average value, used for decision optimization under uncertainty. In the present invention, it is used to select users with high response probability to participate in secondary frequency modulation.

[0087] Area Control Error (ACE): An indicator used to evaluate the deviation between system frequency and exchange power, and is the basis for calculating the automatic generation control (AGC) command. In the present invention, the secondary frequency regulation target value is calculated by proportional integral (PI) control of ACE.

[0088] Automatic Generation Control (AGC): An automatic control system for power systems that maintains the frequency and tie-line power of the power grid within a predetermined range. It responds to changes in the frequency and power of the power grid by adjusting the output power of generators and active loads.

[0089] Constant frequency control (FFC) method: A secondary frequency control method that maintains a constant system frequency by calculating and adjusting the output power of the generator and the active load. In the present invention, the FFC method is used to calculate the AGC command value.

[0090] Load aggregator: An entity responsible for providing aggregated capacity from multiple flexible loads to the power system, allocating AGC instructions to individual users, and coordinating users' response behaviors.

[0091] Compared with the prior art, the beneficial effects of the present invention are as follows: the present invention establishes a dynamic joint simulation framework for the main distribution network system that accurately simulates the power grid frequency, and designs a strategy for aggregating users to participate in secondary frequency modulation based on the CUCB-Avg algorithm: the proposed dynamic joint simulation framework for the main distribution network system takes into account the internal topological structure of the distribution network and the interaction with the main network, solving the problem that the existing simulation method fails to fully simulate the interaction between the distribution network and the main network. The simulation framework established through the HELICS platform realizes the time synchronization and information exchange between the main network and the distribution network, thereby improving the accuracy of the power grid frequency simulation and ensuring the high consistency between the simulation results and the actual situation. The combined multi-armed tiger machine (CMAB) problem modeling method is adopted, and online learning and user index value sorting are performed based on the CUCB-Avg algorithm to dynamically adjust the load aggregation strategy. This method comprehensively considers the uncertainty of user response, can better adapt to changes in user response behavior, and solves the problem that the existing frequency modulation strategy is mostly based on static models. Through online learning and dynamic updating of user index values, the load aggregation strategy is more flexible and efficient. The flexible load aggregation strategy designed based on the CUCB-Avg algorithm calculates the uncertainty of users' participation in frequency modulation, aggregates users with high response probability to participate in secondary frequency modulation, optimizes the load aggregation strategy and performs frequency modulation operations. This strategy not only significantly improves the efficiency and effect of secondary frequency modulation, shortens the time of secondary frequency modulation, but also reduces the deviation of aggregated power and the regret value of user response, ensuring the efficiency and reliability of frequency modulation operations. The response willingness and response uncertainty of load users are comprehensively considered, and the range of affected users is narrowed by optimizing the load aggregation strategy, ensuring user comfort. Flexible loads can respond to secondary frequency modulation needs more efficiently, enabling users to participate in frequency modulation more fairly, which not only improves the effect of secondary frequency modulation, but also optimizes user experience. By designing a dynamic joint simulation framework of the main and distribution network system and a flexible load aggregation strategy based on the CUCB-Avg algorithm, the accuracy of power grid frequency simulation and the efficiency of secondary frequency modulation are improved, which helps to cope with the frequency fluctuation challenges brought by renewable energy. This method optimizes the response capability of power grid frequency regulation and promotes the development of energy systems in a more stable and sustainable direction. BRIEF DESCRIPTION OF THE DRAWINGS

[0092] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0093] in:

[0094] Figure 1 is a flow chart of a method according to an embodiment of the present invention;

[0095] Figure 2 A comparison diagram of system frequency characteristic curves of two algorithms in an embodiment of the present invention;

[0096] Figure 3 A comparison diagram of the time required for secondary frequency modulation of two algorithms in an embodiment of the present invention;

[0097] Figure 4 A comparison diagram of relative errors of secondary frequency modulation aggregation of two algorithms in an embodiment of the present invention;

[0098] Figure 5 A comparison chart of the total number of secondary frequency modulation selection users of the two algorithms in the embodiment of the present invention;

[0099] Figure 6 It is a cumulative regret graph of the strategy based on the CUCB-Avg algorithm in an embodiment of the present invention. DETAILED DESCRIPTION

[0100] In order to make the purpose, technical solution and advantages of the embodiment of the present invention clearer, the technical solution of the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings of the embodiment of the present invention. Obviously, the described embodiment is a part of the embodiment of the present invention, not all of the embodiments. Based on the described embodiment of the present invention, all other embodiments obtained by ordinary technicians in this field belong to the scope of protection of the present invention.

[0101] Example 1

[0102] like Figure 1 As shown in FIG. 1 , an embodiment of the present invention is provided, which provides a main distribution network dynamic joint simulation method for providing secondary frequency regulation based on CMAB flexible load, including the following steps:

[0103] S1: Based on the Hierarchical Engine for Large-Scale Infrastructure Co-simulation (HELICS) platform, a dynamic co-simulation framework for transmission and distribution (TD) is established.

[0104] Among them, in the step S1, based on the hierarchical engine HELICS platform, a dynamic joint simulation framework of the main and distribution networks is established, and the specific steps are as follows:

[0105] The differential and algebraic equations DAE of the power system are established, and the model of the main grid is shown as follows:

[0106]

[0107] 0 = g T (x T,y T ,u T ) (1)

[0108] The distribution network model is shown as follows:

[0109]

[0110] 0 = g D (x D ,y D ,u D ) (2)

[0111] In the formula, f T and g T They represent the differential equation and algebraic equation of the main network respectively; f D and g D Respectively represent the differential equation and algebraic equation of the distribution network; x T and x D They are the differential states of the main network and the distribution network respectively; Indicates x T The differential of Indicates x D The differential of y T and D are the algebraic variables of the main network and distribution network respectively; u T is the input of the main grid, i.e. the power of the feeder head node; u D It is the input of the distribution network and is the source voltage at the distribution network substation port.

[0112] Specifically, in step S1, based on the hierarchical engine HELICS platform, a dynamic joint simulation framework of the main and distribution networks is established, further comprising the following steps:

[0113] 1) On the hierarchical engine HELICS platform, a main and distribution network interconnection system is built, and the HELICS platform is used to achieve time synchronization and information exchange between the main network and the distribution network;

[0114] 2) Complete the synchronization of simulation time between the main network and the distribution network, and serve as a platform for the exchange of information between the main network and the distribution network models within each simulation step, so as to interact between the main network and the distribution network;

[0115] 3) The main network sends the voltage amplitude V of the distribution network connection node to the distribution network m and voltage phase angle V a , the distribution network receives and uses the voltage amplitude V m and voltage phase angle V a Perform power flow calculation to obtain the active power P of the distribution network head node;

[0116] 4) The distribution network sends the calculated active power P to the main network, which receives and uses the active power P to calculate the power flow and update the voltage amplitude Vm and voltage phase angle V a , and send it to the distribution network;

[0117] 5) Repeat steps 3) and 4) until the simulation process is completed.

[0118] After building the models of the main network and distribution network, in order to build a main and distribution network interconnection system, the HELICS platform is used to achieve time synchronization and information exchange between the main network and the distribution network. HELICS is a joint simulation platform that can integrate existing simulation tools in different fields to achieve large-scale joint simulation. The following describes several concepts involved in the HELICS simulation:

[0119] Federate: A federate is a simulator running model that can provide and receive specific values ​​or information to other federates. The main network model and the distribution network model in the present invention are each called a federate, and the two exchange power flow calculation results with each other.

[0120] Federation: A collection of federation members running together in a joint simulation is called a federation. In the present invention, when the main network and the distribution network run together, it is called a federation.

[0121] Broker: The broker is an executable file provided by HELICS. It will automatically generate the broker.log file each time you run a joint simulation. It is responsible for two key tasks in the joint simulation: one is to keep all federation members in the joint synchronized, and the other is to achieve information exchange between federation members. Each federation member must be connected to the same broker to become part of the federation. The broker is responsible for receiving information sent by all federation members connected to it and distributing it to the specified federation members.

[0122] Publications: Publications refer to the information broadcast by the sender in a federation. As the sender, each interface of the sender is named.

[0123] Subscriptions: A subscription is information received by the receiver in a federation. As a receiver, the receiving port is not renamed and only the value of a fixed variable is received.

[0124] The present invention uses HELICS to synchronize the simulation time of the main network and the distribution network, and serves as a platform for the main network and distribution network models to exchange information within each simulation step, so as to interact with the main network and the distribution network, thereby realizing joint simulation. In each time step, the main network publishes the voltage amplitude V of the distribution network connection node to the distribution network head node. m and voltage phase angle V a , the distribution network subscribes to the main network's V m and V aAfter that, using the received V m and V a Restart the power flow calculation in the distribution network, obtain the active power P of the distribution network head node and publish it to the main network node. The main network uses P to perform power flow calculation again to obtain V m and V a , and the cycle continues until the entire simulation process is completed. The main network and the distribution network continuously exchange variable values ​​as the simulation time progresses, and finally the joint simulation of the main network and the distribution network is realized.

[0125] This step is the basis of the entire method. Its main purpose is to create a simulation environment that can simulate the dynamic interaction between the main grid and the distribution network. By using the HELICS platform, time synchronization and information exchange between the main grid and the distribution network can be achieved, which is crucial for accurately simulating the dynamic characteristics of the power system. Specifically, the HELICS platform allows the main grid and the distribution network to exchange active power, voltage amplitude and phase angle information during the simulation process, which is crucial for calculating power flow and load distribution. Through the continuous advancement of the simulation step, the main grid and the distribution network can continuously adjust their respective parameters to ultimately achieve accurate simulation results.

[0126] Further, S2: in the simulation framework, a strategy for batch aggregation of flexible loads in the distribution network to participate in secondary frequency regulation is designed, and a constant frequency control FFC method is adopted to calculate the automatic generation control AGC command value and send it to the load aggregator;

[0127] Specifically, in step S2, a strategy for batch aggregation of flexible loads in the distribution network to participate in secondary frequency regulation is designed, including:

[0128] When the system detects that the disturbance frequency fluctuates, after the first frequency modulation is completed, if the frequency deviation still exceeds the allowable range, the second frequency modulation will be started;

[0129] The control center calculates an automatic generation control (AGC) instruction according to the frequency deviation and sends it to a load aggregator of the distribution network;

[0130] The load aggregator selects high-quality users to participate in secondary frequency modulation until the frequency is stabilized within the allowable range.

[0131] Wherein, in the step S2, the constant frequency control FFC method is adopted to calculate the automatic generation control AGC instruction value, including the following steps:

[0132] The FFC (Flat frequency control) method is used to calculate the AGC command through the area control error (ACE), and the dead zone is set to avoid excessive response of the load. The calculation of ACE is shown in the following formula:

[0133] P ACE,t =10K AGC (f t -f N ) (3)

[0134] Where P ACE,t is the regional control error; K AGC is the secondary frequency modulation coefficient of the system (MW / 0.1Hz); f t is the frequency at time t; f N is the rated frequency of the system;

[0135] The secondary frequency modulation target value P is obtained by proportional integration of ACE. AGC,t , as shown below:

[0136]

[0137] In the formula, K P and K I is the coefficient of the PI controller; is the integral function from t1 to t2;

[0138] Considering the limitation of secondary frequency regulation reserve capacity, the ultimate target power D of secondary frequency regulation is SFR,t As shown below:

[0139]

[0140] In the formula, is the maximum available capacity of secondary frequency modulation at time t;

[0141] In order to better simulate the actual load response, the secondary frequency regulation target power is divided into multiple sub-targets, and the load responds in batches.

[0142] In this step, the design of the frequency regulation strategy for flexible loads is key. Flexible loads refer to loads that can adjust their power consumption according to demand. By aggregating in batches, the response behavior of the control load can be effectively simulated. After detecting the system frequency fluctuation, a frequency regulation is first performed. If the frequency deviation is still greater than the safe operation requirement, a secondary frequency regulation is performed. The AGC command value is calculated by the FFC method and sent to the load aggregator to ensure that the frequency regulation strategy can respond in time and return the frequency to a safe range.

[0143] Further, S3: the problem of the flexible load aggregation participating in the frequency regulation is modeled as a combined multi-armed bandit CMAB problem, comprehensively considering the response willingness and response uncertainty of the load users;

[0144] Specifically, in step S3, the problem of flexible load aggregation participating in frequency modulation is modeled as a combined multi-armed bandit CMAB problem, which specifically includes the following steps:

[0145] Considering the uncertainty of load user response, each user has a probability of responding and exiting, which are independent of each other;

[0146] In the simulation, the reduction of user power is modeled as a probability function X following a Bernoulli distribution. i,t ~Bern(p i ), each user can i Response, or with probability 1-p i Exit Response;

[0147] The load aggregation target is the target value D at each moment. t The user who performs the optimization selection selects a subset of users from the available users based on algorithm z

[0148] Make the actual aggregation amount as close to the target power as possible;

[0149] The size of the user subset selected each time is not fixed and depends on the corresponding expected value and target value.

[0150] Wherein, the step S3 further includes the following steps:

[0151] The performance of algorithm z at time t can be expressed by the loss function Evaluation, the smaller the loss, the better the performance of the algorithm. The formula of the loss function is as follows:

[0152]

[0153] In the formula, is the set of users selected by algorithm z at time t; P i,t is the power of user i at time t; X i,t is the response of user i at time t; D t is the target aggregate power at time t;

[0154] In order to obtain the theoretical optimal curve of the load aggregation upper limit, the minimum loss expectation is used as the optimization comparison benchmark. The offline algorithm considers the ideal case, in which the optimal subset is selected when the user response probability distribution and the total user capacity are known. Based on the previous step loss, the regret value is defined as the difference between the loss of the offline algorithm and the online algorithm over a period of time, as shown in the following formula:

[0155]

[0156] In the formula, T is the total time; is the loss of algorithm z at time t; is the offline optimal algorithm z at time t * loss.

[0157] The problem of flexible load aggregation participating in frequency regulation is modeled as the CMAB problem, which is a problem model that can handle uncertainty and multi-option optimization. By considering the response willingness and exit probability of each user, the load response behavior can be predicted more accurately.

[0158] Further, S4: the uncertainty of users participating in frequency modulation is calculated by combining the confidence interval upper bound-average value CUCB-Avg algorithm, users with high response probability are aggregated to participate in secondary frequency modulation, the load aggregation strategy is optimized, and the frequency modulation operation is performed;

[0159] Specifically, in step S4, the uncertainty of user participation in frequency modulation is calculated by combining the confidence interval upper bound-average value CUCB-Avg algorithm, and the specific steps are as follows:

[0160] Input the number of users n and the target power D t >0, confidence parameter α>0;

[0161] Initialize each user’s response probability p i,t and the number of selections T i,t ;

[0162] For each time step t=2,…,T, calculate the upper bound U of the confidence interval for user i i,t , and ensure that it is less than 1:

[0163]

[0164] In the formula, p i,t-1 is the response probability of user i at time t-1; α is the parameter used to balance exploration and preservation; T i,t-1 is the number of times user i is selected at time t-1.

[0165] Among them, further comprising the following steps:

[0166] Will U i,t Sort in non-increasing order: U σ(t,1) ≥…≥U σ(t,n) ;

[0167] Find the smallest k t ≥0 such that:

[0168]

[0169] Or when equation (10) is satisfied:

[0170]

[0171] Let k t =n;

[0172] Select a subset of users

[0173] For each selected user i, perform the following steps:

[0174]

[0175] In the formula, p i,t is the response probability of user i at time t; T i,t-1 is the number of times user i is selected at time t-1; p i,t-1 is the response probability of user i at time t-1; X t,i is the response of user i at time t; T i,t is the number of times user i is selected at time t.

[0176] Furthermore, the CUCB-Avg algorithm considers both the sample mean and the upper limit of the confidence interval. The specific steps are as follows:

[0177] Calculate the upper bound of the confidence interval U based on the user's current estimated probability and confidence interval i,t , and sort the users in non-increasing order according to the upper bound;

[0178] The U i,t It consists of two parts. The first part represents the current estimated response probability p of user i. i,t , reflecting the estimation of its preservation;

[0179] The second part represents uncertainty, which is used to determine the upper bound of the confidence interval and reflects the degree of exploration;

[0180] T i,t represents the number of times user i is selected at time t;

[0181] α>0 is a parameter that adjusts the upper bound of the confidence interval and is used to balance exploration and conservation;

[0182] User response probability p i,t The calculation of is as follows:

[0183]

[0184] In the formula, p i,t is the response probability of user i at time t; T i,t is the number of times user i is selected at time t; X t,i is the response of user i at time t; I i,t Select the set of the i-th user for time t.

[0185] In this step, the application of the CUCB-Avg algorithm makes it possible to calculate the uncertainty of each user's participation in frequency modulation, and based on this information, select users with a high probability of response for secondary frequency modulation. In this way, the load aggregation strategy can be optimized. This process is dynamic, and the algorithm will continuously adjust and optimize the strategy according to the actual situation to ensure the effectiveness and reliability of the frequency modulation operation.

[0186] Further, S5: using the main distribution network dynamic joint simulation framework and CUCB-Avg algorithm, the dynamic frequency characteristics of the power grid are simulated and analyzed to verify the accuracy of the simulation framework and the effectiveness of the frequency regulation strategy.

[0187] Finally, the dynamic frequency characteristics of the power grid are simulated and analyzed by using the main and distribution network dynamic joint simulation framework and the CUCB-Avg algorithm. The main purpose of this step is to verify the accuracy of the entire simulation framework and the effectiveness of the designed frequency regulation strategy. Through simulation analysis, it can be ensured that the framework and strategy can work effectively in practical applications and provide reliable secondary frequency regulation for the power system.

[0188] Example 2

[0189] Another embodiment of the present invention provides a method for dynamic joint simulation of a main distribution network providing secondary frequency regulation based on CMAB flexible loads. The results are as follows:

[0190] The main distribution network system used in the present invention consists of an IEEE 14-node network and five IEEE 8,500-node feeders. Each distribution network has its own load aggregator responsible for allocating AGC signals to individual users. In view of the uncertainty of user behavior, the present invention continuously optimizes the frequency regulation effect based on the CUCB-Avg online learning algorithm.

[0191] like Figure 2 As shown in the figure, the frequency response characteristic curves of the aggregated load based on the offline algorithm and the CUCB-Avg algorithm in 100 learning events are compared. As the learning continues, the frequency curve of the strategy based on the CUCB-Avg algorithm gradually approaches the offline algorithm result.

[0192] The figure shows the frequency response characteristic curves of the 1st, 2nd, 99th and 100th learning events respectively. The green solid line represents the result of the offline algorithm, and the orange dotted line represents the result of the CUCB-Avg algorithm.

[0193] First learning event:

[0194] In the first learning event, the frequency response characteristic curve of the CUCB-Avg algorithm (orange dashed line) is significantly different from that of the offline algorithm (green solid line). At this time, the CUCB-Avg algorithm has just begun to learn the user response behavior and has not yet formed an effective frequency modulation strategy. Therefore, the frequency regulation effect is poor and the frequency fluctuation is large.

[0195] Second learning event:

[0196] In the second learning event, the frequency response characteristic curve of the CUCB-Avg algorithm gradually approaches the frequency response characteristic of the offline algorithm. At this time, the CUCB-Avg algorithm has undergone some learning, the frequency modulation strategy has been improved, and the frequency fluctuation has been reduced. The 99th learning event:

[0197] In the 99th learning event, the frequency response characteristic curve of the CUCB-Avg algorithm is basically consistent with the frequency response characteristic of the offline algorithm. At this time, after a lot of learning, the CUCB-Avg algorithm has approached the optimal frequency modulation strategy, the frequency regulation effect has been significantly improved, and the frequency fluctuation is small.

[0198] 100th learning event:

[0199] In the 100th learning event, the frequency response characteristic curve of the CUCB-Avg algorithm is completely consistent with the offline algorithm, with almost no deviation. At this point, the frequency modulation strategy of the CUCB-Avg algorithm has been fully mature, and can efficiently respond to frequency fluctuations, and the frequency modulation effect has reached the best state.

[0200] The inset on the right side of each sub-figure zooms in to show the detailed changes in frequency over a specific period of time, allowing you to more clearly see the gradual optimization process of the frequency response curve of the CUCB-Avg algorithm.

[0201] The horizontal axis is time (seconds) and the vertical axis is frequency (Hz).

[0202] As the number of learning times increases, the frequency response curve of the CUCB-Avg algorithm gradually becomes stable and coincides with the frequency response curve of the offline algorithm, indicating that the CUCB-Avg algorithm can effectively optimize the load aggregation strategy and improve the response effect of secondary frequency regulation through continuous learning.

[0203] In summary, Figure 2 The effectiveness and fast learning ability of the CUCB-Avg algorithm in optimizing frequency response characteristics are demonstrated. Through continuous learning events, the frequency modulation strategy of the CUCB-Avg algorithm gradually approaches the ideal effect of the offline algorithm, significantly improving the performance and efficiency of secondary frequency modulation.

[0204] like Figure 3As shown in the figure, the required secondary frequency modulation response time is shown. In the initial state, the frequency modulation time of the CUCB-Avg algorithm exceeds 20 seconds, but after learning user behavior 100 times in a row, the frequency modulation effect is close to the offline algorithm, and the average secondary frequency modulation time is shortened to 17 seconds, and the secondary frequency modulation process is accelerated. This shows the effectiveness and fast learning ability of the strategy based on the CUCB-Avg algorithm in improving the secondary frequency modulation performance.

[0205] The green solid line represents the result of the offline algorithm (optimal), and the orange dotted line represents the result of the CUCB-Avg algorithm.

[0206] Horizontal axis: time (seconds).

[0207] Vertical axis: secondary frequency modulation response time (seconds).

[0208] The figure mainly shows the changes in the secondary frequency modulation response time in the initial stage and after continuous learning of user behavior 100 times:

[0209] In the initial state:

[0210] In the initial state, the secondary frequency modulation response time of the CUCB-Avg algorithm exceeds 20 seconds, which is significantly higher than the response time of the offline algorithm. This is because the CUCB-Avg algorithm has just started to learn user response behavior and has not yet formed an effective frequency modulation strategy, resulting in a long frequency modulation response time.

[0211] After learning user behavior 100 times in a row:

[0212] As the CUCB-Avg algorithm continues to learn, the frequency modulation response time gradually shortens. After about 100 learning events, the frequency modulation response time of the CUCB-Avg algorithm is close to that of the offline algorithm, and the average secondary frequency modulation time is shortened to about 17 seconds. At this point, the CUCB-Avg algorithm has formed an effective frequency modulation strategy that can respond to frequency fluctuations more quickly, and the frequency modulation process is accelerated.

[0213] The inset in the lower right corner of the figure shows the change in the frequency modulation response time of the CUCB-Avg algorithm from 100 to 400 seconds, which allows us to see more clearly the gradual shortening of the response time.

[0214] With the increase of learning times, the frequency modulation response time of the CUCB-Avg algorithm gradually approaches the ideal time of the offline algorithm, showing a significant optimization effect.

[0215] In summary, Figure 3The effectiveness and rapid learning ability of the CUCB-Avg algorithm in optimizing the response time of secondary frequency regulation are demonstrated. Through continuous learning events, the frequency regulation strategy of the CUCB-Avg algorithm gradually approaches the ideal effect of the offline algorithm, significantly improving the performance and efficiency of secondary frequency regulation, shortening the response time, and improving the rapidity and reliability of grid frequency regulation.

[0216] like Figure 4 As shown in the figure, the relative error of the optimal offline algorithm aggregation power fluctuates around -0.02. After continuous learning, the aggregation power value based on the CUCB-Avg algorithm gradually decreases and finally stabilizes at around -0.04. Therefore, the present invention can reduce the impact of user uncertainty with a lower aggregation deviation.

[0217] The green solid line represents the result of the offline algorithm (optimal), and the orange solid line represents the result of the CUCB-Avg algorithm.

[0218] Horizontal axis: relative error of aggregate power.

[0219] Vertical axis: probability density.

[0220] The figure shows the distribution of relative errors in aggregate power for the two algorithms:

[0221] Offline algorithm:

[0222] The offline algorithm (green solid line) is the most ideal case. The relative error of its aggregated power is mainly concentrated around -0.02, with a small error and a more concentrated distribution, indicating that the aggregated power of the offline algorithm is closer to the ideal value and the frequency modulation effect is better.

[0223] CUCB-Avg algorithm:

[0224] The CUCB-Avg algorithm (orange solid line) has a large relative error in the aggregated power in the initial stage, and the error gradually decreases as the learning progresses. Finally, the aggregated power error distribution of the CUCB-Avg algorithm stabilizes at around -0.04. Although the error is slightly larger than that of the offline algorithm, it has been significantly improved compared to the initial state.

[0225] The green and orange curves in the figure represent the probability density functions of the two algorithms, respectively. It can be clearly seen that as the CUCB-Avg algorithm learns, its error distribution gradually approaches the ideal value.

[0226] The error values ​​on the left and right sides of the horizontal axis represent the degree to which the aggregated power is lower and higher than the ideal value, respectively. After learning, the error distribution of the CUCB-Avg algorithm is more concentrated than that in the initial stage, indicating that the algorithm has better processing capabilities for the uncertainty of user responses.

[0227] In summary, Figure 4The effectiveness of the CUCB-Avg algorithm in optimizing the relative error of aggregate power is demonstrated. Through continuous algorithm learning events, the relative error of aggregate power of the CUCB-Avg algorithm gradually decreases, and the error distribution becomes more concentrated and stable. Although there is still a certain gap compared with the offline algorithm, it significantly improves the frequency modulation effect and reduces the impact of user response uncertainty on the frequency modulation strategy.

[0228] like Figure 5 As shown in Figure 2, the number of selected users of the two algorithms is compared. As the CUCB-Avg algorithm continues to learn, it gradually understands the probability distribution of load response and can select users who are more likely to respond. Therefore, the proposed strategy narrows the scope of affected users and thus reduces the aggregation cost.

[0229] The green solid line represents the result of the offline algorithm (optimal), and the orange dotted line represents the result of the CUCB-Avg algorithm.

[0230] Horizontal axis: time (seconds).

[0231] Vertical axis: number of users participating in FM.

[0232] The figure shows the changes in the number of users who choose to participate in FM for the two algorithms:

[0233] Offline algorithm:

[0234] The number of users selected by the offline algorithm (green solid line) in the initial stage is relatively small and stable. This is because the offline algorithm can select the optimal user subset when the response probability of all users is known, ensuring the minimum number of participating users and the optimal frequency modulation effect.

[0235] CUCB-Avg algorithm:

[0236] The CUCB-Avg algorithm (orange dashed line) selects a large number of users in the initial stage, and the fluctuation is large. As the CUCB-Avg algorithm continues to learn, it gradually understands the probability distribution of load response, and the number of selected users gradually decreases and tends to stabilize. Finally, the number of users selected by the CUCB-Avg algorithm is close to that of the offline algorithm, indicating that its strategy can effectively identify and select users with high response probability after learning, and optimize the frequency modulation effect.

[0237] The figure shows that during the entire learning process, the number of users selected by the CUCB-Avg algorithm gradually decreases from the initial high fluctuations and eventually approaches the number selected by the offline algorithm, demonstrating the effectiveness of the CUCB-Avg algorithm in optimizing user selection strategies.

[0238] As the number of learning times increases, the CUCB-Avg algorithm can more accurately predict user response behavior and select users who are more likely to respond, thereby narrowing the range of affected users and reducing frequency tuning costs.

[0239] In summary, Figure 5 The effectiveness of the CUCB-Avg algorithm in optimizing the number of users selected to participate in frequency modulation is demonstrated. Through continuous learning events, the CUCB-Avg algorithm gradually reduces the number of selected users and eventually approaches the offline algorithm, showing its significant advantages in optimizing user selection and reducing frequency modulation costs.

[0240] The cumulative regret value based on the CUCB-Avg algorithm is as follows Figure 6 As shown in Figure 2, the regret value decreases rapidly and tends to be stable, indicating that the performance of the CUCB-Avg algorithm can quickly approach the result of the optimal strategy.

[0241] The orange curve in the figure represents the cumulative regret value of the CUCB-Avg algorithm during the learning process.

[0242] Horizontal axis: time (seconds).

[0243] Vertical axis: cumulative regret value.

[0244] The figure shows the changes in the cumulative regret value of the CUCB-Avg algorithm in different time periods:

[0245] Initial stage:

[0246] In the initial stage, the cumulative regret value of the CUCB-Avg algorithm is high. This is because the algorithm has just started to learn user response behavior and the frequency modulation strategy has not been optimized, resulting in unsatisfactory frequency modulation effects and large regret values.

[0247] Learning process:

[0248] As the CUCB-Avg algorithm continues to learn, the cumulative regret value decreases rapidly. This shows that the algorithm gradually grasps the user response behavior, optimizes the frequency modulation strategy, and reduces the situation of poor frequency modulation effect caused by selecting non-optimal users.

[0249] Stabilize:

[0250] After about 8000 seconds, the cumulative regret value of the CUCB-Avg algorithm tends to stabilize and remains at a low level. At this time, the performance of the algorithm has approached the optimal strategy, and the frequency modulation effect is close to the offline optimal algorithm. There is limited room for further reducing the regret value.

[0251] The orange curve in the figure shows that the cumulative regret value of the CUCB-Avg algorithm drops rapidly from the initial peak and remains stable during the subsequent learning process.

[0252] The downward trend of the cumulative regret value and the final stable state show that the CUCB-Avg algorithm gradually approaches the optimal frequency regulation effect and optimizes the load aggregation strategy by continuously learning and adjusting the strategy.

[0253] In summary, Figure 6 The effectiveness of the CUCB-Avg algorithm in cumulative regret value optimization is demonstrated. Through continuous learning events, the CUCB-Avg algorithm quickly reduces the cumulative regret value and eventually stabilizes, indicating that its frequency regulation strategy is close to optimal and significantly improves the effect and efficiency of grid frequency regulation.

[0254] In summary, the present invention improves the accuracy of grid frequency simulation and the efficiency of secondary frequency modulation through an innovative simulation framework and frequency modulation strategy, effectively responds to the frequency fluctuation challenges brought by renewable energy, optimizes the user experience, and promotes the development of the energy system in a more stable and sustainable direction.

[0255] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification and the features of different embodiments or examples, unless they are contradictory.

[0256] Any process or method description in the flow chart or otherwise described herein can be understood to represent a module, fragment or portion of a code including one or more executable instructions for implementing the steps of a specific logical function or process. And the scope of the preferred embodiment of the present application includes other implementations, in which the functions may not be performed in the order shown or discussed, including in a substantially simultaneous manner or in a reverse order according to the functions involved.

[0257] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A dynamic joint simulation method for main distribution network providing secondary frequency regulation based on CMAB flexible load, characterized in that: The following steps are involved: S1: Based on the hierarchical engine HELICS platform, a dynamic joint simulation framework for the main and distribution networks is established; S2: In the simulation framework, a strategy for batch aggregation of flexible loads in the distribution network to participate in secondary frequency regulation is designed, and the constant frequency control FFC method is adopted to calculate the automatic generation control AGC command value and send it to the load aggregator; S3: The problem of flexible load aggregation participating in frequency regulation is modeled as a combined multi-armed bandit CMAB problem, which comprehensively considers the response willingness and response uncertainty of load users; S4: Perform online learning based on the combined confidence interval upper bound-average CUCB-Avg algorithm, calculate the uncertainty of users participating in frequency modulation through the CUCB-Avg algorithm, dynamically update the user index value ranking, aggregate users with high response probability to participate in secondary frequency modulation, optimize the load aggregation strategy, and perform frequency modulation operations; S5: Using the main and distribution network dynamic joint simulation framework and the CUCB-Avg algorithm, the dynamic frequency characteristics of the power grid are simulated and analyzed to verify the accuracy of the simulation framework and the effectiveness of the frequency regulation strategy.

2. The method for dynamic joint simulation of main distribution network providing secondary frequency modulation based on CMAB flexible load according to claim 1 is characterized in that: In step S1, a dynamic joint simulation framework of the main and distribution networks is established based on the hierarchical engine HELICS platform. The specific steps are as follows: The differential and algebraic equations DAE of the power system are established, and the model of the main grid is shown as follows: 0=g T (x T ,y T ,u T ) (1) The distribution network model is shown as follows: 0=g D (x D ,y D ,u D ) (2) In the formula, f T and g T They represent the differential equation and algebraic equation of the main network respectively; f D and g D Respectively represent the differential equation and algebraic equation of the distribution network; x T and x D They are the differential states of the main network and the distribution network respectively; Indicates x T The differential of Indicates x D The differential of y T and D are the algebraic variables of the main network and distribution network respectively; u T is the input of the main grid, i.e. the power of the feeder head node; u D It is the input of the distribution network and is the source voltage at the distribution network substation port.

3. The method for dynamic joint simulation of main distribution network providing secondary frequency modulation based on CMAB flexible load according to claim 1 is characterized in that: In step S1, based on the hierarchical engine HELICS platform, a dynamic joint simulation framework of the main and distribution networks is established, further comprising the following steps: 1) On the hierarchical engine HELICS platform, a main and distribution network interconnection system is built, and the HELICS platform is used to achieve time synchronization and information exchange between the main network and the distribution network; 2) Complete the synchronization of simulation time between the main network and the distribution network, and serve as a platform for the exchange of information between the main network and the distribution network models within each simulation step, so as to interact between the main network and the distribution network; 3) The main network sends the voltage amplitude V of the distribution network connection node to the distribution network m and voltage phase angle V a , the distribution network receives and uses the voltage amplitude V m and voltage phase angle V a Perform power flow calculation to obtain the active power P of the distribution network head node; 4) The distribution network sends the calculated active power P to the main network, which receives and uses the active power P to calculate the power flow and update the voltage amplitude V m and voltage phase angle V a , and send it to the distribution network; 5) Repeat steps 3) and 4) until the simulation process is completed.

4. The method for dynamic joint simulation of main distribution network providing secondary frequency modulation based on CMAB flexible load according to claim 1 is characterized in that: In the step S2, a strategy for the flexible loads in the distribution network to aggregate in batches and participate in the secondary frequency modulation is designed, including: when the system detects that the disturbance frequency fluctuates, after the primary frequency modulation ends, if the frequency deviation still exceeds the allowable range, the secondary frequency modulation is started; The control center calculates an automatic generation control AGC instruction according to the frequency deviation and sends it to a load aggregator of the distribution network; The load aggregator selects high-quality users to participate in secondary frequency modulation until the frequency is stabilized within the allowable range.

5. The method for dynamic joint simulation of main distribution network providing secondary frequency modulation based on CMAB flexible load according to claim 1 is characterized in that: In step S2, the constant frequency control FFC method is used to calculate the automatic generation control AGC command value, including the following steps: The constant frequency control FFC method is adopted to calculate the AGC instruction through the regional control error ACE, and the dead zone is set to avoid excessive response of the load. The calculation of ACE is shown as follows: P ACE,t =10K AGC (f t -f N ) (3) Where P ACE,t is the regional control error; K AGC is the secondary frequency modulation coefficient of the system MW / 0.1Hz; f t is the frequency at time t; f N is the rated frequency of the system; The secondary frequency modulation target value P is obtained by proportional integration of ACE. AGC,t , as shown below: In the formula, K P and K I is the coefficient of the PI controller; is the integral function from t1 to t2; Considering the limitation of secondary frequency regulation reserve capacity, the ultimate target power D of secondary frequency regulation is SFR,t As shown below: In the formula, is the maximum available capacity of secondary frequency modulation at time t; In order to better simulate the actual load response, the secondary frequency regulation target power is divided into multiple sub-targets, and the load responds in batches.

6. The method for dynamic joint simulation of main distribution network providing secondary frequency modulation based on CMAB flexible load according to claim 1 is characterized in that: In step S3, the problem of flexible load aggregation participating in frequency modulation is modeled as a combined multi-armed bandit CMAB problem, which specifically includes the following steps: Considering the uncertainty of load user response, each user has a probability of responding and exiting, which are independent of each other; In the simulation, the reduction of user power is modeled as a probability function X following a Bernoulli distribution. i,t ~Bern(p i ), each user can i Response, or with probability 1-p i Exit Response; The load aggregation target is the target value D at each moment. t The user who performs the optimization selection selects a subset of users from the available users based on algorithm z Make the actual aggregation amount substantially equal to the target power; The size of the user subset selected each time is not fixed and depends on the corresponding expected value and target value.

7. The method for dynamic joint simulation of main distribution network providing secondary frequency modulation based on CMAB flexible load according to claim 6 is characterized in that: The step S3 further comprises the following steps: The performance of algorithm z at time t can be expressed by the loss function Evaluation, the smaller the loss, the better the performance of the algorithm. The formula of the loss function is as follows: In the formula, is the set of users selected by algorithm z at time t; P i,t is the power of user i at time t; X i,t is the response of user i at time t; D t is the target aggregate power at time t; In order to obtain the theoretical optimal curve of the load aggregation upper limit, the minimum loss expectation is used as the optimization comparison benchmark. The offline algorithm considers the ideal case, in which the optimal subset is selected when the user response probability distribution and the total user capacity are known. Based on the previous step loss, the regret value is defined as the difference between the loss of the offline algorithm and the online algorithm over a period of time, as shown in the following formula: In the formula, T is the total duration; is the loss of algorithm z at time t; is the offline optimal algorithm z at time t * loss.

8. The method for dynamic joint simulation of main distribution network providing secondary frequency modulation based on CMAB flexible load according to claim 1 is characterized in that: In step S4, the uncertainty of user participation in frequency modulation is calculated by combining the confidence interval upper bound-average value CUCB-Avg algorithm, and the specific steps are as follows: Input the number of users n and the target power D t >0, confidence parameter α>0; Initialize each user’s response probability p i,t and the number of selections T i,t ; For each time step t=2,...,T, calculate the upper bound U of the confidence interval for user i i,t , and ensure that it is less than 1: In the formula, p i,t-1 is the response probability of user i at time t-1; α is the parameter used to balance exploration and preservation; T i,t-1 is the number of times user i is selected at time t-1.

9. The method for dynamic joint simulation of main distribution network providing secondary frequency modulation based on CMAB flexible load according to claim 8 is characterized in that: Further comprising the steps of: Will U i,t Sort in non-increasing order: U σ(t,1) ≥…≥U σ(t,n) ; Find the smallest k t ≥0 such that: Or when equation (10) is satisfied: Let k t =n; Select a subset of users For each selected user i, perform the following steps: In the formula, p i,t is the response probability of user i at time t; T i,t-1 is the number of times user i is selected at time t-1; p i,t-1 is the response probability of user i at time t-1; X t,i is the response of user i at time t; T i,t is the number of times user i is selected at time t.

10. The method for dynamic joint simulation of main distribution network providing secondary frequency modulation based on CMAB flexible load according to claim 9, characterized in that: The CUCB-Avg algorithm considers both the sample average and the upper limit of the confidence interval. The specific steps are as follows: Calculate the upper limit of the confidence interval U according to the user's current estimated probability and confidence interval i,t , and sort the users in non-increasing order according to the upper bound; The U i,t It consists of two parts. The first part represents the current estimated response probability p of user i. i,t , reflecting the estimation of its conservation; the second part represents uncertainty, which is used to determine the upper bound of the confidence interval and reflects the degree of exploration; T i,t represents the number of times user i is selected at time t; α>0 is a parameter that adjusts the upper bound of the confidence interval and is used to balance exploration and conservation; User response probability p i,t The calculation of is as follows: In the formula, p i,t is the response probability of user i at time t; T i,t is the number of times user i is selected at time t; X t,i is the response of user i at time t; I i,t Select the set of the i-th user for time t.

Citation Information

Cited By

  • Virtual power plant optimization scheduling method, electronic equipment and storage medium

    CN119692552A

  • Resident air conditioner load multi-mode configuration method for various auxiliary service requirements

    CN121836291A