A rooftop photovoltaic installation processing method, device, electronic device and storage medium based on LSTM and differential evolution

By combining the LSTM model and differential evolution algorithm, the problem of difficulty in meeting the accuracy and constraints in distributed photovoltaic installed capacity prediction and optimized allocation is solved, and more efficient photovoltaic installed capacity prediction and optimized allocation effect is achieved.

CN119378951BActive Publication Date: 2025-04-22STATE GRID JIANGSU ELECTRIC POWER CO LTD RESEARCH INSTITUTE +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411961766.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-22
Estimated Expiration
2044-12-30

AI Technical Summary

Technical Problem

When handling distributed photovoltaic installed capacity prediction and optimization allocation, the prediction accuracy is insufficient and it is difficult to consider multiple complex constraints at the same time, resulting in uneven resource allocation or limited optimization effects.

Method used

The roof photovoltaic installation processing method based on LSTM (Long and Short-term Memory Network) and differential evolution algorithm is adopted to predict the photovoltaic installation capacity through the LSTM model, and the differential evolution algorithm is used for optimization allocation, considering the constraints such as local installation potential, grid carrying capacity and economic benefits.

Benefits of technology

It significantly improves the accuracy of photovoltaic installed capacity prediction and the effect of optimized allocation, can more accurately capture the dynamic changes in photovoltaic installed capacity, adapt to changes in different regions and demands, has strong optimization capabilities and high stability, ensuring the consistency and reliability of the predicted results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119378951B_ABST
    Figure CN119378951B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, electronic device and storage medium for processing rooftop photovoltaic installations based on LSTM and differential evolution. The method uses a comprehensive application of a long short-term memory network and a differential evolution algorithm for optimization. The differential evolution algorithm has a simple structure and flexible parameter settings. It can be adjusted according to specific problems under a variety of objective functions and constraints, thereby improving the optimization effect and computational efficiency. The step-by-step optimization characteristics of the differential evolution algorithm continuously improve the quality of the solution and gradually approach the optimal solution through cyclic iterations of differential mutation, crossover operation and selection operation. The differential evolution algorithm combined with the long short-term memory network can significantly improve the accuracy of the prediction model and the effect of optimization allocation. The present invention can effectively improve the prediction accuracy and the rationality of resource allocation in the problem of distributed photovoltaic installation prediction and optimization allocation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a rooftop photovoltaic installation processing method, device, electronic equipment and storage medium based on LSTM and differential evolution, and belongs to the technical field of photovoltaic resource planning. Background Art

[0002] With the rapid development of photovoltaic energy, how to reasonably allocate distributed photovoltaic installed capacity to meet demand and constraints has become an important issue. Traditional prediction methods such as linear regression and time series analysis often show insufficient prediction accuracy when dealing with complex nonlinear and time series data of photovoltaic systems. These methods usually cannot fully capture the various influencing factors of changes in photovoltaic installed capacity, such as weather changes, policy adjustments, etc.

[0003] Existing optimization methods mostly rely on linear programming or rule-based allocation strategies. When faced with the problem of photovoltaic installed capacity allocation, these methods are difficult to simultaneously consider multiple complex constraints such as grid carrying capacity, economic benefits, and installed capacity potential of cities and prefectures, which can easily lead to uneven resource allocation or limited optimization effects.

[0004] Therefore, an accurate distributed photovoltaic installed capacity processing method is needed to capture the changing trend of photovoltaic installed capacity, and a flexible and comprehensive optimization mechanism is also required to ensure the optimal resource allocation while meeting various constraints. Summary of the invention

[0005] Objective: In order to overcome the deficiencies in the prior art, the present invention provides a rooftop photovoltaic installation processing method, device, electronic device and storage medium based on LSTM and differential evolution, which overcomes the deficiencies of traditional methods through prediction and optimization mechanisms, and improves the accuracy of photovoltaic installed capacity prediction and the effect of optimized allocation.

[0006] Technical solution: To solve the above technical problems, the technical solution adopted by the present invention is:

[0007] In the first aspect, a method for processing rooftop photovoltaic installations based on LSTM and differential evolution comprises the following steps:

[0008] Step 1: Acquire data related to the distributed photovoltaic system, preprocess the data to obtain preprocessed data, and divide the preprocessed data into a training set and a test set.

[0009] Step 2: Use the training set and test set to train and verify the pre-built LSTM prediction model to obtain a trained LSTM prediction model. Input the data to be tested into the trained LSTM prediction model to obtain the predicted value of distributed photovoltaic installed capacity in each prefecture-level city in year t.

[0010] Step 3: Calculate the total installed capacity of the provincial plan for the tth year according to the predicted value of the distributed photovoltaic installed capacity of each prefecture-level city in the tth year, and calculate the initial distributed photovoltaic installed capacity of each prefecture-level city in the tth year according to the total installed capacity of the provincial plan for the tth year. Construct the objective function and constraints, and use the differential evolution algorithm to iteratively optimize the initial distributed photovoltaic installed capacity of each prefecture-level city in the tth year according to the objective function and constraints, and obtain the optimal distributed photovoltaic installed capacity of each prefecture-level city in the tth year.

[0011] Step 4: Calculate the provincial installed capacity surplus in year t based on the initial distributed photovoltaic installed capacity of each prefecture-level city in year t and the optimal distributed photovoltaic installed capacity of each prefecture-level city in year t, and calculate the actual distributed photovoltaic installed capacity of each prefecture-level city in year t based on the provincial installed capacity surplus in year t.

[0012] As a preferred solution, it also includes: Step 5: Implement simulation according to the actual distributed photovoltaic installed capacity of each prefecture-level city in the tth year, perform backtesting and sensitivity analysis based on the simulation results, adjust the parameters of the LSTM prediction model and the differential evolution algorithm according to the backtesting results and the sensitivity analysis results, and obtain adjusted parameters, substitute the adjusted parameters into the LSTM prediction model and the differential evolution algorithm to obtain updated LSTM prediction model and differential evolution algorithm, and repeat steps 1 to 4 using the updated LSTM prediction model and differential evolution algorithm to obtain the optimized distributed photovoltaic installed capacity of each prefecture-level city in the tth year.

[0013] As a preferred solution, the data related to the distributed photovoltaic system include: historical photovoltaic installed capacity data of each sub-region, meteorological condition data and power grid carrying capacity data.

[0014] As a preferred solution, the preprocessing includes, but is not limited to: data cleaning, data normalization and arranging in time series.

[0015] As a preferred solution, the method for obtaining the initial distributed photovoltaic installed capacity of each prefecture-level city in the tth year specifically includes:

[0016] Get the forecast value of distributed photovoltaic installed capacity of all prefecture-level cities in year t, and sum them up to get the forecast value of distributed photovoltaic installed capacity at the provincial level in year t.

[0017] Based on the forecast value of provincial distributed photovoltaic installed capacity in year t, the total installed capacity of the provincial plan in year t is calculated.

[0018] The weight coefficients of each prefecture-level city are calculated. Based on the total installed capacity of the provincial plan in the tth year and the weight coefficients of each prefecture-level city, the initial distributed photovoltaic installed capacity of each prefecture-level city in the tth year is calculated.

[0019] Among them, the calculation formula for the initial distributed photovoltaic installed capacity of each prefecture-level city in year t is as follows:

[0020]

[0021] in, represents the total installed capacity of the provincial plan for the set tth year, Indicates The weight coefficient of each prefecture-level city, Indicates the tth year The initial distributed photovoltaic installed capacity of each prefecture-level city.

