Distributed photovoltaic power prediction method based on sun position algorithm
By introducing solar position algorithms and optimizing the longitude and latitude of photovoltaic units in distributed photovoltaic power prediction, combined with numerical weather forecast data, the problem of poor prediction results in the existing technology is solved, and higher prediction accuracy and accuracy are achieved.
Patent Information
- Application Number
- CN202411409061.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2025-01-14
AI Technical Summary
The existing distributed photovoltaic power prediction method ignores calculating photovoltaic power influencing factors such as solar altitude angle and azimuth angle, resulting in poor prediction results, especially when distributed photovoltaic modules are dispersed and data conditions are poor, it is difficult to Achieve high-precision distribution network scheduling.
A distributed photovoltaic power prediction method based on the solar position algorithm is adopted. By calculating the solar altitude angle and azimuth angle, the longitude and latitude of the photovoltaic unit are optimized, and the prediction model is constructed, combined with numerical weather forecast data to improve the prediction accuracy.
By introducing solar position characteristics, the accuracy of distributed photovoltaic power prediction is improved, the prediction error is reduced, the prediction accuracy of the aggregate value of distributed resource areas is enhanced, and the calculation amount and cost of online prediction are not increased.
Smart Images

Figure CN119315537A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of distributed photovoltaic power prediction, and in particular to a distributed photovoltaic power prediction method based on a solar position algorithm. Background Art
[0002] With the transformation of energy structure and the rapid development of renewable energy, photovoltaic power generation, as a clean and renewable energy form, is increasingly widely used. Distributed and centralized are the main forms of photovoltaic power generation. At present, distributed photovoltaic power generation is widely used in urban and rural power distribution systems. Its distribution, intermittency and volatility bring new challenges to the dispatching of distribution networks. Distributed photovoltaic power prediction is a direct means of estimating the aggregation of such distributed resources. It is also a key technology required to achieve the stable operation of urban and rural power distribution networks and improve the economic benefits of photovoltaic power generation.
[0003] At present, the input variables used in photovoltaic power prediction are mainly numerical weather forecasts (NWP), including total horizontal irradiance, diffuse irradiance, direct irradiance, temperature, relative humidity, wind speed, and cloud cover. Unlike centralized photovoltaics, distributed photovoltaics have scattered photovoltaic modules, large numbers, long distances, and incomplete measurement devices. Their data conditions are poor and they need to be supplemented with effective photovoltaic characteristic data. Existing distributed photovoltaic power prediction methods only use the variables provided by numerical weather forecasts, ignoring some calculable factors affecting photovoltaic power, such as solar altitude angle and azimuth, resulting in poor prediction results. Summary of the invention
[0004] Technical purpose: In order to overcome the deficiencies in the prior art, the present invention provides a distributed photovoltaic power prediction method based on a solar position algorithm. By introducing computable variables that describe the position of the sun, effective input variables are supplemented for the data-driven model of distributed photovoltaic power prediction, thereby improving the quality of distributed photovoltaic power prediction and improving the prediction accuracy of the regional aggregated value of such distributed resources during the distribution network scheduling process.
[0005] Technical solution: To achieve the above purpose, the present invention discloses a distributed photovoltaic power prediction method based on a solar position algorithm, which includes obtaining historical power data of photovoltaic units and also includes the following steps:
[0006] S1: Generate solar position features. Within the longitude and latitude range of the photovoltaic unit, use the solar position algorithm to calculate the solar position features at each moment. The solar position features include the solar altitude angle and the solar azimuth angle.
[0007] S2: Transformation of solar position characteristics: transform the solar position characteristics using trigonometric functions, calculate the correlation evaluation index, and compare the correlation between each solar position characteristic and its transformation and the historical power data;
[0008] S3: Optimize the photovoltaic longitude and latitude, taking the highest correlation between the solar position characteristics and the historical power of the photovoltaic unit as the optimization goal, and calculate the optimal virtual longitude and latitude of the photovoltaic unit through the optimization algorithm to generate the optimal solar position characteristics;
[0009] S4: Build a prediction model, which includes data preprocessing, feature engineering, model structure selection, model training, and hyperparameter optimization;
[0010] S5: Online prediction, taking the optimized solar position characteristics, real-time PV power and NWP as input, predicts the power of the PV unit.
[0011] Furthermore, the solar position algorithm is used to obtain the solar position characteristics:
[0012] Altitude angle h(φ,λ t ,t) and azimuth γ(φ,λ t ,t), where λ t is the longitude of the PV unit, φ is the latitude of the PV unit;
[0013] The sun position algorithm includes the following steps:
[0014] S11: Calculate the Julian day n after time t, the formula is as follows,
[0015] n=jd-2451545,
[0016] Where t is universal time, including year, month, day, hour H, minute m, second s, jd is the number of days from t to January 1, 4713 BC;
[0017] S12: Calculate the ecliptic coordinates of the sun. The formula is as follows:
[0018] λ e =L+p6sing+p7sin2g+p8+p9·sinΩ,
[0019] ε=p 10 +p 11 n+p 12 ·cosΩ,
[0020] Ω=p0+p1·n,
[0021] L=p2+p3·n,
[0022] g=p4+p5·n,
[0023] Among them, λ e is the ecliptic longitude, ε is the ecliptic inclination;
[0024] S13: Calculate the celestial coordinates of the sun. The formula is as follows:
[0025] ra=tan -1 [cosε·sinλ e / cosλ e ],
[0026] δ=sin -1 [sinε·sinλ e ],
[0027] Among them, ra is the right ascension of the sun, and δ is the declination of the sun;
[0028] S14: Calculate the horizontal coordinates of the sun. The formula is as follows:
[0029] gmst=p 13 +p 14 n+(H+m / 60+s / 3600),
[0030] ω=(gmst·π / 12+λ t ),
[0031] γ=tan -1 [-sinω / (tanδ·cosφ-sinφ·cosω)],
[0032] θ z =cos -1 [cosφ·cosδ·cosω+sinφ·sinδ],
[0033] θ 矫正 =θ z +EMR / AUsinθ z ,
[0034] h=π / 2-θ 矫正
[0035] Where gmst is the Greenwich mean sidereal time, ω is the solar hour angle, θ z The sun's zenith angle, θ 矫正 is the parallax correction of the zenith angle, and h is the altitude angle of the sun;
[0036] p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p 10 、p 11 、p 12 、p 13 、p 14 , EMR and AU are constant coefficients.
[0037] Furthermore, the correlation evaluation index may adopt Pearson, Spearman or Kendall correlation coefficient.
[0038] Furthermore, the calculation steps are as follows:
[0039] First: Use trigonometric functions to transform the sun position feature, and the new feature after transformation is x(t);
[0040] Secondly: The correlation evaluation index uses the Pearson correlation coefficient to calculate the correlation index between the new feature x(t) and the historical power:
[0041]
[0042] in, is the mean of the new feature x(t), N is the number of time t, r(x, y) is the correlation coefficient, and γ is the historical power;
[0043] Finally: judge the effectiveness of the new feature x(t):
[0044] When the absolute value of the correlation coefficient obtained using the new feature x(t) is greater than the absolute value of the correlation coefficient obtained using the sun position feature before the transformation, the new feature is taken as a valid feature; otherwise, the sun position feature before the transformation is taken as a valid feature.
[0045] Further, optimizing the photovoltaic longitude and latitude includes the following steps:
[0046] First, we build an optimization model.
[0047] Decision variables: latitude φ and longitude λ t ,
[0048] Constraints:
[0049] Objective function: maxR(φ, λ t , y),
[0050] Where R is the correlation coefficient;
[0051] Then, the optimization algorithm is used to solve the problem. The optimization algorithm is a grid search method. It is assumed that the grid interval is Δφ=π / 180 in the latitude direction and Δλ in the longitude direction. t =π / 90, then the coordinates of the grid point in row i and column j can be expressed as (φ i ,λ tj )=(-π / 2+i·Δφ, -π+j·Δλ t ), and transform the optimization model into:
[0052] Decision variables: grid point indices i and j,
[0053] Constraints:
[0054] Objective function: maxR(φ i ,λ tj , y),
[0055] Generate the solar position characteristics corresponding to each time t of the historical power for each grid point longitude and latitude, calculate the objective function, compare the objective function values corresponding to each grid point, and take
[0056]
[0057] As the optimal grid point index, the optimal virtual longitude and latitude are:
[0058]
[0059] Finally, the optimal sun position feature is generated according to the optimal virtual longitude and latitude.
[0060] Furthermore, the data preprocessing ensures the data quality of the prediction model through outlier correction and normalization; the feature engineering improves the correlation between output and input through correlation analysis, feature selection and transformation; in the model structure, the regression model can select Lasso regression, ridge regression or elastic net regression, the decision tree model can select random forest, extreme gradient boosting or lightweight gradient boosting machine, and the neural network model can select multilayer perceptron, long short-term memory network or Transformer; the model training fits the functional relationship from input to output through supervised learning on historical data; the hyperparameter optimization finds the hyperparameter combination with the best model prediction performance through an optimization algorithm, and the hyperparameters include the structural parameters and training parameters of the model.
[0061] Furthermore, in order to predict the photovoltaic power at a certain time t* The steps to build the prediction model are as follows:
[0062] First, we establish a sample set S = {s t =(i t , O t )|t∈T}, each time t corresponds to a sample s t , by input l t and output O t Composition, t is a vector consisting of the NWP meteorological variables and the solar position characteristic variable values at time t, t is the actual power at time t;
[0063] Secondly, select the model structure f and give the hyperparameter θ, and initialize the trainable parameters δ of the prediction model;
[0064] Then, the sample set S is randomly divided into the training set S in a ratio of 8:2. train and validation set S eval , solve the objective function:
[0065]
[0066] minloss(S eval ,f θ,δ ),
[0067] Finally, we get the prediction model f θ,δ .
[0068] Furthermore, the online prediction step includes:
[0069] First, the offline generation time t * The optimized sun position characteristics;
[0070] Secondly, obtain real-time data of PV units, including real-time power and NWP;
[0071] Then, follow i t Generate method construction
[0072] Finally, the predicted value of photovoltaic power is obtained according to the following formula:
[0073]
[0074] The distributed photovoltaic power prediction method based on the solar position algorithm of the present invention has at least the following beneficial effects:
[0075] 1. The technical solution of the present invention introduces additional solar position variables including solar altitude angle and solar azimuth angle. These variables have a high correlation with photovoltaic power, which provides data support for distributed photovoltaic power prediction and improves the accuracy of photovoltaic power prediction.
[0076] 2. The present invention optimizes the longitude and latitude of distributed photovoltaic units by establishing an optimization model, and then calculates the sun's position based on the optimized longitude and latitude, so that the algorithm can cover the situation where the actual longitude and latitude information of the photovoltaic unit is unavailable.
[0077] 3. The calculations involved in the solar position feature generation and feature transformation steps, photovoltaic unit longitude and latitude optimization steps, and prediction model construction steps of the power prediction method of the present invention can all be completed offline, without increasing the amount of calculation for online prediction and without incurring additional costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0078] Figure 1 It is a flow chart of the photovoltaic power prediction method based on the sun position algorithm;
[0079] Figure 2 Optimize the flow chart for photovoltaic longitude and latitude;
[0080] Figure 3 To compare the MAE of daily forecasts throughout the year before and after the introduction of the sun position feature;
[0081] Figure 4 To compare the RMSE of daily predictions throughout the year before and after the introduction of the sun position feature;
[0082] Figure 5 Comparison of single-day predicted power curves before and after the introduction of solar position characteristics. DETAILED DESCRIPTION
[0083] The following is combined with Figure 1 To Attachment Figure 2 The principles and features of the present invention are described, and the examples given are only used to explain the present invention, rather than to limit the scope of the present invention.
[0084] A distributed photovoltaic power prediction method based on a solar position algorithm includes obtaining photovoltaic unit historical power data and the following steps:
[0085] S1: Generate sun position features.
[0086] The solar position algorithm can calculate the position characteristics of the sun at a certain time relative to a certain longitude and latitude on the earth, among which the altitude angle and azimuth angle have the strongest correlation with photovoltaic power. Therefore, the solar position algorithm needs to provide longitude and latitude and time, where the time is all the times corresponding to the historical power and the power to be predicted. Specifically, the solar position feature generation process is as follows:
[0087] Within the longitude and latitude range of the photovoltaic unit, the solar position algorithm is used to calculate the solar position characteristics at each moment. The solar position characteristics include the solar altitude angle and the solar azimuth angle, which are used as effective characteristics of photovoltaic power for subsequent photovoltaic power prediction. Among them, the altitude angle is h(φ,λ t ,t), and the azimuth is γ(φ,λ t ,t),λ t is the longitude of the photovoltaic unit, and φ is the latitude of the photovoltaic unit. The solar position algorithm needs to calculate a series of intermediate variables in sequence to finally obtain the solar altitude angle and solar azimuth angle. The specific steps are as follows:
[0088] S11: Calculate the Julian day n after time t, the formula is as follows,
[0089] n=jd-2451545,
[0090] Where t is universal time, including year, month, day, hour H, minute m, second s, jd is the number of days from t to January 1, 4713 BC;
[0091] S12: Calculate the ecliptic coordinates of the sun. The formula is as follows:
[0092] λ e =L+P6sing+P7sin2g+p8+p9·sinΩ,
[0093] ε=P 10 +p 11 n+P 12 ·cosΩ,
[0094] Ω=p0+p1·n,
[0095] L=p2+p3·n,
[0096] g=p4+p5·n,
[0097] Among them, λ e is the ecliptic longitude, ε is the ecliptic inclination;
[0098] S13: Calculate the celestial coordinates of the sun. The formula is as follows:
[0099] ra=tan -1 [cosε·sinλ e / cosλ e ],
[0100] δ=sin -1 [sinε·sinλ e ],
[0101] Among them, ra is the right ascension of the sun, and δ is the declination of the sun;
[0102] S14: Calculate the horizontal coordinates of the sun. The formula is as follows:
[0103] gmst=p 13 +p 14 n+(H+m / 60+s / 3600),
[0104] ω=(gmst·π / 12+λ t ),
[0105] γ=tan -1 [-sinω / (tanδ·cosφ-sinφ·cosω)],
[0106] θ z =cos -1 [cosφ·cosδ·cosω+sinφ·sinδ],
[0107] θ 矫正 =θ z +EMR / AUsinθ z ,
[0108] h=π / 2-θ 矫正
[0109] Where gmst is the Greenwich mean sidereal time, ω is the solar hour angle, θ z The sun's zenith angle, θ 矫正 is the parallax correction of the zenith angle, and h is the altitude angle of the sun;
[0110] p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p 10 、p 11 、p 12 、p 13 、p 14 , EMR and AU are constant coefficients, as shown in Table 1.
[0111] Table 1 Constant coefficients of the sun position algorithm
[0112]
[0113]
[0114] S2: Transformation of solar position features. The solar position features obtained through step S1 are angular features, but the angular solar position features are nonlinearly correlated with photovoltaic power. They can be converted into linear correlations through transformation methods such as trigonometric function transformations, and then the correlation evaluation index is calculated to determine the effectiveness of the transformation. For example, the solar altitude angle and solar azimuth angle can be transformed using sin, cos, tan, etc., and the correlation evaluation index can use correlation coefficients such as Pearson, Spearman, Kendall, etc. Compare the correlation between each feature and its transformation and photovoltaic power, and select features with high correlation as the input of the prediction model. Specifically, the steps for transforming the solar position features are as follows:
[0115] The solar position characteristics are transformed using trigonometric functions, and then the correlation evaluation index is calculated to compare the correlation between each solar position characteristic and its transformation and the historical power data. The calculation steps are as follows:
[0116] First, the sun position feature is transformed using trigonometric functions. Assuming the original feature is u(t), the new feature after transformation is x(t). The transformation of the sun altitude angle and azimuth angle includes:
[0117] x(t)=sin(A·u(t)+B),
[0118] x(t)=tan(C·u(t)+D),
[0119] Among them, A, B, C, and D are constants, the value range of A and C is [1, 2], and the value range of B and D is (-π, π).
[0120] Secondly: The correlation evaluation index uses the Pearson correlation coefficient to calculate the correlation index between the new feature x(t) and the historical power:
[0121]
[0122] in, is the mean of the new feature x(t), N is the number of time t, r(x, y) is the correlation coefficient, and y is the historical power.
[0123] Finally: Determine the validity of the new feature x(t): When the absolute value of the correlation coefficient obtained using the new feature x(t) is greater than the absolute value of the correlation coefficient obtained using the solar position feature before the transformation, the new feature x(t) is used as a valid feature; otherwise, the solar position feature before the transformation is used as a valid feature. That is, when |r(x, y)|>|r(u, y)|, the new feature x(t) is used as a valid feature for subsequent photovoltaic power prediction, otherwise, the original feature u(t) is used as a valid feature for subsequent photovoltaic power prediction. The correlation coefficients of all solar position features and all their trigonometric transformations are calculated in turn, and compared according to the above method to determine the valid features of the solar position features.
[0124] S3: Optimize photovoltaic longitude and latitude. Taking the highest correlation between the solar position characteristics and the historical power of the photovoltaic unit as the optimization goal, the optimal virtual longitude and latitude of the photovoltaic unit is calculated through the optimization algorithm to generate the optimal solar position characteristics. The optimization of photovoltaic longitude and latitude includes the following steps:
[0125] First, we build an optimization model.
[0126] Decision variables: latitude φ and longitude λ t ,
[0127] Constraints:
[0128] Objective function: maxR(φ, λ t , y),
[0129] Wherein, R is the correlation coefficient obtained by the method in step S2;
[0130] Then, an optimization algorithm is used to solve the optimization problem. The optimization algorithm can select a grid search method, assuming that the grid interval is Δφ=π / 180 in the latitude direction and Δλ in the longitude direction. t=π / 90, then the coordinates of the grid point in row i and column j can be expressed as (φ i ,λ tj )=(-π / 2+i·Δφ, -π+j·Δλ t ), and transform the optimization model into:
[0131] Decision variables: grid point indices i and j,
[0132] Constraints:
[0133] Objective function: maxR(φ i ,λ tj , y),
[0134] Generate the solar position characteristics corresponding to each time t of the historical power for each grid point longitude and latitude, calculate the objective function, compare the objective function values corresponding to each grid point, and take
[0135]
[0136] As the optimal grid point index, the optimal virtual longitude and latitude are:
[0137]
[0138] Finally, according to the optimal virtual longitude and latitude, the optimal sun position feature is generated according to step S1 for subsequent model training and prediction.
[0139] S4: Construct a prediction model. Constructing a prediction model includes data preprocessing, feature engineering, model structure selection, model training, and hyperparameter optimization. Data preprocessing ensures the data quality of the prediction model through outlier correction and normalization. Feature engineering improves the correlation between output and input through correlation analysis, feature selection, and transformation. In the model structure, the regression model can choose Lasso regression, ridge regression, or elastic net regression, the decision tree model can choose random forest, extreme gradient boosting, or lightweight gradient boosting machine, and the neural network model can choose multilayer perceptron, long short-term memory network, or Transformer. Model training fits the functional relationship from input to output through supervised learning on historical data. Hyperparameter optimization finds the hyperparameter combination with the best model prediction performance through optimization algorithms. Hyperparameters include the structural parameters and training parameters of the model.
[0140] In a specific embodiment, in order to predict a certain time t * Photovoltaic power The steps to build the prediction model are as follows:
[0141] First, we establish a sample set S = {s t =(i t,o t )|t∈T}, each time t corresponds to a sample s t , by input i t and output o t Composition, i t is a vector composed of the NWP meteorological variables and the characteristic variable values of the solar position at time t, where the NWP meteorological variables include irradiance, heat flux, wind speed, temperature, air pressure, air density, humidity, cloud cover and precipitation. t is the actual power at time t;
[0142] Secondly, select the model structure f and give the hyperparameter θ, and initialize the trainable parameters δ of the prediction model;
[0143] Then, the sample set S is randomly divided into training set S in a ratio of 8:2. train and validation set S eval , prediction model f θ,δ The training of decision variables is the trainable parameter δ, and the objective function is The optimization problem is solved, and the hyperparameter optimization is that the decision variable is the hyperparameter θ and the objective function is minloss(S eval ,f θ,δ ) optimization problem solution;
[0144] Finally, by solving the above optimization problem, we can get the prediction model f θ,δ .
[0145] S5: Online prediction. The optimized solar position characteristics, real-time photovoltaic power and NWP are used as input to predict the power of the photovoltaic unit. Specifically, the online process is as follows:
[0146] First, generate the time t offline in advance * The optimized sun position characteristics;
[0147] Secondly, obtain real-time data of PV units, including real-time power and NWP;
[0148] Then, follow the steps in step S4. t Generate method construction
[0149] Finally, the predicted value of photovoltaic power is obtained according to the following formula: That is the photovoltaic power at that moment:
[0150]
[0151] As attached Figure 3 and attached Figure 4As shown in the figure, in the experiment of day-ahead power forecasting for a domestic photovoltaic power station, after introducing the solar position feature, the annual mean absolute error (MAE) was reduced by 50.27% and the annual root mean square error (RMSE) was reduced by 38.30%. Figure 5 As shown in the figure, the power prediction value after introducing the solar position feature is closer to the actual power value than the prediction value before the introduction.
[0152] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A distributed photovoltaic power prediction method based on a solar position algorithm, comprising obtaining historical power data of photovoltaic units, characterized in that: The following steps are also included: S1: Generate solar position features. Within the longitude and latitude range of the photovoltaic unit, use the solar position algorithm to calculate the solar position features at each moment. The solar position features include the solar altitude angle and the solar azimuth angle. S2: Transformation of solar position characteristics: transform the solar position characteristics using trigonometric functions, calculate the correlation evaluation index, and compare the correlation between each solar position characteristic and its transformation and the historical power data; S3: Optimize the photovoltaic longitude and latitude, taking the highest correlation between the solar position characteristics and the historical power of the photovoltaic unit as the optimization goal, and calculate the optimal virtual longitude and latitude of the photovoltaic unit through the optimization algorithm to generate the optimal solar position characteristics; S4: Build a prediction model, which includes data preprocessing, feature engineering, model structure selection, model training, and hyperparameter optimization; S5: Online prediction, taking the optimized solar position characteristics, real-time PV power and NWP as input, predicts the power of the PV unit.
2. The distributed photovoltaic power prediction method based on the solar position algorithm according to claim 1 is characterized in that: The solar position characteristics obtained using the solar position algorithm are: Altitude angle h(φ,λ t ,t) and azimuth γ(φ,λ t ,t), where λ t is the longitude of the PV unit, φ is the latitude of the PV unit; The sun position algorithm includes the following steps: S11: Calculate the Julian day n after time t, the formula is as follows, n=jd-2451545, Where t is universal time, including year, month, day, hour H, minute m, second s, jd is the number of days from t to January 1, 4713 BC; S12: Calculate the ecliptic coordinates of the sun. The formula is as follows: λ e =L+p6sing+p7sin2g+p8+p9·sinΩ ε0p 10 +p 11 ·n+p 12 ·cosΩ, Ω=p0+p1·n; L=p2+p3·n, g=p4+p5·n, Among them, λ e is the ecliptic longitude, ε is the ecliptic inclination; S13: Calculate the celestial coordinates of the sun. The formula is as follows: <h2 style=";text-align:left;direction:ltr">ra=tan<h2 style=";text-align:left;direction:ltr"> -1 <h2 style=";text-align:left;direction:ltr"> cosε·sinλ<h2 style=";text-align:left;direction:ltr"> e <h2 style=";text-align:left;direction:ltr"> / cosλ<h2 style=";text-align:left;direction:ltr"> e <h2 style=";text-align:left;direction:ltr"> ], δ=sin -1 [sinε·sinλ e ], Among them, ra is the right ascension of the sun, and δ is the declination of the sun; S14: Calculate the horizontal coordinates of the sun. The formula is as follows: gmst=p 13 +p 14 ·n+(H+m / 60+s / 3600), ω=(gmst·π / 12+λ t ), γ=tan -1 [-sinω / (tanδ·cosφ-sinφ·cosω)], i z =cos -1 [cosφ·cosδ·cosω+sinφ·sinδ], i 矫正 =θ z +EMR / AUsinθ z , h=π / 2-θ 矫正 Where gmst is the Greenwich mean sidereal time, ω is the solar hour angle, θ z The sun's zenith angle, θ 矫正 is the parallax correction of the zenith angle, and h is the altitude angle of the sun; p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p 10 、p 11 、p 12 、p 13 、p 14 , EMR and AU are constant coefficients.
3. The distributed photovoltaic power prediction method based on the solar position algorithm according to claim 2 is characterized in that: The correlation evaluation index can be Pearson, Spearman or Kendall correlation coefficient.
4. The distributed photovoltaic power prediction method based on the solar position algorithm according to claim 2 is characterized in that: The calculation steps are as follows: First: Use trigonometric functions to transform the sun position feature, and the new feature after transformation is x(t); Secondly: The correlation evaluation index uses the Pearson correlation coefficient to calculate the correlation index between the new feature x(t) and the historical power: in, is the mean of the new feature x(t), N is the number of time t, r(x, y) is the correlation coefficient, and y is the historical power; Finally: judge the effectiveness of the new feature x(t): When the absolute value of the correlation coefficient obtained using the new feature x(t) is greater than the absolute value of the correlation coefficient obtained using the sun position feature before the transformation, the new feature is taken as a valid feature; otherwise, the sun position feature before the transformation is taken as a valid feature.
5. The distributed photovoltaic power prediction method based on the solar position algorithm according to claim 4 is characterized in that: Optimizing PV longitude and latitude includes the following steps: First, we build an optimization model. Decision variables: latitude φ and longitude λ t , Constraints: Objective function: max R(φ, λ t , y), Where R is the correlation coefficient; Then, the optimization algorithm is used to solve the problem. The optimization algorithm is a grid search method. It is assumed that the grid interval is Δφ=π / 180 in the latitude direction and Δλ in the longitude direction. t =π / 90, then the coordinates of the grid point in row i and column j can be expressed as (φ i ,λ tj )=(-π / 2+i·Δφ, -π+j·Δλ t ), and transform the optimization model into: Decision variables: grid point indices i and j, Constraints: Objective function: max R(φ i ,λ tj , y), Generate the solar position characteristics corresponding to each time t of the historical power for each grid point longitude and latitude, calculate the objective function, compare the objective function values corresponding to each grid point, and take As the optimal grid point index, the optimal virtual longitude and latitude are: Finally, the optimal sun position feature is generated according to the optimal virtual longitude and latitude.
6. The distributed photovoltaic power prediction method based on the solar position algorithm according to claim 1 is characterized in that: The data preprocessing ensures the data quality of the prediction model by correcting outliers and normalizing them; the feature engineering improves the correlation between output and input by correlation analysis, feature selection and transformation; in the model structure, the regression model can select Lasso regression, ridge regression or elastic net regression, the decision tree model can select random forest, extreme gradient boosting or lightweight gradient boosting machine, and the neural network model can select multilayer perceptron, long short-term memory network or Transformer; the model training fits the functional relationship from input to output through supervised learning on historical data; the hyperparameter optimization finds the hyperparameter combination with the best model prediction performance through an optimization algorithm, and the hyperparameters include the structural parameters and training parameters of the model.
7. The distributed photovoltaic power prediction method based on the solar position algorithm according to claim 1 is characterized in that: To predict a certain time t * Photovoltaic power The steps to build the prediction model are as follows: First, we establish a sample set S = {s t =(i t ,o t )|t∈T}, each time t corresponds to a sample s t , by input i t and output o t Composition, i t is a vector consisting of the NWP meteorological variables and the solar position characteristic variable values at time t, t is the actual power at time t; Secondly, select the model structure f and give the hyperparameter θ, and initialize the trainable parameters δ of the prediction model; Then, the sample set S is randomly divided into training set S in a ratio of 8:
2. train and validation set S eval , solve the objective function: minloss(S eval ,f θ,δ ), Finally, we get the prediction model f θ,δ .
8. The distributed photovoltaic power prediction method based on the solar position algorithm according to claim 7 is characterized in that: The online prediction steps include: First, the offline generation time t * The optimized sun position characteristics; Secondly, obtain real-time data of PV units, including real-time power and NWP; Then, follow i t Generate method construction Finally, the predicted value of photovoltaic power is obtained according to the following formula:
Citation Information
Cited By
Electric power intelligent adaptive compensation method and system
CN119921415A