Microgrid day-ahead economic optimization scheduling method considering time-of-use electricity price
The Bi-LSTM model is used to predict photovoltaic and load power, and the time-of-use electricity price is combined to optimize the operation and maintenance costs of the microgrid system. This solves the problems of low optimization efficiency in microgrid scheduling and the lack of consideration of electric vehicle charging costs, and achieves efficient and accurate microgrid economic scheduling.
Patent Information
- Application Number
- CN202510915694.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-03
- Publication Date
- 2025-09-19
AI Technical Summary
The existing microgrid scheduling method has the problems of low optimization efficiency and falling into local optimality, and does not fully consider the impact of electric vehicle charging costs on the charging needs of car owners, resulting in a large deviation between simulation results and actual results.
The Bi-LSTM bidirectional long short-term memory model is used to predict distributed photovoltaic and load power. Combined with the time-of-use electricity price characteristics, an objective function is constructed to minimize the total operation and maintenance cost of the microgrid system. The problem is linearly programmed, and the CVXPY solver is used to solve the optimal power data sequence of each entity.
The optimization efficiency of microgrid scheduling is improved, the probability of falling into local optimum is reduced, the simulation results are highly consistent with the actual results, and the charging cost of electric vehicles is reduced.
Smart Images

Figure CN120675070A_ABST
Abstract
Description
Technical Field
[0001] The present application is applicable to the field of microgrid operation and control technology, and specifically relates to a microgrid day-ahead economic optimization scheduling method taking into account time-of-use electricity prices. Background Art
[0002] A microgrid is an autonomous system composed of distributed power sources, energy storage devices, loads, energy conversion devices, and protection devices. Compared to traditional power grids, microgrids offer more flexible power supply options and can improve the absorption of renewable energy, making them an effective way to increase my country's installed renewable energy capacity and distributed energy utilization. However, the tight coupling of multiple energy entities within a microgrid, the uncertainty of source and load, and the demands of environmental protection and carbon emission reduction pose significant challenges to the optimal operation of microgrids. Coordinating the behavior of these entities to enable mutual assistance, promote demand-side response and energy utilization, and achieve economically optimized day-ahead scheduling of the microgrid is a core issue in microgrid planning and operation.
[0003] Day-ahead economic optimization of microgrid dispatch is a multi-objective, high-dimensional optimization problem. Improved population-based algorithms are primarily used, characterized by large search spaces and numerous optimization variables. Despite improvements to these algorithms, they still suffer from low optimization efficiency and a high probability of falling into local optima. Previous studies have treated electric vehicles as virtual energy storage resources subject to system regulation, ignoring the willingness of vehicle owners to participate in demand response, resulting in significant deviations between simulation results and actual results. Summary of the Invention
[0004] The present invention aims to address the shortcomings of the prior art by providing a day-ahead economic optimization scheduling method for microgrids that takes into account time-of-use electricity prices. This approach addresses the low optimization efficiency and local optima inherent in prior microgrid scheduling methods. Furthermore, prior art methods typically treat electric vehicles as virtual energy storage resources, subject to system control, without considering the impact of charging costs on vehicle owners' charging needs.
[0005] The technical solutions of the present invention are as follows:
[0006] A method for day-ahead economic optimization scheduling of a microgrid taking into account time-of-use electricity prices includes a microgrid, wherein the microgrid comprises a distributed photovoltaic system, an energy storage system, and an electric vehicle charging station. The method is characterized by comprising the following steps:
[0007] S1: Acquire data: including basic parameters and data required for prediction. Basic data are electrical parameters of each entity in the microgrid. Data required for prediction are weather forecast data and conventional historical load data. Weather forecast data includes solar irradiance, ambient temperature, and photovoltaic system rated power data.
[0008] S2: Model construction: Construct a distributed photovoltaic power model;
[0009] S3: Model training: Use historical load data to train the Bi-LSTM bidirectional long short-term memory model;
[0010] S4: Model prediction output: Weather forecast data is input into the distributed photovoltaic power model, which outputs a distributed photovoltaic active power forecast sequence. Historical load data is input into the trained Bi-LSTM bidirectional long short-term memory model, which outputs a daily load power forecast sequence.
[0011] S5: Construct objective function: Consider the characteristics of time-of-use electricity prices and establish the objective function to minimize the total operation and maintenance cost of the microgrid system;
[0012] S6: Based on the basic data and the active power prediction sequence of distributed photovoltaics, the load power prediction sequence data, the objective function and the constraints, the target model is solved as a linear programming problem to obtain the optimal power data sequence of each subject.
[0013] Furthermore, in S2, the distributed photovoltaic power model is:
[0014]
[0015] Where: P AC is the AC output power; η DC / AC is the DC-AC conversion efficiency, G L , G STC are solar irradiance and standard irradiance respectively; P DC0 is the rated power of the photovoltaic panel, γ is the temperature coefficient, T L 、T REF are the ambient temperature and the reference temperature respectively.
[0016] Furthermore, in S3, the Bi-LSTM bidirectional long short-term memory model training refers to:
[0017] During training, the Bi-LSTM model is trained using a set of historical load data with several days' hourly resolution. This enables the Bi-LSTM model to have the ability to predict load power with hourly resolution. The trained Bi-LSTM model is then used as the load forecasting model.
[0018] Furthermore, in S3, the Bi-LSTM bidirectional long short-term memory model training refers to:
[0019] Given a number of historical load data series with daily hourly resolution H=[h1,h2,…,h N ],h1,h2,h N is the load power data of the 1st, 2nd, and Nth hour in the historical load data; where N is the sequence length;
[0020] First, the Bi-LSTM bidirectional long short-term memory model is initialized, that is, the connection weights and biases of the model are randomly assigned. Assuming that the lengths of the input and output sequences of the Bi-LSTM bidirectional long short-term memory model are n and m respectively, the sequence is decomposed into two matrices X and Y:
[0021] H=[h1,...,h N ]
[0022]
[0023] Use a j 、b j Represents the jth row of X and Y respectively, that is,
[0024] a j =[h j ,h j+1 ,...,h n+j-1 ]
[0025] b j =[h n+j ,h n+j+1 ,...,h n+m+j-1 ]
[0026] will a j The input Bi-LSTM bidirectional long short-term memory model is,
[0027]
[0028] Where: f Bi-LSTM is the functional form of the Bi-LSTM bidirectional long short-term memory model; for b j The prediction vector of
[0029] Calculate b j 、 The error is
[0030]
[0031] Where g represents a specific error index. The above operation is performed on each row of X and Y to obtain the error vector E = [e1, e2, ..., e N-m-(n-1) ], is the mean of the error vector E;
[0032] like If it is less than the set value, the training ends;
[0033] Otherwise, E is considered as a function of connection weights and biases, and optimization techniques are used to obtain a smaller Update the connection weights and biases for the optimization goal and recalculate the error vector until If the value is less than the set value, the training ends.
[0034] Furthermore, in S4, the historical load data is input into the trained bidirectional long short-term memory model, and the output of the intraday load power forecast sequence is:
[0035] Use the last n data of the historical load data sequence H [h N-(n-1) ,h N-(n-1) ,…,h N ] as the input vector and input it into the trained Bi-LSTM bidirectional long short-term memory model:
[0036]
[0037] Where: f' Bi-LSTM Indicates that the Bi-LSTM bidirectional long short-term memory model has completed training;
[0038] Update the input vector to Continue to bring in f' Bi-LSTM , and connect the output vector to At the end, the above process is repeated until the obtained vector reaches the predicted target length, and the prediction process ends.
[0039] Furthermore, in S5, the objective function is established by minimizing the total cost of microgrid system operation and maintenance, which means that the total cost of system operation and maintenance includes the cost of external power purchase of microgrid, the cost of abandoned photovoltaic system, the operation and maintenance cost of each entity, the battery degradation cost of energy storage system and the charging cost of electric vehicle;
[0040]
[0041] Where: C TOTAL (t i ) is t i Total system operation and maintenance cost for each period, where N is the total number of periods.
[0042] Furthermore, the total system operation and maintenance cost includes the microgrid's external power purchase cost, the photovoltaic system's abandoned light cost, the operation and maintenance costs of each entity, the energy storage system's battery degradation cost, and the electric vehicle charging cost; its function is:
[0043]
[0044] Where: C EXT (t i ), C PV_CUR (t i ), C MA (t i ), C ESS_DE (ti ), C EV (t i ) are t i External electricity purchase costs during the time period, photovoltaic system curtailment costs, operation and maintenance costs of various entities including photovoltaic systems, energy storage systems, electric vehicle charging piles, battery degradation costs of energy storage systems, and electric vehicle charging costs;
[0045] P EXT (t i ), P PV_CUR (t i ), P PV (t i ), P ESS (t i ), P EV (t i ) are t i The time period is the system's external grid power, abandoned solar power, photovoltaic system output power, energy storage system power, and electric vehicle charging power; ΔT is the control cycle; e EXT (t i ) is t i External grid electricity price during the time period;
[0046] α PV , α ESS , α EV are the operation and maintenance coefficients of the photovoltaic system, energy storage system and charging pile respectively; γ ESS is the battery attenuation coefficient of the ESS system;
[0047] e PV_EV (t i ), e ESS_EV (t i ), e EXT_EV (t i ) are the charging prices of photovoltaic system, energy storage system and external electricity respectively; P PV_EV (t i ) is t i The charging power provided by the photovoltaic system to the electric vehicle during the period, P EXT_EV (t i ) is t i The charging power provided by the external network to the electric vehicle during this period, P ESS_EV (t i ) is t i The charging power provided by the time period energy storage system to electric vehicles, ω PV_EV The price coefficient for photovoltaic charging, dimensionless, ω ESS_EV is the energy storage system charging coefficient, dimensionless, C TOTAL (t i ) is t i Total system cost for the period.
[0048] Furthermore, in S6, the constraints include equality constraints and inequality constraints, wherein the equality constraints include distributed photovoltaic power balance constraints, conventional load power balance constraints, electric vehicle charging power balance constraints, energy storage system charging power balance constraints, energy storage system discharging power balance constraints, and a constraint that at least one of the energy storage system charging / discharging powers is zero in any period of time; the inequality constraints include energy storage system charging and discharging power constraints and energy constraints, energy storage system overcharging and overdischarging constraints, and electric vehicle charging power constraints and overcharging constraints.
[0049] Furthermore, in S6, the constraint conditions include equality constraints and inequality constraints. The equality constraints are:
[0050]
[0051] Where: P PV (t i ) is the distributed photovoltaic output power, P LD (t i ) is t i Total conventional load during the period, P EV (t i ) is t i Electric vehicle charging power during this period, P PV_ESS (t i ), P PV_LD (t i ), P PV_EV (t i ) are t i The active power input from the distributed photovoltaic system to the energy storage system, conventional loads and EVs during the period, P PV_CUR (t i ) is t i Distributed photovoltaic curtailed power during the period, P ESS_LD (t i ), P EXT_LD (t i ) are t i Active power input from ESS and external power grid to conventional load during the period, P ESS_EV (t i ), P EXT_EV (t i ) are the charging power input from the energy storage system and the external power grid to the electric vehicle EV, P ESS_CH (t i ), P ESS_DIS (t i ) are t i The charging / discharging power of ESS during the time period;
[0052] Inequality constraints:
[0053] Inequality constraints include energy storage system charging and discharging power constraints and energy constraints, energy storage system overcharging and overdischarging constraints, and electric vehicle charging power constraints and overcharging constraints;
[0054]
[0055] Where: P ESS_CH (t i ) is the charging power of the energy storage system, P ESS_DIS (t i ) is the discharge power of the energy storage system, P ESS_max is the maximum charge / discharge power of ESS; E ESS_min 、E ESS_max are the highest and lowest energy states of ESS, E ESS (t i ) is the energy storage system at t i Energy state of the time period, P ESS_CH (t i ), P ESS_DIS (t i ) is the energy storage system t i The charging power and discharging power of the time period, P EV (t i ) is t i The charging power of electric vehicles during this period, E EV (t i ) is the electric vehicle at t i Energy state of the time period, P EV_max is the maximum charging power of EV, E EV_max It is the rated capacity of electric vehicle (EV).
[0056] Furthermore, S6 inputs the basic data and active power prediction sequence and load power prediction sequence data into the power flow controller. The power flow controller first generates the objective function and constraints, and then calls the linear programming solution function of the CVXPY optimizer to obtain the optimal power data sequence of each subject, and obtains the optimal power control plan for each subject of the microgrid.
[0057] Because some of the power and energy constraints of the microgrid's various entities are nonlinear, including the operation and maintenance costs of the photovoltaic system, energy storage system, and electric vehicle charging stations, as well as the degradation cost of the energy storage system's batteries, these constraints are strongly non-convex, making their solution difficult and inefficient. Therefore, these nonlinear constraints are linearized. This is achieved by defining the photovoltaic system, energy storage system, energy storage system operation and maintenance coefficients, and battery degradation coefficients to linearize the operation and maintenance behavior of these systems and the battery degradation behavior. This linearization process accelerates the convergence of the linear programming problem and ensures the optimal solution.
[0058] In solving the day-ahead economic optimization scheduling method for a microgrid taking time-of-use electricity prices into account, the present invention models the optimal power combination problem of each microgrid entity as a linear programming problem for solution, and uses the CVXPY solver to solve it. Some of the power and energy constraints of each microgrid entity are nonlinear constraints. These constraints are strongly non-convex, difficult to solve, and inefficient to solve. Therefore, the nonlinear constraints are linearized, which can accelerate the rapid convergence of the linear programming problem and ensure the optimality of the solution.
[0059] This method leverages time-of-use electricity pricing to minimize microgrid operation and maintenance costs and electric vehicle charging costs as the power control objective for each microgrid entity. The optimal power sequence for each entity is obtained. Furthermore, the objective function is modeled as a linear programming problem and solved using the CVXPY solver, ensuring the optimality of the resulting solution.
[0060] This invention addresses the low optimization efficiency and local optima inherent in existing microgrid scheduling methods. Furthermore, existing methods typically treat electric vehicles as virtual energy storage resources, without considering the impact of charging costs on owners' charging needs. This invention considers owners' willingness to participate in demand response, resulting in simulation results with minimal deviation from actual results and a high degree of consistency. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 Flowchart of the day-ahead economic regulation method for microgrids taking into account time-of-use electricity prices.
[0062] Figure 2 The flowchart of load forecasting based on Bi-LSTM.
[0063] Figure 3 It is a microgrid system model.
[0064] Figure 4 This is an example of a single-day time-of-use electricity price used in the embodiment.
[0065] Figure 5 Comparison between the load forecast results based on Bi-LSTM and the actual load value.
[0066] Figure 6 This is the day-ahead power control scheme for each entity in the microgrid in the embodiment. DETAILED DESCRIPTION
[0067] In the following description of the present invention, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.
[0068] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of the described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or their collections. It should also be understood that the term "and / or" used in the present specification and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0069] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the description and are not to be understood as indicating or implying relative importance. References to "one embodiment" or "some embodiments" etc. described in the present application specification mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.
[0070] The present application is described in detail below with reference to the accompanying drawings and specific implementation methods.
[0071] See attached Figure 1-3 .
[0072] A method for day-ahead economic optimization scheduling of a microgrid taking into account time-of-use electricity prices includes a microgrid, wherein the microgrid comprises a distributed photovoltaic system, an energy storage system, and electric vehicle charging piles, and includes the following steps:
[0073] S1: Acquire data: including basic parameters and data required for prediction. Basic data are electrical parameters of each entity in the microgrid. Data required for prediction are weather forecast data and conventional historical load data. Weather forecast data includes solar irradiance, ambient temperature, and photovoltaic system rated power data.
[0074] S2: Model construction: Construct a distributed photovoltaic power model;
[0075] S3: Model training: Use historical load data to train the Bi-LSTM bidirectional long short-term memory model;
[0076] S4: Model prediction output: Weather forecast data is input into the distributed photovoltaic power model, which outputs a distributed photovoltaic active power forecast sequence. Historical load data is input into the trained Bi-LSTM bidirectional long short-term memory model, which outputs a daily load power forecast sequence.
[0077] S5: Construct objective function: Consider the characteristics of time-of-use electricity prices and establish the objective function to minimize the total operation and maintenance cost of the microgrid system;
[0078] S6: Based on the basic data and the active power prediction sequence of distributed photovoltaics, the load power prediction sequence data, the objective function and the constraints, the target model is solved as a linear programming problem to obtain the optimal power data sequence of each subject.
[0079] The main process of the present invention is as follows Figure 1 As shown in the figure, data preparation includes basic parameters and data required for prediction. The basic data primarily consists of the electrical parameters of each entity, while the data required for prediction consists of weather forecasts and conventional historical load data. The basic data, along with the active power forecast sequence and load forecast sequence data, are input into the power flow controller. The power flow controller first generates the objective function and constraints, then uses the linear programming solver of the CVXPY optimizer to determine the optimal power sequence for each entity.
[0080] The load forecasting process based on the Bi-LSTM bidirectional long short-term memory model is as follows: Figure 2 As shown in the figure, it mainly includes steps such as model training and load forecasting.
[0081] In S2, the distributed photovoltaic power model is:
[0082]
[0083] Where: P AC is the AC output power, kW; η DC / AC is the DC-AC conversion efficiency, %. In this method, η DC / AC Take 99.5%,; G L , G STC They are solar irradiance and standard irradiance, W / m 2 , G STC Take 1000W / m2; P DC0 is the rated power of the photovoltaic panel, kW; γ is the temperature coefficient, which is -0.005 / ℃; T L 、T REF are ambient temperature and reference temperature, respectively, ℃, where T REF Take 25℃;
[0084] The energy model of the energy storage system refers to:
[0085] E ESS (t) = EESS (t-1)+Δt[P ESS (t-1)]η ESS (t-1)
[0086] Where: E ESS (t), E ESS (t-1) is the energy of ESS at time t and time t-1, kWh; Δt is the charge / discharge cycle, min; P ESS (t-1), η ESS (t-1) are the charge / discharge power and efficiency at time t-1, respectively. To simplify the calculation, it is assumed that the efficiency of the ESS charge / discharge process is equal, P ESS (t-1) can be expressed as
[0087] P ESS (t-1) = P ESS_CH (t-1)+P ESS_DIS (t-1)
[0088] Where: P ESS_CH (t-1), P ESS_DIS (t-1) are the charge / discharge power of ESS at time t-1, kW. ESS is not allowed to charge and discharge at the same time, so for any time t i Both
[0089] P ESS_CH (t i )P ESS_DIS (t i )=0.
[0090] Furthermore, in S3, the Bi-LSTM bidirectional long short-term memory model training refers to:
[0091] During training, the Bi-LSTM model is trained using a set of historical load data with several days' hourly resolution. This enables the Bi-LSTM model to have the ability to predict load power with hourly resolution. The trained Bi-LSTM model is then used as the load forecasting model.
[0092] The said several days means no less than 90 days.
[0093] In S3, the Bi-LSTM bidirectional long short-term memory model training refers to:
[0094] Given a number of historical load data series with daily hourly resolution H=[h1,h2,…,h N ],h1,h2,h N is the load power data of the 1st, 2nd, and Nth hour in the historical load data; where N is the sequence length;
[0095] First, the Bi-LSTM bidirectional long short-term memory model is initialized, that is, the connection weights and biases of the model are randomly assigned. Assuming that the lengths of the input and output sequences of the Bi-LSTM bidirectional long short-term memory model are n and m respectively, the sequence is decomposed into two matrices X and Y:
[0096] H=[h1,...,h N ]
[0097]
[0098] Use a j 、b j Represents the jth row of X and Y respectively, that is,
[0099] a j =[h j ,h j+1 ,...,h n+j-1 ]
[0100] b j =[h n+j ,h n+j+1 ,...,h n+m+j-1 ]
[0101] will a j The input Bi-LSTM bidirectional long short-term memory model is,
[0102]
[0103] Where: f Bi-LSTM is the functional form of the Bi-LSTM bidirectional long short-term memory model; for b j The prediction vector of
[0104] Calculate b j 、 The error is
[0105]
[0106] Where g represents a specific error index. The above operation is performed on each row of X and Y to obtain the error vector E = [e1, e2, ..., e N-m-(n-1) ], is the mean of the error vector E;
[0107] like If it is less than the set value, the training ends;
[0108] Otherwise, E is considered as a function of connection weights and biases, and optimization techniques are used to obtain a smaller Update the connection weights and biases for the optimization goal and recalculate the error vector until If the value is less than the set value, the training ends.
[0109] In S4, the historical load data is input into the trained bidirectional long short-term memory model, and the output of the daily load power forecast sequence is:
[0110] Use the last n data of the historical load data sequence H [h N-(n-1) ,h N-(n-1) ,…,h N ] as the input vector and input it into the trained Bi-LSTM bidirectional long short-term memory model:
[0111]
[0112] Where: f' Bi-LSTM Indicates that the Bi-LSTM bidirectional long short-term memory model has completed training;
[0113] Update the input vector to Continue to bring in f' Bi-LSTM , and connect the output vector to At the end, the above process is repeated until the obtained vector reaches the predicted target length, and the prediction process ends.
[0114] The present invention needs to obtain power forecast data of the load for the next 24 hours, with a resolution of hours, and the forecast target length is 24.
[0115] In S5, the objective function is established by minimizing the total cost of microgrid system operation and maintenance: the total cost of system operation and maintenance includes the cost of external power purchase of microgrid, the cost of abandoned photovoltaic system, the operation and maintenance cost of each entity, the battery degradation cost of energy storage system and the charging cost of electric vehicle;
[0116]
[0117] Where: C TOTAL (t i ) is t i Total system operation and maintenance cost for each period, where N is the total number of periods.
[0118] The total system operation and maintenance cost includes the external power purchase cost of the microgrid, the photovoltaic system curtailment cost, the operation and maintenance costs of each entity, the battery degradation cost of the energy storage system, and the electric vehicle charging cost; its function is:
[0119]
[0120] Where: C EXT (t i ), C PV_CUR (t i ), CMA (t i ), C ESS_DE (t i ), C EV (t i ) are t i The external electricity purchase cost during the period, the photovoltaic system abandoned light cost, the operation and maintenance costs of each entity including the photovoltaic system, energy storage system, electric vehicle charging pile, the energy storage system battery degradation cost and electric vehicle charging cost,
[0121] P EXT (t i ), P PV_CUR (t i ), P PV (t i ), P ESS (t i ), P EV (t i ) are t i The power of external grid, abandoned solar power, photovoltaic system output power, energy storage system power and electric vehicle charging power of the system in the time period, kW; ΔT is the control cycle, min; e EXT (t i ) is t i External electricity price during the time period, RMB / kWh;
[0122] α PV , α ESS , α EV are the operation and maintenance coefficients of the photovoltaic system, energy storage system and charging pile, respectively, in yuan / kWh; γ ESS is the battery attenuation coefficient of the ESS system, RMB / kWh;
[0123] e PV_EV (t i ), e ESS_EV (t i ), e EXT_EV (t i ) are the charging prices of photovoltaic system, energy storage system and external electricity respectively; P PV_EV (t i ) is t i The charging power provided by the photovoltaic system to the electric vehicle during the period, kW. EXT_EV (t i ) is t i The charging power provided by the external network to the electric vehicle during this period, kW. P ESS_EV (t i ) is t i The charging power provided by the time period energy storage system to the electric vehicle, kW. PV_EV The price coefficient for photovoltaic charging, dimensionless. ω ESS_EVC is the charging coefficient of the energy storage system, dimensionless. TOTAL (t i ) is t i Total system cost for this period, yuan.
[0124] In S6, the constraints include equality constraints and inequality constraints, wherein the equality constraints include distributed photovoltaic power balance constraints, conventional load power balance constraints, electric vehicle charging power balance constraints, energy storage system charging power balance constraints, energy storage system discharge power balance constraints, and the constraint that at least one of the energy storage system charging / discharging power is zero in any period; the inequality constraints include energy storage system charging and discharging power constraints and energy constraints, energy storage system overcharging and overdischarging constraints, and electric vehicle charging power constraints and overcharging constraints;
[0125] Equality constraints:
[0126]
[0127] Where: P PV (t i ) is the distributed photovoltaic output power. P LD (t i ) is t i Total conventional load during the period. EV (t i ) is t i The charging power of electric vehicles during this period. PV_ESS (t i ), P PV_LD (t i ), P PV_EV (t i ) are t i Active power input from distributed photovoltaic system to energy storage system, conventional load and EV during the period. PV_CUR (t i ) is t i Distributed photovoltaic power abandonment during the period. P ESS_LD (t i ), P EXT_LD (t i ) are t i Active power input from ESS and external power grid to conventional load during the period. ESS_EV (t i ), P EXT_EV (t i ) are the charging power input from the energy storage system and the external power grid to the electric vehicle EV. ESS_CH (t i ), P ESS_DIS (t i ) are t i The charging / discharging power of ESS during the time period;
[0128] Inequality constraints
[0129] Inequality constraints include energy storage system charging and discharging power constraints and energy constraints, energy storage system overcharging and overdischarging constraints, and electric vehicle charging power constraints and overcharging constraints;
[0130]
[0131] Where: P ESS_CH (t i ) is the charging power of the energy storage system, kW. P ESS_DIS (t i ) is the discharge power of the energy storage system, kW. P ESS_max is the maximum charge / discharge power of ESS, kW; E ESS_min 、E ESS_max The highest and lowest energy states of ESS, kWh. ESS (t i ) is the energy storage system at t i Energy state of the time period. ESS_CH (t i ), P ESS_DIS (t i ) is the energy storage system t i Charging power and discharging power of the time period, kW. P EV (t i ) is t i Charging power of electric vehicles during this period, kW. E EV (t i ) is the electric vehicle at t i Energy state of the time period. EV_max is the maximum charging power of EV, kW; E EV_max It is the rated capacity of electric vehicle (EV), in kWh.
[0132] The main process of the microgrid day-ahead economic control algorithm of the present invention is as follows: Figure 1 As shown in Figure 6, the basic data, active power forecast sequence, and load power forecast sequence data are input into the power flow controller. The power flow controller first generates the objective function and constraints, and then calls the linear programming solver function of the CVXPY optimizer to obtain the optimal power data sequence of each entity, thereby obtaining the optimal power control scheme for each entity in the microgrid.
[0133] Example
[0134] See attached Figure 4-6 .
[0135] For example, a microgrid with solar-storage-charging in a domestic industrial park is selected. The system structure is as follows: Figure 3As shown in the figure, the system consists of one energy storage subsystem, two electric vehicle charging stations, and one photovoltaic subsystem. The loads primarily include electric vehicle charging, office loads, and residential loads. The maximum and minimum allowable capacities of the energy storage subsystem are 1000 kWh and 100 kWh, respectively. The rated power of Charging Stations 1 and 2 is 200 kW, and the maximum peak power of the photovoltaic subsystem is 2000 kWp. The energy storage subsystem's daily starting and ending SOC are 0.3 and 0.8, respectively. The costs for the photovoltaic subsystem, energy storage subsystem, and electric vehicle charging station operation and maintenance system are 0.02 yuan / kWh, 0.08 yuan / kWh, and 0.06 yuan / kWh, respectively. Conventional loads primarily include office building loads and industrial loads. The regulation frequency is 15 minutes per cycle. The charging tariff coefficients for the photovoltaic subsystem and energy storage subsystem are 0.6 and 0.8, respectively, meaning that the unit price for charging an electric vehicle using the photovoltaic subsystem and energy storage subsystem is 0.6 times and 0.8 times the utility electricity price, respectively.
[0136] For example, the electricity price model refers to the industrial and commercial daytime electricity price in the city where the microgrid is located. Figure 4 As shown, from low to high, it can be divided into five price segments: deep valley, trough, flat section, peak and spike. For example, Figure 5 This is a comparison curve between the regular load forecast and the actual load for a certain day. The Bi-LSTM load forecasting model uses 360 days of load data for model training. The symmetric mean absolute percentage error (SMAPE) of the predicted load is 1.68%, and the root mean square error (RMSE) is 65.32kW.
[0137] For example, Figure 6 This is the result of power regulation. During the period of 10:00-15:45, the PV output is greater than the conventional load, and the maximum active power of PV reaches 459.55kW, and part of the PV generated electricity is reduced. ESS is mainly used for charging, and low-power charging is performed during the valley electricity price period to reduce the PV power reduction cost. The charging costs of the two charging stations using the method used are 20.35 yuan and 13.79 yuan respectively, and the total charging cost is 34.14. In contrast, using the maximum power charging method, the charging costs of the two charging stations are 162.15 yuan and 15.54 yuan respectively, totaling 177.69 yuan. Using the method of this application, the typical daily charging cost can be reduced by up to 80%.
[0138] This application constructs a photovoltaic-storage-charging microgrid system with flexible loads, and proposes a day-ahead economic dispatch method that takes into account both the total operating cost of the system and the charging cost of electric vehicles. The photovoltaic model and the Bi-LSTM model are used to predict the photovoltaic and load power sequences, respectively. The linear programming tool is used to solve the objective function and determine the optimal control power of each subject. Four typical daily scenarios were selected to test the algorithm. The test results show that the control algorithm not only promotes the coordination and mutual assistance of each subject, but also effectively improves energy utilization. It should be understood that the size of the sequence number of each step in the above embodiment does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of this application.
[0139] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.
Claims
1. A method for day-ahead economic optimization scheduling of a microgrid taking into account time-of-use electricity prices, comprising a microgrid, wherein the microgrid comprises a distributed photovoltaic system, an energy storage system, and an electric vehicle charging station, characterized in that: The following steps are involved: S1: Acquire data: including basic parameters and data required for prediction. Basic data are electrical parameters of each entity in the microgrid. Data required for prediction are weather forecast data and conventional historical load data. Weather forecast data includes solar irradiance, ambient temperature, and photovoltaic system rated power data. S2: Model construction: Construct a distributed photovoltaic power model; S3: Model training: Use historical load data to train the Bi-LSTM bidirectional long short-term memory model; S4: Model prediction output: Weather forecast data is input into the distributed photovoltaic power model, which outputs a distributed photovoltaic active power forecast sequence. Historical load data is input into the trained Bi-LSTM bidirectional long short-term memory model, which outputs a daily load power forecast sequence. S5: Construct objective function: Consider the characteristics of time-of-use electricity prices and establish the objective function to minimize the total operation and maintenance cost of the microgrid system; S6: Based on the basic data and the active power prediction sequence of distributed photovoltaics, the load power prediction sequence data, the objective function and the constraints, the target model is solved as a linear programming problem to obtain the optimal power data sequence of each subject.
2. A method for day-ahead economic optimization scheduling of a microgrid taking into account time-of-use electricity prices according to claim 1, characterized in that: The distributed photovoltaic power model is: Where: P AC is the AC output power; η DC / AC is the DC-AC conversion efficiency, G L , G STC are solar irradiance and standard irradiance respectively; P DC0 is the rated power of the photovoltaic panel, γ is the temperature coefficient, T L 、T REF are the ambient temperature and the reference temperature respectively.
3. The method for day-ahead economic optimization scheduling of a microgrid taking into account time-of-use electricity prices according to claim 1, characterized in that: In S3, the Bi-LSTM bidirectional long short-term memory model training refers to: During training, the Bi-LSTM model is trained using a set of historical load data with several days' hourly resolution. This enables the Bi-LSTM model to have the ability to predict load power with hourly resolution. The trained Bi-LSTM model is then used as the load forecasting model.
4. A method for day-ahead economic optimization scheduling of a microgrid taking into account time-of-use electricity prices according to claim 1 or 3, characterized in that: In S3, the Bi-LSTM bidirectional long short-term memory model training refers to: Given a number of historical load data series with daily hourly resolution H=[h1,h2,…,h N ],h1,h2,h N is the load power data of the 1st, 2nd, and Nth hour in the historical load data; where N is the sequence length; First, the Bi-LSTM bidirectional long short-term memory model is initialized, that is, the connection weights and biases of the model are randomly assigned. Assuming that the lengths of the input and output sequences of the Bi-LSTM bidirectional long short-term memory model are n and m respectively, the sequence is decomposed into two matrices X and Y: H=[h1,...,h N ] Use a j 、b j Represents the jth row of X and Y respectively, that is, a j =[h j ,h j+1 ,...,h n+j-1 ] b j =[h n+j ,h n+j+1 ,...,h n+m+j-1 ] will a j The input Bi-LSTM bidirectional long short-term memory model is, Where: f Bi-LSTM is the functional form of the Bi-LSTM bidirectional long short-term memory model; for b j The prediction vector of Calculate b j 、 The error is Where g represents a specific error index. The above operation is performed on each row of X and Y to obtain the error vector E = [e1, e2, ..., e N-m-(n-1) ], is the mean of the error vector E; like If it is less than the set value, the training ends; Otherwise, E is considered as a function of connection weights and biases, and optimization techniques are used to obtain a smaller Update the connection weights and biases for the optimization goal and recalculate the error vector until If the value is less than the set value, the training ends.
5. The method for day-ahead economic optimization scheduling of a microgrid taking into account time-of-use electricity prices according to claim 1, characterized in that: In S4, the historical load data is input into the trained bidirectional long short-term memory model, and the output of the daily load power forecast sequence is: Use the last n data of the historical load data sequence H [h N-(n-1) ,h N-(n-1) ,…,h N ] as the input vector and input it into the trained Bi-LSTM bidirectional long short-term memory model: Where: f′ Bi-LSTM Indicates that the Bi-LSTM bidirectional long short-term memory model has completed training; Update the input vector to Continue to bring in f′ Bi-LSTM , and connect the output vector to At the end, the above process is repeated until the obtained vector reaches the predicted target length, and the prediction process ends.
6. The method for day-ahead economic optimization scheduling of a microgrid taking into account time-of-use electricity prices according to claim 1, characterized in that: In S5, the objective function is established by minimizing the total cost of microgrid system operation and maintenance, which means that the total cost of system operation and maintenance includes the cost of external power purchase of microgrid, the cost of abandoned photovoltaic system, the operation and maintenance cost of each entity, the battery degradation cost of energy storage system and the charging cost of electric vehicle; Where: C TOTAL (t i ) is t i Total system operation and maintenance cost for each period, where N is the total number of periods.
7. A method for day-ahead economic optimization scheduling of a microgrid taking into account time-of-use electricity prices according to claim 1 or 6, characterized in that: The total system operation and maintenance cost includes the external power purchase cost of the microgrid, the photovoltaic system curtailment cost, the operation and maintenance costs of each entity, the battery degradation cost of the energy storage system, and the electric vehicle charging cost; its function is: Where: C EXT (t i ), C PV_CUR (t i ), C MA (t i ), C ESS_DE (t i ), C EV (t i ) are t i External electricity purchase costs during the time period, photovoltaic system curtailment costs, operation and maintenance costs of various entities including photovoltaic systems, energy storage systems, electric vehicle charging piles, battery degradation costs of energy storage systems, and electric vehicle charging costs; P EXT (t i ), P PV_CUR (t i ), P PV (t i ), P ESS (t i ), P EV (t i ) are t i The system's external grid power, abandoned solar power, photovoltaic system output power, energy storage system power, and electric vehicle charging power during the time period; ΔT is the control cycle; e EXT (t i ) is t i External grid electricity price during the time period; α PV , α ESS , α EV are the operation and maintenance coefficients of the photovoltaic system, energy storage system and charging pile respectively; γ ESS is the battery attenuation coefficient of the ESS system; e PV_EV (t i ), e ESS_EV (t i ), e EXT_EV (t i ) are the charging prices of photovoltaic system, energy storage system and external power respectively; P PV_EV (t i ) is t i The charging power provided by the photovoltaic system to the electric vehicle during the period, P EXT_EV (t i ) is t i The charging power provided by the external network to the electric vehicle during this period, P ESS_EV (t i ) is t i The charging power provided by the time period energy storage system to electric vehicles, ω PV_EV The price coefficient for photovoltaic charging, dimensionless, ω ESS_EV is the energy storage system charging coefficient, dimensionless, C TOTAL (t i ) is t i Total system cost for the period.
8. The method for day-ahead economic optimization scheduling of a microgrid taking into account time-of-use electricity prices according to claim 1, characterized in that: In S6, the constraints include equality constraints and inequality constraints, wherein the equality constraints include distributed photovoltaic power balance constraints, conventional load power balance constraints, electric vehicle charging power balance constraints, energy storage system charging power balance constraints, energy storage system discharge power balance constraints, and the constraint that at least one of the energy storage system charging / discharging power is zero in any period of time; the inequality constraints include energy storage system charging and discharging power constraints and energy constraints, energy storage system overcharging and overdischarging constraints, and electric vehicle charging power constraints and overcharging constraints.
9. A method for day-ahead economic optimization scheduling of a microgrid taking into account time-of-use electricity prices according to claim 1 or 8, characterized in that: In S6, the constraints include equality constraints and inequality constraints. The equality constraints are: Where: P PV (t i ) is the distributed photovoltaic output power, P LD (t i ) is t i Total conventional load during the period, P EV (t i ) is t i Electric vehicle charging power during this period, P PV_ESS (t i ), P PV_LD (t i ), P PV_EV (t i ) are t i The active power input from the distributed photovoltaic system to the energy storage system, conventional loads and EVs during the period, P PV_CUR (t i ) is t i Distributed photovoltaic curtailed power during the period, P ESS_LD (t i ), P EXT_LD (t i ) are t i Active power input from ESS and external power grid to conventional load during the period, P ESS_EV (t i ), P EXT_EV (t i ) are the charging power input from the energy storage system and the external power grid to the electric vehicle EV, P ESS_CH (t i ), P ESS_DIS (t i ) are t i The charging / discharging power of ESS during the time period; Inequality constraints: Inequality constraints include energy storage system charging and discharging power constraints and energy constraints, energy storage system overcharging and overdischarging constraints, and electric vehicle charging power constraints and overcharging constraints; Where: P ESS_CH (t i ) is the charging power of the energy storage system, P ESS_DIS (t i ) is the discharge power of the energy storage system, P ESS_max is the maximum charge / discharge power of ESS; E ESS_min 、E ESS_max are the highest and lowest energy states of ESS, E ESS (t i ) is the energy storage system at t i Energy state of the time period, P ESS_CH (t i ), P ESS_DIS (t i ) is the energy storage system t i The charging power and discharging power of the time period, P EV (t i ) is t i The charging power of electric vehicles during this period, E EV (t i ) is the electric vehicle at t i Energy state of the time period, P EV_max is the maximum charging power of EV, E EV_max It is the rated capacity of electric vehicle (EV).
10. The method for day-ahead economic optimization scheduling of a microgrid taking into account time-of-use electricity prices according to claim 1, characterized in that: The S6 is to input the basic data and the active power prediction sequence and the load power prediction sequence data into the power flow controller. The power flow controller first generates the objective function and constraints, and then calls the linear programming solver function of the CVXPY optimizer to obtain the optimal power data sequence of each subject, and obtain the optimal power control plan for each subject of the microgrid.