Photovoltaic power generation system fault diagnosis method based on digital twinborn technology

Through digital twin technology, the residual vector is constructed and the fault diagnosis model of the decision tree and softmax layer is combined, which solves the problem of high data quality and sample number in the existing technology, and realizes effective judgment of the fault categories of photovoltaic power generation system under small-scale data.

CN119696505AActive Publication Date: 2025-03-25ZHEJIANG UNIV OF TECH

Patent Information

Application Number
CN202411753072.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-03-25
Estimated Expiration
2044-12-02

AI Technical Summary

Technical Problem

The existing fault diagnosis methods for photovoltaic power generation systems rely on deep learning, but have high requirements for data quality and sample quantity. In the early stages of the construction of photovoltaic power generation systems, data acquisition equipment was incomplete, resulting in poor data quality and limited sample quantity, making it difficult to achieve accurate fault diagnosis.

Method used

The fault diagnosis method of photovoltaic power generation system based on digital twin technology is used to obtain the ambient temperature, solar irradiance, photovoltaic array voltage and photovoltaic array current, and the residual vector is constructed, and the preset threshold value is used to determine whether there is a fault. When there is a fault, input data to the trained fault diagnosis model, including the decision tree and softmax layer, for further diagnosis of the fault category.

Benefits of technology

Under small-scale data training, the fault category of photovoltaic power generation system can be effectively judged, which improves the accuracy and feasibility of fault diagnosis, and reduces the requirements for data quality and sample quantity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119696505A_ABST
    Figure CN119696505A_ABST
Patent Text Reader

Abstract

The invention discloses a photovoltaic power generation system fault diagnosis method based on a digital twinborn technology, and the method comprises the steps: obtaining the environment temperature, sunlight irradiance, photovoltaic array voltage and photovoltaic array current of a to-be-diagnosed photovoltaic power generation system in a preset time period; and according to the photovoltaic array voltage and the photovoltaic array current of the photovoltaic power generation system to be diagnosed at the corresponding moment, calculating the photovoltaic array power at the corresponding moment. According to the photovoltaic power generation system fault diagnosis method based on the digital twinborn technology, a residual vector is constructed by subtracting the environment temperature, the sunlight irradiance, the photovoltaic array voltage and the photovoltaic array current which are actually acquired from the environment temperature, the sunlight irradiance, the photovoltaic array voltage and the photovoltaic array current which are obtained through simulation; whether the photovoltaic power generation system has a fault or not is judged according to the residual vector, the fault category is further diagnosed through fault diagnosis, and the actual fault category can be effectively judged under the condition that only small-scale data training exists.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of photovoltaic power generation fault diagnosis, and specifically relates to a photovoltaic power generation system fault diagnosis method based on digital twin technology. Background Art

[0002] Photovoltaic power generation system is a power generation system based on solar energy and composed of materials such as crystalline silicon panels. It is an important part of my country's power resource production system. Comprehensive, real-time and accurate perception of the operating status of photovoltaic power generation system is a necessary condition for the safe operation of the system. However, the operation and maintenance of most photovoltaic power generation systems still adopts manual inspection as the main method and machine inspection as the auxiliary method to manage the operation and maintenance of photovoltaic power generation systems. Although this method can meet the specified operation and maintenance requirements, it requires a lot of human resources investment.

[0003] Therefore, some power stations use a combination of drone inspection technology and computer vision to complete intelligent inspection and fault diagnosis of photovoltaic power stations. This method can quickly complete the inspection task and accurately identify the fault of photovoltaic components, but the required equipment resources and data acquisition are expensive and difficult to meet in actual systems. With the advancement of digital technology and the rapid development of artificial intelligence, new ideas have been provided for fault diagnosis of photovoltaic power generation systems. Among them, deep learning has attracted widespread attention due to its high fault identification accuracy, but this method has high requirements for data quality, sample quantity and hardware. In the early stage of photovoltaic power generation system construction, data acquisition equipment was imperfect, and the obtained data was often accompanied by a large amount of noise and interference information, which seriously affected the data quality; and due to factors such as the short system operation time, the number of fault samples was extremely limited, and it was difficult to reach the scale required for effective training of deep learning models, resulting in poor model training results and the inability to accurately realize photovoltaic power generation system fault diagnosis. Summary of the invention

[0004] The purpose of the present invention is to solve the problems raised in the background technology and to propose a fault diagnosis method for a photovoltaic power generation system based on digital twin technology.

[0005] To achieve the above object, the technical solution adopted by the present invention is:

[0006] The present invention proposes a photovoltaic power generation system fault diagnosis method based on digital twin technology, comprising:

[0007] Step 1, obtaining the ambient temperature, solar irradiance, photovoltaic array voltage and photovoltaic array current of the photovoltaic power generation system to be diagnosed within a preset time period;