[0022] In the formula, The weight coefficient calculation formula for each prefecture-level city is as follows:

[0023]

[0024] in, For the The economic coefficient of each prefecture-level city, For the The historical development trend coefficient of each prefecture-level city, For the The carrying capacity coefficient of each prefecture-level city, , , are the weight ratios of the economic coefficient, historical development trend coefficient and carrying capacity coefficient, respectively, satisfying , is the total number of prefecture-level cities.

[0025] As a preferred solution, the objective function calculation formula is as follows:

[0026]

[0027] in, is the objective function, is the allocated installed capacity of the i-th prefecture-level city in year t, is the total installed capacity of the provincial plan in the set t year, is the total number of prefecture-level cities.

[0028] The constraints include: upper limit constraints on installed capacity in cities and counties, overall capacity constraints, grid carrying capacity constraints and relaxed proportion constraints.

[0029] Among them, the calculation formula for the upper limit constraint of installed capacity in prefecture-level cities is as follows:

[0030]

[0031] in, Indicates the maximum installable capacity of each prefecture-level city.

[0032] The overall capacity constraint calculation formula is as follows:

[0033]

[0034] in, Indicates tolerance error.

[0035] The calculation formula of the grid carrying capacity constraint is as follows:

[0036]

[0037] in, Indicates the maximum carrying capacity of the power grid in each prefecture-level city.

[0038] The relaxed proportional constraint is calculated as follows:

[0039]

[0040] in, It is The prefecture-level cities improved their installed capacity allocation. It is City No. The relaxation factor of the year.

[0041] As a preferred solution, the step 4 specifically includes:

[0042] Step 4.1: Obtain the initial distributed photovoltaic installed capacity of each prefecture-level city in year t and the optimal distributed photovoltaic installed capacity of each prefecture-level city in year t, and calculate the installed capacity surplus of each prefecture-level city in year t.

[0043] Among them, the calculation formula for the installed capacity surplus of each prefecture-level city in year t is as follows:

[0044]

[0045] in, Indicates the tth year The initial distributed photovoltaic installed capacity of each prefecture-level city, represents the optimal distributed photovoltaic installed capacity of each prefecture-level city in year t, Indicates The installed capacity surplus of each prefecture-level city.

[0046] Step 4.2: Calculate the provincial installed capacity surplus in year t based on the installed capacity surplus of each prefecture-level city in year t.

[0047] Among them, the calculation formula for the provincial installed capacity surplus in year t is as follows:

[0048]

[0049] in, represents the provincial installed capacity surplus in year t, is the total number of prefecture-level cities.

[0050] Step 4.3: Calculate the priority indicators of each prefecture-level city in year t and sort them according to the priority indicators.

[0051] The priority index calculation formula is as follows:

[0052]

[0053] in, Indicates the tth year Priority indicators for prefecture-level cities, For the prefecture-level cities in The annual installed capacity surplus, For the prefecture-level cities in The economic coefficient of the year, For the prefecture-level cities in The annual bearing capacity factor, , , are the weight coefficients of installed capacity margin, economic benefit and grid carrying capacity, respectively, satisfying .

[0054] Step 4.4: Allocate the remaining capacity to each prefecture-level city in turn according to the ranking results of each prefecture-level city and the priority index, and sum the allocated remaining capacity with the optimal distributed photovoltaic installed capacity to obtain the actual distributed photovoltaic installed capacity of each prefecture-level city in the tth year.

[0055] Among them, the calculation formula for the actual distributed photovoltaic installed capacity of each prefecture-level city in year t is as follows:

[0056]

[0057] in, Indicates the tth year The actual distributed photovoltaic installed capacity of each prefecture-level city, Indicates the tth year Priority indicators for prefecture-level cities.

[0058] As a preferred solution, the calculation formula of the backtest result is as follows:

[0059]

[0060] in, Indicates the tth year The backtest error of prefecture-level cities, represents the simulated The expected allocation capacity of each prefecture-level city, Indicates the tth year The actual distributed photovoltaic installed capacity of each prefecture-level city.

[0061] The calculation formula of the sensitivity analysis results is as follows:

[0062]

[0063] in, is the sensitivity index of the parameters of the j-th LSTM prediction model and the differential evolution algorithm, is the objective function, are the parameters of the j-th LSTM prediction model and differential evolution algorithm.

[0064] In the second aspect, a rooftop photovoltaic installation processing device based on LSTM and differential evolution includes the following modules:

[0065] Data collection and preprocessing module: used to obtain data related to the distributed photovoltaic system, preprocess the data, obtain preprocessed data, and divide the preprocessed data into training sets and test sets.

[0066] LSTM model building and prediction module: used to train and verify the pre-built LSTM prediction model using the training set and test set to obtain a trained LSTM prediction model, input the data to be tested into the trained LSTM prediction model, and obtain the predicted value of distributed photovoltaic installed capacity in each prefecture-level city in the tth year.

[0067] Differential evolution algorithm optimization module: used to calculate the total installed capacity of the provincial plan for the tth year according to the predicted value of the distributed photovoltaic installed capacity of each prefecture-level city in the tth year, and calculate the initial distributed photovoltaic installed capacity of each prefecture-level city in the tth year according to the total installed capacity of the provincial plan for the tth year. Construct the objective function and constraints, and use the differential evolution algorithm to iteratively optimize the initial distributed photovoltaic installed capacity of each prefecture-level city in the tth year according to the objective function and constraints, and obtain the optimal distributed photovoltaic installed capacity of each prefecture-level city in the tth year.

[0068] Priority adjustment and actual allocation module: used to calculate the provincial installed capacity surplus in the tth year based on the initial distributed photovoltaic installed capacity of each prefecture-level city in the tth year and the optimal distributed photovoltaic installed capacity of each prefecture-level city in the tth year, and calculate the actual distributed photovoltaic installed capacity of each prefecture-level city in the tth year based on the provincial installed capacity surplus in the tth year.

[0069] As a preferred solution, it also includes: a result analysis and optimization iteration module: used to implement simulation according to the actual distributed photovoltaic installed capacity of each prefecture-level city in the tth year, perform backtesting and sensitivity analysis based on the simulation results, adjust the parameters of the LSTM prediction model and the differential evolution algorithm according to the backtesting results and the sensitivity analysis results, and obtain adjusted parameters, substitute the adjusted parameters into the LSTM prediction model and the differential evolution algorithm to obtain updated LSTM prediction model and differential evolution algorithm, and repeat steps 1 to 4 using the updated LSTM prediction model and differential evolution algorithm to obtain the optimized distributed photovoltaic installed capacity of each prefecture-level city in the tth year.

[0070] In a third aspect, a computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements a rooftop photovoltaic installation processing method based on LSTM and differential evolution as described in any one of the first aspects.

[0071] According to a fourth aspect, a computer device comprises:

[0072] Memory, used to store instructions.

[0073] A processor is used to execute the instructions so that the computer device performs the operations of a rooftop photovoltaic installation processing method based on LSTM and differential evolution as described in any one of the first aspects.

[0074] Beneficial effects: The present invention provides a method, device, electronic device and storage medium for processing rooftop photovoltaic installations based on LSTM and differential evolution, which uses the comprehensive application of LSTM (long short-term memory network) and differential evolution algorithm for optimization. The differential evolution algorithm has a simple structure and flexible parameter settings. It can be adjusted according to specific problems under a variety of objective functions and constraints, thereby improving the optimization effect and computational efficiency. The gradual optimization characteristics of the differential evolution algorithm continuously improve the quality of the solution and gradually approach the optimal solution through cyclic iterations of differential mutation, crossover operation and selection operation. The combination of differential evolution algorithm and long short-term memory network can significantly improve the accuracy of the prediction model and the effect of optimization allocation. In the problem of distributed photovoltaic installation prediction and optimization allocation, it can effectively improve the prediction accuracy and the rationality of resource allocation.

