A photovoltaic output data recovery method and device based on latent feature analysis
By constructing a spatial adjacency matrix and a temporal dynamic covariance matrix based on latent feature analysis, and combining the Huber loss function and a piecewise stochastic gradient descent strategy, the latent feature matrix is optimized, which solves the problems of missing and anomalies in photovoltaic power output data and achieves high-precision and high-robust data recovery.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SOUTHEAST UNIV
- Filing Date
- 2025-06-23
- Publication Date
- 2026-06-26
AI Technical Summary
Existing photovoltaic power output data recovery methods are insufficient to meet the requirements for high-precision and high-robustness data recovery when faced with complex and ever-changing actual operating environments. In particular, existing methods cannot effectively handle situations where there are large-scale missing data, noise interference, and abnormal fluctuations in photovoltaic power output data.
A latent feature analysis-based approach is adopted to construct a spatial adjacency matrix and a temporal dynamic covariance matrix, and then combine the Huber loss function and a piecewise stochastic gradient descent strategy to optimize the latent feature matrix and recover photovoltaic power output observation data.
It significantly improves the accuracy and robustness of data recovery, effectively captures the spatiotemporal correlation and nonlinear dynamic characteristics of photovoltaic power output data, reduces the impact of outliers and sudden noise, and is suitable for the stable operation and optimized scheduling of photovoltaic systems.
Smart Images