[0008] Step 2: Calculate the photovoltaic array power at the corresponding moment according to the photovoltaic array voltage and photovoltaic array current of the photovoltaic power generation system to be diagnosed, and construct a residual vector by subtracting the photovoltaic array voltage, photovoltaic array current and photovoltaic array power at the corresponding moment of the photovoltaic power generation system to be diagnosed from the preset photovoltaic array voltage, photovoltaic array current and photovoltaic array power;

[0009] Step 3: Compare each residual vector with a preset threshold vector to determine whether there is a fault in the photovoltaic power generation system to be diagnosed at the corresponding moment;

[0010] Step 4: When a fault occurs, the ambient temperature, solar irradiance, photovoltaic array voltage and photovoltaic array current at the corresponding time when the photovoltaic power generation system to be diagnosed has a fault are input into the trained fault diagnosis model, wherein the fault diagnosis model includes a preset number of decision trees and a softmax layer, and the output of each decision tree is weighted and summed to obtain the output of the fault diagnosis model;

[0011] Step 5: Pass the output of the fault diagnosis model through the softmax layer to obtain the fault category at the corresponding time when the photovoltaic power generation system to be diagnosed has a fault.

[0012] Preferably, each photovoltaic array voltage includes a photovoltaic array AC voltage and a photovoltaic array DC voltage, each photovoltaic array current includes a photovoltaic array AC current and a photovoltaic array DC current, and each photovoltaic array power includes a photovoltaic array AC power and a photovoltaic array DC power.

[0013] Preferably, the preset photovoltaic array voltage, photovoltaic array current and photovoltaic array power are obtained by simulating a photovoltaic power generation system, and normal data and fault data are obtained by simulating the photovoltaic power generation system, and each data is simulated at different times, wherein the normal data and the abnormal data both include ambient temperature, solar irradiance, photovoltaic array voltage and photovoltaic array current, and the preset photovoltaic array voltage and photovoltaic array current are the photovoltaic array voltage and photovoltaic array current in the normal data, and the preset photovoltaic array power is calculated by the photovoltaic array voltage and photovoltaic array current in the normal data;

[0014] The simulated photovoltaic power generation system includes a photovoltaic array, a DC / DC converter and a DC / AC converter. The photovoltaic array includes at least one string, and the string includes eight photovoltaic modules PV connected in series. A first switch S1 is provided in the string. After the string is connected to the second switch S2, it is connected to the input end of the DC / DC converter, and the output end of the DC / DC converter is connected to the input end of the DC / AC converter. The input end of the DC / DC converter is connected to a first voltmeter and a first ammeter, and the output end of the DC / AC converter is connected to a second voltmeter and a second ammeter. The first voltmeter is a DC voltmeter, the first ammeter is a DC ammeter, the second voltmeter is an AC voltmeter, and the second ammeter is an AC ammeter.

[0015] Preferably, the photovoltaic assembly includes a photovoltaic cell, a first resistor R1, a second resistor R2, a capacitor C and a diode D. The photovoltaic cell, the second resistor R2, the diode D and the capacitor C are connected in parallel in sequence. One end of the first resistor R1 is connected to one plate of the capacitor C, the negative electrode of the diode D, one end of the second resistor R2 and the positive electrode of the photovoltaic cell in sequence. The other end of the first resistor R1 serves as the positive electrode of the photovoltaic assembly and is connected to the negative electrode of the adjacent photovoltaic assembly in the string. The negative electrode of the photovoltaic cell, the other end of the second resistor R2, the positive electrode of the diode D and the other plate of the capacitor C are connected to the positive electrode of the adjacent photovoltaic assembly in the string, and the ambient temperature and solar irradiance are input into the photovoltaic cell.

[0016] Preferably, the calculation formula of the residual vector is as follows:

[0017]

[0018] Among them, σ(t) represents the residual vector at time t, h(t) represents the data containing the photovoltaic array voltage, photovoltaic array current and photovoltaic array power of the photovoltaic power generation system to be diagnosed at time t, It represents the data of the photovoltaic array voltage, photovoltaic array current and photovoltaic array power at time t of the simulated photovoltaic power generation system. t U represents the photovoltaic array current of the photovoltaic power generation system to be diagnosed at time t, and includes AC current and DC current. t represents the photovoltaic array voltage of the photovoltaic power generation system to be diagnosed at time t, and includes AC voltage and DC voltage, P t Represents the photovoltaic array power of the photovoltaic power generation system to be diagnosed at time t, and includes AC power and DC power. Represents the photovoltaic array current at time t of the simulated photovoltaic power generation system, and includes AC current and DC current. Represents the photovoltaic array voltage at time t of the simulated photovoltaic power generation system, and includes AC voltage and DC voltage. It represents the photovoltaic array power of the simulated photovoltaic power generation system at time t, and includes AC power and DC power.

[0019] Preferably, the step of comparing each residual vector with a preset threshold vector to determine whether there is a fault in the photovoltaic power generation system to be diagnosed at a corresponding moment includes:

[0020] When the residual vector is larger than the preset threshold vector, a fault exists;

[0021] When the residual vector is less than or equal to the preset threshold vector, there is no fault.