[0075] The modeling and model solving method of the present invention can provide effective suggestions for the planning and allocation of photovoltaic installed capacity, thereby achieving better economic and social benefits.

[0076] Compared with the prior art, the present invention adopts the above technical solution and has the following technical effects:

[0077] 1. The convergence accuracy of the optimization algorithm is higher, and it can more accurately capture the dynamic changes of photovoltaic installed capacity.

[0078] 2. More adaptable and able to flexibly adjust to cope with changes in different regions and needs.

[0079] 3. With stronger optimization capability, the differential evolution (DE) algorithm can effectively find the optimal allocation solution under complex constraints.

[0080] 4. Higher stability: through systematic data preprocessing and model training, the consistency and reliability of prediction results are ensured. BRIEF DESCRIPTION OF THE DRAWINGS

[0081] Figure 1 It is a flow chart of a rooftop photovoltaic installation processing method based on LSTM and differential evolution of the present invention. DETAILED DESCRIPTION

[0082] The following is a clear and complete description of the technical solutions in the examples of the present invention in conjunction with the accompanying drawings in the examples of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the protection scope of the present invention.

[0083] The present invention will be further described below in conjunction with specific embodiments.

[0084] Embodiment 1:

[0085] This embodiment introduces a rooftop photovoltaic installation processing method based on LSTM and differential evolution, including the following steps:

[0086] Step s1: Data collection and preprocessing: Collect data related to distributed photovoltaic systems, including historical photovoltaic installed capacity data, meteorological conditions data, and grid carrying capacity data. Preprocess the collected data to obtain preprocessed data, and divide the preprocessed data into a training set and a test set. The preprocessing includes cleaning, normalization, data partitioning, and format conversion to keep the data in the same scale and range and facilitate the training of the LSTM model.

[0087] Furthermore, the step s1 specifically includes:

[0088] Step s1.1: Obtain historical photovoltaic installed capacity data, meteorological condition data, and grid carrying capacity data related to the distributed photovoltaic system.

[0089] Among them, historical photovoltaic installed capacity data includes past photovoltaic installed capacity records of various prefecture-level cities.

[0090] Meteorological condition data, including but not limited to solar radiation intensity, temperature, humidity and wind speed in each prefecture-level city.

[0091] Grid carrying capacity data, including the maximum load and power supply stability of the power grid in each prefecture-level city.

[0092] Step s1.2: Preprocess the data collected in step s1.1, specifically including:

[0093] Data cleaning: Clean the collected data, including removing outliers and processing missing data. Outliers should be detected and removed through set statistical methods. Missing data should be filled using interpolation methods to ensure data integrity.

[0094] Data normalization is performed on the cleaned data. The minimum-maximum scaling method is used to scale the data to a range of 0 to 1 to eliminate the dimensional differences between different features. All features should be processed on a uniform scale.

[0095] The normalized formula is:

[0096] (1)

[0097] in, represents the normalized data, represents the data to be normalized, Indicates the minimum value of the data. Indicates the maximum value of the data.

[0098] Data partitioning: The normalized data is divided into a training set and a test set. The training set accounts for 70% to 80% of the total data and is used for training the LSTM model. The test set accounts for 20% to 30% of the total data and is used to evaluate the prediction performance of the LSTM model.

[0099] Data preparation: arrange the training set and test set in time series and create an input data format suitable for the LSTM model. The data should be windowed into time series and divided into sequences with fixed time windows. Feature selection should be based on the importance of the prediction task, and corresponding labeled data should be generated for model training and validation.

[0100] The formula for time series windowing is:

[0101] X t = [ x t − n + 1 , x t − n + 2 , … , x t ] (2)

[0102] in, is the data sequence within the time window, is the window size.

[0103] Step s2: LSTM model construction and prediction: Build an LSTM prediction model based on the long short-term memory (LSTM) neural network, use the preprocessed data to train and verify the prediction model so that the prediction model can learn the time series characteristics in the data, use the trained prediction model to predict the distributed photovoltaic installed capacity in future years, and generate a prediction curve.

[0104] Furthermore, the step s2 specifically includes:

[0105] Step s2.1: Model construction: Build an LSTM prediction model based on LSTM (Long Short-Term Memory) neural network. The LSTM prediction model includes an input layer, multiple LSTM layers and an output layer.

[0106] The input layer is responsible for receiving the preprocessed time series data, the LSTM layer is used to learn the time dependency in the data, and the output layer generates the predicted photovoltaic installed capacity. The number of units and network depth of the LSTM layer should be set according to the data characteristics and prediction requirements.

[0107] The LSTM layer contains several LSTM units, and the state update inside each unit is described by the following formula:

[0108] f t = s ( W f · [ h t − 1 , x t ] + b f ) (3)

[0109] i t = s ( W i ⋅ [ h t − 1 , x t ] + b i ) (4)

[0110] C ~ t = t a n h ( W C ⋅ [ h t − 1 , x t ] + b C ) (5)

[0111] (6)

[0112] o t = s ( W o ⋅ [ h t − 1 , x t ] + b o ) (7)

[0113] (8)

[0114] in, It's the Gate of Forgetfulness. is the input gate, is a candidate memory cell, is the current memory unit, is the output gate, is the current hidden state. , , , is the weight matrix, , , , is the bias term, is the sigmoid activation function, is the hyperbolic tangent activation function.

[0115] Generate the predicted value of photovoltaic installed capacity. The calculation formula of the output layer is:

[0116] (9)

[0117] in, is the predicted photovoltaic installed capacity value, is the weight matrix of the output layer, is the bias term.

[0118] Step s2.2: Model training: Train the LSTM prediction model and use the training set data to adjust the parameters of the LSTM prediction model. Set the training parameters, including the learning rate, batch size, and number of training rounds. Use the optimization algorithm (Adam) and loss function (mean square error) to optimize the parameters of the LSTM prediction model.

[0119] The loss function calculation formula during training is:

[0120] (10)

[0121] in, is the loss function, is the predicted value, is the actual value, is the sample size.

[0122] Step s2.3: Model validation: Use the test set data to validate the prediction performance of the trained LSTM prediction model. Calculate the error between the predicted value and the actual value, and use indicators such as mean square error (MSE), root mean square error (RMSE), and determination coefficient (R²) to evaluate the prediction accuracy of the LSTM prediction model.

[0123] (11)

[0124] (12)

[0125] (13)

[0126] in, is the mean of the actual values.

[0127] Step s2.4: Forecast generation, using the verified LSTM forecast model to generate the forecast value of photovoltaic installed capacity in each prefecture-level city in the future. Input the data to be predicted into the trained model to generate future forecast results and form a forecast curve for subsequent optimization allocation.

[0128] Step s3: Differential evolution algorithm optimization: According to the prediction results of the LSTM prediction model, the objective function of the photovoltaic installed capacity optimization problem is constructed. The differential evolution algorithm is applied to optimize the allocation of photovoltaic installed capacity in prefecture-level cities. Considering the constraints such as the installed capacity potential, grid carrying capacity and economic benefits of prefecture-level cities, the optimal installed capacity allocation plan for prefecture-level cities is found through iterative calculation.

[0129] Furthermore, the step s3 specifically includes:

[0130] Step s3.1: Objective function definition, based on the prediction results of the LSTM model, define the objective function of the photovoltaic installed capacity optimization problem. The objective function should take minimizing the deviation between the provincial total target capacity and the actual installed capacity of each prefecture-level city as the core goal. The objective function expression should clearly consider factors such as the installed capacity demand, grid carrying capacity, and economic benefits of each prefecture-level city to ensure that the optimization results meet the actual planning requirements. Specifically:

[0131] (14)

[0132] in, is the objective function, is the allocated installed capacity of the i-th prefecture-level city, is the total installed capacity of the provincial plan in the set t year, is the total number of prefecture-level cities.

[0133] The total installed capacity of the provincial plan in year t is set by the predicted The calculation is based on the installed capacity of each prefecture-level city in 2017.

[0134] The provincial total installed capacity target is set: During the planning period, the provincial photovoltaic installed capacity target is determined year by year based on the prediction results of LSTM. This target shows a "slow-fast-slow" growth process. Specifically, in the early planning period, due to the restrictions of policies, infrastructure and other factors, the installed capacity grew slowly; then it entered a rapid growth period, and with the advancement of technology and market maturity, the installed capacity increased significantly; finally, as the market gradually saturated, the installed capacity growth rate slowed down again and tended to stabilize. This growth pattern reflects the trend of photovoltaic installed capacity from a slow start in the early stage to rapid growth in the medium term and finally reaching a stable state, and serves as the main basis for optimizing allocation in the objective function.

[0135] Its form is:

[0136] H total multi = [ H total 1 , H total 2 , H total 3 , ⋯⋯ , H total n ] (15)

[0137] in: For the planning period, It is set The total capacity of the provincial plan for the year.

[0138] The preliminary allocation of photovoltaic installed capacity in prefecture-level cities is to ensure that the annual cumulative photovoltaic installed capacity approaches or reaches the total target set by the provincial government during the planning period. , the photovoltaic installed capacity of prefecture-level cities is preliminarily allocated, among which the weight coefficient of prefecture-level cities is It is a weighted combination of the economic coefficient, the historical development trend coefficient and the carrying capacity coefficient, and the formula is as follows:

[0139] (16)

[0140] in, For the The economic coefficient of each prefecture-level city, For the The historical development trend coefficient of each prefecture-level city, For the The carrying capacity coefficient of each prefecture-level city, , , are the weight ratios of the economic coefficient, historical development trend coefficient and carrying capacity coefficient, respectively, satisfying , is the total number of prefecture-level cities.

[0141] Using the set The total capacity of the provincial plan and the weight coefficient of the prefecture-level city are calculated. Initial photovoltaic installed capacity of each prefecture-level city in 2018.

[0142] Step s3.2: Constraints and adjustment allocation scheme design. When optimizing the allocation of photovoltaic installed capacity in prefecture-level cities, it is necessary to consider a variety of constraints to ensure that the allocation results are in line with the actual situation. These constraints include the upper limit of installed capacity in prefecture-level cities, overall capacity constraints, grid carrying capacity constraints, and relaxed proportion constraints. In the allocation results, calculate whether there is an installed capacity surplus. If there is installed capacity, calculate and sort the priority indicators based on factors such as the installed capacity surplus, economic benefits, and grid carrying capacity of each prefecture-level city. Cities with high priorities will be given priority in the allocation of remaining capacity. Based on the priority sorting, adjust the allocation of the remaining photovoltaic installed capacity to ensure that high-priority cities obtain more resources and complete the allocation of the overall goal under the premise of meeting all constraints.

[0143] Among them, the upper limit of installed capacity in prefecture-level cities is constrained, and the installed capacity of photovoltaic power generation in each prefecture-level city is The installed capacity cannot exceed the upper limit set ,Right now:

[0144] (17)

[0145] in, It is the maximum installable capacity determined based on factors such as the city’s land resources, lighting conditions, and the capacity of planned photovoltaic projects.

[0146] Overall capacity constraints: the total cumulative photovoltaic installed capacity of all cities during the planning period should be close to the set provincial total target Right now:

[0147] (18)

[0148] To ensure that the deviation between the actual installed capacity and the set provincial target is minimized, an error tolerance range is introduced. :

[0149] (19)

[0150] Grid carrying capacity constraints, photovoltaic installed capacity in each prefecture-level city Need to comply with the carrying capacity of the local power grid , to avoid grid overload, the constraints are:

[0151] (20)

[0152] in, Represents the city at time The maximum carrying capacity of the power grid is determined based on the grid infrastructure and historical maximum load.

[0153] Relaxed proportionality constraints allow for improved allocations in order to increase flexibility in capacity allocation In the initial allocation There is a certain range of fluctuations based on the relaxation factor. To express it, the constraints are:

[0154] (twenty one)

[0155] in, It is Each city and prefecture improved its installed capacity allocation. It is City No. The relaxation factor of the year satisfies , is the maximum relaxation range set. For example, if , then fluctuations of 10% are allowed.

[0156] At this stage, the initial allocated capacity is adjusted according to the priority indicators and relaxation factors of each prefecture-level city. The allocation results and allocation margins of each prefecture-level city are determined, and the installed capacity margins of each prefecture-level city and the cumulative capacity of the upgraded total installed capacity are calculated based on the allocation results of each prefecture-level city.

[0157] Step s3.3: Initial population generation: Apply the differential evolution algorithm to optimize the allocation of photovoltaic installed capacity. In the differential evolution algorithm, an initial population is generated. The individuals in the initial population represent different allocation schemes of photovoltaic installed capacity. The initial value of each individual is randomly generated within the installed capacity range of each prefecture-level city and meets all constraints.

[0158] Step s3.3.1: Define the population size, determine the size of the initial population N, that is, the number of individuals in the population. The choice of population size should be based on the complexity of the problem and the availability of computing resources to ensure that there are enough individuals to cover the solution space.

[0159] Step s3.3.2: Initialize the individual The initial photovoltaic installed capacity of each prefecture-level city in that year is used as the initial solution for each individual.

[0160] Step s3.3.3: Verify the constraints, verify the constraints of each generated individual solution, and ensure that the generated initial allocation plan meets all the set constraints. Specifically, it includes: the upper limit constraint of prefecture-level cities, the photovoltaic installed capacity of each prefecture-level city cannot exceed its maximum installed capacity upper limit; the overall capacity constraint, ensuring that the total cumulative photovoltaic installed capacity of all prefecture-level cities is close to the provincial total target; the grid carrying capacity constraint, the installed capacity of each prefecture-level city must be within the grid carrying capacity; the relaxed proportion constraint, allowing the initial allocation to fluctuate within a certain range; adjust or regenerate individuals that do not meet the constraints until all constraints are met.

[0161] Step s3.3.4: Record and store. Record the generated initial population that meets the constraints and store it in the population database for use in the subsequent differential evolution process.

[0162] Step s3.3.5: Initialize the fitness evaluation, perform fitness evaluation on each individual in the initial population, and calculate its fitness value. The fitness value is calculated based on the objective function, and the objective function value of each individual under the current allocation scheme is evaluated.

[0163] Through these steps, the generated initial population will cover the possible solution space and provide diverse initial solutions for the subsequent differential evolution algorithm, thereby improving the algorithm's search efficiency and optimization effect.

[0164] Step s3.4: Differential evolution algorithm, including: differential mutation operation, crossover operation and selection operation.

