Charging module open-circuit fault diagnosis method based on domain self-adaption and attention mechanism

By adopting the domain adaptation and attention mechanism method in the fault diagnosis of charging modules, the dependence problem of large amounts of labeled data and specific working conditions in the prior art is solved, and high-precision diagnosis and cost reduction under multiple working conditions are achieved.

CN120216867APending Publication Date: 2025-06-27SUN YAT SEN UNIV

Patent Information

Application Number
CN202510224519.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-27
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

The prior art has the problem of relying on a large amount of labeled data and specific working conditions in the open circuit fault diagnosis of charging modules, resulting in a decrease in diagnostic accuracy under various working conditions and a higher cost.

Method used

The fault diagnosis method based on domain adaptation and attention mechanism is adopted, and a fault diagnosis model that adapts to multiple working conditions is constructed through dynamic feature weight allocation and cross-domain feature alignment to reduce the dependence on the target domain annotation data.

Benefits of technology

High-precision fault diagnosis under different working conditions is achieved, which significantly reduces the labeling cost of target domain data and improves the adaptability and efficiency of diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120216867A_ABST
    Figure CN120216867A_ABST
Patent Text Reader

Abstract

The invention discloses a charging module open-circuit fault diagnosis method based on domain self-adaption and an attention mechanism, and the method comprises the steps: collecting the operation data of a charging power module under different working conditions, carrying out the segmentation through a moving sliding window, carrying out the standardization processing of the data, and generating a training set and a test set; establishing a fault diagnosis model which comprises a feature extractor, a source domain classifier and a target domain classifier; inputting the source domain data in the training set into a fault diagnosis model for pre-training, inputting the target domain data in the training set into a pre-training model, optimizing the parameters of the target domain classifier by minimizing the maximum difference of the multi-core mean values of the parameters of each layer of the source domain classifier and the target domain classifier, and generating a fault diagnosis model adapted to the target domain data; and the test set is input into the fault diagnosis model for testing, so that accurate diagnosis of the open-circuit fault of the power switch tube of the charging power supply module under different working conditions is realized, and the maintenance speed and the equipment safety are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of fault diagnosis, and particularly relates to an open - circuit fault diagnosis method for a charging module based on domain adaptation and attention mechanism. Background Technique

[0002] With the rapid development of the electric vehicle industry, the number and scale of charging piles are constantly increasing. To ensure the reliable charging of electric vehicles, the reliable operation of charging piles is crucial. In a charging pile, the switching devices of the power converter module are prone to open - circuit and short - circuit faults due to high voltage stress and large current carrying. Among them, open - circuit faults are more difficult to diagnose than short - circuit faults because open - circuit faults do not immediately cause the system to collapse but will affect performance.

[0003] Existing methods are divided into traditional open - circuit fault diagnosis methods and machine learning methods. Traditional open - circuit fault diagnosis methods are mainly divided into two types: hardware - based and mathematical - model - based. The mathematical - model - based method needs to input the input signal into a simplified space vector model or observer and compare it with a set threshold to diagnose open - circuit faults. Since the threshold is selected by experience, the design of the control algorithm and changes in the external environment are likely to affect the diagnosis result. In addition, almost all hardware - based technologies require inserting new sensors into the circuit or changing the position of existing sensors, resulting in a large cost burden.

[0004] Machine learning methods do not require establishing or simplifying a mathematical model. However, they rely on a large amount of labeled data and are only effective under specific working conditions. Once the working conditions such as working voltage and load change, the parameters of the diagnosis model need to be readjusted. In practical applications, it is often unrealistic to obtain sufficient labeled data for all working conditions, and the module often works under changing working conditions, resulting in a decrease in diagnosis accuracy. Therefore, it is particularly important to develop a fault diagnosis method that does not require a large amount of labeled data and can adapt to various working conditions. Summary of the Invention

[0005] The main purpose of the present invention is to overcome the disadvantages and deficiencies of the prior art, and provide an open - circuit fault diagnosis method for a charging module based on domain adaptation and attention mechanism. Through dynamic feature weight assignment and cross - domain feature alignment, high - precision fault diagnosis is achieved, reducing the dependence on labeled data in the target domain.

[0006] To achieve the above purpose, the present invention adopts the following technical solutions:

[0007] In the first aspect, the present invention provides an open - circuit fault diagnosis method for a charging module based on domain adaptation and attention mechanism, including the following steps:

[0008] Obtain the operation data of the charging pile under different working conditions, use a sliding window to segment the operation data, and obtain multiple segments of data samples; preprocess the data samples to generate a three-dimensional feature map and divide it into a training set and a test set according to a certain proportion; the training set includes source domain data and target domain data;

[0009] Construct a fault classification model, including a feature extractor, a source domain classifier, and a target domain classifier; use the feature extractor to extract features from the source domain data to obtain source domain features, input the source domain features into the source domain classifier to pre-train the fault classification model, and optimize the parameters of the feature extractor and the source domain classifier by minimizing the cross-entropy loss to obtain a pre-trained fault classification model; freeze the shallow parameters of the feature extractor, input the target domain data into the feature extractor to obtain target domain features, input the target domain features into the pre-trained fault classification model, align the target domain features and the source domain features by setting a loss function, and fine-tune the deep parameters of the feature extractor and the parameters of each layer of the target domain classifier to obtain a fault diagnosis model adapted to the target domain;

[0010] Input the test set into the fault diagnosis model adapted to the target domain for testing, and evaluate the performance of the test results.

[0011] As a preferred technical solution, the preprocessing of the data samples is specifically as follows:

[0012] Perform standardization processing on each data sample and convert it into a three-dimensional feature map of H×W×C, where H and W are the length and width of the feature map, and C is the number of channels of the feature map.

[0013] As a preferred technical solution, the feature extractor includes a channel attention module, and the channel attention module includes a global max pooling layer, a global average pooling layer, two convolutional layers, and an activation function layer.

[0014] As a preferred technical solution, the use of the feature extractor to extract features from the source domain data to obtain source domain features is specifically as follows:

[0015] The feature extractor performs global max pooling and global average pooling on the input source domain data, respectively obtains the maximum value and the average value of each channel, and generates two feature maps of 1×1×C;

[0016] Among them, the calculation of the max pooling layer for each dimension is as follows:

[0017]

[0018] The calculation of the average pooling layer is as follows:

[0019]

[0020] Where R ijis the pooling region corresponding to the feature map position (i, j), mp i,j represents the output of the max pooling layer at the feature map position (i, j), F k,l is the value ap of the input feature map at the position (k, l) i,j is the pooling region R ij is the average pooling result of, |R ij | represents the total number of elements in the pooling region R ij ;

[0021] Two feature maps of 1×1×C are respectively input into the first convolutional layer, as follows:

[0022]

[0023] where, kernel m,n represents the convolutional kernel of size m*n, f mij and f aij are respectively the outputs after the first convolutional layer extracts the outputs of the max pooling layer and the average pooling layer;

[0024] The output of the first convolutional layer is activated by ReLu, f mij and f aij The outputs γ mij and γ aij after being activated by ReLu, as follows:

[0025] γ mij = max(0, f mij );

[0026] γ aij = max(0, f aij );

[0027] γ mij and γ aij are input into the second convolutional layer, and the outputs are c mij and c aij as follows:

[0028]

[0029] Sum c mij and c aij and use the sigmoid activation function to obtain the data feature t ij generated under the channel attention mechanism, and the calculation formula is as follows:

[0030]

[0031] Flatten the obtained two-dimensional data feature t ij to obtain a one-dimensional data feature f ij, obtain the final channel attention feature, i.e., the source domain feature.

[0032] As a preferred technical solution, the source domain classifier includes two fully connected layers, as follows:

[0033]

[0034] where f s1_k 、f s2_k are the outputs of the first and second fully connected layers of the k-th feature f k input to the source domain classifier respectively, and w1, b1, w2, b2 are the weight and bias parameters of the first and second layers respectively.

[0035] As a preferred technical solution, the source domain classifier has the same structure as the target domain classifier.

[0036] As a preferred technical solution, input the source domain feature into the source domain classifier to pre-train the fault classification model, and optimize the parameters of the feature extractor and the source domain classifier by minimizing the cross-entropy loss. Specifically:

[0037] Input the source domain feature into the source domain classifier, use the cross-entropy function to calculate the difference between the predicted label and the actual label, and train the parameters of the feature extractor and the source domain classifier by minimizing the cross-entropy loss function. The cross-entropy loss function is defined as follows;

[0038]

[0039] where is the predicted category of the model, and y is the true category of the sample.