Figure CN121051349B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power system data processing and intelligent analysis technology, specifically to a photovoltaic power output data recovery method based on latent feature analysis, and also to a photovoltaic power output data recovery device based on latent feature analysis. Background Technology
[0002] As a clean and renewable energy source, photovoltaic (PV) power is increasingly used in power systems. Under ideal operating conditions, PV power plants can continuously and stably supply electricity to the grid, generating consistent and reliable output data. However, in actual operation, PV output data faces numerous problems, leading to frequent data gaps and anomalies.
[0003] Weather changes are one of the main factors affecting the quality of photovoltaic (PV) output data. For example, rapid cloud movement periodically blocks sunlight, causing drastic changes in the solar irradiance received by PV panels, leading to intermittent fluctuations and data jumps in PV output. Under extreme weather conditions, such as heavy rain, hail, and sandstorms, the power generation equipment of PV power plants may be damaged, causing data acquisition system failures and data loss. In addition, the alternation of day and night gives PV output a distinct diurnal periodic characteristic; PV output is zero at night when there is no sunlight, while daytime output changes continuously with the sun's position and irradiance. This periodic variation also increases the difficulty of maintaining data continuity and stability.
[0004] Equipment failures can also severely impact the integrity of photovoltaic (PV) output data. PV power plants typically consist of numerous PV modules, inverters, combiner boxes, step-up transformers, and other equipment. Failure in any of these components can disrupt data acquisition and transmission. For example, the inverter, a crucial device for converting DC power from PV panels to AC power, will cause the corresponding power generation unit to stop operating if it malfunctions. This not only directly affects PV output but also prevents the data acquisition system from obtaining real-time output data for that unit. Furthermore, Supervisory Control and Data Acquisition (SCADA) systems themselves may experience hardware failures, software vulnerabilities, or communication failures, leading to data loss or errors.
[0005] Besides weather and equipment factors, grid-side faults and operations can also affect the quality of photovoltaic (PV) power output data. For example, when a grid fault causes a partial power outage or voltage fluctuation, the PV power station may temporarily disconnect from the grid due to protection mechanisms. In this case, the data acquisition system may not be able to record this process in a timely and accurate manner, resulting in missing or abnormal data. During normal grid operations such as maintenance and switching operations, the operating status of the PV power station may also be disturbed, thus affecting the continuity of power output data.
[0006] Faced with these complex and diverse data quality issues, traditional data recovery methods have gradually revealed many shortcomings. Early interpolation methods, such as linear interpolation and polynomial interpolation, while able to easily fill in missing data, suffer from limited accuracy and poor robustness to outliers due to their reliance on the assumption of local linearity in the data, making it difficult to accurately capture the complex nonlinear dynamic characteristics and periodic patterns in photovoltaic power output data. Low-rank matrix approximation (LRMA) methods exhibit better recovery performance when processing data with low-rank structures. The basic idea is to find a low-rank matrix to approximate the original data matrix, thereby recovering missing values. However, photovoltaic power output data does not strictly conform to low-rank characteristics. Especially when there are fluctuations across multiple time scales, periodic changes, and anomalous interference, LRMA methods often fail to accurately distinguish between noise and genuine anomalies, easily filtering out anomalous data as noise or misjudging complex fluctuations in normal data as noise, leading to decreased recovery accuracy and insufficient robustness.
[0007] In recent years, several machine learning-based methods have been introduced into the field of photovoltaic power output data recovery, such as Long Short-Term Memory (LSTM) networks and Convolutional Neural Networks (CNNs) in deep learning. These methods can automatically learn complex nonlinear features in the data, offering certain advantages. However, they typically require a large amount of high-quality training data to ensure the model's generalization performance, which is often difficult to obtain in real-world scenarios. Furthermore, these methods are sensitive to outliers in the data and are easily affected by abnormal data, impacting the model's training effectiveness and recovery accuracy.
[0008] In summary, existing photovoltaic (PV) output data recovery methods are insufficient to meet the demands for high-precision and robust data recovery in complex and ever-changing real-world operating environments. Therefore, there is an urgent need for a novel data recovery method that can effectively address the issues of missing and anomaly-related PV output data, accurately capture the spatiotemporal correlations and nonlinear dynamic characteristics of the data, and possess strong robustness. This will improve the quality of PV output data and ensure the stable operation and optimized management of the power system. Summary of the Invention
[0009] The purpose of this invention is to provide a method and apparatus for photovoltaic (PV) output data recovery based on latent feature analysis, addressing the limitations of existing methods in effectively handling large-scale data gaps, noise interference, and abnormal fluctuations in PV system data. The aim is to improve the accuracy, robustness, and computational efficiency of data recovery, providing reliable data support for the stable operation and optimized scheduling of PV power generation systems.
[0010] To achieve the above functions, this invention designs a photovoltaic power output data recovery method based on latent feature analysis, which executes the following steps S1-S6 to complete the recovery of missing data in the photovoltaic power output observation matrix:
[0011] Step S1: For a photovoltaic power generation system with multiple photovoltaic sites, collect the output observation data of each photovoltaic site to form an output observation matrix. The output observation matrix contains missing data, and a mask matrix is introduced to represent the corresponding position of the missing data.
[0012] Step S2: Based on the geographical location of each photovoltaic site and the correlation of historical power output observation data, construct a spatial adjacency matrix and calculate the corresponding graph Laplace matrix;
[0013] Step S3: Based on the sampling time step, the output observation data are combined into time series data. The Fourier feature embedding method is used to perform multi-frequency embedding on the time series data, and a time dynamic covariance matrix is constructed.
[0014] Step S4: Based on the latent feature matrix, graph Laplacian matrix, and time dynamic covariance matrix of the photovoltaic site, construct a robust data fitting term, spatial graph regularization term, time dynamic regularization term, and Tikhonov low-rank constraint based on Huber loss, and further construct the objective function;
[0015] Step S5: Using a piecewise stochastic gradient descent strategy, iteratively update the latent feature matrix in the objective function based on the residual threshold, optimize the latent feature matrix and minimize the objective function;
[0016] Step S6: Using the optimized latent feature matrix, recover the missing power output observation data of each photovoltaic site through matrix multiplication.
[0017] As a preferred technical solution of the present invention: in step S1, a power output observation matrix is constructed from the power output observation data of all photovoltaic sites at all time points. Where N represents the number of photovoltaic sites and T represents the sampling time length;
[0018] To identify the locations of missing data in the power output observation matrix W, a mask matrix J∈{0,1} with the same dimensions as the power output observation matrix W is introduced. N×T In the mask matrix J: J ij =1 indicates that the output observation data W at the corresponding position in the output observation matrix. ij For valid observations, W i,j J represents the observed power output value of the i-th station at the j-th time point in the power output observation matrix W; ij =0 indicates that the output observation data at the corresponding position in the output observation matrix is missing and needs to be recovered.
[0019] As a preferred technical solution of the present invention, the specific steps of step S2 are as follows:
[0020] Step S2.1: Let the latitude and longitude coordinates of the i-th photovoltaic site be... Where λ i φ represents the longitude of the i-th photovoltaic site. i Let represent the latitude of the i-th photovoltaic site; the great circle distance between two photovoltaic sites is calculated as follows:
[0021]
[0022] Where, d ij Let R represent the great circle distance between the i-th and j-th photovoltaic sites, where R is the Earth's radius, and Δφ is the distance between them. ij The latitude difference between the i-th and j-th photovoltaic sites is Δλ. ij The longitude difference between the i-th and j-th photovoltaic sites;
[0023] Thus, the distance matrix D = [d] is obtained. ij ] N×N N represents the number of photovoltaic power stations;
[0024] Step S2.2: Select k nearest neighbor sites for each photovoltaic site, and define the spatial adjacency matrix A = [a...] using a Gaussian kernel function. ij ] N×N :
[0025]
[0026] Where σ is a scale parameter that controls the rate of similarity decay;
[0027] Calculate the degree matrix D deg =diag(∑ j a 1j ,…,∑ j a Nj );
[0028] Step S2.3: Based on the spatial adjacency matrix A and the degree matrix D deg Construct the graph Laplacian matrix L rw As shown in the following formula:
[0029]
[0030] Among them, D deg Let I represent the degree matrix, where I is the identity matrix.
[0031] As a preferred technical solution of the present invention, the specific steps of step S3 are as follows:
[0032] Step S3.1: Assume the entire output observation data window covers T uniformly sampled time steps, and form a vector from the time indices of the T time steps. Where τ j This represents the time index of the j-th time step;
[0033] Step S3.2: Map each time index to a set of sine-cosine bases composed of different frequencies, specifically embedding the function γ(τ). j As shown in the following formula:
[0034]
[0035] in, Let d be the frequency scaling vector for the s-th group, where S represents the number of frequency groups used and d is the feature dimension.
[0036] Step S3.3: Embed the function γ(τ) j The time encoding matrix is obtained by stacking the T time indices row by row, as shown in the following formula:
[0037]
[0038] Step S3.4: Construct the time dynamic covariance matrix
[0039] As a preferred embodiment of the present invention, the objective function constructed in step S4 is as follows:
[0040]
[0041] in, Represents the output observation matrix. This represents the spatial potential feature matrix for each photovoltaic site. The temporal latent feature matrices at different times, where d is the feature dimension; J represents the mask matrix. Represents the regularization term of the spatial graph. Represents a time-dynamic regularization term, C temp Let L be the time-dynamic covariance matrix. rw Let β and λ represent the graph Laplacian matrix. reg λ1 and λ2 represent the weights of the regularization term, ||·|| Huber The Huber loss function is defined as follows:
[0042]
[0043] Where δ is the adjustable residual threshold, and u is...
[0044] As a preferred technical solution of the present invention, step S5 specifically involves the following steps:
[0045] Step S5.1: For photovoltaic sites with no missing power output observation data, sample a triplet (i,j,W) ij ), W i,j This represents the observed power output value of the i-th station at the j-th time point in the power output observation matrix W;
[0046] Step S5.2: For each pair of observation positions (i,j), define the current prediction error Δ. ij for:
[0047] Δ ij =W ij -P i E ·,j ,
[0048] Among them, P i , represents the spatial latent feature vector of the i-th site, E ·,j Let represent the temporal latent feature vector corresponding to the j-th time step; depending on the magnitude of the prediction error, the following two gradient update strategies are adopted:
[0049] If |Δ ij If |≤δ, update as follows:
[0050]
[0051] Where η is the learning rate, β, λ reg λ1 and λ2 represent the weights of the regularization term, and δ is an adjustable residual threshold.
[0052] If |Δ ij If |≥δ, update as follows:
[0053]
[0054] Step S5.3: Perform iterative updates. In each iteration, for all photovoltaic sites with no missing output observation data, randomly sample a batch of triplets (i,j,W). ij Then perform the error calculation and gradient update operation in step S5.2 until the overall objective function converges or the maximum number of iterations is reached.
[0055] As a preferred technical solution of the present invention: regularization term weights β, λ reg λ1 and λ2 are obtained through cross-validation or automated search strategies.
[0056] This invention also designs a photovoltaic power output data recovery method based on latent feature analysis, including: an acquisition module, a spatial map construction module, a time encoding module, an optimization module, and a recovery module;
[0057] The acquisition module is used to obtain the power output observation matrix and mask matrix of the photovoltaic site;
[0058] The spatial graph construction module is used to generate a graph Laplace matrix based on the correlation between the geographical location and historical output observation data of each photovoltaic site.
[0059] The time encoding module is used to perform multi-frequency embedding on time series data based on the Fourier feature embedding method to generate a time dynamic covariance matrix;
[0060] The optimization module is used to construct and minimize the objective function and perform piecewise stochastic gradient descent to iteratively update the latent feature matrix;
[0061] The recovery module is used to reconstruct missing output observation data using the optimized latent feature matrix.
[0062] As a preferred embodiment of the present invention, the optimization module is further configured with a threshold judgment unit, which switches the update strategy according to whether the residual exceeds a preset residual threshold δ.
[0063] As a preferred technical solution of the present invention: the acquisition module is adapted to a multi-source data interface and can access photovoltaic power output observation data at the pump station level, array level, or grid level.
[0064] Beneficial effects: Compared with the prior art, the advantages of the present invention include:
[0065] 1. The Fourier multi-frequency embedding method proposed in this invention effectively captures the periodic characteristics and trend changes of photovoltaic power output data at different time and frequency scales, and effectively improves the accuracy of data recovery;
[0066] 2. By adopting graph Laplace spatial regularization constraints, the spatial correlation between multiple photovoltaic sites can be accurately modeled, improving the consistency and robustness of spatial data;
[0067] 3. By introducing the Huber robust loss function and the two-stage stochastic gradient optimization strategy, the impact of outliers and sudden noise on the data recovery process can be effectively reduced, and the anti-interference ability of the algorithm in complex environments can be significantly improved.
[0068] 4. The method has low overall computational complexity and can be efficiently applied to online or offline recovery scenarios of large-scale photovoltaic data.
[0069] Therefore, this invention is not only applicable to historical data repair and real-time data recovery in photovoltaic systems, but can also be further applied to a wide range of energy internet applications such as load forecasting, real-time scheduling optimization and energy management based on photovoltaic data. Attached Figure Description
[0070] Figure 1This is a flowchart of a photovoltaic power output data recovery method based on latent feature analysis according to an embodiment of the present invention;
[0071] Figure 2 This is a spatial adjacency diagram provided according to an embodiment of the present invention;
[0072] Figure 3 This is an overall system framework diagram of a photovoltaic power output data recovery device based on latent feature analysis according to an embodiment of the present invention. Detailed Implementation
[0073] The present invention will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and should not be used to limit the scope of protection of the present invention.
[0074] This invention provides a photovoltaic power output data recovery method based on latent feature analysis, referring to... Figure 1 Perform the following steps S1-S6 to restore the missing data in the photovoltaic output observation matrix:
[0075] Step S1: For a photovoltaic power generation system with multiple photovoltaic sites, collect the output observation data of each photovoltaic site to form an output observation matrix. The output observation matrix contains missing data, and a mask matrix is introduced to represent the corresponding position of the missing data.
[0076] First, a unified model needs to be built for the output observation data of each station in the photovoltaic power generation system. Assume the system contains N independent photovoltaic power generation stations, each with certain output data at T consecutive time steps. A power output observation matrix is constructed by gathering the output observation data of all photovoltaic stations at all time points. Where N represents the number of photovoltaic sites, and T represents the sampling time length; W i,j This represents the observed power output value of the i-th station at the j-th time point in the power output observation matrix W.
[0077] Due to sensor malfunctions, communication anomalies, or environmental factors, matrix W contains a large number of missing values. To accurately identify the locations of missing data, a mask matrix J∈{0,1} with the same dimension as the power output observation matrix W is introduced to locate the missing data in the power output observation matrix. N×T This is used to indicate the validity of the output observation data. In the mask matrix J: J ij =1 indicates that the output observation data W at the corresponding position in the output observation matrix. ij For valid observations; J ij=0 indicates that the output observation data at the corresponding position in the output observation matrix is missing and needs to be recovered. This mask matrix can be automatically generated by the system acquisition logs, sensor status feedback, or historical data integrity detection mechanism. It is used to limit the calculation range of the loss function in the subsequent modeling process, and only applies data fitting error to the valid observations.
[0078] Step S2: Based on the geographical location of each photovoltaic site and the correlation of historical power output observation data, construct a spatial adjacency matrix and calculate the corresponding graph Laplace matrix for spatial information constraint and modeling.
[0079] Step S2 aims to explicitly encode the spatial relationships between photovoltaic sites into a graph structure, which will be used to apply smoothing constraints to the output data in subsequent optimization. The specific steps are as follows:
[0080] Step S2.1: Let the latitude and longitude coordinates of the i-th photovoltaic site be... Where λ i φ represents the longitude of the i-th photovoltaic site. i Let represent the latitude of the i-th photovoltaic site; the great circle distance between two photovoltaic sites is calculated using the Haversine formula or the spherical cosine formula as follows:
[0081]
[0082] Where, d ij Let R represent the great circle distance between the i-th and j-th photovoltaic sites, where R is the Earth's radius, and Δφ is the distance between them. ij The latitude difference between the i-th and j-th photovoltaic sites is Δλ. ij The longitude difference between the i-th and j-th photovoltaic sites;
[0083] Thus, the distance matrix D = [d] is obtained. ij ] N×N N represents the number of photovoltaic power stations;
[0084] Step S2.2: Refer to Figure 2 To highlight the influence of local neighborhoods in the graph structure, k nearest neighbor sites are selected for each photovoltaic site (default k∈[5,10], which can be determined through cross-validation), and the spatial adjacency matrix A=[a ij ] N×N :
[0085]
[0086] Where σ is a scaling parameter that controls the rate of similarity decay; empirically, it can be taken as...
[0087] Calculate the degree matrix Ddeg =diag(∑ j a 1j ,…,∑ j a Nj );
[0088] Step S2.3: Based on the spatial adjacency matrix A and the degree matrix D deg Construct the graph Laplacian matrix L rw The three commonly used Laplace forms are as follows:
[0089] Unnormalized Laplace:
[0090] L=D deg -A
[0091] Symmetric normalized Laplace:
[0092]
[0093] This invention employs a random walk Laplace:
[0094]
[0095] Among them, D deg Let I represent the degree matrix, where I is the identity matrix.
[0096] This form not only intuitively describes the smoothness of a random walk starting from any node, but also has advantages such as numerical stability and ease of integration with gradient updates. To ensure the connectivity of the graph, after constructing L... rw Next, its second smallest eigenvalue (i.e., the Fiedler value) is checked; if this value approaches zero, it indicates a graph structural fracture, and k or σ needs to be appropriately increased until the graph is reconnected. At this point, a spatial graph possessing local smoothness characteristics in both geographical and statistical sense is generated, and the resulting L... rw It will be used as a spatial regularization term in the subsequent objective function to guide the spatial latent feature matrix P to maintain consistency in the spatial dimension, thereby significantly improving the recovery accuracy and robustness of missing photovoltaic data.
[0097] Step S3: Based on the sampling time step, the power output observation data are combined into time series data. The Fourier feature embedding method is used to perform multi-frequency embedding on the time series data, and a time dynamic covariance matrix is constructed to perform fine modeling of the periodicity and trend of photovoltaic power output from the frequency domain level.
[0098] The specific steps of step S3 are as follows:
[0099] Step S3.1: To fully characterize the significant periodicity and multi-scale trend of photovoltaic power output signal over time, this invention introduces a time embedding mechanism based on multi-frequency Fourier features, in addition to spatial graph regularization. Specifically, assuming the entire power output observation data window covers T uniformly sampled time steps, the time indices of the T time steps are denoted as a vector. Where τ j This represents the time index of the j-th time step. It can be an absolute time (such as a timestamp in seconds) or a relative index. Both methods are equivalent in Fourier transform.
[0100] Step S3.2: This invention uses the concept of "Concatenated Fourier Features" (CFF) to map each time index onto a set of sine-cosine bases composed of different frequencies, thereby simultaneously capturing multi-scale phenomena such as daily cycles, seasonal fluctuations, and even short-term cloud cover fluctuations; specifically, the embedding function γ(τ) j As shown in the following formula:
[0101]
[0102] in, Let B be the frequency scaling vector for the s-th group. To avoid manual parameter tuning and improve coverage of different periodic components, the frequency scaling vector B... s Random sampling from a zero-mean Gaussian distribution Where σ s It increases exponentially or linearly with the increase of s to ensure that both high-frequency and low-frequency features are obtained. S represents the number of frequency groups used, and d is the feature dimension (usually consistent with the subsequent latent factor dimension).
[0103] Step S3.3: Embed the function γ(τ) j The time encoding matrix is obtained by stacking the T time indices row by row, as shown in the following formula:
[0104]
[0105] Each row of matrix T carries phase information at different frequency scales for the current time step, thus automatically aligning with the morning rise, midday peak, evening decay, and rapid fluctuations caused by occasional cloud cover in subsequent optimization. This ensures that the latent factor matrix E fully inherits the aforementioned multi-frequency priors in the time domain.
[0106] Step S3.4: Construct the time dynamic covariance matrix This matrix is numerically equivalent to performing an inner product operation on the temporal embeddings as high-dimensional features, and can be viewed as a quantification of the "frequency similarity" between time steps. When C temp Trace regularization term added to the objective function This forces the two columns of the time latent feature matrix E to converge when they are similar in the Fourier frequency domain, thus naturally achieving a smooth restoration of the photovoltaic power trend and maintaining periodic consistency.
[0107] Through the aforementioned multi-frequency Fourier embedding, this invention establishes a flexible prior in the time domain that can simulate both long-term cyclical trends and short-term rapid fluctuations. Combined with the aforementioned spatial graph regularization, it can simultaneously impose physically consistent constraints on latent features in both the "space-time" and "space-time" dimensions. Subsequently, under the combined effect of robust Huber loss and two-stage stochastic gradient optimization, this temporal embedding will significantly improve the recovery accuracy of missing photovoltaic power output values while maintaining sensitivity to anomalous events such as sudden cloud cover.
[0108] Step S4: Based on the latent feature matrix, graph Laplacian matrix, and time dynamic covariance matrix of the photovoltaic site, construct a robust data fitting term, spatial graph regularization term, time dynamic regularization term, and Tikhonov low-rank constraint based on Huber loss, and further construct the objective function;
[0109] After completing the modeling, spatial graph construction, and temporal embedding feature extraction of photovoltaic power output data, this invention further designs a joint objective function that integrates robustness and structural priors to optimize the latent feature matrix and achieve accurate reconstruction of missing data. The core idea of this objective function is to combine low-rank matrix factorization modeling with a robust loss function, while introducing structural constraints on photovoltaic power output data in both spatial and temporal dimensions, thereby improving the stability and reliability of data recovery in complex noise environments.
[0110] Specifically, let the photovoltaic observation matrix be... The complete data is approximated by representing it as a product of two low-rank matrices, PE, where This represents the embedding representation of each photovoltaic site in the latent feature space. The response intensity of each feature at different times is represented by d, where d is the feature dimension. Since photovoltaic power output typically exhibits significant spatial correlation and temporal periodicity, to fully preserve this structural information, this invention introduces spatial graph regularization and temporal dynamic regularization terms based on data fitting, and improves robustness to outliers through Huber loss.
[0111] The constructed objective function is as follows:
[0112]
[0113] The first term is a robust data fitting term based on Huber loss, which calculates residuals only at valid observation locations identified by the mask matrix J; the second term is a Tikhonov-type L2 regularization term, used to prevent excessively large weights or overfitting in the latent factor matrix; the third term is a spatial structure constraint term, which utilizes the random walk Laplacian matrix L... rw For geographically proximate photovoltaic sites, smooth guidance is performed in the feature space; the fourth term is a time dynamic constraint term, based on the Fourier time embedding matrix C. temp The constructed similarity structure causes features to exhibit periodic trends and continuity over time.
[0114] In the above formula, Represents the output observation matrix. This represents the spatial potential feature matrix for each photovoltaic site. The temporal latent feature matrices at different times, where d is the feature dimension; J represents the mask matrix. Represents the regularization term of the spatial graph. Represents a time-dynamic regularization term, C temp Let L be the time-dynamic covariance matrix. rw Let β and λ represent the graph Laplacian matrix. reg λ1 and λ2 represent the regularization term weights, controlling the weights of different constraints. The regularization term weights β and λ... reg λ1 and λ2 are obtained through cross-validation or automated search strategies; Huber The Huber loss function is defined as follows:
[0115]
[0116] Where δ is an adjustable residual threshold used to balance the penalty characteristics of L2 and L1, and u is... This function aligns with squared loss within a small error range, ensuring accurate data fitting; however, when large errors occur, it automatically converts to linear penalty, significantly reducing the impact of extreme outliers on overall model optimization. For photovoltaic power output data, this approach is particularly suitable for resisting localized anomalies caused by cloud cover, equipment drift, or communication interruptions. Spatial structure regularization term. Based on a graph structure, adjacency information guides the updating of latent features, promoting consistency among adjacent sites in the latent space. This constraint effectively captures the output collaboration relationships between geographically proximate sites, thereby enhancing the model's ability to express spatially coupled structures. Simultaneously, a time-dynamic regularization term... The latent time features are smoothed by using the time covariance matrix after Fourier embedding, enabling the model to better adapt to the periodicity, seasonality, and other dynamic changes in photovoltaic output. By jointly minimizing the above objective function, this invention not only achieves accurate recovery of missing photovoltaic data but also maintains strong robustness and structural consistency under complex environmental disturbances. It is applicable to data preprocessing, predictive input repair, and scheduling optimization scenarios for various distributed or centralized photovoltaic systems.
[0117] Step S5: Using a piecewise stochastic gradient descent strategy, iteratively update the latent feature matrix in the objective function based on the residual threshold, optimize the latent feature matrix and minimize the objective function;
[0118] To effectively solve for the latent feature matrices P and E involved in the aforementioned objective function, this invention designs an optimization strategy combining stochastic gradient descent and a robust error-aware mechanism to improve the model's convergence efficiency and anomaly adaptation capability. This strategy fully utilizes the piecewise structure of the Huber loss function, automatically selecting appropriate update paths for different error magnitudes during optimization, thus balancing convergence speed and robustness. The residual term in the objective function ε(P,E) involves non-smooth points (introduced by the threshold δ in the Huber loss), therefore, traditional closed-form analytical solutions are not feasible. To address this, this invention employs a sample-level distributed update strategy based on observation points. The specific steps are as follows:
[0119] Step S5.1: For photovoltaic sites with no missing power output observation data, sample a triplet (i,j,W) ij ), W i,j This represents the observed power output value of the i-th station at the j-th time point in the power output observation matrix W;
[0120] Step S5.2: For each pair of observation positions (i,j), define the current prediction error Δ. ij for:
[0121] Δ ij =W ij -P i ,E·,j,
[0122] Among them, P i , represents the spatial latent feature vector of the i-th site, E ·,j This represents the temporal latent feature vector corresponding to the j-th time step;
[0123] To address fitting errors of varying magnitudes, a two-stage stochastic gradient descent optimization method is proposed: when the absolute value of the error is less than or equal to a preset threshold δ, a quadratic gradient update strategy is employed; when the absolute value of the error is greater than the preset threshold δ, a linear gradient update strategy using Huber loss is adopted.
[0124] If |Δ ij If |≤δ, update as follows:
[0125]
[0126] Where η is the learning rate, β, λ reg λ1 and λ2 represent the regularization term weights, obtained through cross-validation or automated search strategies; δ is an adjustable residual threshold.
[0127] If |Δ ij If |≥δ, update as follows:
[0128]
[0129] Step S5.3: Perform iterative updates. In each iteration, for all photovoltaic sites with no missing output observation data, randomly sample a batch of triplets (i,j,W). ij The algorithm performs error calculation and gradient update operations as described in step S5.2 until the overall objective function converges or the maximum number of iterations is reached. To accelerate the optimization convergence speed, this invention supports the use of strategies such as learning rate decay, early stopping mechanisms, and adaptive optimizers (such as Adam), and the sample batch size can be adjusted as needed to adapt to different dataset sizes.
[0130] Step S6: Using the optimized latent feature matrix, including the optimized spatial latent feature matrix P and the temporal latent feature matrix E, the missing values of photovoltaic power output data are restored and reconstructed through matrix product W = PE.
[0131] This invention also provides a photovoltaic power output data recovery device based on latent feature analysis, referring to... Figure 3 It includes: acquisition module, spatial map construction module, time encoding module, optimization module, and recovery module. The modules are connected in an orderly manner according to the data flow to work together to complete the task of recovering missing photovoltaic data.
[0132] The acquisition module is used to obtain the power output observation matrix and mask matrix of the photovoltaic site; the acquisition module is compatible with multi-source data interfaces and can access photovoltaic power output observation data at the pump station level, array level or grid level.
[0133] The spatial graph construction module is used to generate a graph Laplace matrix based on the correlation between the geographical location and historical output observation data of each photovoltaic site.
[0134] The time encoding module is used to perform multi-frequency embedding on time series data based on the Fourier feature embedding method to generate a time dynamic covariance matrix;
[0135] The optimization module is used to construct and minimize the objective function and perform piecewise stochastic gradient descent to iteratively update the latent feature matrix. The optimization module is further configured with a threshold judgment unit, which switches the update strategy according to whether the residual exceeds the preset residual threshold δ.
[0136] The recovery module is used to reconstruct missing output observation data using the optimized latent feature matrix.
[0137] The following is an application example of the present invention:
[0138] To verify the effectiveness and robustness of the proposed Fourier Enhanced Adaptive Latent Feature Analysis (ALFA-FE) method in photovoltaic power output data recovery, several experimental scenarios based on real photovoltaic observation data were designed and compared with existing mainstream methods. Experimental results show that this method has significant advantages in multiple dimensions, including recovery accuracy, anomaly adaptability, and computational efficiency. The experiments selected real photovoltaic site operation data from multiple regions, including city-level centralized power plants, distributed residential rooftop systems, and park-level microgrids. The raw data exhibits typical daily periodic power output characteristics and contains various data gaps encountered in actual operation, such as:
[0139] (1) Data loss due to transmission interruption;
[0140] (2) Power surge caused by cloud cover or sudden weather changes;
[0141] (3) Abnormal values or isolated point interference caused by equipment failure.
[0142] To comprehensively evaluate the performance of the method of this invention, the following representative recovery methods were selected as a comparative baseline:
[0143] (1) Low-rank matrix recovery (LRMA): a classic nuclear norm minimization method that does not introduce structural priors;
[0144] (2) Graph Regularized Recovery (Graph-LRMA): A low-rank recovery method that introduces graph structure constraints in the spatial dimension;
[0145] L1 / L2 hybrid robust model (L3F): combines L1 and L2 loss functions to enhance the ability to adapt to outliers;
[0146] Spatiotemporal Joint Modeling (ST-LRMA): A recovery framework that simultaneously incorporates temporal and spatial structural constraints. The recovery results are evaluated using two common error metrics:
[0147] Root mean square error (RMSE): More sensitive to large deviations, reflecting extreme recovery error;
[0148]
[0149] Here, Γ represents all missing locations in the test set.
[0150] Mean Absolute Error (MAE): Treats all errors equally and reflects the overall degree of deviation from the recovery;
[0151]
[0152] To verify the effectiveness of the proposed Fourier Enhanced Adaptive Latent Feature Analysis (ALFA-FE) method, recovery experiments with different missing rates were constructed on real photovoltaic power output data, and compared with several mainstream methods. Table 1 lists the mean absolute error (MAE) and root mean square error (RMSE) of each method at 30% and 50% missing rates. As can be seen from the table, the method of this invention shows significant advantages in both error metrics under both missing rates. In the 30% missing rate scenario, ALFA-FE has an MAE of 7.2 and an RMSE of 14.1, which are 28.7% and 27.3% lower than the graph structure regularization method Graph-LRMA, respectively. In the more stringent 50% missing rate scenario, ALFA-FE remains stable, with an MAE of 10.4 and an RMSE of 19.6, significantly outperforming structural modeling methods such as L3F (MAE = 13.8, RMSE = 24.8) and ST-LRMA (MAE = 12.3, RMSE = 22.5).
[0153] Of particular note is that the ALFA-FE method exhibits the smallest error increase as the missing data rate rises from 30% to 50%, demonstrating its excellent robustness in extreme scenarios such as large-scale missing data, anomalous perturbations, or sudden cloud cover. This is attributed to the adaptive suppression mechanism of outliers in the Huber loss function introduced in this invention, as well as the dual regularization constraints combining spatial graph and Fourier time modeling, which effectively enhance the model's ability to express complex spatiotemporal structures. In summary, the method proposed in this invention demonstrates superior accuracy, robustness, and generalizability in photovoltaic power output data recovery tasks, providing a more reliable data foundation for energy management and operational optimization of various photovoltaic systems.
[0154] Table 1. Results of Photovoltaic Data Recovery Experiment (MAE and RMSE)
[0155] Model MAE (30%) RMSE (30%) MAE (50%) RMSE (50%) LRMA 12.3 22.7 16.5 30.1 Graph-LRMA 10.1 19.4 14.7 26.3 L3F 9.6 17.8 13.8 24.8 ST-LRMA 8.4 16 12.3 22.5 ALFA-FE 7.2 14.1 10.4 19.6
[0156] The embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the present invention is not limited to the above embodiments. Within the scope of knowledge possessed by those skilled in the art, various changes can be made without departing from the spirit of the present invention.
Claims
1. A method for recovering photovoltaic power output data based on latent feature analysis, characterized in that, Perform the following steps S1-S6 to restore the missing data in the photovoltaic output observation matrix: Step S1: For a photovoltaic power generation system with multiple photovoltaic sites, collect the output observation data of each photovoltaic site to form an output observation matrix. The output observation matrix contains missing data, and a mask matrix is introduced to represent the corresponding position of the missing data. Step S2: Based on the geographical location of each photovoltaic site and the correlation of historical power output observation data, construct a spatial adjacency matrix and calculate the corresponding graph Laplace matrix; The specific steps of step S2 are as follows: Step S2.1: Let the latitude and longitude coordinates of the i-th photovoltaic site be... ,in This represents the longitude of the i-th photovoltaic site. Let represent the latitude of the i-th photovoltaic site; the great circle distance between two photovoltaic sites is calculated as follows: ; in, R represents the great circle distance between the i-th and j-th photovoltaic sites, where R is the Earth's radius. The latitude difference between the i-th and j-th photovoltaic sites The longitude difference between the i-th and j-th photovoltaic sites; Thus, the distance matrix is obtained. N represents the number of photovoltaic power stations; Step S2.2: Select k nearest neighbor sites for each photovoltaic site, and define the spatial adjacency matrix using a Gaussian kernel function. : ; in, It is a scale parameter that controls the rate of similarity decay; Calculate the degree matrix ; Step S2.3: Based on the spatial adjacency matrix Sum-degree matrix Construct the graph Laplace matrix As shown in the following formula: ; in, The degree matrix is represented by I, which is the identity matrix. Step S3: Based on the sampling time step, the output observation data are combined into time series data. The Fourier feature embedding method is used to perform multi-frequency embedding on the time series data, and a time dynamic covariance matrix is constructed. The specific steps of step S3 are as follows: Step S3.1: Assume the entire output observation data window covers T uniformly sampled time steps, and form a vector from the time indices of the T time steps. ,in This represents the time index of the j-th time step; Step S3.2: Map each time index to a set of sine-cosine bases composed of different frequencies, specifically embedding the function. As shown in the following formula: ; in, Let d be the frequency scaling vector for the s-th group, where S represents the number of frequency groups used and d is the feature dimension. Step S3.3: Embed the function Applying this to all T time indices and stacking them row by row, we obtain the time encoding matrix as follows: ; Step S3.4: Construct the time dynamic covariance matrix ; Step S4: Based on the latent feature matrix, graph Laplacian matrix, and time dynamic covariance matrix of the photovoltaic site, construct a robust data fitting term, spatial graph regularization term, time dynamic regularization term, and Tikhonov low-rank constraint based on Huber loss, and further construct the objective function; The objective function constructed in step S4 is as follows: ; in, Represents the output observation matrix. This represents the spatial potential feature matrix for each photovoltaic site. The temporal latent feature matrices at different times, where d is the feature dimension; J represents the mask matrix. Represents the regularization term of the spatial graph. Indicates a time-dynamic regularization term. The time-dynamic covariance matrix, Let β and λ represent the graph Laplacian matrix. reg λ1 and λ2 represent the weights of the regularization term. The Huber loss function is defined as follows: ; Where δ is the adjustable residual threshold, and u is... ; Step S5: Using a piecewise stochastic gradient descent strategy, iteratively update the latent feature matrix in the objective function based on the residual threshold, optimize the latent feature matrix and minimize the objective function; Step S6: Using the optimized latent feature matrix, recover the missing power output observation data of each photovoltaic site through matrix multiplication.
2. The photovoltaic power output data recovery method based on latent feature analysis according to claim 1, characterized in that, In step S1, a power output observation matrix is constructed from the power output observation data of all photovoltaic sites at all time points. Where N represents the number of photovoltaic sites and T represents the sampling time length; To identify the locations of missing data in the power output observation matrix, a parameter related to the power output observation matrix is introduced. Same-dimensional mask matrix mask matrix middle: This represents the output observation data at the corresponding position in the output observation matrix. For valid observations, W i,j Represents the output observation matrix The observed power output value of the i-th station at the j-th time point; This indicates that the output observation data at the corresponding position in the output observation matrix is missing and needs to be recovered.
3. The photovoltaic power output data recovery method based on latent feature analysis according to claim 1, characterized in that, The specific steps of step S5 are as follows: Step S5.1: For photovoltaic sites with no missing power output observation data, sample a triplet (i,j,W) ij ), where W i,j Represents the output observation matrix The observed power output value of the i-th station at the j-th time point; Step S5.2: For each pair of observation positions (i,j), define the current prediction error. for: ; in, This represents the spatial latent feature vector of the i-th site. Let represent the temporal latent feature vector corresponding to the j-th time step; depending on the magnitude of the prediction error, the following two gradient update strategies are adopted: like Update as follows: ; Where η is the learning rate, β, λ reg λ1 and λ2 represent the weights of the regularization term, and δ is an adjustable residual threshold. like Update as follows: ; Step S5.3: Perform iterative updates. In each iteration, for all photovoltaic sites with no missing output observation data, randomly sample a batch of triplets (i,j,W). ij Then perform the error calculation and gradient update operation in step S5.2 until the overall objective function converges or the maximum number of iterations is reached.
4. The photovoltaic power output data recovery method based on latent feature analysis according to claim 3, characterized in that, Regularization weights β, λ reg λ1 and λ2 are obtained through cross-validation or automated search strategies.
5. A photovoltaic power output data recovery device based on latent feature analysis, characterized in that, include: The system comprises an acquisition module, a spatial map construction module, a time encoding module, an optimization module, and a recovery module, to realize the photovoltaic power output data recovery method based on latent feature analysis as described in claim 1. The acquisition module is used to obtain the power output observation matrix and mask matrix of the photovoltaic site; The spatial graph construction module is used to generate a graph Laplace matrix based on the correlation between the geographical location and historical output observation data of each photovoltaic site. The time encoding module is used to perform multi-frequency embedding on time series data based on the Fourier feature embedding method to generate a time dynamic covariance matrix; The optimization module is used to construct and minimize the objective function and perform piecewise stochastic gradient descent to iteratively update the latent feature matrix; The recovery module is used to reconstruct missing output observation data using the optimized latent feature matrix.
6. The photovoltaic power output data recovery device based on latent feature analysis according to claim 5, characterized in that, The optimization module is further configured with a threshold judgment unit, which switches the update strategy based on whether the residual exceeds a preset residual threshold δ.
7. A photovoltaic power output data recovery device based on latent feature analysis according to claim 5, characterized in that, The acquisition module is compatible with multi-source data interfaces and can access photovoltaic power output observation data at the pump station level, array level, or grid level.
Citation Information
Patent Citations
Photovoltaic power prediction method based on multi-scale space-time diagram attention convolutional network
CN117154704A
Distributed photovoltaic power data restoration method based on multivariate information
CN117493765A