[0022] Preferably, during the training of the fault diagnosis model:

[0023] Step 4.1, the normal data and abnormal data obtained by simulating the photovoltaic power generation system are used to form a training data set, and the four category features of ambient temperature, solar irradiance, photovoltaic array voltage and photovoltaic array current corresponding to the corresponding time in the training data set are used as a sample, and the training data set contains multiple samples, and a category label is set for each sample;

[0024] Step 4.2: Convert the category features of each sample into numerical features, and the formula is as follows:

[0025]

[0026] in,

[0027]

[0028] in, Indicates the value corresponding to the conversion of the i-th category feature of the k-th sample into a numerical feature, N represents the number of samples in the training data set, and y j represents the category label of the jth sample, represents the i-th category feature in the k-th sample, represents the i-th category feature in the j-th sample, I represents the indicator function, a represents the regularization strength, and p represents the prior term;

[0029] Step 4.3: When constructing each decision tree in the fault diagnosis model, use the training data set as the root node;

[0030] For each non-leaf node in the current decision tree:

[0031] Step 4.4, for each category feature, calculate the average value of the corresponding values ​​of each category feature in all samples of the current non-leaf node, and use the average value of each category feature as the candidate split node, and use the samples of the corresponding category features that are less than the average value and greater than or equal to the average value as the left and right candidate child nodes respectively;

[0032] Step 4.5: Calculate the loss function values ​​of the left and right candidate sub-nodes respectively, and perform weighted summation of the loss function values ​​of the left and right candidate sub-nodes as the total loss of the corresponding candidate split node;

[0033] Step 4.6: Compare the total loss of each candidate split node with its parent node, select the candidate split node with the largest total loss reduction as the split node, and split it according to the corresponding left and right candidate child nodes;

[0034] Repeat steps 4.4 to 4.6 until the decision tree reaches the preset depth or the total loss of all candidate split nodes remains unchanged relative to their parent nodes, then no more splitting is performed and the current decision tree is obtained;

[0035] Step 4.7: According to the output of the current decision tree and the minimization of the loss function, determine the parameters and weights of the next decision tree, and the formula is as follows:

[0036] f t+1 (x,w t+1 )=f t (x,w t )+α t+1 h t+1 (x,w t+1 );

[0037] in,

[0038] f t (x,w t )=α t h t (x,w t );

[0039]

[0040]

[0041]

[0042] Among them, h t+1 (·) represents the output of the t+1th decision tree, h t (·) represents the output of the t-th decision tree, α t+1 represents the weight of the t+1th decision tree, α t represents the weight of the t-th decision tree, f t+1 (·) represents the output of the weighted t+1th decision tree, f t (·) represents the output of the t-th decision tree after weighting, x represents the input of the decision tree, i.e., the training data set, and w t+1 represents the parameter of the t+1th decision tree, w trepresents the parameters of the t-th decision tree, L(·) represents the loss function, and is the cross entropy loss function, x k represents the kth sample in the training data set, r k represents the negative gradient of the loss function for the kth sample in the training dataset, y k represents the category label of the kth sample;

[0043] Step 4.8: Perform weighted summation on the outputs of all current decision trees to obtain the output of the fault diagnosis model, then pass the output of the fault diagnosis model through the softmax layer to obtain the predicted fault category, and then use the loss function to calculate the loss;

[0044] Step 4.9, continue to increase the number of decision trees until the preset number of trees is reached or the loss function value converges, then a trained fault diagnosis model is obtained, and the output of the fault diagnosis model is expressed by the following formula:

[0045]

[0046] Where F(·) represents the output of the fault diagnosis model, and E represents the number of decision trees in the fault diagnosis model.

[0047] Preferably, the loss function is cross entropy loss, and the calculation formula is as follows:

[0048]

[0049] in,

[0050]

[0051] Among them, C represents the number of categories of all categories, y kc is an indicator variable. If the true category of the kth sample is c, then y kc is 1, otherwise it is 0, p kc represents the probability that the kth sample belongs to category c, exp(·) represents the exponential function, and f c (x k ) represents the predicted value of the kth sample in category c, and c' represents the sequence number in the category number C of all categories.

[0052] Compared with the prior art, the present invention has the following beneficial effects:

[0053] This photovoltaic power generation system fault diagnosis method based on digital twin technology constructs a residual vector by subtracting the actual ambient temperature, solar irradiance, photovoltaic array voltage and photovoltaic array current from the simulated ambient temperature, solar irradiance, photovoltaic array voltage and photovoltaic array current, and then judges whether there is a fault in the photovoltaic power generation system based on the residual vector, and further diagnoses the fault category through fault diagnosis. It can effectively distinguish the actual fault category with only small-scale data training. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 It is a flow chart of the photovoltaic power generation system fault diagnosis method based on digital twin technology of the present invention;

[0055] Figure 2 A circuit diagram of a simulated photovoltaic power generation system of the present invention;

