A photovoltaic power linear element extraction method based on density and time distribution
Patent Information
- Application Number
- CN202410749841.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-12
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2044-06-12
AI Technical Summary
[0003]现有的光伏功率线性要素提取中数据之间存在多重共线性且存在非线性特征,简单地采用线性模型进行提取无法完全反映实际情况,在数据的处理分析过程中存在着一定的主观性和局限性,导致不同的分析结果,使得提取结果存在偏差或缺失关键信息
[0026]本发明的有益效果是:通过智能逆变器全面覆盖光伏系统实时获取各个位置的光伏功率数据,帮助监测系统的发电情况,提供更全面的数据分析视角,通过针对每个光伏功率数据及其对应的时间戳进行预处理,避免因缺失数据而影响分析结果并提高数据质量和分析准确性,避免数据重复造成的分析偏差,确保数据时间上的一致性,通过计算光伏功率数据之间的欧式距离并构建距离矩阵,能够量化不同光伏功率数据之间的相似度和差异性,利用密度聚类算法帮助找到光伏功率呈现明显变化的区域,助于对光伏功率数据进行有效分类和识别,根据密度聚类和时间戳线性的结果提取光伏功率线性特征,利用Z-score算法实现光伏功率线性特征转换为具有零均值和单位标准差的标准正态分布,使得不同特征之间具有可比性,有助于更好地理解数据的分布情况并把握光伏功率数据的线性特征,利用岭回归模型缓解因为多种共线性特征导致模型参数估计不稳定甚至过拟合的问题,有效地降低模型的复杂度,提高模型的泛化能力。
Smart Images