[0040] As a preferred technical solution, freeze the shallow parameters of the feature extractor, specifically: freeze the parameters of the global max pooling layer, global average pooling layer and the first convolutional layer of the feature extractor.

[0041] As a preferred technical solution, align the target domain feature and the source domain feature by setting a loss function, and fine-tune the deep parameters of the feature extractor and the parameters of each layer of the target domain classifier. Specifically:

[0042] Use the multi-kernel maximum mean discrepancy to measure the distribution difference between the source domain data and the target domain data, and minimize the distribution difference between the source domain data and the target domain data in the Hilbert space by minimizing the multi-kernel maximum mean discrepancy loss of the source domain and target domain features.

[0043] As a preferred technical solution, it further includes:

[0044] In multi-kernel maximum mean discrepancy, the Gaussian kernel function is used to embed the data features between the source domain and the target domain, and the kernel matrix for measuring the similarity between the source domain and the target domain data is calculated. Each kernel maximum mean discrepancy is as follows:

[0045]

[0046] K(x,y) = exp(-2σ 2 ||x - y|| 2 );

[0047] where XX and YY are the maximum mean differences of the source domain and the target domain respectively, XY and YX are the maximum mean differences of the source domain and the target domain, x i and x j are source domain data samples, y i and y j are target domain data samples, n s and n t are the number of samples in the source domain and the target domain respectively, K is the multi-kernel Gaussian kernel function, ||x - y|| 2 represents the square of the Euclidean distance between two data samples, and σ is the bandwidth parameter of the kernel function, which is used to control the width of the Gaussian distribution;

[0048] The multi-kernel maximum mean discrepancy loss function is defined as follows:

[0049]

[0050] where m is the number of kernel functions, s i represents the output of the source domain samples at the i-th fully connected layer of the source domain classifier, and t i represents the output of the target domain samples at the i-th fully connected layer of the target domain classifier;

[0051] By minimizing loss Guassian , the parameters of the second convolutional layer of the feature extractor and the parameters of the target domain classifier are fine-tuned to obtain a fault diagnosis model adapted to the target domain.

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

[0053] By the attention mechanism, different channel weights are assigned to samples, focusing on key signals and improving the diagnosis accuracy. By minimizing the multi-kernel maximum mean discrepancy loss between the source domain and the target domain, the feature alignment between the source domain and the target domain is achieved, enabling the model to achieve high diagnosis accuracy under different working conditions and significantly reducing the annotation cost of the target domain data. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] To more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the accompanying drawings required for the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.

[0055] Figure 1 This is a flowchart of the open - circuit fault diagnosis method for the charging module based on domain adaptation and attention mechanism in the embodiments of the present invention.

[0056] Figure 2 This is a schematic diagram of the topology structure of the charging module in the embodiments of the present invention.

[0057] Figure 3 This is a framework diagram of the fault diagnosis model in the embodiments of the present invention.

[0058] Figure 4 This is a framework diagram of the channel attention mechanism in the embodiments of the present invention. Detailed implementation manners

[0059] In order to enable those skilled in the art of this technology to better understand the solutions of the present application, the following will clearly and completely describe the technical solutions in the embodiments of the present application in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present application.

[0060] Referring to "embodiments" in the present application means that the specific features, structures, or characteristics described in conjunction with the embodiments may be included in at least one embodiment of the present application. The phrase appears at various positions in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art explicitly and implicitly understand that the embodiments described in the present application can be combined with other embodiments.

[0061] Multicore Maximum Mean Discrepancy (MK - MMD) is an extension of MMD. By combining multiple kernel functions, it improves the sensitivity and robustness of the distribution difference measurement and is suitable for tasks that require fine - grained distribution alignment.

[0062] Embodiment 1.

[0063] Please refer to Figure 1 , this embodiment provides an open - circuit fault diagnosis method for the charging module based on domain adaptation and attention mechanism, including the following steps:

[0064] S1. Obtain the operation data of the charging pile under different working conditions, use a sliding window to segment the operation data, and obtain multiple segments of data samples; perform standardization processing on each data sample to generate a three-dimensional feature map of H×W×C and divide it into a training set and a test set according to a certain proportion, where H and W are the length and width of the feature map, and C is the number of channels of the feature map.

[0065] According to the working condition types of the charging modules, in this embodiment, the training set is divided into source domain data and target domain data, which are respectively used for pre-training the feature extractor and the source domain classifier, and fine-tuning the feature extractor and the target domain classifier. For the above-mentioned feature extractor, source domain classifier and target domain classifier, please refer to step S2 for details.