[0056] Figure 3 It is a circuit diagram of a photovoltaic module in a simulated photovoltaic power generation system of the present invention. DETAILED DESCRIPTION

[0057] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0058] like Figure 1-Figure 3 As shown, a photovoltaic power generation system fault diagnosis method based on digital twin technology is provided, including:

[0059] Step 1, obtaining the ambient temperature, solar irradiance, photovoltaic array voltage and photovoltaic array current of the photovoltaic power generation system to be diagnosed within a preset time period; and then obtaining the ambient temperature, solar irradiance, photovoltaic array voltage and photovoltaic array current at each moment within the preset time period;

[0060] Each photovoltaic array voltage described in this scheme includes a photovoltaic array AC voltage and a photovoltaic array DC voltage, each photovoltaic array current includes a photovoltaic array AC current and a photovoltaic array DC current, and each photovoltaic array power includes a photovoltaic array AC power and a photovoltaic array DC power, which will not be repeated below.

[0061] Step 2: Calculate the photovoltaic array power at the corresponding moment according to the photovoltaic array voltage and photovoltaic array current of the photovoltaic power generation system to be diagnosed, and construct a residual vector by subtracting the photovoltaic array voltage, photovoltaic array current and photovoltaic array power at the corresponding moment of the photovoltaic power generation system to be diagnosed from the preset photovoltaic array voltage, photovoltaic array current and photovoltaic array power.

[0062] The photovoltaic array voltage, photovoltaic array current and photovoltaic array power of the photovoltaic power generation system to be diagnosed at the corresponding moment and the preset photovoltaic array voltage, photovoltaic array current and photovoltaic array power are all at the corresponding moment.

[0063] The preset photovoltaic array voltage, photovoltaic array current and photovoltaic array power are obtained by simulating the photovoltaic power generation system, and normal data and fault data are obtained by simulating the photovoltaic power generation system, and each data is simulated at different times (that is, all simulated data are at different times), wherein the normal data and the abnormal data both include ambient temperature, solar irradiance, photovoltaic array voltage and photovoltaic array current, and the preset photovoltaic array voltage and photovoltaic array current are the photovoltaic array voltage and photovoltaic array current in the normal data, and the preset photovoltaic array power is calculated by the photovoltaic array voltage and photovoltaic array current in the normal data.

[0064] like Figure 2 As shown, the simulated photovoltaic power generation system includes a photovoltaic array, a DC / DC converter and a DC / AC converter, the photovoltaic array includes at least one string, and the string includes eight photovoltaic modules PV ( Figure 2 The end of the photovoltaic module PV pointed by the triangle arrow is the positive pole, and the other end is the negative pole), and a first switch S1 is provided in the string, and after the string is connected to the second switch S2, it is connected to the input end of the DC / DC converter, and the output end of the DC / DC converter is connected to the input end of the DC / AC converter, and the input end of the DC / DC converter is connected to a first voltmeter and a first ammeter, and the output end of the DC / AC converter is connected to a second voltmeter and a second ammeter, and the first voltmeter is a DC voltmeter, the first ammeter is a DC ammeter, the second voltmeter is an AC voltmeter, and the second ammeter is an AC ammeter.

[0065] The number of strings is not limited and can be set according to actual needs. In this embodiment, Figure 2 What is shown in the figure are two strings, which are connected in parallel. Each string includes eight photovoltaic modules PV connected in series, and the first switch S1 and the third switch S3 are provided in the two strings in a one-to-one correspondence. The two strings are connected to the second switch S2 and the fourth switch S4 in a one-to-one correspondence, and then are connected to the input end of the DC / DC converter, and the output end of the DC / DC converter is connected to the input end of the DC / AC converter. The data detected by each voltmeter is the photovoltaic array voltage, and the data detected by each ammeter is the photovoltaic array current.

[0066] Among them, Figure 3As shown, each photovoltaic module includes a photovoltaic cell, a first resistor R1, a second resistor R2, a capacitor C and a diode D. The photovoltaic cell, the second resistor R2, the diode D and the capacitor C are connected in parallel in sequence. One end of the first resistor R1 is connected to one plate of the capacitor C, the negative electrode of the diode D, one end of the second resistor R2 and the positive electrode of the photovoltaic cell in sequence. The other end of the first resistor R1 serves as the positive electrode of the photovoltaic module and is connected to the negative electrode of the adjacent photovoltaic module in the string. The negative electrode of the photovoltaic cell, the other end of the second resistor R2, the positive electrode of the diode D and the other plate of the capacitor C are connected to the positive electrode of the adjacent photovoltaic module in the string. The ambient temperature and solar irradiance are input into the photovoltaic cell (the photovoltaic cell calculates the voltage and current of the photovoltaic array based on the ambient temperature and solar irradiance).

[0067] The calculation formula of the residual vector is as follows:

[0068]