Figure CN118734103B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of photovoltaic monitoring optimization, and more specifically, to a method for extracting linear elements of photovoltaic power based on density and time distribution. Background Technology
[0002] With the continuous expansion of the scale and the improvement of the intelligence level of photovoltaic power generation systems, the effective monitoring and analysis of photovoltaic power data has become crucial. As an important component of clean energy, photovoltaic power generation is playing an increasingly prominent role in the energy field. The linear element in photovoltaic power data refers to the linear characteristics exhibited by the power data within a certain time range, which can more comprehensively describe the power output characteristics of the photovoltaic power generation system and provide more reference indicators and decision support for system operation and management.
[0003] Existing methods for extracting linear elements of photovoltaic power exhibit multicollinearity and nonlinearity. Simply using a linear model for extraction cannot fully reflect the actual situation. The data processing and analysis process is subject to certain subjectivity and limitations, leading to different analysis results and causing the extraction results to be biased or missing key information. Summary of the Invention
[0004] This invention addresses the technical problems existing in the prior art by providing a method for extracting linear elements of photovoltaic power based on density and time distribution, thereby solving the problems mentioned in the background art.
[0005] The technical solution of this invention to solve the above-mentioned technical problems is as follows: A method for extracting linear elements of photovoltaic power based on density and time distribution, comprising the following steps:
[0006] S101. Deploy smart inverters to fully cover the photovoltaic system to acquire photovoltaic power data, mark the timestamp and location information corresponding to each photovoltaic power data, and preprocess each photovoltaic power data and its corresponding timestamp;
[0007] S102. Using the Euclidean distance between each photovoltaic power data point and constructing a distance matrix as the basis for distance measurement, the photovoltaic power data is clustered using a density clustering algorithm. The trend of power variation with time stamp is studied through a sliding window.
[0008] S103. Extract the linear features of photovoltaic power based on the results of density clustering and timestamp linearity, and use the Z-score algorithm to convert the linear features of photovoltaic power into a standard normal distribution with zero mean and unit standard deviation.
[0009] S104. Establish a ridge regression model based on the extracted linear features of photovoltaic power, and predict the linear elements of photovoltaic power using the regression coefficients of the ridge regression model and the test set;
[0010] In a preferred embodiment, in step S101, a smart inverter is deployed to fully cover the photovoltaic system to acquire photovoltaic power data and mark the timestamp and location information corresponding to each photovoltaic power data.
[0011] Furthermore, missing values in the photovoltaic power data are detected. For missing values, the corresponding photovoltaic power data record is deleted, and the average value of the photovoltaic power data is used to fill in the missing values. Outliers in the photovoltaic power data are detected. The deviation of the photovoltaic power data from its own mean is detected based on the standard deviation of the photovoltaic power data. Photovoltaic power data that exceeds the mean plus or minus 2 times the standard deviation is considered outliers. Duplicate records in the photovoltaic power data are detected and deleted. Time synchronization is achieved through the time setting of the smart inverter. The timestamp information is used as an index for the photovoltaic power data to align the photovoltaic power data and the timestamp information.
[0012] In a preferred embodiment, in step S102, the Euclidean distance between each photovoltaic power data point is calculated, and a distance matrix is constructed as the basis for the distance metric. The specific formula for the Euclidean distance is as follows:
[0013]
[0014] Where d(p,q) represents the Euclidean distance between two photovoltaic power data points, p i q represents the value of the location information of photovoltaic power data p in the i-th dimension. i The value of the photovoltaic power data q in the i-th dimension represents the position information of the photovoltaic power data, and n represents the total number of dimensions compared with the photovoltaic power data.
[0015] Furthermore, density clustering algorithm is used to perform cluster analysis on photovoltaic power data to obtain the core points, boundary points, and noise points of the density clustering algorithm. Based on the density reachability relationship between core photovoltaic power data, the photovoltaic power data is divided into different clusters. Starting from a core photovoltaic power data, all density reachable core photovoltaic power data are recursively found and grouped into one cluster. All core photovoltaic power data are processed until all core photovoltaic power data have been accessed. Based on the clusters, power clusters of different power levels are classified and identified.
[0016] Furthermore, core photovoltaic power data within a 30-minute period is selected as a sliding window. For each timestamp, core photovoltaic power data from a period preceding it is taken to form a moving sequence. The sliding window is then used to study the power variation trend with time stamps by moving the core photovoltaic power data within the selected sliding window, and the linear elements of power are extracted.
[0017] In a preferred embodiment, in step S103, the linear features of photovoltaic power are extracted based on the results of density clustering and timestamp linearity. The mean feature of the photovoltaic power data is used to describe the statistics of the center position, and the slope feature of the photovoltaic power data is used to describe the trend of power change with timestamp. The slope feature of the photovoltaic power data is obtained by the least squares method, and the specific formula is as follows:
[0018]
[0019] Where T represents the slope characteristic of photovoltaic power data, x j Let x represent the independent variable at the j-th timestamp, and let y represent the mean of the independent variables at the timestamps. j Let represent the dependent variable of the j-th photovoltaic power data, y represent the mean of the dependent variable of the photovoltaic power data, and m represent the total number of timestamps.
[0020] Furthermore, the Z-score algorithm is used to convert the mean and slope characteristics of photovoltaic power data into a standard normal distribution with zero mean and unit standard deviation. The specific formula is as follows:
[0021]
[0022] Where Z represents the mean and slope characteristics of the standardized photovoltaic power data, ψ represents the mean and slope characteristics of the photovoltaic power data, μ represents the mean of the mean and slope characteristics of the photovoltaic power data, and σ represents the standard deviation of the mean and slope characteristics of the photovoltaic power data.
[0023] In a preferred embodiment, in step S104, the mean and slope features of the photovoltaic power data are divided into a training set, a validation set, and a test set. The mean and slope features of the photovoltaic power data are combined to form a design matrix. The regression coefficients are initialized as a zero vector. The optimal regularization parameter value is selected through cross-validation. The regression coefficient vector is calculated using the closed-form formula of ridge regression. The specific formula is as follows:
[0024] W = (A T A+αI) -1 A T B
[0025] Where W represents the regression coefficient vector, A represents the design matrix, α represents the regularization parameter in ridge regression, I represents the identity matrix, and B represents photovoltaic power data. The linear elements of photovoltaic power are predicted by using the regression coefficients and the mean and slope characteristics of the photovoltaic power data in the test set.
[0026] The beneficial effects of this invention are as follows: By using intelligent inverters to comprehensively cover the photovoltaic system and acquire real-time photovoltaic power data from various locations, it helps monitor the system's power generation and provides a more comprehensive data analysis perspective. Preprocessing each photovoltaic power data point and its corresponding timestamp avoids missing data affecting analysis results and improves data quality and accuracy. It also avoids analytical bias caused by data duplication, ensuring data consistency over time. Calculating the Euclidean distance between photovoltaic power data points and constructing a distance matrix quantifies the similarity and differences between different photovoltaic power data. Density clustering algorithms help identify regions where photovoltaic power shows significant changes, facilitating effective classification and identification of photovoltaic power data. Based on the results of density clustering and timestamp linearity, linear features of photovoltaic power are extracted. The Z-score algorithm converts these linear features into a standard normal distribution with zero mean and unit standard deviation, making different features comparable and helping to better understand the data distribution and grasp the linear characteristics of photovoltaic power data. Ridge regression models alleviate the problem of unstable or even overfitting model parameter estimation caused by multiple collinear features, effectively reducing model complexity and improving model generalization ability. Attached Figure Description
[0027] Figure 1 This is a flowchart of the method of the present invention; Detailed Implementation
[0028] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0029] In the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the stated features. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0030] In the description of this application, the term "for example" is used to mean "used as an example, illustration, or description." Any embodiment described as "for example" in this application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to make and use the invention. Details are set forth in the following description for purposes of explanation. It should be understood that those skilled in the art will recognize that the invention can be made without using these specific details. In other instances, well-known structures and processes will not be described in detail to avoid obscuring the description of the invention with unnecessary detail. Therefore, the invention is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed in this application.
[0031] This embodiment provides, for example Figure 1 The method for extracting linear elements of photovoltaic power based on density and time distribution is shown, and specifically includes the following steps:
[0032] S101. Deploy smart inverters to fully cover the photovoltaic system to acquire photovoltaic power data, mark the timestamp and location information corresponding to each photovoltaic power data, and preprocess each photovoltaic power data and its corresponding timestamp;
[0033] Furthermore, deploying smart inverters to fully cover the photovoltaic system allows for the acquisition of photovoltaic power data, and the marking of each photovoltaic power data point with its corresponding timestamp and location information. The photovoltaic power data reflects the power generation capacity of the photovoltaic system at different points in time, the timestamp information helps determine the time sequence and time interval of the photovoltaic power data, and the location information displays the power generation capacity of the photovoltaic power data at different locations.
[0034] Furthermore, missing values in the photovoltaic power data are detected. For missing values, the corresponding photovoltaic power data record is deleted, and the average value of the photovoltaic power data is used to fill in the missing values. Outliers in the photovoltaic power data are detected. The deviation of the photovoltaic power data from its own mean is detected based on the standard deviation of the photovoltaic power data. Photovoltaic power data that exceeds the mean plus or minus two times the standard deviation is considered outliers. Duplicate records in the photovoltaic power data are detected and deleted. Time synchronization is achieved through the time setting of the smart inverter. This involves changes in different time zones. All timestamp information is converted into a unified time zone, and Coordinated Universal Time is selected as the standard for the unified time zone. The timestamp information is used as an index for the photovoltaic power data to align the photovoltaic power data and the timestamp information.
[0035] S102. Using the Euclidean distance between each photovoltaic power data point and constructing a distance matrix as the basis for distance measurement, the photovoltaic power data is clustered using a density clustering algorithm. The trend of power variation with time stamp is studied through a sliding window.
[0036] Furthermore, the Euclidean distance between each photovoltaic power data point is calculated, and a distance matrix is constructed as the basis for the distance metric. Each element in the matrix represents the distance between the corresponding photovoltaic power data points. The specific formula for the Euclidean distance is as follows:
[0037]
[0038] Where d(p,q) represents the Euclidean distance between two photovoltaic power data points, p i q represents the value of the location information of photovoltaic power data p in the i-th dimension. i The value of the photovoltaic power data q in the i-th dimension represents the position information of the photovoltaic power data, and n represents the total number of dimensions compared in the photovoltaic power data.
[0039] Furthermore, density clustering algorithms are used to perform cluster analysis on photovoltaic power data to help identify regions where photovoltaic power shows significant changes and to obtain the core points of the density clustering algorithm. The specific steps are as follows: Draw a circle with radius Eps centered on each photovoltaic power data point. The photovoltaic power data contained within this circle must be at least as many as the photovoltaic power data contained within a MinPts neighborhood. This photovoltaic power data point is then considered a core point, where MinPts is the minimum amount of photovoltaic power data required within the Eps neighborhood. The boundary points and noise points of the density clustering algorithm are then obtained. Specifically, for each non-core photovoltaic power data point, if it contains a core point within its Eps neighborhood but is not itself a core point, then this photovoltaic power data point is considered a boundary point. For each photovoltaic power data point that is neither a core point nor a boundary point, then this photovoltaic power data point is considered a boundary point. Data points are considered noise points. Based on the density reachability relationships between core photovoltaic power data, the photovoltaic power data are divided into different clusters. When a photovoltaic power data point is within the Eps neighborhood of another core photovoltaic power data point, it is considered to have a direct density reachability relationship. When there exists a series of core photovoltaic power data points such that all core photovoltaic power data points from the first to the last are directly density reachable, this series of core photovoltaic power data points is considered to have a density reachability relationship. Starting from a core photovoltaic power data point, all density reachable core photovoltaic power data points are recursively found and grouped into one cluster. All core photovoltaic power data points are processed until all core photovoltaic power data points have been accessed. Based on the clusters, power clusters of different power levels are classified and identified.
[0040] Furthermore, core photovoltaic power data within a 30-minute period is selected as a sliding window. For each timestamp, core photovoltaic power data from a period preceding it is taken to form a moving sequence. The sliding window is then used to study the power variation trend with time stamps by moving the core photovoltaic power data within the selected sliding window, and the linear elements of power are extracted.
[0041] S103. Extract the linear features of photovoltaic power based on the results of density clustering and timestamp linearity, and use the Z-score algorithm to convert the linear features of photovoltaic power into a standard normal distribution with zero mean and unit standard deviation.
[0042] Furthermore, based on the results of density clustering and timestamp linearity, linear features of photovoltaic power are extracted. The mean feature of the photovoltaic power data is used to describe the statistics of the center location, and the slope feature of the photovoltaic power data is used to describe the trend of power change with timestamp. The slope feature of the photovoltaic power data is obtained by the least squares method, and the specific formula is as follows:
[0043]
[0044] Where T represents the slope characteristic of photovoltaic power data, x j Let x represent the independent variable at the j-th timestamp, and let y represent the mean of the independent variables at the timestamps. j Let represent the dependent variable of the j-th photovoltaic power data, y represent the mean of the dependent variable of the photovoltaic power data, and m represent the total number of timestamps.
[0045] Furthermore, the Z-score algorithm is used to convert the mean and slope characteristics of photovoltaic power data into a standard normal distribution with zero mean and unit standard deviation. The specific formula is as follows:
[0046]
[0047] Where Z represents the mean and slope characteristics of the standardized photovoltaic power data, ψ represents the mean and slope characteristics of the photovoltaic power data, μ represents the mean of the mean and slope characteristics of the photovoltaic power data, and σ represents the standard deviation of the mean and slope characteristics of the photovoltaic power data.
[0048] S104. Based on the extracted linear features of photovoltaic power, a ridge regression model is established, and the linear elements of photovoltaic power are predicted using the regression coefficients of the ridge regression model and the test set;
[0049] Furthermore, the mean and slope features of the photovoltaic power data are divided into training, validation, and test sets. 70% of the mean and slope features of the photovoltaic power data are used as the training set, 20% as the validation set, and 10% as the test set. The mean and slope features of the photovoltaic power data are combined into a design matrix, where each row represents a photovoltaic power data point, and each column is divided into two groups, representing a mean feature and a slope feature respectively. The regression coefficients are initialized as a zero vector. The optimal regularization parameter value is selected through cross-validation, and the regression coefficient vector is calculated using the closed-form formula of ridge regression. The specific formula is as follows:
[0050] W = (A T A+αI) -1 A T B
[0051] Where W represents the regression coefficient vector, A represents the design matrix, α represents the regularization parameter in ridge regression, used to control the strength of the regularization term, I represents the identity matrix, and B represents the photovoltaic power data. The linear elements of photovoltaic power are predicted by using the regression coefficients and the mean and slope characteristics of the photovoltaic power data in the test set.
[0052] It should be noted that the descriptions of each embodiment in the above embodiments have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0053] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0054] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1A device that provides the functions specified in one or more boxes.
[0055] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0056] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0057] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.
[0058] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A method for extracting linear elements of photovoltaic power based on density and time distribution, characterized in that, Specifically, the following steps are included: S101. Deploy smart inverters to fully cover the photovoltaic system to acquire photovoltaic power data, mark the timestamp and location information corresponding to each photovoltaic power data, and preprocess each photovoltaic power data and its corresponding timestamp; S102. Using the Euclidean distance between each photovoltaic power data point and constructing a distance matrix as the basis for distance measurement, the photovoltaic power data is clustered using a density clustering algorithm. The trend of power variation with time stamp is studied through a sliding window. S103. Extract the linear features of photovoltaic power based on the results of density clustering and timestamp linearity, and use the Z-score algorithm to convert the linear features of photovoltaic power into a standard normal distribution with zero mean and unit standard deviation. In step S103, the linear features of photovoltaic power are extracted based on the results of density clustering and timestamp linearity. The mean features of photovoltaic power data are used to describe the statistics of the center position. The slope features of photovoltaic power data are used to describe the trend of power change with timestamp. The Z-score algorithm is used to convert the mean features and slope features of photovoltaic power data into a standard normal distribution with zero mean and unit standard deviation. S104. Establish a ridge regression model based on the extracted linear features of photovoltaic power, and predict the linear elements of photovoltaic power using the regression coefficients of the ridge regression model and the test set; In step S104, the mean and slope characteristics of the combined photovoltaic power data are used as the design matrix. The regression coefficients are initialized as zero vectors. The optimal regularization parameter value is selected through cross-validation. The regression coefficient vector is calculated using the closed-form formula of ridge regression. The linear elements of photovoltaic power are predicted by using the regression coefficients and the mean and slope characteristics of the photovoltaic power data in the test set.
2. The method for extracting linear elements of photovoltaic power based on density and time distribution according to claim 1, characterized in that: In step S101, a smart inverter is deployed to fully cover the photovoltaic system to acquire photovoltaic power data and mark the timestamp and location information corresponding to each photovoltaic power data. Missing values in the photovoltaic power data are detected. For missing values, the corresponding photovoltaic power data record is deleted and filled in using the average value of the photovoltaic power data. Outliers and duplicate records in the photovoltaic power data are detected and duplicate values are deleted. Time synchronization is achieved through the time setting of the smart inverter. The timestamp information is used as an index for the photovoltaic power data to align the photovoltaic power data and the timestamp information.
3. The method for extracting linear elements of photovoltaic power based on density and time distribution according to claim 1, characterized in that: In step S102, the Euclidean distance between each photovoltaic power data point is calculated, and a distance matrix is constructed as the basis for the distance metric. Density clustering algorithm is used to perform cluster analysis on the photovoltaic power data to obtain the core points, boundary points, and noise points of the density clustering algorithm. Based on the density reachability relationship between the core photovoltaic power data points, the photovoltaic power data is divided into different clusters. Starting from a core photovoltaic power data point, all density reachable core photovoltaic power data points are recursively found and grouped into one cluster. All core photovoltaic power data points are processed until all core photovoltaic power data points have been accessed. The core photovoltaic power data points within the past 30 minutes are selected as a sliding window. For each timestamp, the core photovoltaic power data points within the preceding period are taken to form a moving sequence, and the linear elements of the power are extracted.
4. The method for extracting linear elements of photovoltaic power based on density and time distribution according to claim 3, characterized in that: The specific formula for the Euclidean distance is as follows: in, This represents the Euclidean distance between two photovoltaic power data points. This represents the value of the photovoltaic power data p in the i-th dimension. This represents the value of the photovoltaic power data q in the i-th dimension. This represents the total number of dimensions compared in photovoltaic power data.
5. The method for extracting linear elements of photovoltaic power based on density and time distribution according to claim 1, characterized in that: The slope characteristics of photovoltaic power data are obtained using the least squares method, and the specific formula is as follows: in, This indicates the slope characteristics of photovoltaic power data. The independent variable represents the j-th timestamp. The mean of the independent variable representing the timestamp. Let j represent the dependent variable of the j-th photovoltaic power data. This represents the mean of the dependent variable in photovoltaic power data. This represents the total number of timestamps.
6. The method for extracting linear elements of photovoltaic power based on density and time distribution according to claim 1, characterized in that: The specific formula for the Z-score algorithm is as follows: in This represents the mean and slope characteristics of the standardized photovoltaic power data. This indicates the mean and slope characteristics of photovoltaic power data. The mean value represents the mean and slope characteristics of photovoltaic power data. The standard deviation represents the mean and slope characteristics of photovoltaic power data.
7. The method for extracting linear elements of photovoltaic power based on density and time distribution according to claim 1, characterized in that: The specific formula for the closed-form solution is as follows: in, Represents the regression coefficient vector. Represents the design matrix. This represents the regularization parameter in ridge regression. Represents the identity matrix. This represents photovoltaic power data.
Citation Information
Patent Citations
Photovoltaic power generation power prediction method, storage medium and terminal equipment
CN113033910A
Photovoltaic power generation power prediction method and system based on multi-data model fusion
CN113919545A