[0066] S2. Construct a fault classification model, including a feature extractor, a source domain classifier and a target domain classifier; use the feature extractor to extract features from the source domain data to obtain source domain features, input the source domain features into the source domain classifier to pre-train the fault classification model, and optimize the parameters of the feature extractor and the source domain classifier by minimizing the cross-entropy loss to obtain a pre-trained fault classification model; freeze the shallow parameters of the feature extractor, input the target domain data into the feature extractor to obtain target domain features, input the target domain features into the pre-trained fault classification model, align the target domain features and the source domain features by setting a loss function, and fine-tune the deep parameters of the feature extractor and the parameters of each layer of the target domain classifier to obtain a fault diagnosis model adapted to the target domain.

[0067] As Figures 3 - 4 shown, in this embodiment, there is a channel attention module in the feature extractor. This channel attention module includes a global max pooling layer, a global average pooling layer, two convolutional layers and an activation function layer. The source domain classifier and the target domain classifier have the same structure and are both composed of two fully connected layers. Taking the source domain classifier as an example, the calculation formula is as follows:

[0068]

[0069] where f s1_k and f s2_k are respectively the outputs of the kth feature f k input into the first and second fully connected layers of the source domain classifier, and w1, b1, w2, and b2 are the weight and bias parameters of the first and second layers respectively.

[0070] Specifically, in the process of extracting features from the source domain data, the feature extractor performs global max pooling and global average pooling on the input source domain data to respectively obtain the maximum value and the average value of each channel, and generates two feature maps of 1×1×C;

[0071] Among them, the calculation of the max pooling layer for each dimension is as follows:

[0072]

[0073] The average pooling layer is calculated as follows:

[0074]

[0075] where R ij is the pooling region corresponding to the feature map position (i, j), and mp i,j represents the output of the max pooling layer at the feature map position (i, j), and F k,l is the value of the input feature map at the position (k, l), and ap i,j is the average pooling result of the pooling region R ij , and |R ij | represents the total number of elements in the pooling region R ij ;

[0076] Two feature maps of 1×1×C are respectively input into the first convolutional layer as follows:

[0077]

[0078] where kernel m,n represents the convolutional kernel of size m*n, and f mij and f aij are respectively the outputs after being extracted by the first convolutional layer from the outputs of the max pooling layer and the average pooling layer;

[0079] The output of the first convolutional layer is activated by ReLu, and f mij and f aij The outputs γ mij and γ aij after being activated by ReLu are as follows:

[0080] γ mij = max(0, f mij );

[0081] γ aij = max(0, f aij );

[0082] γ mij and γ aij are input into the second convolutional layer, and the outputs are c mij and c aij as follows:

[0083]

[0084] For c mij and c aijPerform summation and use the sigmoid activation function to obtain the data feature t generated under the channel attention mechanism ij , and the calculation formula is as follows:

[0085]

[0086] Finally, flatten the obtained two-dimensional data feature t ij to obtain a one-dimensional data feature f ij , and obtain the final channel attention feature, that is, the source domain feature.

[0087] Next, in this embodiment, the source domain feature is input into the source domain classifier to pre-train the fault classification model, and the parameters of the feature extractor and the source domain classifier are optimized by minimizing the cross-entropy loss. Specifically:

[0088] Input the source domain feature into the source domain classifier, use the cross-entropy function to calculate the difference between the predicted label and the actual label, and train the parameters of the feature extractor and the source domain classifier by minimizing the cross-entropy loss function. The cross-entropy loss function is defined as follows;

[0089]

[0090] where is the predicted category of the model, and y is the true category of the sample.

[0091] Specifically, after completing the pre-training of the fault diagnosis model, in order to adapt to the target domain, in this embodiment, the parameters of the max pooling layer, average pooling layer, and first convolutional layer in the feature extractor are frozen, and the target domain data in the training set is input into the feature extractor and the target domain classifier for training. The parameters of the deep layer of the feature extractor and the target domain classifier are fine-tuned by minimizing the MK-MMD loss to align the target domain and the source domain features. The specific steps include:

[0092] In the multi-kernel maximum mean difference, use the Gaussian kernel function to embed the data features between the source domain and the target domain, calculate the kernel matrix that measures the similarity between the source domain and the target domain data, and each kernel maximum mean difference is as follows:

[0093]