[0069] Among them, σ(t) represents the residual vector at time t, h(t) represents the data containing the photovoltaic array voltage, photovoltaic array current and photovoltaic array power of the photovoltaic power generation system to be diagnosed at time t, It represents the data of the photovoltaic array voltage, photovoltaic array current and photovoltaic array power at time t of the simulated photovoltaic power generation system. t I represents the photovoltaic array current of the photovoltaic power generation system to be diagnosed at time t, and includes AC current and DC current (the combination of AC current and DC current of the photovoltaic array of the photovoltaic power generation system to be diagnosed at time t is represented by I t Similarly, the following photovoltaic array voltage and photovoltaic array power are also the same, and will not be repeated). t represents the photovoltaic array voltage of the photovoltaic power generation system to be diagnosed at time t, and includes AC voltage and DC voltage, P t Represents the photovoltaic array power of the photovoltaic power generation system to be diagnosed at time t, and includes AC power and DC power. Represents the photovoltaic array current at time t of the simulated photovoltaic power generation system, and includes AC current and DC current. Represents the photovoltaic array voltage at time t of the simulated photovoltaic power generation system, and includes AC voltage and DC voltage. It represents the photovoltaic array power of the simulated photovoltaic power generation system at time t, and includes AC power and DC power.

[0070] Step 3: Compare each residual vector with a preset threshold vector to determine whether there is a fault in the photovoltaic power generation system to be diagnosed at the corresponding time, including:

[0071] When the residual vector is larger than the preset threshold vector, a fault exists;

[0072] When the residual vector is less than or equal to the preset threshold vector, there is no fault.

[0073] Step 4. When a fault occurs, the ambient temperature, solar irradiance, photovoltaic array voltage and photovoltaic array current at the corresponding time when the photovoltaic power generation system to be diagnosed has a fault are input into the trained fault diagnosis model, wherein the fault diagnosis model includes a preset number of decision trees and a softmax layer, and the output of each decision tree is weighted and summed to obtain the output of the fault diagnosis model.

[0074] The process of training the fault diagnosis model is as follows:

[0075] Step 4.1, the normal data (i.e., data without faults) and abnormal data (data with faults) obtained by simulating the photovoltaic power generation system are used to form a training data set, and the four category features of ambient temperature, solar irradiance, photovoltaic array voltage, and photovoltaic array current corresponding to the corresponding time in the training data set are used as a sample, and the training data set contains multiple samples, and a category label is set for each sample (a category label is set for the fault category of each sample, which is represented by a number);

[0076] The abnormal data obtained by simulation include four typical faults: short circuit, partial shadow, aging and open circuit. In this embodiment, Figure 2 and Figure 3 In the simulation, the maximum output power of the photovoltaic module is set to 330W, the maximum power point voltage is set to 37.2V, the maximum power point current is set to 8.88A, the open circuit voltage is set to 45.6V, and the short circuit current is set to 9.45A. The implementation methods of simulating four typical faults, short circuit, partial shadow, aging and open circuit, are as follows:

[0077] like Figure 2-Figure 3 As shown, the occurrence of a short-circuit fault is simulated by changing the value of the second resistor R2. When short-circuit fault data is needed, the value of R2 can be adjusted to zero. At this time, the photovoltaic component is short-circuited and a fault occurs; when aging fault data is needed, the aging fault can be simulated by changing the value of the first resistor R1, and the value of R1 is adjusted to a large value. At this time, the resistance of the transmission line becomes larger and the current becomes smaller, and a fault occurs; when open-circuit fault data is needed, an open-circuit fault can be simulated by changing the switch S1 or S3 on the transmission line. At this time, the open-circuit power generation of part of the transmission line is reduced, and a fault occurs; when local shadow fault data is needed, a Shadow value is set, and the Shadow value is multiplied by the solar irradiance and input into the photovoltaic cell to simulate a local shadow fault. At this time, the power generation is reduced and a fault occurs. Figure 3 G in it represents solar irradiance, T represents ambient temperature, and X represents multiplication.

[0078] Step 4.2: Convert the category features of each sample into numerical features, and the formula is as follows:

[0079]

[0080] in,

[0081]

[0082] in, Indicates the value corresponding to the conversion of the i-th category feature of the k-th sample into a numerical feature, N represents the number of samples in the training data set, and y j represents the category label of the jth sample, represents the i-th category feature in the k-th sample, represents the i-th category feature in the j-th sample, I represents the indicator function, a represents the regularization strength, and p represents the prior term (the prior probability of the category label).

[0083] Step 4.3: When constructing each decision tree in the fault diagnosis model, the training data set is used as the root node.

[0084] For each non-leaf node in the current decision tree:

[0085] Step 4.4, for each category feature, calculate the average value of the corresponding values ​​of each category feature in all samples of the current non-leaf node (that is, calculate the average value of each category feature of the current non-leaf node (a total of four category features) in all samples), and use the average value of each category feature as a candidate split node (each of the four category features corresponds to a candidate split node), and use the samples to which the corresponding category features that are less than the average value and greater than or equal to the average value belong as the left and right candidate child nodes respectively (each of the four category features corresponds to the left and right candidate child nodes).

