Energy routing method based on multi-target particle swarm
By building an energy Internet network model and adopting a multi-objective particle swarm optimization algorithm to optimize energy paths and scheduling strategies, the stability and reliability problems of energy routing methods in the existing technology in complex scenarios are solved, and multi-objective optimization and efficient energy transmission are achieved.
Patent Information
- Application Number
- CN202510409268.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-02
- Publication Date
- 2025-07-04
AI Technical Summary
Existing energy routing methods are difficult to achieve efficient and stable path selection and scheduling in dealing with complex energy transmission scenarios, especially in the case of failure or communication failure, and lack multi-objective optimization considerations.
The energy Internet network model is constructed based on the multi-objective particle swarm optimization algorithm, and the energy path and scheduling strategy are optimized through neighboring node impact factors, path cumulative impact factors and conflict detection mechanisms, and multiple optimization goals such as DC bus voltage deviation, energy router power, energy loss, communication delay and packet loss rate are comprehensively considered.
It improves the load balancing and system stability of the energy Internet under dynamic operating conditions, improves the robustness and adaptability of the energy Internet, and ensures the stability of power supply and the efficient operation of the communication network.
Smart Images

Figure CN120258452A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of energy Internet and relates to an energy routing method based on multi-objective particle swarm optimization. Background Art
[0002] With the increasing shortage of traditional fossil energy, the demand for renewable energy such as solar energy and wind power is constantly increasing, and the energy Internet emerges as the times require. As a key device of the energy Internet, the energy router can coordinately dispatch distributed power sources, energy storage systems and loads, and effectively manage energy. At the same time, the energy Internet composed of multiple interconnected energy routers is an effective way to solve the problems existing in the traditional power grid, such as large long-distance transmission losses, low energy use efficiency and environmental pollution.
[0003] However, different from the traditional power system, the energy Internet has a more complex energy flow form. With the gradual increase of distributed generation facilities, the energy demand of users becomes more diversified and personalized, the frequency and the number of nodes of power transmission are constantly increasing, and the energy router needs to process energy flow information in real time and efficiently. In addition, in the environment of large-scale user access, the probability of system failures, node failures and other situations increases, which may lead to energy transmission interruption or instability, and the reliability and stability of the system also face challenges. How to perform efficient and stable energy routing is an urgent problem to be solved.
[0004] In the existing research on energy routing methods, most of them are aimed at the energy scheduling strategies of the microgrids connected to the energy router, and the optimization objectives are mostly the output balance and economic cost of the power system, lacking the routing strategies for energy path selection. At the same time, the existing energy routing strategies mostly only consider a single objective of power loss of the power system. When power failures or communication failures occur in the energy router system, the existing strategies are difficult to cope with complex working conditions. Summary of the Invention
[0005] In view of this, the purpose of the present invention is to provide an energy routing method based on multi-objective particle swarm optimization, which further improves the efficient scheduling and transmission of energy in the energy Internet by constructing an energy Internet model, designing an energy scheduling strategy, and optimizing the energy routing path, and improves the load balance and system stability under dynamic working conditions of the energy Internet.
[0006] To achieve the above object, the present invention provides the following technical solutions:
[0007] An energy routing method based on multi-objective particle swarm optimization, the method comprising the following steps:
[0008] S1. Establish an energy router model, which includes an energy router power model and an energy router communication model, and interconnect multiple energy router model nodes to establish an energy interconnection network model;
[0009] S2. According to the energy demands proposed by the energy router nodes in the energy interconnection network model, the dispatching center obtains the real-time parameter information of each energy router node in the energy interconnection network model;
[0010] S3. According to the real-time parameter information of each energy router node, use an improved multi-objective particle swarm optimization algorithm for path selection to obtain the optimal solution of energy path selection;
[0011] S4. According to the obtained optimal solution of energy path selection, use an improved multi-objective particle swarm optimization algorithm for energy dispatching to obtain the optimal solution of energy dispatching;
[0012] S5. The dispatching center issues the obtained optimal solution of energy path selection and the optimal solution of energy dispatching to each energy router node, and each energy router node performs real-time energy routing and energy dispatching according to the received dispatching strategy;
[0013] S6. Judge in real time whether there are problems in the dispatching process. If so, return to step S2 to confirm the dispatching plan again until the requirements are met.
[0014] Further, in step S3, the process of using the improved multi-objective particle swarm optimization algorithm for energy routing includes:
[0015] S31. Conduct data collection, define the influence factor of neighboring nodes, and establish a search tree in combination with the priority of demand nodes;
[0016] S32. Establish a path cumulative influence factor and a path conflict detection mechanism for energy path planning;
[0017] S33. Initialize the particle swarm, and set the constraint conditions and the penalty factors corresponding to the constraint conditions;
[0018] S34. Calculate the objective function, return the fitness value of the particle, and perform iterative update according to the fitness value to obtain the optimal energy path solution.
[0019] Further, in step S31, it includes: for the microgrids under the energy router, collect the power generation data, energy storage status, interface data with the power grid, and load demands of each microgrid; for the energy router, obtain the communication metrics of each energy router node; conduct neighboring node information collection. For each node, collect the physical distance, load level, and communication quality of other neighboring nodes in a hierarchical manner, and define the influence factor of neighboring nodes:
[0020]
[0021] Among them, is the influence factor of the i-th neighborhood node; d i is the distance between the current node and neighborhood node i; Q comm,i is the communication quality index of neighborhood node i; the current load level of neighborhood node i; λ1, λ2, λ3 are the weights corresponding to each index, used to balance their influences;
[0022] If there is only one demand node in the system, directly plan the energy path starting from this node; if there are multiple demand nodes in the system, establish the priority of the demand energy router nodes, and the priority of the energy router nodes is expressed as:
[0023]
[0024] Among them, E i is the priority of demand node i, P demand,i is the energy demand of node i; P max is the maximum possible energy demand in the system; T response,i is the historical response delay of node i; T max is the maximum tolerance value of the response delay; w1, w2 are the weight coefficients, adjusting the influence of the demand quantity and the response delay on the priority;
[0025] For each demand node, construct a search tree with it as the root node, and the expansion of the search tree follows the hierarchical principle: each layer represents one hop. In each layer, starting from the current node, select the top two nodes with higher scores from the candidate nodes that meet the constraints in the neighborhood for branch expansion.
[0026] Furthermore, in step S32, extract the complete energy path from the demand node to the source node from the search tree, and calculate the path cumulative influence factor; the path cumulative influence factor is expressed as:
[0027]
[0028] The path conflict detection mechanism is as follows: when there are common intermediate nodes in the candidate paths constructed by multiple demand nodes, it is considered that a path conflict has occurred; for the conflict paths, preferentially retain the paths of the demand nodes with higher priorities; for the demand nodes with lower priorities, if their candidate paths overlap with the already allocated paths, re-plan;
[0029] If there is reuse between the candidate path and the already allocated path, add a penalty formula to the objective function:
[0030]
[0031] Among them, F routis the original comprehensive objective function, which includes the DC bus voltage deviation, the power deviation of the energy router, the transmission loss, the communication delay, the packet loss rate, and the cumulative impact factor of each node in the path; P path represents the set of all nodes included in the current candidate path; P allocated represents the set of nodes used in the paths that have been assigned to other demand nodes; k is a conflict penalty coefficient used to adjust the penalty intensity brought by the conflict.
[0032] Furthermore, in step S33, initialize the particle swarm: Initialize the population, initialize the position and velocity of each particle, and limit the upper and lower bounds. Each particle represents an energy routing scheme, and its position x includes the output of the energy path;
[0033] Evaluate the fitness of each particle to ensure that it meets the constraint conditions, which include: DC bus voltage deviation, power volatility, energy transmission loss, transmission delay, packet loss rate constraint; if the constraint is not met, apply the penalty factor;
[0034] The constraint formula for the DC bus voltage deviation is:
[0035]
[0036] where: V dc is the actually measured DC bus voltage; is the reference DC bus voltage; is the maximum allowable relative voltage deviation; for particles that do not meet the DC bus voltage deviation constraint condition, set the penalty factor
[0037]
[0038] where, is the voltage deviation penalty coefficient, κ dc is used to adjust the penalty intensity;
[0039] The constraint formula for power volatility is:
[0040]
[0041] where, P ER is the actual output power of the energy router; P rated is the rated power of the device; ΔP max is the maximum allowable relative power deviation; for particles that do not meet the power volatility constraint condition, set the penalty factor
[0042]
[0043] Among them, κ P is the penalty coefficient for power fluctuation constraint;
[0044] The constraint formula for energy transmission loss is:
[0045]
[0046] Among them, R ij is the line resistance; is the voltage between nodes; P ab is the transmission power between the source node and the demand node; P ij is the transmission power between nodes on the transmission path; For particles that do not meet the energy transmission loss constraint conditions, set the penalty factor
[0047]
[0048] Among them, κ loss is the penalty coefficient for energy transmission loss constraint;
[0049] The constraint formula for communication delay is:
[0050]
[0051] Among them, T delay is the actual communication delay, T max is the maximum allowable communication delay; For particles that do not meet the communication delay constraint conditions, set the penalty factor
[0052]
[0053] Among them, κ delay is the penalty coefficient for communication delay constraint;
[0054] The constraint formula for packet loss rate is:
[0055]
[0056] Among them, R packet is the actual packet loss rate, R max is the maximum allowable packet loss rate; For particles that do not meet the packet loss rate constraint conditions, set the penalty factor
[0057]
[0058] Among them, κ packet is the penalty coefficient for packet loss rate constraint.
[0059] Further, in step S34, after satisfying the constraint conditions, calculate the objective function and return the fitness value of the particle. The calculation formula of the objective function is as follows:
[0060]
[0061] where f V , f P , f loss , f delay , f packet respectively represent the objective functions of the DC bus voltage deviation, power volatility, energy transmission loss, transmission delay, and packet loss rate of the power system;
[0062] Fitness update: In each iteration, the particle swarm is updated according to the position x, and the fitness is calculated. Among them, each objective function and the penalty factor are integrated in the form of a weighted sum, and the penalty function Π k The formula is:
[0063]
[0064] The fitness The formula is:
[0065]
[0066] Update the particle: The update formula of the particle velocity v is:
[0067]
[0068] where, The velocity of particle k at the t-th iteration, w is the inertia factor, which controls the retention ratio of the previous velocity; c1 and c2 are the cognitive and social acceleration constants respectively, which determine the dependence degree of the particle on the individual historical optimum and the global optimum; r1 and r2 are random numbers uniformly distributed between [0, 1]; is the optimal position in the history of particle k. g best is the global optimal position in the entire population.
[0069] The formula for the updated particle position is:
[0070]
[0071] Algorithm iteration: In each iteration, the fitness of the particle is evaluated according to the objective function and the constraint conditions, and at the same time the particle is updated. The update process of the particle includes the update of the position and velocity, the update of the individual optimal solution and the group optimal solution; if the fitness of the particle is better, then update its individual optimal solution and the group optimal solution;
[0072] Multi-objective optimization: In each iteration, the algorithm updates the archive to store non-dominated solutions. The archive saves the particles that are not dominated by other solutions in all objective functions. At the same time, the algorithm selects a leader from the archive to lead other particles in the search. The selection of the leader is based on the distribution of the particles and the performance of the objective functions, and the roulette wheel method is used to select the optimal solution.
[0073] Optimal solution selection: During the iteration process, the optimal energy path solution will ultimately be selected according to the objective function.
[0074] Furthermore, in step S4, the process of performing energy routing using an improved multi-objective particle swarm optimization algorithm according to the determined energy path selection includes:
[0075] S41. Input the power parameters related to the microgrid under the corresponding energy router node of the energy path.
[0076] S42. Initialize the particle swarm, and establish constraint conditions and the corresponding penalty factors for the constraint conditions.
[0077] S43. Calculate the objective function, return the fitness value of the particle, and perform iterative updates according to the fitness value to obtain the optimal energy scheduling solution.
[0078] Furthermore, in step S41, obtain the power parameters related to the microgrid under the corresponding energy router node of the energy path. The power parameters include photovoltaic, energy storage, grid, and load, and load the data of each microgrid module.
[0079] In step S42, initialize the particle swarm: Initialize the population. Each particle is initialized with a position and a velocity, and the upper and lower limits are defined. Each particle represents an energy scheduling scheme, and its position x includes the output of the energy.
[0080] Each particle will perform a fitness evaluation to ensure that it meets the constraint conditions. The constraint conditions include DC bus voltage deviation, power change, energy storage SOC, power balance, and neighborhood node influence constraints. If the constraints are not met, the penalty factor is applied.
[0081] The constraint formula for the DC bus voltage deviation is:
[0082]
[0083] Where: V dc (t) is the actual DC bus voltage calculated at time t; is the reference DC bus voltage; V dc_limit is the maximum allowable relative voltage deviation; For the particles that do not meet the DC bus voltage deviation constraint conditions, set the penalty factor φ dc :
[0084]
[0085] λ dc is the voltage deviation penalty coefficient, used to adjust the penalty intensity; T is the total duration of the scheduling period;
[0086] The constraint formula for power change is:
[0087]
[0088] where P i (t) is the output power of device i at time t; P i (t - 1) is the output power of device i at the previous time t - 1; is the maximum allowable power change of device i, that is, the maximum allowable output change per unit time; S represents all power supply units; for particles that do not meet the power change constraint conditions, set the penalty factor φ ramp :
[0089]
[0090] where: λ ramp is the penalty coefficient for power change constraint;
[0091] The constraint formula for energy storage balance is:
[0092]
[0093] where: SOC t is the energy storage SOC state at time t. P ch,t is the charging power at time t; P dis,t is the discharging power at time t; η c is the charging efficiency, η d is the discharging efficiency, SOC min and SOC max represent the minimum and maximum values of SOC respectively;
[0094] Define the part where SOC exceeds, and the formula for the exceeded part is:
[0095]
[0096] where, SOC viol,t is the part where SOC exceeds, SOC sum_delt is the sum of the exceeded parts at all time steps; for particles that do not meet the energy storage constraint conditions, set the penalty factor φ soc ;
[0097] The constraint formula for power balance is:
[0098]
[0099] For each time period i (from 1 to 24), calculate the difference between the sum of the outputs of all energy devices n and the load P load (i); for the particles that do not satisfy the power balance constraint condition, set the penalty factor φ ele ;
[0100] The constraint formula for the influence of neighboring nodes is:
[0101]
[0102] where: d ij represents the distance between node i and neighboring node j; Q comm,ij represents the communication quality index between the two nodes; Load j represents the current load level of neighboring node j; λ1, λ2, λ3 are the weight coefficients of each item; N i represents the set of all nodes adjacent to node i; for the particles that do not satisfy the constraint condition of the influence of neighboring nodes, set the penalty factor φ path :
[0103] φ path = γ φ ·(φ i - φ max ) 2
[0104] where, γ φ is the penalty coefficient for the influence of neighboring nodes;
[0105] In step S43, after satisfying the constraint conditions, calculate the objective function and return the fitness value of the particle; where, the calculation formula of the objective function is:
[0106]
[0107] where, f1, f2, f3 respectively represent the objective functions of the DC bus voltage deviation, energy transmission loss, and power fluctuation index of the power system;
[0108] Fitness update: In each iteration, the particle swarm is updated according to the position x, and the fitness is calculated. The objective functions and penalty factors are integrated in the form of a weighted sum; the penalty function Π i has the formula:
[0109] Π i = w dc φ dc + w ramp φ ramp + w soc φ soc + w eleφ ele + w path φ path
[0110] The fitness F i has the following formula:
[0111] F i = w1f1 + w2f2 + w3f3 + Π i
[0112] Updating particles: Each particle updates its position and velocity according to the inertia factor w, acceleration factors c1 and c2, and the current optimal solutions, where the optimal solutions include the individual best pbest i and the global best gbest i , and the formula for updating the particle velocity v is:
[0113] v i (t + 1)= w·v i (t)+ c1·r1(pbest i - x i )+ c2·r2(gbest i - x i )
[0114] where w is the inertia factor, c1 and c2 are the acceleration factors, r1 and r2 are random numbers, pbest i and gbest i are the individual best solution and the global best solution respectively;
[0115] The formula for the updated particle position is:
[0116] x(t + 1)= x(t)+ v(t + 1)
[0117] Algorithm iteration: In each iteration, the fitness F i of the particles is evaluated according to the objective function and constraint conditions, and at the same time the particles are updated; the update process of the particles includes the update of position and velocity, the update of the individual best solution and the global best solution; if the fitness of the particle is better, then its individual best solution and the global best solution are updated.
[0118] Multi-objective optimization: In each iteration, the algorithm updates the archive, storing non-dominated solutions; the archive saves the particles that are not dominated by other solutions in all objective functions; at the same time, the algorithm selects a leader from the archive to lead the other particles to search; the selection of the leader is based on the distribution of the particles and the performance of the objective function, and the roulette wheel method is used to select the optimal solution;
[0119] Optimal solution selection: During the iteration process, the optimal solution will ultimately be selected based on the objective function; the final optimal solution includes the output of various energy devices and the optimized scheduling plan.
[0120] Furthermore, in step S6, the basis conditions for determining whether there are problems with the solution include:
[0121] Regularly check whether the energy router nodes on the energy path reach the maximum capacity, whether the output of the microgrid under the energy router node reaches the maximum, and whether the load demand of the demand node is met at the current moment. If any of the above situations occur, repeat step S2 to select other energy paths to transfer energy to the demand energy router node until the load demand of the demand energy router node is satisfied; among them, the maximum capacity of the energy router is the maximum value of the energy that can pass through it per unit time, and the capacity of the energy router is:
[0122]
[0123] where S c is the capacity of the energy router; i, o are the i-th input port and the o-th output port under a certain normal operating condition; G i , G o is the set of input and output port numbers under a certain normal operating condition; S ki , S ko is the capacity of the i-th input port and the o-th output port under the normal operating condition k;
[0124] Regularly check whether the energy router under the energy path is normal at the current moment; if a failure occurs in the energy router node on the energy path during the energy routing process, repeat step S2 at this time to re-plan the energy path and complete the microgrid scheduling under each energy router node on the energy path;
[0125] Regularly check whether each module of the microgrid under the energy router node on the energy path is normal at the current moment; if a failure occurs in each module of the microgrid under the energy router node on the energy path during the energy routing process, repeat step S2 at this time to re-plan the energy path and complete the microgrid scheduling under each energy router node on the energy path.
[0126] The present invention also provides a computer storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the foregoing energy routing method based on multi-objective particle swarm.
[0127] The present invention also provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, it implements the above-mentioned energy routing method based on multi-objective particle swarm optimization.
[0128] The beneficial effects of the present invention are as follows:
[0129] By comprehensively considering the interactions among the energy model, energy scheduling strategy, and energy routing optimization, the present invention makes up for the deficiencies of existing methods in considering the impact of the communication network on energy scheduling and energy routing. Existing technologies mostly focus on the operating characteristics of the power system itself, while ignoring the key role of the communication network. The present invention not only considers the requirements of the power system but also incorporates factors such as the DC bus voltage of the power system, the power of the energy router, energy loss, communication delay, and packet loss rate of the communication system into the optimization objectives, enabling more realistic assurance of the stability of power supply according to the information state when performing energy scheduling and routing optimization.
[0130] The present invention uses a multi-objective particle swarm optimization algorithm to optimize the energy routing process. Compared with traditional energy routing methods, it is not limited to a single circuit loss objective and can simultaneously consider multiple optimization objectives, such as DC bus voltage deviation, energy router efficiency, energy loss, communication delay, and packet loss rate. It can adjust the energy scheduling and routing path in real time to ensure that the system can achieve the best balance among different optimization objectives under dynamic operating conditions, improving the robustness and adaptability of the energy Internet.
[0131] Other advantages, objectives, and features of the present invention will be described to some extent in the subsequent specification, and to some extent, they will be obvious to those skilled in the art based on the study of the following text, or can be learned from the practice of the present invention. The objectives and other advantages of the present invention can be achieved and obtained through the following specification. Brief Description of the Drawings
[0132] In order to make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be described in detail preferably with reference to the accompanying drawings, where:
[0133] Figure 1 It is a schematic diagram of the overall process of the energy routing method based on multi-objective particle swarm optimization according to the embodiment of the present invention;
[0134] Figure 2 It is a schematic diagram of the structure of the energy interconnection network model of the energy routing method based on multi-objective particle swarm optimization according to the embodiment of the present invention;
[0135] Figure 3 It is a schematic diagram of the process of the improved multi-objective particle swarm algorithm according to the embodiment of the present invention. Detailed implementation manners
[0136] The following uses specific specific examples to illustrate the implementation manners of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific implementation manners. Various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the diagrams provided in the following embodiments only illustrate the basic concept of the present invention in a schematic manner. Without conflict, the following embodiments and the features in the embodiments can be combined with each other.
[0137] Among them, the attached drawings are only for illustrative purposes, showing only schematic diagrams, not physical diagrams, and should not be construed as a limitation to the present invention; in order to better illustrate the embodiments of the present invention, some components in the attached drawings will be omitted, enlarged or reduced, which does not represent the size of the actual product; for those skilled in the art, it is understandable that some well-known structures and their descriptions in the attached drawings may be omitted.
[0138] In the attached drawings of the embodiments of the present invention, the same or similar reference numerals correspond to the same or similar components; in the description of the present invention, it should be understood that if there are terms such as "upper", "lower", "left", "right", "front", "rear", etc. indicating the orientation or positional relationship, they are based on the orientation or positional relationship shown in the attached drawings. It is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, the terms describing the positional relationship in the attached drawings are only for illustrative purposes and should not be construed as a limitation to the present invention. For those of ordinary skill in the art, the specific meanings of the above terms can be understood according to specific circumstances.
[0139] Please refer to Figures 1 to 3 , which is an energy routing method based on multi-objective particle swarm.
[0140] Embodiment
[0141] This embodiment gives a detailed implementation manner of an energy routing method based on multi-objective particle swarm. As Figure 1 shown, it includes the following steps:
[0142] S1. Establish an energy router model, which includes an energy router power model and an energy router communication model, and interconnect multiple energy router model nodes to establish an energy interconnection network model;
[0143] S2. According to the energy requirements proposed by the energy router nodes in the energy interconnection network model, the dispatching center obtains the real-time parameter information of each energy router node in the energy interconnection network model;
[0144] S3. According to the real-time parameter information of each energy router node, use the improved multi-objective particle swarm optimization algorithm for path selection to obtain the optimal solution of energy path selection;
[0145] S4. According to the obtained optimal solution of energy path selection, use the improved multi-objective particle swarm optimization algorithm for energy scheduling to obtain the optimal solution of energy scheduling;
[0146] S5. The dispatching center sends the obtained optimal solution of energy path selection and the optimal solution of energy scheduling to each energy router node, and each energy router node performs real-time energy routing and energy scheduling according to the received dispatching strategy;
[0147] S6. Judge in real time whether there are problems in the dispatching process. If so, return to step S2 to confirm the dispatching plan again until the requirements are met.
[0148] In step S1 of this embodiment, as Figure 2 shown, the power model of the energy router is mainly used to describe the power flow characteristics in the energy system, involving power demand, energy source, load distribution, etc. Through the power model, the energy flow can be simulated and optimized to ensure that the power can reach the optimal state when transmitted between nodes under dynamic load conditions. The power model includes parameters such as the power input, output, power demand, voltage, and current of the energy router, and provides data support for subsequent optimization decisions.
[0149] The communication model of the energy router describes the characteristics of data transmission in the network, including key factors such as communication delay, packet loss rate, and bandwidth. The communication model can ensure that the energy information is efficient, accurate during transmission, and can transmit the changes in power demand and network status in real time. The communication model provides real-time data streams for the dispatching center, enabling energy scheduling and routing to make decisions based on accurate network conditions.
[0150] According to the constructed power model and communication model, combine the power model with the communication model to form a complete energy router model. This model can comprehensively describe the power and communication characteristics of the energy router and serve as the basis for system operation and optimization.
[0151] According to the constructed single energy router model, establish an energy interconnection network model by interconnecting multiple energy router nodes.
[0152] In step S2 of this embodiment, when no energy router node raises an energy demand, the microgrids under each energy router node perform local real-time energy scheduling. Specifically, the microgrid under an energy router node includes a photovoltaic module, an energy storage module, a power grid module, and a load module. The photovoltaic module performs maximum power tracking through the MPPT algorithm. The energy storage module stabilizes the DC bus voltage through a double closed-loop control of a voltage outer loop and a current inner loop, achieving peak shaving, valley filling, and suppressing the fluctuations of renewable energy. The power grid module includes grid-connected and island modes. When the microgrid is connected to the main power grid, the microgrid control system ensures that the voltage and frequency at the PCC (Point of Common Coupling) are consistent with those of the power grid, and strictly controls the power exchange between the microgrid and the main grid. The inverter adopts constant power or constant current control in the grid-connected mode, sending the excess photovoltaic power into the power grid at a constant power factor, or drawing the required power from the power grid to maintain the local load. When the microgrid is disconnected from the main power grid, the microgrid switches to the island mode to supply power independently. At this time, the inverter and energy storage device inside the microgrid jointly maintain the frequency and voltage of the AC system. The load module directly faces the actual electricity consumption demands on the user side. By detecting and recording the energy consumption levels and time characteristics of different electrical devices, an electricity demand characteristic curve is formed. In the grid-connected operation mode of the microgrid, the load module can flexibly arrange electricity consumption according to the power supply conditions of the main power grid and local distributed power sources; in the island mode, it needs to work in coordination with the energy storage module and the photovoltaic module to balance the instantaneous power output and electricity demand, achieving reliable power supply. At the same time, the load module can cooperate with the energy storage module and the energy dispatch center to execute various demand response strategies, thereby achieving the goals of peak shaving, valley filling, reducing the operating load of the power grid, and reducing the electricity cost of users.
[0153] When an energy router node raises an energy demand, the dispatch center collects the information of the energy router node to formulate an energy path and an energy scheduling strategy. Each energy router node collects information such as the current local microgrid's power load, the network status of the energy router, and communication delay in real time during operation. The collected data is uploaded to the dispatch center through the communication network.
[0154] The energy router node performs data transmission through the AUTBUS bus protocol. The AUTBUS bus protocol is based on IPv6 unified addressing and has the advantages of high bandwidth, low latency, long distance, multi-node, flexible and reliable networking, etc., and can achieve full IPization, cross-domain interconnection, and data sharing. At the same time, through precise clock synchronization and dynamic scheduling, microsecond-level deterministic data transmission is achieved, ensuring the low latency and high reliability of key data such as real-time scheduling instructions, fault alarms, and status feedback. In addition, AUTBUS also integrates a congestion detection, error checking, and retransmission mechanism, which can automatically adjust the data stream transmission path and bandwidth allocation in case of network congestion or node failure, thereby providing a real-time and accurate data stream for the dispatch center, enabling energy scheduling and energy routing to make decisions based on the precise network conditions.
[0155] In step S3 of this embodiment, the dispatching center determines the required energy router nodes at the current moment according to the real-time power load, network status and other information uploaded from each energy router node, determines the source node and the energy path according to the data, and schedules the microgrid output of each energy router node on the energy path. Among them, an improved multi-objective particle swarm optimization algorithm is used for energy routing, as Figure 3 shown, and the specific steps are as follows:
[0156] S31. Perform data collection, define the influence factor of neighborhood nodes, and establish a search tree in combination with the priority of demand nodes;
[0157] S32. Establish a path cumulative influence factor and a path conflict detection mechanism for energy path planning;
[0158] S33. Initialize the particle swarm, and set the constraint conditions and the penalty factors corresponding to the constraint conditions;
[0159] S34. Calculate the objective function, return the fitness value of the particle, and perform iterative update according to the fitness value to obtain the optimal solution of the energy path.
[0160] In step S31, the dispatching center collects the basic data of each microgrid and energy router node in the whole system, providing input for subsequent path search and optimization.
[0161] Specifically, the information of the microgrid, the required energy router node, and the energy router nodes in the neighborhood of the demand node are collected respectively. For the microgrid under the energy router, the power generation data, energy storage status, interface data with the power grid, and load demand of each microgrid are collected. For the energy router, the communication metrics of each energy router node, such as delay, packet loss rate, etc., are obtained. At the same time, neighborhood node information is collected. For each node, information such as the physical distance, load level, and communication quality of other nodes in the neighborhood is collected in a hierarchical manner of "0-hop, 1-hop, 2-hop...".
[0162] To measure the comprehensive influence of a certain neighborhood node, the formula for the influence factor of the neighborhood node is defined as:
[0163]
[0164] Among them, is the influence factor of the i-th neighborhood node; d i is the distance between the current node and the neighborhood node i; Q comm,i is the communication quality index of the neighborhood node i; is the current load level of the neighborhood node i; λ1, λ2, and λ3 are the weights corresponding to each index, used to balance their influences.
[0165] Determine the demand node: The dispatching center determines the demand node at the current moment according to the uploaded information.
[0166] Specifically, if there is only one demand node in the system, the energy path is directly planned starting from this node.
[0167] Specifically, if there are multiple demand nodes in the system, a priority index needs to be calculated for each demand node to determine who gets the optimal path first when resources are scarce. Energy router node priority formula:
[0168]
[0169] where E i is the priority of demand node i. P demand,i is the energy demand of node i; P max is the maximum possible energy demand in the system; T response,i is the historical response delay of node i; T max is the maximum tolerance of the response delay; w1, w2 are weight coefficients to adjust the influence of the demand quantity and response delay on the priority.
[0170] For each demand node, a search tree is constructed with it as the root node. The expansion of the search tree follows the "layered" principle: each layer represents one hop (0 hop, 1 hop, 2 hops...). In each layer, starting from the current node, the top two nodes with higher scores are selected from the candidate nodes in the neighborhood that meet the constraints (such as communication delay, node capacity, etc.) for branch expansion.
[0171] In step S32, plan the energy path: Extract the complete energy path from the demand node to the source node from the search tree and calculate the path cumulative impact factor. Path cumulative impact factor formula:
[0172]
[0173] Path conflict detection: When there are common intermediate nodes in the candidate paths constructed by multiple demand nodes, it is considered that a path conflict has occurred, which may lead to repeated use of resources. For conflicting paths, the path of the demand node with a higher priority is preferentially retained; for the demand node with a lower priority, if its candidate path overlaps with the already allocated path, it needs to be re-planned.
[0174] If there is reuse between the candidate path and the already allocated path, a penalty is added to the objective function. Penalty formula:
[0175]
[0176] where F routis the original comprehensive objective function, which integrates multiple indicators such as DC bus voltage deviation, energy router power deviation, transmission loss, communication delay, packet loss rate, and the cumulative impact factors of each node in the path; P path represents the set of all nodes included in the current candidate path. This path is the set of intermediate nodes passed from the demand node to the energy supply source. P allocated represents the set of nodes used in the paths that have been allocated to other demand nodes (usually demand nodes with higher priorities); k is a conflict penalty coefficient used to adjust the penalty intensity brought by conflicts.
[0177] In step S33, initialize the particle swarm: Initialize the population, initialize the position and velocity of each particle, and limit the upper and lower bounds. Each particle represents an energy routing scheme, and its position x includes the output of the energy path.
[0178] Constraint handling: Each particle will be evaluated for fitness to ensure that it meets the constraint conditions.
[0179] Constraint conditions: Check the constraint conditions of the current particle, including DC bus voltage deviation, power volatility, energy transmission loss, transmission delay, packet loss rate. If the constraint is not met, apply a penalty factor.
[0180] Specifically, the constraint formula for DC bus voltage deviation is:
[0181]
[0182] where: V dc is the actually measured DC bus voltage; is the reference DC bus voltage; is the maximum allowable relative voltage deviation.
[0183] For particles that do not meet the DC bus voltage deviation constraint conditions, set the penalty factor The formula is:
[0184]
[0185] where, is the voltage deviation penalty coefficient, κ dc is used to adjust the penalty intensity. If then the solution is considered infeasible, mark the variable c as 1, otherwise mark it as 0.
[0186] Specifically, the constraint formula for power volatility is:
[0187]
[0188] where, P ERis the actual output power of the energy router; P rated is the rated power of the device; ΔP max is the maximum allowable relative power deviation.
[0189] For particles that do not meet the power fluctuation constraint conditions, set the penalty factor The formula is:
[0190]
[0191] where κ P is the penalty coefficient for the power fluctuation constraint. If ΔP max > 60%, it is considered that the solution is infeasible, and the variable c is marked as 1, otherwise it is marked as 0.
[0192] Specifically, the constraint formula for energy transmission loss is:
[0193]
[0194] where R ij is the line resistance; is the voltage between nodes; P ab is the transmission power between the source node and the demand node; P ij is the transmission power between nodes on the transmission path;
[0195] For particles that do not meet the energy transmission loss constraint conditions, set the penalty factor The formula is:
[0196]
[0197] where κ loss is the penalty coefficient for the energy transmission loss constraint. If it is considered that the solution is infeasible, and the variable c is marked as 1, otherwise it is marked as 0.
[0198] Specifically, the constraint formula for communication delay is:
[0199]
[0200] where T delay is the actual communication delay, T max is the maximum allowable communication delay.
[0201] For particles that do not meet the communication delay constraint conditions, set the penalty factor The formula is:
[0202]
[0203] where κ delayis the penalty coefficient for communication delay constraints. If the solution is considered infeasible, mark the variable c as 1; otherwise, mark it as 0.
[0204] Specifically, the constraint formula for the packet loss rate is:
[0205]
[0206] where R packet is the actual packet loss rate, and R max is the maximum allowable packet loss rate.
[0207] For particles that do not meet the packet loss rate constraint conditions, set the penalty factor The formula is:
[0208]
[0209] where κ packet is the penalty coefficient for the packet loss rate constraint. If the solution is considered infeasible, mark the variable c as 1; otherwise, mark it as 0.
[0210] In step S34, after satisfying the constraint conditions, calculate the objective function and return the fitness value of the particle.
[0211] Among them, the calculation formula of the objective function is:
[0212]
[0213] where f V , f P , f loss , f delay , f packet respectively represent different objective functions of the power system, specifically: DC bus voltage deviation, power volatility, energy transmission loss, transmission delay, packet loss rate.
[0214] Fitness update: In each iteration, the particle swarm is updated according to the position x, and the fitness is calculated. Integrate each objective function and the penalty factor in a weighted sum manner. The penalty function Π k The formula is:
[0215]
[0216] Fitness The formula is:
[0217]
[0218] Update the particle: The update formula for the particle velocity v is:
[0219]
[0220] Among them, The velocity of particle k at the t-th iteration. w is the inertia factor, controlling the retention ratio of the previous velocity; c1 and c2 are the cognitive and social acceleration constants respectively, determining the dependence degree of the particle on the individual historical optimum and the global optimum; r1 and r2 are random numbers uniformly distributed between [0, 1]; is the optimal position in the history of particle k. g best is the global optimal position in the entire population.
[0221] The formula for the updated particle position is:
[0222]
[0223] Algorithm iteration: At each iteration, the fitness of the particle will be evaluated according to the objective function and constraint conditions, and at the same time the particle is updated. The update process of the particle includes the update of position and velocity, the update of individual optimal solution and group optimal solution. If the fitness of the particle is better, its individual optimal solution and group optimal solution are updated.
[0224] Multi-objective optimization: At each iteration, the algorithm updates the archive, storing non-dominated solutions. The archive saves the particles that are not dominated by other solutions in all objective functions. At the same time, the algorithm selects a leader from the archive to lead other particles to search. The selection of the leader is based on the distribution of the particles and the performance of the objective function, and the roulette wheel method is used to select the optimal solution.
[0225] Optimal solution selection: During the iteration process, the optimal energy path solution will finally be selected according to the objective function.
[0226] In step S4 of this embodiment, after determining the energy path, energy scheduling is performed for the microgrid under the corresponding energy router node.
[0227] Specifically, an improved multi-objective particle swarm optimization algorithm is used for energy scheduling, and the specific steps are as follows:
[0228] S41. Input the power parameters related to the microgrid under the corresponding energy router node of the energy path;
[0229] S42. Initialize the particle swarm, and establish constraint conditions and the corresponding penalty factors for the constraint conditions;
[0230] S43. Calculate the objective function, return the fitness value of the particle, and perform iterative update according to the fitness value to obtain the optimal energy scheduling solution.
[0231] In step S41, obtain the power parameters (photovoltaic, energy storage, power grid, load) related to the microgrid under the corresponding energy router node in the energy path, and load the data of each microgrid module. These data will be passed as global variables to the subsequent algorithms for processing.
[0232] In step S42, initialize the particle swarm: Initialize the population, initialize the position and velocity of each particle, and limit the upper and lower bounds. Each particle represents an energy scheduling scheme, and its position x includes the outputs of energy sources (wind power, photovoltaic, energy storage, power grid, load).
[0233] Constraint handling: Each particle will be evaluated for fitness to ensure that it meets the constraint conditions.
[0234] Constraint conditions: Check the constraint conditions of the current particle, including DC bus voltage deviation, power change, energy storage SOC, power balance, and influence of neighboring nodes. If the constraints are not met, apply a penalty factor.
[0235] Specifically, the constraint formula for the DC bus voltage deviation is:
[0236]
[0237] Where: V dc (t) is the actual DC bus voltage calculated at time t; is the reference DC bus voltage; V dc_limit is the maximum allowable relative voltage deviation.
[0238] For particles that do not meet the DC bus voltage deviation constraint conditions, set the penalty factor φ dc , and the formula is:
[0239]
[0240] λ dc is the voltage deviation penalty coefficient used to adjust the penalty intensity; T is the total duration of the scheduling period. If V dc_limit > 10%, then the solution is considered infeasible, and the variable c is marked as 1, otherwise marked as 0.
[0241] Specifically, the constraint formula for the power change is:
[0242]
[0243] Where, P i (t) is the output power of device i at time t; P i (t - 1) is the output power of device i at the previous time t - 1; The maximum power change allowed for device i, i.e., the maximum output change allowed per unit time; S represents all power supply units.
[0244] For particles that do not satisfy the power change constraint conditions, set the penalty factor φ ramp , and the formula is:
[0245]
[0246] where: λ ramp is the penalty coefficient for the power change constraint. If then the solution is considered infeasible, and the variable c is marked as 1; otherwise, it is marked as 0.
[0247] Specifically, the constraint formula for energy storage balance is:
[0248]
[0249] where: SOC t is the SOC state of the energy storage at time t. P ch,t is the charging power at time t; P dis,t is the discharging power at time t; η c is the charging efficiency, and η d is the discharging efficiency. SOC min and SOC max represent the minimum and maximum values of SOC, respectively.
[0250] Define the part by which SOC exceeds. The formula for the excess part is:
[0251]
[0252] where, SOC viol,t is the part by which SOC exceeds, and SOC sum_delt is the sum of the excess parts for all time steps.
[0253] For particles that do not satisfy the energy storage constraint conditions, set the penalty factor φ soc , and the formula is:
[0254]
[0255] If SOC sum_delt > 500, then the solution is considered infeasible, and the variable c is marked as 1; otherwise, it is marked as 0.
[0256] Specifically, the constraint formula for power balance is:
[0257]
[0258] For each time period i (from 1 to 24), calculate the difference between the sum of the outputs of all energy devices n and the load P load (i).
[0259] For particles that do not satisfy the power balance constraint condition, set the penalty factor φ ele , and the formula is:
[0260]
[0261] If ele_sum > 4000, then the solution is considered infeasible, and the variable c is marked as 1; otherwise, it is marked as 0.
[0262] Specifically, the constraint formula for the influence of neighboring nodes is:
[0263]
[0264] where: d ij represents the distance between node i and neighboring node j; Q comm,ij represents the communication quality index between two nodes; Load j represents the current load level of neighboring node j; λ1, λ2, λ3 are the weight coefficients of each item; N i represents the set of all nodes adjacent to node i.
[0265] For particles that do not satisfy the constraint condition of the influence of neighboring nodes, set the penalty factor φ path , and the formula is:
[0266] φ path = γ φ · (φ i - φ max ) 2
[0267] where γ φ is the penalty coefficient for the influence of neighboring nodes; if φ i > φ max , then the solution is considered infeasible, and the variable c is marked as 1; otherwise, it is marked as 0.
[0268] In step S43, after satisfying the constraint conditions, calculate the objective function and return the fitness value of the particle.
[0269] where the calculation formula of the objective function is:
[0270]
[0271] where f1, f2, f3 respectively represent different objective functions of the power system, specifically: DC bus voltage deviation, energy transmission loss, and power fluctuation index.
[0272] Fitness Update: In each iteration, the particle swarm is updated according to the position x, and the fitness is calculated. The objective functions and penalty factors are integrated in the form of a weighted sum. The penalty function Π i has the formula:
[0273] Π i = w dc φ dc + w ramp φ ramp + w soc φ soc + w ele φ ele + w path φ path
[0274] The fitness F i has the formula:
[0275] F i = w1f1 + w2f2 + w3f3 + Π i
[0276] Updating Particles: Each particle updates its position and velocity according to the inertia factor w, acceleration factors c1 and c2, and the current optimal solutions (personal best pbest i and global best gbest i ). Among them, the formula for updating the particle velocity v is:
[0277] v i (t + 1) = w·v i (t) + c1·r1(pbest i - x i ) + c2·r2(gbest i - x i )
[0278] where w is the inertia factor, c1 and c2 are the acceleration factors, r1 and r2 are random numbers, pbest i and gbest i are the personal best solution and the global best solution respectively.
[0279] The formula for the updated particle position is:
[0280] x(t + 1) = x(t) + v(t + 1)
[0281] Algorithm Iteration: In each iteration, the fitness F i of the particles is evaluated according to the objective functions and constraints, and at the same time the particles are updated. The update process of the particles includes the update of position and velocity, and the update of personal best solution and global best solution. If the fitness of the particle is better, its personal best solution and global best solution are updated.
[0282] Multi-objective optimization: In each iteration, the algorithm updates the archive to store non-dominated solutions. The archive saves the particles that are not dominated by other solutions in all objective functions. Meanwhile, the algorithm selects a leader from the archive to lead other particles in the search. The selection of the leader is based on the distribution of the particles and the performance of the objective functions, and the roulette wheel method is used to select the optimal solution.
[0283] Optimal solution selection: During the iteration process, the optimal solution will ultimately be selected according to the objective function. The final optimal solution includes the output of various energy devices and the optimized scheduling scheme.
[0284] In step S5 of this embodiment, the dispatching center generates a complete energy path selection and energy scheduling decision based on the multi-objective optimization result. The dispatching center issues these strategies to each energy router node to ensure that the entire system can perform energy transmission according to the optimal energy routing path.
[0285] The energy router receives the strategies formulated by the dispatching center and decides to perform real-time energy routing and energy scheduling on the energy router nodes on the selected energy path.
[0286] In step S6 of this embodiment, it is regularly checked whether the energy router nodes on the energy path reach the maximum capacity at the current moment, whether the output of the microgrid under the energy router node reaches the maximum, and whether the load demand of the demand node is satisfied. If any of the above situations occurs, step S2 is repeatedly executed to select other energy paths to transfer energy to the demand energy router node until the load demand of the demand energy router node is satisfied.
[0287] Specifically, the maximum capacity of the energy router is the maximum value of the energy that can pass through it per unit time. The formula for the capacity of the energy router is:
[0288]
[0289] where S c is the capacity of the energy router, with the unit of volt-ampere (V·A); i, o are the i-th input port and the o-th output port under a certain normal operating condition; G i , G o are the sets of input and output port numbers under a certain normal operating condition; S ki , S ko are the capacities of the i-th input port and the o-th output port under the normal operating condition k, with the unit of volt-ampere (V·A).
[0290] Regularly check whether the energy router under the energy path is normal at the current moment. If a fault occurs in the energy router node on the energy path during the energy routing process, repeat step S2 at this time to re-plan the energy path and complete the microgrid scheduling under each energy router node on the energy path.
[0291] Regularly check whether each module of the microgrid under the energy router node under the energy path is normal at the current moment. If a fault occurs in each module of the microgrid under the energy router node on the energy path during the energy routing process, repeat step S2 at this time to re-plan the energy path and complete the microgrid scheduling under each energy router node on the energy path.
[0292] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the purpose and scope of the present technical solution, and they should all be covered within the scope of the claims of the present invention.
Claims
1. An energy routing method based on multi-objective particle swarm, characterized in that: The method includes the following steps: S1. Establish an energy router model, which includes an energy router power model and an energy router communication model, and interconnect multiple energy router model nodes to establish an energy interconnection network model; S2. According to the energy demands proposed by the energy router nodes in the energy interconnection network model, the dispatching center obtains the real-time parameter information of each energy router node in the energy interconnection network model; S3. According to the real-time parameter information of each energy router node, use an improved multi-objective particle swarm optimization algorithm for path selection to obtain the optimal solution of energy path selection; S4. According to the obtained optimal solution of energy path selection, use an improved multi-objective particle swarm optimization algorithm for energy dispatching to obtain the optimal solution of energy dispatching; S5. The dispatching center sends the obtained optimal solution of energy path selection and the optimal solution of energy dispatching to each energy router node, and each energy router node performs real-time energy routing and energy dispatching according to the received dispatching strategy; S6. Judge in real time whether there are problems in the dispatching process. If so, return to step S2 to confirm the dispatching plan again until the requirements are met.
2. The energy routing method based on multi-objective particle swarm according to claim 1, characterized in that: In step S3, the process of using the improved multi-objective particle swarm optimization algorithm for energy routing includes: S31. Perform data collection, define the influence factor of neighboring nodes, and establish a search tree in combination with the priority of demand nodes; S32. Establish a path cumulative influence factor and a path conflict detection mechanism for energy path planning; S33. Initialize the particle swarm, and set the constraint conditions and the penalty factors corresponding to the constraint conditions; S34. Calculate the objective function, return the fitness value of the particle, and perform iterative update according to the fitness value to obtain the optimal solution of the energy path.
3. The energy routing method based on multi-objective particle swarm according to claim 2, characterized in that: In step S31, it includes: for the microgrids under the energy router, collect the power generation data, energy storage status, interface data with the power grid, and load demand of each microgrid; for the energy router, obtain the communication metrics of each energy router node; perform neighboring node information collection. For each node, collect the physical distance, load level, and communication quality of other nodes in the neighborhood in a hierarchical manner, and define the influence factor of neighboring nodes: Among them, is the influence factor of the i-th neighborhood node; d i is the distance between the current node and the neighborhood node i; Q comm,i is the communication quality index of the neighborhood node i; the current load level of the neighborhood node i; λ1, λ2, λ3 are the weights corresponding to each index, used to balance their influences; If there is only one demand node in the system, directly plan the energy path starting from this node; if there are multiple demand nodes in the system, establish the priority of the demand energy router nodes. The priority of the energy router nodes is expressed as: Among them, E i is the priority of demand node i, P demand,i is the energy demand of node i; P max is the maximum possible energy demand in the system; T response,i is the historical response delay of node i; T max is the maximum tolerance value of the response delay; w1 and w2 are weight coefficients to adjust the influence of the demand quantity and the response delay on the priority; For each demand node, construct a search tree with it as the root node. The expansion of the search tree follows the hierarchical principle: each layer represents one hop. In each layer, starting from the current node, select the top two nodes with higher scores from the candidate nodes that meet the constraints in the neighborhood for branch expansion.
4. A multi-objective particle swarm-based energy routing method according to claim 3, characterized in that: In step S32, extract the complete energy path from the demand node to the source node from the search tree, and calculate the path cumulative influence factor; The path cumulative influence factor is expressed as: The path conflict detection mechanism is as follows: when there are common intermediate nodes in the candidate paths constructed by multiple demand nodes, it is considered that a path conflict has occurred; for conflict paths, the path of the demand node with a higher priority is preferentially retained; for the demand node with a lower priority, if its candidate path overlaps with the already allocated path, it is re-planned; If there is reuse between the candidate path and the already allocated path, a penalty formula is added to the objective function: Among them, F rout is the original comprehensive objective function, which includes the DC bus voltage deviation, the power deviation of the energy router, the transmission loss, the communication delay, the packet loss rate, and the cumulative impact factors of each node in the path; P path represents the set of all nodes included in the current candidate path; P allocated represents the set of nodes used in the paths that have been assigned to other demand nodes; k is a conflict penalty coefficient used to adjust the penalty intensity brought by conflicts.
5. The energy routing method based on multi-objective particle swarm according to claim 4, characterized in that: In step S33, initialize the particle swarm: initialize the population, initialize the position and velocity of each particle, and limit the upper and lower bounds. Each particle represents an energy routing scheme, and its position x includes the output of the energy path; Evaluate the fitness of each particle to ensure that it meets the constraint conditions, which include: DC bus voltage deviation, power volatility, energy transmission loss, transmission delay, packet loss rate constraint; if the constraints are not met, apply a penalty factor; The constraint formula for the DC bus voltage deviation is: Where: V dc is the actually measured DC bus voltage; is the reference DC bus voltage; is the maximum allowable relative voltage deviation; for particles that do not meet the DC bus voltage deviation constraint condition, a penalty factor is set: Among them, is the voltage deviation penalty coefficient, κ dc used to adjust the penalty intensity; The constraint formula for power volatility is: Among them, P ER is the actual output power of the energy router; P rated is the rated power of the device; ΔP max is the maximum allowable relative power deviation; for particles that do not meet the power fluctuation constraint conditions, a penalty factor is set as follows: Among them, κ P is the penalty coefficient for the power fluctuation constraint; The constraint formula for energy transmission loss is: Among them, R ij is the line resistance; is the voltage between nodes; P ab is the transmission power between the source node and the demand node; P ij is the transmission power between nodes on the transmission path; for particles that do not meet the energy transmission loss constraint conditions, a penalty factor is set as follows: Among them, κ loss is the penalty coefficient for the energy transmission loss constraint; The constraint formula for communication delay is: Among them, T delay is the actual communication delay, and T max is the maximum allowable communication delay; for particles that do not meet the communication delay constraint conditions, a penalty factor is set as follows: where κ delay is the penalty coefficient for communication delay constraints; The constraint formula for packet loss rate is: where R packet is the actual packet loss rate, and R max is the maximum allowable packet loss rate; for particles that do not meet the packet loss rate constraint condition, a penalty factor is set as follows: Among them, κ packet is the penalty coefficient for the packet loss rate constraint.
6. The energy routing method based on multi-objective particle swarm according to claim 5, characterized in that: In step S34, after meeting the constraint conditions, calculate the objective function and return the fitness value of the particle. Among them, the calculation formula of the objective function is: Among them, f V , f P , f loss , f delay , f packet respectively represent the objective functions of the DC bus voltage deviation, power volatility, energy transmission loss, transmission delay, and packet loss rate of the power system; Fitness update: In each iteration, the particle swarm is updated according to the position x, and the fitness is calculated. Among them, each objective function and the penalty factor are integrated in the form of a weighted sum, and the penalty function Π k has the following formula: Fitness The formula is as follows: Update the particle: The update formula for the velocity v of the particle is: Among them, The velocity of particle k at the t-th iteration, where w is the inertia factor that controls the proportion of the previous velocity to be retained; c1 and c2 are the cognitive and social acceleration constants respectively, which determine the degree of dependence of the particle on its individual historical best and the global best; r1 and r2 are random numbers uniformly distributed between [0, 1]. is the best position in the history of particle k, and g best is the global best position in the entire population; The formula for the updated particle position is: Algorithm iteration: At each iteration, the fitness of the particle is evaluated according to the objective function and constraint conditions. Meanwhile, the particle is updated. The update process of the particle includes the update of position and velocity, as well as the update of the individual best solution and the global best solution. If the fitness of the particle is better, its individual best solution and the global best solution are updated. Multi-objective optimization: In each iteration, the algorithm updates the archive library to store non-dominated solutions. The archive library saves the particles that are not dominated by other solutions in all objective functions; at the same time, the algorithm selects a leader from the archive library to lead other particles to search. The selection of the leader is based on the distribution of the particles and the performance of the objective function, and the roulette method is used to select the optimal solution; Optimal solution selection: During the iteration process, the optimal energy path solution will ultimately be selected according to the objective function.
7. A multi-objective particle swarm-based energy routing method according to claim 1, characterized in that: In step S4, the process of selecting an improved multi-objective particle swarm optimization algorithm for energy routing according to the determined energy path includes: S41. Input the power parameters related to the microgrid under the energy router node corresponding to the energy path; S42. Initialize the particle swarm, and establish constraint conditions and the corresponding penalty factors for the constraint conditions; S43. Calculate the objective function, return the fitness value of the particle, and perform iterative updates according to the fitness value to obtain the optimal energy scheduling solution.
8. A method for energy routing based on multi-objective particle swarm according to claim 7, characterized in that: In step S41, obtain the power parameters related to the microgrid under the energy router node corresponding to the energy path. The power parameters include photovoltaic, energy storage, power grid, and load, and load the data of each microgrid module; In step S42, initialize the particle swarm: initialize the population, initialize the position and velocity of each particle, and limit the upper and lower bounds; each particle represents an energy scheduling scheme, and its position x includes the output of the energy; Each particle will perform a fitness evaluation to ensure that it meets the constraint conditions, which include DC bus voltage deviation, power change, energy storage SOC, power balance, and neighborhood node influence constraints; if the constraints are not met, apply a penalty factor; The constraint formula for the DC bus voltage deviation is: Where: V dc (t) is the actual DC bus voltage calculated at time t; is the reference DC bus voltage; V dc_limit is the maximum allowable relative voltage deviation; for particles that do not meet the DC bus voltage deviation constraint condition, a penalty factor φ is set dc : λ dc is the voltage deviation penalty coefficient, which is used to adjust the penalty intensity; T is the total duration of the scheduling period; The constraint formula for power change is: Among them, P i (t) is the output power of device i at time t; P i (t - 1) is the output power of device i at the previous time t - 1; ΔP i max is the maximum power change allowed for device i, that is, the maximum output change amount allowed per unit time; S represents all power supply units; for particles that do not meet the power change constraint conditions, a penalty factor φ ramp is set as follows: where: λ ramp is the penalty coefficient of the power change constraint; The constraint formula for energy storage balance is: Where: SOC t is the energy storage SOC state at time t; P ch,t is the charging power at time t; P dis,t is the discharging power at time t; η c is the charging efficiency, η d is the discharging efficiency, SOC min and SOC max represent the minimum and maximum values of SOC, respectively; Define the part exceeding the SOC. The formula for the exceeding part is: Among them, SOC viol,t is the part exceeding the SOC, and SOC sum_delt is the total sum of the exceeding parts at all time steps; for particles that do not meet the energy storage constraint conditions, a penalty factor φ soc is set; The constraint formula for power balance is: For each time period i (from 1 to 24), calculate the difference between the sum of the outputs of all energy devices n and the load P load (i); for particles that do not satisfy the power balance constraint condition, set the penalty factor φ ele ; The constraint formula for the influence of neighboring nodes is: Where: d ij represents the distance between node i and neighboring node j; Q comm,ij represents the communication quality index between two nodes; Load j represents the current load level of neighboring node j; λ1, λ2, λ3 are the weight coefficients of each item; N i represents the set of all nodes adjacent to node i; for particles that do not meet the influence constraint conditions of neighboring nodes, set the penalty factor φ path : φ path = γ φ · (φ i - φ max ) 2 Among them, γ φ is the influence penalty coefficient of neighboring nodes; In step S43, after satisfying the constraint conditions, calculate the objective function and return the fitness value of the particle; among them, the calculation formula for the objective function is: Among them, f1, f2, and f3 respectively represent the DC bus voltage deviation of the power system, the energy transmission loss, and the objective function of the power fluctuation index; Fitness update: In each iteration, the particle swarm is updated according to the position x, the fitness is calculated, and each objective function and penalty factor are integrated in the form of a weighted sum; the penalty function Π i has the following formula: Π i = w dc φ dc + w ramp φ ramp + w soc φ soc + w ele φ ele + w path φ path Fitness F i The formula is as follows: F i = w1f1 + w2f2 + w3f3 + ∏ i Updated Particle: Each particle updates its position and velocity according to the inertia factor w, acceleration factors c1 and c2, and the current optimal solutions, where the optimal solutions include the personal best pbest i and the global best gbest of the swarm i , where the velocity update formula for the particle is: v i (t + 1)= w·v i (t)+ c1·r1(pbest i - x i )+ c2·r2(gbest i - x i ) where, w is the inertia factor, c1 and c2 are acceleration factors, r1 and r2 are random numbers, pbest i and gbest i are the individual best solution and the global best solution respectively; The formula for the updated particle position is: x(t + 1) = x(t) + v(t + 1) Algorithm iteration: In each iteration, the fitness F of the particle i is evaluated according to the objective function and constraint conditions, and at the same time the particle is updated; the update process of the particle includes the update of position and velocity, the update of the individual best solution and the global best solution; if the fitness of the particle is better, then its individual best solution and the global best solution are updated; Multi-objective optimization: In each iteration, the algorithm updates the archive and stores the non-dominated solutions; the archive stores the particles that are not dominated by other solutions in all objective functions; at the same time, the algorithm selects a leader from the archive to lead other particles to search; the selection of the leader is based on the distribution of the particles and the performance of the objective function, and the roulette method is used to select the optimal solution; Optimal solution selection: During the iteration process, the optimal solution will ultimately be selected according to the objective function; the final optimal solution includes the output of various energy devices and the optimized scheduling plan.
9. A multi-objective particle swarm-based energy routing method according to claim 1, characterized in that: In step S6, the basis conditions for judging whether there are problems with the plan include: Regularly check whether the energy router nodes on the energy path reach the maximum capacity, whether the output of the microgrid under the energy router nodes reaches the maximum, and whether the load demand of the demand nodes is met at the current moment. If any of the above situations occurs, repeat step S2 to select other energy paths to transfer energy to the demand energy router nodes until the load demand of the demand energy router nodes is met; among them, the maximum capacity of the energy router is the maximum value of the energy that can pass through per unit time, and the capacity of the energy router is: Among them, S c is the capacity of the energy router; i and o are the i-th input port and the o-th output port under a certain normal operating condition; G i , G o are the sets of input and output port numbers under a certain normal operating condition; S ki , S ko are the capacities of the i-th input port and the o-th output port under the normal operating condition k; Regularly check whether the energy router under the energy path is normal at the current moment; if a fault occurs in the energy router nodes on the energy path during the energy routing process, repeat step S2 at this time to re-plan the energy path and complete the microgrid scheduling under each energy router node on the energy path; Regularly check whether each module of the microgrid under the energy router nodes on the energy path is normal at the current moment; if a fault occurs in each module of the microgrid under the energy router nodes on the energy path during the energy routing process, repeat step S2 at this time to re-plan the energy path and complete the microgrid scheduling under each energy router node on the energy path.
10. A computer storage medium, on which a computer program is stored, characterized in that: When the computer program is executed by a processor, it implements an energy routing method based on multi-objective particle swarm as described in any one of the preceding claims 1-9.