An energy storage system capacity configuration optimization method, device and storage medium
By constructing a power consumption prediction model and analyzing error patterns, the power consumption prediction results of the energy storage system were corrected, solving the problem of inaccurate capacity configuration of the energy storage system and improving the peak-valley arbitrage benefits of the factory.
Patent Information
- Application Number
- CN202511824487.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-05
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2045-12-05
AI Technical Summary
Existing energy storage system capacity configuration technologies cannot effectively analyze the prediction deviation patterns of electricity consumption forecasting models, resulting in inaccurate energy storage system capacity configuration and affecting the peak-valley arbitrage benefits of factories.
By continuously collecting the factory's total power consumption and weather information, a power consumption prediction model is constructed, noise reduction and error pattern analysis are performed, the prediction results are corrected, and the energy storage system capacity configuration is optimized.
It improves the accuracy of energy storage system capacity configuration, enhances the benefits of peak-valley arbitrage in factories, and reduces the impact of prediction deviations on energy storage system configuration.
Smart Images

Figure CN121308045B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of energy storage system capacity configuration, in particular to an energy storage system capacity configuration optimization method, device and storage medium. BACKGROUND
[0002] The energy storage system capacity configuration technology refers to a systematic technical design process of determining the energy storage capacity, charging and discharging power capacity and standby redundancy of the energy storage system to meet the safe, reliable, economic and efficient operation target and realize precise matching with the demand through technical analysis and quantitative calculation under the constraint of a specific application scenario or the whole life cycle.
[0003] The existing energy storage system capacity configuration technology often establishes a prediction model for predicting the power consumption of the factory on a future date when configuring the capacity of the energy storage system of the factory, so as to meet the demand for precise configuration of the capacity of the energy storage system. The prediction model established has high prediction accuracy when it is first used, can accurately predict the power consumption of the factory on a future date, and thus the capacity configuration of the energy storage system is also very accurate. In the peak-valley arbitrage scenario, the power consumption cost of the factory can be greatly reduced through the charging and discharging price difference. However, as the use time of the prediction model is prolonged, the prediction accuracy will gradually decrease due to production adjustment, weather change and temporary failure and other factors, and the prediction deviation will gradually increase. The technical personnel often find problems through regular review, which has obvious lag, and the prediction deviation will be discovered and adjusted by the relevant technical personnel only when it reaches a certain degree. Before being discovered, there will be a long period of time with large prediction deviation, which will inevitably lead to inaccurate capacity configuration of the energy storage system and affect the benefits of the peak-valley arbitrage of the factory. Therefore, when the existing energy storage system capacity configuration technology configures the capacity of the energy storage system of the factory through the power consumption prediction model, it cannot analyze the law of the prediction deviation of the model and correct the prediction result, so as to improve the accuracy of the capacity configuration of the energy storage system. SUMMARY
[0004] The present application aims to at least solve one of the technical problems in the prior art, by continuously collecting the total power consumption information of the factory every day, obtaining the corresponding weather information, obtaining the factory power weather data; the factory power weather data is denoised, and an electricity power prediction model is constructed to predict the total power consumption of the factory every day, and obtain the electricity power prediction data; the prediction error is calculated according to the electricity power prediction data, and the error law is analyzed, and the predicted total power consumption is corrected to obtain the corrected power prediction data; the predicted power consumption is calculated according to the corrected power prediction data, and the capacity of the energy storage system of the factory is configured and optimized according to the predicted power consumption, so as to solve the problem that the existing energy storage system capacity configuration technology cannot analyze the prediction deviation law of the model when configuring the capacity of the energy storage system of the factory through the power consumption prediction model, and the prediction result is corrected, and the accuracy of the capacity configuration of the energy storage system is improved.
[0005] To achieve the above-mentioned purpose, the present application provides a kind of energy storage system capacity configuration optimization method comprising the following steps:
[0006] Continuously collect the total power consumption information of the factory every day, and obtain the corresponding weather information, obtain the factory power weather data;
[0007] The factory power weather data is denoised, and an electricity power prediction model is constructed to predict the total power consumption of the factory every day, and obtain the electricity power prediction data;
[0008] The prediction error is calculated according to the electricity power prediction data, and the error law is analyzed, and the predicted total power consumption is corrected to obtain the corrected power prediction data;
[0009] The predicted power consumption is calculated according to the corrected power prediction data, and the capacity of the energy storage system of the factory is configured and optimized according to the predicted power consumption.
[0010] Further, continuously collect the total power consumption information of the factory every day, and obtain the corresponding weather information, obtain the factory power weather data comprising the following sub-steps:
[0011] Divide each day into k1 time periods, in turn, as time period 1-time period k1;And any one time period is recorded as the first time period;Select weather environment parameters related to the power consumption of the factory, recorded as weather parameters, and any one weather parameter is recorded as the first parameter;Any one date is recorded as the first date;
[0012] The total power consumption of the factory is collected at the first time interval on the first date, and the collection time is recorded, arranged in time sequence, recorded as the total power consumption sequence of the first date;Wherein, the first time interval is t1;
[0013] Collecting the average value of the first parameter in each time period of the first date and arranging in the order of time period as the parameter variation sequence of the first parameter of the first date; repeating the parameter variation sequence of all weather parameters of the first date;
[0014] Arranging the total power consumption sequence of the first date and the parameter variation sequence of all weather parameters as the factory power weather information of the first date;
[0015] Repeating the collection of the factory power weather information of each date as the factory power weather data.
[0016] Further, the factory power weather data is denoised and a power consumption prediction model is constructed to predict the daily total power consumption of the factory to obtain power consumption prediction data, including the following sub-steps:
[0017] For the total power consumption sequence of the first date, it is recorded as the first power sequence; the first power sequence is evenly divided into a plurality of subsequences with a length of k1, and any one subsequence is recorded as the first subsequence, wherein k1 is the set length;
[0018] The standard deviation of the first subsequence is calculated, recorded as the fluctuation intensity AB of the first subsequence, and the absolute difference value of any two adjacent data in the first subsequence is calculated, recorded as the adjacent absolute difference value, and the maximum adjacent absolute difference value is recorded as the change peak value AC of the first subsequence;
[0019] The fluctuation intensity and change peak value of all subsequences of the first power sequence are repeatedly obtained and arranged in the order of small to large respectively as the fluctuation intensity sequence and change peak value sequence of the first power sequence;
[0020] The fluctuation intensity sequence is divided into two clusters by using the density clustering algorithm, and the maximum value in the cluster with smaller value is obtained, recorded as the fluctuation threshold value; and the change peak value sequence is divided into two clusters by using the density clustering algorithm, and the maximum value in the cluster with smaller value is obtained, recorded as the change threshold value;
[0021] The position sequence number of the fluctuation threshold value in the fluctuation intensity sequence is obtained, recorded as BM0, and the position sequence number of the change threshold value in the change peak value sequence is obtained, recorded as CM0, and BM0+CM0 is recorded as the judgment threshold value AM0.
[0022] Further, the factory power weather data is denoised and a power consumption prediction model is constructed to predict the daily total power consumption of the factory to obtain power consumption prediction data, including the following sub-steps:
[0023] The position sequence number of the fluctuation intensity and change peak value of the first subsequence in the corresponding fluctuation intensity sequence and change peak value sequence is obtained and summed, recorded as the sequence number and DM of the first subsequence;
[0024] If DM is not greater than AM0, the first subsequence is marked as a stable subsequence, and if DM is greater than AM0, the first subsequence is marked as a mutation subsequence; repeat the marking of all subsequences in the first power sequence, and merge adjacent mutation subsequences or adjacent stable subsequences, respectively, as mutation segments and stable segments;
[0025] Any stable segment in the first power sequence is marked as a first stable segment; the size of a second sliding window is set to k2, and the sliding step is 1, starting from the starting position of the first stable segment and sliding backward in turn, for each sliding window, the data in the window is sorted by size, and the median is obtained, and the median is used to replace the data at the center position in the window; repeat the operation to complete the corresponding denoised stable segment; repeat the operation to obtain all denoised stable segments of the first power sequence;
[0026] For each mutation segment in the first power sequence, denoising is performed using wavelet transform, and after completion, the corresponding denoised mutation segment is obtained; and all denoised stable segments are merged to obtain the denoised power sequence of the first date;
[0027] The total power consumption in the first time period in the denoised power sequence is linearly fitted, and the average total power consumption in the first time period is obtained, and the average total power consumption of all time periods in the denoised power sequence is obtained, and is arranged in chronological order, and is marked as the average power sequence of the first date;
[0028] Repeat the operation to obtain the average power sequence of each date in the factory power weather data, and merge it with the factory power weather information, sort it by date, and mark it as denoised power weather data.
[0029] Further, the factory power weather data is denoised and a power consumption prediction model is constructed to predict the daily total power consumption of the factory, and the power prediction data further includes the following sub-steps:
[0030] An initial model is constructed based on an LSTM model, the initial model includes an input layer, a hidden layer and an output layer, and the initial model is set to output the average total power consumption of each time period in the future; the denoised power weather data is used to train the initial model, and after completion, the power prediction model is obtained;
[0031] According to the historical denoised power weather data, the power prediction model is input to obtain the average total power consumption of each time period in the future date, which is marked as the predicted power sequence of the corresponding date;
[0032] Repeat the operation to collect the predicted power sequence of each date, and mark it as the power prediction data.
[0033] Further, the prediction error is calculated according to the electric power prediction data, error law analysis is performed, and the predicted total power consumption is corrected to obtain corrected power prediction data, including the following sub-steps:
[0034] The average power sequence of the predicted power sequence of the first date is obtained, and the average total power consumption predicted in the first period and the actual average total power consumption are obtained respectively; denoted as YP and SP in sequence respectively; and (SP-YP) is denoted as the prediction deviation of the first period. The prediction deviation of all periods of the first date is repeatedly obtained and arranged in time sequence, denoted as the prediction deviation sequence of the first date. The prediction deviation sequence of each date is repeatedly obtained;
[0035] When the capacity of the energy storage system needs to be configured, the prediction power sequence of the future date is obtained by using the electric power prediction model, denoted as the future power sequence;
[0036] The last k3 dates are obtained, denoted as the last reference date, the prediction deviation of the first period of each last reference date is obtained according to the prediction deviation sequence of each last reference date, and the prediction deviation sequence of the first period is sorted from far to near according to the date sequence, denoted as the reference deviation sequence of the first period; wherein k3 is the number of dates set;
[0037] The reference deviation sequence of the first period is evenly divided into segments with a length of k4, denoted as segment 1-segment k4 in turn, and any two segments are combined, denoted as segment combination, and the two segments of any segment combination are denoted as segment i and segment j, i∈[1,k4],j∈[1,k4];
[0038] The absolute difference of the data with the same position sequence number in segment i and segment j is calculated, the sum of all the absolute differences obtained is denoted as the corresponding absolute difference sum DY(ij) of segment i and segment j; and the average value of segment i and segment j is calculated respectively, and the sum is denoted as the average value sum DP(ij) of segment i and segment j; and the average deviation ratio WB(ij) of the corresponding segment combination is calculated, wherein WB(ij)=DY(ij) / DP(ij);
[0039] The average deviation ratio of all segment combinations is repeatedly obtained, and the segment combination with an average deviation ratio not greater than k5 is calculated as a similar combination, the proportion of the number of similar combinations in the total number of segment combinations is calculated, denoted as the similar combination proportion; if the similar combination proportion is not less than k6, the first period is marked as a deviation law period, otherwise the first period is marked as a deviation random period, wherein k5 and k6 are threshold proportions set.
[0040] Further, the prediction error is calculated according to the electric power prediction data, error law analysis is performed, and the predicted total power consumption is corrected to obtain corrected power prediction data, including the following sub-steps:
[0041] If the first time period is a deviation regular time period, any one of the predicted deviations in the reference deviation sequence of the first time period is recorded as RC(m), where m represents the position sequence number; and the sum of all position sequence numbers in the reference deviation sequence of the first time period is calculated and recorded as N0;
[0042] The weighted deviation QC(m) of RC(m) is calculated, where QC(m)=(m / N0)*RC(m); the weighted deviations of all predicted deviations in the reference deviation sequence of the first time period are repeatedly calculated and summed, and recorded as the corrected deviation XW of the first time period; and the corrected deviations of all deviation regular time periods are repeatedly obtained;
[0043] For the average total power consumption in the first time period in the future power sequence, recorded as YW; (YW+XW) is used to replace the predicted average total power consumption in the first time period;
[0044] The replacement of the average total power consumption in all deviation regular time periods in the future power sequence is repeatedly performed, and after the replacement is completed, the future corrected power sequence is obtained and recorded as the corrected power prediction data.
[0045] Further, the predicted power consumption is calculated according to the corrected power prediction data, and the configuration optimization of the energy storage system capacity of the factory is performed according to the predicted power consumption, including the following sub-steps:
[0046] The date corresponding to the future corrected power sequence is recorded as the future date, the peak time period, the flat time period and the valley time period of the future date are obtained, and the power consumption in the peak time period, the flat time period and the valley time period of the future date is calculated according to the future corrected power sequence; and the predicted power consumption in the peak time period, the predicted power consumption in the flat time period and the predicted power consumption in the valley time period are recorded in sequence.
[0047] The energy storage capacity of the energy storage system of the factory is adjusted according to the predicted power consumption in the peak time period and the predicted power consumption in the flat time period.
[0048] In a second aspect, the present application provides an electronic device, including a processor and a memory, wherein the memory stores computer readable instructions, and when the computer readable instructions are executed by the processor, the steps in the above method are executed.
[0049] In a third aspect, the present application provides a storage medium, which stores a computer program, and when the computer program is executed by a processor, the steps in the above method are executed.
[0050] The beneficial effects of the present application are as follows: the present application obtains factory power weather data by continuously collecting daily total power consumption information of the factory and obtaining corresponding weather information; the factory power weather data is denoised, and an electricity consumption power prediction model is constructed to predict the daily total power consumption of the factory, and obtain electricity power prediction data; the prediction error is calculated according to the electricity power prediction data, and error law analysis is performed, and the predicted total power consumption is corrected to obtain corrected power prediction data; the predicted power consumption is calculated according to the corrected power prediction data, and the capacity of the energy storage system of the factory is configured and optimized according to the predicted power consumption; when the capacity of the energy storage system of the factory is configured through the electricity consumption prediction model, the prediction deviation law of the model can be analyzed, and the prediction result is corrected, the accuracy of the capacity configuration of the energy storage system is improved, and the benefits of the factory peak-valley arbitrage are improved.
[0051] The present application divides the daily total power consumption sequence into sub-sequences, and uses fluctuation intensity and change peak value to demarcate stable and mutation segments by density clustering for segment processing, which can effectively remove random noise and isolated abnormal points for stable segments, while retaining long-term trends and periodic characteristics; for mutation segments, the mutation edges can be better preserved, which reduces data noise and does not lose mutation characteristic information, avoiding data distortion caused by excessive smoothing; the prediction deviation of each time period of the last k3 days is formed into a reference deviation sequence in time sequence, and whether there is a deviation law is judged by segment combination, which avoids excessive correction of essentially random errors and prevents the introduction of new deviations; deviation is weighted and summed, which can avoid treating historical deviations equally, emphasizes recent information, and thus improves the correction effect. BRIEF DESCRIPTION OF DRAWINGS
[0052] Figure 1 The step flow chart of the method of the present application is shown in the figure;
[0053] Figure 2 The stable sub-sequence judgment flow chart of the present application is shown in the figure;
[0054] Figure 3 The correction deviation acquisition flow chart of the present application is shown in the figure;
[0055] Figure 4 The structure schematic diagram of the electronic device of the present application is shown in the figure. DETAILED DESCRIPTION
[0056] The technical solutions in the embodiments of the present application will be described clearly and completely in combination 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. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0057] Embodiment 1, please refer to Figure 1 As shown in the accompanying drawings, the application provides a method for optimizing the capacity configuration of an energy storage system, comprising the following steps:
[0058] Step S1, continuously collect the total power consumption information of the factory every day, and obtain the corresponding weather information to obtain the factory power weather data; Step S1 comprises the following sub-steps:
[0059] Step S101, divide each day into k1 time periods, sequentially denoted as time period 1-time period k1; and any one time period is denoted as the first time period; select a weather environment parameter related to the power consumption of the factory, denoted as the weather parameter, and any one weather parameter is denoted as the first parameter; any one date is denoted as the first date; the weather environment parameter related to the power consumption of the factory can be selected according to the actual application scenario, such as temperature, humidity, wind speed, and rainfall, etc.; k1 can be flexibly set according to the actual application scenario, in this embodiment, k1=24, i.e. one hour as one time period; the energy storage capacity is usually determined based on the peak-valley or several business time periods, and the segmentation can directly correspond to these decision time points, so that the subsequent prediction output can be directly used for capacity calculation;
[0060] Step S102, collect the total power consumption of the factory at the first time interval on the first date, and record the collection time, arranged in time order, denoted as the total power consumption sequence of the first date, wherein the first time interval is t1, in this embodiment, t1=0.5s, which can be flexibly set;
[0061] Step S103, collect the average value of the first parameter in the corresponding time period on the first date in each time period, such as average temperature, average wind speed, and average rainfall, etc., and arrange them in the order of time period, denoted as the parameter change sequence of the first parameter of the first date; repeat to obtain the parameter change sequence of all weather parameters of the first date;
[0062] Step S104, record the total power consumption sequence of the first date and the parameter change sequence of all weather parameters as the factory power weather information of the first date;
[0063] Step S105, repeat to collect the factory power weather information of each date, denoted as the factory power weather data; as a sample for subsequent model training;
[0064] In the specific implementation process, the weather usually affects the industrial load; for example, the temperature directly affects the load of refrigeration and heating; the humidity affects the dehumidification load and the process conditions; the wind speed may have an indirect impact on external equipment or cooling efficiency, and taking these weather parameters as inputs can improve the accuracy of the later prediction.
[0065] Step S2, denoising the factory power weather data, and constructing a power consumption prediction model to predict the daily total power consumption of the factory to obtain power prediction data; Step S2 includes the following sub-steps:
[0066] Step S201, referring to Figure 2 the total power consumption sequence of the first date is recorded as a first power sequence; the first power sequence is evenly divided into a plurality of subsequences with a length of k1, and any one subsequence is recorded as a first subsequence, where k1 is the set length; in this embodiment, k1 = 120 data; compared with the overall unified processing, the short-term statistics can reflect the behavior of the load at different time scales within the day, and facilitate local adaptive denoising;
[0067] Step S202, calculating the standard deviation of the first subsequence, recording it as the fluctuation intensity AB of the first subsequence, and calculating the absolute difference value of any two adjacent data in the first subsequence, recording it as the adjacent absolute difference value, and recording the maximum adjacent absolute difference value as the change peak value AC of the first subsequence; the standard deviation reflects the overall noise level within the subsequence, and the maximum adjacent difference reflects the mutation characteristics within the subsequence; the combination of the two helps to distinguish the real mutation segment from the stable segment;
[0068] Step S203, repeatedly obtaining the fluctuation intensity and change peak value of all subsequences of the first power sequence, and arranging them in ascending order respectively to record the fluctuation intensity sequence and the change peak value sequence of the first power sequence;
[0069] Step S204, using the density clustering algorithm to divide the fluctuation intensity sequence into two clusters, and obtaining the maximum value in the cluster with smaller value, recording it as the fluctuation threshold; and using the density clustering algorithm to divide the change peak value sequence into two clusters, and obtaining the maximum value in the cluster with smaller value, recording it as the change threshold; using the distribution of the data itself to automatically determine the fluctuation threshold and the change threshold can avoid the problem that the threshold set by human is easy to fail; the cluster with smaller value represents the stable normal small value cluster, and the maximum value is the upper limit of the normal state, and exceeding it indicates entering the interval of high fluctuation and mutation.
[0070] Step S205, obtaining the position sequence number of the fluctuation threshold in the fluctuation intensity sequence, recording it as BM0, and obtaining the position sequence number of the change threshold in the change peak value sequence, recording it as CM0, and BM0+CM0 is recorded as the judgment threshold AM0; by combining the position sequence numbers of the two thresholds into AM0, the division standard of the stable segment and the mutation segment can be quantified into a judgment threshold, which is convenient for subsequent division of each subsequence with the same standard;
[0071] Step S206, the fluctuation intensity and the change peak value of the first sub-sequence are obtained in the corresponding fluctuation intensity sequence and the change peak value sequence, and the position sequence number is summed up, denoted as the sequence number and DM of the first sub-sequence; DM combines the ranking information of the two indicators into a single score, avoiding misjudgment of a single indicator;
[0072] Step S207, if DM is not greater than AM0, the first sub-sequence is marked as a stable sub-sequence, and if DM is greater than AM0, the first sub-sequence is marked as a mutation sub-sequence; repeat the marking of all sub-sequences in the first power sequence, and merge adjacent mutation sub-sequences or adjacent stable sub-sequences, respectively denoted as mutation segments and stable segments; for example, if several adjacent sub-sequences are marked as mutation segments, the whole should be regarded as a mutation segment.
[0073] Step S208, any stable segment in the first power sequence is denoted as a first stable segment; the size of the second sliding window is set to k2, and the sliding step is 1; starting from the starting position of the first stable segment, the data in the window is sorted in size and the median is obtained, and then the median is used to replace the data at the center position in the window; repeat the operation to complete the corresponding denoising stable segment; repeat the operation to obtain all denoising stable segments of the first power sequence; in this embodiment, k2=5, which can be flexibly set; the stable segment is random noise, and the data trend is gentle; the median filtering is highly robust to isolated mutations, and will not be biased by extreme values like mean filtering, which is suitable for stable segments with smooth but random peaks;
[0074] Step S209, for each mutation segment in the first power sequence, denoising is performed using wavelet transform, and after completion, the corresponding denoised mutation segment is obtained; and all denoised stable segments are combined to obtain the denoised power sequence of the first date; the noise of the mutation segment is superimposed with the information data, and the mutation characteristics of the data need to be preserved during denoising; the wavelet basis selection and decomposition level of wavelet transform need to be matched with the sampling frequency and signal bandwidth, which can be flexibly set according to the actual application scenario;
[0075] Step S210, linear fitting is performed on the total power consumption in the denoised power sequence located in the first time period, and then the average total power consumption of the first time period is obtained; repeat the operation to obtain the average total power consumption of all time periods of the denoised power sequence, and arrange them in time order, denoted as the average power sequence of the first date; the collected weather data is the average value of the time period, and the subsequent modeling is based on the average power of each time period as the output target, so the time sequence after denoising needs to be aggregated to the time period scale; linear fitting can remove the weak trend or short-term drift in the time period, which can make the obtained average value more accurate;
[0076] Step S211, repeat acquiring the average power sequence of each date in the factory power weather data, and merge with the factory power weather information, sort by date, and record as the denoised power weather data; weather parameters usually have multiple accurate acquisition channels and can be verified with each other, and the acquired weather parameters are usually very accurate, so there is no need for denoising processing.
[0077] Step S212, an initial model is constructed based on the LSTM model, the initial model includes an input layer, a hidden layer, and an output layer, and the initial model is set to output the average total power consumption of each time period in the future; the denoised power weather data is used to train the initial model, and after completion, an electric power prediction model is obtained; the denoised data reduces model overfitting and gradient fluctuation caused by noise, making the training more robust;
[0078] Step S213, according to the historical denoised power weather data, the electric power prediction model is inputted to obtain the average total power consumption of each time period in the future date, recorded as the predicted power sequence of the corresponding date; the input can include the denoised time period average power of the past several days and the weather parameters of the same time period, as well as the weather parameters of the future time period;
[0079] Step S214, repeat collecting the predicted power sequence of each date, recorded as the electric power prediction data;
[0080] In the specific implementation process, the traditional global single denoising algorithm, such as full sequence FIR filtering, is easy to cause incomplete filtering of stable segment noise or over-smoothing of mutation segment characteristics; by dividing the sequence into segments according to its own characteristics, suitable denoising algorithms are matched for the two types of segments, and finally combined, which can remove noise while preserving characteristics as much as possible.
[0081] Step S3, calculate the prediction error according to the electric power prediction data, and perform error law analysis, and correct the predicted total power consumption to obtain corrected power prediction data; step S3 includes the following substeps:
[0082] Step S301, according to the average power sequence of the predicted power sequence of the first date, the average total power consumption predicted in the first time period and the actual average total power consumption are respectively acquired; sequentially recorded as YP and SP; and (SP-YP) is recorded as the prediction deviation of the first time period, and the prediction deviations of all time periods of the first date are repeatedly acquired and arranged in chronological order, recorded as the prediction deviation sequence of the first date; repeat acquiring the prediction deviation sequence of each date; as the original data for subsequent deviation law analysis;
[0083] Step S302, when the capacity of the energy storage system needs to be configured, the electric power prediction model is used to predict the prediction power sequence of the future date, recorded as the future power sequence;
[0084] Step S303, please refer to Figure 3 As shown in the figure, the last k3 dates are obtained, denoted as the last reference dates, the prediction deviation of each last reference date in the first time period is obtained according to the prediction deviation sequence of each last reference date, and the prediction deviation of each last reference date in the first time period is sorted from far to near in date order, denoted as the reference deviation sequence in the first time period; wherein k3 is the number of dates set; in this embodiment, k3 = 30, which can be flexibly adjusted; but not too large, too large may contain out-of-date information;
[0085] Step S304, the reference deviation sequence in the first time period is uniformly divided into segments with a length of k4, sequentially denoted as segment 1-segment k4, and any two segments are combined, denoted as segment combination, and the two segments of any segment combination are denoted as segment i and segment j, i∈[1, k4], j∈[1, k4]; the sequence is segmented and combined for comparison, in order to detect whether the deviation has a stable shape or proportional relationship, rather than relying on single-point similarity; if many segment combinations are similar in statistics, it means that there is a repeatable pattern inside the deviation sequence; in this embodiment, k4 = 6 data, which can be flexibly adjusted;
[0086] Step S305, the absolute difference of the data at the same position number in segment i and segment j is calculated, the sum of all the absolute differences obtained is denoted as the corresponding absolute difference sum DY(ij) of segment i and segment j; and the average value of segment i and segment j is calculated respectively, and the sum is denoted as the average value sum DP(ij) of segment i and segment j; and the average deviation ratio WB(ij) of the corresponding segment combination is calculated, wherein WB(ij) = DY(ij) / DP(ij); DY is the cumulative of absolute error, and DP puts the scale into the denominator, so that WB becomes a relative deviation measure; in this way, sequences with small amplitude but relatively consistent and sequences with large amplitude consistent can be compared in the same dimension;
[0087] Step S306, repeat the average deviation ratio of all segment combinations, and calculate the similar combinations of the average deviation ratio not greater than k5, and calculate the proportion of the number of similar combinations in the total number of segment combinations, denoted as the proportion of similar combinations; if the proportion of similar combinations is not less than k6, mark the first time period as a deviation regular period, otherwise mark the first time period as a deviation random period, wherein k5 and k6 are set threshold proportions WB small means that two segments are similar in shape and scale, and WB large means that they are not similar; by counting the WB distribution of all combinations, whether there is a repetitive structure in the deviation sequence can be determined; in this embodiment, k5 = 0.25, k6 = 0.6, which can be adjusted according to the actual application scenario.
[0088] Step S307, if the first period is a deviation regular period, record any one of the predicted deviations in the reference deviation sequence of the first period as RC(m), where m represents the position sequence number; and calculate the sum of all position sequence numbers in the reference deviation sequence of the first period as N0; take N0 as the weight reference;
[0089] Step S308, calculate the weighted deviation QC(m) of RC(m), where QC(m)=(m / N0)*RC(m); repeat the calculation of the weighted deviation of all predicted deviations in the reference deviation sequence of the first period, and sum them up, record as the corrected deviation XW of the first period; repeat the acquisition of the corrected deviation of all deviation regular periods; the larger m is, the closer it is to the historical day of the current day, and the higher the weight is; give higher weight to the recent date, reflect that the recent deviation can represent the upcoming deviation trend;
[0090] Step S309, for the average total power of the first period in the future power sequence, record as YW; replace the predicted average total power of the first period with (YW+XW);
[0091] Step S310, repeat the replacement of the average total power of all deviation regular periods in the future power sequence, and after completion, obtain the future corrected power sequence, record as the corrected power prediction data; the deviation of the deviation random period is random and has no rule, so all do not process, if forced to process, it may introduce new deviation and cause the result to be wrong;
[0092] In the specific implementation process, directly adding the weighted sum of the historical systematic deviation to the prediction can compensate the continuous deviation of the model in the period, so as to make the peak and valley energy calculated by period more real, and further make the energy storage configuration more economical and reliable.
[0093] Step S4, calculate the predicted power consumption according to the corrected power prediction data, and optimize the configuration of the energy storage system capacity of the factory according to the predicted power consumption; Step S4 includes the following sub-steps:
[0094] Step S401, record the date corresponding to the future corrected power sequence as the future date, obtain the peak period, flat period and valley period of the future date price; and calculate the power consumption in the peak period, flat period and valley period of the future date according to the future corrected power sequence; record as the peak predicted power consumption, flat predicted power consumption and valley predicted power consumption in order respectively;
[0095] Step S402, and adjust the energy storage capacity of the energy storage system of the factory according to the peak predicted power consumption and the flat predicted power consumption; so that the energy storage capacity of the energy storage system can meet the power consumption in the peak period;
[0096] In the implementation process, other algorithms can also be used to construct the mathematical model of the energy storage system capacity model, and then the optimal capacity of the energy storage system is determined according to the predicted power consumption, so as to balance the economy, technology and safety in the whole life cycle and improve the benefit of peak-valley arbitrage.
[0097] Embodiment 2, please refer to Figure 4 As shown in the figure, Figure 4 An example of a structural diagram of an electronic device is shown, which can include a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus. The memory stores computer readable instructions, and the processor can call the instructions in the memory, and when the computer readable instructions are executed by the processor, the steps in a kind of energy storage system capacity configuration optimization method are run to realize the following functions: continuously collecting total power consumption information of factory every day, and obtaining corresponding weather information, obtaining factory power weather data;The factory power weather data is denoised, and an electricity consumption power prediction model is constructed, the total power consumption of the factory every day is predicted, and the power prediction data is obtained;The prediction error is calculated according to the power prediction data, and the error law is analyzed, and the total power consumption is corrected, and the corrected power prediction data is obtained;The predicted power consumption is calculated according to the corrected power prediction data, and the capacity of the energy storage system of the factory is configured and optimized according to the predicted power consumption.
[0098] In addition, the logical instructions in the memory described above can be realized in the form of a software function unit and sold or used as an independent product, which can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the parts that contribute to the prior art or parts of the technical solutions can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a plurality of instructions to make a computer device (which can be a personal computer, server, or network device, etc.) execute all or part of the steps of the method described in various embodiments of the present application. The foregoing storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk and various program code storage media.
[0099] In embodiment 3, the application further provides a computer readable storage medium, and the application provides a storage medium, which stores a computer program, and the computer program is executed by a processor to run the steps of the energy storage system capacity configuration optimization method to realize the following functions: continuously collecting total power consumption information of the factory every day, obtaining corresponding weather information, and obtaining factory power weather data; performing denoising processing on the factory power weather data, constructing a power consumption prediction model, predicting total power consumption of the factory every day, and obtaining power prediction data; calculating a prediction error according to the power prediction data, performing error law analysis, correcting the predicted total power consumption, and obtaining corrected power prediction data; calculating predicted power consumption according to the corrected power prediction data, and configuring and optimizing the energy storage system capacity of the factory according to the predicted power consumption.
[0100] Through the description of the above embodiments, the embodiments of the application can be provided as a method, a system or a computer program product. Based on such understanding, the above technical solutions can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the method described in each embodiment or some parts of the embodiment.
[0101] In the embodiments provided in the present application, it should be understood that the disclosed system or method can be implemented in other ways. The above described embodiments are only illustrative, for example, the division of the modules or units is only a logical function division, and in actual implementation, there can be another division manner, for example, a plurality of modules or units can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed each other can be through some communication interface, indirect coupling or communication connection between the systems, modules and units can be electrical, mechanical or other forms.
[0102] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for some technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for optimizing the capacity configuration of an energy storage system, characterized in that, Comprise the following steps: Continuously collect the total power consumption information of the factory every day, and obtain the corresponding weather information to obtain the factory power weather data; Denoising the factory power weather data, and constructing a power consumption prediction model to predict the total power consumption of the factory every day to obtain the power prediction data; According to the power prediction data, the prediction error is calculated, and the error law is analyzed, and the predicted total power consumption is corrected to obtain the corrected power prediction data; According to the corrected power prediction data, the predicted power consumption is calculated, and the capacity of the energy storage system of the factory is configured and optimized according to the predicted power consumption; According to the power prediction data, the prediction error is calculated, and the error law is analyzed, and the predicted total power consumption is corrected to obtain the corrected power prediction data comprising the following sub-steps: According to the average power sequence of the predicted power sequence of the first date, the average total power consumption predicted in the first period and the actual average total power consumption are obtained respectively; Marked as YP and SP in order respectively; And (SP-YP) is marked as the prediction deviation of the first period, and the prediction deviation of all periods of the first date is repeatedly obtained and arranged in time sequence, and marked as the prediction deviation sequence of the first date; The prediction deviation sequence of each date is repeatedly obtained; When the capacity of the energy storage system needs to be configured, the future date prediction power sequence is predicted by using the power prediction model, and is marked as the future power sequence; Get the last k3 dates, marked as the last reference date, according to the prediction deviation sequence of each last reference date, get the prediction deviation of each last reference date in the first period, and sort them from far to near according to the date order, marked as the reference deviation sequence of the first period; Wherein k3 is the number of dates set; The reference deviation sequence of the first period is evenly divided into segments with length k4, and is sequentially marked as segment 1-segment k4, and any two segments are combined, marked as segment combination, and the two segments of any segment combination are marked as segment i and segment j respectively, i∈[1,k4],j∈[1,k4]; Calculate the absolute difference of the data with the same position sequence number in segment i and segment j, sum all the absolute differences, mark as the corresponding absolute difference sum DY(ij) of segment i and segment j; And calculate the average value of segment i and segment j respectively, and sum them up, mark as the average value sum DP(ij) of segment i and segment j; And calculate the average deviation ratio WB(ij) of the corresponding segment combination, wherein WB(ij)=DY(ij) / DP(ij); Repeat to obtain the average deviation ratio of all segment combinations, and calculate the similar combination of the segment combination whose average deviation ratio is not greater than k5, and count the proportion of the number of similar combinations in the total number of segment combinations, mark as the similar combination proportion; If the similar combination proportion is not less than k6, mark the first period as the deviation law period, otherwise mark the first period as the deviation random period, wherein k5 and k6 are the set threshold proportion; If the first period is a deviation regular period, record any one of the predicted deviations in the reference deviation sequence of the first period as RC(m), where m represents the position number; and calculate the sum of all position numbers in the reference deviation sequence of the first period, and record it as N0; Calculate the weighted deviation QC(m) of RC(m), where QC(m)=(m / N0)*RC(m); repeat the calculation of the weighted deviation of all predicted deviations in the reference deviation sequence of the first period, and sum them up, and record it as the corrected deviation XW of the first period; repeat the acquisition of the corrected deviation of all deviation regular periods; For the average total power of the first period in the future power sequence, record it as YW; replace the predicted average total power of the first period with (YW+XW); Repeat the replacement of the average total power of all deviation regular periods in the future power sequence, and obtain the future corrected power sequence after completion, and record it as the corrected power prediction data.
2. The method of claim 1, wherein, Continuously collect the total power information of the factory every day, and obtain the corresponding weather information to obtain the factory power weather data, including the following sub-steps: Divide each day into k1 periods, and record them in turn as period 1-period k1; and record any one period as the first period; select the weather environment parameters related to the power consumption of the factory, and record them as weather parameters; and record any one weather parameter as the first parameter; record any one date as the first date; Collect the total power of the factory at the first time interval on the first date, and record the collection time, and arrange them in time order, and record them as the total power sequence of the first date; wherein the first time interval is t1; Collect the average value of the first parameter in the corresponding period in each period of the first date, and arrange them in the order of the period, and record them as the parameter change sequence of the first parameter of the first date; repeat the acquisition of the parameter change sequence of all weather parameters of the first date; Record the total power sequence of the first date and the parameter change sequence of all weather parameters as the factory power weather information of the first date; Repeat the collection of the factory power weather information of each date, and record it as the factory power weather data.
3. The method of claim 2, wherein, Perform denoising processing on the factory power weather data, and construct an electricity consumption power prediction model to predict the total power of the factory every day, and obtain the electricity power prediction data, including the following sub-steps: For the total power sequence of the first date, record it as the first power sequence; evenly divide the first power sequence into multiple subsequences with a length of k1, and record any one subsequence as the first subsequence, where k1 is the set length; Calculate the standard deviation of the first subsequence, record it as the fluctuation intensity AB of the first subsequence, and calculate the absolute difference value of any two adjacent data in the first subsequence, record it as the adjacent absolute difference value, and record the maximum adjacent absolute difference value as the change peak value AC of the first subsequence; Repeat the acquisition of the fluctuation intensity and change peak value of all subsequences of the first power sequence, and arrange them in the order of from small to large respectively, and record them as the fluctuation intensity sequence and change peak value sequence of the first power sequence; The density clustering algorithm is used to divide the fluctuation intensity sequence into two clusters, and the maximum value in the cluster with smaller value is obtained, which is recorded as the fluctuation threshold; the density clustering algorithm is used to divide the change peak value sequence into two clusters, and the maximum value in the cluster with smaller value is obtained, which is recorded as the change threshold; The position sequence number of the fluctuation threshold in the fluctuation intensity sequence is obtained, which is recorded as BM0, and the position sequence number of the change threshold in the change peak value sequence is obtained, which is recorded as CM0, and BM0+CM0 is recorded as the judgment threshold AM0.
4. The method of claim 3, wherein, The power weather data of the factory is denoised, and a power consumption power prediction model is constructed to predict the total power consumption of the factory every day to obtain the power prediction data, which further includes the following sub-steps: The position sequence numbers of the fluctuation intensity and the change peak value of the first sub-sequence in the corresponding fluctuation intensity sequence and change peak value sequence are obtained, and the sum is calculated, which is recorded as the sequence number and DM of the first sub-sequence; If DM is not greater than AM0, the first sub-sequence is marked as a stable sub-sequence, and if DM is greater than AM0, the first sub-sequence is marked as a mutation sub-sequence; repeat the marking of all sub-sequences in the first power sequence, and merge adjacent mutation sub-sequences or adjacent stable sub-sequences, respectively, and record them as mutation segments and stable segments; Any one stable segment in the first power sequence is recorded as the first stable segment; the size of the second sliding window is set to k2, and the sliding step is 1; starting from the beginning of the first stable segment, slide backward one by one, for each sliding window, sort the data in the window by size, and obtain the median, then replace the data at the center position in the window with the median; repeat the operation to complete the corresponding denoised stable segment; repeat the denoised stable segment of all stable segments in the first power sequence; For each mutation segment in the first power sequence, wavelet transform is used for denoising, and after completion, the corresponding denoised mutation segment is obtained; and all denoised stable segments are combined to obtain the denoised power sequence of the first date; The total power consumption in the first time period of the denoised power sequence is linearly fitted, and the average total power consumption of the first time period is obtained; repeat the average total power consumption of all time periods of the denoised power sequence, and arrange them in chronological order, and record them as the average power sequence of the first date; Repeat the average power sequence of each date in the factory power weather data, and combine it with the factory power weather information, sort by date, and record it as the denoised power weather data.
5. The method of claim 4, wherein, The power weather data of the factory is denoised, and a power consumption power prediction model is constructed to predict the total power consumption of the factory every day to obtain the power prediction data, which further includes the following sub-steps: An initial model is constructed based on the LSTM model, which includes an input layer, a hidden layer and an output layer, and the initial model output is set to the average total power consumption of each time period in the future; the initial model is trained using the denoised power weather data, and the power prediction model is obtained after completion; According to the historical denoised power weather data, the power prediction model is input to obtain the average total power consumption of each time period in the future date, which is recorded as the prediction power sequence of the corresponding date; Repeat the collection of the prediction power sequence of each date, and record it as the power prediction data.
6. The method of claim 5, wherein, According to the modified power prediction data, a predicted power consumption is calculated, and a configuration optimization of the energy storage system capacity of the factory is performed according to the predicted power consumption, including the following sub-steps: a date corresponding to the future modified power sequence is recorded as a future date, peak period, flat period and valley period of the future date electricity price are obtained, and power consumption in the peak period, flat period and valley period of the future date is calculated according to the future modified power sequence; sequentially recorded as peak predicted power consumption, flat predicted power consumption and valley predicted power consumption; and according to the peak predicted power consumption and the flat predicted power consumption, the energy storage capacity of the energy storage system of the factory is adjusted.
7. An electronic device, comprising: a processor and a memory are included, the memory stores computer readable instructions, when the computer readable instructions are executed by the processor, the steps in the method of any one of claims 1-6 are executed.
8. A storage medium having stored thereon a computer program, characterized in that the computer program is executed by the processor, the steps in the method of any one of claims 1-6 are executed.
Citation Information
Patent Citations
Short-term wind power forecasting method based on long-term and short-term memory network
CN109214566A
Power prediction optimization method based on energy storage and assessment standards
CN114580714A