[0086] Step 4.5: Calculate the loss function values ​​of the left and right candidate sub-nodes respectively (for each category feature, calculate the loss function values ​​of the left and right candidate sub-nodes), and perform weighted summation of the loss function values ​​of the left and right candidate sub-nodes (the weight is the ratio of the number of samples in the candidate sub-node to the number of all samples in the current non-leaf node) as the total loss of the corresponding candidate split node;

[0087] Step 4.6: Compare the total loss of each candidate split node with its parent node (compare the total loss of the candidate split nodes corresponding to the four features with the total loss of their parent nodes), select the candidate split node with the largest total loss reduction as the split node, and split it according to the corresponding left and right two candidate child nodes.

[0088] Repeat steps 4.4 to 4.6 until the decision tree reaches the preset depth or the total loss of all candidate split nodes remains unchanged relative to their parent nodes, then no more splitting is performed and the current decision tree is obtained.

[0089] Step 4.7: According to the output of the current decision tree and the minimization of the loss function, determine the parameters and weights of the next decision tree, and the formula is as follows:

[0090] f t+1 (x,w t+1 )=f t (x,w t )+α t+1 h t+1 (x,w t+1 );

[0091] in,

[0092] f t (x,w t )=α t h t (x,w t );

[0093]

[0094]

[0095]

[0096] Among them, h t+1 (·) represents the output of the t+1th decision tree, h t (·) represents the output of the t-th decision tree, α t+1 represents the weight of the t+1th decision tree, α t represents the weight of the tth decision tree, f t+1 (·) represents the output of the weighted t+1th decision tree, f t (·) represents the output of the t-th decision tree after weighting, x represents the input of the decision tree, i.e., the training data set, and w t+1 represents the parameter of the t+1th decision tree, w t represents the parameters of the t-th decision tree, L(·) represents the loss function, and is the cross entropy loss function, x k represents the kth sample in the training data set, r k represents the negative gradient of the loss function for the kth sample in the training dataset, y k represents the category label of the kth sample.

[0097] For the weight α t Update: Initialize α tis an initial value (such as α t =0);

[0098] Calculate the loss function with respect to α t Gradient

[0099] Update α according to the gradient t , for example using gradient descent:

[0100]

[0101] Where η is the learning rate;

[0102] Repeat the above weight α t The update steps are repeated until the loss function converges or the maximum number of iterations is reached.

[0103] Similarly, for the weight w t The same is true for updates, which will not be described in detail.

[0104] Step 4.8: Perform weighted summation on the outputs of all current decision trees to obtain the output of the fault diagnosis model. Then, pass the output of the fault diagnosis model through the softmax layer to obtain the predicted fault category, and then use the loss function to calculate the loss.

[0105] Step 4.9, continue to increase the number of decision trees until the preset number of trees is reached or the loss function value converges, then a trained fault diagnosis model is obtained, and the output of the fault diagnosis model is expressed by the following formula:

[0106]

[0107] Where F(·) represents the output of the fault diagnosis model, and E represents the number of decision trees in the fault diagnosis model.

[0108] Among them, the loss function is the cross entropy loss, and the calculation formula is as follows:

[0109]

[0110] in,

[0111]

[0112] Where C represents the number of categories of all categories (including normal categories and categories with faults), y kc is an indicator variable. If the true category of the kth sample is c, then y kc is 1, otherwise it is 0, p kc represents the probability that the kth sample belongs to category c, exp(·) represents the exponential function, and f c (x k) represents the predicted value of the kth sample in category c, and c' represents the sequence number in the category number C of all categories.

[0113] Step 5: Pass the output of the fault diagnosis model through the softmax layer to obtain the fault category at the corresponding time when the photovoltaic power generation system to be diagnosed has a fault (such as normal, that is, no fault (this happens because the judgment in step 3 may be wrong), or short circuit, partial shadow, aging and open circuit fault).

[0114] The digital twin technology in this photovoltaic power generation system fault diagnosis method based on digital twin technology is to construct a residual vector by subtracting the actually acquired ambient temperature, solar irradiance, photovoltaic array voltage and photovoltaic array current from the simulated ambient temperature, solar irradiance, photovoltaic array voltage and photovoltaic array current.

[0115] It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0116] This photovoltaic power generation system fault diagnosis method based on digital twin technology constructs a residual vector by subtracting the actual ambient temperature, solar irradiance, photovoltaic array voltage and photovoltaic array current from the simulated ambient temperature, solar irradiance, photovoltaic array voltage and photovoltaic array current, and then judges whether there is a fault in the photovoltaic power generation system based on the residual vector, and further diagnoses the fault category through fault diagnosis. It can effectively distinguish the actual fault category with only small-scale data training.

