Double-layer EMS real-time scheduling optimization method based on networked micro-grid
By adopting a two-layer scheduling architecture in the microgrid and combining PSO and HBA algorithms, the problem of difficulty in taking into account economic and real-time responsiveness in the existing technology is solved, and the economic scheduling and real-time load management of the microgrid are optimized, which improves operating efficiency and stability.
Patent Information
- Application Number
- CN202411587870.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-04-25
AI Technical Summary
The existing scheduling optimization methods are difficult to take into account both economic and real-time responsiveness, especially when dealing with sudden load changes and renewable energy fluctuations, the system may not be able to adjust resource allocation in time, affecting the stability and economic benefits of overall operation.
Using a two-layer scheduling architecture, combining particle swarm optimization algorithm (PSO) and honey badger algorithm (HBA), PSO is used to optimize power generation and load distribution in initial economic scheduling, and dynamically adjust the battery charge and discharge state and load management through HBA during real-time operation to cope with changes in renewable energy and load.
The economic scheduling and real-time load management of the microgrid are achieved, the power distribution and resource utilization are optimized, and the operation efficiency and stability of the microgrid are improved.
Smart Images

Figure CN119891231A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of energy management systems (EMS), and in particular relates to a double-layer EMS real-time dispatch optimization method based on a networked microgrid. Background Art
[0002] With the large-scale access of renewable energy (such as photovoltaic and wind energy), microgrids have become an effective energy management solution. Microgrids have the advantages of strong flexibility and the ability to optimize the utilization of local energy, and are widely used in off-grid and networked scenarios. However, due to the instability of renewable energy generation and the fluctuation of load demand, the real-time scheduling and economic operation of microgrids face challenges. Existing scheduling optimization methods often find it difficult to take into account both economy and real-time responsiveness. Especially when dealing with sudden load changes and renewable energy fluctuations, the system may not be able to adjust resource allocation in time, thus affecting the stability and economic benefits of the overall operation. Particle swarm optimization (PSO) has been widely used in economic scheduling problems, but its dynamic adjustment ability to real-time load fluctuations is limited. In addition, most existing energy management systems rely on a single level of scheduling optimization, which is difficult to flexibly respond to complex and changeable microgrid operating environments. Therefore, there is an urgent need for a two-layer scheduling optimization method that can simultaneously optimize economic scheduling and real-time load management to improve the operating efficiency and stability of microgrids. Therefore, it is very necessary to provide a two-layer scheduling architecture, a two-layer EMS real-time scheduling optimization method based on networked microgrids that combines PSO and HBA algorithms to achieve microgrid optimization. Summary of the invention
[0003] 1. Technical issues
[0004] In view of the above-mentioned existing technical status, this application mainly addresses the following technical problems:
[0005] 1. Existing scheduling optimization methods often fail to balance economic efficiency and real-time responsiveness. Especially when dealing with sudden load changes and fluctuations in renewable energy, the system may not be able to adjust resource allocation in a timely manner, thus affecting the overall operational stability and economic benefits.
[0006] 2. The existing particle swarm optimization algorithm has limited ability to dynamically adjust to real-time load fluctuations;
[0007] 3. Most existing energy management systems rely on a single level of scheduling optimization, which makes it difficult to flexibly respond to the complex and changing microgrid operating environment.
[0008] (II) Technical solution
[0009] The purpose of the present invention is to overcome the shortcomings of the prior art and to provide a two-layer scheduling architecture, a two-layer EMS real-time scheduling optimization method based on a networked microgrid, which combines PSO and HBA algorithms to achieve microgrid optimization.
[0010] The object of the present invention is achieved by: a two-layer EMS real-time dispatch optimization method based on a networked microgrid, the method comprising the following steps:
[0011] Step 1: Use the particle swarm optimization algorithm (PSO) to perform the initial economic dispatch of the microgrid, optimize power generation, load distribution, and load reduction under normal and emergency conditions to ensure the lowest operating cost;
[0012] Step 2: During real-time operation, the Honey Badger Algorithm (HBA) is used to dynamically adjust the battery charging and discharging status and load management based on real-time data to cope with changes in renewable energy generation, load demand, and electricity prices, optimize power resource allocation, and maintain system stability.
[0013] Step 3: Coordinate the scheduling of particle swarm optimization and honey badger algorithm through the control module to ensure that the first-level economic scheduling is used under normal conditions and automatically switch to the second-level real-time optimization scheduling when uncertainty or load fluctuation occurs.
[0014] Furthermore, the particle swarm algorithm in step 1 is used to select the best bus connection scheme for the microgrid to minimize transmission losses and optimize load reduction. In the PSO algorithm, a particle swarm moves in the search space to find an approximate global feasible solution to the optimization problem. The best position visited by a particle is called its personal best (P best ), and the best position visited by the entire particle swarm is called the global best (G best ), let X and V represent the position and velocity of the particle in the search space respectively. In the d-dimensional space, each particle i is represented by X i =(X i(1) ,X i(2) ,...,X i(n) ), the best previous position remembered by particle i is denoted as P besti =(P besti(1) ,P besti(2) ,...,P besti(n) ), the global best particle is represented by G bestd , is the optimal particle index among all particles in the multidimensional search space; the modified speed and position of each particle is based on its current speed and the distance to P bestd and G bestd The distance calculation is expressed as: in are the k iterations of the single best and the global best, respectively; V ik represents the speed of particle i at the kth iteration; c1 and c2 are acceleration coefficients; rn1 and rn2 are random numbers between 0 and 1; represents the position of particle i at the kth iteration.
[0015] Furthermore, the main goal of the particle swarm algorithm in step 1 is to simultaneously solve the optimal economic dispatch and optimal load reduction problems. The two objective functions are expressed as:
[0016] Among them C ji (P ji ) is the cost function of generator i connected to microgrid j; C ji (D ji ) represents the load reduction cost function of load i connected in microgrid j; m is the total number of MGs to be networked; n is the total number of generators.
[0017] Furthermore, the Honey Badger algorithm in step 2 continuously adjusts the charge and discharge state of the battery to adapt to changes in real-time load demand, thereby minimizing the cost of purchasing electricity from the power grid; the first level of day-ahead scheduling is achieved through two stages: the first stage is day-ahead unit combination, and the second stage is day-ahead load management; wherein the day-ahead unit combination: the day-ahead power supply scheduling is based on the day-ahead forecast of photovoltaic power generation, wind power generation and load demand; the heuristic algorithm Honey Badger algorithm is used to determine the optimal set point of the battery in the microgrid, and the Lagrange multiplier method is used to determine the optimal set point of distributed power generation.
[0018] Furthermore, the mathematical model of the honey badger algorithm can be expressed as the following steps:
[0019] Step S1: Population initialization: Each honey badger position x i The position in a population of size n can be represented as a low-dimensional solution vector as follows: i =[x i1 ,x i2 ,x i3 ,...,x idim ](6), where dim is the number of design variables; the position x of the honey badger ij Randomly select within the upper and lower bounds according to the following formula: ij =LB j +r1(UB j -LB j ),j=1,2,3,...,dim(7), where LB j and UB j Represent the upper and lower boundaries respectively; r1 is a random number in the interval (0,1);
[0020] Step S2: Calculate the fitness value f of each honey badger position i , the daily operating cost of using the microgrid is C OP_MG , and save the optimal honey badger position as x prey , whose fitness value is f prey ;
[0021] Step S3: Determine the intensity: the odor intensity of the prey I i It is inversely proportional to the square of the distance between the honey badger and the prey, and can be calculated by the following formula: Where r2 is a random number in (0,1); S represents the source strength; d i The distance between the honey badger and the prey is calculated by the following formula: S = (x i -x i+1 ) 2 (9), d i =(x prey -x i )(10);
[0022] Step S4: Update the intensity factor: Update the intensity factor α to balance exploration and exploitation by the following formula: Where C is a constant greater than 1 (the default value is 2); t max is the maximum number of iterations;
[0023] Step S5: Update the location of the honey badger;
[0024] Step S6: Calculate the new position x new The fitness value f new : If f new ≤f, then update the position x of the honey badger i And its fitness f i For x new and f new ; Otherwise keep the original position x i and fitness f i ; if f new The fitness value of is greater than the fitness value of the prey f prey , then replace the prey position with the current optimal solution;
[0025] Step S7: Check the termination condition: If the number of iterations t reaches the preset maximum number of iterations t max , then stop the algorithm and return the optimal solution vector; otherwise, return to step S3.
[0026] Furthermore, the day-ahead load management: The second stage is a load transfer technology based on demand-side management, which transfers the controllable load from the high electricity price period to the low electricity price period to reduce the energy consumption of the microgrid; the target load is inversely proportional to the operating cost of the microgrid and varies according to the consumption time. The target or planned load can be calculated by the following formula: Among them, P Load is the total load of the microgrid; T is the total time duration; price avg is the average electricity price of the microgrid in a day; if the operation cost of the microgrid is high, the target load will be smaller, and vice versa; the proposed load transfer optimization formula can be expressed as: P t (t) = P load (t)+connect(t)-disconnect(t)(17), (0.9×P load (t))≤P t (t)(18), where P t (t) is the actual load value at the moment after the load transfer; connect(t) is the load connected at time t; disconnect(t) is the load disconnected at time t during the duration of the load transfer; P load (t) is the total load of the microgrid at time t.
[0027] Furthermore, the optimization of power resource allocation and system stability in step 2 is the second level of power sharing: the system can realize power sharing between two microgrids. When one of the microgrids is short of power, the system transmits excess power from the other microgrid to the short of power microgrid through the scheduling mechanism. During the operation of the networked microgrid, if one or more microgrids are unbalanced in load and power, and other microgrids have excess reserves, power sharing will occur. For any two networked microgrids, the power required by MGA is equal to the power sent by MGB plus the loss of the tie line. The total shared power between microgrids j can be determined by the following formula: Among them, P t(j) , D t(j) , L t(j) Denote the total power generation, total connected load and total transmission line loss in microgrid j respectively; the total connected load of microgrid j is equal to the sum of the connected load added for each load and the reduced load, as shown in the following formula: t(j) =D con(j) +D shed(j) (20), where D con(j) , D shed(j) denote the connected load and the curtailed load in microgrid j respectively.
[0028] Furthermore, the optimal economic dispatch of the networked microgrid in step 2 is subject to multiple functional constraints, fuel cost constraints and equipment constraints, which are modeled by mathematical equations: ① Power load balance constraint: The total output power of the generator must be equal to the sum of the system load and the transmission line loss, which can be expressed as follows: Among them, P t(j) , D t(j) , L t(j) Represent the total power, total connected load and total transmission line loss of the microgrid respectively; ② Generator limitation: The power generation power of each generator in the networked microgrid is subject to the following constraints: The power output of each generator in the system must be within its minimum and maximum limits, as shown in the following formula: P ji,min ≤P ji ≤P ji,max (22), where P ji,min , P ji,max Represent the minimum and maximum power output of the generator respectively; ③ Line capacity limitation: The line capacity limitation within a single microgrid and a networked microgrid is shown in the following formula. The interconnection line between two microgrids is also included. The power flow through the line cannot exceed the rated MW of the line: -L pi,rated ≤L pi ≤L pi,rated (23), where L pi,rated is the maximum load capacity of the line; ④ Load reduction constraint: Load reduction constraint is used to model the upper and lower limits of the load to be reduced, as shown in the following formula, assuming that the load can be reduced in whole or in part to obtain the optimal solution: D ji,min ≤D ji ≤D ji,max (24), where D ji is the load to be reduced in microgrid j; D ji,max is the maximum load to be reduced; D ji,min is the minimum load to be reduced.
[0029] Furthermore, the real-time scheduling in step 2 can automatically update the power set point and load reduction strategy of the power generation equipment according to the fluctuations of wind speed, solar irradiance, and load change uncertainties. The real-time scheduling process includes the following steps:
[0030] Step Q1: Input data: The optimal set point (P PV ,P WT ,P b ,P DG P L ), actual load demand P L,a , the actual photovoltaic output power P PV,a , the actual wind power output power P WT,a, and the actual purchase or sale price Tariff buy,a ; 0.9×P PV ≤P PV,a ≤1.1×P PV (25), 0.9×P WT ≤P WT,a ≤1.1×P WT (26), 0.9×Tariff buy ≤Tariff buy,a ≤1.1×Tariff buy (27), 0.8×P L ≤P L,a ≤1.2×P L (28);
[0031] Step Q2: Update electricity purchase cost C MG-buy and use the Lagrange multiplier method to calculate the new set point P of the diesel generator DG,new , P Utility(t) represents the actual power imported from the main grid to the microgrid at time t; C MG-sell represents the cost of the microgrid selling electricity to the main grid, as shown below: MG-buy =Tariff buy,a (t)×P Utility (29),
[0032] Step Q3: Calculate ΔP PV (t),ΔP WT (t),ΔP DG (t), the formula is as follows: ΔP PV (t) = P PV,a (t)-P PV (t)(31), ΔP WT (t) = P WT,a (t)-P WT (t)(32),ΔP DG (t) = P DG,new (t)-P DG (t)(33);
[0033] Step Q4: Calculate ΔP, ΔP = P L,a (t)-P DG,new (t)-P PV,a (t)-P WT,a (t)-P b (t)-P Utility (t)(34), if the power is balanced, stop the calculation and go to step Q7;
[0034] Step Q5: If ΔP≠0, the optimal set point of the battery needs to be updated;
[0035] Step Q6: Calculate the new battery set point P b,new (t): P b,new (t) = P b (t)+ΔP b (t)(37);
[0036] Step Q7: Calculate the new grid power P Utility,new (t): P Utility,new (t) = P L,a (t)-P DG,new (t)-P PV,a (t)-P WT,a (t)-P b,new (t)(38);
[0037] Step Q8: Stop the calculation and send the new optimal operating point to the local controller of each source in the microgrid.
[0038] Furthermore, the real-time optimization scheduling in step 3 can pre-schedule batteries and controllable loads in advance according to the prediction of load fluctuations to optimize the use of power resources; one of the strategies of the networked microgrid is to minimize the load reduction by sharing power between microgrids. To this end, it is assumed that each load in the networked microgrid is a dispatchable load that can be fully or partially reduced. Therefore, the optimal load reduction amount is calculated for the networked microgrid, and the optimal load reduction problem is proposed, which involves minimizing the load reduction cost, thereby minimizing the load amount D that needs to be reduced. ji , the optimal load reduction can be expressed as: Where k is the total number of loads; C(D) is the total load reduction cost.
[0039] (III) Beneficial effects
[0040] 1. The method of the present invention combines the particle swarm optimization algorithm (PSO) and the honey badger algorithm (HBA) to achieve economic dispatch and real-time load management of the microgrid through a two-layer dispatch architecture, achieving a balance between economy and real-time responsiveness, thereby optimizing the power distribution, load management and resource utilization of the microgrid;
[0041] 2. First, the PSO algorithm is used for the initial economic dispatch of the microgrid to optimize the generation plan, load distribution and reduction under normal and emergency conditions to minimize the operating cost;
[0042] 3. Then, during real-time operation, the HBA algorithm dynamically adjusts the battery charging and discharging status and load management based on real-time data to ensure the stability and economy of the microgrid when the load fluctuates and the renewable energy generation changes;
[0043] 4. The system realizes seamless connection between PSO and HBA algorithms through the control module, and flexibly switches the scheduling mode under different circumstances;
[0044] 5. In addition, the system also supports power sharing between microgrids. When a microgrid is short of power, it can dispatch excess power from other microgrids to optimize the utilization of power resources;
[0045] 6. This method improves the operating efficiency of the microgrid, reduces the operating cost, and is suitable for complex and changeable power demand environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 This is a flow chart of the HBA of the present invention.
[0047] Figure 2 This is a flow chart of the load transfer algorithm of the present invention. DETAILED DESCRIPTION
[0048] The present invention relates to the field of energy management systems (EMS), and in particular to a real-time dispatch optimization method for a networked microgrid. Specifically, the present invention proposes a dispatch method based on a two-layer energy management system, combining a particle swarm optimization algorithm (PSO) and a honey badger algorithm (HBA) to optimize the economic operation and real-time load management of the microgrid, and ensure the stability and efficiency of the microgrid.
[0049] The present invention is further described below in conjunction with embodiments and / or drawings.
[0050] Example 1
[0051] like Figure 1-2 As shown, a two-layer EMS real-time dispatch optimization method based on a networked microgrid comprises the following steps:
[0052] Step 1: Use the particle swarm optimization algorithm (PSO) to perform the initial economic dispatch of the microgrid, optimize power generation, load distribution, and load reduction under normal and emergency conditions to ensure the lowest operating cost;
[0053] In the present invention, the particle swarm optimization algorithm is used to select the optimal bus connection scheme of the microgrid to minimize transmission losses and optimize load shedding.
[0054] Particle swarm optimization (PSO) is an effective meta-heuristic optimization algorithm based on population. PSO promotes constructive cooperation and information sharing among all particles to find the global optimal solution by learning from the local experience of each particle. It distributes particles in multiple regions of the solution space and allows particles to exchange information to find the global solution in the search space. In the present invention, PSO is used to solve the fitness function and solve the economic dispatch and load reduction problems by utilizing their complementary advantages.
[0055] In the PSO algorithm, a swarm of particles moves in the search space, looking for an approximate global feasible solution to the optimization problem. The best position visited by a particle is called its personal best (P best ), and the best position visited by the entire particle swarm is called the global best (G best ), let X and V represent the position and velocity of the particle in the search space respectively. In the d-dimensional space, each particle i is represented by X i =(X i(1) ,X i(2) ,...,X i(n) ), the best previous position remembered by particle i is denoted as P besti =(P besti(1) ,P besti(2) ,...,P besti(n) ), the global best particle is represented by G bestd , is the optimal particle index among all particles in the multidimensional search space; the modified speed and position of each particle is based on its current speed and the distance to P bestd and G bestd The distance calculation is expressed as: in are the k iterations of the single best and the global best, respectively; V i k represents the speed of particle i at the kth iteration; c1 and c2 are acceleration coefficients; rn1 and rn2 are random numbers between 0 and 1; represents the position of particle i at the kth iteration; the velocity of the particle must satisfy the constraint of formula (3): V i min ≤V i k ≤V i max (3), V i max The value of determines the resolution of the search space between the target position and the current position; if V i max Too large, particles may fly through the solution; if V i maxToo small and particles may not go deep beyond the local solution; the acceleration constants c1 and c2 attract all particles to their personal optimum (P best ) and the global best (G best ) position; based on past experience, the acceleration constants c1 and c2 are usually set to 2.0; the inertia weight w maintains a balance between local and global exploration; according to formula (4), the inertia weight factor w decreases linearly between 0.9 and 0.4: Among them, w is the inertia weight factor; k is the iteration number pointer; iter max is the maximum number of iterations; use the new position At the k+1th iteration, update G using greedy selection best and P best .
[0056] The main goal is to solve the optimal economic dispatch and optimal load reduction problems simultaneously. The two objective functions are expressed as: Among them C ji (P ji ) is the cost function of generator i connected to microgrid j; C ji (D ji ) represents the load reduction cost function of the load i connected in the microgrid j; m is the total number of MGs to be connected to the network; n is the total number of generators;
[0057] Assuming that the proposed optimal economic dispatch model will achieve the main objective functions, namely minimizing the operating cost and the amount of load to be cut, the model aims to solve the optimal economic dispatch (if feasible) and the optimal load reduction (if not feasible) simultaneously; when the optimal economic dispatch is not feasible, the system will arrange the load reduction according to the simple minimization of these two objective functions; when the optimal economic dispatch is feasible, the proposed objective function produces zero load reduction through additional cost decomposition; therefore, the decomposition algorithm can be used to solve this problem. When the optimal economic dispatch is determined quickly, solving this problem is crucial to reduce the calculation time and speed up the system response; the present invention proposes a PSO optimization technique for solving the comprehensive load reduction problem in the optimal economic dispatch; in addition, the transmission line loss is considered in the optimal economic dispatch formula, and the numerical simulation shows that the proposed method automatically generates the optimal load reduction when there is an imbalance due to power generation loss.
[0058] Step 2: During real-time operation, the Honey Badger Algorithm (HBA) is used to dynamically adjust the battery charging and discharging status and load management based on real-time data to cope with changes in renewable energy generation, load demand, and electricity prices, optimize power resource allocation, and maintain system stability.
[0059] In the present invention, the Honey Badger algorithm continuously adjusts the charge and discharge state of the battery to adapt to changes in real-time load demand, thereby minimizing the cost of purchasing electricity from the power grid.
[0060] Level 1: Day-ahead dispatch: Day-ahead dispatch is achieved through two stages: the first stage is day-ahead unit combination, and the second stage is day-ahead load management.
[0061] Among them, ① Day-ahead unit combination (stage 1): the scheduling of day-ahead power is based on the day-ahead forecast of photovoltaic power generation (PV), wind power generation and load demand; the heuristic algorithm Honey Badger Algorithm (HBA) is used to determine the optimal set point of the battery in the microgrid, and the Lagrange multiplier method is used to determine the optimal set point of distributed generation (DG).
[0062] The Honey Badger Algorithm (HBA) is an advanced heuristic algorithm that simulates the foraging behavior of the honey badger. The honey badger tracks hidden prey by smelling and digging. The honey badger uses its sensitive sense of smell to determine the location of the prey. Once the area of the prey is determined, it will dig in the area to find the best position for hunting. The honey badger is able to find a balance between exploration and exploitation. Moreover, the algorithm has fewer parameters and is easier to adjust.
[0063] The mathematical model of the Honey Badger algorithm can be expressed as the following steps:
[0064] Step S1: Population initialization: Each honey badger position x i The position in a population of size n can be represented as a low-dimensional solution vector as follows: i =[x i1 ,x i2 ,x i3 ,...,x idim ](6), where dim is the number of design variables; the position x of the honey badger ij Randomly select within the upper and lower bounds according to the following formula: ij =LB j +r1(UB j -LB j ),j=1,2,3,...,dim(7), where LB j and UB j Represent the upper and lower boundaries respectively; r1 is a random number in the interval (0,1);
[0065] Step S2: Calculate the fitness value f of each honey badger position i , the daily operating cost of using the microgrid is C OP_MG , and save the optimal honey badger position as x prey , whose fitness value is f prey ;
[0066] Step S3: Determine the intensity: the odor intensity of the prey I i It is inversely proportional to the square of the distance between the honey badger and the prey, and can be calculated by the following formula: Where r2 is a random number in (0,1); S represents the source intensity (i.e., the odor concentration at the prey location); d i The distance between the honey badger and the prey is calculated by the following formula: S = (x i -x i+1 ) 2 (9), d i =(x prey -x i )(10);
[0067] Step S4: Update the intensity factor: Update the intensity factor α to balance exploration and exploitation by the following formula: Where C is a constant greater than 1 (the default value is 2); t max is the maximum number of iterations; the position of the honey badger is updated in each iteration. After finding prey, the honey badger will use two tracking behaviors: digging and hunting;
[0068] Step S5: Update the location of the honey badger: HBA location update process x new It is divided into two phases: the digging phase and the honey badger guide phase;
[0069] Step S5-1 is the digging stage: in this stage, the honey badger moves towards the prey, and its movement direction is determined by the following formula: new =x prey +F×β×I×x prey +F×r3×α×d i ×|cos(2πr4)×[1-cos(2πr5)](12), where x prey is the best position of the prey found by the honey badger so far; β is a constant with a default value of 6, which indicates the ability of the honey badger to find food; r3, r4, and r5 are three random numbers in the range of [0,1]; F is a flag used to change the search direction to avoid falling into the local optimal solution, which is defined as follows: Here, r6 is a random number between 0 and 1.
[0070] Step 5-2 is the honey hole guidance stage: In this stage, the honey badger tracks the scent of the honey hole and moves towards the prey according to the following formula: new =x prey +F×r7×α×d i (14), where x new and x prey represent the new position of the honey badger and the position of the prey respectively; r7 is a random number between 0 and 1; α and F are calculated according to formulas (11) and (13);
[0071] Step S6: Calculate the new position x new The fitness value fnew : If f new ≤f, then update the position x of the honey badger i And its fitness f i For x new and f new ; Otherwise keep the original position x i and fitness f i ; if f new The fitness value of is greater than the fitness value of the prey f prey , then replace the prey position with the current optimal solution;
[0072] Step S7: Check the termination condition: If the number of iterations t reaches the preset maximum number of iterations t max , the algorithm stops and returns the optimal solution vector; otherwise, it returns to step S3. Figure 1 .
[0073] ② Day-ahead load management (Phase 2): The second phase is a load transfer technology based on demand-side management, which transfers the controllable load from high-price periods to low-price periods to reduce the energy consumption of the microgrid; the target load is inversely proportional to the operating cost of the microgrid and varies according to the consumption time. The target or planned load can be calculated by the following formula: Among them, P Load is the total load of the microgrid (in kW); T is the total time duration; price avg is the average electricity price of the microgrid in a day; if the operating cost of the microgrid is higher, the target load will be smaller, and vice versa.
[0074] The proposed load transfer optimization formula can be expressed as: P t (t) = P load (t)+connect(t)-disconnect(t)(17), (0.9×P load (t))≤P t (t)(18), where P t (t) is the actual load value at the moment after the load transfer; connect(t) is the load connected at time t; disconnect(t) is the load disconnected at time t during the duration of the load transfer; P load (t) is the total load of the microgrid at time t; in the present invention, it is assumed that the controllable load accounts for 10% of the total load. The flowchart of the proposed load transfer technology is shown in the attached figure. Figure 2 shown.
[0075] Second-level power sharing: The system can realize power sharing between two microgrids. When one of the microgrids is short of power, the system transfers excess power from the other microgrid to the microgrid with insufficient power through a scheduling mechanism.
[0076] During the operation of a networked microgrid, if one or more microgrids are unbalanced in terms of load and power, while other microgrids have excess reserves, power sharing will occur. For any two networked microgrids, the power required by MGA is equal to the power sent by MGB plus the losses of the tie line; the total shared power between microgrids j can be determined by the following formula: Among them, P t(j) , D t(j) , L t(j) Denote the total power generation, total connected load and total transmission line loss in microgrid j respectively; the total connected load of microgrid j is equal to the sum of the connected load added for each load and the reduced load, as shown in the following formula: t(j) =D con(j) +D shed(j) (20), where D con(j) , D shed(j) denote the connected load and the curtailed load in microgrid j respectively.
[0077] Operational constraints: The optimal economic dispatch of the networked microgrid is subject to multiple functional constraints, fuel cost constraints, and equipment limitations. These constraints are modeled through mathematical equations as described below:
[0078] ① Power load balance constraint: The total output power of the generator must be equal to the sum of the system load and the transmission line loss. This constraint can be expressed as follows: Among them, P t(j) , D t(j) , L t(j) They represent the total power, total connected load and total transmission line loss of the microgrid respectively.
[0079] ② Generator constraints: The power generation capacity (in MW) of each generator in the networked microgrid is subject to the following constraints: The power output of each generator in the system must be within its minimum and maximum limits, as shown in the following formula: P ji,min ≤P ji ≤P ji,max (22), where P ji,min , P ji,max Represent the minimum and maximum power output of the generator respectively.
[0080] ③ Line capacity limit: The line capacity limit within a single microgrid and a networked microgrid is shown in the following formula. The interconnection line between two microgrids is also included. The power flow through the line cannot exceed the rated MW of the line: -L pi,rated ≤Lpi ≤L pi,rated (23), where L pi,rated is the maximum load capacity of the line.
[0081] ④ Load reduction constraint: Load reduction constraint is used to model the upper and lower limits of the load to be reduced, as shown in the following formula, assuming that the load can be reduced in whole or in part to obtain the optimal solution: D ji,min ≤D ji ≤D ji,max (24), where D ji is the load to be reduced in microgrid j; D ji,max is the maximum load to be reduced; D ji,min is the minimum load to be reduced.
[0082] In the present invention, the real-time scheduling in step 2 can automatically update the power set point and load reduction strategy of the power generation equipment according to the fluctuations of uncertain factors such as wind speed, solar irradiance, load changes, etc.
[0083] Weather conditions and load forecasts usually have certain errors and uncertainties. In addition, the actual tariff of the power grid depends on the actual demand load of the power grid, which is difficult to predict with 100% accuracy. In this paper, the uncertainty of solar irradiance, wind speed and power grid tariff does not exceed 10%. Since users operate electrical equipment randomly during the day, the load of the microgrid may not be accurately predicted, and the uncertainty of the actual demand load may be as high as 20%. In order to achieve real-time economic operation, a real-time energy management system is proposed to cope with the uncertainty of renewable energy, grid tariffs and load demand. These uncertainties increase the complexity of the design of the energy management system (EMS). In order to maintain the system balance economically, the optimal operating point of each energy in the microgrid needs to be re-dispatched according to the actual data of weather conditions, grid tariffs and load demand.
[0084] The following steps are used to organize the proposed real-time scheduling process:
[0085] Step Q1: Input data: The optimal set point (P PV ,P WT ,P b ,P DG P L ), actual load demand P L,a , the actual photovoltaic output power P PV,a , the actual wind power output power P WT,a , and the actual purchase or sale price Tariff buy,a ; 0.9×P PV ≤P PV,a ≤1.1×P PV(25), 0.9×P WT ≤P WT,a ≤1.1×P WT (26), 0.9×Tariff buy ≤Tariff buy,a ≤1.1×Tariff buy (27), 0.8×P L ≤P L,a ≤1.2×P L (28);
[0086] Step Q2: Update electricity purchase cost C MG-buy and use the Lagrange multiplier method to calculate the new set point P of the diesel generator DG,new , P Utility(t) represents the actual power imported from the main grid to the microgrid at time t; C MG-sell represents the cost of the microgrid selling electricity to the main grid, as shown below: MG-buy =Tariff buy,a (t)×P Utility (29), Shape This type of symbol means taking the derivative of the variable in it, for example, here it represents the generator operating cost C DG-OP The output power of the generator P DG The derivative of
[0087] Step Q3: Calculate ΔP PV (t),ΔP WT (t),ΔP DG (t), the formula is as follows: ΔP PV (t) = P PV,a (t)-P PV (t)(31), ΔP WT (t) = P WT,a (t)-P WT (t)(32),ΔP DG (t) = P DG,new (t)-P DG (t)(33);
[0088] Step Q4: Calculate ΔP, ΔP = P L,a (t)-P DG,new (t)-P PV,a (t)-P WT,a (t)-P b (t)-P Utility (t)(34), if the power is balanced, stop the calculation and go to step Q7;
[0089] Step Q5: If ΔP≠0, the optimal set point of the battery needs to be updated;
[0090] If the change in load power is greater than the power change of photovoltaic, wind power and diesel generator, the battery set point should be increased (in discharge mode) or reduced (in charge mode); the amount of change depends on the value of ΔP(t), the electricity purchase price and the energy stored in the battery; as the price of purchasing electricity from the grid increases from the lowest electricity price, the ΔP(t) value and the energy stored in the battery increase, and the amount of change in the battery set point will also increase.
[0091] On the contrary, if the change in load power is smaller than the power change of photovoltaic, wind power and diesel generator, the set point of the battery should be reduced (in discharge mode) or increased (in charge mode); the amount of change depends on the stored energy in the battery and the electricity price; as the stored energy in the battery, the ΔP(t) value and the electricity purchase price decrease, the amount of change in the battery set point increases.
[0092] The optimal control actions for these batteries can be achieved by minimizing the following cost equation:
[0093] Where ΔP L (t) represents the change in load power; ΔP PV (t) represents the change in photovoltaic power; ΔP WT (t) represents the change in wind power generation; ΔP DG (t) represents the change in diesel generator power; ΔP b (t) is the additional battery power required to achieve optimal operation; C MG-buy,min is the minimum electricity purchase price; E(t+1) is the energy stored in the battery at time t+1 according to the day-ahead dispatch; the first term in equation (35) indicates that the battery discharge is related to the price of electricity purchased from the grid, and the second term indicates that the battery charge is related to the energy stored in the battery; the optimal ΔP b (t) is the value that minimizes the cost of equation (35); the nonlinear programming solver function fmincon in MATLAB is used to solve ΔP that minimizes equation (35) b (t), subject to the following constraints: Among them, E min 、E max are the minimum and maximum storage energies allowed in the battery, respectively;
[0094] Step Q6: Calculate the new battery set point P b,new (t): P b,new (t) = P b (t)+ΔPb (t)(37);
[0095] Step Q7: Calculate the new grid power P Utility,new (t): P Utility,new (t) = P L,a (t)-P DG,new (t)-P PV,a (t)-P WT,a (t)-P b,new (t)(38);
[0096] Step Q8: Stop the calculation and send the new optimal operating point to the local controller of each source in the microgrid.
[0097] Step 3: Coordinate the scheduling of particle swarm optimization and honey badger algorithm through the control module to ensure that the first-level economic scheduling is used under normal conditions and automatically switch to the second-level real-time optimization scheduling when uncertainty or load fluctuation occurs.
[0098] The present invention is a real-time dispatch optimization method for a two-layer EMS based on a networked microgrid. In use, the present invention aims to solve the deficiencies in the prior art and proposes a real-time dispatch optimization method for a networked microgrid based on a two-layer energy management system (EMS). The method combines a particle swarm optimization algorithm (PSO) and a honey badger algorithm (HBA) to achieve a balance between economy and real-time responsiveness through a two-layer dispatch architecture, thereby optimizing the power distribution, load management and resource utilization of the microgrid. The method of the present invention combines a particle swarm optimization algorithm (PSO) for initial economic dispatch and a honey badger algorithm (HBA) for real-time load management to ensure efficient operation of the microgrid under normal and emergency conditions. The present invention realizes resource optimization configuration through a two-layer dispatch mechanism, can dynamically adjust the charge and discharge state of the battery and load management according to real-time data, so as to cope with fluctuations in renewable energy and load changes, and at the same time supports power sharing between microgrids to ensure system stability and economy. The present invention has the advantages of a two-layer dispatch architecture, combining PSO and HBA algorithms, and realizing microgrid optimization.
[0099] Example 2
[0100] like Figure 1-2 As shown, a two-layer EMS real-time dispatch optimization method based on a networked microgrid comprises the following steps:
[0101] Step 1: Use the particle swarm optimization algorithm (PSO) to perform the initial economic dispatch of the microgrid, optimize power generation, load distribution, and load reduction under normal and emergency conditions to ensure the lowest operating cost;
[0102] Step 2: During real-time operation, the Honey Badger Algorithm (HBA) is used to dynamically adjust the battery charging and discharging status and load management based on real-time data to cope with changes in renewable energy generation, load demand, and electricity prices, optimize power resource allocation, and maintain system stability.
[0103] Step 3: Coordinate the scheduling of particle swarm optimization and honey badger algorithm through the control module to ensure that the first-level economic scheduling is used under normal conditions and automatically switch to the second-level real-time optimization scheduling when uncertainty or load fluctuation occurs.
[0104] In the present invention, the system can pre-dispatch batteries and controllable loads in advance according to the prediction of load fluctuations to optimize the use of power resources.
[0105] One of the strategies of networked microgrids is to minimize the amount of load reduction by sharing power between microgrids. To this end, it is assumed that each load in the networked microgrid is a dispatchable load that can be fully or partially reduced. Therefore, to calculate the optimal load reduction for the networked microgrid, an optimal load reduction problem is proposed, which involves minimizing the load reduction cost and thus minimizing the amount of load that needs to be reduced. ji , the optimal load reduction can be expressed as: Wherein, k is the total number of loads; C(D) is the total load reduction cost; if the available power is less than the load demand, load reduction must be arranged to maintain supply and demand balance and system stability; the optimal load reduction problem aims to determine the optimal load reduction amount for each load bus; in the present invention, each load is modeled as a negative real work injection with high marginal cost, which is achieved by specifying a generator with negative output, whose minimum injection amount is equal to the negative value of the possible maximum load, and the maximum injection amount is zero, and the load shedding cost of the connected MG is minimized, thereby minimizing the total load.
[0106] The present invention is a real-time dispatch optimization method for a two-layer EMS based on a networked microgrid. In use, the present invention aims to solve the deficiencies in the prior art and proposes a real-time dispatch optimization method for a networked microgrid based on a two-layer energy management system (EMS). The method combines a particle swarm optimization algorithm (PSO) and a honey badger algorithm (HBA) to achieve a balance between economy and real-time responsiveness through a two-layer dispatch architecture, thereby optimizing the power distribution, load management and resource utilization of the microgrid. The method of the present invention combines a particle swarm optimization algorithm (PSO) for initial economic dispatch and a honey badger algorithm (HBA) for real-time load management to ensure efficient operation of the microgrid under normal and emergency conditions. The present invention realizes resource optimization configuration through a two-layer dispatch mechanism, can dynamically adjust the charge and discharge state of the battery and load management according to real-time data, so as to cope with fluctuations in renewable energy and load changes, and at the same time supports power sharing between microgrids to ensure system stability and economy. The present invention has the advantages of a two-layer dispatch architecture, combining PSO and HBA algorithms, and realizing microgrid optimization.
Claims
1. A two-layer EMS real-time dispatch optimization method based on networked microgrids, characterized by: The method comprises the following steps: Step 1: Use the particle swarm optimization algorithm (PSO) to perform the initial economic dispatch of the microgrid, optimize power generation, load distribution, and load reduction under normal and emergency conditions to ensure the lowest operating cost; Step 2: During real-time operation, the Honey Badger Algorithm (HBA) is used to dynamically adjust the battery charging and discharging status and load management based on real-time data to cope with changes in renewable energy generation, load demand, and electricity prices, optimize power resource allocation, and maintain system stability. Step 3: Coordinate the scheduling of particle swarm optimization and honey badger algorithm through the control module to ensure that the first-level economic scheduling is used under normal conditions and automatically switch to the second-level real-time optimization scheduling when uncertainty or load fluctuation occurs.
2. The two-layer EMS real-time dispatch optimization method based on networked microgrid according to claim 1, characterized in that: The particle swarm algorithm in step 1 is used to select the best bus connection scheme for the microgrid to minimize transmission losses and optimize load reduction. In the PSO algorithm, the particle swarm moves in the search space to find an approximate global feasible solution to the optimization problem. The best position visited by a particle is called its personal best (P best ), and the best position visited by the entire particle swarm is called the global best (G best ), let X and V represent the position and velocity of the particle in the search space respectively. In the d-dimensional space, each particle i is represented by X i =(X i(1) ,X i(2) ,...,X i(n) ), the best previous position remembered by particle i is denoted as P besti =(P besti(1) ,P besti(2) ,...,P besti(n) ), the global best particle is represented by G bestd , is the optimal particle index among all particles in the multidimensional search space; the modified speed and position of each particle is based on its current speed and the distance to P bestd and G bestd The distance calculation is expressed as: in are the k iterations of the single best and the global best, respectively; V i k represents the speed of particle i at the kth iteration; c1 and c2 are acceleration coefficients; rn1 and rn2 are random numbers between 0 and 1; represents the position of particle i at the kth iteration.
3. The two-layer EMS real-time dispatch optimization method based on networked microgrid according to claim 2, characterized in that: The main goal of the particle swarm algorithm in step 1 is to simultaneously solve the optimal economic dispatch and optimal load reduction problems. The two objective functions are expressed as: Among them C ji (P ji ) is the cost function of generator i connected to microgrid j; C ji (D ji ) represents the load reduction cost function of load i connected in microgrid j; m is the total number of MGs to be networked; n is the total number of generators.
4. The two-layer EMS real-time dispatch optimization method based on networked microgrid according to claim 1, characterized in that: The honey badger algorithm in step 2 continuously adjusts the charge and discharge state of the battery to adapt to the changes in real-time load demand, thereby minimizing the cost of purchasing electricity from the power grid; the first level of day-ahead scheduling is achieved through two stages: the first stage is day-ahead unit combination, and the second stage is day-ahead load management; wherein the day-ahead unit combination: the day-ahead power supply scheduling is based on the day-ahead forecast of photovoltaic power generation, wind power generation and load demand; the heuristic algorithm honey badger algorithm is used to determine the optimal set point of the battery in the microgrid, and the Lagrange multiplier method is used to determine the optimal set point of distributed power generation.
5. The two-layer EMS real-time dispatch optimization method based on networked microgrid according to claim 4 is characterized in that: The mathematical model of the honey badger algorithm can be expressed as the following steps: Step S1: Population initialization: Each honey badger position x i The position in a population of size n can be represented as a low-dimensional solution vector as follows: i =[x i1 ,x i2 ,x i3 ,...,x idim ](6), where dim is the number of design variables; the position x of the honey badger ij Randomly select within the upper and lower bounds according to the following formula: ij =LB j +r1(UB j -LB j ),j=1,2,3,...,dim(7), where LB j and UB j Represent the upper and lower boundaries respectively; r1 is a random number in the interval (0,1); Step S2: Calculate the fitness value f of each honey badger position i , the daily operating cost of using the microgrid is C OP_MG , and save the optimal honey badger position as x prey , whose fitness value is f prey ; Step S3: Determine the intensity: the odor intensity of the prey I i It is inversely proportional to the square of the distance between the honey badger and the prey, and can be calculated by the following formula: Where r2 is a random number in (0,1); S represents the source strength; d i The distance between the honey badger and the prey is calculated by the following formula: S = (x i -x i+1 ) 2 (9), d i =(x prey -x i )(10); Step S4: Update the intensity factor: Update the intensity factor α to balance exploration and exploitation by the following formula: Where C is a constant greater than 1 (the default value is 2); t max is the maximum number of iterations; Step S5: Update the location of the honey badger; Step S6: Calculate the new position x new The fitness value f new : If f new ≤f, then update the position x of the honey badger i And its fitness f i For x new and f new ; Otherwise keep the original position x i and fitness f i ; if f new The fitness value of is greater than the fitness value of the prey f prey , then replace the prey position with the current optimal solution; Step S7: Check the termination condition: If the number of iterations t reaches the preset maximum number of iterations t max , then stop the algorithm and return the optimal solution vector; otherwise, return to step S3.
6. The two-layer EMS real-time dispatch optimization method based on networked microgrid according to claim 4 is characterized in that: The day-ahead load management: The second stage is a load transfer technology based on demand-side management, which transfers the controllable load from the high electricity price period to the low electricity price period to reduce the energy consumption of the microgrid; The target load is inversely proportional to the operating cost of the microgrid and varies according to the consumption time. The target or planned load can be calculated by the following formula: Among them, P Load is the total load of the microgrid; T is the total time duration; price avg is the average electricity price of the microgrid in a day; if the operation cost of the microgrid is high, the target load will be smaller, and vice versa; the proposed load transfer optimization formula can be expressed as: P t (t) = P load (t)+connect(t)-disconnect(t)(17), (0.9×P load (t))≤P t (t)(18), where P t (t) is the actual load value at the moment after the load transfer; connect(t) is the load connected at time t; disconnect(t) is the load disconnected at time t during the duration of the load transfer; P load (t) is the total load of the microgrid at time t.
7. The two-layer EMS real-time dispatch optimization method based on networked microgrid according to claim 4 is characterized in that: The optimization of power resource allocation and system stability in step 2 is the second level of power sharing: the system can realize power sharing between two microgrids. When one of the microgrids is short of power, the system transmits excess power from the other microgrid to the short-powered microgrid through a scheduling mechanism. During the operation of the networked microgrid, if one or more microgrids are unbalanced in load and power, and other microgrids have excess reserves, power sharing will occur. For any two networked microgrids, the power required by MGA is equal to the power sent by MGB plus the loss of the tie line. The total shared power between microgrids j can be determined by the following formula: Among them, P t(j) , D t(j) , L t(j) Denote the total power generation, total connected load and total transmission line loss in microgrid j respectively; the total connected load of microgrid j is equal to the sum of the connected load added for each load and the reduced load, as shown in the following formula: t(j) =D con(j) +D shed(j) (20), where D con(j) , D shed(j) denote the connected load and the curtailed load in microgrid j respectively.
8. The two-layer EMS real-time dispatch optimization method based on networked microgrid according to claim 7, characterized in that: The optimal economic dispatch of the networked microgrid in step 2 is subject to multiple functional constraints, fuel cost constraints and equipment constraints, which are modeled by mathematical equations: ① Power load balance constraint: The total output power of the generator must be equal to the sum of the system load and the transmission line loss. This constraint can be expressed as follows: Among them, P t(j) , D t(j) , L t(j) Represent the total power, total connected load and total transmission line loss of the microgrid respectively; ② Generator limitation: The power generation power of each generator in the networked microgrid is subject to the following constraints: The power output of each generator in the system must be within its minimum and maximum limits, as shown in the following formula: P ji,min ≤P ji ≤P ji,max (22), where P ji,min , P ji,max Represent the minimum and maximum power output of the generator respectively; ③ Line capacity limitation: The line capacity limitation within a single microgrid and a networked microgrid is shown in the following formula. The interconnection line between two microgrids is also included. The power flow through the line cannot exceed the rated MW of the line: -L pi,rated ≤L pi ≤L pi,rated (23), where L pi,rated is the maximum load capacity of the line; ④ Load reduction constraint: Load reduction constraint is used to model the upper and lower limits of the load to be reduced, as shown in the following formula, assuming that the load can be reduced in whole or in part to obtain the optimal solution: D ji,min ≤D ji ≤D ji,max (24), where D ji is the load to be reduced in microgrid j; D ji,max is the maximum load to be reduced; D ji,min is the minimum load to be reduced.
9. The two-layer EMS real-time dispatch optimization method based on networked microgrid according to claim 8, characterized in that: The real-time scheduling in step 2 can automatically update the power set point and load reduction strategy of the power generation equipment according to the fluctuations of wind speed, solar irradiance, and load change uncertainties. The real-time scheduling process includes the following steps: Step Q1: Input data: The optimal set point (P PV ,P WT ,P b ,P DG andP L ), actual load demand P L,a , the actual photovoltaic output power P PV,a , the actual wind power output power P WT,a , and the actual purchase or sale price Tariff buy,a ; 0.9×P PV ≤P PV,a ≤1.1×P PV (25), 0.9×P WT ≤P WT,a ≤1.1×P WT (26), 0.9×Tariff buy ≤Tariff buy,a ≤1.1×Tariff buy (27), 0.8×P L ≤P L,a ≤1.2×P L (28); Step Q2: Update electricity purchase cost C MG-buy and use the Lagrange multiplier method to calculate the new set point P of the diesel generator DG,new , P Utility(t) represents the actual power imported from the main grid to the microgrid at time t; C MG-sell The cost of selling electricity from the microgrid to the main grid is as follows: Step Q3: Calculate ΔP PV (t),ΔP WT (t),ΔP DG (t), the formula is as follows: ΔP PV (t) = P PV,a (t)-P PV (t)(31), ΔP WT (t) = P WT,a (t)-P WT (t)(32),ΔP DG (t) = P DG,new (t)-P DG (t)(33); Step Q4: Calculate ΔP, ΔP = P L,a (t)-P DG,new (t)-P PV,a (t)-P WT,a (t)-P b (t)-P Utility (t)(34), if the power is balanced, stop the calculation and go to step Q7; Step Q5: If ΔP≠0, the optimal set point of the battery needs to be updated; Step Q6: Calculate the new battery set point P b,new (t): P b,new (t) = P b (t)+ΔP b (t)(37); Step Q7: Calculate the new grid power P Utility,new (t): P Utility,new (t) = P L,a (t)-P DG,new (t)-P PV,a (t)-P WT,a (t)-P b,new (t)(38); Step Q8: Stop the calculation and send the new optimal operating point to the local controller of each source in the microgrid.
10. The two-layer EMS real-time dispatch optimization method based on networked microgrid according to claim 1, characterized in that: The real-time optimization scheduling in step 3 can pre-schedule batteries and controllable loads in advance according to the prediction of load fluctuations to optimize the use of power resources; one of the strategies of networked microgrids is to minimize the load reduction by sharing power between microgrids. To this end, it is assumed that each load in the networked microgrid is a dispatchable load that can be fully or partially reduced. Therefore, the optimal load reduction amount is calculated for the networked microgrid, and the optimal load reduction problem is proposed, which involves minimizing the load reduction cost, thereby minimizing the load amount D that needs to be reduced. ji , the optimal load reduction can be expressed as: Where k is the total number of loads; C(D) is the total load reduction cost.