[0094] K(x,y) = exp(-2σ 2 ||x - y|| 2 );

[0095] where XX and YY are the maximum mean differences of the source domain and the target domain respectively, XY and YX are the maximum mean differences of the source domain and the target domain, x i and x j are source domain data samples, y i and y jis a data sample of the target domain, n s and n t are the number of samples in the source domain and the target domain respectively. K is the multi-kernel Gaussian kernel function, and ||x - y|| 2 represents the square of the Euclidean distance between two data samples. σ is the bandwidth parameter of the kernel function, which is used to control the width of the Gaussian distribution;

[0096] The multi-kernel maximum mean discrepancy loss function is defined as follows:

[0097]

[0098] where m is the number of kernel functions, and s i represents the output of the source domain samples at the i-th fully connected layer of the source domain classifier, and t i represents the output of the target domain samples at the i-th fully connected layer of the target domain classifier;

[0099] By minimizing loss Guassian , fine-tune the parameters of the second convolutional layer of the feature extractor and the parameters of the target domain classifier to obtain a fault diagnosis model adapted to the target domain.

[0100] After completing the above training, test the fault diagnosis model adapted to the target domain with the test set, as in step S3.

[0101] S3. Input the test set into the fault diagnosis model adapted to the target domain for testing, and evaluate the performance of the test results.

[0102] Example 2.

[0103] Step 1: Obtain the operation data of the charging power supply module under different working conditions, and divide the operation data through a moving sliding window to obtain multiple segments of data samples;

[0104] The topology of the charging power supply module is as Figure 2 shown, which shows the circuit structures of the front-end AC-DC Vienna rectifier and the back-end full-bridge LLC resonant DC-DC converter. The front-stage AC-DC is a three-phase VIENNA rectifier structure. In the figure, U a , U b , U c are the three-phase grid voltages, L a , L b , L c are the same filter inductors, C1 and C2 are filter capacitors, the back-stage DC-DC is a full-bridge LLC resonant converter structure. In the figure, L r , C r are the resonant inductor and the resonant capacitor respectively, C3 is the back-stage output filter capacitor, R2 is the load resistor, and Q1 to Q 10 are 10 power switching tubes in the charging power supply module circuit.

[0105] The experimental device used in this embodiment includes a PC controller, a three-phase AC power supply, a charging module, an eight-channel oscilloscope, and a load. The IGBT model in the Vienna circuit is Xiner XNS40N60TH, and the MOSFET model in the LLC circuit is CREEC3M0040120K. The digital signal processor (DSP) TMS320F28034 (DSP) chip is used to control the Vienna and LLC circuits.

[0106] The parameters of the charging module are shown in Table 1:

[0107] Table 1 Charging Module Parameters

[0108]

[0109] Four types of fault are considered in this embodiment, as shown in Table 2:

[0110] Table 2 Open-Circuit Fault Classification of Charging Module

[0111]

[0112] The sample ratio of these four types of faults is 3:1:1:1.

[0113] Under four working conditions, four data sets are collected on this experimental platform. Each data set contains the four types of faults in Table 2, and the ratio of each type is the same. The working conditions are as follows:

[0114] Working condition A: The output voltage is 500V, and the load power is 20kW;

[0115] Working condition B: The output voltage is 500V, and the load power is 24kW;

[0116] Working condition C: The output voltage is 500V, and the load power is 12kW;

[0117] Working condition D: The output voltage is 300V, and the load power is 20kW.

[0118] In the embodiment of the present invention, an open-circuit fault of the power switch tube is simulated by setting the drive signal to zero, and the three-phase input current, resonant capacitor voltage, and DC output voltage waveforms from normal to faulty are captured by the oscilloscope at a sampling frequency of 20kHz. The moving window length is set to 10ms, and the window interval is 0.5ms. The above waveform data is segmented, and multiple short data samples with a time length of 10ms are obtained for each fault category. Each sample contains 200×5 data points.

[0119] Step 2: Standardize the waveform signal, divide the dataset into a training set and a test set, and convert each sample into a three-dimensional feature map of H×W×C, where C is the number of channels, which is 5 in this embodiment.

[0120] Step 3: Construct a fault classification model as Figure 3 shown, the framework diagram of the channel attention model is as Figure 4 shown, where the network parameters of the feature extractor with a channel attention mechanism are set as shown in Table 3:

[0121] Table 3 Parameters of the feature extractor

