Training method, device, equipment and medium for wind turbine fault diagnosis model
By using sub-training sets to train binary classifiers and multi-classifiers in the wind turbine fault diagnosis model, and alternately training the discriminator and the comprehensive classifier, the problem of poor model generalization ability in the existing technology is solved, and more efficient fault detection accuracy and generalization ability are achieved.
Patent Information
- Application Number
- CN202410990011.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2044-07-23
AI Technical Summary
The existing technology of data expansion based on the generative adversarial network algorithm has high time and computing resource costs, and the quality issues of the expanded sample data affect the accuracy of the fault classification model, resulting in poor generalization ability of the wind turbine fault diagnosis model.
By obtaining a sample data set and dividing it into training set, validation set and test set, binary classifiers and multi-classifiers are trained based on the sub-training set to construct a candidate wind turbine fault diagnosis model. By alternately training the discriminator and the comprehensive classifier, the model parameters are optimized until the verification conditions are met, thereby improving the model generalization ability.
The generalization ability and fault detection accuracy of the wind turbine fault diagnosis model are improved, and the computing resource consumption and model training time are reduced.
Smart Images

Figure CN118940035B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of fault detection, and in particular to a training method, device, equipment and medium for a wind turbine generator set fault diagnosis model. Background Art
[0002] Wind power is one of the fastest-growing renewable energy sources in the world. With the continued growth of its power generation and installed capacity, as well as the continuous development and large-scale application of wind power technology, ensuring the efficient, stable, and safe operation of wind power equipment has become a core concern of the industry. Therefore, the ability to detect and classify wind power equipment faults in a timely and effective manner is directly related to the operational efficiency of wind farms, the maintenance costs of equipment, and the safety of the entire system.
[0003] Currently, existing technologies generally obtain original sample data collected by a set of sensors on wind power equipment, and expand the original sample data based on a generative adversarial network algorithm, thereby training a learning model for fault classification based on the expanded sample data.
[0004] However, data expansion based on the generative adversarial network algorithm is time- and computationally expensive, prone to mode collapse, and the expanded sample data may have quality issues, affecting the fault classification accuracy of the fault classification model obtained based on the expanded sample data. Summary of the Invention
[0005] The present invention provides a training method, device, equipment and medium for a wind turbine fault diagnosis model to solve the problem of poor generalization ability of the wind turbine fault diagnosis model and improve the generalization ability and fault detection accuracy of the fault detection model.
[0006] According to one aspect of the present invention, a method for training a wind turbine fault diagnosis model is provided, comprising:
[0007] Obtaining a sample data set, a wind turbine fault diagnosis model to be trained, and a discriminator to be trained, wherein the sample data set includes multiple sample data items, each sample data item includes fault feature sample data and a one-hot code label corresponding to the fault feature sample data; the wind turbine fault diagnosis model includes multiple binary classifiers, a multi-classifier, and a comprehensive classifier;
[0008] Divide the sample data set into training set, validation set and test set;
[0009] The training set is divided based on the unique-hot label of each class to obtain multiple sub-training sets, and the unique-hot label of each sample data item in each sub-training set is replaced by 1;
[0010] Based on the sub-training set, the binary classifier corresponding to the sub-training set is trained to obtain a trained binary classifier, and the credibility of the temperature and humidity interval corresponding to the trained binary classifier in each temperature and humidity interval is recorded, and a multi-classifier is trained based on the training set to obtain a trained multi-classifier;
[0011] Based on the comprehensive classifier to be trained, the trained binary classifier and the trained multi-classifier, a candidate wind turbine fault diagnosis model is constructed; and based on the validation set, the discriminator and the comprehensive classifier in the candidate wind turbine fault diagnosis model are alternately trained to obtain a trained candidate wind turbine fault diagnosis model;
[0012] The trained candidate wind turbine fault diagnosis model is verified based on the test set. If the verification fails, the wind turbine fault diagnosis model is retrained until a trained wind turbine fault diagnosis model is obtained; the trained wind turbine fault diagnosis model is the candidate wind turbine fault diagnosis model that passes the verification;
[0013] Among them, the discriminator and the comprehensive classifier in the candidate wind turbine fault diagnosis model are alternately trained based on the validation set to obtain the trained candidate wind turbine fault diagnosis model, including:
[0014] For each sample data item in the validation set, binary classification processing is performed on the sample data item based on a binary classifier in an untrainable state to obtain a first classification result corresponding to the sample data item, and first input information of the comprehensive classifier is determined based on the first classification results respectively corresponding to the multiple binary classifiers, and second input information of the comprehensive classifier is determined based on the temperature and humidity interval credibility of the multiple binary classifiers in the temperature and humidity interval to which the sample data item belongs, and multi-classification processing is performed on the sample data item based on the multi-classifier in the untrainable state to obtain a second classification result corresponding to the sample data item, and the second classification result is determined as third input information of the comprehensive classifier;
[0015] During the training process of the discriminator training phase: based on the comprehensive classifier in the untrainable state, the first input information, the second input information and the third input information are predicted and processed to obtain a third classification result; based on the discriminator in the trainable state, the authenticity judgment result of the third classification result is determined; based on the authenticity judgment results of the third classification results corresponding to multiple sample data items in the verification set, the first discriminator loss function is determined; based on the discriminator in the trainable state, the authenticity judgment result of each unique hot code label in the verification set is determined; based on the authenticity judgment results of the unique hot code labels corresponding to multiple sample data items in the verification set, the second discriminator loss function is determined; based on the first discriminator loss function and the second discriminator loss function, the total discriminator loss function is determined; and the parameters of the discriminator are adjusted based on the total discriminator loss function;
[0016] During the training process of the comprehensive classifier training phase: based on the comprehensive classifier in a trainable state, the first input information, the second input information and the third input information are predicted and processed to obtain a third classification result; based on the discriminator in an untrainable state, the authenticity judgment result of the third classification result is determined; for multiple sample data items in the validation set, based on the authenticity judgment results of the third classification results corresponding to the multiple sample data items, a first comprehensive classifier loss function is determined, and based on the third classification results and the unique-hot code labels corresponding to the multiple sample data items, a second comprehensive classifier loss function is determined; based on the first comprehensive classifier loss function and the second comprehensive classifier loss function, a total comprehensive classifier loss function is determined; and based on the total comprehensive classifier loss function, the parameters of the comprehensive classifier are adjusted.
[0017] The training process of the comprehensive classifier training phase and the training process of the discriminator training phase are performed alternately until a trained candidate wind turbine fault diagnosis model is obtained.
[0018] According to another aspect of the present invention, a training device for a wind turbine fault diagnosis model is provided, comprising:
[0019] A sample data set and to-be-trained model acquisition module is used to acquire a sample data set, a wind turbine fault diagnosis model to be trained, and a discriminator to be trained. The sample data set includes multiple sample data items, each of which includes fault feature sample data and a unique-hot code label corresponding to the fault feature sample data. The wind turbine fault diagnosis model includes multiple binary classifiers, a multi-classifier, and a comprehensive classifier.
[0020] A sample data set partitioning module is used to partition the sample data set into a training set, a validation set, and a test set;
[0021] The sub-training set partitioning module is used to partition the training set based on the one-hot code label of each class to obtain multiple sub-training sets, and replace the one-hot code label of each sample data item in each sub-training set with 1;
[0022] The binary classifier and multi-classifier training module is used to train the binary classifier corresponding to the sub-training set based on the sub-training set to obtain a trained binary classifier, record the temperature and humidity interval credibility of the trained binary classifier in each temperature and humidity interval, and train the multi-classifier based on the training set to obtain a trained multi-classifier;
[0023] a candidate wind turbine fault diagnosis model training module, configured to construct a candidate wind turbine fault diagnosis model based on the integrated classifier to be trained, the trained binary classifier, and the trained multi-classifier, and to alternately train the discriminator and the integrated classifier in the candidate wind turbine fault diagnosis model based on a validation set to obtain a trained candidate wind turbine fault diagnosis model;
[0024] The candidate wind turbine fault diagnosis model verification module is used to verify the trained candidate wind turbine fault diagnosis model based on the test set. If the verification fails, the wind turbine fault diagnosis model is retrained until a trained wind turbine fault diagnosis model is obtained; the trained wind turbine fault diagnosis model is the candidate wind turbine fault diagnosis model that passes the verification;
[0025] Among them, the candidate wind turbine fault diagnosis model training module is specifically used to:
[0026] For each sample data item in the validation set, binary classification processing is performed on the sample data item based on a binary classifier in an untrainable state to obtain a first classification result corresponding to the sample data item, and first input information of the comprehensive classifier is determined based on the first classification results respectively corresponding to the multiple binary classifiers, and second input information of the comprehensive classifier is determined based on the temperature and humidity interval credibility of the multiple binary classifiers in the temperature and humidity interval to which the sample data item belongs, and multi-classification processing is performed on the sample data item based on the multi-classifier in the untrainable state to obtain a second classification result corresponding to the sample data item, and the second classification result is determined as third input information of the comprehensive classifier;
[0027] During the training process of the discriminator training phase: based on the comprehensive classifier in the untrainable state, the first input information, the second input information and the third input information are predicted and processed to obtain a third classification result; based on the discriminator in the trainable state, the authenticity judgment result of the third classification result is determined; based on the authenticity judgment results of the third classification results corresponding to multiple sample data items in the verification set, the first discriminator loss function is determined; based on the discriminator in the trainable state, the authenticity judgment result of each unique hot code label in the verification set is determined; based on the authenticity judgment results of the unique hot code labels corresponding to multiple sample data items in the verification set, the second discriminator loss function is determined; based on the first discriminator loss function and the second discriminator loss function, the total discriminator loss function is determined; and the parameters of the discriminator are adjusted based on the total discriminator loss function;
[0028] During the training process of the comprehensive classifier training phase: based on the comprehensive classifier in a trainable state, the first input information, the second input information and the third input information are predicted and processed to obtain a third classification result; based on the discriminator in an untrainable state, the authenticity judgment result of the third classification result is determined; for multiple sample data items in the validation set, based on the authenticity judgment results of the third classification results corresponding to the multiple sample data items, a first comprehensive classifier loss function is determined, and based on the third classification results and the unique-hot code labels corresponding to the multiple sample data items, a second comprehensive classifier loss function is determined; based on the first comprehensive classifier loss function and the second comprehensive classifier loss function, a total comprehensive classifier loss function is determined; and based on the total comprehensive classifier loss function, the parameters of the comprehensive classifier are adjusted.
[0029] The training process of the comprehensive classifier training phase and the training process of the discriminator training phase are performed alternately until a trained candidate wind turbine fault diagnosis model is obtained.
[0030] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0031] at least one processor; and
[0032] a memory communicatively connected to at least one processor; wherein,
[0033] The memory stores a computer program that can be executed by at least one processor. The computer program is executed by the at least one processor so that the at least one processor can execute the training method for the wind turbine fault diagnosis model of any embodiment of the present invention.
[0034] According to another aspect of the present invention, a computer-readable storage medium is provided, which stores computer instructions for enabling a processor to implement the wind turbine fault diagnosis model training method according to any embodiment of the present invention when the computer instructions are executed.
[0035] The technical solution of the embodiment of the present invention is to train the binary classifier corresponding to the sub-training set based on the sub-training set to obtain a trained binary classifier, record the temperature and humidity interval credibility of the trained binary classifier in each temperature and humidity interval, and train multiple classifiers based on the training set to obtain a trained multiple classifier; construct a candidate wind turbine fault diagnosis model based on the comprehensive classifier to be trained, the trained binary classifier and the trained multiple classifier, and alternately train the discriminator and the comprehensive classifier in the candidate wind turbine fault diagnosis model based on the verification set to obtain a trained candidate wind turbine fault diagnosis model, and determine the verified candidate wind turbine fault diagnosis model as the trained wind turbine fault diagnosis model, wherein the wind turbine fault diagnosis model includes multiple binary classifiers, a multiple classifier and a comprehensive classifier, rather than only constructing the wind turbine fault diagnosis model to be trained based on the multiple classifier, thereby solving the problem of poor generalization ability of the wind turbine fault diagnosis model and improving the generalization ability and fault detection accuracy of the wind turbine fault diagnosis model.
[0036] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0038] Figure 1 This is a flow chart of a method for training a wind turbine fault diagnosis model provided in the first embodiment of the present invention;
[0039] Figure 2 This is a flow chart of a method for training a wind turbine fault diagnosis model provided by the second embodiment of the present invention;
[0040] Figure 3 This is a structural diagram of a training device for a wind turbine fault diagnosis model provided by a third embodiment of the present invention;
[0041] Figure 4 This is a structural diagram of an electronic device provided in Example 4 of the present invention. DETAILED DESCRIPTION
[0042] In order to enable those skilled in the art to better understand the solutions of the present invention, the following will provide a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the embodiments described 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 making creative efforts should fall within the scope of protection of the present invention.
[0043] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0044] Example 1
[0045] Figure 1 This is a flow chart of a method for training a wind turbine fault diagnosis model provided by the first embodiment of the present invention. This embodiment is applicable to the case of training a wind turbine fault diagnosis model. The method can be executed by a training device for a wind turbine fault diagnosis model. The training device for a wind turbine fault diagnosis model can be implemented in the form of hardware and / or software. The training device for a wind turbine fault diagnosis model can be configured in electronic devices such as computers and servers. Figure 1 As shown, the method includes:
[0046] S110. Obtain a sample data set, a wind turbine fault diagnosis model to be trained, and a discriminator to be trained. The sample data set includes multiple sample data items, each sample data item includes fault feature sample data and a unique hot code label corresponding to the fault feature sample data; the wind turbine fault diagnosis model includes multiple binary classifiers, a multi-classifier, and a comprehensive classifier.
[0047] In this embodiment, the fault feature sample data is data that characterizes the state of the wind turbine itself during the operation of the wind turbine. For example, the fault feature sample data includes multiple characteristic physical quantities that characterize the state of the wind turbine itself, and the characteristic physical quantities include but are not limited to electrical quantities, pressure quantities, vibration quantities, unit output power, rotor speed, bearing temperature, winding temperature, and gearbox oil temperature. The unique hot code label is a label that characterizes the fault type to which the fault feature sample data belongs. The unique hot code label includes coding elements corresponding to multiple fault types. Only one coding element in the unique hot code label is the logical identifier "1", and the other coding elements are all logical identifiers "0". Each fault type corresponds to a unique hot code label. For example, assuming that there are 4 fault types in the wind turbine, and the unique hot code label corresponding to the fault feature sample data 1 is "1000", then the fault type to which the fault feature sample data belongs is the first fault type.
[0048] Specifically, for each fault type, during the operation of the wind turbine generator set corresponding to the fault type, multiple characteristic physical quantities included in the fault feature sample data are collected multiple times, and the multiple characteristic physical quantities collected each time are stored as a fault feature sample data corresponding to the fault type, and the unique hot code label corresponding to the fault type is set as the unique hot code label corresponding to the fault feature sample data. By integrating each fault feature sample data and each unique hot code label corresponding to the fault feature sample data, a sample data item corresponding to each fault type is obtained. By storing the multiple sample data items corresponding to the multiple fault types in the form of a data set, a sample data set is obtained. The sample data set can be pre-stored locally and / or on a server, and this embodiment does not limit this. During the process of training the wind turbine fault diagnosis model, the sample data set can be called from the local and / or server.
[0049] The wind turbine fault diagnosis model to be trained is an untrained wind turbine fault diagnosis model pre-stored locally and / or on a server. Each binary classifier corresponds to a fault type. Any binary classifier is used to determine the first probability that the fault feature sample data belongs to the fault type corresponding to the binary classifier; the multi-classifier is used to determine the second probability that the fault feature sample data belongs to multiple fault types, wherein the inputs of the binary classifier and the multi-classifier are both fault feature sample data. Exemplarily, assuming that there are M fault types for a wind turbine, there are M binary classifiers in the wind turbine fault diagnosis model, and the output results of the multi-classifier include the second probabilities corresponding to the M fault types. The comprehensive classifier is used to fuse the first probabilities of the multiple binary classifiers and the second probabilities of the multi-classifier. The discriminator is used to predict the authenticity of the output results of the wind turbine fault diagnosis model. By calling the pre-stored untrained wind turbine fault diagnosis model and the discriminator, the wind turbine fault diagnosis model to be trained and the discriminator to be trained are obtained.
[0050] S120. Divide the sample data set into a training set, a validation set, and a test set.
[0051] In this embodiment, multiple sample data items in the training set are used to train binary classifiers and multi-classifiers, multiple sample data items in the validation set are used to train comprehensive classifiers and discriminators, and multiple sample data items in the test set are used to determine the end of training the wind turbine fault diagnosis model.
[0052] Specifically, a training set, a validation set, and a test set are obtained by randomly partitioning multiple sample data items in a sample data set. Optionally, data augmentation is performed on the sample data set; the sample data set after data augmentation is normalized; and the normalized sample data set is randomly partitioned into a training set, a validation set, and a test set based on a ratio of 40%, 40%, and 20%.
[0053] Specifically, data augmentation is performed on the sample dataset based on a preset data augmentation algorithm to increase the data size of the sample dataset. The preset data augmentation algorithm is a pre-set algorithm capable of performing data augmentation on the sample dataset. Exemplarily, the preset data augmentation algorithm is a data augmentation algorithm based on Gaussian white noise. The augmented sample dataset is normalized to scale multiple fault feature sample data items within the sample dataset to the same numerical range, thereby eliminating numerical differences between different fault feature sample data items and ensuring stability during the training of the wind turbine fault diagnosis model. Exemplarily, the fault feature sample data items within the multiple sample data items are all scaled to [0, 1] or [-1, 1]. By dividing 40% of the sample data items within the normalized sample dataset into a training set, 40% into a validation set, and 20% into a test set, sufficient sample data items are ensured to validate the performance of the wind turbine fault diagnosis model on unseen data, thereby improving the generalization of the trained wind turbine fault diagnosis model.
[0054] S130 , dividing the training set based on each type of one-hot code label to obtain multiple sub-training sets, and replacing the one-hot code label of each sample data item in each sub-training set with 1.
[0055] Specifically, for multiple sample data items in a training set, sample data items with the same one-hot label are divided into the same sub-training set, thereby obtaining sub-training sets corresponding to multiple fault types. For example, the one-hot labels of multiple sample data items in the mth training subset are all one-hot labels representing the mth fault type. By replacing the one-hot label of each sample data item in each sub-training set with the logical identifier 1, the amount of one-hot label data in the sub-training set can be reduced, helping to save computing resources and improving the training efficiency of the binary classifier.
[0056] S140. Train a binary classifier corresponding to the sub-training set based on the sub-training set to obtain a trained binary classifier, record the temperature and humidity interval credibility of the trained binary classifier in each temperature and humidity interval, and train a multi-classifier based on the training set to obtain a trained multi-classifier.
[0057] In this embodiment, the temperature and humidity interval includes a temperature interval and a humidity interval. The temperature interval is the interval within which the temperature of the environment in which the wind turbine is located falls at the time the characteristic physical quantity is collected; the humidity interval is the interval within which the humidity of the environment in which the wind turbine is located falls at the time the characteristic physical quantity is collected. For example, the sample data items in the sub-training set can be pre-divided into multiple small training sets based on the temperature and humidity intervals.
[0058] Specifically, the fault type corresponding to the binary classifier corresponding to each sub-training set is the same as the fault type corresponding to the sub-training set. During the training process of the binary classifier, for each fault type, the fault feature sample data in the sub-training set corresponding to the fault type is input into the binary classifier corresponding to the sub-training set, so that the binary classifier performs classification and prediction processing on each input fault feature sample data, obtains the first probability that each fault feature sample data belongs to the fault type corresponding to the binary classifier, and determines the predicted fault type corresponding to the fault feature sample data based on the first probability. Based on the predicted fault type and the fault type, the binary classification loss function corresponding to the binary classifier is determined, and the parameters of the binary classifier are adjusted based on the binary classification loss function to obtain a trained binary classifier. For example, the mth binary classifier is trained based on the mth sub-training set. Based on the sub-training set corresponding to each binary classifier, the temperature and humidity interval credibility of each binary classifier in each temperature and humidity interval is determined.
[0059] During the training process of the multi-classifier, the fault feature sample data in the training set is input into the multi-classifier, so that the multi-classifier performs classification and prediction processing on each input fault feature sample data, obtains the second probability that each fault feature sample data belongs to multiple fault types, and determines the predicted fault type based on the fault type corresponding to the maximum second probability among the multiple second probabilities. Based on the predicted fault type and the fault type, the multi-classification loss function corresponding to the multi-classifier is determined, and the parameters of the multi-classifier are adjusted based on the multi-classification loss function to obtain a trained multi-classifier. Exemplarily, the loss function that constitutes the multi-classification loss function or the binary classification loss function includes but is not limited to the Focal loss function, the cross entropy loss function, and the Dice loss function.
[0060] S150. Based on the comprehensive classifier to be trained, the trained binary classifier and the trained multi-classifier, a candidate wind turbine fault diagnosis model is constructed, and based on the validation set, the discriminator and the comprehensive classifier in the candidate wind turbine fault diagnosis model are alternately trained to obtain a trained candidate wind turbine fault diagnosis model.
[0061] In this embodiment, the candidate wind turbine fault diagnosis model includes a plurality of binary classifiers, a multi-classifier and a comprehensive classifier, wherein the plurality of binary classifiers and the multi-classifier are connected in parallel to the input end of the comprehensive classifier.
[0062] Specifically, the construction of the candidate wind turbine fault diagnosis model is completed by loading multiple trained binary classifiers as binary classifiers connected to the input end of the comprehensive classifier, and loading the trained multi-classifier as a multi-classifier connected to the input end of the comprehensive classifier. Among them, the comprehensive classifier in the candidate wind turbine fault diagnosis model is the comprehensive classifier to be trained, and the binary classifier and multi-classifier in the candidate wind turbine fault diagnosis model are both in an untrainable state.
[0063] A generative adversarial model is constructed based on a candidate wind turbine fault diagnosis model and a discriminator. The candidate wind turbine fault diagnosis model serves as the generator in the generative adversarial model. The fault feature sample data from the validation set is input into the generative adversarial model. The model parameters of the discriminator and the integrated classifier in the candidate wind turbine fault diagnosis model are alternately adjusted until the generative adversarial training termination condition is met, resulting in a trained candidate wind turbine fault diagnosis model. The termination condition for generative adversarial training can be achieved after a fixed number of generative adversarial training rounds have been completed.
[0064] Among them, the discriminator and the comprehensive classifier in the candidate wind turbine fault diagnosis model are alternately trained based on the validation set to obtain the trained candidate wind turbine fault diagnosis model, which includes the following four steps:
[0065] S1501. For each sample data item in the validation set, perform binary classification processing on the sample data item based on a binary classifier in an untrainable state to obtain a first classification result corresponding to the sample data item, and determine first input information of the comprehensive classifier based on the first classification results corresponding to multiple binary classifiers respectively, and determine second input information of the comprehensive classifier based on the credibility of the temperature and humidity intervals of the multiple binary classifiers in the temperature and humidity intervals to which the sample data item belongs, and perform multi-classification processing on the sample data item based on a multi-classifier in an untrainable state to obtain a second classification result corresponding to the sample data item, and determine the second classification result as the third input information of the comprehensive classifier.
[0066] Specifically, during both the integrated classifier training phase and the discriminator training phase, multiple binary classifiers in an untrainable state are used to simultaneously perform binary classification on the fault feature sample data in each sample data item in the validation set, obtaining first classification results corresponding to the sample data items output by the multiple binary classifiers, wherein the first classification results are first probabilities. By combining the first classification results corresponding to the multiple binary classifiers, first input information for the integrated classifier is obtained. For example, assuming that the candidate wind turbine fault diagnosis model includes M binary classifiers, the first input information includes the first classification results corresponding to the M binary classifiers.
[0067] Based on the temperature and humidity interval to which each sample data item in the validation set belongs, the temperature and humidity interval credibility of each binary classifier in the temperature and humidity interval corresponding to each of the multiple binary classifiers in each temperature and humidity interval is queried to obtain the second input information of the integrated classifier. For example, assuming that the i-th sample data item corresponds to the temperature and humidity interval ts, then based on the temperature and humidity interval ts, the temperature and humidity interval credibility of each of the M binary classifiers corresponding to the temperature and humidity interval ts is queried to obtain the second input information. It can be understood that each first classification result in the first input information corresponds to a temperature and humidity interval credibility.
[0068] In the comprehensive classifier training stage and the discriminator training stage, multi-classifiers based on the untrainable state are used to perform multi-classification processing on the fault feature sample data in each sample data item in the verification set to obtain the second classification result corresponding to the sample data item, and the second classification result is used as the third input information of the comprehensive classifier, wherein the second classification result includes multiple second probabilities output by the multi-classifier. Exemplarily, the third input information includes the second probabilities of M fault types.
[0069] S1502. During the training process of the discriminator training phase: based on the comprehensive classifier in the untrainable state, the first input information, the second input information and the third input information are predicted and processed to obtain a third classification result; based on the discriminator in the trainable state, the authenticity judgment result of the third classification result is determined; based on the authenticity judgment results of the third classification results corresponding to multiple sample data items in the verification set, the first discriminator loss function is determined; based on the discriminator in the trainable state, the authenticity judgment result of each unique hot code label in the verification set is determined; based on the authenticity judgment results of the unique hot code labels corresponding to multiple sample data items in the verification set, the second discriminator loss function is determined; based on the first discriminator loss function and the second discriminator loss function, the total discriminator loss function is determined; and the parameters of the discriminator are adjusted based on the total discriminator loss function.
[0070] Specifically, during the discriminator training phase, the comprehensive classifier is set to a non-trainable state, and the discriminator is set to a trainable state. By simultaneously inputting the first input information, the second input information, and the third input information corresponding to each sample data item in the validation set into the comprehensive classifier, the comprehensive classifier performs prediction processing and outputs the third classification result corresponding to each sample data item. By collecting the third classification results corresponding to a plurality of sample data items, and setting a authenticity label representing false data for each third classification result, a third classification result data set is obtained. By collecting the unique hot code labels respectively included in a plurality of sample data items, and setting a authenticity label representing true data for each unique hot code label, a unique hot code label data set is obtained.
[0071] By inputting the third classification result dataset and the one-hot label dataset into the discriminator, the discriminator performs authenticity prediction on the third classification results in the third classification result dataset and the one-hot label in the one-hot label dataset, respectively, to obtain authenticity determination results for the third classification results and the one-hot label. By calculating the difference between the authenticity determination result of each third classification result and the authenticity label representing the false data, a first discriminator loss term corresponding to each third classification result is obtained, and the average value of the first discriminator loss terms corresponding to multiple third classification results in the third classification result dataset is determined as the first discriminator loss function. By calculating the difference between the authenticity determination result of each one-hot label and the authenticity label representing the true data, a second discriminator loss term corresponding to each one-hot label is obtained, and the average value of the second discriminator loss terms corresponding to multiple one-hot labels in the one-hot label dataset is determined as the second discriminator loss function. By performing weighted summation processing on the first discriminator loss function and the second discriminator loss function, a total discriminator loss function is obtained. By backpropagating the total discriminator loss function and adjusting the discriminator model parameters, a round of discriminator training is completed.
[0072] For example, assuming that the authenticity label representing the false data is a logical identifier 0, and the authenticity label representing the true data is a logical identifier 1, each round of training includes multiple batches, and the batch size H represents the training of each batch. At the same time, the fault feature sample data of H sample data items in the validation set are input into the candidate wind turbine fault diagnosis model, then the third classification result data set is expressed as:
[0073] in, Represents the third classification result corresponding to the hth sample data item in the validation set. The one-hot code label dataset is represented as: Among them, (b 1h ,…,b mh ,…,b Mh ) represents the one-hot code label included in the h-th sample data item in the validation set.
[0074] S1503. During the training process of the comprehensive classifier training phase: based on the comprehensive classifier in the trainable state, the first input information, the second input information and the third input information are predicted and processed to obtain a third classification result; based on the discriminator in the untrainable state, the authenticity judgment result of the third classification result is determined; for multiple sample data items in the validation set, based on the authenticity judgment results of the third classification results corresponding to the multiple sample data items, a first comprehensive classifier loss function is determined, and based on the third classification results and unique-hot code labels corresponding to the multiple sample data items, a second comprehensive classifier loss function is determined; based on the first comprehensive classifier loss function and the second comprehensive classifier loss function, a total comprehensive classifier loss function is determined; and based on the total comprehensive classifier loss function, parameters of the comprehensive classifier are adjusted.
[0075] Specifically, during the training phase of the comprehensive classifier, the comprehensive classifier is set to a trainable state, and the discriminator is set to a non-trainable state. By simultaneously inputting the first input information, the second input information, and the third input information corresponding to each sample data item in the validation set into the comprehensive classifier, the comprehensive classifier performs a prediction process and outputs a third classification result. Among them, the third classification result includes the third probability that the fault feature sample data belongs to multiple fault types respectively. It can be understood that the third probability of each fault type obtained by the comprehensive classifier through comprehensive analysis of the first input information, the second input information, and the third input information is more accurate than the second probability or the first probability. Exemplarily, the third classification result includes the third probabilities of M fault types.
[0076] By inputting each third classification result into the discriminator, the discriminator performs authenticity discrimination on each third classification result, and obtains the authenticity judgment result of each third classification result. The first comprehensive classifier loss function is used to characterize the authenticity of the third classification result. Based on the difference between the authenticity judgment result of the third classification result corresponding to each sample data item and the authenticity label representing the true data (for example, logical identifier 1), the first comprehensive classifier loss term corresponding to each sample data item is determined, and the average value of the first comprehensive classifier loss terms corresponding to multiple sample data items is determined as the first comprehensive classifier loss function. The second comprehensive classifier loss function is used to characterize the degree of difference between the third classification result and the one-hot code label. By calculating the difference between the third classification result corresponding to each sample data item and the one-hot code label, the second comprehensive classifier loss term corresponding to each sample data item is obtained, and the average value of the second comprehensive classifier loss terms corresponding to multiple sample data items is determined as the second comprehensive classifier loss function. The total comprehensive classifier loss function is obtained by performing weighted sum processing on the first comprehensive classifier loss function and the second comprehensive classifier loss function. By backpropagating the overall integrated classifier loss function and adjusting the model parameters of the integrated classifier, a round of training for the integrated classifier is completed. Exemplarily, the authenticity determination results are authenticity determination results representing false data (e.g., logical identification 0) and authenticity determination results representing true data (e.g., logical identification 1).
[0077] S1504 , alternately executing the training process of the comprehensive classifier training phase and the training process of the discriminator training phase until a trained candidate wind turbine fault diagnosis model is obtained.
[0078] Specifically, during generative adversarial training, the discriminator and the comprehensive classifier are trained alternately. When the current training batch meets the generative adversarial training termination condition, training of the comprehensive classifier and the discriminator is terminated, and the candidate wind turbine fault diagnosis model trained in the current training batch is determined as the trained candidate wind turbine fault diagnosis model. Exemplarily, each training round executes multiple training batches. During the training of each training batch, the discriminator training process is executed first, followed by the comprehensive classifier training process.
[0079] S160. Verify the trained candidate wind turbine fault diagnosis model based on the test set. If the verification fails, retrain the wind turbine fault diagnosis model until a trained wind turbine fault diagnosis model is obtained; the trained wind turbine fault diagnosis model is the candidate wind turbine fault diagnosis model that passes the verification.
[0080] Specifically, multiple sample data items from the test set are input into a trained candidate wind turbine fault detection model. The trained candidate wind turbine fault detection model then predicts the fault feature sample data for each input sample data item to obtain a fault classification result. The detection accuracy of the trained candidate wind turbine fault detection model is determined based on the one-hot code labels and fault classification results corresponding to the multiple sample data items in the test set.
[0081] If the detection accuracy is less than a preset detection accuracy threshold, the trained candidate wind turbine fault detection model is deemed incapable of accurately detecting wind turbine faults, and verification is determined to have failed. The wind turbine fault diagnosis model and discriminator are then retrained. The preset detection accuracy threshold is a pre-set detection accuracy threshold used to determine if the candidate wind turbine fault detection model has passed verification. Exemplarily, the preset detection accuracy threshold is 0.95.
[0082] If the detection accuracy is greater than or equal to the preset detection accuracy threshold, the trained candidate wind turbine fault detection model is considered to be able to obtain accurate detection results, and the verification is determined to have passed. The trained candidate wind turbine fault detection model is then stored as a trained wind turbine fault diagnosis model, so that the trained wind turbine fault diagnosis model can be subsequently used to perform fault detection on the wind turbine to be detected. The wind turbine to be detected is the wind turbine that needs to be detected for faults.
[0083] It should be noted that wind turbines can be divided into multiple types of wind turbines. For example, wind turbine types include but are not limited to direct-drive wind turbines, semi-direct-drive wind turbines, and doubly-fed wind turbines. When the wind turbine type of the sample source wind turbine is the same as the wind turbine type of the wind turbine to be tested, the trained wind turbine fault diagnosis model can be directly used to perform fault detection on the wind turbine to be tested. The sample source wind turbine is the wind turbine from which the sample data item in the sample data set comes, and the wind turbine to be tested is the wind turbine for which fault detection needs to be performed based on the wind turbine fault diagnosis model.
[0084] When the type of wind turbine to which the sample source wind turbine belongs is different from the type of wind turbine to which the wind turbine to be detected belongs, optionally, the sample data items in the sample data set all come from the first type of wind turbine; accordingly, a migration sample data set is obtained; based on the migration sample data set, the fully connected layer in the migration wind turbine fault diagnosis model is trained to obtain a trained migration wind turbine fault diagnosis model.
[0085] The migration sample dataset includes multiple migration sample data items, each of which includes migration fault feature sample data and a migration one-hot code label corresponding to the migration fault feature sample data. The multiple migration sample data items all originate from a second-type wind turbine. The second-type wind turbine is a wind turbine of a different type from the first-type wind turbine. The migration wind turbine fault diagnosis model includes a wind turbine fault diagnosis model trained based on the sample dataset and an additional fully connected layer, which is disposed at the end of the wind turbine fault diagnosis model.
[0086] Specifically, a migration sample dataset is pre-stored locally and / or on a server. During the migration training of the wind turbine fault diagnosis model, the migration sample dataset can be called from the local machine and / or server. A migration wind turbine fault diagnosis model to be trained is obtained by calling a wind turbine fault diagnosis model trained based on a sample dataset from a first type of wind turbine and embedding an additional fully connected layer at the end of the wind turbine fault diagnosis model. It should be noted that only the model parameters of the additional fully connected layer in the migration wind turbine fault diagnosis model to be trained are in a trainable state. By inputting migration fault feature sample data from the migration sample dataset into the migration wind turbine fault diagnosis model to be trained, migration fault detection results corresponding to the migration fault feature sample data are obtained. A migration loss function is determined based on the migration fault detection results corresponding to the migration fault feature sample data and the migration unique-hot code labels. Model parameters of the additional fully connected layer in the migration wind turbine fault diagnosis model are adjusted based on the migration loss function. Exemplarily, the first type of wind turbine is a direct-drive wind turbine, and the second type of wind turbine is a semi-direct-drive wind turbine.
[0087] The technical solution of this embodiment is to train the binary classifier corresponding to the sub-training set based on the sub-training set to obtain a trained binary classifier, record the temperature and humidity interval credibility of the trained binary classifier in each temperature and humidity interval, and train multiple classifiers based on the training set to obtain a trained multiple classifier; construct a candidate wind turbine fault diagnosis model based on the comprehensive classifier to be trained, the trained binary classifier and the trained multiple classifier, and alternately train the discriminator and the comprehensive classifier in the candidate wind turbine fault diagnosis model based on the verification set to obtain a trained candidate wind turbine fault diagnosis model, and determine the verified candidate wind turbine fault diagnosis model as the trained wind turbine fault diagnosis model, wherein the wind turbine fault diagnosis model includes multiple binary classifiers, a multiple classifier and a comprehensive classifier, rather than constructing the wind turbine fault diagnosis model to be trained based only on the multiple classifier, thereby solving the problem of poor generalization ability of the wind turbine fault diagnosis model and improving the generalization ability and fault detection accuracy of the wind turbine fault diagnosis model.
[0088] Example 2
[0089] Figure 2 This is a flow chart of a training method for a wind turbine fault diagnosis model provided by the second embodiment of the present invention. This embodiment is improved on the basis of the above embodiment. The explanations of the terms that are the same or corresponding to the above embodiments are not repeated here. Figure 2 As shown, the method includes:
[0090] S210. Obtain a sample data set, a wind turbine fault diagnosis model to be trained, and a discriminator to be trained. The sample data set includes multiple sample data items, each sample data item includes fault feature sample data and a unique hot code label corresponding to the fault feature sample data; the wind turbine fault diagnosis model includes multiple binary classifiers, a multi-classifier, and a comprehensive classifier; the sample data items also include temperature sample data and humidity sample data.
[0091] Among them, the sample data set is represented as in, Includes I sample data items, Characterize the i-th sample data item in the sample data set; wherein, the fault feature sample data of the i-th sample data item Including L physical quantities, q il The lth physical quantity in the fault feature sample data representing the i-th sample data item; the one-hot code label of the i-th sample data item In, b i1 ,…,b im ,…,b iM Respectively represent the probability that the i-th sample data item is the 1st to M-th fault type, and b i1 ,…,b im ,…,b iM There is only one item that is 100%, and the others are 0; i and s i They represent the temperature sample data and humidity sample data when the i-th sample data item is collected.
[0092] For example, when the one-hot code label represents the fault type information m corresponding to the fault feature sample data, That is b 1x ,b 2x ,…,b lx ,…,b Lx Only b mx is 1.
[0093] S220, dividing the sample data set into a training set, a validation set, and a test set.
[0094] S230 , dividing the training set based on each type of one-hot code label to obtain multiple sub-training sets, and replacing the one-hot code label of each sample data item in each sub-training set with 1.
[0095] S240. Train the binary classifier corresponding to the sub-training set based on the sub-training set to obtain a trained binary classifier, record the temperature and humidity interval credibility of the trained binary classifier in each temperature and humidity interval, and train a multi-classifier based on the training set to obtain a trained multi-classifier.
[0096] Optionally, based on multiple temperature sample data in the training set, the temperature range [T1, T2] corresponding to the training set is determined, and based on multiple humidity sample data in the training set, the humidity range [S1, S2] corresponding to the training set is determined; the temperature range is divided into intervals based on a temperature interval of 5 degrees Celsius to obtain multiple temperature intervals, and the humidity range is divided into intervals based on a humidity interval of 10% to obtain multiple humidity intervals, and each temperature interval and each humidity interval are combined to obtain multiple temperature and humidity intervals; in the training process of each binary classifier, the number of correct classifications and the total number of classifications of the trained binary classifier in each temperature and humidity interval are recorded, and the quotient of the correct classification number and the total number of classifications is determined as the temperature and humidity interval credibility corresponding to the trained binary classifier in the temperature and humidity interval; the temperature and humidity interval credibility of each trained binary classifier in each temperature and humidity interval is recorded.
[0097] Specifically, the maximum temperature sample data and the minimum temperature sample data among the temperature sample data respectively included in the multiple temperature sample data in the training set are determined, and the temperature range corresponding to the training set is constructed based on the maximum temperature sample data and the minimum temperature sample data. The maximum humidity sample data and the minimum humidity sample data among the humidity sample data respectively included in the multiple humidity sample data in the training set are determined, and the humidity range corresponding to the training set is constructed based on the maximum humidity sample data and the minimum humidity sample data. The temperature range is evenly divided into multiple intervals according to the temperature interval of 5 degrees Celsius to obtain multiple temperature intervals, and the humidity range is evenly divided into multiple intervals according to the humidity interval of 10% to obtain multiple humidity intervals. Multiple temperature and humidity intervals are obtained by combining each temperature interval with multiple humidity intervals in pairs. For example, the number of temperature intervals T = (T2-T1) / 5, and the number of humidity intervals S = 10. The temperature interval [T1+5×t, T1+5×(t+1)] and the humidity interval [S1+(S2-S1)×s×10%, S1+(S2-S1)×(s+1)×10%] are combined into the temperature and humidity interval ts, where t∈[0,T,s∈[0,S).
[0098] By storing the training results of at least one round, the target training result corresponding to the trained binary classifier is recorded. For example, by storing the training results of each round, the training result of the training round in which the trained binary classifier is obtained can be determined as the target training result. Alternatively, if the trained binary classifier corresponds to the binary classifier of the maximum training round, the training result of the maximum training round can be stored. This embodiment is not limited to this. The training results include the number of correct classifications and the total number of classifications corresponding to multiple temperature and humidity intervals.
[0099] By taking the quotient of the number of correct classifications and the total number of classifications corresponding to each temperature and humidity interval in the target training results, the temperature and humidity interval credibility of the trained binary classifier in the temperature and humidity interval is obtained. For example, the temperature and humidity interval credibility of the mth binary classifier in the temperature and humidity interval ts is expressed as P ts,m =R ts,m / Z ts,m , where R ts,m Represents the number of correct classifications of the mth binary classifier in the temperature and humidity interval ts, Z ts,m Represents the total number of classifications of the mth binary classifier in the temperature and humidity interval ts.
[0100] For example, Table 1 lists the temperature and humidity interval credibility corresponding to multiple temperature and humidity intervals. As shown in Table 1, P ts,m Represents the reliability of the temperature and humidity interval of the mth binary classifier in the temperature and humidity interval ij.
[0101] Table 1
[0102]
[0103] The technical solution of this embodiment is to obtain multiple temperature intervals by dividing the temperature range, and to obtain multiple humidity intervals by dividing the humidity range, and to obtain multiple temperature and humidity intervals by combining each temperature interval and each humidity interval; the quotient of the number of correct classifications of the trained binary classifier in each temperature and humidity interval and the total number of classifications is determined as the temperature and humidity interval credibility corresponding to the trained binary classifier in the temperature and humidity interval, and the temperature and humidity interval credibility of the binary classifier in each temperature and humidity interval can be determined in advance. During the application of the wind turbine fault diagnosis model, the temperature and humidity interval credibility can be directly queried without complex calculations, which helps to save computing resources and improves the efficiency of fault detection based on the wind turbine fault diagnosis model.
[0104] S250, based on the comprehensive classifier to be trained, the trained binary classifier and the trained multi-classifier, construct a candidate wind turbine fault diagnosis model, and, based on the validation set, alternately train the discriminator and the comprehensive classifier in the candidate wind turbine fault diagnosis model to obtain a trained candidate wind turbine fault diagnosis model.
[0105] Among them, the discriminator and the comprehensive classifier in the candidate wind turbine fault diagnosis model are alternately trained based on the validation set to obtain the trained candidate wind turbine fault diagnosis model, including:
[0106] S2501. For each sample data item in the validation set, perform binary classification processing on the sample data item based on a binary classifier in an untrainable state to obtain a first classification result corresponding to the sample data item, and determine the first input information of the comprehensive classifier based on the first classification results corresponding to multiple binary classifiers respectively, and determine the second input information of the comprehensive classifier based on the credibility of the temperature and humidity intervals of the multiple binary classifiers in the temperature and humidity intervals to which the sample data item belongs, and perform multi-classification processing on the sample data item based on multiple classifiers in an untrainable state to obtain a second classification result corresponding to the sample data item, and determine the second classification result as the third input information of the comprehensive classifier.
[0107] S2502. During the training process of the discriminator training phase: based on the comprehensive classifier in the untrainable state, the first input information, the second input information and the third input information are predicted and processed to obtain a third classification result; based on the discriminator in the trainable state, the authenticity judgment result of the third classification result is determined; based on the authenticity judgment results of the third classification results corresponding to multiple sample data items in the verification set, the first discriminator loss function is determined; based on the discriminator in the trainable state, the authenticity judgment result of each unique hot code label in the verification set is determined; based on the authenticity judgment results of the unique hot code labels corresponding to multiple sample data items in the verification set, the second discriminator loss function is determined; based on the first discriminator loss function and the second discriminator loss function, the total discriminator loss function is determined; and the parameters of the discriminator are adjusted based on the total discriminator loss function.
[0108] S2503. During the training process of the comprehensive classifier training phase: based on the comprehensive classifier in the trainable state, the first input information, the second input information and the third input information are predicted and processed to obtain a third classification result; based on the discriminator in the untrainable state, the authenticity judgment result of the third classification result is determined; for multiple sample data items in the validation set, based on the authenticity judgment results of the third classification results corresponding to the multiple sample data items, a first comprehensive classifier loss function is determined, and based on the third classification results and unique-hot code labels corresponding to the multiple sample data items, a second comprehensive classifier loss function is determined; based on the first comprehensive classifier loss function and the second comprehensive classifier loss function, a total comprehensive classifier loss function is determined; and based on the total comprehensive classifier loss function, parameters of the comprehensive classifier are adjusted based on the total comprehensive classifier loss function.
[0109] In some embodiments, optionally, the binary classifier is a decision tree model, the multi-classifier is a support vector machine model, the discriminator is a multi-layer perceptron model, and the comprehensive classifier is a two-layer BP neural network model. The first layer BP neural network of the comprehensive classifier includes multiple first layer neurons, and the second layer BP neural network of the comprehensive classifier includes multiple second layer neurons, wherein the number of first layer neurons and the number of second layer neurons are the same as the number of fault types.
[0110] Specifically, the input to each first-layer neuron of the integrated classifier includes the output of a binary classifier corresponding to the first-layer neuron and an element from the output of the multi-classifier. The output of each second-layer neuron of the integrated classifier includes an element from the output of the wind turbine fault diagnosis model. Accordingly, the process of determining the third classification result includes: setting initial weights for multiple first-layer neurons based on the second input information, and setting an initial bias for the first-layer BP neural network based on the third input information.
[0111] Among them, the second input information is expressed as Among them, P ts,m Represents the credibility of the temperature and humidity interval corresponding to the temperature and humidity interval ts of the mth binary classifier in the i-th sample data item; the third input information is expressed as Among them, im Characterize the probability that the i-th sample data item predicted by the multi-classifier is the m-th fault type; calculate based on the first input information and the initial bias and initial bias of the first layer BP neural network to obtain the output result of the first layer BP neural network:
[0112] Among them, P ts,m is the initial weight of the mth neuron in the first layer, o im is the initial bias of the mth neuron in the first layer; the first input information includes o 1,i,valid ,…,o m,i,valid,…,o M,i,valid , where o m,i,valid Represents the probability that the i-th sample data item predicted by the m-th binary classifier is the m-th fault type; Output im Characterize the probability that the i-th sample data item predicted by the first layer BP neural network is the m-th fault type; based on the output result of the first layer BP neural network and the second layer BP neural network, the third classification result is obtained: Among them, ω m is the weight of the mth neuron in the second layer; Bias m is the bias of the mth neuron in the second layer; Characterizes the probability that the i-th sample data item predicted by the second-layer BP neural network is the m-th fault type.
[0113] The technical solution of this embodiment sets the initial weights of multiple first-layer neurons based on the second input information, and sets the initial bias of the first-layer BP neural network based on the third input information; performs calculations based on the first input information and the initial bias and initial bias of the first-layer BP neural network to obtain the output result of the first-layer BP neural network; performs calculations based on the output result of the first-layer BP neural network and the second-layer BP neural network to obtain the third classification result, which can adaptively adjust the initial weights of the first-layer neurons according to the temperature and humidity range to which they belong, thereby improving the generalization of the wind turbine fault diagnosis model.
[0114] In the process of determining the total comprehensive classifier loss function, optionally, the first comprehensive classifier loss function and the second comprehensive classifier loss function are weighted and summed to obtain the total comprehensive classifier loss function; wherein the total comprehensive classifier loss function is expressed as: loss G =(loss G1 +loss G2 ) / 2 , where the first integrated classifier loss function is expressed as D(·) represents the authenticity judgment result, and the loss function of the second comprehensive classifier is expressed as Among them, H represents the batch size.
[0115] Specifically, during the training process of the comprehensive classifier, the comprehensive classifier simultaneously performs prediction processing on H sample data items in the validation set in each training batch, and obtains the third classification results corresponding to the H sample data items respectively. The discriminator in the untrainable state performs authenticity judgment processing on the H third classification results respectively, and obtains the authenticity judgment results corresponding to the H third classification results respectively. Where i∈[1,H]. The first comprehensive classifier loss function is obtained by calculating the sum of the differences between the H authenticity judgment results and the authenticity label 1 representing the true data. The second comprehensive classifier loss function is obtained by calculating the cross entropy of the third classification results and the included one-hot encoded labels corresponding to the H sample data items. For example, H=16.
[0116] In the process of determining the total discriminator loss function, optionally, the first discriminator loss function and the second discriminator loss function are weighted and summed to obtain the total discriminator loss function; wherein the total discriminator loss function is expressed as: loss D =(loss D1 +loss D2 ) / 2, where the first discriminator loss function is expressed as: The second discriminator loss function is expressed as:
[0117] Specifically, during the discriminator training process, the discriminator in the trainable state performs authenticity determination processing on the H third classification results respectively, and obtains the authenticity determination results corresponding to the H third classification results respectively. Where i∈[1,H]. The first discriminator loss function is obtained by calculating the sum of the differences between the authenticity judgment results corresponding to the H third classification results and the authenticity label 0 representing the false data. The trainable discriminator performs authenticity judgment processing on the one-hot code labels included in the H sample data items, and obtains the authenticity judgment results corresponding to the H one-hot code labels. The second discriminator loss function is obtained by calculating the sum of the differences between the authenticity judgment results corresponding to the H one-hot code labels and the authenticity label 1 representing the true data.
[0118] The technical solution of this embodiment, by obtaining a comprehensive classifier loss function based on the first comprehensive classifier loss function and the second comprehensive classifier loss function, and obtaining a discriminator loss function based on the first discriminator loss function and the second discriminator loss function, helps to improve the generation quality of the comprehensive classifier, so that the data distribution of the third classification result approaches the data distribution of the one-hot code label corresponding to the fault feature sample data, and helps to improve the discrimination ability of the discriminator.
[0119] S250 , alternately executing the training process of the comprehensive classifier training phase and the training process of the discriminator training phase until a trained candidate wind turbine fault diagnosis model is obtained.
[0120] S260. Verify the trained candidate wind turbine fault diagnosis model based on the test set. If the verification fails, retrain the wind turbine fault diagnosis model until a trained wind turbine fault diagnosis model is obtained; the trained wind turbine fault diagnosis model is the candidate wind turbine fault diagnosis model that passes the verification.
[0121] The technical solution of this embodiment is that the sample data items include fault feature sample data, unique hot code labels, temperature sample data and humidity sample data, which can characterize the working environment of the wind turbine when the sample data items are collected, and help the wind turbine fault diagnosis model to better learn the relationship between fault feature sample data and unique hot code labels under different temperature sample data and humidity sample data during the training process, thereby improving the accuracy and reliability of the wind turbine fault diagnosis model.
[0122] Example 3
[0123] Figure 3 FIG. 1 is a structural diagram of a training device for a wind turbine fault diagnosis model provided by the third embodiment of the present invention. Figure 3 As shown, the device includes:
[0124] The sample data set and to-be-trained model acquisition module 310 is used to acquire a sample data set, a wind turbine fault diagnosis model to be trained, and a discriminator to be trained. The sample data set includes multiple sample data items, each sample data item includes fault feature sample data and a one-hot code label corresponding to the fault feature sample data; the wind turbine fault diagnosis model includes multiple binary classifiers, a multi-classifier, and a comprehensive classifier;
[0125] The sample data set division module 320 is used to divide the sample data set into a training set, a validation set and a test set;
[0126] The training set sub-division module 330 is configured to divide the training set based on each class of one-hot code labels to obtain multiple training set sub-divisions, and replace the one-hot code label of each sample data item in each training set with 1;
[0127] A binary classifier and multi-classifier training module 340 is used to train a binary classifier corresponding to the sub-training set based on the sub-training set to obtain a trained binary classifier, record the temperature and humidity interval credibility of the trained binary classifier in each temperature and humidity interval, and train a multi-classifier based on the training set to obtain a trained multi-classifier;
[0128] a candidate wind turbine fault diagnosis model training module 350 for constructing a candidate wind turbine fault diagnosis model based on the comprehensive classifier to be trained, the trained binary classifier, and the trained multi-classifier, and alternately training the discriminator and the comprehensive classifier in the candidate wind turbine fault diagnosis model based on a validation set to obtain a trained candidate wind turbine fault diagnosis model;
[0129] The candidate wind turbine fault diagnosis model verification module 360 is used to verify the trained candidate wind turbine fault diagnosis model based on the test set. If the verification fails, the wind turbine fault diagnosis model is retrained until a trained wind turbine fault diagnosis model is obtained; the trained wind turbine fault diagnosis model is the candidate wind turbine fault diagnosis model that passes the verification.
[0130] Among them, the candidate wind turbine fault diagnosis model training module 350 is specifically used to: for each sample data item in the verification set, perform binary classification processing on the sample data item based on a binary classifier in an untrainable state to obtain a first classification result corresponding to the sample data item, and determine the first input information of the comprehensive classifier based on the first classification results corresponding to multiple binary classifiers, and determine the second input information of the comprehensive classifier based on the credibility of the temperature and humidity intervals of the multiple binary classifiers in the temperature and humidity intervals to which the sample data item belongs, and perform multi-classification processing on the sample data item based on a multi-classifier in an untrainable state to obtain a second classification result corresponding to the sample data item, and determine the second classification result as the third input information of the comprehensive classifier; in the training process of the discriminator training stage: based on the comprehensive classifier in an untrainable state, perform prediction processing on the first input information, the second input information and the third input information to obtain a third classification result; determine the authenticity judgment result of the third classification result based on the discriminator in a trainable state; determine the first discriminator loss function based on the authenticity judgment result of the third classification result corresponding to multiple sample data items in the verification set; determine the authenticity judgment result of each unique code label in the verification set based on the discriminator in a trainable state Determine the result; determine the authenticity judgment result of the unique hot code labels corresponding to multiple sample data items in the verification set, determine the second discriminator loss function; determine the total discriminator loss function based on the first discriminator loss function and the second discriminator loss function; adjust the discriminator parameters based on the total discriminator loss function; in the training process of the comprehensive classifier training stage: based on the trainable state comprehensive classifier, predict the first input information, the second input information and the third input information to obtain the third classification result; determine the authenticity judgment result of the third classification result based on the non-trainable state discriminator; for multiple Sample data items, based on the authenticity judgment results of the third classification results corresponding to the multiple sample data items, determine the first comprehensive classifier loss function, and based on the third classification results and unique hot code labels corresponding to the multiple sample data items, determine the second comprehensive classifier loss function; based on the first comprehensive classifier loss function and the second comprehensive classifier loss function, determine the total comprehensive classifier loss function; adjust the parameters of the comprehensive classifier based on the total comprehensive classifier loss function; alternately execute the training process of the comprehensive classifier training stage and the training process of the discriminator training stage until a trained candidate wind turbine fault diagnosis model is obtained.
[0131] The technical solution of this embodiment is to train the binary classifier corresponding to the sub-training set based on the sub-training set to obtain a trained binary classifier, record the temperature and humidity interval credibility of the trained binary classifier in each temperature and humidity interval, and train multiple classifiers based on the training set to obtain a trained multiple classifier; construct a candidate wind turbine fault diagnosis model based on the comprehensive classifier to be trained, the trained binary classifier and the trained multiple classifier, and alternately train the discriminator and the comprehensive classifier in the candidate wind turbine fault diagnosis model based on the verification set to obtain a trained candidate wind turbine fault diagnosis model, and determine the verified candidate wind turbine fault diagnosis model as the trained wind turbine fault diagnosis model, wherein the wind turbine fault diagnosis model includes multiple binary classifiers, a multiple classifier and a comprehensive classifier, rather than constructing the wind turbine fault diagnosis model to be trained based only on the multiple classifier, thereby solving the problem of poor generalization ability of the wind turbine fault diagnosis model and improving the generalization ability and fault detection accuracy of the wind turbine fault diagnosis model.
[0132] Based on the above embodiment, optionally, the sample data item further includes temperature sample data and humidity sample data; accordingly, the sample data set is represented as in, Includes I sample data items, Characterize the i-th sample data item in the sample data set; wherein, the fault feature sample data of the i-th sample data item Including L physical quantities, q il The lth physical quantity in the fault feature sample data representing the i-th sample data item; the one-hot code label of the i-th sample data item In, b i1 ,…,b im ,…,b iM Respectively represent the probability that the i-th sample data item is the 1st to M-th fault type, and b i1 ,…,b im ,…,b iM There is only one item that is 100%, and the others are 0; i and s i They represent the temperature sample data and humidity sample data when the i-th sample data item is collected.
[0133] Based on the above embodiment, optionally, a binary classifier and multi-classifier training module 340 is specifically used to: determine the temperature range [T1, T2] corresponding to the training set based on multiple temperature sample data in the training set, and determine the humidity range [S1, S2] corresponding to the training set based on multiple humidity sample data in the training set; divide the temperature range into intervals based on a temperature interval of 5 degrees Celsius to obtain multiple temperature intervals, and divide the humidity range into intervals based on a humidity interval of 10% to obtain multiple humidity intervals, and combine each of the temperature intervals and each of the humidity intervals to obtain multiple temperature and humidity intervals; in each binary classifier training process, record the number of correct classifications and the total number of classifications of the trained binary classifier in each temperature and humidity interval, and determine the quotient of the correct classification number and the total number of classifications as the temperature and humidity interval credibility of the trained binary classifier in the temperature and humidity interval; record the temperature and humidity interval credibility of each trained binary classifier in each temperature and humidity interval.
[0134] On the basis of the above embodiment, optionally, the binary classifier is a decision tree model, the multi-classifier is a support vector machine model, the discriminator is a multi-layer perceptron model, the comprehensive classifier is a two-layer BP neural network model, the first layer BP neural network of the comprehensive classifier includes multiple first layer neurons, and the second layer BP neural network of the comprehensive classifier includes multiple second layer neurons, wherein the number of first layer neurons and the number of second layer neurons are the same as the number of fault types; accordingly, the candidate wind turbine fault diagnosis model training module 350 is specifically used to: set the initial weights of multiple first layer neurons based on the second input information, and set the initial bias of the first layer BP neural network based on the third input information; wherein the second input information is represented as Among them, P ts,m Represents the credibility of the temperature and humidity interval corresponding to the temperature and humidity interval xy of the mth binary classifier in the i-th sample data item; the third input information is expressed as Among them, im Characterize the probability that the i-th sample data item predicted by the multi-classifier is the m-th fault type; calculate based on the first input information and the initial bias and initial bias of the first layer BP neural network to obtain the output result of the first layer BP neural network:
[0135] Among them, P ts,m is the initial weight of the mth neuron in the first layer, o im is the initial bias of the mth neuron in the first layer; the first input information includes o 1,i,valid ,…,o m,i,valid ,…,o M,i,valid , where o m,i,validRepresents the probability that the i-th sample data item predicted by the m-th binary classifier is the m-th fault type; Output im Characterize the probability that the i-th sample data item predicted by the first layer BP neural network is the m-th fault type; based on the output result of the first layer BP neural network and the second layer BP neural network, the third classification result is obtained: Among them, ω m is the weight of the mth neuron in the second layer; Bias m is the bias of the mth neuron in the second layer; Characterizes the probability that the i-th sample data item predicted by the second-layer BP neural network is the m-th fault type.
[0136] Based on the above embodiment, the candidate wind turbine fault diagnosis model training module 350 is optionally used to perform weighted summation processing on the first comprehensive classifier loss function and the second comprehensive classifier loss function to obtain a total comprehensive classifier loss function; wherein the total comprehensive classifier loss function is expressed as: loss G =(loss G1 +loss G2 ) / 2, where the first integrated classifier loss function is expressed as D(·) represents the authenticity judgment result, and the loss function of the second comprehensive classifier is expressed as Where H represents the batch size; the first discriminator loss function and the second discriminator loss function are weighted summed to obtain the total discriminator loss function;
[0137] Among them, the total discriminator loss function is expressed as: loss D =(loss D1 +loss D2 ) / 2;
[0138] The first discriminator loss function is expressed as:
[0139] The second discriminator loss function is expressed as:
[0140] Based on the above embodiment, optionally, the sample data items in the sample data set are all derived from the first type of wind turbine; accordingly, the training device of the wind turbine fault diagnosis model also includes a transfer training module; wherein the transfer training module is used to obtain a transfer sample data set, and the transfer sample data set includes multiple transfer sample data items, each transfer sample data item includes transfer fault feature sample data and a transfer unique-hot code label corresponding to the transfer fault feature sample data; wherein the multiple transfer sample data items are all derived from the second type of wind turbine; the second type of wind turbine is a wind turbine of a different type from the first type of wind turbine; based on the transfer sample data set, the additional fully connected layer in the transfer wind turbine fault diagnosis model is trained to obtain a trained transfer wind turbine fault diagnosis model; the transfer wind turbine fault diagnosis model includes a wind turbine fault diagnosis model trained based on the sample data set and an additional fully connected layer, and the additional fully connected layer is arranged at the end of the wind turbine fault diagnosis model.
[0141] Based on the above embodiment, optionally, the sample data set partitioning module 320 is specifically used to: perform data expansion on the sample data set; perform normalization on the sample data set after data expansion; and randomly divide the normalized sample data set into a training set, a validation set, and a test set based on a ratio of 40%, 40%, and 20%.
[0142] The wind turbine fault diagnosis model training device provided by the embodiment of the present invention can execute the wind turbine fault diagnosis model training method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0143] Example 4
[0144] Figure 4 1 is a structural diagram of an electronic device provided in Embodiment 4 of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0145] like Figure 4As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0146] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0147] The processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors that run machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the training method for the wind turbine fault diagnosis model.
[0148] In some embodiments, the training method for the wind turbine fault diagnosis model can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the training method for the wind turbine fault diagnosis model described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to execute the training method for the wind turbine fault diagnosis model in any other appropriate manner (for example, by means of firmware).
[0149] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0150] The computer program for implementing the training method of the wind turbine fault diagnosis model of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flowchart and / or block diagram are implemented. The computer program can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0151] Example 5
[0152] The fifth embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to cause a processor to execute a method for training a wind turbine fault diagnosis model, the method comprising:
[0153] Obtain a sample data set, a wind turbine fault diagnosis model to be trained, and a discriminator to be trained. The sample data set includes multiple sample data items, each sample data item includes fault feature sample data and a unique hot code label corresponding to the fault feature sample data; the wind turbine fault diagnosis model includes multiple binary classifiers, a multi-classifier, and a comprehensive classifier; divide the sample data set into a training set, a validation set, and a test set; divide the training set based on each type of unique hot code label to obtain multiple sub-training sets, and replace the unique hot code label of each sample data item in each sub-training set with 1; train the binary classifier corresponding to the sub-training set based on the sub-training set to obtain the trained binary classifier, and record the trained binary classifier at the temperature corresponding to each temperature and humidity range. Humidity interval credibility, and based on the training set, multiple classifiers are trained to obtain a trained multiple classifier; based on the comprehensive classifier to be trained, the trained binary classifier and the trained multiple classifier, a candidate wind turbine fault diagnosis model is constructed, and, based on the verification set, the discriminator and the comprehensive classifier in the candidate wind turbine fault diagnosis model are alternately trained to obtain a trained candidate wind turbine fault diagnosis model; the trained candidate wind turbine fault diagnosis model is verified based on the test set, and if the verification fails, the wind turbine fault diagnosis model is retrained until a trained wind turbine fault diagnosis model is obtained; the trained wind turbine fault diagnosis model is a candidate wind turbine fault diagnosis model that has passed the verification; wherein , based on the validation set, the discriminator and the comprehensive classifier in the candidate wind turbine fault diagnosis model are alternately trained to obtain a trained candidate wind turbine fault diagnosis model, including: for each sample data item in the validation set, the sample data item is subjected to binary classification processing based on a binary classifier in an untrainable state to obtain a first classification result corresponding to the sample data item, and the first input information of the comprehensive classifier is determined based on the first classification results respectively corresponding to the multiple binary classifiers, and the second input information of the comprehensive classifier is determined based on the credibility of the temperature and humidity interval of the multiple binary classifiers in the temperature and humidity interval to which the sample data item belongs, and the multi-classification processing of the sample data item based on the multi-classifier in the untrainable state to obtain the second classification result corresponding to the sample data item. classification result, and determine the second classification result as the third input information of the comprehensive classifier; in the training process of the discriminator training stage: based on the comprehensive classifier in the untrainable state, predict the first input information, the second input information and the third input information to obtain the third classification result; based on the discriminator in the trainable state, determine the authenticity judgment result of the third classification result; based on the authenticity judgment results of the third classification results corresponding to multiple sample data items in the verification set, determine the first discriminator loss function; based on the discriminator in the trainable state, determine the authenticity judgment result of each unique hot code label in the verification set; based on the authenticity judgment results of the unique hot code labels corresponding to multiple sample data items in the verification set, determine the second discriminator loss function;Determine the total discriminator loss function based on the first discriminator loss function and the second discriminator loss function; adjust the parameters of the discriminator based on the total discriminator loss function; in the training process of the comprehensive classifier training phase: based on the comprehensive classifier in the trainable state, predict and process the first input information, the second input information, and the third input information to obtain a third classification result; determine the authenticity determination result of the third classification result based on the discriminator in the untrainable state; for multiple sample data items in the validation set, determine the first comprehensive classifier loss function based on the authenticity determination results of the third classification results corresponding to the multiple sample data items, and determine the second comprehensive classifier loss function based on the third classification results and the unique-hot code labels corresponding to the multiple sample data items; determine the total comprehensive classifier loss function based on the first comprehensive classifier loss function and the second comprehensive classifier loss function; adjust the parameters of the comprehensive classifier based on the total comprehensive classifier loss function; alternately execute the training process of the comprehensive classifier training phase and the training process of the discriminator training phase until a trained candidate wind turbine fault diagnosis model is obtained.
[0154] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0155] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0156] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0157] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within a cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.
[0158] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.
[0159] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A training method for a wind turbine fault diagnosis model, characterized in that: include: Obtaining a sample data set, a wind turbine fault diagnosis model to be trained, and a discriminator to be trained, wherein the sample data set includes a plurality of sample data items, each of the sample data items includes fault feature sample data and a one-hot code label corresponding to the fault feature sample data; The wind turbine fault diagnosis model includes multiple binary classifiers, a multi-classifier and a comprehensive classifier; Dividing the sample data set into a training set, a validation set, and a test set; Divide the training set based on each type of the one-hot code label to obtain multiple sub-training sets, and replace the one-hot code label of each sample data item in each of the sub-training sets with 1; Training a binary classifier corresponding to the sub-training set based on the sub-training set to obtain the trained binary classifier, recording the temperature and humidity interval credibility of the trained binary classifier corresponding to each temperature and humidity interval, and training the multi-classifier based on the training set to obtain the trained multi-classifier; Constructing a candidate wind turbine fault diagnosis model based on the comprehensive classifier to be trained, the trained binary classifier, and the trained multi-classifier, and alternately training the discriminator and the comprehensive classifier in the candidate wind turbine fault diagnosis model based on the validation set to obtain the trained candidate wind turbine fault diagnosis model; Verifying the trained candidate wind turbine fault diagnosis model based on the test set, and if the verification fails, retraining the wind turbine fault diagnosis model until a trained wind turbine fault diagnosis model is obtained; the trained wind turbine fault diagnosis model is the candidate wind turbine fault diagnosis model that passes the verification; The step of alternately training the discriminator and the comprehensive classifier in the candidate wind turbine fault diagnosis model based on the validation set to obtain the trained candidate wind turbine fault diagnosis model includes: For each of the sample data items in the validation set, binary classification processing is performed on the sample data item based on the binary classifier in an untrainable state to obtain a first classification result corresponding to the sample data item, and first input information of the comprehensive classifier is determined based on the first classification results respectively corresponding to the multiple binary classifiers, and second input information of the comprehensive classifier is determined based on the temperature and humidity interval credibility of the multiple binary classifiers in the temperature and humidity interval to which the sample data item belongs, and multi-classification processing is performed on the sample data item based on the multi-classifier in an untrainable state to obtain a second classification result corresponding to the sample data item, and the second classification result is determined as third input information of the comprehensive classifier; During the training process of the discriminator training stage: based on the comprehensive classifier in the untrainable state, the first input information, the second input information and the third input information are predicted and processed to obtain a third classification result; based on the discriminator in the trainable state, the authenticity judgment result of the third classification result is determined; based on the authenticity judgment results of the third classification results corresponding to the multiple sample data items in the verification set, a first discriminator loss function is determined; based on the discriminator in the trainable state, the authenticity judgment result of each of the unique hot code labels in the verification set is determined; based on the authenticity judgment results of the unique hot code labels corresponding to the multiple sample data items in the verification set, a second discriminator loss function is determined; based on the first discriminator loss function and the second discriminator loss function, a total discriminator loss function is determined; and parameters of the discriminator are adjusted based on the total discriminator loss function; During the training process of the comprehensive classifier training phase: based on the comprehensive classifier in a trainable state, the first input information, the second input information and the third input information are predicted and processed to obtain a third classification result; based on the discriminator in an untrainable state, the authenticity judgment result of the third classification result is determined; for multiple sample data items in the validation set, based on the authenticity judgment results of the third classification results respectively corresponding to the multiple sample data items, a first comprehensive classifier loss function is determined, and based on the third classification results and the one-hot code labels respectively corresponding to the multiple sample data items, a second comprehensive classifier loss function is determined; based on the first comprehensive classifier loss function and the second comprehensive classifier loss function, a total comprehensive classifier loss function is determined; and based on the total comprehensive classifier loss function, parameters of the comprehensive classifier are adjusted; The training process of the comprehensive classifier training phase and the training process of the discriminator training phase are performed alternately until the trained candidate wind turbine fault diagnosis model is obtained.
2. The method according to claim 1, characterized in that The sample data items also include temperature sample data and humidity sample data; accordingly, The sample dataset is represented as ,in, include said sample data items, Characterize the sample data set The sample data items; wherein, Fault feature sample data of the sample data items include physical quantity, Characterization The fault feature sample data of the sample data item The physical quantity; The one-hot code labels of the sample data items middle, Respectively represent the The sample data items are from 1 to The probability of a failure type, and There is only one item that is 100%, and the others are 0; and Representing the The temperature sample data and humidity sample data of each of the sample data items are collected.
3. The method according to claim 2, characterized in that The recorded temperature and humidity interval credibility of the trained binary classifier corresponding to each temperature and humidity interval includes: Based on the plurality of temperature sample data in the training set, determine the temperature range corresponding to the training set , and based on the plurality of humidity sample data in the training set, determine the humidity range corresponding to the training set ; Dividing the temperature range into intervals of 5 degrees Celsius to obtain a plurality of temperature intervals, and dividing the humidity range into intervals of 10% to obtain a plurality of humidity intervals, and combining each of the temperature intervals and each of the humidity intervals to obtain a plurality of the temperature and humidity intervals; During the training process of each binary classifier, the number of correct classifications and the total number of classifications of the trained binary classifier in each temperature and humidity interval are recorded, and the quotient of the number of correct classifications and the total number of classifications is determined as the temperature and humidity interval credibility of the trained binary classifier corresponding to the temperature and humidity interval; The temperature and humidity interval credibility of each trained binary classifier in each temperature and humidity interval is recorded.
4. The method according to claim 3, characterized in that The binary classifier is a decision tree model, the multi-classifier is a support vector machine model, the discriminator is a multi-layer perceptron model, and the comprehensive classifier is a two-layer BP neural network model. The first layer of the BP neural network of the comprehensive classifier includes a plurality of first layer neurons, and the second layer of the BP neural network of the comprehensive classifier includes a plurality of second layer neurons, wherein the number of the first layer neurons and the number of the second layer neurons are both the same as the number of the fault types; accordingly, The process of determining the third classification result includes: The initial weights of the plurality of neurons in the first layer are set based on the second input information, and the initial bias of the first layer BP neural network is set based on the third input information; wherein the second input information is represented as ,in, Characterization The two classifiers are The temperature and humidity range to which the sample data items belong Corresponding temperature and humidity interval credibility; the third input information is expressed as ,in, Characterize the first The sample data item is The probability of each failure type; Calculation is performed based on the first input information and the initial weights and initial biases of the first layer of the BP neural network to obtain the output result of the first layer of the BP neural network: ,in, For the The two classifiers are The temperature and humidity range to which the sample data items belong The corresponding temperature and humidity interval credibility, is the first The sample data item is The probability of a fault type; the first input information includes ,in, Characterization The binary classifier predicts the The sample data item is The probability of each failure type; Characterize the first layer of BP neural network prediction The sample data item is The probability of each failure type; The third classification result is obtained by performing calculation based on the output result of the first layer BP neural network and the second layer BP neural network: ,in, For the The weights of the second layer neurons; For the The bias of the second layer neurons; Characterize the second layer BP neural network prediction The sample data item is The probability of a failure type.
5. The method according to claim 4, characterized in that The determining of the total integrated classifier loss function based on the first integrated classifier loss function and the second integrated classifier loss function comprises: The first comprehensive classifier loss function and the second comprehensive classifier loss function are weighted and summed to obtain the total comprehensive classifier loss function; wherein the total comprehensive classifier loss function is expressed as: , where the first integrated classifier loss function is expressed as , Characterizing the authenticity determination result, the second comprehensive classifier loss function is expressed as ,in, Characterize batch size; The determining of a total discriminator loss function based on the first discriminator loss function and the second discriminator loss function includes: The first discriminator loss function and the second discriminator loss function are weightedly summed to obtain the total discriminator loss function; wherein the total discriminator loss function is expressed as: , where the first discriminator loss function is expressed as: , the second discriminator loss function is expressed as: .
6. The method according to claim 1, characterized in that The sample data items in the sample data set are all derived from the first type of wind turbines; accordingly, The training method of the wind turbine fault diagnosis model further includes: Obtaining a migration sample data set, the migration sample data set including a plurality of migration sample data items, each of the migration sample data items including migration fault feature sample data and a migration one-hot code label corresponding to the migration fault feature sample data; wherein the plurality of migration sample data items are all from a second-type wind turbine; the second-type wind turbine being a wind turbine of a different type from the first-type wind turbine; The additional fully connected layer in the migrated wind turbine fault diagnosis model is trained based on the migrated sample data set to obtain the trained migrated wind turbine fault diagnosis model; the migrated wind turbine fault diagnosis model includes the wind turbine fault diagnosis model trained based on the sample data set and the additional fully connected layer, and the additional fully connected layer is arranged at the end of the wind turbine fault diagnosis model.
7. The method according to claim 1, characterized in that The dividing the sample data set into a training set, a validation set, and a test set comprises: Performing data expansion on the sample data set; performing normalization processing on the sample data set after data expansion; Based on the ratios of 40%, 40% and 20%, the normalized sample data set is randomly divided into the training set, the validation set and the test set.
8. A training device for a wind turbine fault diagnosis model, characterized in that: include: A sample data set and to-be-trained model acquisition module, configured to acquire a sample data set, a wind turbine fault diagnosis model to be trained, and a discriminator to be trained, wherein the sample data set includes a plurality of sample data items, each of which includes fault feature sample data and a one-hot code label corresponding to the fault feature sample data; The wind turbine fault diagnosis model includes multiple binary classifiers, a multi-classifier and a comprehensive classifier; A sample data set division module, used to divide the sample data set into a training set, a validation set and a test set; a sub-training set partitioning module, configured to partition the training set based on each type of the one-hot code label to obtain a plurality of sub-training sets, and replace the one-hot code label of each sample data item in each sub-training set with 1; a binary classifier and multi-classifier training module, configured to train the binary classifier corresponding to the sub-training set based on the sub-training set to obtain the trained binary classifier, record the temperature and humidity interval credibility of the trained binary classifier corresponding to each temperature and humidity interval, and train the multi-classifier based on the training set to obtain the trained multi-classifier; a candidate wind turbine fault diagnosis model training module, configured to construct a candidate wind turbine fault diagnosis model based on the comprehensive classifier to be trained, the trained binary classifier, and the trained multi-classifier, and to alternately train the discriminator and the comprehensive classifier in the candidate wind turbine fault diagnosis model based on the validation set to obtain the trained candidate wind turbine fault diagnosis model; a candidate wind turbine fault diagnosis model verification module, configured to verify the trained candidate wind turbine fault diagnosis model based on the test set, and if the verification fails, retrain the wind turbine fault diagnosis model until a trained wind turbine fault diagnosis model is obtained; the trained wind turbine fault diagnosis model is the candidate wind turbine fault diagnosis model that passes the verification; The candidate wind turbine fault diagnosis model training module is specifically used to: For each of the sample data items in the validation set, binary classification processing is performed on the sample data item based on the binary classifier in an untrainable state to obtain a first classification result corresponding to the sample data item, and first input information of the comprehensive classifier is determined based on the first classification results respectively corresponding to the multiple binary classifiers, and second input information of the comprehensive classifier is determined based on the temperature and humidity interval credibility of the multiple binary classifiers in the temperature and humidity interval to which the sample data item belongs, and multi-classification processing is performed on the sample data item based on the multi-classifier in an untrainable state to obtain a second classification result corresponding to the sample data item, and the second classification result is determined as third input information of the comprehensive classifier; During the training process of the discriminator training stage: based on the comprehensive classifier in the untrainable state, the first input information, the second input information and the third input information are predicted and processed to obtain a third classification result; based on the discriminator in the trainable state, the authenticity judgment result of the third classification result is determined; based on the authenticity judgment results of the third classification results corresponding to the multiple sample data items in the verification set, a first discriminator loss function is determined; based on the discriminator in the trainable state, the authenticity judgment result of each of the unique hot code labels in the verification set is determined; based on the authenticity judgment results of the unique hot code labels corresponding to the multiple sample data items in the verification set, a second discriminator loss function is determined; based on the first discriminator loss function and the second discriminator loss function, a total discriminator loss function is determined; and parameters of the discriminator are adjusted based on the total discriminator loss function; During the training process of the comprehensive classifier training phase: based on the comprehensive classifier in a trainable state, the first input information, the second input information and the third input information are predicted and processed to obtain a third classification result; based on the discriminator in an untrainable state, the authenticity judgment result of the third classification result is determined; for multiple sample data items in the validation set, based on the authenticity judgment results of the third classification results respectively corresponding to the multiple sample data items, a first comprehensive classifier loss function is determined, and based on the third classification results and the one-hot code labels respectively corresponding to the multiple sample data items, a second comprehensive classifier loss function is determined; based on the first comprehensive classifier loss function and the second comprehensive classifier loss function, a total comprehensive classifier loss function is determined; and based on the total comprehensive classifier loss function, parameters of the comprehensive classifier are adjusted; The training process of the comprehensive classifier training phase and the training process of the discriminator training phase are performed alternately until the trained candidate wind turbine fault diagnosis model is obtained.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the training method for the wind turbine fault diagnosis model according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the training method of a wind turbine fault diagnosis model according to any one of claims 1 to 7 when executed.
Citation Information
Patent Citations
Wind turbine planetary gear box fault diagnosis method based on ACGAN
CN111337243A
DMSTFA-based multi-classifier equipment fault diagnosis method
CN114970702A