A method and system for constructing an LSTM model for photovoltaic power generation prediction
By constructing an optimized LSTM model and supplementing meteorological parameters with neural networks, the problem of inaccuracy in photovoltaic power generation prediction was solved, achieving high-precision and stable photovoltaic power generation prediction with self-optimization capabilities.
Patent Information
- Application Number
- CN202410616003.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-17
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2044-05-17
AI Technical Summary
Existing photovoltaic power generation forecasting methods are insufficient for accurate forecasting of photovoltaic power plants, especially when meteorological parameters are incomplete or missing, leading to inaccurate fault diagnosis and power generation forecasting.
By employing an LSTM model combined with optimization algorithms, we obtain and filter photovoltaic power plant operation data, perform correlation analysis, construct an LSTM model and optimize hyperparameters, use neural networks to supplement missing meteorological parameters, and predict electrical parameters and assess errors.
It improves the accuracy and stability of photovoltaic power generation forecasting, enables high-precision forecasting even when some meteorological parameters are missing, and has self-updating and self-adjusting capabilities, achieving efficient short-term power forecasting.
Smart Images

Figure CN118194918B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of photovoltaic power generation, and in particular to a method and system for constructing an LSTM model for photovoltaic power generation power prediction. Background Art
[0002] The photovoltaic industry is a strategic emerging industry strongly supported by the country and is supported by national industrial policies. In recent years, under the guidance of the top-level design of carbon peak and carbon neutrality, various supportive policies for the photovoltaic industry have been frequently introduced, supporting the growth and development of the photovoltaic industry through guiding the scale of installed capacity, formulating industry standards, providing financial subsidies, and policy preferences. As photovoltaic technology gradually matures and its economic efficiency gradually improves, the photovoltaic industry is entering a strategic opportunity period for great development. The rapid rise of a new generation of information technology represented by 5G communications, artificial intelligence, advanced computing, and industrial Internet has made it a general trend to accelerate the deep integration and development of the photovoltaic industry and information technology and promote the innovation and upgrading of the smart photovoltaic industry.
[0003] However, as the photovoltaic industry develops substantially, the safety of photovoltaic power generation must be guaranteed, and the faults in photovoltaic power generation need to be detected accurately in real time. However, photovoltaic fault diagnosis is difficult. Photovoltaic power stations are large in scale and consist of thousands of solar panels. It is difficult to check and troubleshoot each panel one by one. The geographical location of photovoltaic power stations may be relatively remote, and transportation is inconvenient, which brings certain difficulties to fault detection and troubleshooting. Photovoltaic power stations have a wide variety of equipment and models, which increases the difficulty of fault detection and troubleshooting. Accurate prediction of photovoltaic power station operation data is of great significance for fault diagnosis.
[0004] Therefore, in order to improve the safety and stability of power system operation, accurately judge whether there are abnormal conditions in the operation of photovoltaic power stations, and accurately predict the power and power generation of photovoltaic power stations in the future, it is of great significance. At present, it is urgent to propose a method for constructing an LSTM model for photovoltaic power generation prediction. Summary of the invention
[0005] In view of the problems existing in the existing method for constructing an LSTM model for photovoltaic power generation prediction, the present invention is proposed. Therefore, the problem to be solved by the present invention is how to provide a method and system for constructing an LSTM model for photovoltaic power generation prediction.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0007] In a first aspect, the present invention provides a method for constructing an LSTM model for photovoltaic power generation prediction, which includes obtaining operating data of a distributed photovoltaic power station, and performing screening and data preprocessing; performing correlation analysis on the data, deciding whether to retain the data based on the analysis results, and organizing the retained operating data into high-dimensional array samples to produce a data set; constructing an LSTM model, optimizing the hyperparameters of the model, and training the model using data in a training set to obtain a trained model; performing electrical parameter prediction to obtain predicted electrical data, and performing comparative analysis and error evaluation on the obtained predicted electrical data and actual electrical data to complete model construction.
[0008] As a preferred scheme of the method for constructing the LSTM model for photovoltaic power generation prediction described in the present invention, the operating data includes meteorological parameters and electrical parameters; the meteorological parameters include wind speed, temperature, relative humidity, horizontal radiation, diffuse horizontal radiation, wind direction, daily rainfall and atmospheric pressure, and the electrical parameters include voltage, current, power and power generation.
[0009] As a preferred solution of the method for constructing the LSTM model for photovoltaic power generation prediction described in the present invention, the data preprocessing includes deleting all samples with abnormal data less than 0 and samples with incomplete data, normalizing all data, and using the maximum normalization method for all electrical parameters. The formula is as follows:
[0010] ;
[0011] Where p is the actual power value; is the normalized relative power, is the rated capacity of the photovoltaic power station; the meteorological characteristic vector is expressed as follows:
[0012] ;
[0013] In the formula, represents the meteorological feature vector of the i-th day; n represents the sampling time of the data; , , , , , , They represent the temperature, horizontal radiation, atmospheric pressure, relative humidity, diffuse horizontal radiation, wind speed, and wind direction at the nth sampling moment respectively.
[0014] As a preferred solution of the method for constructing the LSTM model for photovoltaic power generation prediction described in the present invention, the correlation analysis includes performing a grey correlation analysis on all meteorological parameters and electrical parameters, retaining meteorological parameters with a correlation coefficient higher than 0.9, and the grey correlation calculation formula is as follows:
[0015] ;
[0016] In the formula, is the correlation between the ith meteorological parameter and photovoltaic power generation, is the photovoltaic power generation power, is the i-th meteorological parameter, The resolution coefficient is 0.5; k is the kth data, that is, the data composed of the meteorological parameters collected at the nth moment and the power generation power collected at the corresponding moment.
[0017] As a preferred solution of the method for constructing the LSTM model for photovoltaic power generation prediction described in the present invention, the data set includes a training set and a test set, and the data set is randomly divided into 90% for the training set and 10% for the test set.
[0018] As a preferred solution of the construction method of the LSTM model for photovoltaic power generation prediction described in the present invention, the electrical parameter prediction includes taking the meteorological parameters of the test set as the input of the model network and the obtained electrical data as the output. If the meteorological parameters are partially missing or incomplete, the meteorological parameters are supplemented, and the electrical parameters are predicted after being supplemented with historical data or prediction models; the meteorological parameters are supplemented, including supplementing with meteorological data collected at nearby times and redesigning the model to predict and supplement the missing data using known meteorological parameters, specifically: analyzing the missing meteorological data to see whether the change range of the historical data within ten minutes exceeds 5%; if the change range of the historical data within ten minutes is less than 5%, the missing data is supplemented with the data collected at the previous moment; if the change range of the historical data within ten minutes is greater than 5%, the model is changed to remove the corresponding missing meteorological parameters in the training set, the model is retrained, and the missing meteorological parameters are predicted after the converged model is obtained, and the missing meteorological parameters are filled with the predicted meteorological parameters.
[0019] As a preferred solution of the method for constructing the LSTM model for photovoltaic power generation prediction described in the present invention, the hyperparameters of the optimization model include the hyperparameters of the optimization model using the optimization algorithm, and the calculation formula is as follows:
[0020] ;
[0021] In the formula, For The tangent line drawn from the tangent point is The intersection of the circles with the center being the circle with the radius defined as and The distance between points, and the tangent segment is the distance between points and The distance between them; the orthogonal function g is and Connection and and The angle of the connecting line, for The tangent value of ; the entire dimension of each search agent is uniformly randomized, and its initialization search formula is as follows:
[0022] ;
[0023] In the formula, UB is the upper limit of the search space, LB is the lower limit of the search space, r is the radius of the circle, for The calculation formula for updating the search agent position is as follows:
[0024] ;
[0025] In the formula, for vector; rand is a random number between 0 and 1, Iter represents the iteration counter, Maxiter represents the maximum number of iterations, w is the angle in radians, b and p are variables that change with Iter and Maxiter; the variable w range is , the variable b range is , the variable p range is [0,1].
[0026] In a second aspect, the present invention provides a system for constructing an LSTM model for photovoltaic power generation prediction, which includes: an acquisition module, used to obtain the operating data of distributed photovoltaic power stations, and perform screening and data preprocessing; an analysis module, used to perform correlation analysis on the data, decide whether to retain it based on the analysis results, organize the retained operating data into high-dimensional array samples, and make a data set; a construction module, used to construct an LSTM model, optimize the hyperparameters of the model, and use the data in the training set to train the model to obtain a trained model; an evaluation module, used to predict electrical parameters, obtain predicted electrical data, compare and analyze the obtained predicted electrical data with the actual electrical data and perform error evaluation to complete model construction.
[0027] In a third aspect, the present invention provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: when the processor executes the computer program, it implements the steps of a method for constructing an LSTM model for photovoltaic power generation prediction.
[0028] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, the steps of a method for constructing an LSTM model for photovoltaic power generation prediction are implemented.
[0029] The beneficial effects of the present invention are that the optimization algorithm is combined with the LSTM model, the hyperparameters of the LSTM model are optimized, and the performance of the photovoltaic power prediction model is improved. When realizing the prediction of photovoltaic power, it is possible to not rely on the integrity of meteorological parameters. When some meteorological parameters are missing, the neural network model can be used to supplement the missing data to ensure the high accuracy of predicting the power generation of the photovoltaic power station. It has the characteristics of higher accuracy and long-term stability, and the model has good self-update and self-regulation capabilities. It can continuously adjust and optimize itself according to historical data and real-time data, and constantly approach the real photovoltaic power output. To realize short-term power prediction, the predicted value of the missing meteorological data is obtained as a supplement after model training, and the model itself can realize self-iteration and maintain convergence. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0031] Figure 1 Flow chart of the method for building an LSTM model for photovoltaic power generation prediction.
[0032] Figure 2 Flowchart of the optimization algorithm.
[0033] Figure 3 This is a grey relational analysis diagram.
[0034] Figure 4 This is the power prediction curve corresponding to 10 training times of the training set.
[0035] Figure 5 This is the power prediction curve corresponding to 20 training times of the training set.
[0036] Figure 6 This is the power prediction curve corresponding to 25 training times of the training set.
[0037] Figure 7 This is the power prediction curve corresponding to 30 training times of the training set.
[0038] Figure 8The power prediction curve corresponding to each group of training data is 20.
[0039] Fig. 9 The power prediction curve corresponding to each group of training data is 10.
[0040] Fig.10 The power prediction curve corresponding to each group of training data is 1.
[0041] Fig.11 It is a line graph of relative error corresponding to different amounts of training data in each group.
[0042] Fig.12 The relative error line graph corresponding to the number of training sets.
[0043] Fig.13 It is a line chart of relative error corresponding to different amounts of single training data.
[0044] Fig.14 This is the power prediction curve under the best condition. DETAILED DESCRIPTION
[0045] In order to make the above-mentioned purposes, features and advantages of the present invention more understandable, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.
[0046] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0047] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.
[0048] Example 1
[0049] Reference Figure 1 , which is the first embodiment of the present invention, and provides a method for constructing an LSTM model for photovoltaic power generation prediction, comprising:
[0050] S1: Obtain the operating data of the distributed photovoltaic power station, and perform screening and data preprocessing.
[0051] Specifically, the operating data include meteorological parameters and electrical parameters; meteorological parameters include wind speed, temperature, relative humidity, horizontal radiation, diffuse horizontal radiation, wind direction, daily rainfall and atmospheric pressure; electrical parameters include voltage, current, power and power generation.
[0052] Data preprocessing includes deleting all samples with abnormal data less than 0 and samples with incomplete data, and normalizing all data. The relevant calculation formula is as follows:
[0053] The maximum normalization method is used for all electrical parameters, and the formula is as follows:
[0054] ;
[0055] Where p is the actual power value; is the normalized relative power, is the rated capacity of the photovoltaic power station; the meteorological characteristic vector is expressed as follows:
[0056] ;
[0057] In the formula, represents the meteorological feature vector of the i-th day; n represents the sampling time of the data; , , , , , , They represent the temperature, horizontal radiation, atmospheric pressure, relative humidity, diffuse horizontal radiation, wind speed, and wind direction at the nth sampling moment respectively.
[0058] The electrical parameter vector is expressed as , represents the power generation at the nth sampling moment on the i-th day.
[0059] S2: Perform correlation analysis on the data, decide whether to retain it based on the analysis results, organize the retained operating data into high-dimensional array samples, and create a data set.
[0060] Specifically, a grey correlation analysis is performed on all meteorological parameters and electrical parameters, and meteorological parameters with correlation coefficients higher than 0.9 are retained. The grey correlation calculation formula is as follows:
[0061] ;
[0062] In the formula, is the correlation between the ith meteorological parameter and photovoltaic power generation, is the photovoltaic power generation power, is the i-th meteorological parameter, is the resolution coefficient, which takes a value of 0.5; k is the kth data, that is, the data composed of the meteorological parameters collected at the nth moment and the power generation power collected at the corresponding moment.
[0063] The data set includes a training set and a test set. The data set is randomly divided into 90% for the training set and 10% for the test set.
[0064] The electrical parameter prediction includes taking the meteorological parameters of the test set as the input of the model network and taking the obtained electrical data as the output. If the meteorological parameters are partially missing or incomplete, the meteorological parameters are supplemented and the electrical parameter prediction is performed after the meteorological parameters are supplemented with historical data or prediction models.
[0065] Supplementing meteorological parameters includes using meteorological data collected at nearby times to supplement and redesigning the model to use known meteorological parameters to predict and supplement missing data, specifically:
[0066] Analyze the missing meteorological data to see if the historical data changes by more than 5% within ten minutes;
[0067] If the historical data changes by less than 5% within ten minutes, the missing data will be supplemented with the data collected at the last moment;
[0068] If the historical data changes by more than 5% within ten minutes, the model is changed to remove the corresponding missing meteorological parameters in the training set, and the model is retrained. After a converged model is obtained, the missing meteorological parameters are predicted and the predicted meteorological parameters are used to fill in the missing meteorological parameters.
[0069] S3: Build an LSTM model, optimize the model's hyperparameters, and use the data in the training set to train the model to obtain the trained model.
[0070] Specifically, the optimization algorithm is used to optimize the hyperparameters of the model. The calculation formula is as follows:
[0071] ;
[0072] In the formula, For The tangent line drawn from the tangent point is The intersection of the circles with the center being the circle with the radius defined as and The distance between points, and the tangent segment is the distance between points and The distance between them; the orthogonal function g is and Connection and and The angle of the connecting line, for The tangent value of
[0073] The entire dimension of each search agent is uniformly randomized, and its initialization search formula is as follows:
[0074] ;
[0075] In the formula, UB is the upper limit of the search space, LB is the lower limit of the search space, r is the radius of the circle, for A vector of
[0076] The calculation formula for updating the search proxy position is as follows:
[0077] ;
[0078] In the formula, for vector; rand is a random number between 0 and 1, Iter represents the iteration counter, Maxiter represents the maximum number of iterations, w is the angle in radians, b and p are variables that change with Iter and Maxiter; the variable w range is , the variable b range is , the variable p range is [0,1].
[0079] S4: Predict electrical parameters to obtain predicted electrical data, compare and analyze the predicted electrical data with the actual electrical data and conduct error evaluation to complete model construction.
[0080] Specifically, the absolute value of the difference between the predicted electrical data and the actual electrical data is calculated to obtain a scatter plot of the error with respect to time. Then, the cubic spline interpolation method is used to fit the scatter points and the curve is integrated to obtain the relative error. The size of the relative error is used to evaluate the accuracy of the prediction.
[0081] Furthermore, this embodiment also provides a system for building an LSTM model for photovoltaic power generation prediction, including: an acquisition module, used to obtain the operating data of distributed photovoltaic power stations, and perform screening and data preprocessing; an analysis module, used to perform correlation analysis on the data, decide whether to retain it based on the analysis results, and organize the retained operating data into high-dimensional array samples to produce a data set; a construction module, used to build an LSTM model, optimize the hyperparameters of the model, and use the data in the training set to train the model to obtain a trained model; an evaluation module, used to predict electrical parameters, obtain predicted electrical data, compare and analyze the obtained predicted electrical data with the actual electrical data and conduct error evaluation to complete model construction.
[0082] This embodiment also provides a computer device, which is suitable for the method of constructing an LSTM model for photovoltaic power generation prediction, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute computer-executable instructions to implement all or part of the steps of the method described in the embodiment of the present invention as proposed in the above embodiment.
[0083] This embodiment also provides a storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method in any optional implementation of the above embodiment is executed. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, referred to as SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, referred to as EEPROM), erasable programmable read-only memory (Erasable Programmable Read Only Memory, referred to as EPROM), programmable read-only memory (Programmable Red-Only Memory, referred to as PROM), read-only memory (Read-Only Memory, referred to as ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0084] The storage medium proposed in this embodiment and the data storage method proposed in the above embodiment belong to the same inventive concept. The technical details not fully described in this embodiment can be found in the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0085] As can be seen from the above, the present invention combines the optimization algorithm with the LSTM model, optimizes the hyperparameters of the LSTM model, and improves the performance of the photovoltaic power prediction model. When realizing the prediction of photovoltaic power, it can be independent of the integrity of meteorological parameters. When some meteorological parameters are missing, the neural network model can be used to supplement the missing data to ensure the high accuracy of predicting the power generation of the photovoltaic power station. It has the characteristics of higher accuracy and long-term stability, and the model has good self-update and self-regulation capabilities. It can continuously adjust and optimize itself according to historical data and real-time data to continuously approach the real photovoltaic power output. To realize short-term power prediction, the predicted value of the missing meteorological data is obtained as a supplement after model training, and the model itself can realize self-iteration and maintain convergence.
[0086] Example 2
[0087] Reference Figure 2 - Fig.14, which is the second embodiment of the present invention, and this embodiment provides a method for constructing an LSTM model for photovoltaic power generation prediction. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through economic benefit calculation and simulation experiments.
[0088] In this embodiment, the power relative errors corresponding to different amounts of training data per group, training set training times, and single training data amounts in the process of designing the parameters of the long-term and short-term neural network model are shown in Tables 1 to 3, and the corresponding line graphs are shown in Figures 11 to 13 The results show that the prediction effect is best when the number of neurons in the input layer, hidden layer and output layer of the long-term and short-term neural network is 400, 200 and 100 respectively, the amount of training data in each group is 1 per group, the number of training sets is 25 times, and the amount of single training data is 600 groups; in the best case, the power prediction curve is as follows Fig.14 shown.
[0089] Table 1 Relative error table corresponding to different amounts of training data per group
[0090]
[0091] As can be seen from Table 1, the prediction relative error obtained by adjusting the amount of training data in each group of the model can reflect the accuracy of the prediction model. Table 1 lists the relative errors corresponding to the amount of training data in each group from 20, 10, to 1, indicating that the relative error will decrease as the amount of training data in each group decreases. In addition, the training samples used in the first two columns of Table 1 are only one year's data, and the training samples used in the last three columns are ten years, indicating that the relative error will also decrease as the database expands. Therefore, after expanding the database, the model prediction accuracy is highest when each group is trained with 1 data.
[0092] Table 2 Relative error table corresponding to different training sets training times
[0093]
[0094] It can be seen from Table 2 that the number of training times of different training sets has an impact on the prediction accuracy of the model. The relative error reaches the minimum when the training set is trained 25 times, indicating that 25 training times of the training set is the best training number for the model.
[0095] Table 3 Relative error table corresponding to different single training data amounts
[0096]
[0097] It can be seen from Table 3 that the relative error of model prediction increases with the amount of single training data. When the amount of single training data increases from 120 to 600, the relative error decreases to 1.35%; after the amount of single training data exceeds 600, the relative error is higher than 1.35%, indicating that the model prediction effect is best when 600 pieces of data are used for single training.
[0098] As can be seen from the above, the present invention combines the optimization algorithm with the LSTM model, optimizes the hyperparameters of the LSTM model, and improves the performance of the photovoltaic power prediction model. When realizing the prediction of photovoltaic power, it can be independent of the integrity of meteorological parameters. When some meteorological parameters are missing, the neural network model can be used to supplement the missing data to ensure the high accuracy of predicting the power generation of the photovoltaic power station. It has the characteristics of higher accuracy and long-term stability, and the model has good self-update and self-regulation capabilities. It can continuously adjust and optimize itself according to historical data and real-time data to continuously approach the real photovoltaic power output. To realize short-term power prediction, the predicted value of the missing meteorological data is obtained as a supplement after model training, and the model itself can realize self-iteration and maintain convergence.
[0099] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A method for constructing an LSTM model for photovoltaic power generation prediction, characterized in that: include, Obtain the operating data of distributed photovoltaic power stations, and perform screening and data preprocessing; Perform correlation analysis on the data, decide whether to retain it based on the analysis results, organize the retained operating data into high-dimensional array samples, and create a data set; The correlation analysis includes performing grey correlation analysis on all meteorological parameters and electrical parameters, and retaining meteorological parameters with correlation coefficients higher than 0.
9. The grey correlation calculation formula is as follows: ; In the formula, is the correlation between the ith meteorological parameter and photovoltaic power generation, is the photovoltaic power generation power, is the i-th meteorological parameter, is the resolution coefficient, which is 0.5; k is the kth data, that is, the data composed of the meteorological parameters collected at the nth moment and the power generation collected at the corresponding moment; Build an LSTM model, optimize the model's hyperparameters, and use the data in the training set to train the model to obtain the trained model; The hyperparameters of the optimization model include the hyperparameters of the optimization model optimized using the optimization algorithm, and the calculation formula is as follows: ; In the formula, For The tangent line drawn from the tangent point is The intersection of the circles with the center being the circle with the radius defined as and The distance between points, and the tangent segment is the distance between points and The distance between them; the orthogonal function g is and Connection and and The angle of the connecting line, for The tangent value of The entire dimension of each search agent is uniformly randomized, and its initialization search formula is as follows: ; In the formula, UB is the upper limit of the search space, LB is the lower limit of the search space, r is the radius of the circle, for A vector of The calculation formula for updating the search proxy position is as follows: ; In the formula, for vector; rand is a random number between 0 and 1, Iter represents the iteration counter, Maxiter represents the maximum number of iterations, w is the angle in radians, b and p are variables that change with Iter and Maxiter; the variable w range is , the variable b range is , the variable p range is [0,1]; Conduct electrical parameter prediction to obtain predicted electrical data, compare and analyze the predicted electrical data with the actual electrical data and conduct error evaluation to complete model construction.
2. The method for constructing an LSTM model for photovoltaic power generation prediction according to claim 1, characterized in that: The operating data include meteorological parameters and electrical parameters; meteorological parameters include wind speed, temperature, relative humidity, horizontal radiation, diffuse horizontal radiation, wind direction, daily rainfall and atmospheric pressure; electrical parameters include voltage, current, power and power generation.
3. The method for constructing an LSTM model for photovoltaic power generation prediction according to claim 2, characterized in that: The data preprocessing includes deleting all samples with abnormal data less than 0 and samples with incomplete data, normalizing all data, and using the maximum normalization method for all electrical parameters. The formula is as follows: ; Where p is the actual power value; is the normalized relative power, The installed rated capacity of the photovoltaic power station; The formula for expressing the meteorological characteristic vector is as follows: ; In the formula, represents the meteorological feature vector of the i-th day; n represents the sampling time of the data; , , , , , , They represent the temperature, horizontal radiation, atmospheric pressure, relative humidity, diffuse horizontal radiation, wind speed, and wind direction at the nth sampling moment respectively.
4. The method for constructing an LSTM model for photovoltaic power generation prediction according to claim 3, characterized in that: The data set includes a training set and a test set, and the data set is randomly divided into 90% for the training set and 10% for the test set.
5. The method for constructing an LSTM model for photovoltaic power generation prediction according to claim 4, characterized in that: The electrical parameter prediction includes taking the meteorological parameters of the test set as the input of the model network and taking the obtained electrical data as the output. If the meteorological parameters are partially missing or incomplete, the meteorological parameters are supplemented and the electrical parameter prediction is performed after the meteorological parameters are supplemented using historical data or a prediction model. Supplementing meteorological parameters includes using meteorological data collected at nearby times to supplement and redesigning the model to use known meteorological parameters to predict and supplement missing data. Specifically, the missing meteorological data is analyzed to see whether the change range of historical data within ten minutes exceeds 5%; if the change range of historical data within ten minutes is less than 5%, the missing data is supplemented with the data collected at the previous moment; If the historical data changes by more than 5% within ten minutes, the model is changed to remove the corresponding missing meteorological parameters in the training set, and the model is retrained. After a converged model is obtained, the missing meteorological parameters are predicted and the predicted meteorological parameters are used to fill in the missing meteorological parameters.
6. A system for constructing an LSTM model for photovoltaic power generation prediction, based on the method for constructing an LSTM model for photovoltaic power generation prediction according to any one of claims 1 to 5, characterized in that: include, The acquisition module is used to obtain the operating data of the distributed photovoltaic power station and perform screening and data preprocessing; The analysis module is used to perform correlation analysis on the data, decide whether to retain it based on the analysis results, and organize the retained operating data into high-dimensional array samples to create a data set; The construction module is used to build the LSTM model, optimize the model's hyperparameters, and train the model using the data in the training set to obtain the trained model; The evaluation module is used to predict electrical parameters, obtain predicted electrical data, compare and analyze the predicted electrical data with the actual electrical data and conduct error evaluation to complete model construction.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method for constructing an LSTM model for photovoltaic power generation prediction as described in any one of claims 1 to 5 are implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for constructing an LSTM model for photovoltaic power generation prediction as described in any one of claims 1 to 5 are implemented.