[0122]

[0123] The network parameters of the source domain classifier and the target domain classifier are set as shown in Table 4:

[0124] Table 4 Parameters of the classifier

[0125]

[0126] Step 4: Input the source domain data in the training set into the feature extractor and the source domain classifier for pre-training, and optimize the model parameters by minimizing the cross-entropy loss. The cross-entropy loss function is defined as follows:

[0127]

[0128] where is the predicted class of the model, and y is the true class of the sample.

[0129] Step 5: Freeze the parameters of the max pooling layer, average pooling layer, and convolutional layer 1 of the feature extractor. Input the target domain data in the training set into the feature extractor and the target domain classifier, and align the target domain and source domain features by minimizing the multi-kernel maximum mean discrepancy loss to obtain the parameters of convolutional layer 2 of the fine-tuned feature extractor and each layer of the target domain classifier, and generate a fault diagnosis model adapted to the target domain;

[0130] Step 6: To verify the outstanding performance of this method, taking N-type fault diagnosis as an example, it is compared with three mainstream domain adaptation methods. The highest accuracy of the transfer tasks of each model under different working conditions is shown in Table 5.

[0131] Table 5 Comparison of the accuracies of different transfer learning models

[0132]

[0133] Through experimental verification, the proposed method can maintain high-precision diagnosis under different working conditions and reduce the dependence on labeled data in the target domain.

[0134] It should be noted that for the foregoing method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously.

[0135] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.

[0136] The above embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications made without departing from the spirit and principle of the present invention shall be equivalent replacement methods and are all included in the protection scope of the present invention.

Claims

1. A charging module open circuit fault diagnosis method based on domain adaptation and attention mechanism, characterized in that: The steps include: Obtaining the operating data of the charging pile under different working conditions, segmenting the operating data using a sliding window, and obtaining multiple data samples; preprocessing the data samples, generating a three-dimensional feature map, and dividing the data into a training set and a test set in proportion; the training set includes source domain data and target domain data; Construct a fault classification model, including a feature extractor, a source domain classifier, and a target domain classifier; use the feature extractor to extract features from the source domain data to obtain source domain features, input the source domain features into the source domain classifier to pre-train the fault classification model, optimize the parameters of the feature extractor and the source domain classifier by minimizing the cross entropy loss, and obtain the pre-trained fault classification model; freeze the shallow parameters of the feature extractor, input the target domain data into the feature extractor, obtain the target domain features, input the target domain features into the pre-trained fault classification model, align the target domain features with the source domain features by setting the loss function, and fine-tune the deep parameters of the feature extractor and the parameters of each layer of the target domain classifier to obtain a fault diagnosis model adapted to the target domain; The test set is input into the fault diagnosis model adapted to the target domain for testing, and the performance of the test results is evaluated.

2. The method for diagnosing open circuit faults of charging modules based on domain adaptation and attention mechanism according to claim 1 is characterized in that: The preprocessing of the data samples is specifically as follows: Each data sample is standardized and converted into a three-dimensional feature map of H×W×C, where H and W are the length and width of the feature map, and C is the number of channels of the feature map.

3. The method for diagnosing open circuit faults of charging modules based on domain adaptation and attention mechanism according to claim 1 is characterized in that: The feature extractor includes a channel attention module, which includes a global maximum pooling layer, a global average pooling layer, two convolutional layers and an activation function layer.

4. The method for diagnosing open circuit faults of charging modules based on domain adaptation and attention mechanism according to claim 3 is characterized in that: The feature extractor is used to extract features from the source domain data to obtain source domain features, specifically: The feature extractor performs global maximum pooling and global average pooling on the input source domain data, obtains the maximum value and average value of each channel respectively, and generates two 1×1×C feature maps; Among them, the maximum pooling layer calculation of each dimension is as follows: The average pooling layer is calculated as follows: Where R ij is the pooling area corresponding to the feature map position (i, j), mp i,j represents the output of the maximum pooling layer at the feature map position (i, j), F k,l is the value ap of the input feature map at position (k, l) i,j is the pooling region R ij The average pooling result of |R ij | represents the pooling area R ij The total number of elements in ; The two 1×1×C feature maps are input into the first convolutional layer respectively, as follows: Among them, kernel m,n represents a convolution kernel of size m*n, f mij and f aij They are the outputs of the maximum pooling layer output and the average pooling layer output extracted by the first convolutional layer; The output of the first convolutional layer is activated by ReLu, f mij and f aij The output γ after ReLu activation mij and γ aij , as follows: c mij =max(0,f mij ); c aij =max(0,f aij ); Will γ mij and γ aij Input the second convolutional layer, the output is c mij and c aij , as follows: C mij and c aij Sum and use the sigmoid activation function to get the data feature t generated under the channel attention mechanism ij , the calculation formula is as follows: The obtained two-dimensional data features t ij Flatten to obtain one-dimensional data features f ij , obtain the final channel attention features, i.e., source domain features.

