A highway integrated energy system optimization method, device, equipment and medium
The particle swarm algorithm and exploratory cuckoo search algorithm are used to optimize wind and solar power generation and electricity load data, solving the problem of high energy consumption in the highway system, achieving energy dispatch with the lowest total cost, and reducing power purchase costs and environmental protection costs. .
Patent Information
- Application Number
- CN202311324772.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-12
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2043-10-12
AI Technical Summary
Tunnel sections in the expressway system account for a high proportion of energy consumption, and it is difficult to effectively utilize wind and solar power generation and energy storage equipment with existing technology to achieve the lowest total cost energy dispatch solution.
The particle swarm algorithm is used to optimize the random forest model to predict wind and solar power generation data and electricity load data, and the exploratory cuckoo search algorithm is combined to build a single-objective optimization dispatch model to optimize the energy dispatch plan to achieve energy dispatch with the lowest economic cost.
It realizes the effective connection between wind and photovoltaic power generation and energy storage equipment and the load end of the highway system, provides an hourly power purchase plan, reduces energy costs, improves power utilization, and reduces environmental protection costs.
Smart Images

Figure CN117669908B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of highway energy management, and in particular to a method, device, equipment and medium for optimizing a highway integrated energy system. Background Art
[0002] The overall energy consumption of road traffic is huge, especially the large number of transportation vehicles that rely on fuel, which has led to an increase in the amount of oil consumed year by year, which has affected energy security. In the construction of integrated highway planning. Generally, the highway network is built based on natural factors, and can make full use of renewable energy such as wind power and photovoltaics for energy supply, thereby reducing the carbon emission pressure caused by fossil fuels. In order to efficiently utilize renewable clean energy, the optimization of the integrated energy system centered on highways has become a core issue.
[0003] At present, there are few studies on the overall application of highways combined with integrated energy systems. In fact, the energy consumption of equipment along the highway system is huge, especially for tunnel sections of highways, where lighting and other energy consumption account for a high proportion. How to connect the wind and solar power generation and energy storage equipment and load end of the highway, and obtain the energy scheduling solution with the lowest total cost by predicting wind and solar power generation data and power load data combined with single-objective optimization is the technical problem to be solved in this application. Summary of the invention
[0004] The purpose of the present invention is to obtain an energy scheduling solution with the lowest total cost by predicting wind and solar power generation data and electricity load data in combination with single-objective optimization. In view of this, the present invention provides a method, device, equipment and medium for optimizing a comprehensive energy system for a highway.
[0005] In a first aspect, the technical solution of the present invention provides a method for optimizing a highway integrated energy system, comprising the following steps:
[0006] The highway integrated energy system is divided into energy measurement, conversion and transmission lines, and load side, and models of each part of the highway integrated energy system are established;
[0007] Based on the established energy measurement model and load side model, the wind and solar power generation-load forecasting model is established by optimizing the random forest model through the particle swarm algorithm. Based on the established forecasting model, the future wind and solar power generation power forecast data and future electric load data are obtained;
[0008] Taking economic cost as the objective function, the electric energy storage of the battery in each period of a cycle is used as the decision variable, and the predicted future wind and solar power generation data and future electric load data are used as variables to build a single-objective optimization scheduling model;
[0009] The energy scheduling plan with the lowest total cost is obtained by using an exploratory cuckoo search algorithm combined with the set constraints.
[0010] As a further limitation of the technical solution of the present invention, the steps of dividing the highway integrated energy system into energy measurement, conversion and transmission lines and load side, and establishing models of each part of the highway integrated energy system include:
[0011] The integrated highway energy system is divided into energy measurement, conversion and transmission lines, and load side;
[0012] Establish energy side models, including photovoltaic power generation models and wind power generation models;
[0013] Establishing the conversion and transmission line model, i.e., the electric energy storage device model;
[0014] Build the load side model.
[0015] As a further limitation of the technical solution of the present invention, the photovoltaic power generation system model:
[0016] P PV,t Indicates the actual output power of the photovoltaic cell; P PVstc It indicates the output power of photovoltaic cells under standard test conditions; L indicates the actual solar radiation intensity, L stc Indicates the solar radiation illuminance under standard conditions; T, T stc represent the ambient temperature under actual conditions and standard conditions respectively, γ represents the temperature attenuation coefficient of the photovoltaic cell;
[0017] Wind power generation model:
[0018] P wind is the wind power output power; ρ is the air density corresponding to the region; K is the performance parameter of the wind power generation equipment; S is the area swept by the wind turbine blades; v is the wind speed;
[0019] Load side model P load =P light +P fire +P moni +P else
[0020]
[0021] Where P load , P light , P fire , P moni , P elseThey represent the total load, lighting load, fire load, monitoring equipment load and other forms of loads, among which the lighting load needs to be calculated based on the number of lighting equipment N and the power of the lighting point light source P sin Calculate the power of a single lighting device and then perform additional calculations. Other types of electrical loads are calculated according to the power of normal electrical equipment.
[0022] As a further limitation of the technical solution of the present invention, based on the established energy measurement model and load side model, a wind-solar power generation-load forecasting model is established by optimizing a random forest model through a particle swarm algorithm, and the steps of obtaining future wind-solar power generation power forecast data and future electric load data based on the established forecasting model include:
[0023] The particle swarm algorithm is used to iteratively optimize the number of decision trees and the minimum number of leaves of the random forest model. The mean square error of the model is used as the evaluation index of the particle swarm algorithm optimization. The particle swarm is used to find the optimal parameters of the random forest model, and the prediction model is obtained using the optimal parameters.
[0024] Obtain historical data on photovoltaic power generation, historical data on wind power generation, and power load data;
[0025] Process the acquired data and combine them with the established system models to determine the relevant factors affecting the variables of each model, and obtain the characteristic data of the predicted variables of each system model;
[0026] The pre-processed wind and solar power generation data and characteristic data are input into the prediction model to obtain the future wind and solar power generation power prediction data;
[0027] The electric load data and characteristic data are input into the prediction model to obtain the future electric load data.
[0028] As a further limitation of the technical solution of the present invention, the number of decision trees and the minimum number of leaves of the random forest model are iteratively optimized using a particle swarm algorithm, the mean square error of the model is used as an evaluation index for particle swarm algorithm optimization, and the step of finding the optimal parameters of the random forest model through a particle swarm includes:
[0029] S211: Set the termination condition and initialize the particle swarm so that the position of each particle represents a solution;
[0030] S212: Select the mean absolute error percentage of the prediction model as the fitness function, calculate the fitness according to the particle position, use the position to train and test the random forest model, and calculate the error between the prediction result and the actual result;
[0031] S213: Compare the current fitness of each particle with the individual best fitness. If the current fitness is better, update the individual best position. By comparing the fitness of all particles, find the global best fitness and position and update the global best position.
[0032] S214: Update the particle's speed and position according to the particle's current speed, individual optimal position, and global optimal position. The update formula is as follows:
[0033]
[0034]
[0035] w represents the inertia weight, c1 and c2 are acceleration constants, and are two random functions with value range [0, 1].
[0036] S215: According to the preset termination conditions, the optimization process is terminated and the solution corresponding to the global optimal position is output as the optimal parameters of the random forest model, that is, the optimal number of decision trees and the minimum number of leaves; if not satisfied, jump to step S212.
[0037] As a further limitation of the technical solution of the present invention, the constructed single-objective optimization scheduling model is:
[0038]
[0039] Among them C PV is the photovoltaic operation and maintenance cost, C W is the operation and maintenance cost of wind power plant, P PV (t), P W (t) are The power of photovoltaic power generation and wind power generation at the moment, C SOC is the operation and maintenance cost of the battery; P ES (t) Yes The battery charge / discharge power at all times, charging takes negative power and discharging takes positive power; S E is the city electricity price in yuan / kwh; P grid (t) is the amount of electricity purchased by the system from the grid;
[0040] Where P grid (t)=max(0,min(P buy (t),P load (t)-(P PV (t)+P ES (t))))
[0041] P buy (t) represents the maximum value of the total amount of electricity purchased; P load (t) represents the total power of the electrical load.
[0042] As a further limitation of the technical solution of the present invention, the steps of performing optimal solution by using an exploratory cuckoo search algorithm in combination with set constraints include:
[0043] 41: Generate n candidate solutions for the initial population, where n / 2 candidate solutions are randomly generated and the opposite solutions of n / 2 candidate solutions are generated using refraction learning;
[0044] 42: Start iteration and randomly select three candidate solutions from the current population;
[0045] 43: Use three mutation methods of the exploratory cuckoo search algorithm to mutate the three candidate solutions; and calculate the fitness function corresponding to each mutation method;
[0046] 44: Replace the solution with low fitness according to the fitness level;
[0047] 45: Calculate the worst candidate solution in the population, use Gaussian perturbation to update the worst candidate solution set, sort the set of solutions according to fitness, and use randomly generated new candidate solutions to replace the worst solution;
[0048] 46: Retain the better solutions in the population whose ranking is greater than the first threshold to generate a solution set, filter the solutions in the solution set according to the constraint conditions, find the optimal solution of the current population in the filtered solution set, use refraction learning to generate the opposite solution of the optimal solution, and if the fitness of the opposite solution is better than the optimal solution found, output the opposite solution until the iteration is completed, otherwise return to step 42.
[0049] In a second aspect, the technical solution of the present invention also provides a highway integrated energy system optimization device, including a system model building module, a prediction model building module, a single-objective optimization scheduling model building module and an optimization processing module;
[0050] System model building module, which is used to divide the highway integrated energy system into energy measurement, conversion and transmission lines and load side, and build models of each part of the highway integrated energy system;
[0051] The prediction model building module is used to establish a wind-solar power generation-load prediction model based on the established energy measurement model and load side model by optimizing the random forest model through the particle swarm algorithm, and obtain the future wind-solar power generation power prediction data and future electric load data based on the established prediction model;
[0052] The single-objective optimization scheduling model establishment module is used to build a single-objective optimization scheduling model with economic cost as the objective function, the electric energy storage of the battery in each period of a cycle as the decision variable, and the predicted future wind and solar power generation power forecast data and future electric load data as variables;
[0053] The optimization processing module is used to find the optimal solution for the energy scheduling plan with the lowest total cost through the exploratory cuckoo search algorithm combined with the set constraints.
[0054] In a third aspect, the technical solution of the present invention also provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; the memory stores computer program instructions executable by the at least one processor, and the computer program instructions are executed by the at least one processor so that the at least one processor can execute the highway integrated energy system optimization method as described in the first aspect.
[0055] In a fourth aspect, the technical solution of the present invention also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions enable the computer to execute the highway integrated energy system optimization method as described in the first aspect.
[0056] The present invention can simulate and analyze the energy consumption data of the entire highway system by mathematically modeling the power supply side, transmission path and load side, and can timely adjust the energy consumption scheme for high energy consumption and can visualize the scheme information in real time. The present invention focuses on the two optimization contents of prediction and scheduling, predicts the renewable energy and electric load of future scenarios through historical data, and imports the data into the improved scheduling optimization model to obtain the power purchase plan and scheduling measures for future scenarios, which can effectively control the cost and build a low-carbon highway system.
[0057] It can be seen from the above technical solutions that the present invention has the following advantages:
[0058] 1. Connect the wind and solar power generation, energy storage equipment and load end of the highway, and obtain the energy scheduling method with the lowest total cost by predicting the wind and solar power generation data and electricity load data combined with single-objective optimization. In this way, a cycle (24 hours) of hourly electricity purchase plan can be obtained, which can achieve the lowest economic cost while ensuring the normal operation of the highway.
[0059] 2. The exploratory cuckoo search algorithm is used to solve the target value of the electricity purchase cost. The algorithm expands the space exploration of the optimal solution in the optimization process through the improvement of refraction learning, Gaussian perturbation and mutation methods, and replaces the worst solution and the second worst solution one by one. It also increases the search path of candidate solutions through improved mutation methods, thereby increasing the algorithm's optimization ability and improving the depth and breadth of seeking the optimal solution.
[0060] In addition, the invention has a reliable design principle, a simple structure and a very broad application prospect.
[0061] It can be seen that compared with the prior art, the present invention has outstanding substantive features and significant progress, and the beneficial effects of its implementation are also obvious. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0063] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention.
[0064] Figure 2 It is a flowchart of the particle swarm optimization random forest model.
[0065] Figure 3 It is a flow chart of the optimization scheduling model based on the exploratory cuckoo algorithm.
[0066] Figure 4 It is the principle diagram of exploratory cuckoo algorithm refraction learning
[0067] Figure 5 is a schematic block diagram of an apparatus according to an embodiment of the present invention. DETAILED DESCRIPTION
[0068] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0069] like Figure 1 As shown, an embodiment of the present invention provides a method for optimizing a highway integrated energy system, comprising the following steps:
[0070] Step 1: Divide the highway integrated energy system into energy measurement, conversion and transmission lines, and load side, and establish models of each part of the highway integrated energy system;
[0071] The power supply side is the main source of energy supply for the entire highway system, including power purchase from the power grid and photovoltaic power generation; the power conversion and transmission part is mainly realized through energy storage devices (battery packs), and the amount of city power purchase can be adjusted through the charging and discharging of the battery pack to realize real-time power purchase scheduling. This part of the power can both supply power to the load side in real time and sell power to the power grid; the load form on the load side of the highway system is mainly electric load, including lighting functions, tunnel ventilation, tunnel monitoring and fire protection, etc. Load power consumption will cause energy waste and increase environmental protection costs. Overall, the highway integrated energy system coordinates power transmission with the power grid through wind and solar power generation devices and energy storage devices along the highway, ensuring that the cost of purchasing power is reduced, while improving the utilization rate of electricity, reducing the waste of purchased power, and reducing the environmental protection cost on the load side.
[0072] Photovoltaic power generation system mainly relies on solar energy conversion to work. Its principle is to use the photovoltaic effect of the semiconductor material of photovoltaic cells to convert radiation energy into electrical energy. The solar power generation device of the highway is designed with distributed photovoltaic in the central isolation belt;
[0073] Photovoltaic power generation system model:
[0074] P PV,t Indicates the actual output power of the photovoltaic cell; P PVstc It indicates the output power of photovoltaic cells under standard test conditions; L indicates the actual solar radiation intensity, L stc Indicates the solar radiation illuminance under standard conditions; T, T stc represent the ambient temperature under actual conditions and standard conditions respectively, γ represents the temperature attenuation coefficient of the photovoltaic cell;
[0075] Distributed wind power generation relies on wind power transmission to convert mechanical energy into electrical energy. Its power output is proportional to the cube of wind speed. Wind power generation model:
[0076] P wind is the wind power output power; ρ is the air density corresponding to the region; K is the performance parameter of the wind power generation equipment; S is the area swept by the wind turbine blades; v is the wind speed;
[0077] The load form of the highway integrated energy system is mainly electric load, and the energy storage equipment of the entire system mainly refers to electric energy storage equipment, such as battery packs. The role of electric energy storage devices is to smooth the fluctuations of renewable energy and achieve peak-shaving and valley-filling of electricity prices. The energy storage capacity of the energy storage device is related to the charging and discharging power and the efficiency of charging and discharging;
[0078] E S (t) = (1-λs )E S (t-1)+Δt[η charge P charge (t)-P discharge (t) / η discharge ]
[0079] In the above formula: E S (t) means Hourly energy storage capacity; η charge , P charge (t), P discharge (t), η discharge Respectively represent the charging efficiency, charging power, discharging power and discharging efficiency of the energy storage device; λ s Indicates the self-loss coefficient of the battery. In addition, the energy storage model has unified constraints, including theoretical constraints on charging and discharging power and electrical energy storage capacity.
[0080] 0≤P discharge ≤ε discharge E max
[0081] 0≤P charge ≤ε charge E max
[0082] β min E max ≤E S (t)≤β max E max
[0083] ε charge , ε discharge is the maximum charge and discharge rate of the energy storage device; β min , β max is the minimum energy storage coefficient and the maximum energy storage coefficient. In a complete scheduling cycle, the system satisfies E t (0) = E t (end), that is, the capacity of the energy storage device at the last scheduling moment is equal to the initial capacity, satisfying the intra-cycle balance of the energy storage device.
[0084] The electrical load of the highway integrated energy system mainly includes basic lighting, enhanced lighting, tunnel ventilation, tunnel monitoring and other load forms. All of these loads use electrical energy to work, so different forms of electrical loads can be integrated. Load side model P load =P light +P fire +P moni +P else
[0085]
[0086] Where P load , P light , P fire , P moni , P else They represent the total load, lighting load, fire load, monitoring equipment load and other forms of loads, among which the lighting load needs to be calculated based on the number of lighting equipment N and the power of the lighting point light source P sin Calculate the power of a single lighting device and then perform additional calculations. Other types of electrical loads can be calculated according to the power of normal electrical equipment.
[0087] Step 2: Based on the established energy measurement model and load side model, the random forest model is optimized by particle swarm algorithm to establish a wind-solar power generation-load forecasting model, and the future wind-solar power generation power forecast data and future electric load data are obtained based on the established forecasting model; the specific steps include:
[0088] Step 21: Use the particle swarm algorithm to iteratively optimize the number of decision trees and the minimum number of leaves of the random forest model, use the mean square error of the model as the evaluation index of the particle swarm algorithm optimization, find the optimal parameters of the random forest model through the particle swarm, and use the optimal parameters to obtain the prediction model;
[0089] Step 22: Obtain photovoltaic power generation historical data, wind power generation historical data and power load data;
[0090] Step 23: Process the acquired data and combine it with the established system models to determine the relevant factors affecting the variables of each model, and obtain the characteristic data of the predicted variables of each system model;
[0091] Step 24: input the preprocessed wind and solar power generation data and characteristic data into the prediction model to obtain future wind and solar power generation power prediction data;
[0092] Step 25: Input the electric load data and characteristic data into the prediction model to obtain future electric load data.
[0093] After the prediction model is built, the historical data of photovoltaic power generation, wind power generation and electricity load are processed to determine the relevant factors affecting the three variables and the characteristic values of the prediction variables. For example, historical illuminance and air temperature are determined as input features of the photovoltaic power generation prediction model, air pressure, wind speed, temperature, etc. are used as input data for wind power generation, and user energy consumption behavior is used as characteristic input for electricity load prediction. By bringing the input data into the prediction model, future wind and solar power generation power prediction data and future electricity load data can be obtained. These data can be used as inputs for subsequent optimization models to ultimately determine the scheduling plan, electricity purchase cost, and energy storage charging and discharging strategy.
[0094] The wind and solar power generation data and electric load data are predicted, and the number of decision trees and the minimum number of leaves of the random forest model are iteratively optimized using the particle swarm algorithm. The mean square error of the prediction model is used as the evaluation index of the particle swarm algorithm optimization. The particle swarm is used to find the optimal random forest model parameters. The prediction model with the optimal parameters uses the preprocessed wind and solar power generation data and feature data as the model input to obtain the wind and solar power generation in the future scenario. Similarly, the electric load data and feature data are input into the model to obtain the electric load data in the future scenario. All the prediction data are stored in the database for use in the optimization scheduling model. Figure 2 As shown, specifically including:
[0095] S211: Set the termination condition and initialize the particle swarm so that the position of each particle represents a solution;
[0096] S212: Select the mean absolute error percentage of the prediction model as the fitness function, calculate the fitness according to the particle position, use the position to train and test the random forest model, and calculate the error between the prediction result and the actual result;
[0097] S213: Compare the current fitness of each particle with the individual best fitness. If the current fitness is better, update the individual best position. By comparing the fitness of all particles, find the global best fitness and position and update the global best position.
[0098] S214: Update the particle's speed and position according to the particle's current speed, individual optimal position, and global optimal position. The update formula is as follows:
[0099]
[0100] x i d =x i d +v i d
[0101] w represents the inertia weight, c1 and c2 are acceleration constants, and are two random functions with value range [0, 1].
[0102] S215: According to the preset termination conditions, the optimization process is terminated and the solution corresponding to the global optimal position is output as the optimal parameters of the random forest model, that is, the optimal number of decision trees and the minimum number of leaves; if not satisfied, jump to step S212.
[0103] Step 3: Taking economic cost as the objective function, the electric energy storage of the battery in each period of a cycle is used as the decision variable, and the predicted future wind and solar power generation data and future electric load data are used as variables to build a single-objective optimization scheduling model;
[0104] In multi-objective optimization problems, decision variables refer to variables or parameters that can be adjusted and changed. The selection and value of decision variables will directly affect the objective function and constraints of the optimization problem. Decision variables are used to describe the feasible solution space of the problem.
[0105] By selecting appropriate decision variables, we can explore and find the optimal solution set of the problem, that is, a set of solutions that make the objective function achieve the optimal value under given objective functions and constraints. The range and value selection method of decision variables will determine the scope and nature of the feasible solution space.
[0106] The highway energy system only involves the conversion and transmission of electric energy in the process of energy transmission and conversion. The energy storage device used is only a battery pack, so the decision variable uses the electric energy storage of the battery in each period of a cycle as the decision variable. Since this system uses daily as the operating cycle, the decision variables are X1, X2, ..., X 24 , the variable dimension is 24. The decision variables are compared with the battery storage energy, the sum of the photovoltaic output mentioned above and the electrical load, and the actual amount of electricity that needs to be purchased is calculated, thereby calculating the objective function of the economic cost.
[0107] The highway needs to achieve the lowest operating cost, that is, the optimal economic goal. This paper considers the impact of time-of-use electricity prices and buys and sells electricity according to the peak and valley differences in electricity prices. The expression is:
[0108]
[0109] Among them C PV is the photovoltaic operation and maintenance cost, which is related to the power of photovoltaic power generation; C W is the operation and maintenance cost of the wind power plant, which is related to the wind power generation capacity; P PV (t), P W (t) are The power of photovoltaic power generation and wind power generation at the moment can both be predicted through the prediction model, C SOC is the operation and maintenance cost of the battery; P ES (t) Yes The battery charge / discharge power at all times, charging takes negative power and discharging takes positive power; S E It is the city electricity price, which is divided into three price segments: flat, peak and valley. The unit is RMB / kwh. grid (t) is the amount of electricity purchased by the system from the grid, and its calculation formula is as follows
[0110] P grid (t)=max(0,min(P buy (t),P load (t)-(P PV (t)+P ES (t))))
[0111] Where P buy (t) represents the maximum value of the total amount of electricity purchased; P load (t) represents the total power of the electrical load.
[0112] The above formula represents the dispatching method of purchasing electricity from the power grid, that is, if the load power in a certain period is lower than the sum of the photovoltaic power generation power and the battery discharge power (the value is negative when charging) in that period, then P grid The value is 0, and there is no need to purchase electricity from the grid; if the load power during this period is higher than the sum of the photovoltaic power generation and the battery discharge power, the difference between the two is the amount of electricity purchased from the grid. In addition, there is an extreme case, namely P grid Higher than P buy At this time, the amount of electricity purchased by the power grid can only be limited to P buy The setting value cannot be higher than this value.
[0113] Step 4: Use the exploratory cuckoo search algorithm combined with the set constraints to find the optimal solution and obtain the energy scheduling plan with the lowest total cost.
[0114] The Exploratory Cuckoo Search (ECS) algorithm is an upgrade of the traditional cuckoo algorithm to improve exploration capabilities. Its main innovations are refraction learning, Gaussian perturbation, and three combined mutation methods (including Lévy flight mutation method, highly destructive polynomial mutation, and Jaya mutation).
[0115] For the implementation process of refraction learning, such as Figure 4 As shown in Figure 1, the algorithm explores the opposite direction in the search space by taking the opposite value of the decision variable of the optimal solution. The purpose of this is to find areas where better solutions may exist. The opposite value x' of the decision variable x* of the candidate optimal solution x * It can be calculated according to the following formula:
[0116] x' * =(LB+UB) / 2+(LB+UB) / (2kη)-x* / (kη)
[0117] In the above formula, η represents the refractive index, and its calculation formula is as follows:
[0118]
[0119] In the above formula, θ1 and θ2 are expressed as follows:
[0120] sinθ1=((LB+UB) / 2-x * ) / h
[0121] sinθ2=((x' * -(LB+UB) / 2) / h'
[0122] Where x is the incident point (a candidate solution), x' is the refraction point (another candidate solution), LB and UB are the lower and upper bounds of the decision variable, 0 is the center point between LB and UB, h is the distance between x and 0, and h' is the distance between x' and 0. * is based on refraction learning x * The opposite solution of * The projection of x on the horizontal axis, x' * is the projection of x' on the horizontal axis, which represents the decision variables of the solution in one dimension. When the objective function has multiple decision variables, the opposite decision variable group can be found by the following formula.
[0123] x j ' * =(LB j +UB j ) / 2+(LB j +UB j ) / (2kη)-x j * / (kη)
[0124] where x j * and x j ' * are the j-th decision variables of x and x', respectively, [LB j ,UB j ] is the search interval of the jth decision variable.
[0125] 2) Gaussian perturbation is a mutation method derived from Gaussian distribution. It is often used to increase the diversity of the population of candidate solutions to help it escape the local optimum. Gaussian perturbation can be used in the exploratory cuckoo search algorithm to optimize the worst candidate solution in the population. The search algorithm will discard some solutions when selecting solutions, and using Gaussian perturbation to optimize the worst solution can reduce the error in the optimization process and enhance the ability to jump out of the local optimal solution.
[0126] The one-dimensional Gaussian density function is expressed as follows:
[0127]
[0128] σ is taken as 0.5, and μ is taken as 1. According to the Gaussian distribution density function, the process of Gaussian perturbation optimization of the worst solution can be derived, and the formula is as follows:
[0129]
[0130] represents the jth decision variable of the ith candidate solution, and r is a randomly generated random number between (0, 1). The above formula can be used to update the decision variables of the candidate solution to change the worst solution.
[0131] 3) Update of mutation method: The traditional cuckoo search algorithm uses Lévy-based mutation function to mutate the selected solution. This mutation method simulates the flight behavior of the cuckoo. The mutation process of the candidate solution is as follows:
[0132]
[0133] β represents the variable step length, β is greater than 0; the above formula represents the change from x i (t) After Lévy mutation, a new solution x is obtained i (t+1), Lévy(λ) is the Lévy flight operator, which is essentially a vector containing m values obtained by Lévy distribution, and the Lévy flight operator is a special random walk method. The step length of the operator is as follows:
[0134] Lévy~u=S -α
[0135] Where S is the step size of the distribution, and α is a uniform random number in the range (1, 3] related to the fractal dimension. The mutation process is to generate a new value as a variant solution of the original solution based on the logical operation of the variable step size and the flight operator.
[0136] In addition to the traditional Lévy mutation method, the exploratory cuckoo algorithm adds two other new mutation forms to the mutation method. One is highly destructive polynomial mutation, and the other is Java mutation. Highly destructive polynomial mutation (HDP) is a well-known and effective mutation method that can effectively explore the search range of each decision variable in the candidate solution regardless of the current value of the decision variable. The highly destructive polynomial mutation method converts the candidate solution x into a new one. j (t) In the t-th iteration process, by using P m ∈[0,1] the probability of changing x j (t) to obtain a new variant solution x j (t+1).
[0137] x i j (t+1)=x i j (t)+δ k (UBi -LB i )
[0138]
[0139]
[0140]
[0141] In the above formula, r represents a random number generated in the interval [0, 1]; P m represents the mutation probability; LB i and UB i yes The lower and upper boundaries of the candidate solution; δ1 represents the distance ratio between the candidate solution and the lower boundary and the search range, δ2 represents the distance ratio between the candidate solution and the upper boundary and the search range; η m A non-negative number representing the distribution index.
[0142] Jaya mutation is an optimization algorithm based on iterative population. The principle of using Jaya mutation is to mutate all candidate solutions in the solution group by moving the candidate solution between the best and worst candidate solutions in each iteration of Jaya. Its mutation formula is as follows:
[0143]
[0144] Represents iteration The best candidate solution at this time; Represents iteration The second worst candidate solution; r1 and r2 are two uniformly distributed random numbers in the range [0, 1]. The fitness value is better than The fitness value of is replaced by the former.
[0145] The optimization scheduling model of the present invention takes economic cost as the objective function and the amount of electricity purchased in a cycle as the decision variable. It sets constraints to perform optimization and solve, fully utilizes renewable energy and energy storage devices to supply electricity, reduces the amount of electricity purchased during the peak period of electricity prices to reduce the cost of electricity purchase, and finally returns the future electricity purchase plan and electricity scheduling results through the scheduling model. The present invention uses an exploratory cuckoo search algorithm to solve the target value of electricity purchase cost. The algorithm expands the space exploration of the optimal solution in the optimization process through the improvement of refraction learning, Gaussian perturbation and mutation methods, and replaces the worst solution and the second worst solution one by one, and increases the search path of candidate solutions through improved mutation methods, thereby increasing the algorithm's optimization ability and improving the depth and breadth of seeking the optimal solution.
[0146] like Figure 3As shown, the steps of optimizing and solving the problem by using the exploratory cuckoo search algorithm combined with the set constraints include:
[0147] 41: Generate n candidate solutions for the initial population, where n / 2 candidate solutions are randomly generated and the opposite solutions of n / 2 candidate solutions are generated using refraction learning;
[0148] 42: Start iteration and randomly select three candidate solutions from the current population;
[0149] 43: Use three mutation methods of the exploratory cuckoo search algorithm to mutate the three candidate solutions; and calculate the fitness function corresponding to each mutation method;
[0150] 44: Replace the solution with low fitness according to the fitness level;
[0151] 45: Calculate the worst candidate solution in the population, use Gaussian perturbation to update the worst candidate solution set, sort the set of solutions according to fitness, and use randomly generated new candidate solutions to replace the worst solution;
[0152] 46: Retain the better solutions in the population whose ranking is greater than the first threshold to generate a solution set, filter the solutions in the solution set according to the constraint conditions, find the optimal solution of the current population in the filtered solution set, use refraction learning to generate the opposite solution of the optimal solution, and if the fitness of the opposite solution is better than the optimal solution found, output the opposite solution until the iteration is completed, otherwise return to step 42.
[0153] In addition to the three conditions for the operation of the energy storage equipment, the system constraints also include power balance and energy storage balance. Power balance means that the power supply and power consumption in the system are in a balanced state. If the loss in the intermediate process is not considered, the photovoltaic power generation and energy storage discharge and power purchase by the power grid should be equal to the load side power consumption at any sampling time, as shown in the following formula:
[0154] P load (t) = P grid (t)+P PV (t)+P ES (t)
[0155] The energy storage balance of the system is a constraint on the energy storage device itself, that is, within a cycle (24 hours), the final state energy minus the initial state energy is 0.
[0156] E END -E0=0
[0157] In addition to electric energy balance and power balance, there are also balance constraints for the mains power supply network, including node power balance, power output upper and lower limit balance, node voltage balance, and line transmission power balance.
[0158] The expression of node power balance is:
[0159]
[0160] P i,M , Q i,M are the active power and reactive power of the grid node respectively; P i,N , Q i,N is the active load and reactive load of the power grid node; U i ,θ ij is the voltage amplitude and phase angle; S(j) is the set of nodes connected to node i; G ij , B ij are the real and imaginary parts of the admittance matrix.
[0161] Power output upper and lower limit constraints:
[0162]
[0163] P S,min , P S,max , Q S,min , Q S,max They are the lower and upper limits of active power and the lower and upper limits of reactive power respectively.
[0164] Node voltage constraints:
[0165] U min ≤U I ≤U max
[0166] U min , U max are the lower and upper limits of the node voltage.
[0167] Line transmission power constraints:
[0168]
[0169] Among them, P l,max , P l,min They are the upper and lower limits of the transmission power of L line respectively.
[0170] The whole optimization method is divided into two parts: prediction and scheduling. The prediction mainly uses the temperature and humidity, light intensity, atmospheric pressure and historical photovoltaic power generation data of the space where the highway is located to predict the wind and solar power generation in the future, and also predicts the system load data. The predicted photovoltaic power generation can be used as the input data of the optimization scheduling model to generate the future power purchase plan. The prediction method uses a random forest prediction model based on particle swarm optimization (PSO-RF). The number of decision trees and the minimum number of leaves of the random forest are optimized by the particle swarm algorithm to improve the accuracy of the prediction model. The scheduling part is a single-objective optimization scheduling with the power purchase cost as the objective function. The predicted wind and solar power generation data and load data are used as variables of the objective function to calculate the power purchase cost. The present invention uses an improved exploratory cuckoo search algorithm that combines the refraction learning method and the Gaussian perturbation optimization solution and three mutation methods. The method has stronger search power, has depth and breadth when seeking the optimal solution of the objective function, and can select a better solution in the global space. When the electricity purchase plan with the lowest objective function is calculated, the system will give the corresponding 24-hour electricity purchase plan as well as the wind and solar power output and energy storage charging and discharging conditions. Relevant departments can use this plan to purchase electricity to achieve the goal of fully utilizing the comprehensive energy of the highway.
[0171] like Figure 5 As shown, the technical solution of the present invention also provides a highway comprehensive energy system optimization device, including a system model building module, a prediction model building module, a single-objective optimization scheduling model building module and an optimization processing module;
[0172] System model building module, which is used to divide the highway integrated energy system into energy measurement, conversion and transmission lines and load side, and build models of each part of the highway integrated energy system;
[0173] The prediction model building module is used to establish a wind-solar power generation-load prediction model by optimizing the random forest model through the particle swarm algorithm, and obtain the future wind-solar power generation power prediction data and future electric load data based on the established prediction model;
[0174] The single-objective optimization scheduling model establishment module is used to build a single-objective optimization scheduling model with economic cost as the objective function, the electric energy storage of the battery in each period of a cycle as the decision variable, and the predicted future wind and solar power generation power forecast data and future electric load data as variables;
[0175] The optimization processing module is used to find the optimal solution for the energy scheduling plan with the lowest total cost through the exploratory cuckoo search algorithm combined with the set constraints.
[0176] The embodiment of the present invention also provides an electronic device, which includes: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus. The communication bus can be used for information transmission between the electronic device and the sensor. The processor can call the logic instructions in the memory to execute the following method: Step 1: Divide the highway integrated energy system into energy measurement, conversion and transmission lines and load side, and establish models of various parts of the highway integrated energy system; Step 2: Based on the established energy measurement model and load side model, a wind-solar power generation-load forecasting model is established by optimizing the random forest model through a particle swarm algorithm, and future wind-solar power generation power forecast data and future electric load data are obtained based on the established forecasting model; Step 3: Taking economic cost as the objective function, the electric energy reserve of each period of a cycle of the battery is used as the decision variable, and the predicted future wind-solar power generation power forecast data and future electric load data are used as variables to construct a single-objective optimization scheduling model; Step 4: The energy scheduling scheme with the lowest total cost is obtained by optimizing and solving the set constraints through an exploratory cuckoo search algorithm.
[0177] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0178] An embodiment of the present invention provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions enable the computer to execute the method provided by the above method embodiment, for example, including: Step 1: Divide the highway integrated energy system into energy measurement, conversion and transmission lines, and load side, and establish models of each part of the highway integrated energy system; Step 2: Based on the established energy measurement model and load side model, a wind-solar power generation-load forecasting model is established by optimizing the random forest model through a particle swarm algorithm, and future wind-solar power generation power forecast data and future electric load data are obtained based on the established forecasting model; Step 3: Taking economic cost as the objective function, the electric energy reserves of the battery in each period of a cycle are used as decision variables, and the predicted future wind-solar power generation power forecast data and future electric load data are used as variables to construct a single-objective optimization scheduling model; Step 4: The energy scheduling plan with the lowest total cost is obtained by searching for the best solution through an exploratory cuckoo search algorithm combined with the set constraints.
[0179] Although the present invention has been described in detail by referring to the accompanying drawings and in combination with the preferred embodiments, the present invention is not limited thereto. Without departing from the spirit and essence of the present invention, a person of ordinary skill in the art may make various equivalent modifications or substitutions to the embodiments of the present invention, and these modifications or substitutions shall be within the scope of the present invention. Any person of ordinary skill in the art may easily think of changes or substitutions within the technical scope disclosed by the present invention, and these shall be within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.
Claims
1. A highway integrated energy system optimization method, characterized in that: The steps include: The highway integrated energy system is divided into energy measurement, conversion and transmission lines, and load side, and models of each part of the highway integrated energy system are established; Based on the established energy measurement model and load side model, the wind and solar power generation-load forecasting model is established by optimizing the random forest model through the particle swarm algorithm. Based on the established forecasting model, the future wind and solar power generation power forecast data and future electric load data are obtained; Taking economic cost as the objective function, the electric energy storage of the battery in each period of a cycle is used as the decision variable, and the predicted future wind and solar power generation data and future electric load data are used as variables to build a single-objective optimization scheduling model; The energy scheduling scheme with the lowest total cost is obtained by using the exploratory cuckoo search algorithm combined with the set constraints to find the optimal solution; The steps of dividing the highway integrated energy system into energy measurement, conversion and transmission lines, and load side, and establishing models of each part of the highway integrated energy system include: The integrated highway energy system is divided into energy measurement, conversion and transmission lines, and load side; Establish energy side models, including photovoltaic power generation models and wind power generation models; Establishing the conversion and transmission line model, i.e., the electric energy storage device model; Establish load side model; Photovoltaic power generation system model: P PV,t Indicates the actual output power of the photovoltaic cell; P PVstc It indicates the output power of photovoltaic cells under standard test conditions; L indicates the actual solar radiation illumination, L stc Indicates the solar radiation illuminance under standard conditions; T, T stc represent the ambient temperature under actual conditions and standard conditions respectively, and γ represents the temperature attenuation coefficient of the photovoltaic cell; Wind power generation model: P wind is the wind power output power; ρ is the air density corresponding to the region; K is the performance parameter of the wind power generation equipment; S is the area swept by the wind turbine blades; v is the wind speed; Load side model P load =P light +P fire +P moni +P else Where P load , P light , P fire , P moni , P else They represent the total load, lighting load, fire load, monitoring equipment load and other forms of loads, among which the lighting load needs to be calculated based on the number of lighting equipment N and the power of the lighting point light source P sin Calculate the power of a single lighting device and then perform superposition calculations. Other types of electrical loads are calculated based on the power of normal electrical equipment. Based on the established energy measurement model and load side model, the wind and solar power generation-load forecasting model is established by optimizing the random forest model through the particle swarm algorithm. The steps of obtaining the future wind and solar power generation power forecast data and the future electric load data based on the established forecasting model include: The particle swarm algorithm is used to iteratively optimize the number of decision trees and the minimum number of leaves of the random forest model. The mean square error of the model is used as the evaluation index of the particle swarm algorithm optimization. The particle swarm is used to find the optimal parameters of the random forest model, and the prediction model is obtained using the optimal parameters. Obtain historical data on photovoltaic power generation, historical data on wind power generation, and power load data; Process the acquired data and combine them with the established system models to determine the relevant factors affecting the variables of each model, and obtain the characteristic data of the predicted variables of each system model; The pre-processed wind and solar power generation data and characteristic data are input into the prediction model to obtain the future wind and solar power generation power prediction data; Inputting the electric load data and characteristic data into the prediction model to obtain the future electric load data; The particle swarm algorithm is used to iteratively optimize the number of decision trees and the minimum number of leaves of the random forest model. The mean square error of the model is used as the evaluation index of the particle swarm algorithm optimization. The steps of finding the optimal parameters of the random forest model through the particle swarm include: S211: Set the termination condition and initialize the particle swarm so that the position of each particle represents a solution; S212: Select the mean absolute error percentage of the prediction model as the fitness function, calculate the fitness according to the particle position, use the position to train and test the random forest model, and calculate the error between the prediction result and the actual result; S213: Compare the current fitness of each particle with the individual best fitness. If the current fitness is better, update the individual best position. By comparing the fitness of all particles, find the global best fitness and position and update the global best position. S214: Update the particle's speed and position according to the particle's current speed, individual optimal position, and global optimal position. The update formula is as follows: w represents the inertia weight, c1 and c2 are acceleration constants, and are two random functions with a value range of [0, 1]; S215: according to the preset termination condition, terminate the optimization process and output the solution corresponding to the global optimal position as the optimal parameters of the random forest model, that is, the optimal number of decision trees and the minimum number of leaves; if not satisfied, jump to step S212; The single-objective optimization scheduling model constructed: Among them C PV is the photovoltaic operation and maintenance cost, C W is the operation and maintenance cost of wind power plant, P PV (t), P W (t) are the photovoltaic power generation and wind power generation at time t, respectively, C SOC is the operation and maintenance cost of the battery; P ES (t) is the battery charge / discharge power at time t, with negative power for charging and positive power for discharging; S E is the city electricity price in yuan / kwh; P grid (t) is the amount of electricity purchased by the system from the grid; Where P grid (t)=max(0,min(P buy (t),P load (t)-(P PV (t)+P ES (t)))) P buy (t) represents the maximum value of the total amount of electricity purchased; P load (t) represents the total power of the electrical load; The steps of optimizing the solution by using the exploratory cuckoo search algorithm combined with the set constraints include: 41: Generate n candidate solutions for the initial population, where n / 2 candidate solutions are randomly generated and the opposite solutions of n / 2 candidate solutions are generated using refraction learning; 42: Start iteration and randomly select three candidate solutions from the current population; 43: Use three mutation methods of the exploratory cuckoo search algorithm to mutate the three candidate solutions; and calculate the fitness function corresponding to each mutation method; 44: Replace the solution with low fitness according to the fitness level; 45: Calculate the worst candidate solution in the population, use Gaussian perturbation to update the worst candidate solution set, sort the set of solutions according to fitness, and use randomly generated new candidate solutions to replace the worst solution; 46: Retain the better solutions in the population whose ranking is greater than the first threshold to generate a solution set, filter the solutions in the solution set according to the constraint conditions, find the optimal solution of the current population in the filtered solution set, use refraction learning to generate the opposite solution of the optimal solution, and if the fitness of the opposite solution is better than the optimal solution found, output the opposite solution until the iteration is completed, otherwise return to step 42.
2. A highway integrated energy system optimization device, characterized in that: It includes system model building module, prediction model building module, single-objective optimization scheduling model building module and optimization processing module; System model building module, which is used to divide the highway integrated energy system into energy measurement, conversion and transmission lines and load side, and build models of each part of the highway integrated energy system; The prediction model building module is used to establish a wind-solar power generation-load prediction model based on the established energy measurement model and load side model by optimizing the random forest model through the particle swarm algorithm, and obtain the future wind-solar power generation power prediction data and future electric load data based on the established prediction model; The single-objective optimization scheduling model establishment module is used to build a single-objective optimization scheduling model with economic cost as the objective function, the electric energy storage of the battery in each period of a cycle as the decision variable, and the predicted future wind and solar power generation power forecast data and future electric load data as variables; The optimization processing module is used to find the optimal solution for the energy scheduling plan with the lowest total cost through the exploratory cuckoo search algorithm combined with the set constraints.
3. An electronic device, characterized in that: The electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; the memory stores computer program instructions that can be executed by the at least one processor, and the computer program instructions are executed by the at least one processor so that the at least one processor can execute the highway integrated energy system optimization method as described in claim 1.
4. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions, and the computer instructions enable the computer to execute the highway integrated energy system optimization method as described in claim 1.