[0117] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A photovoltaic power generation system fault diagnosis method based on digital twin technology, characterized in that: The photovoltaic power generation system fault diagnosis method based on digital twin technology includes: Step 1, obtaining the ambient temperature, solar irradiance, photovoltaic array voltage and photovoltaic array current of the photovoltaic power generation system to be diagnosed within a preset time period; Step 2: Calculate the photovoltaic array power at the corresponding moment according to the photovoltaic array voltage and photovoltaic array current of the photovoltaic power generation system to be diagnosed, and construct a residual vector by subtracting the photovoltaic array voltage, photovoltaic array current and photovoltaic array power at the corresponding moment of the photovoltaic power generation system to be diagnosed from the preset photovoltaic array voltage, photovoltaic array current and photovoltaic array power; Step 3: Compare each residual vector with a preset threshold vector to determine whether there is a fault in the photovoltaic power generation system to be diagnosed at the corresponding moment; Step 4: When a fault occurs, the ambient temperature, solar irradiance, photovoltaic array voltage and photovoltaic array current at the corresponding time when the photovoltaic power generation system to be diagnosed has a fault are input into the trained fault diagnosis model, wherein the fault diagnosis model includes a preset number of decision trees and a softmax layer, and the output of each decision tree is weighted and summed to obtain the output of the fault diagnosis model; Step 5: Pass the output of the fault diagnosis model through the softmax layer to obtain the fault category at the corresponding time when the photovoltaic power generation system to be diagnosed has a fault.

2. The photovoltaic power generation system fault diagnosis method based on digital twin technology according to claim 1, characterized in that: Each photovoltaic array voltage includes a photovoltaic array AC voltage and a photovoltaic array DC voltage, each photovoltaic array current includes a photovoltaic array AC current and a photovoltaic array DC current, and each photovoltaic array power includes a photovoltaic array AC power and a photovoltaic array DC power.

3. The photovoltaic power generation system fault diagnosis method based on digital twin technology according to claim 1, characterized in that: The preset photovoltaic array voltage, photovoltaic array current and photovoltaic array power are obtained by simulating a photovoltaic power generation system, and normal data and fault data are obtained by simulating the photovoltaic power generation system, and each data is simulated at different times, wherein the normal data and the abnormal data both include ambient temperature, solar irradiance, photovoltaic array voltage and photovoltaic array current, and the preset photovoltaic array voltage and photovoltaic array current are the photovoltaic array voltage and photovoltaic array current in the normal data, and the preset photovoltaic array power is calculated by the photovoltaic array voltage and photovoltaic array current in the normal data; The simulated photovoltaic power generation system includes a photovoltaic array, a DC / DC converter and a DC / AC converter. The photovoltaic array includes at least one string, and the string includes eight photovoltaic modules PV connected in series. A first switch S1 is provided in the string. After the string is connected to the second switch S2, it is connected to the input end of the DC / DC converter, and the output end of the DC / DC converter is connected to the input end of the DC / AC converter. The input end of the DC / DC converter is connected to a first voltmeter and a first ammeter, and the output end of the DC / AC converter is connected to a second voltmeter and a second ammeter. The first voltmeter is a DC voltmeter, the first ammeter is a DC ammeter, the second voltmeter is an AC voltmeter, and the second ammeter is an AC ammeter.

4. The photovoltaic power generation system fault diagnosis method based on digital twin technology according to claim 3, characterized in that: The photovoltaic assembly includes a photovoltaic cell, a first resistor R1, a second resistor R2, a capacitor C and a diode D. The photovoltaic cell, the second resistor R2, the diode D and the capacitor C are connected in parallel in sequence. One end of the first resistor R1 is connected to a plate of the capacitor C, the negative electrode of the diode D, one end of the second resistor R2 and the positive electrode of the photovoltaic cell in sequence. The other end of the first resistor R1 serves as the positive electrode of the photovoltaic assembly and is connected to the negative electrode of the adjacent photovoltaic assembly in the string. The negative electrode of the photovoltaic cell, the other end of the second resistor R2, the positive electrode of the diode D and the other plate of the capacitor C are connected to the positive electrode of the adjacent photovoltaic assembly in the string, and the ambient temperature and solar irradiance are input into the photovoltaic cell.

5. The photovoltaic power generation system fault diagnosis method based on digital twin technology according to claim 2, characterized in that: The calculation formula of the residual vector is as follows: Among them, σ(t) represents the residual vector at time t, h(t) represents the data containing the photovoltaic array voltage, photovoltaic array current and photovoltaic array power of the photovoltaic power generation system to be diagnosed at time t, It represents the data of the photovoltaic array voltage, photovoltaic array current and photovoltaic array power at time t of the simulated photovoltaic power generation system, I t U represents the photovoltaic array current of the photovoltaic power generation system to be diagnosed at time t, and includes AC current and DC current. t represents the photovoltaic array voltage of the photovoltaic power generation system to be diagnosed at time t, and includes AC voltage and DC voltage, P t Represents the photovoltaic array power of the photovoltaic power generation system to be diagnosed at time t, and includes AC power and DC power. Represents the photovoltaic array current at time t of the simulated photovoltaic power generation system, and includes AC current and DC current. Represents the photovoltaic array voltage at time t of the simulated photovoltaic power generation system, and includes AC voltage and DC voltage. It represents the photovoltaic array power of the simulated photovoltaic power generation system at time t, and includes AC power and DC power.