[0165] Among them, the differential mutation operation is one of the core steps in the differential evolution algorithm, which is used to generate new mutation vectors to explore the diversity of the solution space. The specific operations are as follows:

[0166] (1) Select three different individuals: Randomly select three different individuals from the current population , , ,in and , is the individual to be mutated.

[0167] (2) Calculate the difference vector. for:

[0168] (twenty two)

[0169] Where 𝐹 is a scaling factor, ranging from [0.5, 1.0], which controls the magnitude of the mutation vector. The difference vector is used to perform mutation operations on the current individual.

[0170] (3) Generate a mutation vector and compare the difference vector with the current individual Perform linear combination to generate mutation vector :

[0171] (twenty three)

[0172] in, is a new mutant individual. The generation of mutation vectors expands the solution space, thereby increasing the chance of finding the global optimal solution.

[0173] Among them, the crossover operation is used to mix the mutation vector and the gene of the current individual to generate a candidate solution. The specific operation steps are as follows.

[0174] (1) Select the crossover probability and determine the crossover probability , takes values ​​between [0,1], indicating the degree of mixing between the mutation vector and the current individual gene.

[0175] (2) Generate candidate solutions and mutate the vector and the current individual Perform crossover operations to generate candidate solutions , for each dimension Genes:

[0176] (twenty four)

[0177] in, is a generated random number, is a randomly selected dimension to ensure diversity in the crossover operation.

[0178] (3) Generate crossover results

[0179] Candidate solutions generated by crossover operation It will be used for the next selection operation. The crossover operation increases the diversity of the population by combining the mutation vector with the genes of the current individual.

[0180] Among them, the selection operation determines which individuals enter the next generation population, and selects better individuals by evaluating the fitness values ​​of candidate solutions and current individuals. The specific operation steps are as follows.

[0181] (1) Calculate the fitness of the current individual and candidate solutions Calculate the fitness value. The fitness value is determined by the objective function value. The smaller the objective function value, the better the solution.

[0182] (2) Select a better individual and replace the current individual and candidate solutions Compare, if the candidate solution

[0183] If the fitness value of is better than the current individual, the candidate solution is used to replace the current individual and enter the next generation population. Otherwise, the current individual is retained and enters the next generation population.

[0184] (3) Update the population. After completing the selection operation of all individuals, update the population. The new generation of population will contain the individuals selected in the selection operation and serve as the basis for the next generation. Continue differential mutation, crossover and selection operations until the termination condition is met.

[0185] Step s4: Priority adjustment and actual allocation: According to the priority indicators and relaxation factors of each prefecture-level city, the initial allocated capacity is dynamically adjusted. Finally, the actual photovoltaic installed capacity allocation plan of each prefecture-level city is determined to meet the priority requirements and conform to the actual situation.

[0186] Furthermore, the step s4 is used to solve the problem that the annual planned amount cannot be fully allocated, and specifically includes:

[0187] Step s4.1: Determine the allocation results and allocation margins of each prefecture-level city, and calculate the installed capacity margins of each prefecture-level city and the cumulative capacity of the upgraded total installed capacity based on the allocation results of each prefecture-level city.

[0188] (25)

[0189] (26)

[0190] in, Indicates The best photovoltaic installed capacity in each prefecture-level city, Indicates The installed capacity surplus of prefecture-level cities, Indicates the installed capacity margin at the provincial level.

[0191] Step s4.2: Calculate the priority index of each prefecture-level city based on factors such as installed capacity, economic benefits, and grid carrying capacity , according to the priority index Sort all prefecture-level cities.

[0192] Among them, the installed capacity margin will give priority to those cities with insufficient capacity in the previous allocation. Cities with small installed capacity margin will be given higher priority; economic benefits: according to the economic benefits of photovoltaic installations in various cities (such as return on investment, cost-effectiveness, etc.), higher priority will be set for cities with higher economic benefits; grid carrying capacity: priority will be given to those cities with strong grid carrying capacity that can support more photovoltaic installations. Based on the above factors, the priority index of each city is calculated. , the cities with higher priority will be given priority in allocating surplus. Calculate the priority index for each prefecture-level city , which comprehensively considers installed capacity, economic benefits and grid carrying capacity. The calculation formula of the priority index is as follows:

[0193] (27)

[0194] in, For the prefecture-level cities in The annual installed capacity surplus, For the prefecture-level cities in The economic coefficient of the year, For the prefecture-level cities in The annual bearing capacity factor, , , are the weight coefficients of installed capacity margin, economic benefit and grid carrying capacity, respectively, satisfying .

[0195] Step s4.3: Adjust the remaining capacity allocation. Adjust the remaining capacity allocation according to the priority index. Use the allocation algorithm to gradually allocate the remaining photovoltaic installed capacity according to the sorting results. Ensure that all remaining PV installed capacity is allocated. If the remaining capacity is still not fully allocated, further adjust the allocation strategy to give priority to prefecture-level cities with higher priority for additional allocation until the remaining capacity is fully allocated. is zero.

[0196] (28)

[0197] Step s4.4: Verification and optimization. Check whether the adjusted allocation results meet all constraints, including the upper limit of installed capacity in cities and prefectures, overall capacity constraints, grid carrying capacity constraints, etc. If it is found that the constraints are not met, readjust the allocation plan. Through sensitivity analysis and optimization iteration, further optimize the allocation results to ensure the rationality and executability of the allocation plan. Adjust the weight coefficient and priority index to ensure that the allocation of photovoltaic installed capacity is as close to the provincial target as possible.

[0198] Step s5: Result analysis and optimization iteration, analyze and backtest the actual allocation plan, calculate the backtest error, and further optimize the parameter settings of the LSTM prediction model and differential evolution algorithm through sensitivity analysis to ensure the rationality and feasibility of the allocation plan.

[0199] Furthermore, the step s5 specifically includes:

[0200] Step s5.1: Backtest the results. Apply the optimized PV installed capacity allocation scheme to the simulated data and perform a preliminary implementation process to verify the actual effect of the scheme. Backtest the application results to compare the deviation between the actual allocation results and the target values, including the difference between the cumulative installed capacity and the expected provincial target. Calculate the backtest error:

[0201] (29)

[0202] in, is the backtest error of the i-th prefecture-level city, Allocate capacity for expectations, The actual allocated capacity.

[0203] Step s5.2: Sensitivity analysis, determine the variables that have a greater impact on the optimization results, including installed capacity forecast error, weight coefficient changes, relaxation factors of constraints, etc. Perform sensitivity tests on the above variables and analyze their impact on the final allocation results. Gradually change the variable values ​​and record the impact on the objective function value. Calculate sensitivity indicators:

[0204] (30)

[0205] in, is the sensitivity index of the j-th variable, is the objective function, is the jth variable.

[0206] Step s5.3: Optimization iteration: According to the backtest results and sensitivity analysis, adjust the parameters of the optimization model, including weight coefficients, relaxation factors, etc., to optimize the performance of the objective function. Reset the parameter values ​​and perform new optimization calculations. Execute the optimization iteration algorithm to optimize the allocation plan for multiple rounds. After each round of optimization, re-execute the result backtest and sensitivity analysis to continuously improve the optimization plan. Use the iterative algorithm to update the allocation plan:

[0207] (31)

[0208] It is the adjustment amount, which is calculated based on the output of the optimization algorithm. After multiple rounds of optimization iterations, it is ensured that the optimization solution meets all constraints and the allocation solution is more accurate and feasible.

[0209] Embodiment 2:

[0210] This embodiment introduces a rooftop photovoltaic installation processing device based on LSTM and differential evolution, including the following modules:

