A battery configuration determination method, device, electronic device and storage medium
Through the demand prediction model and genetic algorithm, the battery configuration is optimized, combined with electricity price data and charging and discharging strategies, the problem of deviation in the evaluation results of energy storage battery configuration in the existing technology is solved, and more accurate annual return prediction and battery configuration are achieved.
Patent Information
- Application Number
- CN202411500784.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2044-10-25
AI Technical Summary
When configuring energy storage batteries in the prior art, it is difficult to accurately predict the changes in the power demand and electricity price on the user side, resulting in deviations in the energy storage capacity evaluation results, unable to adapt to the load characteristics of different time periods, affecting the accuracy of annual returns.
By collecting user historical demand data, using demand prediction models and genetic algorithms, combining electricity price data and charging and discharging strategies, correcting the instantaneous charging power, constraining the maximum power and capacity of the battery configuration, and optimizing the battery configuration to minimize the cost recovery period.
It improves the accuracy of energy storage battery configuration and forecast accuracy of annual returns, adapts to the load characteristics of different time periods, and reduces the deviation of annual returns.
Smart Images

Figure CN119029992B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of deep learning and data processing, and in particular to a battery configuration determination method, device, electronic device and storage medium. Background Art
[0002] At present, with the reduction of lithium battery prices, the widening of electricity price differences in various regions, and the development of energy storage integration technology, the demand for configuring energy storage batteries on the user side is increasing. At present and in the next few years, the main and more mature method of user-side energy storage that can be used for commercialization is peak shaving and valley filling to earn the difference in electricity charges. How to configure appropriate energy storage capacity based on the peak shaving and valley filling profit model has become a problem that needs to be solved urgently.
[0003] A more popular method at the current stage is to calculate the average value of each electricity price period or the instantaneous power of each electricity price period based on the target customer's historical instantaneous active power (referring to the effective power absorbed by the circuit in physics) data, and cluster them to calculate the approximate power at which the energy storage battery can be discharged or charged in each time period, thereby inferring the configuration capacity of the energy storage battery. However, this method requires a lot of time for statistics, and at the same time, using statistical values such as average values for capacity evaluation will lose the characteristics of some customer loads, resulting in a relatively general evaluation result, and the estimated annual income under the energy storage capacity will have a large deviation from the annual income when it is actually put into operation.
[0004] The second method is to extract the load data of typical days and use intelligent optimization algorithms such as genetic algorithms to automatically optimize capacity configuration. This method is only suitable for users with relatively stable loads throughout the year, while the load of actual factories may be affected by various factors such as order volume, holidays, and electricity prices, so different months or even different days will have different load characteristics. Therefore, the typical days are extracted for analysis, and the results of the analysis can only be applied to typical days and cannot be generalized to all time periods, which ultimately leads to a large deviation between the theoretical annual income when evaluating capacity and the actual annual income after commissioning. Summary of the invention
[0005] The present application provides a battery configuration determination method, device, electronic device and storage medium.
[0006] An embodiment of the present application provides a method for determining a battery configuration, the method comprising:
[0007] Inputting the collected historical demand data of the user into the demand prediction model for identification to obtain predicted demand data, wherein the predicted demand data includes multiple time points and instantaneous powers corresponding to the time points;
[0008] Adding a label to the instantaneous power based on electricity price data and a charge-discharge strategy, wherein the electricity price data is used to add a corresponding electricity price label to the instantaneous power, and the charge-discharge strategy is used to add a corresponding charge-discharge label to the instantaneous power;
[0009] Based on the user type, the charging instantaneous power in the predicted demand data is corrected according to the capacity or demand, and modified to the rechargeable power to obtain the corrected demand data, and the charging and discharging label corresponding to the charging instantaneous power is charging;
[0010] Acquire multiple battery configurations, and constrain multiple instantaneous powers in the modified demand data based on maximum power and maximum capacity of the battery configurations and the charge and discharge tags to obtain target demand data corresponding to the battery configurations, wherein the maximum power and maximum capacity of the battery configurations are determined based on battery performance parameters and the battery configurations;
[0011] Determine the revenue corresponding to the battery configuration based on the target demand data and the electricity price tag, and determine the cost recovery period corresponding to the battery configuration based on the revenue;
[0012] A new battery configuration is determined based on the multiple battery configurations through a genetic algorithm, and the revenue and cost recovery period corresponding to the new battery configuration are recalculated until the cost recovery period is minimized, and the battery configuration with the smallest corresponding cost recovery period is determined as the target battery configuration.
[0013] The method further comprises:
[0014] Collect the user's first historical demand sample data;
[0015] Extracting features from the first historical demand sample data to obtain time features, electricity consumption behavior features, and production type features;
[0016] Extract features from historical electricity price data to obtain electricity price features;
[0017] Adding the time feature, the electricity consumption behavior feature, the production type feature, and the electricity price feature to the first historical demand sample data to obtain second historical demand sample data;
[0018] dividing the second historical demand sample data into a plurality of third historical demand sample data of a first preset time length;
[0019] Inputting the third historical demand sample data into the initial demand prediction model for identification, and obtaining predicted demand data corresponding to the third historical demand sample data;
[0020] Determine the loss value based on the predicted demand data corresponding to the third historical demand sample data and the label demand data corresponding to the third historical demand sample data, wherein the label demand data is the third historical demand sample data having a time period after and connected to the third historical demand sample data;
[0021] The parameters of the initial demand prediction model are optimized based on the loss value to obtain a demand prediction model.
[0022] Wherein, the user type is a capacity type, and based on the user type, the instantaneous charging power in the predicted demand data is corrected according to the capacity and modified to the chargeable power, including:
[0023] Determine a power threshold of the user equipment based on a performance parameter of the user equipment and a first preset coefficient;
[0024] Correcting the instantaneous charging power in the predicted demand data that is greater than the power threshold to the power threshold;
[0025] Determining a corresponding chargeable power based on the instantaneous charging power and the power threshold;
[0026] The instantaneous charging power is changed into the corresponding chargeable power.
[0027] Wherein, the user type is a demand type, and based on the user type, the instantaneous charging power in the predicted demand data is corrected according to the demand and modified to the chargeable power, including:
[0028] Dividing the predicted demand data into a plurality of predicted demand sub-data of a second preset time length;
[0029] Determining the maximum instantaneous power in the prediction required quantum data, and determining an initial power reference value based on the maximum instantaneous power and a second preset coefficient;
[0030] Determine a power baseline of the predicted required quantum data within the second preset time period based on the initial power reference value and the predicted required quantum data;
[0031] determining a power baseline for the predicted demand data based on a power baseline for the predicted demand sub-data;
[0032] Correcting the instantaneous charging power in the predicted demand data that is greater than the corresponding power reference value to the power reference value;
[0033] Determining a corresponding chargeable power based on the instantaneous charging power and a power reference value corresponding to the instantaneous charging power;
[0034] The instantaneous charging power is changed into the corresponding chargeable power.
[0035] The instantaneous power is constrained based on the maximum power of the battery configuration and the charge and discharge tag, including:
[0036] determining a maximum discharge capacity, a maximum discharge rate, and a maximum charge rate of the battery based on the battery configuration;
[0037] Determining a maximum discharge power based on the maximum discharge capacity, the maximum discharge rate and the one-way discharge efficiency;
[0038] Determine a maximum charging power based on the maximum discharge capacity, the maximum charging rate and the one-way charging efficiency;
[0039] Correcting the instantaneous discharge power in the corrected demand data that is greater than the maximum discharge power to the maximum discharge power, wherein the charge and discharge label corresponding to the instantaneous discharge power is discharge;
[0040] The instantaneous charging power in the corrected demand data that is greater than the maximum charging power is corrected to the maximum charging power.
[0041] The instantaneous power is constrained based on the maximum capacity of the battery configuration and the charge and discharge tag, including:
[0042] determining a maximum capacity and a maximum discharge capacity of the battery based on the battery configuration;
[0043] Determining the discharge amount or charge amount between every two adjacent instantaneous powers in the corrected demand data;
[0044] Taking the maximum discharge capacity as the initial remaining capacity, and traversing all instantaneous powers in the order of the time points corresponding to the instantaneous powers;
[0045] Subtract the discharge amount corresponding to the current instantaneous power from the remaining capacity or add the charge amount corresponding to the current instantaneous power to obtain the current remaining capacity;
[0046] If the charge / discharge label corresponding to the current instantaneous power is discharge and the current remaining capacity is less than the minimum remaining capacity, the current remaining capacity is modified to the minimum remaining capacity, where the minimum remaining capacity is determined based on the maximum capacity and the maximum discharge capacity;
[0047] If the charge / discharge label corresponding to the current instantaneous power is charging and the current remaining capacity is greater than the maximum capacity, the current remaining capacity is modified to the maximum capacity;
[0048] After the traversal is completed, the remaining capacity corresponding to each instantaneous power is obtained.
[0049] The method further comprises:
[0050] Determine the supplementary discharge amount corresponding to the discharge instantaneous power based on the discharge instantaneous power corrected to the maximum discharge power in the corrected demand data, the maximum discharge power, and the instantaneous power before correction of the discharge instantaneous power;
[0051] The supplementary charging amount corresponding to the charging instantaneous power is determined based on the charging instantaneous power corrected to the maximum charging power in the corrected demand data, the maximum charging power, and the instantaneous power before correction of the charging instantaneous power.
[0052] Another aspect of the present application provides a battery configuration determination device, the device comprising:
[0053] A calculation module, used to input the collected historical demand data of the user into the demand prediction model for identification to obtain predicted demand data, wherein the predicted demand data includes multiple time points and instantaneous powers corresponding to the time points;
[0054] A processing module, used for adding a label to the instantaneous power based on electricity price data and a charge and discharge strategy, wherein the electricity price data is used for adding a corresponding electricity price label to the instantaneous power, and the charge and discharge strategy is used for adding a corresponding charge and discharge label to the instantaneous power;
[0055] The calculation module is further used to correct the instantaneous charging power in the predicted demand data according to the capacity or demand based on the user type, and modify it to the rechargeable power to obtain the corrected demand data, and the charging and discharging label corresponding to the instantaneous charging power is charging;
[0056] The calculation module is further used to obtain multiple battery configurations, and constrain multiple instantaneous powers in the corrected demand data based on the maximum power and maximum capacity of the battery configuration and the charge and discharge tags to obtain target demand data corresponding to the battery configuration, wherein the maximum power and maximum capacity of the battery configuration are determined based on the battery performance parameters and the battery configuration;
[0057] The calculation module is further used to determine the income corresponding to the battery configuration based on the target demand data and the electricity price tag, and determine the cost recovery period corresponding to the battery configuration based on the income;
[0058] The calculation module is also used to determine a new battery configuration based on the multiple battery configurations through a genetic algorithm, and recalculate the income and cost recovery period corresponding to the new battery configuration until the cost recovery period is minimized, and determine the battery configuration with the smallest corresponding cost recovery period as the target battery configuration.
[0059] In another aspect, the present application provides an electronic device, comprising:
[0060] A processor, a memory for storing instructions executable by the processor;
[0061] The processor is used to read the executable instructions from the memory and execute the instructions to implement the battery configuration determination method.
[0062] On the other hand, the present application provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is used to execute the battery configuration determination method.
[0063] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present application will become readily understood. In the accompanying drawings, several embodiments of the present application are shown in an exemplary and non-limiting manner, wherein:
[0065] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts.
[0066] Figure 1 A flow chart of a battery configuration determination method according to an embodiment of the present application is shown;
[0067] Figure 2 A flow chart showing a method for determining a battery configuration according to another embodiment of the present application is shown;
[0068] Figure 3 A schematic diagram showing a typical daily load curve of a garment processing enterprise for 12 months according to an embodiment of the present application is shown;
[0069] Figure 4 A flow chart showing a method for determining a battery configuration according to another embodiment of the present application is shown;
[0070] Figure 5 A flow chart showing a method for determining a battery configuration according to another embodiment of the present application is shown;
[0071] Figure 6 A flow chart showing a method for determining a battery configuration according to another embodiment of the present application is shown;
[0072] Figure 7 A flow chart showing a method for determining a battery configuration according to another embodiment of the present application is shown;
[0073] Figure 8A flow chart showing a method for determining a battery configuration according to another embodiment of the present application is shown;
[0074] Fig. 9 A schematic diagram showing a battery replenishment method according to an embodiment of the present application is shown;
[0075] Fig.10 A schematic diagram showing the structure of a battery configuration determination device according to an embodiment of the present application is shown;
[0076] Fig.11 A schematic diagram of the structure of an electronic device according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0077] In order to make the purpose, features, and advantages of the present application more obvious and easy to understand, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.
[0078] In order to determine the accurate revenue and cost recovery period and thus determine the optimal battery configuration by taking into account various factors such as the actual factory order volume, holidays, electricity prices, load characteristics, etc., an embodiment of the present application provides a battery configuration determination method, such as Figure 1 As shown, the method includes:
[0079] Step 101: input the collected historical demand data of the user into a demand prediction model for identification to obtain predicted demand data, wherein the predicted demand data includes a plurality of time points and the instantaneous power corresponding to the time points.
[0080] Before the method starts, it is necessary to collect the user's historical demand data, and the length of the historical demand data is determined based on the length of the demand data to be predicted. For example, if the demand data for the next year needs to be predicted, the historical demand data collected is the user's demand data for the most recent year. The collected historical demand data can be the demand data of the user's entire factory, or the demand data of a specified meter or transformer in the factory. It is also possible to collect the demand data of the entire factory first, and then filter out the demand data of a specified meter or transformer, which is determined based on the user's need to connect to the energy storage battery.
[0081] After the historical demand data of the user is collected, the historical demand data is input into the demand prediction model for identification to obtain predicted demand data, which includes multiple time points and the instantaneous power corresponding to each time point.
[0082] For example, as shown in Table 1, the forecast demand data of a factory includes four time points, namely "2024-09-10, 08:00", "2024-09-10, 09:00", "2024-09-10, 10:00" and "2024-09-10, 11:00". The instantaneous power corresponding to "2024-09-10, 08:00" is 15200KW, the instantaneous power corresponding to "2024-09-10, 09:00" is 16300KW, the instantaneous power corresponding to "2024-09-10, 10:00" is 14700KW, and the instantaneous power corresponding to "2024-09-10, 11:00" is 17000KW.
[0083]
[0084] Table 1
[0085] It should be pointed out that the multiple time points in the historical demand data actually collected can be full points or non-full points, and the time intervals between each two time points can be the same or different (if different, the missing data can be supplemented by resampling the abnormal data or by Lagrange interpolation), which is determined based on the collected data. The multiple time points in the predicted demand data obtained based on the historical demand data are the same as the multiple time points in the historical demand data.
[0086] Step 102: adding a label to the instantaneous power based on the electricity price data and the charge and discharge strategy, wherein the electricity price data is used to add a corresponding electricity price label to the instantaneous power, and the charge and discharge strategy is used to add a corresponding charge and discharge label to the instantaneous power.
[0087] After obtaining the forecast demand data, it is necessary to further process the forecast demand data.
[0088] Before the method starts, obtain the electricity price data of each province. For example, the peak electricity consumption months in Zhejiang Province in 2024 are January, July, August, and December, among which the valley electricity price period is from 11:00 to 13:00 and 22:30 to 8:00 the next day, the flat electricity price period is from 17:00 to 21:00, the peak electricity price period is from 8:00 to 9:00 and 21:00 to 22:30, and the peak electricity price period is from 9:00 to 11:00 and 13:00 to 17:00. The regular electricity consumption months are February, March, April, May, June, September, October, and November, among which the valley electricity price period is from 11:00 to 13:00 and 22:30 to 8:00 the next day, the flat electricity price period is from 17:00 to 22:30, and the peak electricity price period is from 8:00 to 11:00 and 13:00 to 17:00. The price of peak electricity will increase by 50%, the price of peak electricity will increase by 35%, and the price of valley electricity will decrease by 60%. The increase and decrease in each time period are based on the price in the normal electricity time period.
[0089] After obtaining the forecast demand data, the electricity price corresponding to each time point is determined according to the electricity price data of the user's province and based on the time period of each time point in the forecast demand data, and the corresponding electricity price label is added.
[0090] For example, the forecast demand data obtained by a user in a factory in Zhejiang is shown in Table 1. The electricity price in the user's area in September 2024 is 0.8 yuan / kWh. The data after adding the electricity price label to the forecast demand data in Zhejiang in 2024 is shown in Table 2. September is a regular electricity consumption month, so "2024-09-10, 07:00" and "2024-09-10, 11:00" are both valley electricity price time periods, and the corresponding electricity price label is "0.48 yuan / kWh". "2024-09-10, 08:00", "2024-09-10, 09:00" and "2024-09-10, 10:00" are all peak electricity price time periods, and the corresponding electricity price label is "1.2 yuan / kWh".
[0091]
[0092] Table 2
[0093] Before the method starts, the corresponding charging and discharging strategy is also formulated based on the electricity price data of each province. Since the purpose of energy storage is to reduce peaks and fill valleys, the strategy is usually to discharge during the peak electricity price period and the peak electricity price period, charge during the valley electricity price period, and neither charge nor discharge during the flat electricity price period. Of course, users can also set the charging and discharging strategy based on their own needs.
[0094] For example, following the above example, after adding labels to the forecast demand data shown in Table 1 based on the charge and discharge strategy formulated based on Zhejiang electricity price data, the forecast demand data obtained is shown in Table 3. Among them, "2024-09-10, 07:00" and "2024-09-10, 11:00" are both valley electricity price time periods, and the corresponding charge and discharge labels are "charging". "2024-09-10, 08:00", "2024-09-10, 09:00" and "2024-09-10, 10:00" are all peak electricity price time periods, and the corresponding charge and discharge labels are "discharging".
[0095]
[0096] Table 3
[0097] Step 103, based on the user type, the instantaneous charging power in the predicted demand data is corrected according to the capacity or demand, and modified to the rechargeable power to obtain the corrected demand data, and the charging and discharging label corresponding to the instantaneous charging power is charging.
[0098] User types include capacity type and demand type. The capacity type means that the user needs to charge at the maximum charging power within the charging time period. The demand type means that the user needs to charge according to the user's original demand, which cannot exceed the user's original demand, resulting in additional demand charges. Since we need to modify the instantaneous charging power to the rechargeable power, the instantaneous charging power in the predicted demand data needs to be corrected according to the capacity or demand.
[0099] When making corrections according to capacity, since some users have the phenomenon of exceeding the capacity of electricity consumption, and the maximum power of the energy storage battery charging and the instantaneous power of the user at the same time cannot exceed the power threshold of the meter or transformer connected to the energy storage battery, it is necessary to correct the instantaneous power exceeding the power threshold to this value to prevent negative values from appearing in the subsequent calculation of the rechargeable power, resulting in logical errors.
[0100] When making corrections according to demand, it is necessary to control the rechargeable power to prevent the rechargeable power plus the user's instantaneous power from exceeding the actual maximum power of the month. It is necessary to pre-set the initial power reference value (the initial power reference value can be set based on experience or based on predicted demand data), and then compare each subsequent instantaneous power of the month with the power reference value. If the instantaneous power P1 at a certain moment t1 of the month is greater than the power reference value, the power reference value at the subsequent moment is corrected to P1. If the instantaneous power P2 at a certain moment t2 after t1 of the month is greater than P1, the power reference value is corrected to P2, and finally the power baseline of the month is formed. The power baseline of the month develops in a gradient upward trend. When entering the next month, the demand baseline is updated with the above logic until the power baseline of the entire data set is obtained. After that, the instantaneous power in the predicted demand data that is greater than the corresponding power reference value in the power baseline is modified to the power reference value.
[0101] After the instantaneous charging power in the predicted demand data is corrected according to the capacity or demand, the instantaneous charging power needs to be modified to the rechargeable power. If the user type is the capacity type, the instantaneous power is subtracted from the power threshold to obtain the rechargeable power corresponding to the instantaneous power. If the user type is the demand type, the instantaneous power is subtracted from the power reference value corresponding to the instantaneous power in the power reference line to obtain the rechargeable power corresponding to the instantaneous power.
[0102] Step 104, obtaining multiple battery configurations, and constraining multiple instantaneous powers in the corrected demand data based on the maximum power and maximum capacity of the battery configuration and the charge and discharge tags to obtain target demand data corresponding to the battery configuration, wherein the maximum power and maximum capacity of the battery configuration are determined based on battery performance parameters and the battery configuration.
[0103] After obtaining the corrected demand data, we need to determine the battery configuration based on the corrected demand data. In this embodiment, the optimal battery configuration is determined by a genetic algorithm. Therefore, it is necessary to first obtain multiple battery configurations (the battery configuration can be pre-set or randomly generated). The battery configuration is the maximum capacity of the battery, that is, the product of the maximum capacity of the smallest battery unit and the number of units.
[0104] For each battery configuration, the instantaneous power in the forecast demand data needs to be constrained based on the maximum power and maximum capacity of the battery configuration to avoid the instantaneous power exceeding the maximum power or maximum capacity of the battery configuration, which would lead to data calculation errors.
[0105] The predicted demand data is constrained based on the maximum power of the battery configuration. Specifically, the instantaneous power greater than the maximum power in the predicted demand data needs to be constrained to the maximum power to prevent the instantaneous power from exceeding the maximum power and causing data errors.
[0106] To constrain the forecast demand data based on the maximum capacity of the battery configuration, it is necessary to determine the maximum discharge capacity under the battery configuration. If the remaining capacity after discharge is less than the difference between the maximum capacity and the maximum discharge capacity (the battery will not discharge all the electricity when discharging, and the remaining part of the electricity is the difference between the maximum capacity and the maximum discharge capacity), the remaining capacity is modified to the difference between the maximum capacity and the maximum discharge capacity. If the remaining capacity after charging is greater than the maximum capacity, the remaining capacity is modified to the maximum capacity. Avoid the subsequent calculation of the electricity that cannot be discharged and the electricity that cannot be charged, resulting in inaccurate calculated benefits and cost recovery years.
[0107] Step 105: Determine the revenue corresponding to the battery configuration based on the target demand data and the electricity price tag, and determine the cost recovery period corresponding to the battery configuration based on the revenue.
[0108] After obtaining the target demand data corresponding to the battery configuration, the target demand data and the electricity price tag determine the revenue corresponding to the battery configuration.
[0109] The specific profit can be calculated based on the following formula :
[0110]
[0111] in, is the discharge amount in the target demand data, is the charging amount in the target demand data, is the electricity price at the corresponding time (determined by the electricity price tag).
[0112] After determining the revenue corresponding to the battery configuration, determine the cost recovery period corresponding to the battery configuration based on the revenue.
[0113] When the length of the forecast demand data is 1 year, the cost recovery period can be calculated based on the following formula: :
[0114]
[0115] in, The investment cost for the battery configuration can be determined based on the maximum capacity of the battery and the unit price per KW.
[0116] Step 106, determining a new battery configuration based on the multiple battery configurations through a genetic algorithm, and recalculating the revenue and cost recovery period corresponding to the new battery configuration until the cost recovery period is minimized, and determining the battery configuration with the smallest corresponding cost recovery period as the target battery configuration.
[0117] After determining the cost recovery years corresponding to multiple battery configurations, the cost recovery years corresponding to the battery configurations are used as the fitness values corresponding to the battery configurations through genetic algorithms, and multiple battery configurations are binary-encoded. Genetic algorithm selection operations are performed on each battery configuration according to its fitness value. Tournament selection is adopted. For the selected parent generation (i.e., the battery configuration with the corresponding fitness value determined), its binary genes are crossover and mutation operations (the parent generation can mutate with itself or crossover with other parent generations) are performed to generate offspring. The binary genes of the offspring are reverse-encoded into real numbers to obtain a new battery configuration, and the income and cost recovery years corresponding to the new battery configuration are recalculated. The above operations are repeated until the cost recovery years are minimized, and the battery configuration with the smallest cost recovery years is determined as the target battery configuration.
[0118] In the above scheme, by inputting the collected historical demand data of users into the demand prediction model for identification, more accurate predicted demand data can be obtained. Adding labels to the predicted demand data based on electricity price data and charging and discharging strategies can fully consider the factors of electricity price and load characteristics in subsequent calculations, thereby improving the accuracy of the predicted demand data. Based on the user type, the charging instantaneous power in the predicted demand data is corrected according to the capacity or demand, so that the charging instantaneous power can meet the user's energy storage needs, and when calculating the corresponding rechargeable power, negative values are avoided, resulting in logical errors. Constraining multiple instantaneous powers in the corrected demand data based on the maximum power and maximum capacity of the battery configuration can avoid instantaneous power exceeding the maximum power or maximum capacity of the battery configuration, resulting in data calculation errors, and avoid subsequent calculations that will not continue to discharge and charge The amount of electricity is calculated, resulting in inaccurate calculated benefits and cost recovery years. Finally, searching for the best battery configuration based on multiple battery configurations through a genetic algorithm can replace the traditional traversal method, thereby quickly obtaining the optimal battery configuration.
[0119] In an example of the present application, a method for determining a battery configuration is also provided. Figure 2 As shown, the method also includes:
[0120] Step 201: Collect the user's first historical demand sample data.
[0121] It is necessary to collect the user's first historical demand sample data through various methods. The more the first historical demand sample data is, the more support it provides for the training of the demand prediction model.
[0122] In this embodiment, the first historical demand sample data may be obtained, including but not limited to, from a load monitoring platform provided by a power grid company such as the State Grid Corporation of China and the China Southern Power Grid Corporation and / or an enterprise.
[0123] Step 202: extract features from the first historical demand sample data to obtain time features, electricity consumption behavior features, and production type features.
[0124] The time characteristics include year characteristics, quarter characteristics, month characteristics, week characteristics, day characteristics, hour characteristics, and minute characteristics. The time characteristics can be directly extracted from the first historical demand sample data.
[0125] As for the electricity consumption behavior characteristics, different enterprises have different electricity consumption behavior characteristics in different months, such as Figure 3 As shown, Figure 3 The typical daily load curve of a garment processing enterprise for 12 months is shown. Figure 3 It can be seen that the load (instantaneous power) of the enterprise is relatively stable during the working hours in the morning, afternoon and evening. Usually, the power consumption behavior characteristics of these time periods can be captured and learned by the deep learning model, so there is no need to extract the power consumption behavior characteristics of these time periods. However, there are sudden changes in the load during the morning work, lunch break and evening rest period, so it is necessary to extract the power consumption behavior characteristics of these time periods.
[0126] Therefore, the time period from which the power consumption behavior characteristics need to be extracted can be determined by determining adjacent instantaneous powers with large changes.
[0127] In this embodiment, the curve of the time period for which the power consumption behavior characteristics need to be extracted is fitted by the fuzzy membership function, and then the corresponding power consumption behavior characteristics are determined based on different types of fuzzy membership function curves. In other implementations, any other method for extracting power consumption behavior characteristics may also be used.
[0128] In this embodiment, the production type characteristics can be obtained by dividing the load types of different months into three categories, high load days, medium load days and low load days, through methods such as K-means clustering. In other implementations, any other method that can extract production type characteristics can also be used.
[0129] Step 203: extract features from historical electricity price data to obtain electricity price features.
[0130] The electricity price feature can be obtained by extracting features from historical electricity price data, and the time period of the historical electricity price data needs to be the same as the time period of the first historical demand sample data.
[0131] Step 204: Add the time feature, the electricity consumption behavior feature, the production type feature, and the electricity price feature to the first historical demand sample data to obtain second historical demand sample data.
[0132] Preferably, after obtaining the second historical quantity demand sample data, the second historical quantity demand sample data may be filtered and cleaned to improve the availability of the second historical quantity demand sample data.
[0133] Preferably, the Lagrange interpolation method may be used to fill in the missing data in the second historical demand sample data, so as to further improve the availability and accuracy of the second historical demand sample data.
[0134] Preferably, quartiles may be used to identify and process extreme outliers in the second historical demand sample data, thereby further improving the accuracy of the second historical demand sample data.
[0135] Preferably, one-hot encoding is used to convert non-numeric features such as production type into numerical features, so as to further improve the availability of the second historical demand sample data.
[0136] Step 205: divide the second historical demand sample data into a plurality of third historical demand sample data of a first preset time length.
[0137] The first preset time length is determined based on the length of the demand data to be predicted. For example, if the demand data for the next year needs to be predicted, the second historical demand sample data is divided into a plurality of third historical demand sample data with a time length of one year.
[0138] For example, the first historical demand sample data includes demand data from 2020 to 2023. If the demand data for the next year needs to be predicted, the first historical demand sample data is divided into four third historical demand sample data for 2020, 2021, 2022 and 2023.
[0139] It should be noted that, in actual segmentation, the previous third historical demand sample data and the next third historical demand sample data are not necessarily connected in time. For example, the previous third historical demand sample data is the demand data from January 1, 2020 to December 31, 2020, and the next third historical demand sample data is the demand data from January 31, 2020 to January 31, 2021. Segmentation can be performed based on specific needs.
[0140] Step 206: input the third historical demand sample data into an initial demand prediction model for identification to obtain predicted demand data corresponding to the third historical demand sample data.
[0141] Step 207 : determining a loss value based on predicted demand data corresponding to the third historical demand sample data and labeled demand data corresponding to the third historical demand sample data, wherein the labeled demand data is the third historical demand sample data whose time period is after and connected to the third historical demand sample data.
[0142] The loss value is determined based on the predicted demand data corresponding to the third historical demand sample data and the label demand data corresponding to the third historical demand sample data.
[0143] The label demand data is the third historical demand sample data whose time period is after and connected to the third historical demand sample data. For example, the third historical demand sample data including the demand data from January 1, 2020 to December 31, 2020 is input into the initial demand prediction model for identification to obtain the corresponding predicted demand data, and the third historical demand sample data including the demand data from January 1, 2021 to December 31, 2021 is used as the corresponding label demand data, and the loss value is calculated.
[0144] Step 208: Optimize the parameters of the initial demand prediction model based on the loss value to obtain a demand prediction model.
[0145] The parameters of the initial demand prediction model are optimized based on the loss value to obtain the demand prediction model.
[0146] In the above scheme, by extracting features from the first historical demand sample data, time features, electricity consumption behavior features and production type features are obtained, and by extracting features from the historical electricity price data, electricity price features are obtained. These feature data are added to the first historical demand sample data to obtain the second historical demand sample data, so that when the demand forecasting model is trained using the second historical demand sample data, the features that may affect the user load, such as order volume, holidays, electricity prices, etc., can be fully learned, thereby significantly improving the accuracy of the forecasting of the trained demand forecasting model.
[0147] In an example of the present application, a method for determining a battery configuration is also provided. Figure 4 As shown, the user type is a capacity type, and based on the user type, the instantaneous charging power in the predicted demand data is corrected according to the capacity and modified to the chargeable power, including:
[0148] Step 301: Determine a power threshold of the user equipment based on a performance parameter of the user equipment and a first preset coefficient.
[0149] When the user type is capacity type, that is, the user needs to be charged according to capacity, the maximum power of the user equipment is determined based on the performance parameters of the user equipment, and usually a first preset coefficient (the insurance coefficient of the user equipment, which can be preset based on experience) is set to constrain the maximum power to prevent safety problems.
[0150] Specifically, the power threshold of the user equipment can be determined based on the following formula :
[0151]
[0152] in, is the maximum power of the user equipment, is a first preset coefficient of the user equipment.
[0153] Step 302: Correct the instantaneous charging power in the predicted demand data that is greater than the power threshold to the power threshold.
[0154] The instantaneous charging power in the predicted demand data that is greater than the power threshold is corrected to the power threshold.
[0155] Step 303: Determine the corresponding chargeable power based on the instantaneous charging power and the power threshold.
[0156] Specifically, the rechargeable power corresponding to the instantaneous charging power can be determined based on the following formula :
[0157]
[0158] in, It is the instantaneous charging power.
[0159] Step 304, changing the instantaneous charging power to the corresponding rechargeable power.
[0160] In the above scheme, the corresponding power threshold is determined based on the maximum power of the user equipment and the first preset coefficient, and then the instantaneous charging power in the predicted demand data that is greater than the power threshold is corrected to the power threshold, so that the maximum power of the energy storage battery charging and the instantaneous power of the user at the same time will not exceed the power threshold of the user equipment connected to the energy storage battery, and prevent negative values from appearing when calculating the rechargeable power, resulting in logical errors. Changing the instantaneous charging power in the predicted demand data to the corresponding rechargeable power can improve the efficiency of subsequent calculation of benefits, and further improve the availability of the predicted demand data.
[0161] In an example of the present application, a method for determining a battery configuration is also provided. Figure 5 As shown, the user type is a demand type, and based on the user type, the instantaneous charging power in the predicted demand data is corrected according to the demand and modified to the rechargeable power, including:
[0162] Step 401: divide the predicted demand data into a plurality of predicted demand sub-data of a second preset duration.
[0163] When the user type is a demand type, that is, the user needs to be charged on demand, the predicted demand data is divided into a plurality of predicted demand sub-data of a second preset time length.
[0164] In this embodiment, the second preset time length is set to 1 month, that is, the predicted demand data is divided into a plurality of predicted demand sub-data with a length of 1 month.
[0165] Step 402: determine the maximum instantaneous power in the prediction required quantum data, and determine an initial power reference value based on the maximum instantaneous power and a second preset coefficient.
[0166] For each predicted required sub-data, the maximum instantaneous power in the predicted required sub-data is determined, and an initial power reference value is determined based on the maximum instantaneous power and a second preset coefficient.
[0167] Specifically, the initial power reference value can be determined based on the following formula :
[0168]
[0169] in, To predict the maximum instantaneous power of the required quantum data, is the second preset coefficient.
[0170] Step 403: Determine a power baseline of the predicted required sub-data within the second preset time period based on the initial power reference value and the predicted required sub-data.
[0171] If the instantaneous power P1 at a certain moment t1 in the time period where the quantum data to be predicted is located is greater than the initial power reference value, the power reference value at the subsequent moment is corrected to P1. If the instantaneous power P2 at a certain moment t2 after the time period t1 is greater than P1, the power reference value is corrected to P2, and finally the power baseline of the time period is formed, that is, the power baseline of the quantum data to be predicted, and the power baseline develops in a gradient ascending trend. The power baseline of each quantum data to be predicted is determined.
[0172] Step 404: determine a power baseline of the predicted demand data based on a power baseline of the predicted demand sub-data.
[0173] The power baselines of all forecast demand sub-data are combined into the power baseline of the entire forecast demand data.
[0174] Step 405: Correct the instantaneous charging power in the predicted demand data that is greater than the corresponding power reference value to the power reference value.
[0175] The charging instantaneous power in the predicted demand data that is greater than the corresponding power reference value is corrected to the power reference value.
[0176] For example, the power baseline value corresponding to "2024-09-10, 08:00" in the power baseline is 14000KW, and the instantaneous power corresponding to "2024-09-10, 08:00" is 15200KW, then the instantaneous power corresponding to "2024-09-10, 08:00" is modified to 14000KW.
[0177] Step 406: Determine the corresponding chargeable power based on the instantaneous charging power and a power reference value corresponding to the instantaneous charging power.
[0178] Specifically, the rechargeable power corresponding to the instantaneous charging power can be determined by the following formula: :
[0179]
[0180] in, is the power reference value corresponding to the instantaneous charging power, It is the instantaneous charging power.
[0181] Step 407, changing the instantaneous charging power to the corresponding rechargeable power.
[0182] In the above scheme, users who are charged on demand need to charge according to their original demand and cannot exceed their original demand, thereby incurring additional demand charges. Therefore, by determining the power baseline of the predicted demand data, and then correcting the instantaneous charging power in the predicted demand data based on the power baseline, the corrected rechargeable power plus the user's instantaneous power at the same time will not exceed the actual maximum power of the month, thereby avoiding additional demand charges for users. Changing the instantaneous charging power in the predicted demand data to the corresponding rechargeable power can improve the efficiency of subsequent profit calculations and further improve the availability of the predicted demand data.
[0183] In an example of the present application, a method for determining a battery configuration is also provided. Figure 6 As shown, constraining the instantaneous power based on the maximum power of the battery configuration and the charge and discharge tag includes:
[0184] Step 501: determine the maximum discharge capacity, maximum discharge rate, and maximum charge rate of the battery based on the battery configuration.
[0185] The maximum discharge capacity, maximum discharge rate, and maximum charge rate of the battery are determined based on the battery configuration.
[0186] Since not all the electricity will be discharged during discharge, some electricity will remain at the end. Therefore, when determining the maximum discharge capacity, it is necessary to multiply the maximum capacity by the discharge depth (that is, the maximum discharge ratio of the battery) to obtain the accurate maximum discharge capacity.
[0187] Step 502: determining a maximum discharge power based on the maximum discharge capacity, the maximum discharge rate and the one-way discharge efficiency.
[0188] The maximum discharge power can be determined based on the following formula :
[0189]
[0190] in, is the maximum discharge capacity, is the maximum discharge rate, is the one-way discharge efficiency.
[0191] Step 503: determine the maximum charging power based on the maximum discharge capacity, the maximum charging rate and the one-way charging efficiency.
[0192] The maximum charging power can be determined based on the following formula :
[0193]
[0194] in, is the maximum discharge capacity, is the maximum charging rate, It is the one-way efficiency of charging.
[0195] Step 504: correct the instantaneous discharge power in the corrected demand data that is greater than the maximum discharge power to the maximum discharge power, and the charge and discharge label corresponding to the instantaneous discharge power is discharge.
[0196] The instantaneous discharge power in the corrected demand data that is greater than the maximum discharge power is corrected to the maximum discharge power.
[0197] Step 505: Correct the instantaneous charging power in the corrected demand data that is greater than the maximum charging power to the maximum charging power.
[0198] The instantaneous charging power in the corrected demand data that is greater than the maximum charging power is corrected to the maximum charging power.
[0199] In the above scheme, since there is consumption during the discharge and charging process, the maximum discharge power is determined based on the maximum discharge capacity, the maximum discharge rate and the one-way discharge efficiency, and the maximum charging power is determined based on the maximum discharge capacity, the maximum charging rate and the one-way charging efficiency. A more accurate maximum discharge power and maximum charging power can be determined. The discharge instantaneous power greater than the maximum discharge power in the corrected demand data is corrected to the maximum discharge power, and the charging instantaneous power greater than the maximum charging power in the corrected demand data is corrected to the maximum charging power, thereby avoiding the discharge instantaneous power exceeding the maximum discharge power of the battery configuration, or the charging instantaneous power exceeding the maximum charging power of the battery configuration in the corrected demand data, which leads to data calculation errors. The availability and accuracy of the corrected demand data are further improved.
[0200] In an example of the present application, a method for determining a battery configuration is also provided. Figure 7 As shown, constraining the instantaneous power based on the maximum capacity of the battery configuration and the charge and discharge tag includes:
[0201] Step 601: determine the maximum capacity and the maximum discharge capacity of the battery based on the battery configuration.
[0202] The maximum capacity and maximum discharge capacity of the battery are determined based on the battery configuration.
[0203] Step 602: Determine the discharge amount or charge amount between every two adjacent instantaneous powers in the modified demand data.
[0204] Based on the charge and discharge tags, it can be determined whether the time period between two adjacent instantaneous powers is discharging or charging. Based on the integration of the two adjacent instantaneous powers and the duration of the interval, the corresponding discharge amount or charge amount can be obtained.
[0205] Step 603: taking the maximum discharge capacity as the initial remaining capacity, and traversing all instantaneous powers in the order of the time points corresponding to the instantaneous powers.
[0206] Step 604: subtract the discharge amount corresponding to the current instantaneous power from the remaining capacity or add the charge amount corresponding to the current instantaneous power to obtain the current remaining capacity.
[0207] Step 605: If the charge and discharge label corresponding to the current instantaneous power is discharge and the current remaining capacity is less than the minimum remaining capacity, the current remaining capacity is modified to the minimum remaining capacity, and the minimum remaining capacity is determined based on the maximum capacity and the maximum discharge capacity.
[0208] Step 606: If the charge / discharge tag corresponding to the current instantaneous power is charging and the current remaining capacity is greater than the maximum capacity, the current remaining capacity is modified to the maximum capacity.
[0209] Step 607: After the traversal is completed, the remaining capacity corresponding to each instantaneous power is obtained.
[0210] For example, after a factory corrects the instantaneous charging power in the forecast demand data, it obtains the corrected demand data shown in Table 4. Based on a certain battery configuration, it determines that the maximum capacity of the battery is 30,000 kWh and the maximum discharge capacity is 28,000 kWh. Then the initial remaining capacity is 28,000 kWh, and all instantaneous powers are traversed in the order of the time points corresponding to the instantaneous powers, that is, all instantaneous powers are traversed in the order from top to bottom in Table 4. Since the initial remaining capacity is 28,000 kWh, the remaining capacity corresponding to the first instantaneous power is 28,000 kWh. Based on the charge and discharge label, it is determined that the time period between the first instantaneous power and the second instantaneous power is a discharge time period. Based on the first instantaneous power and the second instantaneous power and the length of the interval between the two instantaneous powers, it is determined that the discharge amount in this time period is 15850kWh, and the remaining capacity corresponding to the second instantaneous power is 12150kWh. Since it is a discharge, it is necessary to determine whether the remaining capacity is less than the minimum remaining capacity (that is, the difference between the maximum capacity and the maximum discharge capacity, which is 2000kWh). Since the remaining capacity is greater than the minimum remaining capacity, no processing is performed. The same logic as above, the time period between the second instantaneous power and the third instantaneous power is a discharge time period, and the discharge amount corresponding to this time period is determined to be 15750kWh, then the remaining capacity is -3600kWh, which is less than the minimum remaining capacity, so the remaining capacity corresponding to the third instantaneous power is modified to 2000kWh. The time period between the third instantaneous power and the fourth instantaneous power is the charging time period. The charging amount corresponding to this time period is determined to be 15500kWh, and the remaining capacity is 17500kWh. Since it is charging, it is necessary to determine whether the remaining capacity is greater than the maximum capacity. Since the remaining capacity is less than the maximum capacity, no processing is performed. The time period between the fourth instantaneous power and the fifth instantaneous power is the charging time period. The charging amount corresponding to this time period is determined to be 15840kWh, and the remaining capacity is 33350kWh, which is greater than the maximum capacity. Therefore, the remaining capacity corresponding to the fifth instantaneous power is modified to 30000kWh. The traversal is completed, and the remaining capacity corresponding to each instantaneous power in the modified demand data is obtained, that is, the remaining capacity corresponding to each time point.
[0211]
[0212] Table 4
[0213] It should be pointed out that, taking the above example as an example, since the charge and discharge label corresponding to "2024-09-10, 09:00" is discharge, and the charge and discharge label corresponding to "2024-09-10, 10:00" is charge, the specific charge and discharge time period between these two time points is inaccurate. At this time, the charge and discharge conversion time point between the two time points can be clarified based on the charge and discharge strategy, and the conversion time point can be added to the charge and discharge labels corresponding to the two time points.
[0214] In the above scheme, the maximum capacity and minimum remaining capacity corresponding to the battery configuration are first determined, and then the instantaneous power is traversed in order of time points. When the remaining capacity corresponding to the instantaneous power of discharge is less than the minimum remaining capacity, it means that the battery can no longer be discharged, and the corresponding remaining capacity is modified to the minimum remaining capacity. When the remaining capacity corresponding to the instantaneous power of charge is greater than the maximum capacity, it means that the battery is already full and can no longer be charged, and the corresponding remaining capacity is modified to the maximum capacity. This avoids the inclusion of the amount of electricity that cannot be discharged and the amount of electricity that cannot be charged in the subsequent calculations, significantly improving the accuracy of the subsequent calculated benefits and cost recovery years.
[0215] In an example of the present application, a method for determining a battery configuration is also provided. Figure 8 As shown, the method also includes:
[0216] Step 701: determine a supplementary discharge amount corresponding to the discharge instantaneous power based on the discharge instantaneous power corrected to the maximum discharge power in the corrected demand data, the maximum discharge power, and the instantaneous power before correction of the discharge instantaneous power.
[0217] Step 702: determine the supplementary charging amount corresponding to the charging instantaneous power based on the charging instantaneous power corrected to the maximum charging power in the corrected demand data, the maximum charging power, and the instantaneous power before correction of the charging instantaneous power.
[0218] After the instantaneous power is corrected based on the maximum power, there is still a certain problem that the charge amount or discharge amount calculated based on the corrected instantaneous power is smaller than the actual charge amount or the actual discharge amount.
[0219] like Fig. 9 As shown, Fig. 9 The instantaneous power corresponding to time point t1 and time point t2 is shown. The instantaneous power corresponding to time point t1 is P1, the instantaneous power corresponding to time point t2 is P2, and the maximum power of the battery is P3, where P1 is less than P3, and P3 is less than P2. Since the instantaneous power P2 is greater than the maximum power P3 of the battery, it is necessary to constrain the instantaneous power corresponding to time point t2 to P3. After the constraint, the charge or discharge amount obtained by calculation is as follows: Fig. 9However, in the actual charging or discharging process, since the instantaneous power will be limited to P3 after time point t3, the actual charging or discharging amount is as follows Fig. 9 The area of the horizontal shaded part plus the area of the oblique shaded part. Therefore, the calculated charge or discharge capacity is less than the actual charge or discharge capacity. Fig. 9 The area of the middle oblique shaded part needs to be supplemented.
[0220] The amount of charge or discharge that needs to be supplemented can be determined based on the following formula: :
[0221]
[0222] Among them, P1 is the instantaneous power at the previous time point before the instantaneous power is corrected to the maximum power in the corrected demand data (that is, the instantaneous power of discharge corrected to the maximum discharge power or the instantaneous power of charging corrected to the maximum charging power), P2 is the instantaneous power before the instantaneous power is corrected, P3 is the maximum power (that is, the maximum discharge power or the maximum charging power), and t is the time interval between the instantaneous power P1 and the instantaneous power P2.
[0223] The supplementary charge amount or supplementary discharge amount can be added as an additional tag to the corresponding instantaneous power.
[0224] In the above scheme, by performing a power replenishment operation on the instantaneous power corrected based on the maximum power in the corrected demand data, the subsequent calculation of the benefit can be made more accurate, further improving the accuracy of the target battery configuration finally determined.
[0225] In order to implement the above-mentioned battery configuration determination method, as Fig.10 As shown, an example of the present application provides a battery configuration determination device, including:
[0226] The calculation module 10 is used to input the collected historical demand data of the user into the demand prediction model for identification to obtain predicted demand data, wherein the predicted demand data includes multiple time points and the instantaneous power corresponding to the time points;
[0227] A processing module 20, configured to add a label to the instantaneous power based on electricity price data and a charge-discharge strategy, wherein the electricity price data is used to add a corresponding electricity price label to the instantaneous power, and the charge-discharge strategy is used to add a corresponding charge-discharge label to the instantaneous power;
[0228] The calculation module 10 is further used to correct the instantaneous charging power in the predicted demand data according to the capacity or demand based on the user type, and modify it to the rechargeable power to obtain the corrected demand data, and the charging and discharging label corresponding to the instantaneous charging power is charging;
[0229] The calculation module 10 is further used to obtain multiple battery configurations, and constrain multiple instantaneous powers in the corrected demand data based on the maximum power and maximum capacity of the battery configuration and the charge and discharge tag to obtain target demand data corresponding to the battery configuration, wherein the maximum power and maximum capacity of the battery configuration are determined based on the battery performance parameters and the battery configuration;
[0230] The calculation module 10 is further used to determine the income corresponding to the battery configuration based on the target demand data and the electricity price tag, and determine the cost recovery period corresponding to the battery configuration based on the income;
[0231] The calculation module 10 is also used to determine a new battery configuration based on the multiple battery configurations through a genetic algorithm, and recalculate the income and cost recovery period corresponding to the new battery configuration until the cost recovery period is minimized, and determine the battery configuration with the smallest corresponding cost recovery period as the target battery configuration.
[0232] Wherein, the processing module 20 is also used to collect the user's first historical demand sample data;
[0233] The processing module 20 is further used to extract features from the first historical demand sample data to obtain time features, electricity consumption behavior features and production type features;
[0234] The processing module 20 is also used to extract features from historical electricity price data to obtain electricity price features;
[0235] The processing module 20 is further configured to add the time feature, the electricity consumption behavior feature, the production type feature and the electricity price feature to the first historical demand sample data to obtain second historical demand sample data;
[0236] The processing module 20 is further configured to divide the second historical demand sample data into a plurality of third historical demand sample data of a first preset time length;
[0237] The processing module 20 is further configured to input the third historical demand sample data into an initial demand prediction model for identification, and obtain predicted demand data corresponding to the third historical demand sample data;
[0238] The calculation module 10 is further used to determine the loss value based on the predicted demand data corresponding to the third historical demand sample data and the label demand data corresponding to the third historical demand sample data, wherein the label demand data is the third historical demand sample data whose time period is after and connected to the third historical demand sample data;
[0239] The calculation module 10 is further used to optimize the parameters of the initial demand prediction model based on the loss value to obtain a demand prediction model.
[0240] The calculation module 10 is further configured to determine a power threshold of the user equipment based on a performance parameter of the user equipment and a first preset coefficient;
[0241] The calculation module 10 is further configured to correct the instantaneous charging power in the predicted demand data that is greater than the power threshold to the power threshold;
[0242] The calculation module 10 is further used to determine the corresponding chargeable power based on the instantaneous charging power and the power threshold;
[0243] The processing module 20 is further used to change the instantaneous charging power into a corresponding chargeable power.
[0244] Wherein, the processing module 20 is further used to divide the predicted demand data into a plurality of predicted demand sub-data of a second preset time length;
[0245] The calculation module 10 is further used to determine the maximum instantaneous power in the prediction required quantum data, and determine the initial power reference value based on the maximum instantaneous power and the second preset coefficient;
[0246] The calculation module 10 is further configured to determine a power baseline of the predicted required quantum data within the second preset time period based on the initial power reference value and the predicted required quantum data;
[0247] The calculation module 10 is further configured to determine a power baseline of the predicted demand data based on a power baseline of the predicted demand sub-data;
[0248] The calculation module 10 is further used to correct the charging instantaneous power greater than the corresponding power reference value in the predicted demand data to the power reference value;
[0249] The calculation module 10 is further used to determine the corresponding chargeable power based on the charging instantaneous power and the power reference value corresponding to the charging instantaneous power;
[0250] The processing module 20 is further used to change the instantaneous charging power into a corresponding chargeable power.
[0251] Wherein, the calculation module 10 is further used to determine the maximum discharge capacity, maximum discharge rate and maximum charge rate of the battery based on the battery configuration;
[0252] The calculation module 10 is further used to determine the maximum discharge power based on the maximum discharge capacity, the maximum discharge rate and the one-way discharge efficiency;
[0253] The calculation module 10 is further used to determine the maximum charging power based on the maximum discharge capacity, the maximum charging rate and the one-way charging efficiency;
[0254] The calculation module 10 is further used to correct the instantaneous discharge power greater than the maximum discharge power in the corrected demand data to the maximum discharge power, and the charge and discharge label corresponding to the instantaneous discharge power is discharge;
[0255] The calculation module 10 is further configured to correct the instantaneous charging power in the corrected demand data that is greater than the maximum charging power to the maximum charging power.
[0256] Wherein, the calculation module 10 is further used to determine the maximum capacity and the maximum discharge capacity of the battery based on the battery configuration;
[0257] The calculation module 10 is further used to determine the discharge amount or charge amount between every two adjacent instantaneous powers in the corrected demand data;
[0258] The processing module 20 is further configured to use the maximum discharge capacity as the initial remaining capacity and traverse all instantaneous powers in the order of time points corresponding to the instantaneous powers;
[0259] The calculation module 10 is further used to obtain the current remaining capacity by subtracting the discharge amount corresponding to the current instantaneous power or adding the charge amount corresponding to the current instantaneous power from the remaining capacity;
[0260] The calculation module 10 is further configured to modify the current remaining capacity to the minimum remaining capacity if the charge / discharge tag corresponding to the current instantaneous power is discharging and the current remaining capacity is less than the minimum remaining capacity, wherein the minimum remaining capacity is determined based on the maximum capacity and the maximum discharge capacity;
[0261] The calculation module 10 is further configured to modify the current remaining capacity to the maximum capacity if the charge / discharge tag corresponding to the current instantaneous power is charging and the current remaining capacity is greater than the maximum capacity;
[0262] The processing module 20 is also used for, and the calculation module 10 is also used for, obtaining the remaining capacity corresponding to each instantaneous power after the traversal is completed.
[0263] Determine the supplementary discharge amount corresponding to the discharge instantaneous power based on the discharge instantaneous power corrected to the maximum discharge power in the corrected demand data, the maximum discharge power, and the instantaneous power before correction of the discharge instantaneous power;
[0264] The calculation module 10 is further used to determine the supplementary charging amount corresponding to the charging instantaneous power based on the charging instantaneous power corrected to the maximum charging power in the corrected demand data, the maximum charging power and the instantaneous power before correction of the charging instantaneous power.
[0265] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device and a readable storage medium.
[0266] Fig.11 A schematic block diagram of an example electronic device 800 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0267] like Fig.11 As shown, the device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 to a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0268] A number of components in the device 800 are connected to the I / O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0269] The computing unit 801 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above, such as a battery configuration determination method. For example, in some embodiments, the battery configuration determination method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the computing unit 801, one or more steps of the battery configuration determination method described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform the battery configuration determination method in any other appropriate manner (e.g., by means of firmware).
[0270] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), integrated systems on a chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0271] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0272] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0273] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0274] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0275] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0276] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0277] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present disclosure, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0278] The above is only a specific embodiment of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present disclosure, which should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.
Claims
1. A method for determining a battery configuration, the method comprising: Inputting the collected historical demand data of the user into the demand prediction model for identification to obtain predicted demand data, wherein the predicted demand data includes multiple time points and instantaneous powers corresponding to the time points; Adding a label to the instantaneous power based on electricity price data and a charge-discharge strategy, wherein the electricity price data is used to add a corresponding electricity price label to the instantaneous power, and the charge-discharge strategy is used to add a corresponding charge-discharge label to the instantaneous power; Based on the user type, the charging instantaneous power in the predicted demand data is corrected according to the capacity or demand, and modified to the rechargeable power to obtain the corrected demand data, and the charging and discharging label corresponding to the charging instantaneous power is charging; Acquire multiple battery configurations, and constrain multiple instantaneous powers in the modified demand data based on maximum power and maximum capacity of the battery configurations and the charge and discharge tags to obtain target demand data corresponding to the battery configurations, wherein the maximum power and maximum capacity of the battery configurations are determined based on battery performance parameters and the battery configurations; Determine the revenue corresponding to the battery configuration based on the target demand data and the electricity price tag, and determine the cost recovery period corresponding to the battery configuration based on the revenue; Determine a new battery configuration based on the multiple battery configurations by using a genetic algorithm, and recalculate the income and cost recovery period corresponding to the new battery configuration until the cost recovery period is minimized, and determine the battery configuration with the minimum corresponding cost recovery period as the target battery configuration; Wherein, the user type is a capacity type, and based on the user type, the instantaneous charging power in the predicted demand data is corrected according to the capacity and modified to the chargeable power, including: Determine a power threshold of the user equipment based on a performance parameter of the user equipment and a first preset coefficient; Correcting the instantaneous charging power in the predicted demand data that is greater than the power threshold to the power threshold; Determining a corresponding chargeable power based on the instantaneous charging power and the power threshold; Changing the instantaneous charging power to the corresponding rechargeable power; Wherein, the user type is a demand type, and based on the user type, the instantaneous charging power in the predicted demand data is corrected according to the demand and modified to the chargeable power, including: Dividing the predicted demand data into a plurality of predicted demand sub-data of a second preset time length; Determining the maximum instantaneous power in the prediction required quantum data, and determining an initial power reference value based on the maximum instantaneous power and a second preset coefficient; Determine a power baseline of the predicted required quantum data within the second preset time period based on the initial power reference value and the predicted required quantum data; determining a power baseline for the predicted demand data based on a power baseline for the predicted demand sub-data; Correcting the instantaneous charging power in the predicted demand data that is greater than the corresponding power reference value to the power reference value, wherein the power reference value is the value corresponding to the instantaneous charging power at the time point corresponding to the power reference line; Determining a corresponding chargeable power based on the instantaneous charging power and a power reference value corresponding to the instantaneous charging power; The instantaneous charging power is changed into the corresponding chargeable power.
2. The method according to claim 1, further comprising: Collect the user's first historical demand sample data; Extracting features from the first historical demand sample data to obtain time features, electricity consumption behavior features, and production type features; Extract features from historical electricity price data to obtain electricity price features; Adding the time feature, the electricity consumption behavior feature, the production type feature, and the electricity price feature to the first historical demand sample data to obtain second historical demand sample data; dividing the second historical demand sample data into a plurality of third historical demand sample data of a first preset time length; Inputting the third historical demand sample data into the initial demand prediction model for identification, and obtaining predicted demand data corresponding to the third historical demand sample data; Determine the loss value based on the predicted demand data corresponding to the third historical demand sample data and the label demand data corresponding to the third historical demand sample data, wherein the label demand data is the third historical demand sample data having a time period after and connected to the third historical demand sample data; The parameters of the initial demand prediction model are optimized based on the loss value to obtain a demand prediction model.
3. The method according to claim 1, constraining the instantaneous power based on the maximum power of the battery configuration and the charge and discharge tag, comprising: determining a maximum discharge capacity, a maximum discharge rate, and a maximum charge rate of the battery based on the battery configuration; Determining a maximum discharge power based on the maximum discharge capacity, the maximum discharge rate and the one-way discharge efficiency; Determine a maximum charging power based on the maximum discharge capacity, the maximum charging rate and the one-way charging efficiency; Correcting the instantaneous discharge power in the corrected demand data that is greater than the maximum discharge power to the maximum discharge power, wherein the charge and discharge label corresponding to the instantaneous discharge power is discharge; The instantaneous charging power in the corrected demand data that is greater than the maximum charging power is corrected to the maximum charging power.
4. The method according to claim 3, constraining the instantaneous power based on the maximum capacity of the battery configuration and the charge and discharge tag, comprising: determining a maximum capacity and a maximum discharge capacity of the battery based on the battery configuration; Determining the discharge amount or charge amount between every two adjacent instantaneous powers in the corrected demand data; Taking the maximum discharge capacity as the initial remaining capacity, and traversing all instantaneous powers in the order of the time points corresponding to the instantaneous powers; Subtract the discharge amount corresponding to the current instantaneous power from the remaining capacity or add the charge amount corresponding to the current instantaneous power to obtain the current remaining capacity; If the charge / discharge label corresponding to the current instantaneous power is discharge and the current remaining capacity is less than the minimum remaining capacity, the current remaining capacity is modified to the minimum remaining capacity, where the minimum remaining capacity is determined based on the maximum capacity and the maximum discharge capacity; If the charge / discharge label corresponding to the current instantaneous power is charging and the current remaining capacity is greater than the maximum capacity, the current remaining capacity is modified to the maximum capacity; After the traversal is completed, the remaining capacity corresponding to each instantaneous power is obtained.
5. The method according to claim 3, further comprising: Determine the supplementary discharge amount corresponding to the discharge instantaneous power based on the instantaneous power at a previous time point corrected to the discharge instantaneous power corresponding to the maximum discharge power in the corrected demand data, the maximum discharge power, and the instantaneous power before correction of the discharge instantaneous power; The supplementary charging amount corresponding to the charging instantaneous power is determined based on the instantaneous power at a previous time point corrected to the charging instantaneous power corresponding to the maximum charging power in the corrected demand data, the maximum charging power and the instantaneous power before correction of the charging instantaneous power.
6. A battery configuration determination device, the device comprising: A calculation module, used to input the collected historical demand data of the user into the demand prediction model for identification to obtain predicted demand data, wherein the predicted demand data includes multiple time points and instantaneous powers corresponding to the time points; A processing module, used for adding a label to the instantaneous power based on electricity price data and a charge and discharge strategy, wherein the electricity price data is used for adding a corresponding electricity price label to the instantaneous power, and the charge and discharge strategy is used for adding a corresponding charge and discharge label to the instantaneous power; The calculation module is further used to correct the instantaneous charging power in the predicted demand data according to the capacity or demand based on the user type, and modify it to the rechargeable power to obtain the corrected demand data, and the charging and discharging label corresponding to the instantaneous charging power is charging; The calculation module is further used to obtain multiple battery configurations, and constrain multiple instantaneous powers in the corrected demand data based on the maximum power and maximum capacity of the battery configuration and the charge and discharge tags to obtain target demand data corresponding to the battery configuration, wherein the maximum power and maximum capacity of the battery configuration are determined based on the battery performance parameters and the battery configuration; The calculation module is further used to determine the income corresponding to the battery configuration based on the target demand data and the electricity price tag, and determine the cost recovery period corresponding to the battery configuration based on the income; The calculation module is further used to determine a new battery configuration based on the multiple battery configurations through a genetic algorithm, and recalculate the income and cost recovery period corresponding to the new battery configuration until the cost recovery period is minimized, and determine the battery configuration with the smallest corresponding cost recovery period as the target battery configuration; The calculation module is further used to determine the power threshold of the user equipment based on the performance parameter of the user equipment and the first preset coefficient; The calculation module is further used to correct the instantaneous charging power greater than the power threshold in the predicted demand data to the power threshold; The calculation module is further used to determine the corresponding chargeable power based on the instantaneous charging power and the power threshold; The processing module is further used to change the instantaneous charging power into a corresponding rechargeable power; Wherein, the processing module is further used to divide the predicted demand data into a plurality of predicted demand sub-data of a second preset time length; The calculation module is further used to determine the maximum instantaneous power in the prediction required quantum data, and determine the initial power reference value based on the maximum instantaneous power and the second preset coefficient; The calculation module is further used to determine a power baseline of the predicted required quantum data within the second preset time length based on the initial power reference value and the predicted required quantum data; The calculation module is further used to determine a power baseline of the predicted demand data based on a power baseline of the predicted demand sub-data; The calculation module is further used to correct the instantaneous charging power in the predicted demand data that is greater than the corresponding power reference value to the power reference value, where the power reference value is the value corresponding to the instantaneous charging power at the time point corresponding to the power reference line; The calculation module is further used to determine the corresponding chargeable power based on the charging instantaneous power and the power reference value corresponding to the charging instantaneous power; The processing module is further used to change the instantaneous charging power into a corresponding rechargeable power.
7. An electronic device comprising: A processor, a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the battery configuration determination method according to any one of claims 1-5.
8. A computer-readable storage medium storing a computer program, wherein the computer program is used to execute the battery configuration determination method according to any one of claims 1 to 5.
