Wind turbine generator fault diagnosis model training method and device, equipment and medium
By training binary classifiers and multi-classifiers based on sub-training sets in the wind turbine fault diagnosis model, and alternately training discriminators and comprehensive classifiers, the problem of poor generalization ability of the existing technology stroke motor unit fault diagnosis model is solved, and the problem of poor generalization of the existing stroke motor unit fault diagnosis model is improved. Fault detection accuracy and computing resource utilization efficiency.
Patent Information
- Application Number
- CN202410990011.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2044-07-23
AI Technical Summary
In the prior art, data expansion based on the generative adversarial network algorithm is high in time and computing resource costs, and the expanded sample data quality problems affect the accuracy of the fault classification model, resulting in poor generalization capabilities of the wind turbine fault diagnosis model.
By obtaining the sample data set and dividing it into a training set, a validation set and a test set, training binary classifiers and multi-classifiers based on the sub-training set, building a candidate wind turbine fault diagnosis model, and alternately training of discriminators and comprehensive classifiers , improve the generalization ability and detection accuracy of the model.
The generalization capability and fault detection accuracy of the wind turbine fault diagnosis model are improved, and the impact of computing resource requirements and data quality problems is reduced.
Smart Images

Figure CN118940035A_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 fault diagnosis model. Background Art
[0002] Wind power is one of the fastest growing renewable energy sources in the world. With the continuous 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 the core concern of the industry. Therefore, whether the faults of wind power equipment can be detected and classified in a timely and effective manner is directly related to the operating efficiency of the wind farm, the maintenance cost of the equipment and the safety of the entire system.
[0003] At present, the existing technology usually obtains the original sample data collected by the sensor set on the wind power equipment, and expands the original sample data based on the generative adversarial network algorithm, so as to train 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 problems, 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] Obtain 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 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 a plurality of 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 each type of unique hot code label to obtain multiple sub-training sets, and the unique hot code label of each sample data item in each sub-training set is replaced with 1;
[0010] Based on the sub-training set, a 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 verified candidate wind turbine fault diagnosis model;
[0013] Among them, the discriminator and the comprehensive classifier in the candidate wind turbine fault diagnosis model are alternately trained based on the verification set to obtain a 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 a non-trainable 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 a plurality of binary classifiers, and second input information of the comprehensive classifier is determined based on the temperature and humidity interval credibility of the plurality of 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 a multi-classifier in a non-trainable 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 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 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; based on the total discriminator loss function, the parameters of the discriminator are adjusted;
[0016] During the training process of the comprehensive classifier training stage: 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; based on the total comprehensive classifier loss function, the parameters of the comprehensive classifier are adjusted based on the total comprehensive classifier loss function;
[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] The 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 a plurality of 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 a plurality of 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] A sub-training set partitioning module is used to partition 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;
[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 the trained binary classifier, and record the temperature and humidity interval credibility corresponding to the trained binary classifier in each temperature and humidity interval, and train the multi-classifier based on the training set to obtain the trained multi-classifier;
[0023] A candidate wind turbine fault diagnosis model training module is used 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 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 verified candidate wind turbine fault diagnosis model;
[0025] Among them, the candidate wind turbine fault diagnosis model training module is specifically used for:
[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 a non-trainable 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 a plurality of binary classifiers, and second input information of the comprehensive classifier is determined based on the temperature and humidity interval credibility of the plurality of 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 a multi-classifier in a non-trainable 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 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 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; based on the total discriminator loss function, the parameters of the discriminator are adjusted;
[0028] During the training process of the comprehensive classifier training stage: 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; based on the total comprehensive classifier loss function, the parameters of the comprehensive classifier are adjusted based on the total comprehensive classifier loss function;
[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 executable by at least one processor, and the computer program is executed by 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 implementing the training method of the wind turbine fault diagnosis model of any embodiment of the present invention when executed by a processor.
[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 the trained binary classifier, record the credibility of the temperature and humidity interval corresponding to the trained binary classifier in each temperature and humidity interval, and train multiple classifiers based on the training set to obtain the trained multiple classifier; based on the comprehensive classifier to be trained, the trained binary classifier and the trained multiple classifier, construct a candidate wind turbine fault diagnosis model, and, based on the verification set, alternately train the discriminator and the comprehensive classifier in the candidate wind turbine fault diagnosis model to obtain the 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 contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily 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 It is a flow chart of a training method of a wind turbine fault diagnosis model provided in the first embodiment of the present invention;
[0039] Figure 2 is a flow chart of a method for training a wind turbine fault diagnosis model provided in Embodiment 2 of the present invention;
[0040] Figure 3 It is a structural schematic diagram of a training device for a wind turbine fault diagnosis model provided by a third embodiment of the present invention;
[0041] Figure 4 It is a structural schematic diagram of an electronic device provided in Embodiment 4 of the present invention. DETAILED DESCRIPTION
[0042] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0043] It should be noted that the terms "first", "second", etc. in the specification 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 data 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 that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0044] Embodiment 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, 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 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 a logical identifier "1", and the other coding elements are all logical identifiers "0". Each fault type corresponds to a unique hot code label. Exemplarily, 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 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 to 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 multiple sample data items corresponding to 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. In the process of training a wind turbine fault diagnosis model, the sample data set can be called from a 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 multiple classifier is used to determine the second probability that the fault feature sample data belongs to multiple fault types respectively, wherein the inputs of the binary classifier and the multiple classifier are both fault feature sample data. Exemplarily, assuming that there are M fault types in the wind turbine, there are M binary classifiers in the wind turbine fault diagnosis model, and the output results of the multiple classifiers include the second probabilities corresponding to the M fault types respectively. The comprehensive classifier is used to fuse the first probabilities of multiple binary classifiers and the second probabilities of multiple classifiers. The discriminator is used to predict the authenticity of the output results of the wind turbine fault diagnosis model. The wind turbine fault diagnosis model to be trained and the discriminator to be trained are obtained by calling the pre-stored untrained wind turbine fault diagnosis model and the discriminator.
[0050] S120, dividing 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 dividing multiple sample data items in a sample data set. Optionally, data expansion is performed on the sample data set; the sample data set after data expansion is normalized; and the normalized sample data set is randomly divided into a training set, a validation set and a test set based on a ratio of 40%, 40% and 20%.
[0053] Specifically, the sample data set is expanded based on a preset data expansion algorithm to increase the data size of the sample data set, wherein the preset data expansion algorithm is a pre-set algorithm capable of expanding the sample data set, and exemplary, the preset data expansion algorithm is a data enhancement algorithm based on Gaussian white noise. The sample data set after data expansion is normalized to scale multiple fault feature sample data in the sample data set to the same numerical range to eliminate the numerical size difference between different fault feature sample data, thereby ensuring the stability of the wind turbine fault diagnosis model during training. Exemplarily, the fault feature sample data in multiple sample data items are all scaled to [0,1] or [-1,1]. By dividing 40% of the sample data items in the normalized sample data set into a training set, 40% of the sample data items into a verification set, and 20% of the sample data items into a test set, it can be ensured that there are enough sample data items to verify the performance of the wind turbine fault diagnosis model on unseen data, which helps to improve 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 the training set, by dividing the sample data items with the same unique hot code label into the same sub-training set, sub-training sets corresponding to multiple fault types are obtained. Exemplarily, the unique hot code labels of multiple sample data items in the mth training subset are all unique hot code labels that characterize the mth fault type. By replacing the unique hot code label of each sample data item in each sub-training set with the logical identifier 1, the amount of data of the unique hot code label in the sub-training set can be reduced, which helps to save computing resources and improve the training efficiency of the binary classifier.
[0056] S140, training a binary classifier corresponding to the sub-training set based on the sub-training set to obtain a trained binary classifier, and recording the temperature and humidity interval credibility of the trained binary classifier corresponding to each temperature and humidity interval, and training 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, wherein the temperature interval is the interval to which the temperature of the environment in which the wind turbine is located belongs at the time of characteristic physical quantity collection; the humidity interval is the interval to which the humidity of the environment in which the wind turbine is located belongs at the time of characteristic physical quantity collection. Exemplarily, 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. In 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, determines the binary classification loss function corresponding to the binary classifier based on the predicted fault type and the fault type, and adjusts the parameters of the binary classifier 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, determine the temperature and humidity interval credibility corresponding to each binary classifier in each temperature and humidity interval.
[0059] In 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 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 according to the fault type corresponding to the maximum second probability among the multiple second probabilities, determines the multi-classification loss function corresponding to the multi-classifier based on the predicted fault type and the fault type, and adjusts the parameters of the multi-classifier based on the multi-classification loss function to obtain a trained multi-classifier. Exemplarily, the loss function constituting 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, 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 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, wherein 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 the candidate wind turbine fault diagnosis model and the discriminator, wherein the candidate wind turbine fault diagnosis model is the generator in the generative adversarial model. By inputting the fault feature sample data in the validation set into the generative adversarial model, the model parameters of the discriminator and the model parameters of the comprehensive classifier in the candidate wind turbine fault diagnosis model are alternately adjusted until the generative adversarial training stop condition is met, thereby obtaining a trained candidate wind turbine fault diagnosis model. The generative adversarial training stop condition may be to reach a fixed number of generative adversarial training rounds.
[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, binary classification 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 multiple binary classifiers, and second input information of the comprehensive classifier is determined 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 multi-classification is performed 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 the second classification result is determined as the third input information of the comprehensive classifier.
[0066] Specifically, in the comprehensive classifier training stage and the discriminator training stage, multiple binary classifiers in an untrainable state are used to perform binary classification on the fault feature sample data in each sample data item in the validation set, and the first classification results corresponding to the sample data items respectively output by the multiple binary classifiers are obtained, wherein the first classification result is a first probability, and the first input information of the comprehensive classifier is obtained by combining the first classification results respectively corresponding to the multiple binary classifiers. Exemplarily, 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 temperature and humidity interval is queried in the recorded temperature and humidity interval credibility of each binary classifier in the temperature and humidity interval to which the sample data item belongs, and the second input information of the comprehensive classifier is obtained. Exemplarily, 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 M binary classifiers corresponding to the temperature and humidity interval ts is queried, and the second input information is obtained. It can be understood that each first classification result in the first input information corresponds to a temperature and humidity interval credibility.
[0068] In both the comprehensive classifier training stage and the discriminator training stage, multi-classification processing is performed on the fault feature sample data in each sample data item in the verification set based on the multi-classifier in the untrainable state 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 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 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, in the discriminator training stage, 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 an 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 an 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 data set and the one-hot code label data set into the discriminator, the discriminator makes authenticity predictions for the third classification results in the third classification result data set and the one-hot code labels in the one-hot code label data set, respectively, to obtain the authenticity judgment results of the third classification results and the authenticity judgment results of the one-hot code labels. By calculating the difference between the authenticity judgment result of each third classification result and the authenticity label representing the false data, the first discriminator loss item corresponding to each third classification result is obtained, and the average value of the first discriminator loss items corresponding to multiple third classification results in the third classification result data set is determined as the first discriminator loss function. By calculating the difference between the authenticity judgment result of each one-hot code label and the authenticity label representing the true data, the second discriminator loss item corresponding to each one-hot code label is obtained, and the average value of the second discriminator loss items corresponding to multiple one-hot code labels in the one-hot code label data set 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, the total discriminator loss function is obtained. By back-propagating the total discriminator loss function and adjusting the discriminator model parameters, a round of discriminator training is completed.
[0072] Exemplarily, 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, multiple batches are included in each round of training, and the batch size H represents that in each batch of training, the fault feature sample data of H sample data items in the verification 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 unique code label data set is represented as: Among them, (b 1h ,…,b mh ,…,b Mh ) represents the unique-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 stage: 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 verification 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 unique 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.
[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 (for example, logical identification 1) representing the true data, the first comprehensive classifier loss item corresponding to each sample data item is determined, and the average value of the first comprehensive classifier loss items 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 unique hot code label. By calculating the difference between the third classification result corresponding to each sample data item and the unique hot code label, the second comprehensive classifier loss item corresponding to each sample data item is obtained, and the average value of the second comprehensive classifier loss items corresponding to multiple sample data items is determined as the second comprehensive classifier loss function. The total comprehensive classifier loss function is obtained by weighted summing the first comprehensive classifier loss function and the second comprehensive classifier loss function. By back-propagating the total comprehensive classifier loss function and adjusting the model parameters of the comprehensive classifier, a round of training of the comprehensive classifier is completed. Exemplarily, the authenticity determination result is an authenticity determination result representing false data (e.g., logical identification 0) and an authenticity determination result 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 the generative adversarial training process, the discriminator and the comprehensive classifier are trained alternately. When the current training batch meets the generative adversarial training stop condition, the training of the comprehensive classifier and the discriminator is terminated, and the candidate wind turbine fault diagnosis model obtained by the current training batch is determined as the trained candidate wind turbine fault diagnosis model. Exemplarily, each training round performs training of multiple training batches. During the training process of each training batch, the training process of the discriminator is performed first, and then the training process of the comprehensive classifier training stage is performed.
[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 verified candidate wind turbine fault diagnosis model.
[0080] Specifically, by inputting multiple sample data items in the test set into the trained candidate wind turbine fault detection model, the trained candidate wind turbine fault detection model performs prediction processing on the fault feature sample data of each input sample data item to obtain a fault classification result. Based on the unique hot code labels and fault classification results corresponding to the multiple sample data items in the test set, the detection accuracy of the trained candidate wind turbine fault detection model is determined.
[0081] When the detection accuracy is less than the preset detection accuracy threshold, it can be considered that the trained candidate wind turbine fault detection model cannot accurately detect the wind turbine fault, and the verification is judged to be unsuccessful, and the wind turbine fault diagnosis model and discriminator are retrained. The preset detection accuracy threshold is a pre-set detection accuracy threshold, which is used to determine whether the candidate wind turbine fault detection model has passed the verification. For example, the preset detection accuracy threshold is 0.95.
[0082] When the detection accuracy is greater than or equal to the preset detection accuracy threshold, it can be considered that the trained candidate wind turbine fault detection model can obtain accurate detection results, and the verification is judged to be passed, and the trained candidate wind turbine fault detection model is stored as a trained wind turbine fault diagnosis model, so that the trained wind turbine fault diagnosis model can be subsequently called to perform fault detection on the wind turbine to be detected. The wind turbine to be detected is a wind turbine that needs to be fault-detected.
[0083] It should be noted that wind turbines can be divided into multiple types of wind turbines, illustratively, including but not limited to direct-drive wind turbines, semi-direct-drive wind turbines and doubly-fed wind turbines. When the type of wind turbine to which the sample source wind turbine belongs is the same as the type of wind turbine to which the wind turbine to be detected belongs, the trained wind turbine fault diagnosis model can be directly used to perform fault detection on the wind turbine to be detected, wherein 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 detected is the wind turbine that needs to be fault-detected 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 data set includes a plurality of migration sample data items, each of which includes migration fault feature sample data and a migration unique hot code label corresponding to the migration fault feature sample data. The plurality of migration 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. The migration 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 set at the end of the wind turbine fault diagnosis model.
[0086] Specifically, the migration sample data set is pre-stored locally and / or in a server, and in the process of performing migration training on the wind turbine fault diagnosis model, the migration sample data set can be called from the local and / or server. By calling the wind turbine fault diagnosis model trained based on the sample data set from the first type of wind turbine, and embedding an additional fully connected layer at the end of the wind turbine fault diagnosis model, the migration wind turbine fault diagnosis model to be trained is obtained. 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 the migration fault feature sample data in the migration sample data set into the migration wind turbine fault diagnosis model to be trained, the migration fault detection result corresponding to the migration fault feature sample data is obtained. The migration loss function is determined based on the migration fault detection result corresponding to the migration fault feature sample data and the migration unique hot code label. The 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 the trained binary classifier, record the credibility of the temperature and humidity interval corresponding to the trained binary classifier in each temperature and humidity interval, and train multiple classifiers based on the training set to obtain the 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 the 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, which solves the problem of poor generalization ability of the wind turbine fault diagnosis model and improves the generalization ability and fault detection accuracy of the wind turbine fault diagnosis model.
[0088] Embodiment 2
[0089] Figure 2 1 is a flow chart of a method for training 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] 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 unique hot code label of the i-th sample data item Middle, b i1 ,…,b im ,…,b iM Respectively represent the probability that the i-th sample data item is the 1st to the Mth fault type, and b i1 ,…,b im ,…,b iM There is only one item that is 100%, and the others are 0; t i and i They respectively represent the temperature sample data and humidity sample data when the i-th sample data item is collected.
[0092] Exemplarily, 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, training the binary classifier corresponding to the sub-training set based on the sub-training set to obtain a trained binary classifier, and recording the temperature and humidity interval credibility of the trained binary classifier corresponding to each temperature and humidity interval, and training 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, determine the temperature range [T1, T2] corresponding to the training set, and based on multiple humidity sample data in the training set, determine the humidity range [S1, S2] corresponding to 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 temperature interval and each humidity interval to obtain multiple temperature and humidity intervals; in the training process of each binary classifier, 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 corresponding to 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.
[0097] Specifically, by determining the maximum temperature sample data and the minimum temperature sample data in the temperature sample data respectively included in the multiple temperature sample data in the training set, and constructing the temperature range corresponding to the training set based on the maximum temperature sample data and the minimum temperature sample data. By determining the maximum humidity sample data and the minimum humidity sample data in the humidity sample data respectively included in the multiple humidity sample data in the training set, and constructing the humidity range corresponding to the training set 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. Exemplarily, the number of temperature intervals T = (T2-T1) / 5, then 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 at least one round of training results, the target training results corresponding to the trained binary classifier can be recorded. For example, the training results of each round of training can be stored to determine the training results of the training round in which the trained binary classifier is obtained as the target training results; or when the trained binary classifier is the binary classifier corresponding to the maximum training round, the training results of the maximum training round can be stored, and this embodiment does not limit 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 result, the temperature and humidity interval credibility of the trained binary classifier corresponding to the temperature and humidity interval is obtained. For example, the temperature and humidity interval credibility of the mth binary classifier corresponding to 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 Characterizes 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. In the application process 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, 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 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 verification set to obtain a trained candidate wind turbine fault diagnosis model, including:
[0106] S2501. For each sample data item in the validation set, binary classification 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 multiple binary classifiers, and second input information of the comprehensive classifier is determined 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 multi-classification is performed 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 the second classification result is determined as the third input information of the comprehensive classifier.
[0107] S2502. 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 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 stage: 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 verification 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.
[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, 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 of each first-layer neuron of the comprehensive classifier includes the output of a binary classifier corresponding to the first-layer neuron and an element of the output of the multi-classifier. The output of each second-layer neuron of the comprehensive classifier includes an element of the output of the wind turbine fault diagnosis model. Correspondingly, the process of determining the third classification result includes: setting the initial weights of multiple first-layer neurons based on the second input information, and setting the initial bias of 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 of BP neural network to obtain the output result of the first layer of 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, and 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 comprehensive 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 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 performing cross entropy calculation on the third classification results and the included unique hot code labels corresponding to the H sample data items. Exemplarily, 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 unique hot code labels included in the H sample data items, and obtains the authenticity judgment results corresponding to the H unique 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 unique 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, makes the data distribution of the third classification result close to the data distribution of the unique hot code label corresponding to the fault feature sample data, and helps to improve the discriminant 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 verified candidate wind turbine fault diagnosis model.
[0121] The technical solution of this embodiment, 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] Embodiment 3
[0123] Figure 3 Schematic diagram of the structure 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 comprises:
[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 a plurality of 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 a plurality of 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] A sub-training set partitioning module 330 is used to partition 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;
[0127] A binary classifier and multi-classifier training module 340 is used to train a binary classifier corresponding to a sub-training set based on the sub-training set to obtain a trained binary classifier, and record the temperature and humidity interval credibility of the trained binary classifier corresponding to 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 is used 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 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, 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 verified candidate wind turbine fault diagnosis model;
[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 items belong, 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, predict the first input information, the second input information and the third input information to obtain a third classification result; based on the discriminator in a trainable state, determine the authenticity judgment result of the third classification result; based on the authenticity judgment result of the third classification result corresponding to multiple sample data items in the verification set, determine the first discriminator loss function; based on the discriminator in a trainable state, determine the authenticity judgment of each unique hot code label in the verification set Determine the result; determine the second discriminator loss function based on the authenticity judgment results of the unique hot code labels corresponding to multiple sample data items in the verification set; 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 stage: based on the trainable 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 discriminator in the untrainable state; 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; 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 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 the trained binary classifier, record the credibility of the temperature and humidity interval corresponding to the trained binary classifier in each temperature and humidity interval, and train multiple classifiers based on the training set to obtain the 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 the 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, which solves the problem of poor generalization ability of the wind turbine fault diagnosis model and improves 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 expressed 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 unique hot code label of the i-th sample data item Middle, b i1 ,…,b im ,…,b iM Respectively represent the probability that the i-th sample data item is the 1st to the Mth fault type, and b i1 ,…,b im ,…,b iM There is only one item that is 100%, and the others are 0; t i and i They respectively represent the temperature sample data and humidity sample data when the i-th sample data item is collected.
[0133] On the basis of the above embodiment, optionally, the 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 classification number as the temperature and humidity interval credibility corresponding to 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 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, the comprehensive classifier is a two-layer BP neural network model, the first layer BP neural network of the comprehensive classifier includes a plurality of first layer neurons, the second layer 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 the same as the number of the fault types; accordingly, the candidate wind turbine fault diagnosis model training module 350 is specifically used to: set the initial weights of the plurality of 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 temperature and humidity interval credibility of the mth binary classifier corresponding to the temperature and humidity interval xy of 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 of BP neural network to obtain the output result of the first layer of 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 comprehensive classifier loss function is expressed as D(·) represents the authenticity judgment result, and the loss function of the second comprehensive classifier is expressed as Wherein, 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] On the basis of the above embodiment, optionally, the sample data items in the sample data set are all derived from the first type of wind turbines; accordingly, the training device of the wind turbine fault diagnosis model also includes a migration training module; wherein the migration training module is used to obtain a migration sample data set, the migration sample data set includes multiple migration sample data items, each migration sample data item includes migration fault feature sample data and a migration unique hot code label corresponding to the migration fault feature sample data; wherein the multiple migration sample data items are all derived from the second type of wind turbines; the second type of wind turbines are wind turbines of a different type from the first type of wind turbines; based on the migration sample data set, the additional fully connected layer in the migration wind turbine fault diagnosis model is trained to obtain a trained migration wind turbine fault diagnosis model; the migration 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 division module 320 is specifically used to: perform data expansion on the sample data set; normalize 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 training device for the wind turbine fault diagnosis model provided in the embodiment of the present invention can execute the training method for the wind turbine fault diagnosis model provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0143] Embodiment 4
[0144] Figure 4 1 is a schematic diagram of the structure 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 connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and 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 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0146] A number of 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 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 through a computer network such as the Internet and / or various telecommunication networks.
[0147] The processor 11 may be a variety of general and / or special processing components 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 special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 11 executes the various methods and processes described above, such as a training method for a wind turbine fault diagnosis model.
[0148] In some embodiments, the training method of 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 a 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 of 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 of the wind turbine fault diagnosis model in any other appropriate manner (for example, by means of firmware).
[0149] Various implementations of the systems and techniques described above 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), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including 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 flow chart and / or block diagram are implemented. The computer program can be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as an independent software package, or completely on a remote machine or server.
[0151] Embodiment 5
[0152] Embodiment 5 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 enable a processor to execute a training method for a wind turbine fault diagnosis model, the method comprising:
[0153] A sample data set, a wind turbine fault diagnosis model to be trained, and a discriminator to be trained are obtained, wherein 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; the sample data set is divided into a training set, a validation set, and a test set; the training set is divided based on each type of unique hot code label to obtain multiple sub-training sets, and the unique hot code label of each sample data item in each sub-training set is replaced with 1; the binary classifier corresponding to the sub-training set is trained based on the sub-training set to obtain the trained binary classifier, and the trained binary classifier is recorded at the temperature corresponding to each temperature and humidity range. Humidity interval credibility, and train multiple classifiers based on the training set 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 verified candidate wind turbine fault diagnosis model; 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 a first input information of the comprehensive classifier is determined based on the first classification results respectively corresponding to a plurality of binary classifiers, and a second input information of the comprehensive classifier is determined based on the credibility of the temperature and humidity interval of the plurality of binary classifiers in the temperature and humidity interval to which the sample data item belongs, and a multi-classification processing is performed 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. 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, the first input information, the second input information and the third input information are predicted and processed to obtain the 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;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 stage: 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 the third classification result; determine the authenticity judgment 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 judgment 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 stage and the training process of the discriminator training stage until a trained candidate wind turbine fault diagnosis model is obtained. ;
[0154] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0155] To provide interaction with a user, the systems and techniques described herein may 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 a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0156] The systems and techniques described herein may be implemented in a computing system that includes backend 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 frontend components (e.g., a user computer with a graphical user interface or a 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 backend components, middleware components, or frontend components. The components of the system may 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 a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0158] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0159] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope 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 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 a plurality of 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; Based on the sub-training set, train the binary classifier corresponding to the sub-training set to obtain the trained binary classifier, record the temperature and humidity interval credibility corresponding to each temperature and humidity interval of the trained binary classifier, and train the multi-classifier based on the training set to obtain the trained multi-classifier; 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 the 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 the verified candidate wind turbine fault diagnosis model; The step of alternately training the discriminator and the comprehensive classifier in the candidate wind turbine fault diagnosis model based on the verification 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 plurality of binary classifiers, and second input information of the comprehensive classifier is determined based on the credibility of the temperature and humidity intervals of the plurality of binary classifiers in the temperature and humidity intervals 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 plurality of 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 plurality of 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 based on the total discriminator loss function, parameters of the discriminator are adjusted; During the training process of the comprehensive classifier training stage: 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 a non-trainable state, the authenticity judgment result of the third classification result is determined; for multiple sample data items in the verification 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 unique 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; based on the total comprehensive classifier loss function, the 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 data set is represented as in, comprising I of the sample data items, Characterizes 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 unique hot code label of the i-th sample data item Middle, 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; t i and i They respectively represent the temperature sample data and the humidity sample data when the i-th sample data item is collected.
3. The method according to claim 2, characterized in that The recorded trained binary classifier corresponds to the temperature and humidity interval credibility in each temperature and humidity interval, including: Based on the plurality of temperature sample data in the training set, determine the temperature range [T1, T2] corresponding to the training set, and based on the plurality of humidity sample data in the training set, determine the humidity range [S1, S2] corresponding to the training set; Dividing the temperature range into intervals based on a temperature interval of 5 degrees Celsius to obtain a plurality of temperature intervals, and dividing the humidity range into intervals based on a humidity interval 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, 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, 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 Among them, P ts,m Characterizes the temperature and humidity interval credibility of the mth binary classifier corresponding to the temperature and humidity interval xy to which the i-th sample data item belongs; 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; Based on the first input information and the initial bias and initial offset of the first layer of the BP neural network, a calculation is performed to obtain an output result of the first layer of the BP neural network: 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; 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: 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.
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: loss G =(loss G1 +loss G2 ) / 2, wherein the first comprehensive classifier loss function is expressed as D(·) represents the authenticity determination result, and the second comprehensive classifier loss function is expressed as Among them, H represents the batch size; The determining of the total discriminator loss function based on the first discriminator loss function and the second discriminator loss function comprises: 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, wherein 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 from the first type of wind turbines; accordingly, The training method of the wind turbine fault diagnosis model further includes: Acquire a migration sample data set, wherein the migration sample data set includes a plurality of migration sample data items, each of the migration sample data items includes migration fault feature sample data and a migration unique hot code label corresponding to the migration fault feature sample data; wherein the plurality of migration sample data items are all derived from a 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; The additional fully connected layer in the migration wind turbine fault diagnosis model is trained based on the migration sample data set to obtain the trained migration wind turbine fault diagnosis model; the migration 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 step of 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; Normalizing 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 a model to be trained acquisition module, used 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 unique hot code label corresponding to the fault feature sample data; The wind turbine fault diagnosis model includes a plurality of 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, used for partitioning the training set based on each type of the 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; A binary classifier and multi-classifier training module, used for training the binary classifier corresponding to the sub-training set based on the sub-training set to obtain the trained binary classifier, and recording the temperature and humidity interval credibility corresponding to each temperature and humidity interval of the trained binary classifier, and training the multi-classifier based on the training set to obtain the trained multi-classifier; A candidate wind turbine fault diagnosis model training module is used 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 is used 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 has passed the verification; The candidate wind turbine fault diagnosis model training module is specifically used for: 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 plurality of binary classifiers, and second input information of the comprehensive classifier is determined based on the credibility of the temperature and humidity intervals of the plurality of binary classifiers in the temperature and humidity intervals 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 plurality of 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 plurality of 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 based on the total discriminator loss function, parameters of the discriminator are adjusted; During the training process of the comprehensive classifier training stage: 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 a non-trainable state, the authenticity judgment result of the third classification result is determined; for multiple sample data items in the verification 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 unique 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; based on the total comprehensive classifier loss function, the 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 described in any one of claims 1-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 for 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
Construction method and device of rotary mechanical equipment fault diagnosis model
CN116881832A
Gear case fault diagnosis method based on deep transfer learning
CN116894187A
