Self-adaptive linear and nonlinear hybrid photovoltaic power generation reduction model
By combining linear trend analysis of ARMA model and nonlinear feature extraction of ResNet model, combined with weighted averaging and genetic algorithm optimization, the shortcomings of linear and nonlinear data relationship processing in photovoltaic power generation prediction are solved, and high-precision and adaptive photovoltaics are achieved Power generation forecast.
Patent Information
- Application Number
- CN202411505066.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2024-11-26
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing photovoltaic power generation prediction technology is difficult to fully capture the relationship between linear and nonlinear data, resulting in insufficient prediction accuracy and inability to effectively handle complex nonlinear patterns in photovoltaic power generation data.
Adaptive linear nonlinear hybrid photovoltaic power generation reduction model is adopted to capture linear trends through autoregressive sliding average model (ARMA), and nonlinear mapping and prediction are used using ResNet model, combining weighted average strategy to fuse linear and nonlinear models, and genetically The algorithm dynamically optimizes model parameters.
It realizes comprehensive capture and prediction of photovoltaic power generation data, improves prediction accuracy, model adaptability and generalization capabilities, and can maintain high prediction accuracy under different environments and conditions.
Smart Images

Figure CN119026757A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of photovoltaic power generation data processing, in particular to an adaptive linear and nonlinear hybrid photovoltaic power generation reduction model. Background Art
[0002] In the field of photovoltaic power generation, accurate prediction of photovoltaic power generation is crucial for the stable operation of the power grid and energy management. Although a variety of prediction techniques have been proposed, such as deep learning models and mixed integer nonlinear programming, these methods still face many challenges in practical applications.
[0003] Existing technologies often fail to fully capture and process the relationship between linear and nonlinear data, resulting in insufficient prediction accuracy; although linear models can reveal the linear trend of data, they are usually unable to effectively process complex nonlinear patterns in photovoltaic power generation data; nonlinear patterns may be caused by the complex interaction between various meteorological factors such as temperature, irradiance and wind speed and photovoltaic power generation power; most models fail to fully utilize the regularity of linear data and the complexity of nonlinear data during training, resulting in limited prediction performance in practical applications. Summary of the invention
[0004] Technical issues solved In view of the deficiencies of the prior art, the present invention provides an adaptive linear and nonlinear hybrid photovoltaic power generation reduction model, which solves the problem of how to combine linear and nonlinear models to predict photovoltaic power generation power.
[0005] Technical solution, in order to achieve the above purpose, the present invention is implemented by the following technical solution: an adaptive linear and nonlinear hybrid photovoltaic power generation reduction model, comprising: S1. Collect photovoltaic power generation data and environmental data, process the data, including cleaning to remove outliers and missing values, and normalize to eliminate the dimensional impact of different data sources; S2. Establish a linear model through the autoregressive moving average model ARMA to capture the linear trend of photovoltaic power generation and predict the value of photovoltaic power generation probability; S3. Perform nonlinear mapping, use third-order polynomials to perform nonlinear mapping on photovoltaic power data, and expand the processed data to a high-dimensional space to show the nonlinear relationship between photovoltaic power and meteorological data; based on the mapping results, use ResNet to build a nonlinear model to capture the complex nonlinear changes in power generation; S4. The linear and nonlinear models are integrated based on weighted average, and the outputs of the linear model and the nonlinear model are combined by weighted summation, wherein the weighting coefficient is adaptively adjusted according to the prediction error of the actual power generation; S5. Perform residual analysis. The residual is the difference between the predicted value of the linear model and the actual power value. The ResNet nonlinear model is used to predict the residual. The predicted value of the residual is added to the value predicted by the linear model to obtain the predicted value of the photovoltaic power generation; S6. Based on the actual photovoltaic power generation and predicted value, the linear model and nonlinear model are adaptively adjusted, and the overall performance of the photovoltaic power generation reduction model is dynamically optimized through genetic algorithms.
[0006] Preferably, the temperature, irradiance, wind speed and photovoltaic power generation of the photovoltaic panels are monitored in real time by sensors; after data collection, data cleaning is first performed, including removing or correcting erroneous data records, identifying and processing missing values, and eliminating outliers; outliers are identified through various methods, such as statistical analysis using standard deviation or interquartile range; after data cleaning, normalization is performed to eliminate the dimensional effects of different data sources; normalization is performed through minimum-maximum normalization, which scales all data to the range of [0,1]; the preprocessed data will be used for further analysis and modeling to predict photovoltaic power generation.
[0007] Preferably, firstly, the time series data needs to be kept stable. If the data is not stable, it is transformed by difference. Once the data is stable, statistical software or programming language, such as R or Python, is used to calculate the autocorrelation function ACF and partial autocorrelation function PACF of the time series; the time series data is input into the software, and the calculation functions of ACF and PACF are called. The function provides graphical output to show the correlation under different lags; the ACF graph is observed. If the correlation drops rapidly to a random level after a certain lag point, it indicates that the value before the lag point has a significant effect on the current value, while the value after that has little effect. This lag point can be used as a reference for the order of the autoregressive AR part; then the PACF graph is observed. If the correlation drops rapidly to a random level after a certain lag point, it indicates that the white noise term before the lag point has a significant effect on the current value, while the white noise term after that has little effect. This lag point can be used as a reference for the order of the moving average MA part; after determining the possible orders of AR and MA, the optimal p and q values are selected to determine the order of the ARMA model.
[0008] Preferably, the mapped photovoltaic power data is used as input features to construct a ResNet model; the core of the ResNet model is the residual block, and each residual block consists of two convolutional layers, a batch normalization layer and a ReLU activation function; the convolutional layer is used to extract the features of the input data, the batch normalization layer is used to accelerate the training process and improve the generalization ability of the ResNet model, and the ReLU activation function introduces nonlinearity, so that the ResNet model can capture complex nonlinear relationships; in each residual block, the input data first passes through the first convolutional layer and the batch normalization layer, and then the ReLU activation function is applied; the activated output passes through the second convolutional layer and the batch normalization layer; this output is added to the input data to form a residual connection, and multiple residual blocks are stacked to form the main body of the ResNet model; at the end of the ResNet model, a fully connected layer is added as the output layer to map the output of the residual block to the predicted photovoltaic power; after the ResNet model is built, the ResNet model is trained using the mapped data.
[0009] Preferably, the prediction value of the linear model ARMA is defined as Pt, and the prediction value of the nonlinear model ResNet is defined as ; The formula for weighted average fusion is Among them, w is the weighting coefficient, which is a value between 0 and 1, used to balance the prediction contribution of the linear model and the nonlinear model. The weighting coefficient is adaptively adjusted according to the prediction error of the actual power generation; the prediction errors of the linear model and the nonlinear model are calculated, and then the weighting coefficient w is updated according to the size of the error; if the prediction error of the linear model is small, the value of w is increased, otherwise, the value of w is reduced and the weight of the nonlinear model is increased.
[0010] Preferably, define the residual e t is the predicted value of the linear model The actual power value P actualt The difference between: , use the nonlinear model ResNet to predict these residuals, use the ResNet model to capture the complex nonlinear patterns in the residual data, and provide residual prediction values ; The prediction formula of the ResNet model is Among them, f represents the nonlinear mapping function of the ResNet model, ω represents the model parameters, and n represents the length of the historical residual data considered by the model.
[0011] Preferably, the parameters of the linear model and the nonlinear model are defined as individuals in the genetic algorithm. For the ARMA model, the individuals include the autoregressive coefficient and the moving average coefficient; for the ResNet model, the individuals include the weights and biases in the network; these parameters are encoded as the genes of the individuals, and each individual represents a set of model parameter combinations; the fitness function is defined as the negative value of the prediction error; the smaller the prediction error, the larger the value of the fitness function, and the higher the probability that the individual is selected to participate in the next generation of reproduction; the model parameters are optimized through selection, crossover and mutation operations; in the selection operation, two individuals are randomly selected, and according to the set probability, such as between 0.4 and 0.9, some of their parameters are exchanged to generate new offspring individuals; in the crossover operation, single-point crossover, multi-point crossover or uniform crossover methods are used, and the crossover is performed according to the preset crossover rate; through the iterative process of the genetic algorithm, the individuals in the population are continuously updated, and the individuals with the highest fitness are selected, that is, the model parameter combination with the smallest prediction error; these parameters are used to update the linear model and the nonlinear model, so as to obtain better prediction results in the next generation.
[0012] Beneficial effects: The present invention provides an adaptive linear and nonlinear hybrid photovoltaic power generation reduction model, which has the following beneficial effects: The present invention combines the linear trend analysis of the ARMA model with the nonlinear feature extraction of the ResNet model, so that it can fully capture the complex dynamic changes in photovoltaic power data, including the nonlinear interactions caused by environmental data.
[0013] The present invention dynamically adjusts linear and nonlinear models through an adaptive weighted average strategy, so that the photovoltaic power generation reduction model can be automatically optimized according to the prediction error of the actual power generation, thereby maintaining high prediction accuracy under different environmental and operating conditions.
[0014] The present invention predicts and compensates the residual of the linear model through a nonlinear model, and can also adaptively adjust the model to cope with dynamic changes in the photovoltaic power generation environment, thereby enhancing the generalization ability and adaptability of the photovoltaic power generation reduction model. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 It is a schematic diagram of the process of the present invention. DETAILED DESCRIPTION
[0016] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0017] Embodiment 1: First, the collected raw data is preprocessed, and the data includes the temperature, irradiance, wind speed and photovoltaic power generation of the photovoltaic panel; the data preprocessing mainly includes the cleaning of outliers and missing values; outliers are caused by sensor failure or data collection errors, and these abnormal data are identified and removed by setting upper and lower limits, and the missing data is supplemented by using interpolation and averaging methods; the cleaned data is normalized, the dimensions of each data source are eliminated, and all data are processed at the same scale, thereby improving the training effect and prediction performance of subsequent models.
[0018] Linear modeling uses the autoregressive moving average model ARMA to capture the linear trend of photovoltaic power generation; specifically, the data is first tested for stationarity, using methods such as unit root test. If the data is not stationary, the gradient method is used to set the stationarity; the autocorrelation function ACF and partial autocorrelation function PACF are used to determine the order of the model, that is, the order p and q of the autoregressive part AR and the moving average part MA; the ARMA model is: ; where μ is the long-term mean value of photovoltaic power generation, ϵ t is the white noise term at time t, representing random fluctuations that cannot be explained by the model; is the coefficient of the autoregressive term, which indicates the relationship between the photovoltaic power generation at time t and its past value P t−i The correlation between j is the coefficient of the moving average term, which represents the influence of the white noise term on the current photovoltaic power generation; p and q are the orders of the autoregressive term and the moving average term, respectively. The model can capture the linear dependence of the time series and provide a preliminary prediction of power generation.
[0019] Through the third-order iteration ; Perform nonlinear mapping on photovoltaic power generation data to capture the nonlinear characteristics in the data, where Pt is the photovoltaic power generation at time t, is the high-dimensional space representation after mapping, a3, a2, a1 and a0 are the coefficients of the polynomial; nonlinear mapping divides the data into high-dimensional space, which is conducive to showing the complex nonlinear relationship between photovoltaic power generation and meteorological data residuals; in order to further capture these nonlinear characteristics, deep learning ResNet is used for modeling. ResNet consists of multiple residual blocks, each of which contains two gradient layers and an identity connection to solve the gradient disappearance problem in deep networks; the structure of the ResNet model includes an input layer, a gradient residual block and an output layer. Batch normalization and ReLU activation function are used to accelerate training and enhance the nonlinear representation ability of the model, thereby effectively capturing the complex nonlinear changes of photovoltaic power generation.
[0020] The predicted value of the linear model is recorded as Pt, and the predicted value of the nonlinear model is recorded as PN. The weighted average method is used to combine the two. The formula is Among them, w is the weighting coefficient, and the initial value is set to 0.5, which is used to balance the contribution of the linear model and the nonlinear model. The value of w is dynamically adjusted according to the prediction error. If the error of the linear model is small, the value of w is increased to increase the weight of the linear model. Conversely, if the error of the nonlinear model is small, w is reduced to enhance the influence of the nonlinear model.
[0021] Calculate the residuals between the linear model predictions and the actual values , through which , the ResNet model is used to predict the residual. The residual network captures the nonlinear pattern in the residual and generates a predicted value of the residual. The final predicted value is the sum of the linear prediction result and the residual correction result, thereby further improving the accuracy of the model.
[0022] The model parameters are optimized through genetic algorithm to further improve the prediction of photovoltaic power generation reduction model, including: encoding the autoregressive and moving average coefficients of the ARMA model and the weight parameters of the ResNet model as individuals in the genetic algorithm, each individual represents a model parameter; using the negative value of the prediction slider as the fitness function, and the fitness value indicates that the prediction performance of the model is better; using the roulette algorithm to select individuals with high fitness from the current individuals to participate in proliferation; randomly selecting two individuals for crossover to produce new offspring; mutating the new individuals with a certain probability to increase the diversity of the population; repeatedly selecting, crossover and operating variables until the initial number of iterations is reached or the fitness value is no longer significantly improved.
[0023] The model is trained and validated using historical data, and cross-validation is used to evaluate the generalization ability of the model, including dividing the data into training and test sets, and evaluating the model in different data sets through multiple iterations of training and testing. In order to adapt to different weather conditions, the model needs to be continuously monitored and updated to ensure its robustness.
[0024] The number of ResNet layers and the population size of the genetic algorithm are the main influencing factors. To improve efficiency, the number of ResNet layers is selected through training and the population size of the genetic algorithm is controlled. To ensure the interpretability of the model, the output and internal mechanism of the model are explained by analyzing the changing trend of the weighted coefficients and the residual correction process.
[0025] Example 2: The raw data is first cleaned and normalized. For example, if the irradiance data on some days is abnormally high, such as exceeding 1500 W / m², it is regarded as an outlier and removed; missing data is supplemented by linear interpolation, and then the maximum and minimum normalization is used to map the data to the range of [0,1].
[0026] The ARMA model is used to linearly model the preprocessed photovoltaic power data; it is assumed that after the stationarity test, the autoregressive order p=2 and the moving average order q=1 are selected; the expression of the model is Here, the long-term mean is set to μ = 0.6 (normalized value), and the autoregressive coefficient is , moving average coefficient ; Assume that the power data for the previous two days are P t−1 =0.65, P t−2 =0.60, and the white noise term of the previous day is ϵ t−1 = 0.05, white noise term ϵ t =0, then the linear prediction value P t =0.6+0.5*0.65+0.3*0.60+0.2*0.05=0.6+0.325+0.18+0.01=1.115.
[0027] Next, nonlinear modeling is performed, and a third-order polynomial is used to perform nonlinear mapping on the photovoltaic power data; the mapping formula is: , assuming that the polynomial coefficients are a3=0.2, a2=−0.1, a1=0.3, and a0=0.5; given P t =0.65, the mapped value is =0.2×0.653−0.1×0.652+0.3×0.65+0.5=0.2×0.274625−0.1×0.4225+0.195+0.5=0.707675, and then use the mapped value as input to perform deep learning training using the ResNet model to further extract the complex nonlinear features in the data; assuming that after the prediction of the ResNet model, the nonlinear model outputs is 0.75.
[0028] The predicted output of the linear model Pt=1.115 and the predicted output of the nonlinear model PN=0.75 are weighted fused. The weighted fusion formula is: Assuming the initial weight w=0.6, the output after weighted fusion is =0.6×1.115+0.4×0.75=0.969; compare the prediction results of the model with the actual photovoltaic power generation to evaluate its accuracy; if the actual power value is 0.95, the root mean square error and mean absolute percentage error can be obtained by calculating the error to quantify the prediction performance of the model; through the combination of linear and nonlinear models and adaptive weighted adjustment, the change trend of photovoltaic power generation can be accurately predicted, thereby improving the operating efficiency of the power station and the stability of the power grid.
[0029] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. Adaptive linear and nonlinear hybrid photovoltaic power generation reduction model, characterized in that: The following steps are involved: S1. Collect photovoltaic power generation data and environmental data, process the data, including cleaning to remove outliers and missing values, and normalize to eliminate the dimensional impact of different data sources; S2. Establish a linear model through the autoregressive moving average model ARMA to capture the linear trend of photovoltaic power generation and predict the value of photovoltaic power generation; S3. Perform nonlinear mapping, use third-order polynomials to perform nonlinear mapping on photovoltaic power data, and expand the processed data to a high-dimensional space to show the nonlinear relationship between photovoltaic power and meteorological data; based on the mapping results, use ResNet to build a nonlinear model to capture the complex nonlinear changes in power generation; S4. The linear and nonlinear models are integrated based on weighted average, and the outputs of the linear model and the nonlinear model are combined by weighted summation, wherein the weighting coefficient is adaptively adjusted according to the prediction error of the actual power generation; S5. Perform residual analysis. The residual is the difference between the predicted value of the linear model and the actual power value. The ResNet nonlinear model is used to predict the residual. The predicted value of the residual is added to the value predicted by the linear model to obtain the predicted value of the photovoltaic power generation; S6. Based on the actual photovoltaic power generation and predicted value, the linear model and nonlinear model are adaptively adjusted, and the overall performance of the photovoltaic power generation reduction model is dynamically optimized through genetic algorithms.
2. The adaptive linear-nonlinear hybrid photovoltaic power generation reduction model according to claim 1, characterized in that: The collected photovoltaic power generation data and environmental data include the temperature, irradiance and wind speed of the photovoltaic panels, and the photovoltaic power generation data.
3. The adaptive linear-nonlinear hybrid photovoltaic power generation reduction model according to claim 1, characterized in that: The autoregressive moving average model ARMA first performs a stationarity test on the collected data. If the data is not stationary, it is transformed by a difference method until the data becomes stationary. The order of the ARMA model is identified using the autocorrelation function and the partial autocorrelation function, and the orders p and q of the autoregressive part (AR) and the moving average part (MA) in the model are determined. Power trends by generation Establish an ARMA model; where μ is the long-term mean of photovoltaic power generation, ϵ t is the white noise term at time t, representing random fluctuations that cannot be explained by the model; is the coefficient of the autoregressive term, which indicates the relationship between the photovoltaic power generation at time t and its past value P t−i The correlation between j is the coefficient of the moving average term, which represents the influence of the white noise term on the current photovoltaic power generation; p and q are the orders of the autoregressive term and the moving average term, respectively.
4. The adaptive linear-nonlinear hybrid photovoltaic power generation reduction model according to claim 1, characterized in that: The nonlinear mapping is performed by using a third-order polynomial to perform nonlinear mapping on the photovoltaic power data, and the processed data is expanded to a high-dimensional space; Shows the nonlinear relationship between photovoltaic power generation and meteorological data, where P t is the photovoltaic power generation at time t, is the high-dimensional space representation after mapping, a3, a2, a1 and a0 are the coefficients of the polynomial, which are obtained by fitting the photovoltaic power generation data; based on the mapping results, the residual network ResNet is used to build a nonlinear model to capture the complex nonlinear changes in the power generation; ResNet introduces residual blocks to enable the network to learn deeper feature representations; in ResNet, each residual block contains two convolutional layers and an identity connection to solve the gradient disappearance problem in deep network training; the ResNet model includes an input layer, multiple residual blocks and an output layer, the convolutional layer in each residual block is used to extract features and perform nonlinear transformations, while the batch normalization layer and ReLU activation function are used to accelerate the training process and increase the nonlinearity of the model; in this way, ResNet effectively captures the complex nonlinear patterns in photovoltaic power generation data.
5. The adaptive linear-nonlinear hybrid photovoltaic power generation reduction model according to claim 1, characterized in that: The weighted average is used to fuse the linear and nonlinear models, and the prediction value of the linear model ARMA is defined as Pt, and the prediction value of the nonlinear model ResNet is defined as ; The formula for weighted average fusion is Among them, w is the weighting coefficient, which is a value between 0 and 1, used to balance the prediction contribution of the linear model and the nonlinear model. The weighting coefficient is adaptively adjusted according to the prediction error of the actual power generation; the prediction errors of the linear model and the nonlinear model are calculated, and then the weighting coefficient w is updated according to the size of the error; if the prediction error of the linear model is small, the value of w is increased, otherwise, the value of w is reduced and the weight of the nonlinear model is increased.
6. The adaptive linear-nonlinear hybrid photovoltaic power generation reduction model according to claim 1, characterized in that: The residual analysis is to define the residual e t is the predicted value of the linear model The actual power value P actualt The difference between , use the nonlinear model ResNet to predict these residuals, use the ResNet model to capture the complex nonlinear patterns in the residual data, and provide residual prediction values ; The prediction formula of the ResNet model is , where f represents the nonlinear mapping function of the ResNet model, ω represents the model parameters, and n represents the length of the historical residual data considered by the model.
7. The adaptive linear-nonlinear hybrid photovoltaic power generation reduction model according to claim 1, characterized in that: The method comprises the following steps: adaptively adjusting the linear model and the nonlinear model, calculating the difference between the predicted value after the fusion of the linear model and the nonlinear model and the actual generated power, and obtaining the prediction error; encoding the parameters of the linear model and the nonlinear model into individuals in the genetic algorithm, each individual representing a set of model parameters, including the autoregressive and moving average coefficients of the ARMA model, and the weight and bias of the ResNet model; defining a fitness function, which is the negative value of the prediction error, and selecting individuals to participate in the reproduction process of the next generation according to the fitness function; randomly selecting two individuals, exchanging some of their parameters according to the set probability, and generating new offspring individuals; randomly changing certain parameters in the individuals with a certain probability to increase the diversity of the population; obtaining a set of new parameter combinations through the operation of the genetic algorithm, and using them to update the linear model and the nonlinear model so that better prediction results can be obtained in the next generation.
Citation Information
Patent Citations
Ultrashort-term prediction method for wind electricity power of ARMA model with anemometer network real-time correction
CN103984987A
A photovoltaic module voltage and current characteristic modeling method based on a one-dimensional deep residual network
CN109409024A
Solar total irradiation resource prediction method based on ARMA and BP neural networks
CN110222714A
Short-term power load prediction method based on hybrid model
CN112633556A
Wind power ultra-short-term prediction method based on LSTM-ViT
CN116843057A
Cited By
Photovoltaic power prediction method based on DNN-physical combination model
CN119813167A