[0211] Data collection and preprocessing module: used to collect data related to distributed photovoltaic systems, including historical photovoltaic installed capacity data, meteorological conditions data and grid carrying capacity data. The collected data is preprocessed to obtain preprocessed data, and the preprocessed data is divided into a training set and a test set. The preprocessing includes cleaning, normalization, data division and format conversion to make the data in the same scale and range and facilitate the training of the LSTM model.

[0212] LSTM model building and prediction module: used to build an LSTM prediction model based on the long short-term memory (LSTM) neural network, use the preprocessed data to train and verify the prediction model so that the prediction model can learn the time series characteristics in the data, use the trained prediction model to predict the distributed photovoltaic installed capacity in future years, and generate a prediction curve.

[0213] Differential evolution algorithm optimization module: used to construct the objective function of the photovoltaic installed capacity optimization problem based on the prediction results of the LSTM prediction model. The differential evolution algorithm is used to optimize the allocation of photovoltaic installed capacity in prefecture-level cities. Considering the constraints such as the installed capacity potential, grid carrying capacity and economic benefits of prefecture-level cities, the optimal installed capacity allocation plan for prefecture-level cities is found through iterative calculation.

[0214] Priority adjustment and actual allocation module: According to the priority indicators and relaxation factors of each prefecture-level city, the initial allocated capacity is dynamically adjusted. The actual photovoltaic installed capacity allocation plan of each prefecture-level city is finally determined to meet the priority requirements and conform to the actual situation.

[0215] The result analysis and optimization iteration module is used to analyze and backtest the actual allocation plan, calculate the backtest error, and further optimize the parameter settings of the LSTM prediction model and differential evolution algorithm through sensitivity analysis to ensure the rationality and executability of the allocation plan.

[0216] Embodiment 3:

[0217] This embodiment introduces a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, a rooftop photovoltaic installation processing method based on LSTM and differential evolution as described in any one of Embodiments 1 is implemented.

[0218] Embodiment 4:

[0219] This embodiment introduces a computer device, including:

[0220] Memory, used to store instructions.

[0221] A processor is used to execute the instructions so that the computer device performs the operations of a rooftop photovoltaic installation processing method based on LSTM and differential evolution as described in any one of Example 1.

[0222] Embodiment 5:

[0223] Suppose a distributed photovoltaic installed capacity optimization allocation project is implemented in a southeastern coastal province. The purpose of the project is to use historical data, meteorological conditions and other relevant factors to predict future photovoltaic installed capacity demand and optimize allocation based on the actual situation of prefecture-level cities. The following are detailed steps and analysis.

[0224] Step S1: Data collection and preprocessing:

[0225] (1) Data collection:

[0226] Historical installed capacity data: Historical data on photovoltaic installed capacity for each prefecture-level city, including annual installed capacity in the past few years. For example, the historical data for City A is as follows:

[0227] 2019: 50 MW

[0228] 2020: 65 MW

[0229] 2021: 72 MW

[0230] 2022: 80 MW

[0231] Meteorological conditions data: Meteorological data of various places, especially factors related to photovoltaic power generation, such as annual average sunshine hours, temperature, humidity, etc. For example, the annual average sunshine hours in City A is 1800 hours, and in City B it is 1500 hours.

[0232] Grid load capacity: The load carrying capacity of the grid determines the maximum capacity of distributed photovoltaic power generation that a region can accommodate. For example, the maximum grid load capacity of City A is 100 MW, and that of City B is 80 MW.

[0233] Regional economic and policy data: This data covers the extent of local government policy support for photovoltaic development and the impact of local economic conditions on photovoltaic development potential. For example, City A has strong photovoltaic industry support policies, while City B has relatively weak policies.

[0234] (2) Data cleaning and preprocessing:

[0235] Remove outliers and missing data: First, clean up outliers. For example, if the photovoltaic installed capacity data of a prefecture-level city in a certain year is abnormal (such as a sudden increase or decrease), further verification or deletion is required.

[0236] Data normalization: Normalize all variables to make the scales of different data sources consistent. Suppose we normalize meteorological data, installed capacity, economic indicators, etc. to the range [0, 1] so that different indicators have the same influence.

[0237] For example, the sunshine hours in City A are 1800 hours, which is 0.8 after normalization; the sunshine hours in City B are 1500 hours, which is 0.6 after normalization.

[0238] Step S2: LSTM prediction model construction and prediction:

[0239] (1) LSTM prediction model construction:

[0240] Training data selection: The installed capacity data and meteorological data of the past few years are used as input, combined with the grid carrying capacity and economic development data as auxiliary features.

[0241] Data partitioning: Divide all data into training set, validation set and test set. For example, use data from 2019 to 2021 as training set, data from 2022 as validation set, and data from 2023 for testing.

[0242] LSTM model design: Select a suitable LSTM network architecture, which may include multiple hidden layers, with different numbers of neurons in each layer. LSTM is suitable for processing time series data. It can capture long-term dependencies and is suitable for processing the temporal relationship between photovoltaic installed capacity and meteorological factors.

[0243] (2) Training LSTM model:

[0244] Input: historical installed capacity of each prefecture-level city (normalized), meteorological conditions data, and other relevant variables (such as economic indicators, grid carrying capacity, etc.).

[0245] Objective: To predict the installed PV capacity in the next few years. To predict the continuous installed PV capacity value through regression model.

[0246] Training process: Optimize the weights of the LSTM model through back propagation. The mean square error (MSE) is usually used as the loss function, and methods such as gradient descent are used for optimization.

[0247] (3) Prediction results:

[0248] The trained LSTM model can predict the installed capacity of photovoltaic power generation in the next few years. For example, the prediction results are as follows:

[0249] City A: 85 MW in 2024, 90 MW in 2025, and 95 MW in 2026.

[0250] City B: 60 MW in 2024, 63 MW in 2025, and 68 MW in 2026.

[0251] These predictions will serve as input to the optimization allocation phase.

[0252] Step S3: Differential evolution algorithm optimization:

[0253] (1) Problem modeling:

[0254] Objective function: Construct an objective function that aims to minimize the error between installed capacity allocation and provincial targets, while taking into account factors such as grid carrying capacity, economic benefits, and environmental suitability of each prefecture-level city.

[0255] (2) Application of differential evolution algorithm:

[0256] Initial population: First, randomly generate multiple possible installed capacity allocation schemes as the initial population of the differential evolution algorithm. For example, the initial allocation of City A is 80 MW and that of City B is 60 MW.

[0257] Fitness evaluation: Calculate the value of the objective function based on each installed capacity allocation scheme. A smaller objective function value indicates a better scheme.

[0258] Mutation and crossover operations: Differential evolution algorithms generate new candidate solutions through mutation (making small adjustments to the solution) and crossover (generating new solutions), and retain the best performing solutions through selection operations.

[0259] Iterative process: The allocation scheme is optimized through multiple iterations until an optimal solution is found.

[0260] (3) Optimization results:

[0261] After multiple iterations, the differential evolution algorithm finally generates a PV installed capacity allocation plan. Assume that after optimization, the allocation plan for City A is 95 MW and that for City B is 65 MW.

[0262] Step S4: Priority adjustment and actual allocation:

[0263] (1) Priority adjustment:

[0264] Assume that the economic development and policy support of City A are strong, so City A has a higher allocation priority. However, the economic development of City B is relatively slow and the grid carrying capacity is weak, so its priority is lower.