6. The photovoltaic power generation system fault diagnosis method based on digital twin technology according to claim 1, characterized in that: The step of comparing each residual vector with a preset threshold vector to determine whether there is a fault in the photovoltaic power generation system to be diagnosed at a corresponding moment includes: When the residual vector is greater than a preset threshold vector, a fault exists; When the residual vector is less than or equal to the preset threshold vector, there is no fault.

7. The photovoltaic power generation system fault diagnosis method based on digital twin technology according to claim 3, characterized in that: During the training of the fault diagnosis model: Step 4.1, the normal data and abnormal data obtained by simulating the photovoltaic power generation system are used to form a training data set, and the four category features of ambient temperature, solar irradiance, photovoltaic array voltage and photovoltaic array current corresponding to the corresponding time in the training data set are used as a sample, and the training data set contains multiple samples, and a category label is set for each sample; Step 4.2: Convert the category features of each sample into numerical features, and the formula is as follows: in, in, Indicates the value corresponding to the conversion of the i-th category feature of the k-th sample into a numerical feature, N represents the number of samples in the training data set, and y j represents the category label of the jth sample, represents the i-th category feature in the k-th sample, represents the i-th category feature in the j-th sample, I represents the indicator function, a represents the regularization strength, and p represents the prior term; Step 4.3: When constructing each decision tree in the fault diagnosis model, use the training data set as the root node; For each non-leaf node in the current decision tree: Step 4.4, for each category feature, calculate the average value of the corresponding values ​​of each category feature in all samples of the current non-leaf node, and use the average value of each category feature as the candidate split node, and use the samples of the corresponding category features that are less than the average value and greater than or equal to the average value as the left and right candidate child nodes respectively; Step 4.5: Calculate the loss function values ​​of the left and right candidate sub-nodes respectively, and perform weighted summation of the loss function values ​​of the left and right candidate sub-nodes as the total loss of the corresponding candidate split node; Step 4.6: Compare the total loss of each candidate split node with its parent node, select the candidate split node with the largest total loss reduction as the split node, and split it according to the corresponding left and right candidate child nodes; Repeat steps 4.4 to 4.6 until the decision tree reaches the preset depth or the total loss of all candidate split nodes remains unchanged relative to their parent nodes, then no more splitting is performed and the current decision tree is obtained; Step 4.7: According to the output of the current decision tree and the minimization of the loss function, determine the parameters and weights of the next decision tree, and the formula is as follows: f t+1 (x,w t+1 )=f t (x,w t )+α t+1 h t+1 (x,w t+1 ); in, f t (x,w t )=α t h t (x,w t ); Among them, h t+1 (·) represents the output of the t+1th decision tree, h t (·) represents the output of the t-th decision tree, α t+1 represents the weight of the t+1th decision tree, α t represents the weight of the tth decision tree, f t+1 (·) represents the output of the weighted t+1th decision tree, f t (·) represents the output of the t-th decision tree after weighting, x represents the input of the decision tree, i.e., the training data set, and w t+1 represents the parameter of the t+1th decision tree, w t represents the parameters of the t-th decision tree, L(·) represents the loss function, and is the cross entropy loss function, x k represents the kth sample in the training data set, r k represents the negative gradient of the loss function for the kth sample in the training dataset, y k represents the category label of the kth sample; Step 4.8: Perform weighted summation on the outputs of all current decision trees to obtain the output of the fault diagnosis model, then pass the output of the fault diagnosis model through the softmax layer to obtain the predicted fault category, and then use the loss function to calculate the loss; Step 4.9, continue to increase the number of decision trees until the preset number of trees is reached or the loss function value converges, then a trained fault diagnosis model is obtained, and the output of the fault diagnosis model is expressed by the following formula: Where F(·) represents the output of the fault diagnosis model, and E represents the number of decision trees in the fault diagnosis model.

8. The photovoltaic power generation system fault diagnosis method based on digital twin technology according to claim 7, characterized in that: The loss function is the cross entropy loss, and the calculation formula is as follows: in, Among them, C represents the number of categories of all categories, y kc is an indicator variable. If the true category of the kth sample is c, then y kc is 1, otherwise it is 0, p kc represents the probability that the kth sample belongs to category c, exp(·) represents the exponential function, and f c (x k ) represents the predicted value of the kth sample in category c, and c' represents the sequence number in the category number C of all categories.

Citation Information

Patent Citations

  • Photovoltaic array area fault diagnosis method and system based on unmanned aerial vehicle

    CN115310351A

  • Method and system for establishing data twin based on photovoltaic flexible support

    CN118504433A

  • Photovoltaic power prediction and fault diagnosis system based on digital twinning

    CN119482350A

Cited By

  • Fault diagnosis and remote monitoring system and method for solar power supply system

    CN121055895A