Fault detection method and device of photovoltaic array, storage medium and electronic device
Through the photovoltaic array fault diagnosis method based on transformed graphics features and convolutional neural network combined with CBAM module, the accuracy problem of photovoltaic array fault diagnosis method in the existing technology is solved in dealing with multiple complex faults, achieving more efficient fault diagnosis effect .
Patent Information
- Application Number
- CN202410968402.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-18
- Publication Date
- 2024-11-19
AI Technical Summary
The existing photovoltaic array fault diagnosis methods have limitations in dealing with multiple complex faults, making it difficult to achieve accurate fault diagnosis.
Using a photovoltaic array fault diagnosis method based on transformed graphical features and convolutional neural network combined with CBAM module, the current voltage characteristic curve and power voltage characteristic curve data are collected and preprocessed, and converted into a two-dimensional graphical characteristic matrix, and the convolutional neural network is used. The model performs fault detection.
It is effective and practical in accurately diagnosing complex faults, improving the accuracy of photovoltaic array fault diagnosis.
Smart Images

Figure CN118984134A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of photovoltaic power generation, and more specifically, to a photovoltaic array fault detection method and device, a storage medium, and an electronic device. Background Art
[0002] Photovoltaic (PV) power generation has been widely used around the world as a clean energy technology. However, PV arrays may experience various faults during operation due to environmental factors, equipment aging, etc., especially under the influence of dust accumulation, the fault phenomenon is more complicated. At present, most fault diagnosis methods mainly rely on IV characteristic curves, but these methods have limitations in dealing with multiple complex faults and dust influences, making it difficult to achieve accurate fault diagnosis.
[0003] Regarding the related technologies, the current photovoltaic array fault diagnosis methods have limitations when dealing with multiple complex faults and are difficult to achieve accurate fault diagnosis. No effective solution has been proposed yet.
[0004] Therefore, it is necessary to improve the related technology to overcome the above-mentioned defects in the related technology. Summary of the invention
[0005] The embodiments of the present application provide a photovoltaic array fault detection method and device, a storage medium and an electronic device to at least solve the problem in the related art that the current photovoltaic array fault diagnosis method has limitations when dealing with multiple complex faults and is difficult to achieve accurate fault diagnosis.
[0006] According to one aspect of an embodiment of the present application, a fault detection method for a photovoltaic array is provided, comprising: collecting first curve data and second curve data of a photovoltaic array, wherein the first curve data is used to indicate a current-voltage characteristic curve of the photovoltaic array, and the second curve data is used to indicate a power-voltage characteristic curve of the photovoltaic array; preprocessing the first curve data and the second curve data to obtain processed curve data; and inputting the processed curve data into a fault detection model to perform fault detection and obtain a fault detection result.
[0007] In an exemplary embodiment, the first curve data and the second curve data are preprocessed to obtain processed curve data, including: curve filling the first curve data and the second curve data respectively to obtain third curve data and fourth curve data, wherein the first curve data corresponds to the third curve data, and the second curve data corresponds to the fourth curve data; resampling the third curve data and the fourth curve data by bilinear interpolation to obtain fifth curve data and sixth curve data, wherein the third curve data corresponds to the fifth curve data, and the fourth curve data corresponds to the sixth curve data; normalizing the fifth curve data and the sixth curve data to obtain seventh curve data and eighth curve data, wherein the processed curve data includes the seventh curve data and the eighth curve data, the fifth curve data corresponds to the seventh curve data, and the sixth curve data corresponds to the eighth curve data.
[0008] In an exemplary embodiment, the first curve data and the second curve data are respectively curve-filled to obtain third curve data and fourth curve data, including: determining an ideal short-circuit current value corresponding to the first curve data, and determining an ideal open-circuit voltage value corresponding to the second curve data; determining a short-circuit current range according to the ideal short-circuit current value, and determining an open-circuit voltage range according to the ideal open-circuit voltage value; curve-filling the first curve data in the short-circuit current range according to preset data to obtain the third curve data; and curve-filling the second curve data in the open-circuit voltage range according to the preset data to obtain the fourth curve data.
[0009] In an exemplary embodiment, the processed curve data is input into a fault detection model for fault detection, including: converting the seventh curve data and the eighth curve data into polar coordinate data, wherein the value of each data point in the seventh curve data and the eighth curve data is used to indicate the cosine value corresponding to the polar coordinate data; converting the polar coordinate data into a two-dimensional graphic feature matrix through an angular difference field method; and inputting the two-dimensional graphic feature matrix into the fault detection model for fault detection.
[0010] In an exemplary embodiment, before inputting the processed curve data into the fault detection model for fault detection, the method also includes: acquiring historical curve data of the photovoltaic array, wherein the historical curve data includes a historical current-voltage characteristic curve and a historical power-voltage characteristic curve of the photovoltaic array; preprocessing the historical curve data to obtain processed historical curve data; converting the processed historical curve data into a two-dimensional graphic feature matrix, and training the fault detection model through the two-dimensional graphic feature matrix corresponding to the processed historical curve data.
[0011] In an exemplary embodiment, the fault detection model is trained by the two-dimensional graphic feature matrix corresponding to the processed historical curve data, including: determining the two-dimensional graphic feature matrix corresponding to the processed historical curve data as the first input feature; performing maximum pooling processing and average pooling processing on the first input feature to obtain a first maximum pooling feature and a first average pooling feature; inputting the first maximum pooling feature and the first average pooling feature into a multilayer perceptron network for summing to obtain a summation result, and processing the summation result through a sigmoid function to obtain a channel attention feature matrix; combining the first input feature with the channel attention feature matrix. The method comprises the steps of: multiplying the feature matrix by the spatial attention feature matrix to obtain a second input feature; performing maximum pooling processing and average pooling processing on the second input feature respectively to obtain a second maximum pooling feature and a second average pooling feature; performing a convolution operation on the second maximum pooling feature and the second average pooling feature through a filter to obtain a convolution operation result, and processing the convolution operation result through the sigmoid function to obtain a spatial attention feature matrix; multiplying the second input feature by the spatial attention feature matrix to obtain an output feature; processing the output feature through a global average pooling layer to obtain a model feature parameter, and obtaining the fault detection model according to the model feature parameter.
[0012] According to another aspect of an embodiment of the present application, a fault detection device for a photovoltaic array is also provided, including: an acquisition module, used to acquire first curve data and second curve data of the photovoltaic array, wherein the first curve data is used to indicate a current-voltage characteristic curve of the photovoltaic array, and the second curve data is used to indicate a power-voltage characteristic curve of the photovoltaic array; a processing module, used to pre-process the first curve data and the second curve data to obtain processed curve data; and a detection module, used to input the processed curve data into a fault detection model for fault detection to obtain a fault detection result.
[0013] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned photovoltaic array fault detection method when running.
[0014] According to another aspect of the embodiments of the present application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the photovoltaic array fault detection method through the computer program.
[0015] According to another aspect of the embodiments of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps of the method described in each embodiment of the present application are implemented.
[0016] Through the present application, firstly, first curve data and second curve data of a photovoltaic array are collected, wherein the first curve data is current-voltage characteristic curve data of the photovoltaic array, i.e., IV characteristic curve data, and the second curve data is power-voltage characteristic curve data of the photovoltaic array, i.e., PV characteristic curve data; the first curve data and the second curve data are preprocessed to obtain processed curve data, and the processed curve data is input into a fault detection model for fault detection to obtain a fault detection result; by adopting the above scheme, a photovoltaic array fault diagnosis method based on transformation graphic features (i.e., preprocessing of curve data) and convolutional neural network combined with CBAM module (i.e., fault detection model) is proposed, which is effective and practical in accurately diagnosing complex faults; thereby solving the problem in the related art that the current photovoltaic array fault diagnosis method has limitations in processing multiple complex faults and is difficult to achieve accurate fault diagnosis. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0019] Figure 1 It is a hardware structure block diagram of a computer terminal of a photovoltaic array fault detection method according to an embodiment of the present application;
[0020] Figure 2is a flow chart of a photovoltaic array fault detection method according to an embodiment of the present application;
[0021] Figure 3 is a flow chart of a photovoltaic array fault diagnosis method according to an embodiment of the present application;
[0022] Figure 4 It is a structural block diagram of a photovoltaic array fault detection device according to an embodiment of the present application. DETAILED DESCRIPTION
[0023] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0025] The method embodiments provided in the embodiments of the present application can be executed in a computer terminal or a similar computing device. Taking running on a computer terminal as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a computer terminal of a photovoltaic array fault detection method according to an embodiment of the present application. Figure 1 As shown, the computer terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor (Central Processing Unit, MCU) or a programmable logic device (Field Programmable Gate Array, FPGA)) and a memory 104 for storing data, wherein the above-mentioned computer terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned computer terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0026] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the fault detection method of the photovoltaic array in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0027] A wireless network provided by a communication provider of a computer terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.
[0028] In this embodiment, a photovoltaic array fault detection method is provided. Figure 2 is a flow chart of a photovoltaic array fault detection method according to an embodiment of the present application, such as Figure 2 As shown, the process includes the following steps S302-S306:
[0029] Step S302: collecting first curve data and second curve data of a photovoltaic array, wherein the first curve data is used to indicate a current-voltage characteristic curve of the photovoltaic array, and the second curve data is used to indicate a power-voltage characteristic curve of the photovoltaic array;
[0030] Step S304: pre-processing the first curve data and the second curve data to obtain processed curve data;
[0031] Step S306: input the processed curve data into a fault detection model to perform fault detection and obtain a fault detection result.
[0032] Through the above steps, firstly, the first curve data and the second curve data of the photovoltaic array are collected, the first curve data is the current and voltage characteristic curve data of the photovoltaic array, that is, the IV characteristic curve data, and the second curve data is the power and voltage characteristic curve data of the photovoltaic array, that is, the PV characteristic curve data; the first curve data and the second curve data are preprocessed to obtain the processed curve data, and the processed curve data is input into the fault detection model for fault detection to obtain the fault detection result; by adopting the above scheme, a photovoltaic array fault diagnosis method based on transformation graphic features (that is, preprocessing the curve data) and convolutional neural network combined with CBAM module (that is, fault detection model) is proposed, which is effective and practical in accurately diagnosing complex faults; thereby solving the problem in the related art that the current photovoltaic array fault diagnosis method has limitations in processing multiple complex faults and is difficult to achieve accurate fault diagnosis.
[0033] In an exemplary embodiment, the first curve data and the second curve data are preprocessed to obtain processed curve data, including: curve filling the first curve data and the second curve data respectively to obtain third curve data and fourth curve data, wherein the first curve data corresponds to the third curve data, and the second curve data corresponds to the fourth curve data; resampling the third curve data and the fourth curve data by bilinear interpolation to obtain fifth curve data and sixth curve data, wherein the third curve data corresponds to the fifth curve data, and the fourth curve data corresponds to the sixth curve data; normalizing the fifth curve data and the sixth curve data to obtain seventh curve data and eighth curve data, wherein the processed curve data includes the seventh curve data and the eighth curve data, the fifth curve data corresponds to the seventh curve data, and the sixth curve data corresponds to the eighth curve data.
[0034] The process of preprocessing the curve data includes: first, curve filling the first curve data and the second curve data to obtain the third curve data corresponding to the first curve data and the fourth curve data corresponding to the second curve data; then the bilinear difference method is used to resample the supplemented characteristic curve to provide a uniformly distributed small data volume characteristic curve, the V axis of the IV curve (i.e. the third curve data mentioned above) and the PV curve (i.e. the fourth curve data mentioned above) are distributed at a uniform voltage interval within a certain range, the I axis and the P axis are resampled at the same uniform interval to reduce the data volume of each curve, and the fifth curve data corresponding to the third curve data and the sixth curve data corresponding to the fourth curve data are obtained; finally, all the data are normalized to obtain the seventh curve data corresponding to the fifth curve data and the eighth curve data corresponding to the sixth curve data.
[0035] Furthermore, the first curve data and the second curve data are respectively curve-filled to obtain third curve data and fourth curve data, including: determining an ideal short-circuit current value corresponding to the first curve data, and determining an ideal open-circuit voltage value corresponding to the second curve data; determining a short-circuit current range according to the ideal short-circuit current value, and determining an open-circuit voltage range according to the ideal open-circuit voltage value; curve-filling the first curve data in the short-circuit current range by preset data to obtain the third curve data; and curve-filling the second curve data in the open-circuit voltage range by the preset data to obtain the fourth curve data.
[0036] The steps of curve filling include: firstly, calculating the ideal ISC (i.e., ideal short-circuit current value) and ideal VOC (i.e., ideal open-circuit voltage value) of each characteristic curve corresponding to the environmental conditions, respectively recorded as ISC_ideal and VOC_ideal, extending the maximum value of the V-axis to the ideal VOC, and filling the current and power of the characteristic curve by filling 0 (i.e., the above-mentioned preset data) within the measured VOC and VOC_ideal range.
[0037] Optionally, the processed curve data is input into a fault detection model for fault detection, including: converting the seventh curve data and the eighth curve data into polar coordinate data, wherein the value of each data point in the seventh curve data and the eighth curve data is used to indicate the cosine value corresponding to the polar coordinate data; converting the polar coordinate data into a two-dimensional graphic feature matrix through an angular difference field method; and inputting the two-dimensional graphic feature matrix into the fault detection model for fault detection.
[0038] The seventh and eighth curve data are converted to the polar coordinate system by the following formula, treating each value as the cosine value of an angle: Among them, t i It is point x i timestamp, N is the number of all time points in the time series, Represents the normalized data (i.e. the seventh and eighth curve data mentioned above). Get the angle difference of each pair of points, and then take the sine value of the difference to form a GADF matrix: I is the unit row vector [1,1,…,1], r i is the calculated polar axis value, φ i is the value of the calculated polar angle. The IV or PV characteristic curve corresponding to each environmental condition is converted into a matrix through these two formulas, and then the conversion matrices corresponding to IV and PV are superimposed to form a 2-channel two-dimensional matrix, that is, the above-mentioned two-dimensional graphic matrix, as the input of the fault diagnosis model.
[0039] Optionally, before inputting the processed curve data into the fault detection model for fault detection, the method also includes: obtaining historical curve data of the photovoltaic array, wherein the historical curve data includes a historical current-voltage characteristic curve and a historical power-voltage characteristic curve of the photovoltaic array; preprocessing the historical curve data to obtain processed historical curve data; converting the processed historical curve data into a two-dimensional graphic feature matrix, and training the fault detection model through the two-dimensional graphic feature matrix corresponding to the processed historical curve data.
[0040] Before performing fault diagnosis, the fault detection model needs to be trained. First, the historical curve data of the photovoltaic array is obtained, including the historical current-voltage characteristic curve and the historical power-voltage characteristic curve. The historical curve data is preprocessed by the above method to obtain the processed historical curve data. The processed historical curve data is converted into a two-dimensional graphic feature matrix by the same method, and then the matrix is used to train the fault detection model.
[0041] Optionally, the fault detection model is trained by the two-dimensional graphic feature matrix corresponding to the processed historical curve data, including: determining the two-dimensional graphic feature matrix corresponding to the processed historical curve data as the first input feature; performing maximum pooling processing and average pooling processing on the first input feature respectively to obtain a first maximum pooling feature and a first average pooling feature; inputting the first maximum pooling feature and the first average pooling feature into a multilayer perceptron network for summing to obtain a summing result, and processing the summing result through a sigmoid function to obtain a channel attention feature matrix; multiplying the first input feature by the channel attention feature matrix to obtain a second input feature; performing maximum pooling processing and average pooling processing on the second input feature respectively to obtain a second maximum pooling feature and a second average pooling feature; performing a convolution operation on the second maximum pooling feature and the second average pooling feature through a filter to obtain a convolution operation result, and processing the convolution operation result through the sigmoid function to obtain a spatial attention feature matrix; multiplying the second input feature by the spatial attention feature matrix to obtain an output feature; processing the output feature through a global average pooling layer to obtain a model feature parameter, and obtaining the fault detection model according to the model feature parameter.
[0042] The convolutional neural network model is mainly composed of a convolution module and a CBAM attention module. The convolution layer calculates the dot product sum on the local area and automatically extracts effective features from the input. The pooling layer divides the input area and calculates the average value of each area to complete the downsampling of the feature matrix.
[0043] The CBAM module strengthens the weights of important features in the network and suppresses unimportant features. CBAM consists of a channel attention module (CAM) and a spatial attention module (SAM).
[0044] The CAM module uses the maximum pool (MaxPool) and average pool (AvgPool) to process and aggregate the input features (i.e., the first input features mentioned above), and then inputs them into a shared weight multi-layer perceptron (MLP) network for summation, and activates the sigmoid function (σ) to generate the final channel attention feature matrix M C (F), the overall formula is: M C (F) = σ(MLP(AvgPool(F))+MLP(MaxPool(F))); then input the feature F (i.e. the first input feature mentioned above) and the feature matrix M C (F) (i.e., the above channel attention feature matrix) is multiplied to obtain F′ (i.e., the above second input feature), and the calculation formula is: The SAM module performs max pooling and average pooling operations on the input features F′ along the channel dimension, generates a two-layer feature matrix, and concatenates them together. Then, a convolution kernel of size 7×7 is used to reduce the dimension of the features, and a sigmoid function is applied to generate the spatial attention feature matrix M S (F′), the overall formula is: M S (F′) = σ(f([AvgPool(F′); MaxPool(F′)])), where f represents the convolution operation using the filter. Finally, by converting the spatial attention feature matrix M S (F′) and F′ are multiplied to obtain the optimized feature matrix F″ (i.e., the above output features), and the calculation formula is Finally, the extracted feature F″ is passed through the global average pooling layer to obtain the trained CNN model (i.e., the above-mentioned fault detection model).
[0045] Optionally, the present application provides a photovoltaic array fault diagnosis method based on transformation graph features and convolutional neural network combined with CBAM module, the process is as follows: Figure 3 As shown, the following steps are included:
[0046] The method is divided into an offline phase and an online phase.
[0047] The offline stage includes steps S101-S104:
[0048] Step S101, offline data preprocessing. Collect historical IV and PV characteristic curve data, first calculate the ideal ISC and VOC (denoted as ISC_ideal and VOC_ideal) corresponding to the environmental conditions of each characteristic curve, expand the maximum value of the V axis to the ideal VOC, and fill in the current and power of the characteristic curve by filling in 0 within the measured VOC and VOC_ideal range.
[0049] The supplemented characteristic curves are resampled using the bilinear interpolation method to provide uniformly distributed characteristic curves with small data volume. The V axis of the IV and PV curves is distributed in a uniform voltage interval in the range of [0, VOC_ideal], and the I axis and P axis are resampled at the same uniform interval to reduce the data volume of each curve. Finally, all the data are normalized.
[0050] Step S102, graphic feature transformation: The IV and PV characteristic curves pre-processed in S101 are transformed into a two-dimensional graphic feature matrix by using the Isc-Voc normalized Gramian angular difference field (GADF) method.
[0051] Convert the IV and PV characteristic curves to a polar coordinate system, treating each value as the cosine of an angle: t i It is point x i timestamp, N is the number of all time points in the time series, Represents normalized data.
[0052] Get the angle difference of each pair of points, and then take the sine of the difference to form a GADF matrix:
[0053] I is the unit row vector [1,1,…,1], r i is the calculated polar axis value, φ i is the value of the calculated polar angle.
[0054] The IV or PV characteristic curve corresponding to each environmental condition is converted into a matrix, and the IV and PV conversion matrices are superimposed to form a 2-channel two-dimensional matrix as the input of the fault diagnosis model.
[0055] Step S103: Model training: The converted graphic feature matrix is combined with a convolutional block attention module (CBAM) to extract richer fault features, and a convolutional neural network (CNN) model is trained.
[0056] The convolutional neural network model is mainly composed of a convolution module and a CBAM attention module. The convolution layer calculates the dot product sum on the local area and automatically extracts effective features from the input. The pooling layer divides the input area and calculates the average value of each area to complete the downsampling of the feature matrix.
[0057] The CBAM module strengthens the weights of important features in the network and suppresses unimportant features. CBAM consists of a channel attention module (CAM) and a spatial attention module (SAM).
[0058] The CAM module processes and aggregates input features using the maximum pool (MaxPool) and average pool (AvgPool), and then inputs them into a shared weight multi-layer perceptron (MLP) network for summation, and generates the final channel attention feature matrix M through the sigmoid function (σ) activation. C (F):
[0059] M C (F) = σ(MLP(AvgPool(F))+MLP(MaxPool(F))), where the input feature F and the feature matrix M generated by CAM along the spatial dimension C (F) and we get F′:
[0060] The SAM module performs max pooling and average pooling operations on the input features F′ along the channel dimension, generates a two-layer feature matrix, and concatenates them together. Then, a convolution kernel of size 7×7 is used to reduce the dimension of the features, and a sigmoid function is applied to generate the spatial attention feature matrix M S (F′):
[0061] M S (F′)=σ(f([AvgPool(F′);MaxPool(F′)])), where f represents the convolution operation using a filter.
[0062] Finally, by adding M S Multiply (F′) and F′ to get the optimized feature matrix F″: Finally, the extracted features are passed through the global average pooling layer to obtain the trained CNN model.
[0063] Step S104: Model storage, storing the trained model parameters and structure to form an offline model.
[0064] The online stage includes steps S201-S202:
[0065] Step S201, data acquisition and processing, collecting real-time IV and PV characteristic curve data and performing preprocessing;
[0066] Step S202, fault diagnosis. The processed real-time data is input into the convolutional neural network model (i.e., the above-mentioned fault diagnosis model) stored in S104, feature extraction and fault classification are performed through the CBAM module, and a diagnosis result (i.e., the above-mentioned fault diagnosis result) is output.
[0067] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.
[0068] In this embodiment, a photovoltaic array fault detection device is also provided, which is used to implement the above embodiments and preferred implementations, and the descriptions that have been made will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0069] Figure 4 : is a structural block diagram of a photovoltaic array fault detection device according to an embodiment of the present application, the device comprising:
[0070] A collection module 42, used for collecting first curve data and second curve data of a photovoltaic array, wherein the first curve data is used for indicating a current-voltage characteristic curve of the photovoltaic array, and the second curve data is used for indicating a power-voltage characteristic curve of the photovoltaic array;
[0071] A processing module 44, configured to pre-process the first curve data and the second curve data to obtain processed curve data;
[0072] The detection module 46 is used to input the processed curve data into a fault detection model to perform fault detection and obtain a fault detection result.
[0073] Through the above device, the first curve data and the second curve data of the photovoltaic array are collected, the first curve data is the current and voltage characteristic curve data of the photovoltaic array, that is, the IV characteristic curve data, and the second curve data is the power and voltage characteristic curve data of the photovoltaic array, that is, the PV characteristic curve data; the first curve data and the second curve data are preprocessed to obtain the processed curve data, and the processed curve data is input into the fault detection model for fault detection to obtain the fault detection result; by adopting the above scheme, a photovoltaic array fault diagnosis method based on transformation graphic features (that is, preprocessing the curve data) and convolutional neural network combined with CBAM module (that is, fault detection model) is proposed, which is effective and practical in accurately diagnosing complex faults; thereby solving the problem in the related art that the current photovoltaic array fault diagnosis method has limitations in processing multiple complex faults and is difficult to achieve accurate fault diagnosis.
[0074] In an exemplary embodiment, the processing module 44 is further used to perform curve padding on the first curve data and the second curve data, respectively, to obtain third curve data and fourth curve data, wherein the first curve data corresponds to the third curve data, and the second curve data corresponds to the fourth curve data; resample the third curve data and the fourth curve data by bilinear interpolation to obtain fifth curve data and sixth curve data, wherein the third curve data corresponds to the fifth curve data, and the fourth curve data corresponds to the sixth curve data; normalize the fifth curve data and the sixth curve data to obtain seventh curve data and eighth curve data, wherein the processed curve data includes the seventh curve data and the eighth curve data, the fifth curve data corresponds to the seventh curve data, and the sixth curve data corresponds to the eighth curve data.
[0075] In an exemplary embodiment, the processing module 44 is further used to determine an ideal short-circuit current value corresponding to the first curve data, and to determine an ideal open-circuit voltage value corresponding to the second curve data; to determine a short-circuit current range according to the ideal short-circuit current value, and to determine an open-circuit voltage range according to the ideal open-circuit voltage value; to perform curve padding on the first curve data in the short-circuit current range by using preset data to obtain the third curve data; and to perform curve padding on the second curve data in the open-circuit voltage range by using the preset data to obtain the fourth curve data.
[0076] In an exemplary embodiment, the above-mentioned detection module 46 is also used to convert the seventh curve data and the eighth curve data into polar coordinate data, wherein the value of each data point in the seventh curve data and the eighth curve data is used to indicate the cosine value corresponding to the polar coordinate data; convert the polar coordinate data into a two-dimensional graphic feature matrix through an angular difference field method; and input the two-dimensional graphic feature matrix into the fault detection model for fault detection.
[0077] In an exemplary embodiment, the detection module 46 is also used to obtain historical curve data of the photovoltaic array, wherein the historical curve data includes a historical current-voltage characteristic curve and a historical power-voltage characteristic curve of the photovoltaic array; preprocess the historical curve data to obtain processed historical curve data; convert the processed historical curve data into a two-dimensional graphic feature matrix, and train the fault detection model through the two-dimensional graphic feature matrix corresponding to the processed historical curve data.
[0078] In an exemplary embodiment, the above-mentioned detection module 46 is also used to determine the two-dimensional graphic feature matrix corresponding to the processed historical curve data as the first input feature; perform maximum pooling processing and average pooling processing on the first input feature respectively to obtain a first maximum pooling feature and a first average pooling feature; input the first maximum pooling feature and the first average pooling feature into a multilayer perceptron network for summing to obtain a summing result, and process the summing result through a sigmoid function to obtain a channel attention feature matrix; multiply the first input feature by the channel attention feature matrix to obtain a second input feature; perform maximum pooling processing and average pooling processing on the second input feature respectively to obtain a second maximum pooling feature and a second average pooling feature; perform a convolution operation on the second maximum pooling feature and the second average pooling feature through a filter to obtain a convolution operation result, and process the convolution operation result through the sigmoid function to obtain a spatial attention feature matrix; multiply the second input feature by the spatial attention feature matrix to obtain an output feature; process the output feature through a global average pooling layer to obtain a model feature parameter, and obtain the fault detection model according to the model feature parameter.
[0079] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0080] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:
[0081] S1, collecting first curve data and second curve data of a photovoltaic array, wherein the first curve data is used to indicate a current-voltage characteristic curve of the photovoltaic array, and the second curve data is used to indicate a power-voltage characteristic curve of the photovoltaic array;
[0082] S2, preprocessing the first curve data and the second curve data to obtain processed curve data;
[0083] S3, inputting the processed curve data into a fault detection model to perform fault detection and obtain a fault detection result.
[0084] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0085] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0086] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0087] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0088] S1, collecting first curve data and second curve data of a photovoltaic array, wherein the first curve data is used to indicate a current-voltage characteristic curve of the photovoltaic array, and the second curve data is used to indicate a power-voltage characteristic curve of the photovoltaic array;
[0089] S2, preprocessing the first curve data and the second curve data to obtain processed curve data;
[0090] S3, inputting the processed curve data into a fault detection model to perform fault detection and obtain a fault detection result.
[0091] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0092] An embodiment of the present application further provides a computer program product, comprising a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program product, and when the computer program is executed by a processor, the steps of the method described in each embodiment of the present application are implemented.
[0093] Optionally, in this embodiment, the above computer program may be configured to implement the following steps when executed by a processor:
[0094] S1, collecting first curve data and second curve data of a photovoltaic array, wherein the first curve data is used to indicate a current-voltage characteristic curve of the photovoltaic array, and the second curve data is used to indicate a power-voltage characteristic curve of the photovoltaic array;
[0095] S2, preprocessing the first curve data and the second curve data to obtain processed curve data;
[0096] S3, inputting the processed curve data into a fault detection model to perform fault detection and obtain a fault detection result.
[0097] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0098] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0099] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A photovoltaic array fault detection method, It is characterized in that include: Collecting first curve data and second curve data of a photovoltaic array, wherein the first curve data is used to indicate a current-voltage characteristic curve of the photovoltaic array, and the second curve data is used to indicate a power-voltage characteristic curve of the photovoltaic array; Preprocessing the first curve data and the second curve data to obtain processed curve data; The processed curve data is input into a fault detection model to perform fault detection and obtain a fault detection result.
2. The method according to claim 1, It is characterized in that Preprocessing the first curve data and the second curve data to obtain processed curve data includes: Performing curve filling on the first curve data and the second curve data respectively to obtain third curve data and fourth curve data, wherein the first curve data corresponds to the third curve data, and the second curve data corresponds to the fourth curve data; Resampling the third curve data and the fourth curve data by bilinear interpolation to obtain fifth curve data and sixth curve data, wherein the third curve data corresponds to the fifth curve data, and the fourth curve data corresponds to the sixth curve data; The fifth curve data and the sixth curve data are normalized to obtain seventh curve data and eighth curve data, wherein the processed curve data include the seventh curve data and the eighth curve data, the fifth curve data corresponds to the seventh curve data, and the sixth curve data corresponds to the eighth curve data.
3. The method according to claim 2, It is characterized in that Performing curve padding on the first curve data and the second curve data respectively to obtain third curve data and fourth curve data includes: Determine an ideal short-circuit current value corresponding to the first curve data, and determine an ideal open-circuit voltage value corresponding to the second curve data; Determining a short-circuit current range according to the ideal short-circuit current value, and determining an open-circuit voltage range according to the ideal open-circuit voltage value; The first curve data is curve-padded in the short-circuit current range by using preset data to obtain the third curve data; and the second curve data is curve-padded in the open-circuit voltage range by using the preset data to obtain the fourth curve data.
4. The method according to claim 2, It is characterized in that Inputting the processed curve data into a fault detection model to perform fault detection, including: converting the seventh curve data and the eighth curve data into polar coordinate data, wherein the value of each data point in the seventh curve data and the eighth curve data is used to indicate the cosine value corresponding to the polar coordinate data; Converting the polar coordinate data into a two-dimensional graphic feature matrix by an angular difference field method; The two-dimensional graphic feature matrix is input into the fault detection model to perform fault detection.
5. The method according to claim 1, It is characterized in that Before inputting the processed curve data into a fault detection model for fault detection, the method further comprises: Acquiring historical curve data of the photovoltaic array, wherein the historical curve data includes a historical current-voltage characteristic curve and a historical power-voltage characteristic curve of the photovoltaic array; Preprocessing the historical curve data to obtain processed historical curve data; The processed historical curve data is converted into a two-dimensional graphic feature matrix, and the fault detection model is trained by the two-dimensional graphic feature matrix corresponding to the processed historical curve data.
6. The method according to claim 5, It is characterized in that Training the fault detection model through a two-dimensional graphic feature matrix corresponding to the processed historical curve data includes: Determine the two-dimensional graphic feature matrix corresponding to the processed historical curve data as the first input feature; Performing maximum pooling processing and average pooling processing on the first input features respectively to obtain a first maximum pooling feature and a first average pooling feature; Inputting the first maximum pool feature and the first average pool feature into a multilayer perceptron network for summing, obtaining a sum result, and processing the sum result through a sigmoid function to obtain a channel attention feature matrix; Multiplying the first input feature by the channel attention feature matrix to obtain a second input feature; performing maximum pooling and average pooling on the second input feature to obtain a second maximum pooling feature and a second average pooling feature; Performing a convolution operation on the second maximum pooling feature and the second average pooling feature through a filter to obtain a convolution operation result, and processing the convolution operation result through the sigmoid function, Get the spatial attention feature matrix; Multiplying the second input feature by the spatial attention feature matrix to obtain an output feature; The output features are processed through a global average pooling layer to obtain model feature parameters, and the fault detection model is obtained according to the model feature parameters.
7. A photovoltaic array fault detection device, It is characterized in that include: A collection module, used for collecting first curve data and second curve data of a photovoltaic array, wherein the first curve data is used for indicating a current-voltage characteristic curve of the photovoltaic array, and the second curve data is used for indicating a power-voltage characteristic curve of the photovoltaic array; A processing module, used for preprocessing the first curve data and the second curve data to obtain processed curve data; The detection module is used to input the processed curve data into a fault detection model to perform fault detection and obtain a fault detection result.
8. A computer-readable storage medium, It is characterized in that The computer-readable storage medium includes a stored program, wherein the program executes the method according to any one of claims 1 to 6 when executed.
9. An electronic device comprising a memory and a processor, It is characterized in that A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 6 through the computer program.
10. A computer program product comprising a computer program, It is 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 6 are implemented.