[0265] Relaxation factor: A relaxation factor is introduced into the preliminary optimization results to make fine adjustments based on the priority and actual situation of each prefecture-level city. For example, the actual allocation of City A can be adjusted up to 100 MW, while the actual allocation of City B can be adjusted to 60 MW.

[0266] (2) Final distribution plan:

[0267] After adjusting the priority and relaxation factor, the final photovoltaic installed capacity allocation plan is obtained:

[0268] City A: 100 MW (adjusted according to economic benefits and grid carrying capacity)

[0269] City B: 60 MW (adjusted according to grid carrying capacity and economic conditions)

[0270] City C: 40 MW

[0271] City D: 30 MW

[0272] While ensuring that the carrying capacity of local power grids is met, the plan also takes into account differences in regional economic benefits and policy support.

[0273] Step S5: Result analysis and optimization iteration:

[0274] (1) Backtesting and performance analysis:

[0275] The final allocation plan is backtested to evaluate the effect after implementation. For example, the matching of the installed capacity allocated according to the plan with the grid load is simulated in the next three years to ensure that the grid will not be overloaded.

[0276] (2) Sensitivity analysis:

[0277] Conduct sensitivity analysis to assess the sensitivity of the model prediction results to meteorological conditions, economic benefits, policies, etc. For example, analyze whether an increase in sunshine hours or a change in the grid carrying capacity will have a significant impact on the allocation plan.

[0278] (3) Optimization iteration:

[0279] According to the feedback from the backtesting results and sensitivity analysis, the parameters of the LSTM model and differential evolution algorithm are adjusted to optimize the prediction results and allocation plan.

[0280] In the next round of forecasting, optimization will be carried out again based on new data and adjusted models to ensure that the solution is more accurate and feasible.

[0281] The present invention discloses a rooftop photovoltaic installed capacity processing method based on LSTM and differential evolution, which belongs to the technical field of rooftop photovoltaic resource planning. The method includes: data collection and preprocessing, collecting data such as historical installed capacity, meteorological conditions, and grid carrying capacity related to distributed photovoltaic systems, and performing data cleaning and normalization processing to provide a reliable data basis for subsequent modeling; LSTM model construction and prediction, based on a long short-term memory (LSTM) neural network, training the preprocessed data, predicting the development trend of distributed photovoltaic installed capacity in each year in the future, and generating a prediction curve; differential evolution algorithm optimization: using the differential evolution algorithm, according to the prediction results of the LSTM model, optimizing the photovoltaic installed capacity of prefecture-level cities, considering the constraints such as the installed capacity potential, grid carrying capacity, and economic benefits of prefecture-level cities, so as to achieve global optimal capacity allocation; priority adjustment and actual allocation, dynamically adjusting the preliminary allocation amount according to the priority indicators and relaxation factors of each prefecture-level city, and finally determining the actual installed capacity allocation plan of each prefecture-level city; result analysis and optimization iteration, analyzing and backtesting the allocation results, optimizing the model and algorithm parameters through sensitivity analysis, and ensuring the rationality and executability of the allocation plan. This method can effectively predict and optimize the allocation of distributed photovoltaic installed capacity, provide a scientific basis for the planning of photovoltaic power generation systems, and improve the overall efficiency of the system.

[0282] The advantages of this research method are mainly reflected in the following aspects:

[0283] (1) The convergence accuracy of the optimization algorithm is higher and it can more accurately capture the dynamic changes of photovoltaic installed capacity.

[0284] (2) It is more adaptable and can be flexibly adjusted to cope with changes in different regions and needs.

[0285] (3) With stronger optimization capability, the differential evolution (DE) algorithm can effectively find the optimal allocation solution under complex constraints.

[0286] (4) Higher stability. Through systematic data preprocessing and model training, the consistency and reliability of the prediction results are ensured. These advantages fully verify the feasibility of the proposed method. By adopting this method, better economic and social benefits are obtained. This modeling and model solving method can provide effective suggestions for the planning and allocation of photovoltaic installed capacity.

[0287] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A rooftop photovoltaic installation processing method based on LSTM and differential evolution, characterized by: The following steps are involved: Step 1: Acquire data related to the distributed photovoltaic system, preprocess the data to obtain preprocessed data, and divide the preprocessed data into a training set and a test set; Step 2: Use the training set and test set to train and verify the pre-built LSTM prediction model to obtain a trained LSTM prediction model, input the data to be tested into the trained LSTM prediction model, and obtain the forecast value of distributed photovoltaic installed capacity in each prefecture-level city in year t; Step 3: Calculate the total installed capacity of the provincial plan for the tth year according to the predicted value of the distributed photovoltaic installed capacity of each prefecture-level city in the tth year, and calculate the initial distributed photovoltaic installed capacity of each prefecture-level city in the tth year according to the total installed capacity of the provincial plan for the tth year; construct the objective function and constraint conditions, and use the differential evolution algorithm to iteratively optimize the initial distributed photovoltaic installed capacity of each prefecture-level city in the tth year according to the objective function and constraint conditions, and obtain the optimal distributed photovoltaic installed capacity of each prefecture-level city in the tth year; Step 4: Calculate the provincial installed capacity surplus in year t based on the initial distributed photovoltaic installed capacity of each prefecture-level city in year t and the optimal distributed photovoltaic installed capacity of each prefecture-level city in year t, and calculate the actual distributed photovoltaic installed capacity of each prefecture-level city in year t based on the provincial installed capacity surplus in year t; The objective function calculation formula is as follows: F is the objective function, C i (t) is the allocated installed capacity of the ith prefecture-level city in year t, is the total installed capacity of the provincial plan in the set t year, and m is the total number of prefecture-level cities; Constraints include: upper limit constraints on installed capacity in cities and counties, overall capacity constraints, grid carrying capacity constraints and relaxed ratio constraints.

2. According to claim 1, a method for processing rooftop photovoltaic installations based on LSTM and differential evolution is characterized in that: Also includes: Step 5: Conduct simulation based on the actual distributed photovoltaic installed capacity of each prefecture-level city in the tth year, conduct backtesting and sensitivity analysis based on the simulation results, adjust the parameters of the LSTM prediction model and the differential evolution algorithm based on the backtesting results and the sensitivity analysis results, and obtain the adjusted parameters. Substitute the adjusted parameters into the LSTM prediction model and the differential evolution algorithm to obtain the updated LSTM prediction model and the differential evolution algorithm, and repeat steps 1 to 4 using the updated LSTM prediction model and the differential evolution algorithm to obtain the optimized distributed photovoltaic installed capacity of each prefecture-level city in the tth year.

3. According to a method for processing rooftop photovoltaic installations based on LSTM and differential evolution according to claim 1, it is characterized in that: The method for obtaining the initial distributed photovoltaic installed capacity of each prefecture-level city in the tth year specifically includes: Obtain the forecast value of distributed photovoltaic installed capacity of all prefecture-level cities in year t, and sum them up to obtain the forecast value of distributed photovoltaic installed capacity at the provincial level in year t; According to the forecast value of provincial distributed photovoltaic installed capacity in year t, the total installed capacity of the provincial plan in year t is calculated; Calculate the weight coefficient of each prefecture-level city, and calculate the initial distributed photovoltaic installed capacity of each prefecture-level city in year t based on the total installed capacity of the provincial plan in year t and the weight coefficient of each prefecture-level city; Among them, the calculation formula for the initial distributed photovoltaic installed capacity of each prefecture-level city in year t is as follows: in, represents the total installed capacity of the provincial plan for the tth year, w i represents the weight coefficient of the i-th prefecture-level city, represents the initial distributed photovoltaic installed capacity of the i-th prefecture-level city in year t; In the formula, the weight coefficient calculation formula of the i-th prefecture-level city is as follows: Among them, E i is the economic coefficient of the i-th prefecture-level city, H i is the historical development trend coefficient of the i-th prefecture-level city, G i is the carrying capacity coefficient of the ith prefecture-level city, α, β, and γ are the weight ratios of the economic coefficient, historical development trend coefficient, and carrying capacity coefficient, respectively, satisfying α+β+γ=1, and m is the total number of prefecture-level cities.

