Distributed photovoltaic anomaly detection method based on dynamic threshold value and related device
By adopting a combined model of dynamic threshold and autoencoder + time domain convolutional network in photovoltaic abnormality detection, the problem of lack of data correlation of photovoltaic abnormality detection methods in the existing technology is solved, more accurate abnormality detection and early warning are achieved, and the operation stability of photovoltaic plants is improved.
Patent Information
- Application Number
- CN202311385926.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-24
- Publication Date
- 2025-04-25
AI Technical Summary
The existing photovoltaic abnormality detection methods lack the correlation between data and cannot provide accurate early warning information, resulting in poor operating stability of photovoltaic plants.
A distributed photovoltaic anomaly detection method based on dynamic threshold is adopted, and the characteristics in photovoltaic operation data are learned through a model combining an autoencoder and a time domain convolution network, and the dynamic threshold is determined by calculating the sum of the mean and standard deviations of the reconstruction errors, so as to realize adaptive detection of the data.
It improves the accuracy and operation and maintenance efficiency of abnormal detection, can adapt to different types and distributions of data, provide more accurate early warning information, and improve the operation stability of photovoltaic plants.
Smart Images

Figure CN119884728A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of time series anomaly detection, and relates to a distributed photovoltaic anomaly detection method based on a dynamic threshold and a related device. Background Art
[0002] Anomalies, often referred to as outliers, outliers, or rare events, are data points or patterns in the data that do not conform to the concept of normal behavior. The goal of anomaly detection is to find those patterns in the data that do not conform to the expected norms based on previous observations. Anomaly detection is a technique used to identify abnormal patterns that do not conform to expected behavior. It plays an important role in machine learning and is widely used in practical applications in artificial intelligence fields such as computer vision, data mining, and natural language processing. In the era of big data, manual data processing can no longer meet the needs of rapid detection of anomalies. Therefore, it is particularly important to develop more efficient anomaly detection algorithms.
[0003] The application of anomaly detection can help operation and maintenance personnel discover hidden problems, reduce risks, improve efficiency, and improve the decision-making process. By timely discovering abnormal situations, appropriate measures can be taken to solve the problem, thereby improving the stability and reliability of the system. Therefore, anomaly detection is of great significance in modern data-driven applications, and plays an important role in building intelligent systems and realizing automated decision-making. At present, the existing photovoltaic anomaly detection methods are mainly suitable for anomaly detection of periodic and regular time series operation data, and provide monitoring anomaly prompt results before conventional faults occur.
[0004] However, the existing technology cannot provide the specific cause of the abnormality when giving an abnormal prompt, and the operation and maintenance personnel need to make further judgments based on the actual situation. In addition to meeting the requirements of time series data, this method also needs to meet the requirements of internal correlation between a set of data. If a column or a variable is irrelevant to time or has no correlation with other columns, the abnormal model cannot be used for detection. Therefore, it is difficult to provide accurate early warning information and improve the operational stability of the photovoltaic plant.
[0005] In summary, the photovoltaic anomaly detection method in the prior art lacks correlation between data and cannot provide accurate early warning information, resulting in poor operational stability of photovoltaic plants. Summary of the invention
[0006] The purpose of the present invention is to solve the technical problem that the photovoltaic anomaly detection method in the prior art lacks correlation between data, cannot provide accurate early warning information, and leads to poor operating stability of the photovoltaic plant, and to provide a distributed photovoltaic anomaly detection method and related devices based on dynamic thresholds.
[0007] In order to achieve the above object, the present invention adopts the following technical solutions:
[0008] In a first aspect, the present invention discloses a distributed photovoltaic anomaly detection method based on a dynamic threshold, comprising the following steps:
[0009] Preprocess the acquired photovoltaic operation data to be detected to obtain normal photovoltaic operation data, and screen out photovoltaic data that needs to be detected for abnormality;
[0010] Establish a distributed photovoltaic anomaly detection model;
[0011] Use normal photovoltaic operation data as input data to train the model, obtain reconstructed data, and determine the threshold;
[0012] By comparing the reconstruction error obtained after the photovoltaic data that needs to be detected is input into the model with the threshold value, it is determined whether the photovoltaic data is abnormal.
[0013] In a second aspect, the present invention discloses a distributed photovoltaic anomaly detection system based on a dynamic threshold, comprising:
[0014] A preprocessing module is used to preprocess the acquired photovoltaic operation data to be detected, obtain normal photovoltaic operation data, and screen out photovoltaic data that needs to be detected for abnormality;
[0015] Model building module, used to build a distributed photovoltaic anomaly detection model;
[0016] A threshold determination module is used to use normal photovoltaic operation data as input data to train the model, obtain reconstructed data, and determine the threshold;
[0017] The anomaly detection module is used to determine whether the photovoltaic data is abnormal by comparing the reconstruction error obtained after the photovoltaic data that needs to be detected is input into the model with the threshold value.
[0018] In a third aspect, the present invention discloses a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the distributed photovoltaic anomaly detection method based on dynamic thresholds when executing the computer program.
[0019] In a fourth aspect, the present invention discloses a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the distributed photovoltaic anomaly detection method based on dynamic threshold are implemented.
[0020] Compared with the prior art, the present invention has the following beneficial effects:
[0021] The present invention discloses a distributed photovoltaic anomaly detection method and related device based on dynamic threshold. The encoder part of the autoencoder module is used to compress the input data to learn its features. The time domain convolutional network can learn the convolution kernel and pooling operation to capture the local and global features in the photovoltaic operation data, so as to extract useful feature representations. Then, the decoder part of the convolutional autoencoder can remap these features back to the dimension of the input data to achieve the reconstruction of the operation data and obtain the reconstruction error. By calculating the mean and standard deviation of the reconstruction error, and taking the sum of the mean and standard deviation of the reconstruction error as the threshold, the threshold will be adaptively and dynamically adjusted as the data increases, which can adapt to the changes in the data and make the anomaly detection model more flexible and robust. As the data increases, the model will continuously update and adjust the threshold to reflect the new data distribution and features. This adaptive adjustment enables the model to adapt to data of different types and distributions and improve the accuracy of anomaly detection. The model optimizes the model parameters by minimizing the reconstruction error to improve the accuracy and reliability of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0023] Figure 1 is a flow chart of the method of the present invention;
[0024] Figure 2 is a schematic diagram of the system of the present invention;
[0025] Figure 3 It is a schematic diagram of the application field of anomaly detection of the present invention;
[0026] Figure 4 It is a structural diagram of the anomaly detection model of the present invention;
[0027] Figure 5 is an abnormality detection flow chart of the present invention;
[0028] Figure 6 It is a schematic diagram of the computer device structure of the present invention. DETAILED DESCRIPTION
[0029] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0030] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0031] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0032] In the description of the embodiments of the present invention, it should be noted that if the terms "upper", "lower", "horizontal", "inner", etc. indicate an orientation or positional relationship based on the orientation or positional relationship shown in the drawings, or the orientation or positional relationship in which the product of the invention is usually placed when in use, it is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. In addition, the terms "first", "second", etc. are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.
[0033] In addition, if the term "horizontal" appears, it does not mean that the component must be absolutely horizontal, but can be slightly tilted. For example, "horizontal" only means that its direction is more horizontal than "vertical", which does not mean that the structure must be completely horizontal, but can be slightly tilted.
[0034] In the description of the embodiments of the present invention, it is also necessary to explain that, unless otherwise clearly specified and limited, the terms "set", "install", "connect", and "connect" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal connection of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0035] The present invention is further described in detail below in conjunction with the accompanying drawings:
[0036] Anomaly detection technology has been widely used in various fields, including IT analysis, network intrusion analysis, medical diagnosis, financial fraud protection, manufacturing quality control, marketing and social media analysis. Figure 3 shown.
[0037] See also Figure 1 The embodiment of the present invention discloses a distributed photovoltaic anomaly detection method based on a dynamic threshold, comprising the following steps:
[0038] S1, preprocessing the acquired photovoltaic operation data to be detected to obtain normal photovoltaic operation data, and screening out photovoltaic data that needs to be detected for abnormality;
[0039] S2, establish a distributed photovoltaic anomaly detection model;
[0040] S3, using normal PV operation data as input data to train the model, obtain reconstructed data, and determine the threshold;
[0041] S4, by comparing the reconstruction error obtained after the photovoltaic data that needs to be detected for anomaly is input into the model with the threshold value, it is determined whether the photovoltaic data is abnormal.
[0042] In a feasible implementation of the present invention, the photovoltaic operation data to be detected is preprocessed to obtain normal photovoltaic operation data, including: data cleaning, feature extraction and data normalization of the photovoltaic operation data to be detected. Data normalization is to convert data with different data ranges and units into values of the same scale to ensure that they have the same weight when compared and analyzed. The information status mark data is removed, and the minimum-maximum normalization is used to scale the data according to the ratio between the original value and the maximum value, and all data values are scaled to between the specified minimum and maximum values. The specific calculation formula is as follows:
[0043]
[0044] Among them, x is the original data, x' is the normalized data; min is the minimum value of the data; max is the maximum value of the data.
[0045] In a feasible implementation manner of the present invention, the photovoltaic data that needs to be detected for abnormality includes: three-phase voltage of the grid-connected circuit breaker, three-phase current of the grid-connected circuit breaker, three-phase meter voltage of the grid-connected point, three-phase meter current of the grid-connected point, line voltage of inverter 1, three-phase voltage of inverter 1, status of inverter 1 and photovoltaic module equipment, line voltage of inverter 2, three-phase voltage of inverter 2, status of inverter 2 and photovoltaic module equipment, line voltage of inverter 3, three-phase voltage of inverter 3 and status of inverter 3 and photovoltaic module equipment, as shown in Table 1.
[0046] Table 1 PV operation status parameters
[0047]
[0048]
[0049] In a feasible implementation of the present invention, an anomaly detection model is built. Because there are differences in independence and correlation between different parameters, it is necessary to establish an independent anomaly detection model for each parameter, which can more accurately capture the abnormal situation of each parameter. The anomaly detection model embeds an autoencoder and a time domain convolutional network. The data is reconstructed using the autoencoder, and the time domain convolutional network is inserted into the structure of the autoencoder to capture the temporal characteristics of the time series data.
[0050] An autoencoder is a neural network that can discover low-dimensional representations of high-dimensional data and reconstruct the input from the output. An autoencoder consists of two parts of a neural network, an encoder and a decoder.
[0051] The encoder is used to reduce the dimensionality of a high-dimensional dataset to a low-dimensional dataset, and the important function of the decoder is to expand the low-dimensional data to high-dimensional data. The goal of this process is to try to reconstruct the original input. If the neural network is good, it will be able to reconstruct the original input from the encoded data.
[0052] Therefore, the distributed photovoltaic anomaly detection model includes an autoencoder and a time domain convolutional network; the encoder of the autoencoder compresses and learns features of photovoltaic parameters that need to be detected for anomaly, and the decoder of the autoencoder maps the features learned by the encoder back to the dimension of the input data to reconstruct the operating data; and the time domain convolutional network is inserted into the structure of the autoencoder to capture the temporal characteristics of the time series data.
[0053] In a feasible embodiment of the present invention, the encoder module mainly compresses the input photovoltaic data into a low-dimensional representation through a series of layers and operations, and learns the key features in the data. The encoder is defined as follows:
[0054] z=f(W (1) x+b (1) )
[0055] Where x is the input photovoltaic operation data, W (1) is the weight parameter of the encoding layer, b (1) is the corresponding bias matrix;
[0056] The encoder includes a convolution layer, a pooling layer and an activation function; wherein:
[0057] The convolution layer extracts local features from the input data. By defining a set of convolution kernels, the encoder performs a one-dimensional convolution operation on the input data to capture the spatial information in the data.
[0058] The pooling layer further reduces the dimension of the data and extracts more abstract features; it performs pooling operations on the features in local areas to reduce the size and complexity of the data.
[0059] Using Relu as the activation function introduces nonlinear relationships and increases the expressiveness of the model. Mapping the output of the encoder module to a nonlinear space;
[0060] Through these layers and operations, the encoder module gradually compresses the input photovoltaic data into a low-dimensional representation and learns the key features in the data. Such a compression process can not only reduce the dimension and storage space of the data, but also remove redundant information and extract the most useful features, providing better input for subsequent anomaly detection.
[0061] In a feasible implementation of the present invention, the main task of the decoder is to map the low-dimensional features learned by the encoder back to the dimensions of the original input data, thereby realizing the reconstruction of the photovoltaic operation data. Through the decoder, the features compressed by the encoder can be restored to the original data dimension, and the reconstructed data can be made as close to the original input data as possible. The definition of the decoder is as follows:
[0062] x′=f(W (2) z+b (2) )
[0063] Where W (2) is the weight parameter of the decoding layer, b (2) is the corresponding bias matrix, z is the intermediate result generated by the encoder, and x′ is the reconstructed data;
[0064] The decoder includes a deconvolution layer and an activation function; wherein:
[0065] (1) Deconvolution layer (or transposed convolution layer): The deconvolution layer is the core component of the decoder. It is the opposite of the convolution layer and can expand the low-dimensional feature map into a high-dimensional feature map. The deconvolution operation is calculated by using the reverse convolution kernel to increase the size of the feature map and restore the dimension of the data.
[0066] (2) Activation function: The activation function also plays an important role in the decoder. Using Softmax as the activation function in the output layer of the decoder can limit the output of the decoder to a reasonable range, making the reconstructed data more accurate.
[0067] Through the decoder, the low-dimensional features learned by the encoder can be mapped back to the dimensions of the input data, thereby reconstructing the photovoltaic operation data. The reconstructed data can retain the original input information as much as possible, which is helpful for subsequent analysis and application.
[0068] Temporal Convolutional Networks (TCN) is a neural network structure used for modeling and processing sequence data. Compared with traditional recurrent neural networks (RNNs), TCN uses a one-dimensional convolutional layer to capture long-term dependencies in time series data.
[0069] The core idea of TCN is to expand the receptive field by stacking one-dimensional convolutional layers to capture longer time dependencies. Each convolutional layer performs a one-dimensional convolution operation on the input time series and activates the convolution result using a nonlinear activation function. By stacking multiple convolutional layers, TCN can effectively learn complex patterns and features in sequence data.
[0070] Dynamic threshold refers to the adaptive adjustment of the threshold value according to specific conditions or changes in data. In many applications, fixed static thresholds may not be able to adapt to changes or fluctuations in data, so the use of dynamic thresholds can better adapt to actual conditions. The model is trained using normal photovoltaic operation data. The model will optimize the model parameters by minimizing the reconstruction error to improve the accuracy and reliability of the model.
[0071] During the training process, the model builds a model that describes the normal state by learning the characteristics and distribution of normal data. After the model training is completed, the dynamic threshold is determined based on the sum of the mean and standard deviation of the reconstruction error. The reconstruction error refers to the difference between the input data reconstructed by the model and the original data. By calculating the statistical indicators of the reconstruction error of normal data, the dynamic threshold can be obtained to determine whether the photovoltaic data is abnormal.
[0072] The anomaly detection model uses the sum of the mean and standard deviation of the reconstruction error as the threshold. This threshold is a dynamic threshold that can adapt to changes in data and make the anomaly detection model more flexible and robust. As the data increases, the model will continuously update and adjust the threshold to reflect the new data distribution and characteristics. This adaptive adjustment enables the model to adapt to data of different types and distributions and improve the accuracy of anomaly detection.
[0073] Therefore, in a feasible implementation manner of the present invention, the threshold is calculated by calculating the sum of the mean and standard deviation of the reconstruction error, and the calculation formula is:
[0074] threshold=loss mean +loss std
[0075] In the formula, loss mean Represents the mean of the reconstruction error, which is the difference between the reconstructed data and the input data; loss std represents the standard deviation of the reconstruction error.
[0076] The abnormal data is input into the model, and the model will reconstruct the data and calculate their reconstruction errors. If the reconstruction error of a test data is greater than the current threshold, it will be judged as abnormal data.
[0077] The test results of the anomaly detection model are compared with the actual results. Based on the comparison results, a series of evaluation indicators of the model can be calculated to evaluate its performance. Common evaluation indicators include accuracy, recall, precision, and F1 value. By calculating these indicators, the overall performance of the model on the anomaly detection task can be obtained.
[0078] In a feasible implementation manner of the present invention, the determination of whether the photovoltaic data is abnormal is specifically as follows: if the reconstruction error of the abnormal photovoltaic data is greater than a threshold, an abnormal alarm is triggered; if the reconstruction error of the abnormal photovoltaic data is less than the threshold, the operation is normal.
[0079] In a feasible implementation manner of the present invention, the method further includes testing the model using the acquired photovoltaic operation data to be detected, outputting the test results, and comparing the test results with the known abnormal data to evaluate the effect of the model. If the test results are consistent with the known abnormal data, the model successfully detects the abnormality of the photovoltaic data.
[0080] In a feasible implementation of the present invention, a model evaluation is also included, in which the test results of the distributed anomaly detection model are compared with the actual results. According to the comparison results, the accuracy of the distributed anomaly detection model is calculated as:
[0081]
[0082] In the formula, result count is the number of anomalies in the test results, total count is the total number of known outliers; Accuracy is the accuracy.
[0083] The model is tested using PV data and the test results are compared with previously screened abnormal data to evaluate the effectiveness of the model. If the test results are consistent with the known abnormal data, the model successfully detects the abnormality of the PV data.
[0084] The dynamic threshold will be adaptively adjusted as the data increases. This method can more accurately judge abnormal situations. And because of the use of independent modeling, the cause of the abnormality can be directly determined, which can reduce the maintenance time of operation and maintenance personnel and improve work efficiency.
[0085] Through the combination of group modeling, autoencoder and time-domain convolutional network, independent anomaly detection of photovoltaic parameters is achieved, and accurate judgment of the cause of the anomaly is provided, thereby improving the accuracy of anomaly detection and operation and maintenance efficiency.
[0086] The distributed photovoltaic anomaly detection method provided by the present invention determines a dynamic threshold by learning and analyzing the fluctuation range of photovoltaic power generation operation data using a deep learning model. The dynamic threshold can be adjusted according to the changes in actual operation data to adapt to different environments and conditions.
[0087] Compared with traditional fixed thresholds, dynamic thresholds are more accurate and can better identify real abnormal situations and avoid false positives and false negatives. This method enables photovoltaic power plants to detect abnormal situations in a timely and accurate manner, thereby ensuring the normal operation of the photovoltaic system. By detecting and handling abnormal situations in advance, losses and downtime can be reduced, and the production efficiency of photovoltaic power plants can be maximized.
[0088] In summary, the distributed photovoltaic anomaly detection method based on dynamic threshold is an accurate, scientific and practical technological innovation, which can significantly improve the safety, stability and economic benefits of photovoltaic power generation systems.
[0089] Therefore, the distributed anomaly detection model established in the present invention mainly includes an autoencoder module and a time domain convolutional network module.
[0090] The encoder part of the autoencoder module compresses the input data to learn its features, and the time domain convolutional network can learn the convolution kernel and pooling operations to capture the local and global features in the photovoltaic operation data, thereby extracting useful feature representations. The decoder part of the convolutional autoencoder can remap these features back to the dimension of the input data to achieve reconstruction of the operation data.
[0091] By calculating the sum of the mean and standard deviation of the reconstruction error as the threshold, this threshold will be adaptively adjusted as the data increases, so it is a dynamic threshold. By comparing whether the error between the reconstructed data and the original data exceeds the threshold, it is determined whether the input data is abnormal. This combined model can be used in the early warning system of distributed photovoltaic stations, which can provide information about abnormal operating status of photovoltaic stations.
[0092] By monitoring the photovoltaic operation data and comparing it with the reconstructed data, when the error exceeds the dynamic threshold, the system will issue a warning message, thereby improving the operational stability of the photovoltaic plant and station, and guiding the operation and maintenance personnel to design maintenance operations and formulate spare parts plans. By using this method that combines models and dynamic thresholds, abnormal situations in photovoltaic operation data can be effectively detected, and corresponding measures can be taken in a timely manner to improve the reliability and maintainability of photovoltaic stations.
[0093] See also Figure 2 The embodiment of the present invention discloses a distributed photovoltaic anomaly detection system based on a dynamic threshold, comprising:
[0094] A preprocessing module is used to preprocess the acquired photovoltaic operation data to be detected, obtain normal photovoltaic operation data, and screen out photovoltaic data that needs to be detected for abnormality;
[0095] Model building module, used to build a distributed photovoltaic anomaly detection model;
[0096] A threshold determination module is used to use normal photovoltaic operation data as input data to train the model, obtain reconstructed data, and determine the threshold;
[0097] The anomaly detection module is used to determine whether the photovoltaic data is abnormal by comparing the reconstruction error obtained after the photovoltaic data that needs to be detected for anomaly is input into the model with the threshold value.
[0098] See also Figure 6 An embodiment of the present invention discloses a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the distributed photovoltaic anomaly detection method based on dynamic thresholds are implemented.
[0099] An embodiment of the present invention discloses a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the distributed photovoltaic anomaly detection method based on dynamic threshold are implemented.
[0100] Example:
[0101] See also Figure 4 and Figure 5 The embodiment of the present invention provides a distributed photovoltaic anomaly detection method based on a dynamic threshold, comprising the following steps:
[0102] In order to detect abnormalities in photovoltaic power plants, the present invention collects operating data from multiple sites. Data is recorded every 3 seconds, and the recording period is from 5 am to 10 pm every day, with a total of 20,400 data records. Each site records a lot of data, including the voltage and current of the circuit breaker, the voltage and current of the three-phase meter, the voltage and current of the inverter, and string information.
[0103] The data preprocessing of the collected operation data of multiple sites includes the following steps:
[0104] To handle incomplete data, appropriate methods will be used to handle any data rows with missing values or outliers.
[0105] Delete the status mark columns. For columns that only contain "0" or "1", these columns usually represent information status marks, similar to the state of a switch. These status marks are independent of time and are collected by different sensors. Therefore, in the analysis process, these parameters can be temporarily ignored.
[0106] Determine the experimental parameters and select the parameters that need to be detected for anomalies.
[0107] Since each site records a lot of data, including circuit breaker voltage, current, three-phase meter voltage, current, inverter voltage, current, string information, etc., each of which has different independence and correlation, we adopt the group modeling method to independently perform anomaly detection modeling and training for each parameter, so we model the following parameters separately:
[0108] 1. The voltage of the circuit breaker is independent, and an independent anomaly detection model is established.
[0109] 2. The current of the circuit breaker changes with time, so an independent anomaly detection model is established.
[0110] 3. The voltage of the three-phase meter at the grid connection point is independent, and an independent anomaly detection model is established.
[0111] 4. The current of the three-phase meter at the grid connection point changes with time, and an independent anomaly detection model is established.
[0112] 5. The three-phase voltages of the inverter are independent, and an independent abnormality detection model is established.
[0113] 6. The inverter current and subsequent parameters can be modeled using an independent anomaly detection model, among which AC reactive power, power factor, daily power generation, cumulative power generation, inverter switch status, inverter status, reactive power ratio adjustment return value, active power ratio adjustment return value, reactive power ratio adjustment mode return, active power ratio adjustment return, forward active total energy indication, reverse active total energy indication, forward reactive total energy indication, and reverse reactive total energy indication have no effect on the model performance and can be omitted for analysis.
[0114] The distributed photovoltaic anomaly detection model is mainly divided into an encoder and a decoder. The encoder compresses the input photovoltaic parameters and learns the features. The decoder maps the learned features back to the dimension of the input data to achieve the reconstruction of the photovoltaic parameters. The specific structure is as follows: Figure 4 shown.
[0115] Table 2 Model parameters
[0116]
[0117] When training the model, most of the data recorded in the photovoltaic power station is normal, while the proportion of abnormal data is small. After learning in the training process, the model will record the characteristics of most normal data, while a small number of abnormal data characteristics will be suppressed. According to the recorded data, each day can be considered as a cycle, so the record of each day is used as a data point to describe the changes and laws of the data within a day, that is, the data records of each day have similar characteristics, and these common characteristics are extracted through deep learning modeling.
[0118] When modeling, the data sampling frequency is adjusted to 1 minute, which effectively reduces the input parameters of the model and can also reflect the operating status of the power plant. If the frequency is too high, the false positives of the model will increase, and if the frequency is too low, the model may miss useful information. The model training parameters are shown in Table 2.
[0119] In the anomaly detection of photovoltaic power station data, after the model training is completed, the error between the input value and the output value is calculated, and the sum of the mean and standard deviation of the error is used as the threshold, such as Figure 5 As shown in the figure, the specific anomaly detection process is as follows:
[0120] After the model is trained, it can accept recorded data from actual power plants as input and calculate the corresponding simulated data as output.
[0121] To calculate the error between the actual record and the simulated record, various metrics can be used, such as Euclidean distance, mean square error, etc.
[0122] The errors between all actual records and simulated records are counted, and the mean and standard deviation of the errors are calculated.
[0123] Add the mean and standard deviation of the errors to get a threshold.
[0124] For new recorded data, input it into the model to generate corresponding simulation data, and calculate the error between it and the actual record. Determine whether the error is greater than the threshold. If it is greater than the threshold, it is considered that there is abnormal data.
[0125] In order to verify the effectiveness of the distributed photovoltaic anomaly detection model, taking the three-phase meter voltage at the grid-connected point as an example, the model is compared with the fixed threshold method. The comparison results of the two methods are shown in Table 3.
[0126] Table 3. Comparison results of anomaly detection methods
[0127]
[0128] It can be seen from Table 3 that the accuracy of the anomaly detection model of the present invention reaches 96%, which is better than the fixed threshold method and is more suitable for distributed photovoltaic anomaly detection.
[0129] In summary, the embodiment provided by the present invention proposes a distributed photovoltaic anomaly detection method based on dynamic thresholds, which uses a model combining an autoencoder and a time domain convolutional network, and can learn local and global features in photovoltaic operation data and realize the reconstruction of operation data. This combined model can extract useful feature representations and better capture abnormal situations.
[0130] By calculating the sum of the mean and standard deviation of the error between the input data and the reconstructed data as the threshold, and adaptively adjusting the threshold as the data increases, it can more effectively adapt to the actual operation of the photovoltaic station, avoid missed diagnosis and misdiagnosis caused by inappropriate threshold setting, and provide more accurate early warning information. It can help photovoltaic station operation and maintenance personnel to promptly discover and handle abnormal situations and improve the operation stability of the station.
[0131] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented 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.
[0132] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0133] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0134] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0135] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A distributed photovoltaic anomaly detection method based on dynamic threshold, characterized in that: The following steps are involved: Preprocess the acquired photovoltaic operation data to be detected to obtain normal photovoltaic operation data, and screen out photovoltaic data that needs to be detected for abnormality; Establish a distributed photovoltaic anomaly detection model; Use normal photovoltaic operation data as input data to train the model, obtain reconstructed data, and determine the threshold; By comparing the reconstruction error obtained after the photovoltaic data that needs to be detected is input into the model with the threshold value, it is determined whether the photovoltaic data is abnormal.
2. A distributed photovoltaic anomaly detection method based on dynamic threshold according to claim 1, characterized in that: The method of preprocessing the acquired photovoltaic operation data to be detected to obtain normal photovoltaic operation data includes: performing data cleaning, feature extraction and data normalization on the acquired photovoltaic operation data to be detected, removing information status mark data therein, scaling the data according to the ratio between the original value and the maximum value by using minimum-maximum normalization, and scaling all data values to between the specified minimum value and maximum value. The specific calculation formula is as follows: Among them, x is the input photovoltaic operation data, x' is the normalized data; min is the minimum value of the data; max is the maximum value of the data.
3. The distributed photovoltaic anomaly detection method based on dynamic threshold according to claim 1 is characterized in that: The photovoltaic data that needs to be detected for abnormalities include: three-phase voltage of the grid-connected circuit breaker, three-phase current of the grid-connected circuit breaker, three-phase meter voltage at the grid-connected point, three-phase meter current at the grid-connected point, line voltage of inverter 1, three-phase voltage of inverter 1, status of inverter 1 and photovoltaic module equipment, line voltage of inverter 2, three-phase voltage of inverter 2, status of inverter 2 and photovoltaic module equipment, line voltage of inverter 3, three-phase voltage of inverter 3, and status of inverter 3 and photovoltaic module equipment.
4. The distributed photovoltaic anomaly detection method based on dynamic threshold according to claim 1 is characterized in that: The distributed photovoltaic anomaly detection model includes an autoencoder and a time domain convolutional network; the encoder of the autoencoder compresses and learns features of photovoltaic parameters that need to be detected for anomalies, and the decoder of the autoencoder maps the features learned by the encoder back to the dimension of the input data to reconstruct the operation data; The time domain convolutional network is inserted into the structure of the autoencoder to capture the temporal characteristics of the time series data.
5. A distributed photovoltaic anomaly detection method based on dynamic threshold according to claim 4, characterized in that: The encoder is defined as follows: z=f(W (1) x+b (1) ) Where x is the input photovoltaic operation data, W (1) is the weight parameter of the encoding layer, b (1) is the corresponding bias matrix; The encoder includes a convolution layer, a pooling layer and an activation function; the convolution layer extracts local features from the input data, and by defining a set of convolution kernels, the encoder performs a one-dimensional convolution operation on the input data to capture the spatial information in the data; the pooling layer further reduces the dimension of the data and extracts more abstract features; Relu is used as the activation function to introduce a nonlinear relationship and map the output result of the encoder module to a nonlinear space; The decoder is defined as follows: x′=f(W (2) z+b (2) ) Where W (2) is the weight parameter of the decoding layer, b (2) is the corresponding bias matrix, z is the intermediate result generated by the encoder, and x' is the reconstructed data; The decoder includes a deconvolution layer and an activation function; the deconvolution layer performs calculations by using a reverse convolution kernel to increase the size of the feature map and restore the dimension of the data; Softmax is used as the activation function in the output layer of the decoder to reconstruct the photovoltaic operation data and limit the output of the decoder to a reasonable range; each convolution layer performs a one-dimensional convolution operation on the input time series and uses a nonlinear activation function to activate the convolution result.
6. A distributed photovoltaic anomaly detection method based on dynamic threshold according to claim 1, characterized in that: The threshold is calculated by calculating the sum of the mean and standard deviation of the reconstruction error, and the calculation formula is: threshold=loss mean +loss std In the formula, loss mean Represents the mean of the reconstruction error, which is the difference between the reconstructed data and the input data; loss std represents the standard deviation of the reconstruction error; The determination of whether the photovoltaic data is abnormal is specifically as follows: if the reconstruction error of the abnormal photovoltaic data is greater than a threshold, an abnormal alarm is triggered; if the reconstruction error of the abnormal photovoltaic data is less than the threshold, the operation is normal.
7. The distributed photovoltaic anomaly detection method based on dynamic threshold according to claim 1 is characterized in that: It also includes testing the model using the acquired photovoltaic operation data to be detected, outputting the test results, and comparing the test results with the known abnormal data to evaluate the effect of the model. If the test results are consistent with the known abnormal data, the model successfully detects the abnormality of the photovoltaic data; It also includes model evaluation, comparing the test results of the distributed anomaly detection model with the actual results. Based on the comparison results, the accuracy of the distributed anomaly detection model is calculated as: In the formula, result count is the number of anomalies in the test results, total count is the total number of known outliers; Accuracy is the accuracy.
8. A distributed photovoltaic anomaly detection system based on dynamic threshold, characterized in that: include: A preprocessing module is used to preprocess the acquired photovoltaic operation data to be detected, obtain normal photovoltaic operation data, and screen out photovoltaic data that needs to be detected for abnormality; Model building module, used to build a distributed photovoltaic anomaly detection model; A threshold determination module is used to use normal photovoltaic operation data as input data to train the model, obtain reconstructed data, and determine the threshold; The anomaly detection module is used to determine whether the photovoltaic data is abnormal by comparing the reconstruction error obtained after the photovoltaic data that needs to be detected is input into the model with the threshold value.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Substation remote fault early warning system and method based on deep learning
CN120412250A
Anomaly detection and handling methods, devices, and servers for new energy power stations
CN122577802A