A method for optimizing contract maximum demand based on user-side energy storage
By constructing a two-layer mathematical model and using the Golden Segmentation method and Lagrangian relaxation method to solve the problem of users relying on experience to set the maximum contract demand, improving the accuracy of setting and reducing electricity bill costs.
Patent Information
- Application Number
- CN202411898229.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-12-23
AI Technical Summary
When setting the maximum contract demand, users rely mostly on past use experience and lack scientific and systematic decision-making basis, resulting in insufficient accuracy of the set value.
By constructing a two-layer mathematical model, including the upper and lower models, the solution is performed using the golden segmentation method and the Lagrangian relaxation method, the maximum contract demand is optimized to maximize monthly returns.
It provides a scientific and reasonable setting basis, improves the accuracy of the maximum contract demand setting, and effectively reduces the basic electricity bill of users.
Smart Images

Figure CN119398278B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of contract maximum demand optimization, and specifically is a contract maximum demand optimization method based on user-side energy storage. Background Art
[0002] In the two-part electricity price environment, the calculation method of the basic electricity fee has attracted widespread attention in the industry. Among them, the contract maximum demand electricity fee is one of the common means of calculating the basic electricity fee. The contract maximum demand is the monthly maximum electricity consumption limit clearly stipulated in the agreement between the user and the power company. It has the flexibility of monthly adjustment. The user can apply to the power company to change the contract maximum demand for the next month 5 working days in advance. The billing principle is to multiply the contract maximum demand by the demand electricity price to get the basic electricity fee, that is, the basic electricity fee = contract maximum demand × demand electricity price. If the user's actual maximum demand exceeds the contract maximum demand, the excess will be charged an additional fee.
[0003] From the perspective of optimizing the contract maximum demand electricity charges, energy storage systems have significant advantages in reducing users' maximum demand, especially during peak electricity consumption periods. With the help of intelligent scheduling and management mechanisms, energy storage systems can release stored energy during peak load periods, effectively reducing peak loads and thus reducing demand electricity charges. Even if there is no direct correspondence between demand electricity prices and time-of-use electricity prices, reducing maximum demand can actually reduce basic electricity charges.
[0004] However, when setting the maximum demand of the contract, users mostly rely on past usage experience and lack a relatively scientific and systematic decision-making basis, which makes the set value often not accurate enough. Based on this, the present invention proposes a method for optimizing the maximum demand of the contract based on user-side energy storage. The method optimizes and reduces the maximum demand of the contract through a scientific modeling and solution process, thereby reducing the basic electricity bill of the user. Summary of the invention
[0005] The present invention aims to solve at least one of the technical problems existing in the prior art; to this end, the present invention proposes a method for optimizing the maximum contract demand based on user-side energy storage, which is used to solve the technical problem that in the prior art, when setting the maximum contract demand, users mostly rely on past usage experience and lack a relatively scientific and systematic decision-making basis, which makes the set value often not accurate enough.
[0006] To achieve the above object, a first aspect of the present invention provides a method for optimizing the maximum demand of a contract based on user-side energy storage, comprising:
[0007] Step 1: Obtain energy storage data about user-side energy storage;
[0008] Step 2: construct a double-layer mathematical model based on energy storage data; wherein the double-layer mathematical model includes: an upper model and a lower model;
[0009] Step 3: Solve the upper model based on the golden section method to obtain the solution of the upper model;
[0010] Step 4: Solve the lower model based on the Lagrangian relaxation method to obtain the solution of the lower model;
[0011] Step 5: Calculate the maximum monthly return based on the solution of the upper model and the solution of the lower model.
[0012] Preferably, the energy storage data includes: the unit price corresponding to the maximum contract demand, the electricity prices corresponding to different time periods, the number of days of the month when the demand electricity price is reported, the monthly load peak, the rated power of the energy storage system, the additional unit price of the charging amount, the user load, the maximum charging capacity of the energy storage system and the maximum discharging capacity of the energy storage system.
[0013] It should be noted that the monthly load peak refers to the maximum value of the user's electricity load; the rated power of the energy storage system refers to the maximum electric energy that the energy storage system can output; the number of days in the month when the demand electricity price is reported refers to the actual number of days used by the power company to calculate the demand electricity fee within an electricity bill cycle. The demand electricity fee is charged based on the user's maximum electricity demand during a certain period of time in a month, rather than calculated based on the actual amount of electricity consumed; the user load refers to the user's electricity consumption or electricity demand within a certain period of time.
[0014] Preferably, the upper model includes:
[0015] Objective function:
[0016] ;
[0017] in, The maximum contract demand is The maximum monthly profit is is the maximum contract demand, The maximum contract demand is When , the objective function value determined by the lower model is is the unit price corresponding to the maximum quantity required in the contract, is the number of days in the month when the demand price is reported;
[0018] Constraints:
[0019] The scope constraints of the maximum demand of the contract:
[0020] ;
[0021] in, is the monthly load peak, is the energy storage rated power, is the minimum feasible requirement.
[0022] It should be noted that the maximum monthly revenue is equal to the sum of the peak-shaving and valley-filling revenues of each day of the month minus the basic electricity fee; the feasible minimum demand refers to the minimum value of the contract maximum demand that can be set by the user during the contract maximum demand optimization process;
[0023] The objective function is the function that needs to be maximized or minimized in the model, which reflects the goal of optimization; the constraints are the restrictions that must be met in the model to ensure the feasibility of the solution.
[0024] Preferably, the lower layer model comprises:
[0025] Objective function:
[0026] ;
[0027] in, It means maximizing daily profit. represents the amount of electricity charged by the energy storage system during time period t, represents the amount of electricity discharged by the energy storage system during time period t, represents the electricity price corresponding to time period t, θ represents the additional unit price of charging capacity;
[0028] Constraints:
[0029] Energy storage system power conservation constraints:
[0030] ;
[0031] in, Indicates the remaining capacity of the energy storage system at time period t+1, represents the remaining capacity of the energy storage system in time period t, α represents the charging coefficient of the energy storage system, β represents the discharging coefficient of the energy storage system, and 0<α<1<β;
[0032] The power range constraints of the energy storage system:
[0033] ;
[0034] in, Indicates the minimum value of the remaining power of the energy storage system. Indicates the maximum value of the remaining power of the energy storage system;
[0035] Energy storage system power constraints at the beginning and end of the day:
[0036] ;
[0037] in, Indicates the remaining power of the energy storage system at the beginning of the day, Indicates the remaining capacity of the energy storage system at the end of the day;
[0038] The power supply and demand balance constraints among users, power grids, and energy storage systems:
[0039] ;
[0040] in, Indicates time period The power grid supplies represents the user load in time period t;
[0041] The power supply range constraints of the power grid:
[0042] ;
[0043] in, Indicates the length of each period;
[0044] Energy storage system charging capacity range constraints:
[0045] ;
[0046] in, Indicates the maximum charging capacity of the energy storage system;
[0047] Discharge capacity range constraints of energy storage systems:
[0048] ;
[0049] in, Indicates the maximum discharge capacity of the energy storage system.
[0050] It should be noted that the maximum daily revenue is equal to the fees earned from discharging minus the fees paid for charging, minus the additional cost of charging;
[0051] Time period t refers to a time period in which a day is divided into multiple time intervals. It is used to describe the charging and discharging conditions of the energy storage system in each time period. By reasonably setting the charging and discharging plan for each time period, the daily revenue can be maximized while ensuring that the operation of the energy storage system is reasonable and feasible. For example, if a day is divided into 24 hours, then t can take values from 1 to 24.
[0052] T represents the set of all time periods in a day, T={0,1,2,…,N-1}, N is a positive integer. For example, if one hour is a time period, then T={0,1,2,…,23}.
[0053] Preferably, solving the upper model based on the golden section method includes:
[0054] Obtain the feasible minimum demand through calculation;
[0055] The contract maximum demand is calculated based on the feasible minimum demand.
[0056] Preferably, obtaining the feasible minimum demand by calculation includes:
[0057] S1: Order ;
[0058] S2: Order ;in, It refers to the remaining power of the energy storage system at the beginning of period t;
[0059] S3: If ;
[0060] but ;
[0061] otherwise ;
[0062] S4: Update ,if ,make , go to S2; otherwise, let t=t+1 and go to S3 until t≥N, thus obtaining the target .
[0063] It should be noted that if , indicating that the load exceeds the demand value, it must be discharged until the demand value is met, otherwise it can be charged to the maximum capacity; if , indicating that the energy storage system cannot meet the required power requirements, then increase and return to S2; otherwise, continue to process the next time period. When all time periods are processed, the final This is the minimum quantity required to achieve the target.
[0064] Preferably, the step of calculating the contract maximum demand based on the feasible minimum demand includes:
[0065] A1: Set the initial upper bound , the initial lower bound , error control range ; Among them, the initial upper bound and the initial lower bound refer to the initial estimated values used to limit the objective function value during the solution process, the initial upper bound refers to an initial upper limit of the objective function value, and the initial lower bound refers to an initial lower limit of the objective function value;
[0066] A2: Order , , and ;in, and are two trial points in the interval [L,U], and is the objective function value of the upper model at the two trial points;
[0067] A3: If , then execute A4; otherwise, end the algorithm and output the optimal maximum demand ;
[0068] A4: If , update the upper bound for , the lower bound No change, update the original trial point for , update the original trial point is the new trial point D1, and calculates the new trial point , update the original ; Otherwise, update the lower bound for , upper bound No change, update the original trial point for , update the original trial point is the new trial point D2, and calculates the new trial point , update the original ; Return to A3.
[0069] It should be noted that the error control range refers to the "tolerance" in the golden section method (also called "allowable error" or "termination condition").
[0070] Preferably, solving the lower model based on the Lagrangian relaxation method includes:
[0071] Calculated based on the iteration counter ;
[0072] B1: Order ;
[0073] B2: Setting the initial upper bound , the initial lower bound , error control range , step length , iteration counter , the total number of iterations is ; Wherein, step size refers to the iterative step size of the multiplier in the Lagrangian method;
[0074] Let the dimension of the energy storage system charge and discharge vector be N, then , , let the dimension of the remaining power vector of the energy storage system be N+1, then , ; Set the initialization dimension to N Lagrange multiplier vector ;
[0075] B3: The Lagrangian function is calculated based on the conservation constraint of the energy storage system’s electricity changes;
[0076] The Lagrangian function is calculated as:
[0077] ;
[0078] in, , is the vector form of the Lagrange multiplier, , ;
[0079] B4: Update scope;
[0080] B4.1: For ,set up ; Reset , and let t=N-1;
[0081] B4.2: Order ,like , then let ,like , then let ;
[0082] B4.3: Let t = t-1, and return to B4.2;
[0083] B5: Command For the optimal solution of the Lagrangian relaxation problem, solve ;
[0084] for ,if ;
[0085] Then ;
[0086] like When, update ;
[0087] if ,like hour;
[0088] Then ;
[0089] like season ;
[0090] like season ;
[0091] B6: Solution ;
[0092] Any ,if season ;
[0093] if hour, ;
[0094] B7: Update ;
[0095] according to Calculate the objective function value ; and update the upper bound ;
[0096] B8: According to , and find the solution to the original problem: , , ;in, , and is the solution to the original problem; the original problem refers to the objective function of the underlying model;
[0097] B8.1: Order , for t=0 to t=N-1 execute:
[0098] like , then set the charge and discharge flag ;
[0099] like , then set the charge and discharge flag ;
[0100] like , then set the charge and discharge flag ;in, Indicates that the energy storage system is charging; Indicates that the energy storage system is discharging; Indicates that the energy storage system is not performing charging and discharging operations;
[0101] B8.2: If ,renew ;if ,renew ;
[0102] B8.3: If ,but ;
[0103] if ;
[0104] Then ;
[0105] if ,when and hour, ;
[0106] otherwise ;
[0107] B8.4: Update the energy storage system's power conservation constraint to ;
[0108] B9: Update ;
[0109] calculate ,if ,make ,otherwise remain unchanged;
[0110] B10: Update Lagrange multipliers;
[0111] Update the Lagrange multiplier vector using the subgradient method: ;in, is the k-th generation Lagrange multiplier vector, It is the vector of the value on the left side of the equal sign of the energy conservation constraint of the kth generation energy storage system minus the value on the right side of the equal sign. Let the value on the left side of the equal sign of the energy conservation constraint of the system minus the value on the right side of the equal sign be , in vector form ;
[0112] B11: If the termination condition is met or , then the output , go to step B12; otherwise, let k=k+1 and go to step B5;
[0113] B12: Command ,if , go to step B2; otherwise output to the upper model.
[0114] It should be noted that Represents the vector of remaining power of the energy storage system at the beginning of each period, It represents the set of charging power displayed by the energy storage system in each period. Represents the set of discharged electricity displayed by the energy storage system in each period; the Lagrangian function is calculated based on the conservation constraint of the energy storage system's electricity change; where the constraints of the Lagrangian function are all other constraints in the lower model except the conservation constraint of the energy storage system's electricity change;
[0115] set up It represents the minimum power of the energy storage system in the last time period. Let t=N-1 to start from the second to last time period t=N-1 and trace back to the first time period. Let t=t-1 to process the power range of the previous time period. According to the range of the next time period, combined with the rated power of the energy storage, the user load and the power allowed by the maximum demand of the contract, the range of the current time period is limited; after reverse calculation, the required range can be obtained; by updating The range can ensure that the power change of the energy storage system in each time period meets the power balance constraint;
[0116] If ,renew ;if ,renew ; Because according to and information, initially determined status, but because range constraints and may not be implemented The corresponding operation, such as , or If you continue The corresponding instructions will produce the result , which violates range constraints.
[0117] Compared with the prior art, the present invention has the following beneficial effects:
[0118] 1. The present invention solves the problem of inaccurate setting values caused by users relying on past experience when setting the maximum contract demand by constructing a two-layer mathematical model including an upper model and a lower model. The upper model is mainly responsible for optimizing the maximum contract demand, and its objective function is to maximize the monthly profit, and the constraints include the range of the maximum contract demand; the lower model focuses on the daily scheduling of the energy storage system, and maximizes the peak-shaving and valley-filling benefits by optimizing the charging and discharging plan of the energy storage system, while considering the constraints such as the conservation of electricity change, electricity range, and electricity supply and demand balance of the energy storage system; the upper model is solved by the golden section method, the lower model is solved by the Lagrangian relaxation method, and the optimal maximum contract demand is obtained by iterative calculation, which provides users with a scientific and reasonable setting basis and effectively improves the accuracy of the setting of the maximum contract demand.
[0119] 2. The lower-level optimization model designed in the present invention comprehensively considers multiple factors such as user power load, power and capacity of energy storage system, energy loss during energy storage operation, etc., and optimizes with the goal of maximizing the user's peak-shaving and valley-filling benefits. It allows the output of daily charging and discharging plans for energy storage to help users meet the constraints of the maximum contract demand.
[0120] 3. In the double-layer solution method designed by the present invention, the lower layer involves the Lagrangian relaxation method, which greatly simplifies the difficulty of solving the problem by relaxing the conservation constraint of the energy storage system's electric quantity change, achieves a higher solution speed, and also ensures a higher solution quality. In addition, the daily peak-shaving and valley-filling benefits in the lower layer are independent of each other and do not affect each other. Based on this, the solution speed is further improved by using parallel computing. BRIEF DESCRIPTION OF THE DRAWINGS
[0121] 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, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0122] Figure 1 A schematic diagram of the method steps of an embodiment of the present invention;
[0123] Figure 2 A schematic diagram of daily load before and after peak shaving and valley filling under a certain demand value in an embodiment of the present invention;
[0124] Figure 3 Schematic diagram of daily charging and discharging plan of energy storage under a certain demand value according to an embodiment of the present invention. DETAILED DESCRIPTION
[0125] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than 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 are within the scope of protection of the present invention.
[0126] See also Figure 1 The first embodiment of the present invention provides a method for optimizing the maximum demand of a contract based on user-side energy storage, comprising:
[0127] Step 1: Obtain energy storage data about user-side energy storage;
[0128] Step 2: construct a double-layer mathematical model based on energy storage data; wherein the double-layer mathematical model includes: an upper model and a lower model;
[0129] Step 3: Solve the upper model based on the golden section method to obtain the solution of the upper model;
[0130] Step 4: Solve the lower model based on the Lagrangian relaxation method to obtain the solution of the lower model;
[0131] Step 5: Calculate the maximum monthly return based on the solution of the upper model and the solution of the lower model.
[0132] Energy storage data, including: the unit price corresponding to the maximum contract demand, the electricity prices corresponding to different time periods, the number of days in the month when the demand electricity price is reported, the monthly load peak, the rated power of the energy storage system, the unit price of the additional charge, the user load, the maximum charging capacity of the energy storage system and the maximum discharging capacity of the energy storage system.
[0133] The upper model includes:
[0134] Objective function:
[0135] ;
[0136] in, The maximum contract demand is The maximum monthly profit is is the maximum contract demand, The maximum contract demand is When , the objective function value determined by the lower model is is the unit price corresponding to the maximum quantity required in the contract, is the number of days in the month when the demand price is reported;
[0137] Constraints:
[0138] The scope constraints of the maximum demand of the contract:
[0139] ;
[0140] in, is the monthly load peak, is the energy storage rated power, is the minimum feasible requirement.
[0141] The lower-level model includes:
[0142] Objective function:
[0143] ;
[0144] in, It means maximizing daily profit. represents the amount of electricity charged by the energy storage system during time period t, represents the amount of electricity discharged by the energy storage system during time period t, represents the electricity price corresponding to time period t, θ represents the additional unit price of charging capacity;
[0145] Constraints:
[0146] Energy storage system power conservation constraints:
[0147] ;
[0148] in, Indicates the remaining capacity of the energy storage system at time period t+1, represents the remaining capacity of the energy storage system in time period t, α represents the charging coefficient of the energy storage system, β represents the discharging coefficient of the energy storage system, and 0<α<1<β;
[0149] The power range constraints of the energy storage system:
[0150] ;
[0151] in, Indicates the minimum value of the remaining power of the energy storage system. Indicates the maximum value of the remaining power of the energy storage system;
[0152] Energy storage system power constraints at the beginning and end of the day:
[0153] ;
[0154] in, Indicates the remaining power of the energy storage system at the beginning of the day, Indicates the remaining capacity of the energy storage system at the end of the day;
[0155] The power supply and demand balance constraints among users, power grids, and energy storage systems:
[0156] ;
[0157] in, Indicates time period The power grid supplies represents the user load in time period t;
[0158] The power supply range constraints of the power grid:
[0159] ;
[0160] in, Indicates the length of each period;
[0161] Energy storage system charging capacity range constraints:
[0162] ;
[0163] in, Indicates the maximum charging capacity of the energy storage system;
[0164] Discharge capacity range constraints of energy storage systems:
[0165] ;
[0166] in, Indicates the maximum discharge capacity of the energy storage system.
[0167] The upper model is solved based on the golden section method, including: obtaining the feasible minimum demand by calculation; and obtaining the contract maximum demand based on the feasible minimum demand.
[0168] The feasible minimum demand is obtained through calculation, including:
[0169] S1: Order ;
[0170] S2: Order ;in, It refers to the remaining power of the energy storage system at the beginning of period t;
[0171] S3: If ;
[0172] but ;
[0173] otherwise ;
[0174] S4: Update ,if ,make , go to S2; otherwise, let t=t+1 and go to S3 until t≥N, thus obtaining the target .
[0175] The maximum contract demand is calculated based on the feasible minimum demand, including:
[0176] A1: Set the initial upper bound , the initial lower bound , error control range ; Among them, the initial upper bound and the initial lower bound refer to the initial estimated values used to limit the objective function value during the solution process, the initial upper bound refers to an initial upper limit of the objective function value, and the initial lower bound refers to an initial lower limit of the objective function value;
[0177] A2: Order , , and ;in, and are two trial points in the interval [L,U], and is the objective function value of the upper model at the two trial points;
[0178] A3: If , then execute A4; otherwise, end the algorithm and output the optimal maximum demand ;
[0179] A4: If , update the upper bound for , the lower bound No change, update the original trial point for , update the original trial point is the new trial point D1, and calculates the new trial point , update the original ; Otherwise, update the lower bound for , upper bound No change, update the original trial point for , update the original trial point is the new trial point D2, and calculates the new trial point , update the original ; Return to A3.
[0180] The underlying model is solved based on the Lagrangian relaxation method, including:
[0181] Calculated based on the iteration counter ;
[0182] B1: Order ;
[0183] B2: Setting the initial upper bound , the initial lower bound , error control range , step length , iteration counter , the total number of iterations is ; Wherein, step size refers to the iterative step size of the multiplier in the Lagrangian method;
[0184] Let the dimension of the energy storage system charge and discharge vector be N, then , , let the dimension of the remaining power vector of the energy storage system be N+1, then , ; Set the initialization dimension to N Lagrange multiplier vector ;
[0185] B3: The Lagrangian function is calculated based on the conservation constraint of the energy storage system’s electricity changes;
[0186] The Lagrangian function is calculated as:
[0187] ;
[0188] in, , is the vector form of the Lagrange multiplier, , ;
[0189] It should be noted that the specific calculation process of the above Lagrangian function is as follows:
[0190] ;
[0191] B4: Update scope;
[0192] B4.1: For ,set up ; Reset , and let t=N-1;
[0193] B4.2: Order ,like , then let ,like , then let ;
[0194] B4.3: Let t = t-1, and return to B4.2;
[0195] B5: Command For the optimal solution of the Lagrangian relaxation problem, solve ;
[0196] for ,if ;
[0197] Then ;
[0198] like When, update ;
[0199] if ,like hour;
[0200] Then ;
[0201] like season ;
[0202] like season ;
[0203] It should be noted that 、 and are independent of each other, so they are split into two independent optimization problems:
[0204] Question 1: ;
[0205] Question 2: ;
[0206] In question 1, the and They do not affect each other, so The optimization problem can be divided into N independent sub-problems: ;
[0207] Depend on ;
[0208] Depend on ;
[0209] Depend on ;
[0210] B6: Solution ;
[0211] Any ,if season ;
[0212] if hour, ;
[0213] B7: Update ;
[0214] according to Calculate the objective function value ; and update the upper bound ;
[0215] B8: According to , and find the solution to the original problem: , , ;in, , and is the solution to the original problem; the original problem refers to the objective function of the underlying model;
[0216] B8.1: Order , for t=0 to t=N-1 execute:
[0217] like , then set the charge and discharge flag ;
[0218] like , then set the charge and discharge flag ;
[0219] like , then set the charge and discharge flag ;in, Indicates that the energy storage system is charging; Indicates that the energy storage system is discharging; Indicates that the energy storage system is not performing charging and discharging operations;
[0220] B8.2: If ,renew ;if ,renew ;
[0221] B8.3: If ,but ;
[0222] if ;
[0223] Then ;
[0224] It should be noted that It is to determine the value of the chargeable capacity, which should be 0 or a value greater than or equal to 0;
[0225] For values greater than or equal to 0, the following three conditions need to be restricted:
[0226] 1. Do not exceed the maximum charge capacity;
[0227] 2. The charging amount plus the load amount does not exceed the required amount;
[0228] 3. No more than in the next period Maximum charge within the constraints;
[0229] if ,when and hour, ;
[0230] otherwise ;
[0231] It should be noted that when It means that discharge is necessary. The discharge amount is equal to the required discharge value. If it is satisfied, it means that the electricity price during this period is not suitable for discharge. Otherwise, it should be the maximum discharge value.
[0232] When the above two conditions are met, the discharge value: does not exceed the maximum discharge value; does not exceed ; not exceeding the next period Maximum discharge within the constraints; not exceeding ;
[0233] If it is not satisfied, the fourth one is not needed, that is, no more than conditions;
[0234] B8.4: Update the energy storage system's power conservation constraint to ;
[0235] B9: Update ;
[0236] calculate ,if ,make ,otherwise remain unchanged;
[0237] B10: Update Lagrange multipliers;
[0238] Update the Lagrange multiplier vector using the subgradient method: ;in, is the k-th generation Lagrange multiplier vector, It is the vector of the value on the left side of the equal sign of the energy conservation constraint of the kth generation energy storage system minus the value on the right side of the equal sign. Let the value on the left side of the equal sign of the energy conservation constraint of the system minus the value on the right side of the equal sign be , in vector form ;
[0239] B11: If the termination condition is met or , then the output , go to step B12; otherwise, let k=k+1 and go to step B5;
[0240] B12: Command ,if , go to step B2; otherwise output to the upper model.
[0241] See also Figure 2 and Figure 3 , respectively give the original load and optimized load curves of the user when the maximum contract demand is 608kW, as well as the time-of-use electricity price and energy storage power curve of the day, where the rated power of the energy storage system is 100kW, the rated capacity is 229kWh, and the electricity price vector is:
[0242] [0.246,0.246,0.246,0.246,0.246,0.246,0.246,0.246,0.246,1.011,1.011,1.011,0.588,0.588,0.588,0.588,0.588,0.588,1.011,1.011,1.011,1.011,0.588,0.588];
[0243] The user load vector is:
[0244] [556.163,555.829,556.005,585.721,580.849,596.778,599.182,605.131,600.035,589.795,579.368,582.991,555.712,639.486,572.888,478.733,344.012,431.929,452.535,511.933,555.273,565.726,562.086,494.281];
[0245] The unit of electricity price is yuan / kWh, the unit of load is kW, and the dimensions of electricity price vector and load vector are both 24, which means that each hour is divided into a time period.
[0246] Figure 3 From 0:00 to 8:00 is the low period of time-of-use electricity price. Due to the low electricity price, the charging cost of the energy storage system is low. The energy storage system performs charging operation and stores electricity. Figure 2 It can be seen that, subject to the maximum demand of the contract, the charging power of the energy storage system decreases as the user's original load gradually increases;
[0247] Function: Reduce electricity costs during peak hours and reduce basic electricity charges;
[0248] Figure 3 The peak electricity price period is from 8 to 11 a.m. Due to the high electricity price, the energy storage system performs discharge operations, reducing the amount of electricity users draw from the grid and earning peak-valley price difference profits.
[0249] Function: Reduce electricity costs during peak hours and reduce basic electricity charges;
[0250] Figure 3 During the flat electricity price period from 11:00 to 13:00, the energy storage system performs charging operations to replenish electricity. Similarly, the charging power of the energy storage system is subject to the maximum demand of the contract and the original load of the user;
[0251] Function: replenish the energy storage system's electricity to prepare for subsequent high electricity price periods;
[0252] Figure 3 From 13:00 to 14:00 is the flat electricity price period, but the energy storage system performs discharge operation, combined with Figure 2 Analysis shows that the reason is that the original load of the user during this period is greater than the maximum demand in the contract. In order to meet the constraints of the maximum demand in the contract and reduce the basic electricity fee, the energy storage system needs to release electricity to reduce the user's load peak;
[0253] Function: Ensure that the user load does not exceed the maximum demand in the contract and reduce the basic electricity fee;
[0254] Figure 3 During the flat electricity price period from 14:00 to 17:00, the energy storage system performs charging operations and stores electrical energy.
[0255] Function: replenish the energy storage system's electricity to prepare for subsequent high electricity price periods;
[0256] Figure 3 The peak electricity price period is from 17:00 to 20:00. Due to the high electricity price, the energy storage system performs discharge operations, releases all the electricity, and earns peak-valley price difference profits;
[0257] Function: Reduce electricity costs during peak hours and reduce basic electricity charges;
[0258] Figure 3 From 20:00 to 24:00, the energy storage system has no remaining power, and there is no profit from the peak-valley price difference. The energy storage system is static and no operation is performed;
[0259] Function: Avoid invalid operations and save resources.
[0260] It should be noted that Figure 3 When the energy storage power is a negative value, it indicates that the energy storage system is performing a charging operation, and the larger the absolute value of the negative value, the greater the charging power of the energy storage system; when the energy storage power is a positive value, it indicates that the energy storage system is performing a discharging operation, and the larger the positive value, the greater the discharging power of the energy storage system.
[0261] This example shows how to use energy storage systems to optimize the user's load curve through specific values and charts to reduce electricity costs and meet the maximum demand constraints of the contract, thereby achieving the following goals:
[0262] 1. Reduce electricity costs: By charging during low electricity price periods and discharging during peak electricity price periods, you can earn profits from the peak-valley price difference.
[0263] 2. Meet the maximum demand in the contract: Through the charging and discharging operations of the energy storage system, ensure that the user's load does not exceed the maximum demand in the contract, thereby reducing the basic electricity fee.
[0264] 3. Improve system efficiency: Improve the utilization rate and economic benefits of the energy storage system by rationally arranging the charging and discharging operations of the energy storage system.
[0265] Through these operations, users can effectively manage electricity costs while ensuring the safe and stable operation of the system.
[0266] Part of the data in the above formula is calculated by removing the dimension and taking its numerical value. The formula is a formula closest to the actual situation obtained by software simulation of a large amount of collected data; the preset parameters and preset thresholds in the formula are set by technical personnel in this field according to actual conditions or obtained through simulation of a large amount of data.
[0267] Working principle of the present invention:
[0268] The present invention obtains energy storage data related to user-side energy storage; constructs a double-layer mathematical model based on the energy storage data; wherein the double-layer mathematical model includes: an upper model and a lower model; solves the upper model based on the golden section method to obtain a solution to the upper model; solves the lower model based on the Lagrange relaxation method to obtain a solution to the lower model; and calculates the maximized monthly revenue based on the solution of the upper model and the solution of the lower model, thereby solving the technical problem that in the prior art, users rely on past usage experience when setting the maximum demand of the contract, lack a relatively scientific and systematic decision-making basis, and the set value is often not accurate enough.
[0269] The above embodiments are only used to illustrate the technical method of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical method of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical method of the present invention.
Claims
1. A method for optimizing the maximum demand of a contract based on user-side energy storage, characterized in that: include: Step 1: Obtain energy storage data about user-side energy storage; Step 2: construct a double-layer mathematical model based on energy storage data; wherein the double-layer mathematical model includes: an upper model and a lower model; Step 3: Solve the upper model based on the golden section method to obtain the solution of the upper model; Step 4: Solve the lower model based on the Lagrangian relaxation method to obtain the solution of the lower model; Step 5: Calculate the maximum monthly return based on the solution of the upper model and the solution of the lower model; The upper model includes: Objective function: ; in, The maximum contract demand is The maximum monthly profit is is the maximum contract demand, The maximum contract demand is When , the objective function value determined by the lower model is is the unit price corresponding to the maximum quantity required in the contract, is the number of days in the month when the demand price is reported; Constraints: The scope of the maximum demand of the contract is restricted by: ; in, is the monthly load peak, is the energy storage rated power, is the minimum feasible requirement; The lower layer model comprises: Objective function: ; in, It means maximizing daily profit. represents the amount of electricity charged by the energy storage system during time period t, represents the amount of electricity discharged by the energy storage system during time period t, represents the electricity price corresponding to time period t, θ represents the additional unit price of charging capacity; Constraints: Energy storage system power conservation constraints: ; in, Indicates the remaining capacity of the energy storage system at time period t+1, represents the remaining capacity of the energy storage system in time period t, α represents the charging coefficient of the energy storage system, β represents the discharging coefficient of the energy storage system, and 0<α<1<β; The power range constraints of the energy storage system: ; in, Indicates the minimum value of the remaining power of the energy storage system. Indicates the maximum value of the remaining power of the energy storage system; Energy storage system power constraints at the beginning and end of the day: ; in, Indicates the remaining power of the energy storage system at the beginning of the day, Indicates the remaining capacity of the energy storage system at the end of the day; The power supply and demand balance constraints among users, power grids, and energy storage systems: ; in, Indicates time period The power grid supplies represents the user load in time period t; The power supply range constraints of the power grid: ; in, Indicates the length of time for each period; Energy storage system charging capacity range constraints: ; in, Indicates the maximum charging capacity of the energy storage system; Discharge capacity range constraints of energy storage systems: ; in, Indicates the maximum discharge capacity of the energy storage system.
2. A method for optimizing the contract maximum demand based on user-side energy storage according to claim 1, characterized in that: The energy storage data includes: the unit price corresponding to the maximum contract demand, the electricity prices corresponding to different time periods, the number of days in the month when the demand electricity price is reported, the monthly load peak, the rated power of the energy storage system, the additional unit price of the charging amount, the user load, the maximum charging capacity of the energy storage system and the maximum discharging capacity of the energy storage system.
3. A method for optimizing the contract maximum demand based on user-side energy storage according to claim 1, characterized in that: The method of solving the upper model based on the golden section method includes: Obtain the feasible minimum demand through calculation; The contract maximum demand is calculated based on the feasible minimum demand.
4. A method for optimizing the contract maximum demand based on user-side energy storage according to claim 3, characterized in that: The feasible minimum demand obtained by calculation includes: S1: Order ; S2: Order ;in, It refers to the remaining power of the energy storage system at the beginning of period t; S3: If ; but ; otherwise ; S4: Update ,if ,make , go to S2; otherwise, let t=t+1 and go to S3 until t≥N, thus obtaining the target .
5. A method for optimizing the contract maximum demand based on user-side energy storage according to claim 3, characterized in that: The contract maximum demand is calculated based on the feasible minimum demand, including: A1: Set the initial upper bound , the initial lower bound , error control range ; Among them, the initial upper bound and the initial lower bound refer to the initial estimated values used to limit the objective function value during the solution process, the initial upper bound refers to an initial upper limit of the objective function value, and the initial lower bound refers to an initial lower limit of the objective function value; A2: Order , , and ;in, and are two trial points in the interval [L,U], and is the objective function value of the upper model at the two trial points; A3: If , then execute A4; otherwise, end the algorithm and output the optimal maximum demand ; A4: If , update the upper bound for , the lower bound No change, update the original trial point for , update the original trial point is the new trial point D1, and calculates the new trial point , update the original ; Otherwise, update the lower bound for , upper bound No change, update the original trial point for , update the original trial point is the new trial point D2, and calculates the new trial point , update the original ; Return to A3.
6. A method for optimizing the contract maximum demand based on user-side energy storage according to claim 1, characterized in that: The method of solving the lower model based on the Lagrangian relaxation method includes: Calculated based on the iteration counter ; B1: Order ; B2: Setting the initial upper bound , the initial lower bound , error control range , step length , iteration counter , the total number of iterations is ; Wherein, step size refers to the iterative step size of the multiplier in the Lagrangian method; Let the dimension of the energy storage system charge and discharge vector be N, then , , let the dimension of the remaining power vector of the energy storage system be N+1, then , ; Set the initialization dimension to N Lagrange multiplier vector ; B3: The Lagrangian function is calculated based on the conservation constraint of the energy storage system’s electricity changes; The Lagrangian function is calculated as: ; in, , is the vector form of the Lagrange multiplier, , ; B4: Update scope; B4.1: For ,set up ; Set again , and let t=N-1; B4.2: Order ,like , then let ,like , then let ; B4.3: Let t = t-1, and return to B4.2; B5: Command For the optimal solution of the Lagrangian relaxation problem, solve ; for ,if ; Then ; like When, update ; if ,like hour; Then ; like season ; like season ; B6: Solution ; Any ,if season ; if hour, ; B7: Update ; according to Calculate the objective function value ; and update the upper bound ; B8: According to , and find the solution to the original problem: , , ;in, , and is the solution to the original problem; the original problem refers to the objective function of the underlying model; B8.1: Order , for t=0 to t=N-1 execute: like , then set the charge and discharge flag ; like , then set the charge and discharge flag ; like , then set the charge and discharge flag ;in, Indicates that the energy storage system is charging; Indicates that the energy storage system is discharging; Indicates that the energy storage system is not performing charging and discharging operations; B8.2: If ,renew ;if ,renew ; B8.3: If ,but ; if ; Then ; if ,when and hour, ; otherwise ; B8.4: Update the energy storage system's power conservation constraint to ; B9: Update ; calculate ,if ,make ,otherwise remain unchanged; B10: Update Lagrange multipliers; Update the Lagrange multiplier vector using the subgradient method: ;in, is the k-th generation Lagrange multiplier vector, It is the vector of the value on the left side of the equal sign of the energy conservation constraint of the kth generation energy storage system minus the value on the right side of the equal sign. Let the value on the left side of the equal sign of the energy conservation constraint of the system minus the value on the right side of the equal sign be , in vector form ; B11: If the termination condition is met or , then the output , go to step B12; otherwise, let k=k+1 and go to step B5; B12: Command ,if , go to step B2; otherwise output to the upper model.
Citation Information
Patent Citations
Centralized shared energy storage capacity configuration and pricing method based on master-slave game
CN115545291A
Integrated energy system double-layer scheduling method and system
CN115663916A