4. The method for processing rooftop photovoltaic installations based on LSTM and differential evolution according to claim 1, characterized in that: The calculation formula for the upper limit of installed capacity in cities is as follows: C i (t)≤C max,i Among them, C max,i Indicates the maximum installable capacity of each prefecture-level city; The overall capacity constraint calculation formula is as follows: Among them, ε represents the tolerance error; The calculation formula of the grid carrying capacity constraint is as follows: C i (t)≤G i (t) Among them, G i (t) represents the maximum carrying capacity of the power grid in each prefecture-level city; The relaxed proportional constraint is calculated as follows: in, is the improved installed capacity allocation of the i-th prefecture-level city, δ i (t) is the relaxation factor of the ith city in the tth year.

5. The method for processing rooftop photovoltaic installations based on LSTM and differential evolution according to claim 1, characterized in that: The step 4 specifically includes: Step 4.1: Obtain the initial distributed photovoltaic installed capacity of each prefecture-level city in year t and the optimal distributed photovoltaic installed capacity of each prefecture-level city in year t, and calculate the installed capacity surplus of each prefecture-level city in year t; Among them, the calculation formula for the installed capacity surplus of each prefecture-level city in year t is as follows: in, represents the initial distributed photovoltaic installed capacity of the i-th prefecture-level city in the t-th year, C i ′(t) represents the optimal distributed photovoltaic installed capacity of each prefecture-level city in year t, R i (t) represents the installed capacity surplus of the i-th prefecture-level city; Step 4.2: Calculate the provincial installed capacity surplus in year t based on the installed capacity surplus of each prefecture-level city in year t; Among them, the calculation formula for the provincial installed capacity surplus in year t is as follows: Among them, R total (t) represents the provincial installed capacity surplus in year t, and m is the total number of prefecture-level cities; Step 4.3: Calculate the priority indicators of each prefecture-level city in year t and sort them according to the priority indicators; The priority index calculation formula is as follows: P i (t)=α1×R i (t)+β1×E i (t)+γ1×G i (t); Among them, P i (t) represents the priority index of the i-th prefecture-level city in the t-th year, R i (t) is the installed capacity surplus of the i-th prefecture-level city in year t, E i (t) is the economic coefficient of the i-th prefecture-level city in year t, G i (t) is the carrying capacity coefficient of the i-th prefecture-level city in year t, α1, β1, and γ1 are the weight coefficients of installed capacity margin, economic benefit, and grid carrying capacity, respectively, satisfying α1+β1+γ1=1; Step 4.4: Allocate the remaining capacity to each prefecture-level city in turn according to the ranking results of each prefecture-level city and the priority index, and sum the allocated remaining capacity with the optimal distributed photovoltaic installed capacity to obtain the actual distributed photovoltaic installed capacity of each prefecture-level city in year t; Among them, the calculation formula for the actual distributed photovoltaic installed capacity of each prefecture-level city in year t is as follows: in, represents the actual distributed photovoltaic installed capacity of the i-th prefecture-level city in the t-th year, P j (t) represents the priority index of the j-th prefecture-level city in the t-th year.

6. The method for processing rooftop photovoltaic installations based on LSTM and differential evolution according to claim 2, characterized in that: The calculation formula for the backtest result is as follows: Among them, ε i (t) represents the backtest error of the ith prefecture-level city in the tth year, represents the expected allocation capacity of the ith prefecture-level city in the tth year of simulation, represents the actual distributed photovoltaic installed capacity of the i-th prefecture-level city in the t-th year; The calculation formula of the sensitivity analysis results is as follows: Among them, S j is the sensitivity index of the parameters of the j-th LSTM prediction model and the differential evolution algorithm, F is the objective function, X j are the parameters of the j-th LSTM prediction model and differential evolution algorithm.

7. A rooftop photovoltaic installation processing device based on LSTM and differential evolution, characterized in that: Includes the following modules: Data collection and preprocessing module: used to obtain data related to the distributed photovoltaic system, preprocess the data, obtain preprocessed data, and divide the preprocessed data into training sets and test sets; LSTM model building and prediction module: used to train and verify the pre-built LSTM prediction model using the training set and the test set, obtain the trained LSTM prediction model, input the data to be tested into the trained LSTM prediction model, and obtain the predicted value of distributed photovoltaic installed capacity in each prefecture-level city in the tth year; Differential evolution algorithm optimization module: used to calculate the total installed capacity of the provincial plan in the tth year according to the predicted value of the distributed photovoltaic installed capacity of each prefecture-level city in the tth year, and calculate the initial distributed photovoltaic installed capacity of each prefecture-level city in the tth year according to the total installed capacity of the provincial plan in the tth year; construct the objective function and constraint conditions, and use the differential evolution algorithm to iteratively optimize the initial distributed photovoltaic installed capacity of each prefecture-level city in the tth year according to the objective function and constraint conditions, and obtain the optimal distributed photovoltaic installed capacity of each prefecture-level city in the tth year; Priority adjustment and actual allocation module: used to calculate the provincial installed capacity surplus in the tth year according to the initial distributed photovoltaic installed capacity of each prefecture-level city in the tth year and the optimal distributed photovoltaic installed capacity of each prefecture-level city in the tth year, and calculate the actual distributed photovoltaic installed capacity of each prefecture-level city in the tth year according to the provincial installed capacity surplus in the tth year; The objective function calculation formula is as follows: F is the objective function, C i (t) is the allocated installed capacity of the ith prefecture-level city in year t, is the total installed capacity of the provincial plan in the set t year, and m is the total number of prefecture-level cities; Constraints include: upper limit constraints on installed capacity in cities and counties, overall capacity constraints, grid carrying capacity constraints and relaxed ratio constraints.

8. A rooftop photovoltaic installation processing device based on LSTM and differential evolution according to claim 7, characterized in that: Also includes: Result analysis and optimization iteration module: used to implement simulation according to the actual distributed photovoltaic installed capacity of each prefecture-level city in the tth year, perform backtesting and sensitivity analysis based on the simulation results, adjust the parameters of the LSTM prediction model and the differential evolution algorithm according to the backtesting results and the sensitivity analysis results, and obtain the adjusted parameters. Substitute the adjusted parameters into the LSTM prediction model and the differential evolution algorithm to obtain the updated LSTM prediction model and the differential evolution algorithm, and repeat steps 1 to 4 using the updated LSTM prediction model and the differential evolution algorithm to obtain the optimized distributed photovoltaic installed capacity of each prefecture-level city in the tth year.

9. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, a rooftop photovoltaic installation processing method based on LSTM and differential evolution as described in any one of claims 1 to 6 is implemented.

10. A computer device, characterized in that: include: A memory for storing instructions; A processor is used to execute the instructions so that the computer device performs the operations of a rooftop photovoltaic installation processing method based on LSTM and differential evolution as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method for predicting residual life of lithium ion battery based on WDE optimization LSTM network

    CN109991542A

  • Optical storage and charging integrated power station capacity planning method, device and equipment and storage medium

    CN116667334A