Photovoltaic inverter fault diagnosis method based on deep learning
Through deep learning methods, the photovoltaic inverter faults are diagnosed, which solves the problems of power generation losses and high operation and maintenance costs caused by frequent photovoltaic power station failures, and achieves rapid and accurate fault judgments and improves patrol efficiency.
Patent Information
- Application Number
- CN202411122853.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-15
- Publication Date
- 2024-11-26
AI Technical Summary
Due to frequent faults, large photovoltaic power stations have high power generation losses and high operation and maintenance costs. The existing inspection methods are inefficient, especially the lack of endurance of the drone, which cannot meet the needs of a large number of inspection tasks.
The fault diagnosis method of photovoltaic inverter based on deep learning is adopted, and the simulation system circuit of a three-phase grid-connected photovoltaic power generation system is established to simulate IGBT component failures, and fault feature extraction and classification are used using EMD decomposition and convolutional neural network (CNN). Achieve rapid diagnosis of photovoltaic inverter failures.
It reduces the maintenance cost and power generation losses of photovoltaic power stations, improves the fault diagnosis efficiency, can quickly and accurately judge the fault type, and reduces the frequency of manual inspection and maintenance.
Smart Images

Figure CN119026546A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of power supply, and in particular relates to a photovoltaic inverter fault diagnosis method based on deep learning. Background Art
[0002] A photovoltaic power station is a power generation system that utilizes solar energy and adopts special materials such as crystalline silicon panels, inverters and other electronic components. It is connected to the power grid and transmits electricity to the power grid.
[0003] Photovoltaic power stations are generally located far away from densely populated areas, occupy a large area and have a large number of equipment. On average, there are thousands of failures every month. Inspections during system operation will not only lead to power generation losses, but also consume a lot of manpower, material and financial resources. When the system fails and stops, repairs will not only cause a large amount of power loss, but also shorten the life of the photovoltaic system equipment. Therefore, once a failure occurs, it will inevitably lead to a large amount of operation and maintenance costs and power generation losses.
[0004] Among the current photovoltaic power generation sites, some older and more traditional power stations still use manual inspection methods, while some newly built and more intelligent power stations generally use machines instead of manpower for inspection, such as using drones for inspection. Although this novel inspection method can perform visible fault detection according to manual instructions, it is often unable to undertake a large number of inspection tasks because the drone's endurance cannot meet actual requirements.
[0005] Therefore, it is imperative to establish a data-based analysis platform for fault diagnosis in the above-mentioned large-scale photovoltaic power stations to improve operation and maintenance efficiency. Summary of the invention
[0006] In order to solve the above problems existing in the prior art, the present invention proposes a photovoltaic inverter fault diagnosis method based on deep learning.
[0007] The present invention specifically adopts the following technical solution: a photovoltaic inverter fault diagnosis method based on deep learning, the method comprising the following steps:
[0008] Step 1: Establish a simulation system circuit of a three-phase grid-connected photovoltaic power generation system;
[0009] Step 2: Simulate inverter circuit line faults for six IGBT components in the simulation system circuit;
[0010] Step 3: Perform simulation data collection on the inverter circuit line fault, and select the A phase current value as the fault observation value;
[0011] Step 4: Perform EMD decomposition on the different A-phase currents obtained to obtain a primary eigenvalue matrix;
[0012] Step 5: Build a deep learning model of convolutional neural network;
[0013] Step 6: Bring the primary eigenvalue matrix obtained in step 4 into the deep learning model constructed in step 5, perform deep learning training, fault classification and performance evaluation, and match different A-phase current values with corresponding fault types;
[0014] Step 7: Obtain accurate PV inverter fault diagnosis results based on the A phase current value.
[0015] Preferably, in step 1, a grid-connected photovoltaic power generation system is selected to simulate a system circuit, and the simulated system circuit includes a photovoltaic array, an inverter circuit, a maximum power point tracking control module and a power grid.
[0016] Preferably, it is characterized in that
[0017] In step 2, the six IGBT components are VT1, VT2, VT3, VT4, VT5 and VT6.
[0018] Fault classification includes single and double fault types, including the following:
[0019] 1) Single-branch line faults, there are six fault scenarios in total, namely: VT1, VT2, VT3, VT4, VT5, VT6;
[0020] 2) In-phase dual-line fault, there are three fault situations in total, namely: VT1 and VT4, VT3 and VT6, VT5 and VT2;
[0021] 3) There are six fault scenarios for the same half-bridge dual-line fault, namely: VT1 and VT3, VT1 and VT5, VT2 and VT4, VT2 and VT6, VT3 and VT5, VT4 and VT6;
[0022] 4) Cross-double-line fault, there are six fault situations in total, namely: VT1 and VT6, VT3 and VT4, VT4 and VT5, VT1 and VT2, VT2 and VT3, VT5 and VT6.
[0023] Preferably, it is characterized in that
[0024] The specific steps of step 3 are as follows:
[0025] Fault simulation is performed for six fault types, and the total system operation time is set to 0.1-10s with a step size of 10 -5 s, and perform open-circuit fault simulations at different locations between the start and end times of the operation, and take the A, B, and C three-phase current waveforms output by the inverter for fault analysis.
[0026] Preferably, it is characterized in that
[0027] The step 4 comprises:
[0028] Step 401, determine the local maximum and minimum of the input signal, that is, the A-phase current signal X(t), which are recorded as X(i)max, X(j)min, i, j∈{1, 2, 3, ..., n}, respectively. According to the traditional time series definition X(t), i and j are the time points of the value, and calculate the arithmetic mean m1 of the two;
[0029]
[0030] The upper and lower envelopes are generated by using the cubic spline interpolation method from X(i)max and X(j)min, respectively, and recorded as: X(t)max, X(t)min;
[0031] Step 402, use X(t) to perform difference calculation on m1, and obtain h1 as the first IMF value of EMD decomposition:
[0032] h1=X(t)-m1
[0033] Step 403, verify whether h1 satisfies the IMF value characteristics. If so, h1 is used as the first IMF value generated by EMD decomposition; if not, h1 is used as data to recalculate step 402:
[0034] h 11 =h1-m 11
[0035] Step 404, repeat the above steps k times until h appears 1k is the IMF value, expressed as:
[0036] h 1k =h 1(k1) -m 1k
[0037] Among them, h 1k is the first IMF value of step 403k, m 1k is the arithmetic mean of executing step 401k times.
[0038] Step 405, record h 1k is the first IMF value, denoted as c1:
[0039] c1=h 1k
[0040] Step 406, calculate the residual term r1:
[0041] r1=X(t)-c1
[0042] Step 407, let r1 = X(t), then r2 = r1 - c1, and so on, repeat step 406, and the result is:
[0043]
[0044] At this point, the EMD decomposition is complete, and the original signal X(t) can be expressed as the IMF component r n It is expressed as:
[0045]
[0046] Preferably, step 5 comprises:
[0047] Step 501, set the CNN convolution layer, the definition of convolution is as follows:
[0048]
[0049] Where f represents the activation function, Relu is used as the activation function, a i,j is the jth element in the i-th data of the feature map, x i,j represents the input data in row i and column j, I and F represent the number of rows and columns of the convolution kernel, and w m,n represents the weight, w b is the bias.
[0050] Step 502, set the CNN pooling layer. The function used by the pooling layer is the maximum function. The maximum function takes the maximum value in the area of the sampling window size as the value of the pooling layer, which is calculated as:
[0051]
[0052] Among them, p i,m Represents the value after pooling, a i,(m-1)s+n It represents the value corresponding to the (m-1)s+nth element in the feature map output by the convolutional layer, G represents the size of the sampling window, and s represents the size of the overlapping area of two adjacent sampling windows.
[0053] Step 503, set the CNN pooling Softmax layer. In fault diagnosis, there are 5 known fault types. The corresponding convolutional neural network output layer also has 5 neurons. The output of each neuron is represented by One-Hot encoding. In this case, the expected output should be expressed as:
[0054] In normal state (1, 0, 0, 0, 0); the first fault (0, 1, 0, 0, 0); the second fault (0, 0, 1, 0, 0); the third fault (0, 0, 1, 0, 0); the fourth fault (0, 0, 0, 1, 0); the fifth fault (0, 0, 0, 0, 1); the Softmax function is as follows:
[0055]
[0056] Among them, n is the number of neurons in the output layer, that is, the number of categories of the classification problem, Indicates the weight of each category. All values are between (0, 1), and as a normalization factor, it ensures that all and σ(z j ) is 1, σ(z j ) represents the probability of each classification.
[0057] Preferably, step 6 specifically includes the following steps:
[0058] Step 601, eigenvalue selection, select the A phase current value as the input data of EMD decomposition, and obtain a two-dimensional matrix after EMD decomposition. The matrix is transformed into 12,000 2×5 feature maps, which are divided into a training set and a test set in a ratio of 3:1, thus forming a primary eigenvalue matrix that can be used for CNN;
[0059] Step 602, construct a CNN network, use the Keras open source deep learning framework to build a CNN network structure, set two convolutional layers, the number of convolution kernels is 512, and a maximum pooling layer, the pooling size is 3;
[0060] The Relu function is used as the activation function in the convolution layer, and then two fully connected layers are added. The first fully connected layer uses the Relu function as the activation function, and the output size is set to 1024. The activation function of the last fully connected layer is set to the Softmax function, and the output size is set to 6, and 6 classifications are directly performed;
[0061] A Dropout mechanism is added between layers to prevent the model from overfitting. The Dropout parameter value is set to 0.5, which is a common value for deep learning models. The number of training times is set to 500. The model is optimized using SGD, and the learning rate is set to 0.01.
[0062] During the model training process, the early stopping method commonly used in deep learning model training is used for model evaluation, and the patience length is set to 2. That is, when the loss function of the test set no longer decreases or continues to increase in two trainings, it is determined that the model may be overfitting. The model training is stopped immediately and the current optimal model and optimal weights are saved.
[0063] The beneficial effects of the present invention are as follows: by simulating the faults of the main circuit of the photovoltaic inverter under different IGBT conditions, 6 typical branch faults are selected, the changes in their three-phase currents are observed, the A-phase current is selected as the fault observation value, and the different A-phase currents obtained are subjected to EMD decomposition to obtain the primary eigenvalue matrix. The primary eigenvalue matrix is brought into the deep learning model for deep learning training, fault classification and performance evaluation, and different A-phase current values are matched with corresponding fault types, so that the fault can be quickly judged in practice, thereby reducing the maintenance cost of the photovoltaic power station. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 It is a flow chart of the method of the present invention
[0065] Figure 2 It is the circuit diagram of photovoltaic power generation system.
[0066] Figure 3 This is the EMD-CNN photovoltaic inverter fault diagnosis classification flow chart.
[0067] Figure 4 It is a structural diagram of a convolutional neural network. DETAILED DESCRIPTION
[0068] The technical solution of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0069] A photovoltaic inverter fault diagnosis method based on deep learning, see Figure 1 , including the following steps:
[0070] Step 1: Establish a simulation system circuit of a three-phase grid-connected photovoltaic power generation system;
[0071] Photovoltaic power generation systems are divided into grid-connected photovoltaic power generation systems and independent photovoltaic power generation systems according to their structures. Figure 2 As shown, in this embodiment, a grid-connected photovoltaic power generation system is taken as an example for research.
[0072] Simulink simulation software in Matlab is used to simulate the system of 100KW photovoltaic power generation circuit. The system circuit mainly includes photovoltaic array, inverter circuit, MPPT (maximum power point tracking) control module and power grid. The system circuit is conventional and existing, and the specific structure and construction method are not repeated here.
[0073] Step 2: Simulate inverter circuit line faults for six IGBT components in the simulation system circuit;
[0074] according to Figure 3 The inverter circuit shown in the figure categorizes the single and double fault types into the following four types:
[0075] (1) There are six types of single-line faults, namely: VT1, VT2, VT3, VT4, VT5, and VT6.
[0076] (2) There are three types of faults in the same phase: VT1 and VT4, VT3 and VT6, and VT5 and VT2.
[0077] (3) There are six fault scenarios for the same half-bridge dual-line fault, namely: VT1 and VT3, VT1 and VT5, VT2 and VT4, VT2 and VT6, VT3 and VT5, VT4 and VT6.
[0078] (4) Cross-double-line fault, there are six fault situations in total, namely: VT1 and VT6, VT3 and VT4, VT4 and VT5, VT1 and VT2, VT2 and VT3, VT5 and VT6.
[0079] To avoid excessive description and repetition, only one or two faults from each fault type are selected for analysis, plus the normal state for coding, a total of six types.
[0080] Step 3: Perform simulation data collection on the inverter circuit line fault, and select the A phase current value as the fault observation value;
[0081] Fault simulation is performed for the six fault types in step 2. In this embodiment, the total system operation time is set to 0.2s, and the step length is 10 -5 s, and perform open circuit fault simulation at different positions between the start time 0s and the end time 0.2s of the operation, and take the A, B, and C three-phase current waveforms output by the inverter for fault analysis.
[0082] (1) Under normal circumstances, the system is unbalanced when it starts running, which will cause the current to increase or decrease rapidly and eventually reach a stable state. When the system is operating normally, the three-phase current is in a sinusoidal state, and the angle between each phase is 120°.
[0083] (2) When a single line fails
[0084] When VT1 fails, the current of phase A is distorted, the upper half wave is missing, and the currents of phases B and C change greatly. When VT4 fails, the lower half wave of phase A is missing, and the changes of phase B and C currents are similar to those when VT1 fails.
[0085] (3) When the same-phase dual-line fails
[0086] The A-phase current is distorted, with the upper and lower half waves missing; the B and C-phase currents are also distorted, but the waveforms are still roughly sinusoidal.
[0087] (4) When the same half-bridge dual-line fails
[0088] The currents of phases A, B, and C are all distorted, the upper half wave of phase B current is missing, and the currents of phases A and C jump and the increase is too large.
[0089] (5) When a cross-dual line fails
[0090] The A phase current is distorted, missing the upper half wave, the B phase current is missing the lower half wave, and the C phase current jumps, with the peak point exceeding the peak point of normal operation.
[0091] Since it can be found from the three-phase current waveform when the inverter fails that the current waveform of phase A changes the most in several different states, the fault can be judged with reference to the change of phase A current, and the result is more benchmark. Therefore, the phase A current value is selected as the input of the deep learning model.
[0092] Step 4: Perform EMD decomposition on the different A-phase currents obtained to obtain a primary eigenvalue matrix; specifically, the following steps are included:
[0093] The EMD (Empirical Mode Decomposition) method is used to directly decompose the original signal to obtain a series of independent components with time characteristics. The decomposition process is as follows: Figure 3 As shown in the figure. The EMD method can be applied to almost all signals and has a wide range of applications. The EMD method is an analysis and processing method based on time information, which can be well applied to time series with nonlinearity and volatility, and is conducive to the analysis and processing of data by CNN convolutional neural network.
[0094] To decompose a signal using the EMD method, the signal should meet the following two conditions:
[0095] (1) Contains a maximum point and a minimum point;
[0096] (2) The signal has time characteristics.
[0097] Step 401, determine the local maximum and minimum of the input signal X(t), respectively denoted as X(i)max, X(j)min, i, j∈{1, 2, 3, ..., n}, and calculate the arithmetic mean m1 of the two. According to the traditional time series definition X(t), i and j are the time points of the value, and the cubic spline interpolation method is used to generate the upper and lower envelopes of X(i)max, X(j)min respectively. The cubic spline interpolation method is a conventional technology and will not be described in detail, and is denoted as: X(t)max, X(t)min,
[0098]
[0099] Step 402, use X(t) to perform difference calculation on m1, and obtain h1 as the first IMF value of EMD decomposition:
[0100] h1=X(t)-m1
[0101] Step 403, verify whether h1 meets the IMF value characteristics. If so, h1 is used as the first IMF value generated by EMD decomposition; if not, h1 is used as data to recalculate step 2:
[0102] h 11 =h1-m 11
[0103] Step 404, repeat the above steps k times until h appears 1k is the IMF value, expressed as:
[0104] h 1k =h 1(k1) -m 1k
[0105] Step 405, record h 1k is the first IMF value, denoted as c1:
[0106] c1=h 1k
[0107] Step 406, calculate the residual term r1:
[0108] r1=X(t)-c1
[0109] Step 407, let r1 = X(t), then r2 = r1 - c1, and so on, repeat step 406, and the result is:
[0110]
[0111] At this point, the EMD decomposition is complete, and the original signal X(t) can be expressed as the IMF component r n It is expressed as:
[0112]
[0113] Step 5: Build a deep learning model of the convolutional neural network; specifically include the following steps:
[0114] like Figure 4 The figure shows the selection of CNN network (convolutional neural network). CNN convolutional neural network is a representative deep learning algorithm, mainly composed of input layer, convolution layer, pooling layer, fully connected layer, Softmax layer. The following steps are the functions of each layer.
[0115] Through the joint action of each layer, the convolutional neural network can better process high-dimensional data, extract important features in the image, and has strong robustness and generalization capabilities. By processing the feature map, it can well classify and identify the fault results.
[0116] Step 501, CNN convolution layer, the definition of convolution is as follows:
[0117]
[0118] Where f represents the activation function, Relu is generally used as the activation function, a i,j is the mth element in the i-th data of the feature map: x i,j Represents the input data, row i, column j, element, representing the weight, w b is the bias.
[0119] Step 502, CNN pooling layer. The function used by the pooling layer is the maximum function. The maximum function is currently the most used in convolutional neural networks. That is, the maximum value in the area of the sampling window size is taken as the value of the pooling layer, which is calculated as:
[0120]
[0121] Among them, p i,m Represents the value after pooling, a i,(m-1)s+n It represents the value corresponding to the (m-1)s+nth element in the feature map output by the convolutional layer, G represents the size of the sampling window, and s represents the size of the overlapping area of two adjacent sampling windows.
[0122] Step 503, CNN pooling Softmax layer. In fault diagnosis, we need to solve a multi-classification problem. There are 5 known fault types (including a normal state), so the corresponding convolutional neural network output layer also has 5 neurons. The output of each neuron is represented by One-Hot encoding. In this case, the expected output should be expressed as:
[0123] In normal state (1, 0, 0, 0, 0); the first fault (0, 1, 0, 0, 0); the second fault (0, 0, 1, 0, 0); the third fault (0, 0, 1, 0, 0); the fourth fault (0, 0, 0, 1, 0); the fifth fault (0, 0, 0, 0, 1); the Softmax function is as follows:
[0124]
[0125] Among them, n is the number of neurons in the output layer, that is, the number of categories in the classification problem. All values are between (0, 1), and as a normalization factor, it ensures that all and σ(z j ) is 1.
[0126] Step 6: Bring the primary eigenvalue matrix obtained in step 4 into the deep learning model constructed in step 5, perform deep learning training, fault classification and performance evaluation, and match different A-phase current values with corresponding fault types; specifically, the following steps are included:
[0127] Step 601, selection of eigenvalues. The current waveform of phase A current in several different states changes the most, so we select the current value of phase A as the input data for EMD decomposition. After EMD decomposition, a two-dimensional matrix is obtained. This matrix is transformed into 12,000 2×5 feature maps. The two are divided into a training set and a test set in a ratio of 3:1, respectively, to form a primary eigenvalue matrix that can be used for CNN.
[0128] Step 602, construct a CNN network. The present invention uses the Keras open source deep learning framework to construct the network structure of CNN, sets two convolution layers, the number of convolution kernels is 512, and a maximum pooling layer, the pooling size is 3. The Relu function is used as the activation function in the convolution layer, and then two fully connected layers are added. The first fully connected layer uses the Relu function as the activation function, and the output size is set to 1024. The activation function of the last fully connected layer is set to the Softmax function, and the output size is set to 6, and 6 classifications are directly performed. A Dropout mechanism is added between layers to prevent the model from overfitting, and the Dropout parameter value is set to 0.5, which is a commonly used value for deep learning models. The number of training times is set to 500, and the model is optimized using SGD (stochastic gradient descent), and the learning rate is set to 0.01, such as Figure 4As shown. In the process of model training, the early stopping method commonly used in deep learning model training is used for model evaluation, and the patience length is set to 2. That is, when the loss function of the test set no longer decreases or continues to increase in 2 trainings, it is determined that the model may be overfitted, and the model training is stopped immediately, and the current optimal model and optimal weights are saved. This method can improve the generalization ability of the model. It should be noted that changes in the setting of parameters during the learning process still fall within the scope of protection of the present invention.
[0129] Step 7: The accurate photovoltaic inverter fault diagnosis result can be obtained based on the A phase current value.
[0130] The present invention simulates the faults of the main circuit of the photovoltaic inverter under different IGBT conditions, selects 6 typical branch faults, observes the changes in their three-phase currents, selects the A-phase current as the fault observation value, performs EMD decomposition on the obtained different A-phase currents, obtains the primary eigenvalue matrix, brings the primary eigenvalue matrix into the deep learning model, performs deep learning training, fault classification and performance evaluation, matches different A-phase current values with corresponding fault types, and then in practice, can quickly judge faults based on data, thereby reducing the maintenance cost of the photovoltaic power station.
[0131] The preferred embodiments of the present invention are described in detail above; however, the present invention is not limited to the specific details in the above embodiments. Within the technical concept of the present invention, various equivalent transformations can be made to the technical solutions of the present invention, and these equivalent transformations all belong to the protection scope of the present invention.
Claims
1. A photovoltaic inverter fault diagnosis method based on deep learning, characterized in that: The method comprises the following steps: Step 1: Establish a simulation system circuit of a three-phase grid-connected photovoltaic power generation system; Step 2: Simulate inverter circuit line faults on six IGBT components in the simulation system circuit; Step 3: Perform simulation data collection on the inverter circuit line fault, and select the A phase current value as the fault observation value; Step 4: Perform EMD decomposition on the different A-phase currents obtained to obtain a primary eigenvalue matrix; Step 5: Build a deep learning model of convolutional neural network; Step 6: Bring the primary eigenvalue matrix obtained in step 4 into the deep learning model constructed in step 5, perform deep learning training, fault classification and performance evaluation, and match different A-phase current values with corresponding fault types; Step 7: Obtain accurate PV inverter fault diagnosis results based on the A phase current value.
2. A photovoltaic inverter fault diagnosis method based on deep learning according to claim 1, characterized in that: In the step 1, a grid-connected photovoltaic power generation system is selected to simulate a system circuit, and the simulated system circuit includes a photovoltaic array, an inverter circuit, a maximum power point tracking control module and a power grid.
3. A photovoltaic inverter fault diagnosis method based on deep learning according to claim 1, characterized in that: In step 2, the six IGBT components are VT1, VT2, VT3, VT4, VT5 and VT6. Fault classification includes single and double fault types, including the following: 1) Single-branch line faults, there are six fault scenarios in total, namely: VT1, VT2, VT3, VT4, VT5, VT6; 2) In-phase dual-line fault, there are three fault situations in total, namely: VT1 and VT4, VT3 and VT6, VT5 and VT2; 3) There are six fault scenarios for the same half-bridge dual-line fault, namely: VT1 and VT3, VT1 and VT5, VT2 and VT4, VT2 and VT6, VT3 and VT5, VT4 and VT6; 4) Cross-double-line fault, there are six fault situations in total, namely: VT1 and VT6, VT3 and VT4, VT4 and VT5, VT1 and VT2, VT2 and VT3, VT5 and VT6.
4. A photovoltaic inverter fault diagnosis method based on deep learning according to claim 3, characterized in that: The specific steps of step 3 are as follows: Fault simulation is performed for six fault types, and the total system operation time is set to 0.1-10s with a step size of 10 -5 s, and perform open-circuit fault simulations at different locations between the start and end times of the operation, and take the A, B, and C three-phase current waveforms output by the inverter for fault analysis.
5. A photovoltaic inverter fault diagnosis method based on deep learning according to claim 1, characterized in that: The step 4 comprises: Step 401, determine the local maximum and minimum of the input signal, that is, the A-phase current signal X(t), which are recorded as X(i)max, X(j)min, i, j∈{1, 2, 3, ..., n}, respectively. According to the traditional time series definition X(t), i and j are the time points of the value, and calculate the arithmetic mean m1 of the two; The upper and lower envelopes are generated by using the cubic spline interpolation method from X(i)max and X(j)min, respectively, and recorded as: X(t)max, X(t)min; Step 402, use X(t) to perform difference calculation on m1, and obtain h1 as the first IMF value of EMD decomposition: h1=X(t)-m1 Step 403, verify whether h1 satisfies the IMF value characteristics. If so, h1 is used as the first IMF value generated by EMD decomposition; if not, h1 is used as data to recalculate step 402: h 11 =h1-m 11 Step 404, repeat the above steps k times until h appears 1k is the IMF value, expressed as: h 1k =h 1(k-1) -m 1k Among them, h 1k is the first IMF value of step 403k, m 1k is the arithmetic mean of executing step 401k times; Step 405, record h 1k is the first IMF value, denoted as c1: c1=h 1k Step 406, calculate the residual term r1: r1=X(t)-c1 Step 407, let r1 = X(t), then r2 = r1 - c1, and so on, repeat step 406, and the result is: At this point, the EMD decomposition is complete, and the original signal X(t) can be expressed as the IMF component r n It is expressed as:
6. A photovoltaic inverter fault diagnosis method based on deep learning according to claim 1, characterized in that: The step 5 comprises: Step 501, set the CNN convolution layer, the definition of convolution is as follows: Where f represents the activation function, Relu is used as the activation function, a i,j is the jth element in the i-th data of the feature map, x i,j represents the input data in row i and column j, I and F represent the number of rows and columns of the convolution kernel, and w m,n represents the weight, w b is the bias. Step 502, set the CNN pooling layer. The function used by the pooling layer is the maximum function. The maximum function takes the maximum value in the area of the sampling window size as the value of the pooling layer, which is calculated as: Among them, p i,m Represents the value after pooling, a i,(m-1)s+n It represents the value corresponding to the (m-1)s+nth element in the feature map output by the convolutional layer, G represents the size of the sampling window, and s represents the size of the overlapping area of two adjacent sampling windows. Step 503, set the CNN pooling Softmax layer. In fault diagnosis, there are 5 known fault types. The corresponding convolutional neural network output layer also has 5 neurons. The output of each neuron is represented by One-Hot encoding. In this case, the expected output should be expressed as: In normal state (1, 0, 0, 0, 0); the first fault (0, 1, 0, 0, 0); the second fault (0, 0, 1, 0, 0); the third fault (0, 0, 1, 0, 0); the fourth fault (0, 0, 0, 1, 0); the fifth fault (0, 0, 0, 0, 1); the Softmax function is as follows: Among them, n is the number of neurons in the output layer, that is, the number of categories of the classification problem, Indicates the weight of each category. All values are between (0, 1), and as a normalization factor, it ensures that all and σ(z j ) is 1, σ(z j ) represents the probability of each classification.
7. A photovoltaic inverter fault diagnosis method based on deep learning according to claim 1, characterized in that: Step 6 specifically includes the following steps: Step 601, eigenvalue selection, select the A phase current value as the input data of EMD decomposition, and obtain a two-dimensional matrix after EMD decomposition. The matrix is transformed into 12,000 2×5 feature maps, which are divided into a training set and a test set in a ratio of 3:1, thus forming a primary eigenvalue matrix that can be used for CNN; Step 602, construct a CNN network, use the Keras open source deep learning framework to build a CNN network structure, set two convolutional layers, the number of convolution kernels is 512, and a maximum pooling layer, the pooling size is 3; The Relu function is used as the activation function in the convolution layer, and then two fully connected layers are added. The first fully connected layer uses the Relu function as the activation function, and the output size is set to 1024. The activation function of the last fully connected layer is set to the Softmax function, and the output size is set to 6, and 6 classifications are directly performed; A Dropout mechanism is added between layers to prevent the model from overfitting. The Dropout parameter value is set to 0.5, which is a common value for deep learning models. The number of training times is set to 500. The model is optimized using SGD, and the learning rate is set to 0.
01. During the model training process, the early stopping method commonly used in deep learning model training is used for model evaluation, and the patience length is set to 2. That is, when the loss function of the test set no longer decreases or continues to increase in two trainings, it is determined that the model may be overfitting. The model training is stopped immediately and the current optimal model and optimal weights are saved.
Citation Information
Cited By
Photovoltaic inverter fault early warning method, device, equipment and medium
CN119863917A