5. The method for diagnosing open circuit faults of charging modules based on domain adaptation and attention mechanism according to claim 1 is characterized in that: The source domain classifier includes two fully connected layers, as shown below: where f s1_k 、f s2_k are the kth feature f k The outputs of the first and second fully connected layers of the input source domain classifier are used. w1, b1, w2, and b2 are the weights and bias parameters of the first and second layers, respectively.

6. The method for diagnosing open circuit faults of charging modules based on domain adaptation and attention mechanism according to claim 1, characterized in that: The structure of the source domain classifier is consistent with that of the target domain classifier.

7. The method for diagnosing open circuit faults of charging modules based on domain adaptation and attention mechanism according to claim 1, characterized in that: The source domain features are input into the source domain classifier to pre-train the fault classification model, and the parameters of the feature extractor and the source domain classifier are optimized by minimizing the cross entropy loss, specifically: The source domain features are input into the source domain classifier, and the cross entropy function is used to calculate the difference between the predicted label and the actual label. The parameters of the feature extractor and the source domain classifier are trained by minimizing the cross entropy loss function. The cross entropy loss function is defined as follows; in is the predicted category of the model, and y is the true category of the sample.

8. The method for diagnosing open circuit faults of charging modules based on domain adaptation and attention mechanism according to claim 1, characterized in that: The shallow parameters of the frozen feature extractor are specifically: parameters of the global maximum pooling layer, the global average pooling layer and the first convolutional layer of the frozen feature extractor.

9. The method for diagnosing open circuit faults of charging modules based on domain adaptation and attention mechanism according to claim 1, characterized in that: The target domain features and source domain features are aligned by setting the loss function, and the deep parameters of the feature extractor and the parameters of each layer of the target domain classifier are fine-tuned, specifically: The multi-kernel maximum mean difference is used to measure the distribution difference between the source domain data and the target domain data, and the distribution difference between the source domain data and the target domain data in the Hilbert space is minimized by minimizing the multi-kernel maximum mean difference loss of the source domain and target domain features.

10. The method for diagnosing open circuit faults of a charging module based on domain adaptation and attention mechanism according to claim 9, characterized in that: Also includes: In the multi-core maximum mean difference, the Gaussian kernel function is used to embed the data features between the source domain and the target domain, and the kernel matrix that measures the similarity between the source domain and the target domain data is calculated. The maximum mean difference of each kernel is as follows: K(x,y)=exp(-2σ 2 ||x-y|| 2 ); Among them, XX and YY are the maximum mean differences between the source domain and the target domain, XY and YX are the maximum mean differences between the source domain and the target domain, and x i and x j is the source domain data sample, y i and j is the target domain data sample, n s and n t are the number of samples in the source and target domains, respectively, K is the multi-kernel Gaussian kernel function, ||xy|| 2 represents the square of the Euclidean distance between two data samples, σ is the bandwidth parameter of the kernel function, which is used to control the width of the Gaussian distribution; The multi-core maximum mean difference loss function is defined as follows: Where m is the number of kernel functions, s i represents the output of the source domain sample in the i-th fully connected layer of the source domain classifier, t i Represents the output of the target domain sample in the i-th fully connected layer of the target domain classifier; By minimizing the loss Guassian , fine-tune the parameters of the second convolutional layer of the feature extractor and the parameters of the target domain classifier to obtain a fault diagnosis model adapted to the target domain.

Citation Information

Patent Citations

  • Double-branch convolutional neural network motor imagery intention decoding method based on adaptive transfer learning

    CN117193537A

  • Long-term service elevator guide rail fault diagnosis method based on transfer learning and data driving

    CN117312962A

  • Multi-classifier fine-grained bearing fault diagnosis field adaptive method and system

    CN117871101A

Cited By

  • Multi-phase power supply control method and electronic equipment

    CN121560144A