Generating capacity prediction method and system based on digital twinborn model of photovoltaic power station
By building a digital twin model of photovoltaic power stations, combining the improved LSTM algorithm and GAN model, processing real-time data and environmental conditions, the shortcomings of the existing photovoltaic power station power generation prediction model under complex conditions are solved, and power generation prediction with higher accuracy and reliability are achieved.
Patent Information
- Application Number
- CN202510703214.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-29
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2045-05-29
AI Technical Summary
The existing photovoltaic power generation prediction model relies on static or semi-dynamic data analysis, making it difficult to effectively process real-time data flows, resulting in the impact of power generation efficiency and reliability under complex weather conditions, increasing the complexity and management difficulty of power system operation.
The power generation prediction method based on the photovoltaic power station digital twin model is adopted. By generating photovoltaic power station operation data that matches the actual distribution, a digital twin model including physical model and data-driven model is constructed, and a modified LSTM algorithm and GAN model are used to integrate real-time data and environmental conditions to predict power generation.
It significantly improves the accuracy of photovoltaic power generation prediction, solves the problems of data complexity and uncertainty of environmental factors, improves the generalization ability and robustness of the model, and provides reliable decision-making support for power system scheduling.
Smart Images

Figure CN120237637A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of renewable energy, and particularly relates to a power generation prediction method and system based on a digital twin model of a photovoltaic power station. Background Art
[0002] As an important part of clean energy, the construction and application of photovoltaic power stations have developed rapidly. However, due to the superposition of the intermittency and volatility of photovoltaic power generation and the randomness of huge power output, the spatio-temporal inconsistency of power supply and demand in the power system is aggravated, which in turn causes a series of power grid stability problems such as voltage over-limit and frequency fluctuation. Especially under complex weather conditions, the power generation efficiency and reliability of photovoltaic power stations are significantly affected, further increasing the complexity of power system operation and management difficulty. Existing power generation prediction models for photovoltaic power stations often rely on static or semi-dynamic data analysis and lack the ability to fully process real-time data streams, and it is difficult to effectively meet and adapt to the power generation prediction requirements of photovoltaic power stations. Summary of the Invention
[0003] The object of the present invention is to provide a power generation prediction method and system based on a digital twin model of a photovoltaic power station for the above problems existing in the prior art.
[0004] To achieve the above object, the technical solution of the present invention is as follows:
[0005] In the first aspect, the present invention proposes a power generation prediction method based on a digital twin model of a photovoltaic power station, including:
[0006] S1. Based on the operation parameters of various core components of the photovoltaic power station, generate photovoltaic power station operation data that conforms to the actual distribution, and construct a digital twin model that simulates the operation status of the photovoltaic power station in reality. The digital twin model includes a physical model and a data-driven model;
[0007] S2. Input the generated photovoltaic power station operation data that conforms to the actual distribution into the physical model of the photovoltaic power station and the data-driven model of the photovoltaic power station constructed by using an improved LSTM algorithm respectively, and obtain the power generation prediction values of the physical model and the data-driven model;
[0008] S3. Integrate the power generation prediction values of the physical model and the data-driven model of the photovoltaic power station to obtain the final power generation prediction result of the photovoltaic power station.
[0009] In step S2, the specific steps of constructing a data-driven model of a photovoltaic power station by using an improved LSTM algorithm include:
[0010] A. Perform preprocessing on the photovoltaic power station operation data to obtain positive and negative sample pairs that adjust the data feature distribution;
[0011] B. Input the positive and negative sample pair data into the LSTM model, initialize the LSTM model architecture, and calculate the predicted power generation value using the following formula:
[0012] ;
[0013] ;
[0014] In the above formula, is the predicted power generation value of the data-driven model, is the predicted power generation value of the th hidden unit, is the weight matrix of the fully connected layer, is the hidden state, serving as the input to the fully connected layer, is the bias term of the fully connected layer;
[0015] C. Construct a comprehensive loss function to jointly optimize the predicted future power generation value:
[0016] ;
[0017] ;
[0018] ;
[0019] ;
[0020] In the above formula, is the comprehensive loss function, is the mean square error function, is the mean absolute error function, is the contrastive loss function, , , are the weights of each function, is the total number of predicted power generation samples, is the true power generation value, is a predefined boundary value, is the distance between positive sample pairs, the distance between negative sample pairs.
[0021] The said step A includes:
[0022] A1. Conduct feature construction on the photovoltaic power station operation data, and use the following formula to convert hours into periodic features of the data:
[0023] ;
[0024] ;
[0025] In the above formula, is the sine periodic feature, is the time step, is the cosine periodic feature;
[0026] A2. Decompose and denoise the periodic features of the data, and extract the IMF components of the data, including:
[0027] A21. Find all the local maximum points and minimum points of the original data signal , where is the time index, the set of time indices of the maximum points is , the set of time indices of the minimum points is , and construct the upper envelope through the local maximum points respectively, and construct the lower envelope through the local minimum points;
[0028] A22. Based on the envelopes of the local maximum points and minimum points, calculate the residual signal using the following formula:
[0029] ;
[0030] ;
[0031] In the above formula, is the residual signal, is the instantaneous mean;
[0032] A23. Judge whether the residual signal meets the two conditions of the IMF component, that is, within any time period, the number of maximum points and minimum points is equal or differs by no more than one, and the average value of the upper and lower envelopes is zero. If it meets the conditions, the residual signal is an IMF component, denoted as , and remove this IMF component from the original signal. If it does not meet the conditions, return to step B1, find all the local maximum points and minimum points of the residual signal , decompose the residual signal until the residual signal becomes a monotonic function or meets the two conditions of the IMF component. Finally, represent the original data signal as:
[0033] ;
[0034] In the above formula, is the total number of IMF components, is the residual term;
[0035] A3. Based on the IMF components of the data, form a multi-scale feature matrix, including:
[0036] A31. Analyze the energy distribution of various IMF components and select the effective characteristic components using the following formula:
[0037] ;
[0038] In the above formula, is the effective characteristic component, that is, the variance contribution rate, is the standard deviation;
[0039] A32. Recombine the effective characteristic components after energy analysis into a new input sequence, ensuring that each time step contains all selected IMF components, to form the following multi-scale feature matrix:
[0040] ;
[0041] In the above formula, is the multi-scale feature matrix composed of the selected effective characteristic components, is the matrix containing all selected IMF components at time step ;
[0042] A33. Perform feature dimensionality reduction on the multi-scale feature matrix using the following formula:
[0043] ;
[0044] In the above formula, is the multi-scale feature matrix after feature dimensionality reduction;
[0045] A4. Construct positive sample pairs from the data within the same time period in the multi-scale feature matrix after feature dimensionality reduction, construct negative sample pairs from the data in different time periods, and construct an optimal transport problem model to adjust the distribution of the data features of the positive and negative sample pairs:
[0046] ;
[0047] ;
[0048] ;
[0049] ;
[0050] In the above formula, is the optimal transport problem model, is the transport cost matrix, is the transport plan matrix, is the positive sample pair, is the negative sample pair, is the th source distribution sample and the a target distribution sample The Euclidean distance between is the source distribution, is the target distribution, is the transpose of the transmission plan matrix.
[0051] In S2, the physical model of the photovoltaic power station includes:
[0052] ;
[0053] ;
[0054] ;
[0055] ;
[0056] ;
[0057] ;
[0058] ;
[0059] ;
[0060] ;
[0061] ;
[0062] ;
[0063] ;
[0064] ;
[0065] ;
[0066] ;
[0067] ;
[0068] In the above formula, is the predicted value of the physical model power generation, is the corrected load current, is the corrected load voltage, is the corrected photocurrent, is the corrected dark current, is the load voltage, is the output current, is the series resistance, is the corrected parallel resistance is the load resistance, is the photocurrent, , , , , , , are all the non - linear effects of environmental conditions on the power generation of photovoltaic modules, is the short - circuit current under standard test conditions, is the light intensity, is the temperature coefficient, is the actual temperature, is the temperature under standard test conditions, , , are respectively the correction value of photocurrent, the correction value of dark current, and the correction value of shunt resistance, which are mean functions generated by the diffusion model, , , , , are all correction coefficients, is the critical value of temperature, is the operation time of the module, is the life of the module, is the maximum light intensity, is the actual humidity level, is the maximum humidity level, is the non - linear exponent describing temperature, is the critical humidity value, is the average wind speed, is the variance of wind speed, is the dark current, is the reverse saturation current, is the electronic charge, is the ideality factor, is the number of cells in series, is the Boltzmann constant, is the shunt resistance, is the shunt resistance under standard test conditions, is the load current correction coefficient, is the maximum output current, is the non - linear exponent describing the load current.
[0069] The specific steps for generating the mean function generated by the diffusion model include:
[0070] a. The forward diffusion process, using the following formula from the real sample data Start by gradually adding Gaussian noise to the data to completely randomize the data distribution:
[0071] ;
[0072] In the above formula, is the conditional probability distribution from the previous time step to the current time step in the forward diffusion process, is the sample data at the current time step, is the normal distribution, is the diffusion intensity, is the identity matrix;
[0073] b. Reverse generation process. Starting from Gaussian noise, use the following formula to generate the mean function by gradually denoising:
[0074] ;
[0075] In the above formula, is the conditional probability distribution from the current time step to the previous time step in the reverse generation process, is the conditional variable, representing external control information related to the generation process, is the mean function, representing the correction value at the current time step, is the variance.
[0076] The S3 includes:
[0077] Use the following formula to fuse the predicted power generation values of the physical model and the data-driven model of the photovoltaic power station to obtain the final predicted result of the photovoltaic power station's power generation:
[0078] ;
[0079] ;
[0080] ;
[0081] In the above formula, is the final predicted result of the photovoltaic power station's power generation, is the prediction error of the physical model, is the prediction error of the data-driven model, is the predicted power generation value of the data-driven model, is the predicted power generation value of the physical model, is the average power of the actual value of the physical model, is the average power of the predicted value of the physical model, is the average power of the actual value of the data-driven model, is the average power of the predicted value of the data-driven model.
[0082] In S1, the specific steps for generating the operation data of the photovoltaic power station that conforms to the actual distribution based on the operation parameters of various core components of the photovoltaic power station include:
[0083] S11. Preprocess the operation parameters of various core components of the photovoltaic power station, design the GAN model architecture, and initialize the GAN grid parameters;
[0084] S12. Design the loss functions of the discriminator and generator of the GAN model;
[0085] The loss function of the discriminator is calculated using the following formula:
[0086] ;
[0087] In the above formula, is the loss function of the discriminator, is the output of the discriminator for the conditional features in the real samples, is the sample data generated by the generator from the noise is the gradient penalty coefficient, is the gradient of the discriminator for the interpolation points, is the real sample collected, is the conditional feature in the real sample, is the random noise vector, is the generated sample, is the interpolation point between the real sample and the generated sample;
[0088] The loss function of the generator is calculated using the following formula:
[0089] ;
[0090] ;
[0091] In the above formula, is the loss function of the generator, is the weight coefficient of the regularization term, is the regularization term, is the number of feature dimensions, is the th mean value of the generated sample data, is the th mean value of the real sample data, is the th standard deviation of the real sample data, is the th generated sample data, is the th real sample data;
[0092] S13. Calculate the gradients of the discriminator loss function with respect to the discriminator parameters and the gradients of the generator loss function with respect to the generator parameters respectively:
[0093] ;
[0094] ;
[0095] In the above formula, is the gradient of the discriminator loss function with respect to the discriminator parameters, represents calculating the gradient with respect to the discriminator parameters, is the gradient of the generator loss function with respect to the generator parameters, represents calculating the gradient with respect to the generator parameters;
[0096] S14. Based on the gradient parameters of the discriminator and generator parameters, use the improved Adam algorithm to update the discriminator parameters and generator parameters of the GAN model;
[0097] For the discriminator parameters, use the following formula for update:
[0098] ;
[0099] ;
[0100] ;
[0101] ;
[0102] ;
[0103] In the above formula, is the updated discriminator parameter, is the learning rate, is the corrected momentum term of the discriminator, is the corrected second moment estimate of the discriminator, is the bias correction term, is the momentum term of the discriminator, , are both hyperparameters, is the second moment estimate of the discriminator;
[0104] For the generator parameters, use the following formula for update:
[0105] ;
[0106] ;
[0107] ;
[0108] ;
[0109] ;
[0110] In the above formula, is the updated generator parameter, is the momentum term after the generator is corrected, is the second-order moment estimate after the generator is corrected, is the momentum term of the generator, is the second-order moment estimate of the generator;
[0111] S15. Repeat the operation steps of S12 - S14 until the GAN model converges or reaches the maximum number of iterations, then the algorithm ends, and the operation data of the photovoltaic power station that conforms to the actual distribution is generated.
[0112] In the above S14, the method for improving the Adam algorithm is to optimize the hyperparameters of the Adam optimizer using the PSO algorithm. The specific improvement steps include:
[0113] S141. Initialize the hyperparameters of the Adam optimizer, including the learning rate , the decay rate of the first-order moment estimate , the decay rate of the second-order moment estimate and the gradient correction parameter ;
[0114] S142. Define the search space of the hyperparameters of the Adam optimizer. Use the position vector of each particle to represent a set of hyperparameter values. Among them, is the position vector of the th particle;
[0115] S143. Initialize the total number of the particle swarm to . The initial positions and velocities of each particle are randomly generated within their respective ranges, expressed as:
[0116] ;
[0117] ;
[0118] In the above formula, is the initial position of the th particle, is a value randomly selected from a uniform distribution in the search space, is the minimum value in the search space, is the minimum value in the search space, is the The initial velocity of each particle;
[0119] S144. Train the PSO optimization model using the hyperparameter settings corresponding to each particle, and calculate the objective function of each particle using the following formula as the fitness of the particle :
[0120] ;
[0121] ;
[0122] ;
[0123] ;
[0124] In the above formula, is the objective function of the th particle, is the statistical characteristic matching loss, is the loss during the training process of the GAN model, is the physical consistency loss, is the number of feature dimensions, is the mean of the th generated sample data, is the th real sample data mean, is the th real sample data standard deviation, is the th generated sample data, is the th real sample data, is the th generated sample data variance, is the th real sample data variance, is the loss function of the discriminator, is the loss function of the generator, is the predicted value of the photocurrent, is the measured photocurrent, is the standard deviation of the measured photocurrent;
[0125] S145. Determine whether the fitness of each particle satisfies , where is the fitness value of the best position of each particle. If it is satisfied, then update , and record the corresponding , where is the optimal position of each particle. If it is not satisfied, the fitness value and position of the optimal position of the particle remain unchanged. After finding the fitness value of the optimal position among all particles, update the fitness value of the globally optimal particle , and record the corresponding position ;
[0126] S146. Based on the fitness value and position of the optimal position of the particle, update the velocity and position of each particle using the following formula:
[0127] ;
[0128] ;
[0129] ;
[0130] ;
[0131] In the above formula, is the velocity of the th particle in the iteration, is the inertia weight, , are both acceleration constants, are both random numbers that are independently and identically distributed within the interval, is the position of the th particle in the iteration, is the maximum number of iterations, is the initial inertia weight;
[0132] S147. Set the threshold for the number of consecutive iterations without significant improvement to , and determine whether the number of times holds in consecutive iterations reaches the set threshold or the maximum number of iterations, where is a small positive number used to determine whether the iteration has significant improvement. If it reaches, the algorithm terminates and the optimization process ends; if it does not reach, return to step S144 to recalculate the objective function of each particle.
[0133] In the second aspect, the present invention proposes a power generation prediction system based on a digital twin model of a photovoltaic power station, including a photovoltaic power station operation data generation module, a power generation prediction module, and a final power generation prediction result fusion module;
[0134] The photovoltaic power station operation data generation module is used to generate photovoltaic power station operation data that conforms to the actual distribution based on the operation parameters of various core components of the photovoltaic power station, and construct a digital twin model that simulates the operation status of the photovoltaic power station in reality. The digital twin model includes a physical model and a data-driven model;
[0135] The power generation prediction module is used to input the generated photovoltaic power station operation data that conforms to the actual distribution into the physical model of the photovoltaic power station and the data-driven model of the photovoltaic power station constructed by using the improved LSTM algorithm respectively, so as to obtain the power generation prediction values of the physical model and the data-driven model;
[0136] The final power generation prediction result fusion module is used to fuse the power generation prediction values of the physical model and the data-driven model of the photovoltaic power station to obtain the final power generation prediction result of the photovoltaic power station.
[0137] In a third aspect, the present invention proposes a power generation prediction device based on a digital twin model of a photovoltaic power station, including a processor and a memory;
[0138] The memory is used to store computer program code and transmit the computer program code to the processor;
[0139] The processor is used to execute the foregoing power generation prediction method based on the digital twin model of the photovoltaic power station according to the instructions in the computer program code.
[0140] Compared with the prior art, the beneficial effects of the present invention are:
[0141] The present invention proposes a method and system for predicting power generation based on a digital twin model of a photovoltaic power station. First, based on the operating parameters of various core components of the photovoltaic power station, operating data of the photovoltaic power station that conforms to the actual distribution is generated, and a digital twin model that simulates the operating conditions of the photovoltaic power station in reality is constructed. The digital twin model includes a physical model and a data-driven model. Then, the generated operating data of the photovoltaic power station that conforms to the actual distribution is respectively input into the physical model of the photovoltaic power station and the data-driven model of the photovoltaic power station constructed by using an improved LSTM algorithm to obtain the power generation prediction values of the physical model and the data-driven model. Finally, the power generation prediction values of the physical model and the data-driven model of the photovoltaic power station are fused to obtain the final power generation prediction result of the photovoltaic power station. On the one hand, through the construction of the digital twin model of the photovoltaic power station, this method integrates real-time data from the sensor network, more accurately maps and simulates the operating conditions of the photovoltaic power station in reality, realizes a significant improvement in the prediction accuracy of photovoltaic power generation, and solves the problems of data complexity, environmental factor uncertainty, and insufficient prediction accuracy encountered in the current operation of photovoltaic power stations. On the other hand, this method inputs the generated operating data of the photovoltaic power station into the physical model of the photovoltaic power station, improves the performance prediction ability of the model under various environmental conditions, and constructs a data-driven model of the photovoltaic power station by using an improved LSTM algorithm, enhances the adaptability of the model to fluctuations on different time scales, improves the generalization ability and robustness of the model, and obtains a more accurate prediction of photovoltaic power generation by fusing the prediction results of the physical model and the data-driven model, providing reliable decision-making support for power system scheduling. BRIEF DESCRIPTION OF THE DRAWINGS
[0142] Figure 1 It is the overall flowchart of the method described in the present invention.
[0143] Figure 2 It is the overall architecture diagram of the model described in Embodiment 1.
[0144] Figure 3 It is the equivalent circuit diagram of the photovoltaic cell described in Embodiment 1.
[0145] Figure 4 It is the structure diagram of the system described in Embodiment 2.
[0146] Figure 5 It is the structure diagram of the device described in Embodiment 3. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0147] The present invention will be further described in detail below in conjunction with the specific embodiments and the accompanying drawings.
[0148] The present invention proposes a power generation prediction method and system based on a digital twin model of a photovoltaic power station. By combining a generative adversarial network (GAN) with an improved Adam algorithm, it generates photovoltaic power station operation data that conforms to the actual distribution, solving the problems of data missing and anomalies. It introduces a diffusion model to correct the output of the physical model, improving the performance prediction ability under various environmental conditions. At the same time, it uses an improved LSTM algorithm to construct a data-driven model of the photovoltaic power station, improving the prediction accuracy and constructing a comprehensive data view. By combining the prediction results of the physical model and the data-driven model, a more accurate prediction of the power generation of the photovoltaic power station is achieved through a fusion algorithm, providing decision support for the efficient utilization and regulation of distributed resources.
[0149] Embodiment 1:
[0150] As Figure 1 shown, a power generation prediction method based on a digital twin model of a photovoltaic power station is carried out in the following steps in sequence:
[0151] 1. Design the overall architecture of the digital twin model of the photovoltaic power station. As Figure 2 shown, it integrates multi-source real-time data from the sensor network to accurately map and simulate the operation status of the photovoltaic power station in reality;
[0152] The design of the digital twin model architecture of the photovoltaic power station is the basis of the entire system. By accurately simulating the operation status of the photovoltaic power station in a virtual environment, it realizes the support for the efficient operation of the photovoltaic power station, meets the stable demand of the power system under complex environments, and provides a scientific basis and technical guarantee for participating in the peak shaving, frequency modulation, and voltage regulation of the power system;
[0153] This architecture is mainly composed of the following key modules:
[0154] The data acquisition module, as the core component, covers multiple subsystems such as photovoltaic panels, environmental perception devices, electrical equipment, and transmission networks. It is responsible for collecting various operation parameters of the photovoltaic power station in real time using a unified data acquisition standard. Among them, different types of operation parameter data have different change frequencies and real-time requirements, and it is necessary to intelligently adjust the data acquisition frequency according to the data type and real-time requirements to ensure real-time data. For example, power output, voltage, current, etc. are collected once per second, environmental data such as temperature and humidity are collected once per minute, and event data such as fault alarms and equipment switch states are collected immediately when they occur;
[0155] The data processing and analysis module preprocesses, standardizes, and detects outliers in the collected data to ensure the quality of the modeling data;
[0156] The physical model module corrects the model based on the characteristics of photovoltaic power generation and considering the complex reality of the photovoltaic power station;
[0157] A data-driven prediction module that considers power fluctuations on different time scales, enabling the model to better adapt to complex and variable photovoltaic power generation scenarios;
[0158] A fusion prediction module that provides more accurate photovoltaic power plant generation prediction results by integrating the advantages of the physical model module and the data-driven prediction module;
[0159] A user interaction and feedback module that implements a human-machine interaction interface, displays functions such as real-time monitoring information, fault alarms, and power generation efficiency analysis, and adjusts the actual power plant operation according to the model output to form a closed-loop optimization process.
[0160] 2. Generate photovoltaic power plant operation data that conforms to the actual distribution based on the operation parameters of various core components of the photovoltaic power plant;
[0161] Generate photovoltaic power plant operation data that conforms to the actual distribution based on the generative adversarial network (GAN) combined with the improved Adam algorithm, realizing the generation of photovoltaic power plant operation data that is more in line with the actual distribution, improving the quality and stability of model training, and providing strong decision-making support for participating in power balance auxiliary services such as peak shaving and frequency modulation to solve data missing and abnormal problems;
[0162] Preprocess the operation parameters of various core components of the photovoltaic power plant, including environmental characteristic data such as light intensity, humidity, heat, and surface temperature of photovoltaic modules, equipment characteristic data such as output power, voltage, current, and health index, and historical data such as past power generation and fault records. Standardize all operation parameter data using the following formula:
[0163] ;
[0164] In the above formula, is the standardized operation parameter data, is the mean of the operation parameter data, is the standard deviation of the operation parameter data;
[0165] Design the GAN model architecture, initialize the GAN grid parameters, and the input layer of the generator is the random noise vector and the conditional feature , where, , are both dimensions, and the conditional feature includes environmental characteristics and equipment characteristics. The hidden layer is a multi-layer perceptron, and the output layer is the generated photovoltaic power plant operation data that conforms to the actual distribution. The input layer of the discriminator is the real or generated data sample and the conditional feature , the hidden layer is a multi-layer perceptron, and the output layer is a scalar value , representing the probability that the sample is real;
[0166] Design the loss functions of the discriminator and generator of the GAN model;
[0167] For the loss function of the discriminator, it is calculated using the following formula:
[0168] ;
[0169] In the above formula, is the loss function of the discriminator, is the output of the discriminator for the conditional features in the real samples, is the sample data generated by the generator from the noise , is the gradient penalty coefficient, is the gradient of the discriminator for the interpolation points, is the real sample collected, is the conditional feature in the real sample, is the random noise vector, is the generated sample, is the interpolation point between the real sample and the generated sample;
[0170] For the loss function of the generator, by maximizing the discriminator output, it is calculated using the following formula:
[0171] ;
[0172] ;
[0173] In the above formula, is the loss function of the generator, is the weight coefficient of the regularization term, is the regularization term, is the number of feature dimensions, is the mean of the th generated sample data, mean of the th real sample data, standard deviation of the th real sample data, is the th generated sample data, th real sample data;
[0174] Calculate the gradient of the GAN model discriminator loss function with respect to the discriminator parameters and the gradient of the generator loss function with respect to the generator parameters respectively:
[0175] ;
[0176] ;
[0177] In the above formula, is the gradient of the discriminator loss function with respect to the discriminator parameters, represents calculating the gradient with respect to the discriminator parameters, is the gradient of the generator loss function with respect to the generator parameters, represents calculating the gradient with respect to the generator parameters;
[0178] Based on the gradient parameters of the discriminator and generator parameters, use the improved Adam algorithm to update the discriminator parameters and generator parameters of the GAN model;
[0179] For the discriminator parameters, use the following formula for update:
[0180] ;
[0181] ;
[0182] ;
[0183] ;
[0184] ;
[0185] In the above formula, is the updated discriminator parameter, is the learning rate, is the momentum term of the discriminator after correction, is the second moment estimate of the discriminator after correction, is the bias correction term, is the momentum term of the discriminator, , are both hyperparameters, is the second moment estimate of the discriminator;
[0186] For the generator parameters, use the following formula for update:
[0187] ;
[0188] ;
[0189] ;
[0190] ;
[0191] ;
[0192] In the above formula, is the updated generator parameter, is the momentum term after the generator is corrected, is the second-order moment estimate after the generator is corrected, is the momentum term of the generator, is the second-order moment estimate of the generator;
[0193] Repeat the operation steps of updating the discriminator and generator parameters of the GAN model until the GAN model converges or reaches the maximum number of iterations, and the algorithm ends, generating photovoltaic power station operation data that conforms to the actual distribution;
[0194] Among them, in order to avoid local optima and enhance the global search ability, for adaptive parameter adjustment, the method of improving the Adam algorithm uses the PSO algorithm to optimize the Adam optimizer hyperparameters. The specific improvement steps include:
[0195] Initialize the Adam optimizer hyperparameters, including the learning rate Set it to 0.001, the first-order moment estimate decay rate Set it to 0.9, the second-order moment estimate decay rate Set it to 0.999 and the gradient correction parameter Set it to ;
[0196] Define the Adam optimizer hyperparameter search space. Among them, the learning rate is 、the first-order moment estimate decay rate is 、the second-order moment estimate decay rate is , the gradient correction parameter is , and use the position vector of each particle to represent a set of hyperparameter values. Among them, is the th particle's position vector;
[0197] Initialize the total number of the particle swarm to , and the initial positions and velocities of each particle are randomly generated within their respective ranges, expressed as:
[0198] ;
[0199] ;
[0200] In the above formula, is the initial position of the th particle, To randomly select values uniformly distributed from the search space, is the minimum value in the search space, is the minimum value in the search space, is the initial velocity of the
[0201] Train the PSO optimization model using the hyperparameter settings corresponding to each particle, and calculate the objective function of each particle as the fitness of the particle using the following formula :
[0202] ;
[0203] ;
[0204] ;
[0205] ;
[0206] In the above formula, is the objective function of the th particle, is the statistical characteristic matching loss, is the loss during the training process of the GAN model, is the physical consistency loss, is the number of feature dimensions, is the mean of the th generated sample data, is the mean of the th real sample data, is the standard deviation of the th real sample data, is the th generated sample data, is the th real sample data, is the variance of the th generated sample data, is the variance of the th real sample data, is the loss function of the discriminator, is the predicted value of the photocurrent, is the measured photocurrent, is the standard deviation of the measured photocurrent;
[0207] Judge whether the fitness of each particle satisfies , where is the fitness value of the best position of each particle. If it is satisfied, then update , and record the corresponding , where is the best position of each particle. If not satisfied, the fitness value and position of the best position of the particle remain unchanged. After finding the fitness value of the best position among all particles, update the fitness value of the global best particle , and record the corresponding position ;
[0208] Based on the fitness value and position of the best position of the particle, update the velocity and position of each particle using the following formula:
[0209] ;
[0210] ;
[0211] ;
[0212] ;
[0213] In the above formula, is the velocity of the th particle in the iteration, , are both acceleration constants, , are both random numbers independently and identically distributed within the interval, is the position of the th particle in the iteration, is the maximum number of iterations,
[0214] Set the threshold for the number of consecutive iterations without significant improvement to , and judge whether the number of times holds reaches the set threshold or the maximum number of iterations, where is a small positive number used to judge whether there is significant improvement in the iteration. If it reaches, the algorithm terminates and the optimization process ends; if not, recalculate the objective function of each particle.
[0215] 3. Input the generated photovoltaic power station operation data that conforms to the actual distribution into the physical model of the photovoltaic power station and the data-driven model of the photovoltaic power station constructed by the improved LSTM algorithm respectively to obtain the power generation prediction values of the physical model and the data-driven model;
[0216] In the physical model of a photovoltaic power station, based on the characteristics of photovoltaic power generation, a diffusion model is introduced to correct the output of the photovoltaic cell model to make it closer to the actual measured value. The equivalent circuit of the photovoltaic cell is as Figure 3 shown, including:
[0217] ;
[0218] ;
[0219] ;
[0220] ;
[0221] ;
[0222] ;
[0223] ;
[0224] ;
[0225] ;
[0226] ;
[0227] ;
[0228] ;
[0229] ;
[0230] ;
[0231] ;
[0232] ;
[0233] In the above formula, is the predicted value of the power generation of the physical model, is the corrected load current, is the corrected load voltage, is the corrected photocurrent, is the corrected dark current, is the load voltage, is the output current, is the series resistance, is the corrected parallel resistance, is the load resistance, is the photocurrent, , , , , , , are all the non - linear effects of environmental conditions (such as humidity, wind speed) on the power generation of photovoltaic modules. is the short - circuit current under standard test conditions. is the light intensity. is the temperature coefficient. is the actual temperature. is the temperature under standard test conditions. , , are respectively the correction value of the photocurrent, the correction value of the dark current, and the correction value of the parallel resistance, which are mean functions generated by the diffusion model. , , , , are all correction factors. is the critical value of temperature. When the temperature is higher than this value, the material degradation is significant. is the operation time of the module, introducing the influence of module aging. is the module life, reflecting the influence of operation time on performance. is the maximum light intensity. is the actual humidity level. is the maximum humidity level. is the non - linear exponent describing temperature, usually taking values from 2 to 3. is the critical humidity value. is the average wind speed. is the variance of the wind speed. is the dark current. is the reverse saturation current. is the electron charge. is the ideality factor. is the number of cells in series. is the Boltzmann constant. is the parallel resistance. is the parallel resistance under standard test conditions. is the load current correction factor. is the maximum output current. is the non - linear exponent describing the load current;
[0234] Among them, for the mean function generated by the diffusion model, the specific generation steps include:
[0235] a. Input environmental and component parameters as well as historical data. In the forward diffusion process, the following formula is used to sample from the real sample data Start by gradually adding Gaussian noise to the data to completely randomize the data distribution:
[0236] ;
[0237] In the above formula, is the conditional probability distribution from the previous time step to the current time step in the forward diffusion process, is the sample data at the current time step, is the normal distribution, is the diffusion intensity, which controls the amount of noise added at each step, is the identity matrix, representing the independence of the data dimensions;
[0238] b. Reverse generation process. Starting from Gaussian noise, use the following formula to gradually denoise and generate the mean function:
[0239] ;
[0240] In the above formula, is the conditional probability distribution from the current time step to the previous time step in the reverse generation process, is the conditional variable, representing external control information related to the generation process, is the mean function, representing the correction value at the current time step, is the variance, representing the uncertainty of the generation, which is used to control the stability of the generation result;
[0241] Considering the fluctuations at different time scales, in order to enable the model to better adapt to the complex and variable photovoltaic power generation scenarios and enhance the generalization ability and robustness of the model, an improved LSTM algorithm is used to construct a data-driven model for photovoltaic power plants. The specific steps include:
[0242] A. Preprocess the operation data of the photovoltaic power plant to obtain positive and negative sample pairs that adjust the data feature distribution;
[0243] A1. Input the real collected data and the data generated by the GAN, including environmental feature data: light intensity, humidity, heat, surface temperature of photovoltaic modules, etc., equipment feature data: output power, voltage, current, health index, etc., and historical data: past power generation, fault records, etc. Construct features for the operation data of the photovoltaic power plant, and use the following formula to convert hours into periodic features of the data:
[0244] ;
[0245] ;
[0246] In the above formula, is the sine periodic feature, is the time step, is the cosine periodic feature;
[0247] A2. For the periodic features of data, such as light intensity, humidity, heat, wind speed, and past power generation data, etc., perform ITD decomposition and denoising, extract the IMF components of the data, including:
[0248] A21. Find all the local maximum points and minimum points of the original data signal , where, is the time index, the set of time indices of the maximum points is , the set of time indices of the minimum points is , and construct the upper envelope through the local maximum points respectively, and construct the lower envelope through the local minimum points;
[0249] A22. Based on the envelopes of the local maximum points and minimum points, calculate the residual signal using the following formula:
[0250] ;
[0251] ;
[0252] In the above formula, is the residual signal, is the instantaneous mean value;
[0253] A23. Judge whether the residual signal meets the two conditions of the IMF component, that is, in any time period, the number of maximum points and minimum points is equal or the difference does not exceed one, and the average value of the upper and lower envelopes is zero. If it meets, the residual signal is an IMF component, denoted as , and remove this IMF component from the original signal. If it does not meet, return to step B1, find all the local maximum points and minimum points of the residual signal , decompose the residual signal until the residual signal becomes a monotonic function or meets the two conditions of the IMF component. Finally, represent the original data signal as:
[0254] ;
[0255] In the above formula, is the total number of IMF components, is the residual term;
[0256] A3. Based on the IMF components of the data, form a multi-scale feature matrix, including:
[0257] A31. Analyze the energy distribution of various IMF components, and select the effective characteristic components using the following formula to remove the high-frequency noise distribution:
[0258] ;
[0259] In the above formula, is the effective characteristic component, that is, the variance contribution rate. Select the IMF components with an energy ratio exceeding 0.8 as the effective characteristics, is the standard deviation;
[0260] A32. Recombine the effective characteristic components after energy analysis into a new input sequence to ensure that each time step contains all selected IMF components, and form the following multi-scale feature matrix:
[0261] ;
[0262] In the above formula, is the multi-scale feature matrix composed of the selected effective characteristic components, is the matrix containing all selected IMF components at time step ;
[0263] A33. Use the following formula to perform feature dimensionality reduction on the multi-scale feature matrix:
[0264] ;
[0265] In the above formula, is the multi-scale feature matrix after feature dimensionality reduction;
[0266] A4. Construct positive sample pairs from the data within the same time period in the multi-scale feature matrix after feature dimensionality reduction, construct negative sample pairs from the data in different time periods, and construct an optimal transport problem model to adjust the distribution of the data features of the positive and negative sample pairs, with the aim of minimizing the difference between different distributions and making the source distribution and the target distribution as close as possible:
[0267] ;
[0268] ;
[0269] ;
[0270] ;
[0271] In the above formula, is the optimal transport problem model, is the transport cost matrix, is the transport plan matrix, is the positive sample pair, is a negative sample pair, For the Source distribution samples and Target distribution samples The Euclidean distance between is the source distribution, is the target distribution, is the transpose of the transmission plan matrix;
[0272] B. Input the positive and negative sample pairs into the LSTM model and initialize the LSTM model architecture. The input shape of the input layer is ,in, is the batch size, which indicates the number of samples used to calculate model gradients and update model parameters in one training iteration. is the time step, representing the feature sequence of the past 24 hours, is the number of features, including environmental features and historical power generation data after ITD processing. The hidden layer includes a bidirectional LSTM layer and a Dropout layer. The number of hidden units in the first layer of the bidirectional LSTM layer is , the output sequence shape is , the number of hidden units in the second layer , the output sequence shape is , the Dropout layer is used to prevent overfitting, the ratio is set to 0.2, and the output layer uses a fully connected layer to map the hidden state to the predicted value of power generation in the next day, calculated using the following formula:
[0273] ;
[0274] ;
[0275] In the above formula, is the power generation forecast value of the data-driven model, For the The predicted value of power generation of hidden units, is the weight matrix of the fully connected layer, is the hidden state, which is used as the input of the fully connected layer. is the bias term of the fully connected layer;
[0276] C. Construct a comprehensive loss function. Use the COOT algorithm to construct the loss function. Compare the loss functions to shorten the distance between positive sample pairs and increase the distance between negative sample pairs. Jointly optimize the future power generation forecast value:
[0277] ;
[0278] ;
[0279] ;
[0280] ;
[0281] In the above formula, is the comprehensive loss function, is the mean square error function, is the mean absolute error function, is the contrast loss function, , , are the weights of each function, is the total number of predicted power generation samples, is the true power generation value, is a predefined boundary value that controls the minimum distance between positive sample pairs, is the distance between positive sample pairs, the distance between negative sample pairs;
[0282] D. Divide the dataset into a 70% training set, 20% validation set, and 10% test set, and set the hyperparameters , , with a learning rate of 0.001 for model training, and evaluate the model based on the root mean square error (RMSE) and mean absolute percentage error (MAPE) of the validation set. Dynamically adjust the learning rate using cosine annealing according to the evaluation results until the validation loss does not improve for 10 consecutive rounds, then stop training;
[0283] The root mean square error (RMSE) is:
[0284] ;
[0285] The mean absolute percentage error (MAPE) is:
[0286] ;
[0287] The cosine annealing dynamic adjustment of the learning rate is:
[0288] ;
[0289] In the above formula, is the total number of samples in the validation set data, is the learning rate of the current iteration, , are the minimum and maximum values of the learning rate, is the current iteration number, is the total number of iterations.
[0290] 4. Integrate the predicted power generation values of the physical model and the data-driven model of the photovoltaic power station to obtain the final predicted result of the photovoltaic power station's power generation;
[0291] The following formula is used to integrate the predicted power generation values of the physical model and the data-driven model of the photovoltaic power station to obtain the final predicted result of the photovoltaic power station's power generation:
[0292] ;
[0293] ;
[0294] ;
[0295] In the above formula, is the final predicted result of the photovoltaic power station's power generation, is the prediction error of the physical model, is the prediction error of the data-driven model, is the predicted power generation value of the data-driven model, is the predicted power generation value of the physical model, is the average power of the actual value of the physical model, is the average power of the predicted value of the physical model, is the average power of the actual value of the data-driven model, is the average power of the predicted value of the data-driven model.
[0296] Embodiment 2:
[0297] As Figure 4 shown, a power generation prediction system based on a digital twin model of a photovoltaic power station includes a photovoltaic power station operation data generation module, a power generation prediction module, and a final power generation prediction result fusion module;
[0298] The photovoltaic power station operation data generation module is used to generate photovoltaic power station operation data that conforms to the actual distribution based on the operation parameters of various core components of the photovoltaic power station, and construct a digital twin model that simulates the operation status of the photovoltaic power station in reality. The digital twin model includes a physical model and a data-driven model;
[0299] The power generation prediction module is used to input the generated photovoltaic power station operation data that conforms to the actual distribution into the physical model of the photovoltaic power station and the data-driven model of the photovoltaic power station constructed by using the improved LSTM algorithm respectively to obtain the predicted power generation values of the physical model and the data-driven model;
[0300] The final power generation prediction result fusion module is used to integrate the predicted power generation values of the physical model and the data-driven model of the photovoltaic power station to obtain the final predicted result of the photovoltaic power station's power generation.
[0301] The photovoltaic power station operation data generation module includes a parameter preprocessing unit, a loss function design unit, a parameter gradient calculation unit, a parameter update unit, and an iteration judgment unit;
[0302] The parameter preprocessing unit is used to preprocess the operation parameters of various core components of the photovoltaic power station, design the GAN model architecture, and initialize the GAN grid parameters;
[0303] The loss function design unit is used to design the loss functions of the discriminator and the generator of the GAN model;
[0304] The loss function of the discriminator is calculated using the following formula:
[0305] ;
[0306] In the above formula, is the loss function of the discriminator, is the output of the discriminator for the conditional features in the real samples, is the sample data generated by the generator from the noise is the sample data generated by the generator from the noise is the gradient penalty coefficient, is the gradient of the discriminator for the interpolation point, is the real sample collected, is the conditional feature in the real sample, is the random noise vector, is the generated sample, is the interpolation point between the real sample and the generated sample;
[0307] The loss function of the generator is calculated using the following formula:
[0308] ;
[0309] ;
[0310] In the above formula, is the loss function of the generator, is the weight coefficient of the regularization term, is the regularization term, is the number of feature dimensions, is the mean value of the th generated sample data, is the mean value of the th real sample data, is the standard deviation of the th real sample data, is the th generated sample data, is the a real sample data;
[0311] The parameter gradient calculation unit is used to calculate the gradient of the discriminator loss function of the GAN model with respect to the discriminator parameters and the gradient of the generator loss function with respect to the generator parameters respectively:
[0312] ;
[0313] ;
[0314] In the above formula, is the gradient of the discriminator loss function with respect to the discriminator parameters, represents calculating the gradient with respect to the discriminator parameters, is the gradient of the generator loss function with respect to the generator parameters, represents calculating the gradient with respect to the generator parameters;
[0315] The parameter update unit is used to update the discriminator parameters and generator parameters of the GAN model based on the gradient parameters of the discriminator and generator parameters by using the improved Adam algorithm;
[0316] The method of the improved Adam algorithm is as shown in step 2 of Embodiment 1;
[0317] For the discriminator parameters, the following formula is used for update:
[0318] ;
[0319] ;
[0320] ;
[0321] ;
[0322] ;
[0323] In the above formula, is the updated discriminator parameter, is the learning rate, is the corrected momentum term of the discriminator, is the corrected second moment estimate of the discriminator, is the bias correction term, is the momentum term of the discriminator, 、 are both hyperparameters, is the second moment estimate of the discriminator;
[0324] For the generator parameters, the following formula is used for update:
[0325] ;
[0326] ;
[0327] ;
[0328] ;
[0329] ;
[0330] In the above formula, is the updated generator parameter, is the momentum term after the generator is corrected, is the second-order moment estimate after the generator is corrected, is the generator momentum term, is the second-order moment estimate of the generator;
[0331] The iterative judgment unit is used to repeatedly execute the operation steps of the loss function design unit - parameter update unit until the GAN model converges or reaches the maximum number of iterations, at which point the algorithm ends and photovoltaic power station operation data consistent with the actual distribution is generated.
[0332] In the power generation prediction module, the physical model of the photovoltaic power station is as shown in step 3 of Embodiment 1;
[0333] In the power generation prediction module, the specific steps of constructing a data-driven model of the photovoltaic power station using the improved LSTM algorithm are as shown in step 3 of Embodiment 1;
[0334] The final power generation prediction result fusion module is used to fuse the power generation prediction values of the physical model and the data-driven model of the photovoltaic power station using the following formula to obtain the final power generation prediction result of the photovoltaic power station:
[0335] ;
[0336] ;
[0337] ;
[0338] In the above formula, is the final power generation prediction result of the photovoltaic power station, is the prediction error of the physical model, is the prediction error of the data-driven model, is the power generation prediction value of the data-driven model, is the power generation prediction value of the physical model, is the average power of the actual value of the physical model, is the average power of the prediction value of the physical model, The average power is the actual value of the data-driven model. The average power is the predicted value of the data-driven model.
[0339] Embodiment 3:
[0340] As Figure 5 shown, a power generation prediction device based on a digital twin model of a photovoltaic power station includes a processor and a memory;
[0341] The memory is used to store computer program code and transmit the computer program code to the processor;
[0342] The processor is used to execute the power generation prediction method based on the digital twin model of the photovoltaic power station described in Embodiment 1 according to the instructions in the computer program code.
Claims
1. A power generation prediction method based on a digital twin model of a photovoltaic power station, characterized in that, The method includes: S1. Based on the operating parameters of various core components of the photovoltaic power station, generate photovoltaic power station operation data that conforms to the actual distribution, and construct a digital twin model that simulates the operation status of the photovoltaic power station in reality. The digital twin model includes a physical model and a data-driven model; S2. Input the generated photovoltaic power station operation data that conforms to the actual distribution into the physical model of the photovoltaic power station and the data-driven model of the photovoltaic power station constructed by using the improved LSTM algorithm respectively, and obtain the power generation prediction values of the physical model and the data-driven model; S3. Integrate the power generation prediction values of the physical model and the data-driven model of the photovoltaic power station to obtain the final power generation prediction result of the photovoltaic power station.
2. A power generation prediction method based on a digital twin model of a photovoltaic power station according to claim 1, characterized in that, In the S2, the specific steps of constructing the data-driven model of the photovoltaic power station by using the improved LSTM algorithm include: A. Perform preprocessing on the photovoltaic power station operation data to obtain positive and negative sample pairs that adjust the data feature distribution; B. Input the positive and negative sample pair data into the LSTM model, initialize the LSTM model architecture, and calculate the power generation prediction value by using the following formula: ; ; In the above formula, is the predicted power generation value of the data-driven model, is the predicted power generation value of the th hidden unit, is the weight matrix of the fully connected layer, is the hidden state and serves as the input to the fully connected layer, is the bias term of the fully connected layer; C. Construct a comprehensive loss function to jointly optimize the future power generation prediction value: ; ; ; ; In the above formula, is the comprehensive loss function, is the mean square error function, is the mean absolute error function, is the contrast loss function, , , are the weights of each function, is the total number of predicted power generation samples, is the true power generation value, is a predefined boundary value, is the distance between positive sample pairs, the distance between negative sample pairs.
3. A power generation prediction method based on a digital twin model of a photovoltaic power station according to claim 2, characterized in that, The step A includes: A1. Perform feature construction on the photovoltaic power station operation data, and use the following formula to convert hours into periodic features of the data: ; ; In the above formula, is the sine periodic feature, is the time step, is the cosine periodic feature; A2. Decompose and denoise the periodic features of the data, and extract the IMF components of the data, including: A21. Find all local maximum points and minimum points of the original data signal , where is the time index. The set of time indices of the maximum points is , and the set of time indices of the minimum points is . Then construct the upper envelope through the local maximum points respectively, and construct the lower envelope through the local minimum points; A22. Based on the envelopes of the local maximum points and minimum points, calculate the residual signal by using the following formula: ; ; In the above formula, is the residual signal, is the instantaneous mean value; A23. Determine whether the remaining signal meets the two conditions of the IMF component, that is, within any time period, the number of maximum points and minimum points is equal or differs by no more than one, and the average value of the upper and lower envelopes is zero. If it meets the conditions, the remaining signal is an IMF component, denoted as , and remove this IMF component from the original signal. If it does not meet the conditions, return to step B1 to find all the local maximum points and minimum points of the remaining signal , decompose the remaining signal until the remaining signal becomes a monotonic function or meets the two conditions of the IMF component. Finally, represent the original data signal as: ; In the above formula, is the total number of IMF components, is the residual term; A3. Based on the IMF components of the data, form a multi-scale feature matrix, including: A31. Analyze the energy distribution of various IMF components, and use the following formula to select the effective feature components among them: ; In the above formula, is the effective feature component, that is, the variance contribution rate, is the standard deviation; A32. Recombine the effective feature components after energy analysis into a new input sequence to ensure that each time step contains all the selected IMF components, and form the following multi-scale feature matrix: ; In the above formula, is a multi-scale feature matrix composed of selected effective feature components, is a matrix containing all the IMF components selected at time step ; A33. Use the following formula to perform feature dimensionality reduction on the multi-scale feature matrix: ; In the above formula, is the multi-scale feature matrix after feature dimensionality reduction; A4. Construct positive sample pairs from the data in the same time period in the multi-scale feature matrix after feature dimensionality reduction, construct negative sample pairs from the data in different time periods, and construct an optimal transport problem model to adjust the distribution of the positive and negative sample pair data features; ; ; ; ; In the above formula, is the optimal transport problem model, is the transport cost matrix, is the transport plan matrix, is the positive sample pair, is the negative sample pair, is the th source distribution sample and the th target distribution sample is the Euclidean distance between them, is the source distribution, is the target distribution, is the transpose of the transport plan matrix.
4. A power generation prediction method based on a digital twin model of a photovoltaic power station according to claim 1, characterized in that, In the S2, the physical model of the photovoltaic power station includes: ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; In the above formula, is the predicted power generation of the physical model, is the corrected load current, is the corrected load voltage, is the corrected photocurrent, is the corrected dark current, is the load voltage, is the output current, is the series resistance, is the corrected parallel resistance, is the load resistance, is the photocurrent, , , , , , , are all the non-linear effects of environmental conditions on the power generation of photovoltaic modules, is the short-circuit current under standard test conditions, is the light intensity, is the temperature coefficient, is the actual temperature, is the temperature under standard test conditions, , , are respectively the correction values of photocurrent, dark current, and parallel resistance, which are the mean functions generated by the diffusion model, , , , , are all correction coefficients, is the critical value of temperature, is the operation time of the module, is the life of the module, is the maximum light intensity, is the actual humidity level, is the maximum humidity level, is the non-linear exponent describing temperature, is the critical humidity value, is the average wind speed, is the variance of wind speed, is the dark current, is the reverse saturation current, is the electron charge, is the ideality factor, is the number of cells in series, is the Boltzmann constant, is the parallel resistance, is the parallel resistance under standard test conditions, is the load current correction factor, is the maximum output current, is the non-linear exponent describing the load current.
5. A power generation prediction method based on a digital twin model of a photovoltaic power station according to claim 4, characterized in that, The specific steps of generating the mean function generated by the diffusion model include: a. Forward diffusion process, starting from real sample data and gradually adding Gaussian noise to the data to completely randomize the data distribution using the following formula: ; In the above formula, is the conditional probability distribution from the previous time step to the current time step during the forward diffusion process, is the sample data at the current time step, is the normal distribution, is the diffusion intensity, is the identity matrix; b. Reverse generation process, starting from Gaussian noise and gradually denoising to generate the mean function by using the following formula: ; In the above formula, is the conditional probability distribution from the current time step to the previous time step during the reverse generation process, is the conditional variable, representing the external control information related to the generation process, is the mean function, representing the correction value at the current time step, is the variance.
6. The power generation prediction method based on the digital twin model of a photovoltaic power station according to claim 1 is characterized in that S3 includes: The predicted power generation values of the physical model and the data-driven model of the photovoltaic power station are fused using the following formula to obtain the final predicted power generation result of the photovoltaic power station: ; ; ; In the above formula, is the predicted result of the final power generation of the photovoltaic power station, is the prediction error of the physical model, is the prediction error of the data-driven model, is the predicted power generation value of the data-driven model, is the predicted power generation value of the physical model, is the average power of the actual value of the physical model, is the average power of the predicted value of the physical model, is the average power of the actual value of the data-driven model, is the average power of the predicted value of the data-driven model.
7. The power generation prediction method based on the digital twin model of a photovoltaic power station according to claim 1 is characterized in that In S1, the specific steps of generating the operation data of the photovoltaic power station that conforms to the actual distribution based on the operation parameters of various core components of the photovoltaic power station include: S11. Preprocess the operation parameters of various core components of the photovoltaic power station, design the GAN model architecture, and initialize the GAN grid parameters; S12. Design the loss functions of the discriminator and the generator of the GAN model; The loss function of the discriminator is calculated using the following formula: ; In the above formula, is the loss function of the discriminator, is the output of the discriminator for the conditional features in the real samples, is the sample data generated by the generator from the noise is the gradient penalty coefficient, is the gradient of the discriminator at the interpolation point, is the real sample collected, is the conditional feature in the real sample, is the random noise vector, is the generated sample, is the interpolation point between the real sample and the generated sample; The loss function of the generator is calculated using the following formula: ; ; In the above formula, is the loss function of the generator, is the weight coefficient of the regularization term, is the regularization term, is the number of feature dimensions, is the mean of the -th generated sample data, is the mean of the -th real sample data, is the standard deviation of the -th real sample data, is the -th generated sample data, is the -th real sample data; S13. Calculate the gradient of the loss function of the discriminator of the GAN model with respect to the discriminator parameters and the gradient of the loss function of the generator with respect to the generator parameters respectively; ; ; In the above formula, is the gradient of the discriminator loss function with respect to the discriminator parameters, represents calculating the gradient with respect to the discriminator parameters, is the gradient of the generator loss function with respect to the generator parameters, represents calculating the gradient with respect to the generator parameters; S14. Based on the gradient parameters of the discriminator and generator parameters, use the improved Adam algorithm to update the discriminator parameters and generator parameters of the GAN model; For the discriminator parameters, update using the following formula: ; ; ; ; ; In the above formula, is the updated discriminator parameter, is the learning rate, is the momentum term after the discriminator is corrected, is the second-order moment estimate after the discriminator is corrected, is the bias correction term, is the discriminator momentum term, and are both hyperparameters, is the discriminator second-order moment estimate; For the generator parameters, update using the following formula: ; ; ; ; ; In the above formula, is the updated generator parameter, is the corrected momentum term of the generator, is the corrected second-order moment estimate of the generator, is the momentum term of the generator, is the second-order moment estimate of the generator; S15. Repeat the operation steps of S12 - S14 until the GAN model converges or reaches the maximum number of iterations, the algorithm ends, and the operation data of the photovoltaic power station that conforms to the actual distribution is generated.
8. The power generation prediction method based on the digital twin model of a photovoltaic power station according to claim 7 is characterized in that In S14, the method of improving the Adam algorithm is to optimize the hyperparameters of the Adam optimizer using the PSO algorithm. The specific improvement steps include: S141. Initialize the hyperparameters of the Adam optimizer, including the learning rate , the decay rate of the first moment estimate , the decay rate of the second moment estimate and the gradient correction parameter ; S142. Define the hyperparameter search space of the Adam optimizer, and use the position vector of each particle to represent a set of hyperparameter values, where is the position vector of the th particle; S143. Initialize the total number of the particle swarm to be , and randomly generate the initial positions and velocities of each particle within their respective ranges, expressed as: ; ; In the above formula, is the initial position of the th particle, is a value randomly selected from a uniform distribution in the search space, is the minimum value in the search space, is the minimum value in the search space, is the initial velocity of the th particle; S144. Train the PSO optimization model using the hyperparameter settings corresponding to each particle, and calculate the objective function of each particle as the fitness of the particle using the following formula : ; ; ; ; In the above formula, is the objective function of the th particle, is the statistical characteristic matching loss, is the loss during the training process of the GAN model, is the physical consistency loss, is the number of feature dimensions, is the mean of the th generated sample data, is the mean of the th real sample data, is the standard deviation of the th real sample data, is the th generated sample data, is the th real sample data, is the variance of the th generated sample data, is the variance of the th real sample data, is the loss function of the discriminator, is the loss function of the generator, is the predicted value of the photocurrent, is the measured photocurrent, is the standard deviation of the measured photocurrent; S145. Determine whether the fitness of each particle meets , where is the fitness value of the best position of each particle. If it meets the requirement, update and record the corresponding , where is the best position of each particle. If it does not meet the requirement, the fitness value and position of the best position of this particle remain unchanged. After finding the fitness value of the best position among all particles, update the fitness value of the globally best particle and record the corresponding position ; S146. Based on the fitness value of the particle's best position and its position, update the velocity and position of each particle using the following formula: ; ; ; ; In the above formula, for Iteration No. The speed of a particle, is the inertia weight, , are acceleration constants, , Both Independent and identically distributed random numbers in the interval, for Iteration No. The position of a particle, is the maximum number of iterations, is the initial inertia weight, is the final inertia weight; S147. Set the threshold for the number of times without significant improvement in consecutive iterations to be , and determine whether the number of times holds reaches the set threshold or the maximum number of iterations, where is a small positive number used to determine whether there is significant improvement in the iteration. If it reaches, the algorithm terminates and the optimization process ends; if it does not reach, return to step S144 to recalculate the objective function of each particle.
9. A power generation prediction system based on the digital twin model of a photovoltaic power station is characterized in that The system includes a photovoltaic power station operation data generation module, a power generation prediction module, and a final power generation prediction result fusion module; The photovoltaic power station operation data generation module is used to generate the operation data of the photovoltaic power station that conforms to the actual distribution based on the operation parameters of various core components of the photovoltaic power station, and construct a digital twin model that simulates the operation status of the photovoltaic power station in reality. The digital twin model includes a physical model and a data-driven model; The power generation prediction module is used to input the generated operation data of the photovoltaic power station that conforms to the actual distribution into the physical model of the photovoltaic power station and the data-driven model of the photovoltaic power station constructed using the improved LSTM algorithm respectively, to obtain the predicted power generation values of the physical model and the data-driven model; The final power generation prediction result fusion module is used to fuse the predicted power generation values of the physical model and the data-driven model of the photovoltaic power station to obtain the final predicted power generation result of the photovoltaic power station.
10. A power generation prediction device based on the digital twin model of a photovoltaic power station is characterized in that It includes a processor and a memory; The memory is used to store computer program code and transmit the computer program code to the processor; The processor is used to execute a power generation prediction method based on a digital twin model of a photovoltaic power station according to the instructions in the computer program code as described in any one of claims 1-8.
Citation Information
Patent Citations
Semi-active control method and device based on LSTM reverse model, equipment and storage medium
CN115407666A
Digital twin modeling method, device, equipment and medium
CN117290721A
Oil-immersed transformer fault diagnosis method fusing digital twinborn model
CN119848698A
Enhancements to the 3GPP system to map traffic categories to application ai / ML operation types
WO2024073661A1