Stator temperature prediction method for pumped storage motor based on seven-branch knowledge distillation
The seven-branch knowledge distillation method is used to process the detection data of the pumped storage power station, identify and handle outliers and missing values, and use the Transformer and LSTM models to predict the stator temperature of the generator. This solves the problems of low data quality and large prediction errors in the existing technology and achieves more accurate temperature monitoring.
Patent Information
- Application Number
- CN202510113897.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2045-01-24
AI Technical Summary
In existing technologies for pumped-storage power stations, there are many detection indicators and missing values and abnormal values are prone to occur during the data collection process, resulting in low model fitting, small scope of application and large detection errors, making it impossible to effectively monitor and predict the generator stator temperature.
A seven-branch knowledge distillation method is adopted to obtain the time series data of detection indicators through an external measurement device, identify and process outliers and missing values, construct seven Transformer teacher models for training, output soft labels, and use the LSTM student model to predict the generator stator temperature.
It improves data quality, enhances the ability to capture complex patterns between detection indicators, achieves more accurate prediction of generator stator temperature, and reduces detection errors.
Smart Images

Figure CN119962629B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of fault monitoring of hydropower stations, and in particular relates to a pumped storage motor stator temperature prediction method based on seven-branch knowledge distillation. Background Art
[0002] The speed control system of a pumped storage power station is a key part of the normal operation of the power station. It can monitor and adjust the speed of the water pump and generator in real time. The speed control system consists of a speed measuring device, a speed regulator, an actuator, etc.
[0003] Common faults include stuck guide vanes and leaky pipes, which can cause water flow to deviate from the intended target, leading to overheating of the generator stator, potentially damaging the equipment and posing safety risks. Failure to promptly detect and correct temperature changes in the generator stator can negatively impact normal production and quality of life at the pumped-storage power station.
[0004] The speed regulation system of a pumped-storage power station uses a speed measuring device to monitor the speed of the turbine, which is driven by water and drives the generator. The speed measuring device feeds the measured speed back to the speed regulator, which then uses an actuator to control the opening of the mechanical guide vanes to adjust the turbine's operating status. The flow rate through the turbine, the equipment temperature, and the output power of the generator are all important indicators for detecting speed regulation system failures. During the operation of a pumped-storage power station, data from key equipment is monitored to monitor the operation of the speed regulation system. The current method uses a large amount of data from various monitoring indicators to train a deep learning model, which outputs a predicted distribution of temperature values.
[0005] Due to the large number of detection indicators and the occurrence of missing values and abnormal values in the actual data collection process, the collection and processing of target data are also difficult, and the model fitting is low. Therefore, the current model has a small scope of application and large detection errors. Summary of the Invention
[0006] The main purpose of the present invention is to overcome the shortcomings and deficiencies of the prior art and to provide a data monitoring and prediction method for a seven-branch pumped storage speed regulation system.
[0007] In order to achieve the above object, the present invention adopts the following technical solutions:
[0008] A pumped storage motor stator temperature prediction method based on seven-branch knowledge distillation is applied to the pumped storage speed regulation system. The pumped storage speed regulation system includes a speed regulation device, an external measurement device and a monitoring device. The speed regulation device includes a speed regulator, an actuator and a tachometer. The external measurement device includes a current sensor, a voltage sensor, a temperature sensor, a flow meter, a guide vane opening meter, a torque meter and a pressure gauge. The temperature sensor is installed on the surface of the speed regulation device to measure the generator stator temperature. , current sensor and voltage sensor are installed at the motor output end of the turbine to measure the motor output current and output voltage , the flow meter is placed in the water pipe of the turbine to measure the water flow in the pipe The speed measuring device is installed on the motor rotor to measure the motor speed. , guide vane opening measuring instrument measures the mechanical guide vane opening , The torque measuring instrument is installed on the turbine to measure the turbine torque , the pressure gauge is installed in the turbine pipeline to measure the pipeline pressure ; The temperature data prediction method comprises the following steps:
[0009] S1. Obtain time series data of detection indicators of the speed control system of the pumped storage power station to form an indicator matrix;
[0010] S2, traverse each element in the indicator matrix, use the mathematical method of limiting the standard deviation to identify outliers and assign them a value of 0;
[0011] S3, traverse each element in the indicator matrix, find the missing value, fill the missing value with data, and update the indicator matrix;
[0012] S4. Build 7 teacher models and obtain a different training set for each teacher model;
[0013] S5. Get a test set with a specified number of elements for the 7 teacher models
[0014] S6, train the teacher model and output soft labels;
[0015] S7. Build a student model, obtain the training set and test set of the student model, and train the student model using the seven-branch knowledge distillation method
[0016] S8. Use the trained student model to predict the stator temperature of the generator.
[0017] Furthermore, the process of step S1 is as follows:
[0018] Obtain time series data of detection indicators through external measuring devices, including generator power , Pipeline water flow , generator stator temperature , Mechanical guide vane opening , motor speed , turbine torque , pipeline pressure , where the generator power is determined by the turbine motor output current and output voltage Multiplying them together, ;
[0019] The external measuring device includes a current sensor, a voltage sensor, a temperature sensor, a flow meter, a guide vane opening measuring device, a torque measuring instrument and a pressure gauge; the temperature sensor is installed on the surface of the key equipment of the speed regulation system to measure the temperature of the speed regulation system , current sensor and voltage sensor are installed at the motor output end to measure the motor output current and output voltage , the flow meter is placed in the water pipe of the turbine to measure the water flow in the pipe The speed measuring device is installed on the motor rotor to measure the motor speed. , guide vane opening measuring device measures the mechanical guide vane opening , The torque measuring instrument is installed on the turbine to measure the turbine torque , pressure gauge is installed in the turbine pipeline to measure the pipeline pressure ;
[0020] The measurement interval of the external measuring device is one hour. It represents the generator power value corresponding to the i-th measurement moment measured on that day, and is an integer, 、 The values of pipeline water flow, generator stator temperature, mechanical guide vane opening, motor speed, turbine torque and pipeline pressure corresponding to the i-th measurement moment measured on that day are represented in sequence;
[0021] Define the indicator matrix as , and obtain the index torque.
[0022] The indicator matrix is a matrix with 7 rows and 24 columns.
[0023] Furthermore, the process of step S2 is as follows:
[0024] For the indicator matrix , traverse the index matrix elements, 、 They represent the elements corresponding to the i-th row and j-th column of the indicator matrix and the i-th row and k-th column of the indicator matrix, respectively. , , and i, j, k are all integers;
[0025] Calculate the standard deviation of the row elements in the indicator matrix. When the standard deviation is greater than the set standard deviation threshold τ, the indicator matrix is considered The element in row i and column k of is an abnormal value and is reassigned to 0.
[0026]
[0027] Then the indicator matrix The element in row i and column k of is an abnormal value and is reassigned to 0, that is,
[0028] .
[0029] Furthermore, the process of step S3 is as follows:
[0030] Traverse the indicator matrix Matrix elements of The value of is 0, that is is a missing value, Represents the indicator matrix The element in row i and column a,
[0031] If satisfied
[0032] or
[0033] Description indicator matrix Zhongyu Data If the element data in the same row are evenly distributed, the mean method is used to calculate the data. Assignment:
[0034] ;
[0035] If satisfied
[0036] or ;
[0037] Description indicator matrix Zhongyu Data The distribution of element data in the same row changes linearly with time, so the median method is used to calculate the data. Assignment:
[0038]
[0039] After reassigning the abnormal values and missing values in the indicator matrix, the updated indicator matrix is obtained, which is recorded as
[0040] .
[0041] Furthermore, the process of step S4 is as follows:
[0042] Knowledge distillation is a method of transferring knowledge from a large and complex teacher model to a small and simple student model. This technical solution uses seven independent teacher models to construct a seven-branch knowledge distillation method to train the student model.
[0043] Construct 7 independent Transformer models as 7 teacher models, respectively denoted as 、 、 、 、 , each teacher model includes a training set and a test set. In the initial state, the training set and the test set are empty sets. 、 、 、 、 The corresponding training sets are 、 、 、 、 ;
[0044] The Transformer model, also known as the deformation model, is a deep learning model for processing sequence data. The Transformer model has a self-attention mechanism that gives it a significant advantage in processing time-series problems. Unlike traditional recurrent neural networks or long short-term memory networks, the Transformer model does not rely on the order of sequence to transmit information, but processes each time step of the input data in parallel through a global self-attention mechanism. This mechanism allows the Transformer to efficiently capture long-distance dependencies and effectively model the normal operation rules of the equipment when faced with complex time series patterns. In addition, the Transformer's multi-head attention mechanism can learn different features of the sequence in different subspaces, thereby enhancing its representation ability for time series data. This makes the Transformer particularly suitable for processing equipment operation data with complex patterns, long time spans and high dimensions, and can provide accurate and informative guidance for the student model in step S5.
[0045] Set the number of training set elements to be at least , the number of test set elements is at least ;
[0046] Delete the elements in rows 1, 2, 5, 6, and 7 of the indicator matrix, and the resulting matrix is recorded as :
[0047] ;
[0048] Delete the elements in rows 1, 5, 6, and 7 of the indicator matrix, and the resulting matrix is recorded as :
[0049] ;
[0050] Delete the elements in rows 1, 5, and 7 of the indicator matrix, and the resulting matrix is recorded as :
[0051] ;
[0052] Delete the elements in rows 6 and 7 of the indicator matrix, and the resulting matrix is recorded as :
[0053] ;
[0054] Delete the 7th row element from the indicator matrix, and the resulting matrix is recorded as :
[0055] ;
[0056] Delete the elements in rows 1, 2, 4, 5, 6, and 7 of the indicator matrix, and the resulting matrix is recorded as
[0057]
[0058] The matrix Writing the Teacher Model The training set ;
[0059] The matrix Writing the Teacher Model The training set ;
[0060] The matrix Writing the Teacher Model The training set ;
[0061] The matrix Writing the Teacher Model The training set ;
[0062] The matrix Writing the Teacher Model The training set ;
[0063] The matrix Writing the Teacher Model The training set ;
[0064] The indicator matrix Writing the Teacher Model The training set ;
[0065] Get the teacher model The number of elements in the training set and For comparison, if the teacher model The number of elements in the training set is greater than or equal to , then go to step S5, if the teacher model The number of elements in the training set is less than , then return to step S1 and execute steps S1, S2, S3 and S4 in sequence.
[0066] The number of elements in the training set of the 7 teacher models is equal. When the number of elements in the training set of meets the preset requirements, the number of elements in the training sets of the 7 teacher models all meet the requirements.
[0067] Furthermore, the process of step S5 is as follows:
[0068] Execute steps S1, S2, and S3 in sequence, and update the indicator matrix in step S3. Write 7 test sets of 7 teacher models and get the teacher model The number of elements in the test set and For comparison, if the teacher model The number of elements in the test set is greater than or equal to , then go to step S6, if the teacher model The number of elements in the test set is less than , then return to step S5 and execute step S5;
[0069] The test sets of the 7 teacher models obtained are the same.
[0070] Furthermore, the process of step S6 is as follows:
[0071] The 7 teacher models are trained using their corresponding training and test sets. The training process is a process of adjusting model parameters with the goal of minimizing the loss function value.
[0072] The Huber loss function is used as the loss function of the 7 teacher models, and the parameters of the teacher models are optimized accordingly. The Huber loss function formula is:
[0073] ;
[0074] in ;
[0075] is the generator stator temperature data of the element in the i-th row and j-th column of any matrix in the test set, is the prediction data obtained by the teacher model based on the other elements of the matrix for the element in the i-th row and j-th column. δ is the error hyperparameter, which is used to balance the behavior of the loss function under small and large prediction errors. δ is set before the teacher model is used.
[0076] Setting the loss function change threshold , when the loss function value is less than the loss function change threshold for 20 consecutive times , stop training;
[0077] Use the 7 trained teacher models to predict the 7 corresponding training sets and generate 7 soft labels;
[0078] Teacher Model Soft label Is a teacher model The joint probability distribution of the mechanical guide vane opening and the generator stator temperature at the next moment is output after prediction;
[0079] Teacher Model Soft label Is a teacher model The joint probability distribution of the mechanical guide vane opening, pipe water flow and generator stator temperature at the next moment is output after prediction;
[0080] Teacher Model Soft label Is a teacher model The joint probability distribution of the mechanical guide vane opening, pipe water flow, turbine torque and generator stator temperature at the next moment is output after prediction;
[0081] Teacher Model Soft label Is a teacher model The joint probability distribution of the mechanical guide vane opening, pipe water flow, turbine torque, motor output power and generator stator temperature at the next moment is output after prediction;
[0082] Teacher Model Soft label Is a teacher model The joint probability distribution of the mechanical guide vane opening, pipe water flow, turbine torque, motor output power, motor speed and generator stator temperature at the next moment is predicted and output;
[0083] Teacher Model Soft label Is a teacher model The probability distribution of the generator stator temperature at the next moment is output after prediction;
[0084] Teacher Model Soft label Is a teacher model The joint probability distribution of the mechanical guide vane opening, pipeline water flow, turbine torque, motor output power, motor speed, generator stator temperature and pipeline pressure at the next moment is output after prediction.
[0085] Furthermore, the process of step S7 is as follows:
[0086] Construct an LSTM model as a student model, and correspond to a training set and a test set. The training set of the student model includes the training sets of 7 teacher models and the corresponding output soft labels. The training set of the student model is composed of , the test set of the student model and the teacher model The test set is the same;
[0087] The LSTM model, or long short-term memory network, is a recurrent network structure that solves the gradient vanishing problem of traditional RNNs through a gating mechanism. It can effectively capture the dependency relationship between the training sets of the seven teacher models and the corresponding soft labels. At the same time, its structure is relatively simple and can efficiently predict the input data.
[0088] The formula for calculating distillation loss is defined as
[0089] in, Model for teachers Predicted soft labels, and is an integer, For students, the model is based on The same array Predicted soft labels;
[0090] The task loss calculation formula is defined as
[0091] in,
[0092] for The generator stator temperature data of the element in the i-th row and j-th column of any 1 matrix, and is an integer, The predicted data is obtained by the student model predicting the elements in the i-th row and j-th column based on the elements of the matrix except the elements in the i-th row and j-th column;
[0093] Define the comprehensive loss function The expression is:
[0094] Where, is the distillation loss, For mission loss, Is a weight hyperparameter used to balance the contribution of task loss and distillation loss;
[0095] The student model is trained using the seven-branch knowledge distillation method. Knowledge distillation is a process of adjusting the student model parameters with the goal of minimizing the comprehensive loss function value. Seven-branch knowledge distillation refers to the process of multiple training of the student model using the training sets and soft labels of seven teacher models. The comprehensive loss function threshold is set. When the loss function value is less than the comprehensive loss function threshold for 20 consecutive times, the training of the student model is stopped. The entire training process is as follows: Figure 2 shown.
[0096] Furthermore, the process of step S8 is as follows:
[0097] Apply the trained student model to Figure 1 The monitoring equipment is connected to the speed regulating device and the external measuring device. The speed regulating device includes a speed regulator, an actuator and a tachometer. The external measuring device includes a current sensor, a voltage sensor, a temperature sensor, a flow meter, a guide vane opening meter, a torque meter and a pressure gauge. The temperature sensor is installed on the surface of the speed regulating device to measure the stator temperature of the generator. , current sensor and voltage sensor are installed at the motor output end of the turbine to measure the motor output current and output voltage , the flow meter is placed in the water pipe of the turbine to measure the water flow in the pipe The speed measuring device is installed on the motor rotor to measure the motor speed. , guide vane opening measuring instrument measures the mechanical guide vane opening , The torque measuring instrument is installed on the turbine to measure the turbine torque , the pressure gauge is installed in the turbine pipeline to measure the pipeline pressure The above data is transmitted to the monitoring system through the speed control device and the external measuring device. The monitoring equipment inputs the above data into the trained student model, and the trained student model outputs the prediction result of the generator stator temperature.
[0098] The generator stator temperature prediction result can be used to determine the change trend of the generator stator temperature, and then to issue a timely warning before the generator stator temperature exceeds the safe range.
[0099] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0100] 1. The definition of the indicator matrix and the method for processing outliers and missing values in the indicator matrix proposed in the present invention can unify multiple detection indicator variables by inputting indicator variables in matrix form, and at the same time use the method of limiting standard deviation to realize the identification of outliers in matrix elements. By assigning zero operations to outliers and filling data for missing values, effective processing of outliers and missing values is achieved, thereby improving the quality of data in the training set of teacher model and student model.
[0101] 2. The present invention proposes a method for determining whether the elements in the same row in the indicator matrix where the missing value is located are uniform. The mean method and the median method are used to fill in the missing values according to the two different situations of uniform and uneven elements in the same row, respectively. This can more accurately process the missing values according to the characteristics of the data itself.
[0102] 3. This patent proposes a method of training student models using seven-branch knowledge distillation based on the importance and correlation of different indicators. Seven teacher models are used to train different training sets to output the joint distribution law of the motor stator temperature and other detection indicators. The seven-branch knowledge distillation method refers to further training the student model with the training results of the seven teacher models and the indicator matrix data, so that the student model can better capture the complex laws between the detection indicator data while maintaining the original simpler structure, and achieve a more accurate prediction of the stator temperature.
[0103] 4. Compared with the traditional knowledge distillation method, the seven-branch knowledge distillation method proposed in this patent can obtain the joint distribution law of different detection indicators and stator temperature by classifying the index detection data and training the seven teacher models separately. The training effect is better, and the grasp of the law of multiple detection indicator variables is more in line with reality. At the same time, compared with a single LSTM model, the student model trained by the seven-branch knowledge distillation method can imitate the prediction effect of the seven teacher models and achieve a more accurate prediction of the motor stator temperature. BRIEF DESCRIPTION OF THE DRAWINGS
[0104] In order to more clearly illustrate the technical solutions in the embodiments of the present application, 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 application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0105] Figure 1 It is a simplified monitoring diagram of the pumped storage speed regulation system disclosed in an embodiment of the present invention;
[0106] Figure 2 This is a flow chart of student model training in an embodiment of the present invention;
[0107] Figure 3 is a prediction curve diagram of the student model after training by the seven-branch distillation method in an embodiment of the present invention;
[0108] Figure 4 This is a flow chart of a pumped storage motor stator temperature prediction method based on seven-branch knowledge distillation in an embodiment of the present invention. DETAILED DESCRIPTION
[0109] In order to enable those skilled in the art to better understand the present invention, the technical solutions 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 in the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0110] References to "embodiments" in this application mean that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described in this application may be combined with other embodiments.
[0111] Example 1
[0112] like Figure 4 As shown, this embodiment discloses a pumped storage motor stator temperature prediction method based on seven-branch knowledge distillation, which is applied to the pumped storage speed regulation system. Figure 1 As shown in the simplified monitoring diagram of the pumped storage speed regulation system disclosed in the disclosure, the pumped storage speed regulation system includes a speed regulation device, an external measuring device and a monitoring device. The speed regulation device includes a speed regulator, an actuator and a tachometer. The external measuring device includes a current sensor, a voltage sensor, a temperature sensor, a flow meter, a guide vane opening measuring instrument, a torque measuring instrument and a pressure gauge. Among them, the temperature sensor is installed on the surface of the turbine generator stator of the speed regulation system to measure the stator temperature of the generator. , current sensor and voltage sensor are installed at the motor output end of the turbine to measure the motor output current and output voltage , the flow meter is placed in the water pipe of the turbine to measure the water flow in the pipe The speed measuring device is installed on the motor rotor to measure the motor speed. , guide vane opening measuring instrument measures the mechanical guide vane opening , The torque measuring instrument is installed on the turbine to measure the turbine torque , the pressure gauge is installed in the turbine pipeline to measure the pipeline pressure .
[0113] Generate the power of the i-th generator , Pipeline water flow , generator stator temperature , Mechanical guide vane opening , motor speed , turbine torque , pipeline pressure As the index data measured by the measuring device in this embodiment, some of the data are shown in Table 1, which includes a small number of missing values and abnormal values. The above data are used to realize the stator temperature prediction of the speed governor system generator.
[0114] Table 1. Partial values of various indicator data
[0115]
[0116] S1. Get the indicator matrix:
[0117] Define the indicator matrix as , convert various indicator data into the form of indicator matrix,
[0118] S2. Traverse each element in the indicator matrix, use the mathematical method of limiting the standard deviation to identify outliers and assign them a value of 0:
[0119] For the indicator matrix , traverse the index matrix elements, 、 They represent the elements corresponding to the i-th row and j-th column of the indicator matrix and the i-th row and k-th column of the indicator matrix, respectively. , , and i, j, k are all integers;
[0120] Calculate the standard deviation of the row elements in the indicator matrix. When the standard deviation is greater than the set standard deviation threshold τ, the indicator matrix is considered The element in row i and column k of is an abnormal value and is reassigned to 0.
[0121]
[0122] Then the indicator matrix The element in row i and column k of is an abnormal value and is reassigned to 0, that is,
[0123] .
[0124] S3, traverse each element in the indicator matrix, find the missing value, fill the missing value with data, and update the indicator matrix;
[0125] Traverse the indicator matrix Matrix elements of The value of is 0, that is is a missing value, Represents the indicator matrix The element in row i and column a,
[0126] If satisfied
[0127] or
[0128] Description indicator matrix Zhongyu Data If the element data in the same row are evenly distributed, the mean method is used to calculate the data. Assignment: ;
[0129] If satisfied
[0130] or ;
[0131] Description indicator matrix Zhongyu Data The distribution of element data in the same row changes linearly with the use time, so the median method is used to calculate the data. Assignment:
[0132]
[0133] After reassigning the abnormal values and missing values in the indicator matrix, the updated indicator matrix is obtained, which is recorded as
[0134] .
[0135] S4. Build 7 teacher models and obtain a different training set for each teacher model;
[0136] Knowledge distillation is a method of transferring the knowledge of a large and complex teacher model to a small and simple student model. Seven independent Transformer models are constructed as seven teacher models, which are denoted as 、 、 、 、 , each teacher model includes a training set and a test set. In the initial state, the training set and the test set are empty sets. 、 、 、 、 The corresponding training sets are 、 、 、 、 ;
[0137] Set the number of training set elements to be at least , the number of test sets is at least ;
[0138] Delete the elements in rows 1, 2, 5, 6, and 7 of the indicator matrix, and the resulting matrix is recorded as :
[0139]
[0140] Delete the elements in rows 1, 5, 6, and 7 of the indicator matrix, and the resulting matrix is recorded as :
[0141]
[0142] Delete the elements in rows 1, 5, and 7 of the indicator matrix, and the resulting matrix is recorded as :
[0143]
[0144] Delete the elements in rows 6 and 7 of the indicator matrix, and the resulting matrix is recorded as :
[0145]
[0146] Delete the 7th row element from the indicator matrix, and the resulting matrix is recorded as :
[0147]
[0148] Delete the elements in rows 1, 2, 4, 5, 6, and 7 of the indicator matrix, and the resulting matrix is recorded as :
[0149]
[0150] The matrix Writing the Teacher Model The training set ;
[0151] The matrix Writing the Teacher Model The training set ;
[0152] The matrix Writing the Teacher Model The training set ;
[0153] The matrix Writing the Teacher Model The training set ;
[0154] The matrix Writing the Teacher Model The training set ;
[0155] The matrix Writing the Teacher Model The training set ;
[0156] The indicator matrix Writing the Teacher Model The training set ;
[0157] Get the teacher model The number of elements in the training set and For comparison, if the teacher model The number of elements in the training set is greater than or equal to , then go to step S5, if the teacher model The number of elements in the training set is less than , then return to step S1 and execute steps S1, S2, S3 and S4 in sequence.
[0158] S5. Obtain a test set with a specified number of elements for the 7 teacher models;
[0159] Execute steps S1, S2, and S3 in sequence, and update the indicator matrix in step S3. Write 7 test sets of 7 teacher models and get the teacher model The number of elements in the test set and For comparison, if the teacher model The number of elements in the test set is greater than or equal to , then go to step S6, if the teacher model The number of elements in the test set is less than , then return to step S5 and execute step S5.
[0160] S6, train the teacher model and output soft labels;
[0161] The 7 teacher models are trained using their corresponding training and test sets. The training process is a process of adjusting model parameters with the goal of minimizing the loss function value.
[0162] The Huber loss function is used as the loss function of the 7 teacher models, and the parameters of the teacher models are optimized accordingly. The Huber loss function formula is:
[0163]
[0164] in
[0165] is the generator stator temperature data of the element in the i-th row and j-th column of any matrix in the test set, is the prediction data obtained by the teacher model based on the other elements of the matrix for the element in the i-th row and j-th column. δ is the error hyperparameter, which is used to balance the behavior of the loss function under small and large prediction errors. δ is set before the teacher model is used.
[0166] Setting the loss function change threshold , when the loss function value is less than the loss function change threshold for 20 consecutive times , stop training;
[0167] Use the 7 trained teacher models to predict the 7 corresponding training sets and generate 7 soft labels;
[0168] Teacher Model Soft label Is a teacher model The joint probability distribution of the mechanical guide vane opening and the generator stator temperature at the next moment is output after prediction;
[0169] Teacher Model Soft label Is a teacher model The joint probability distribution of the mechanical guide vane opening, pipe water flow and generator stator temperature at the next moment is output after prediction;
[0170] Teacher Model Soft label Is a teacher model The joint probability distribution of the mechanical guide vane opening, pipe water flow, turbine torque and generator stator temperature at the next moment is output after prediction;
[0171] Teacher Model Soft label Is a teacher model The joint probability distribution of the mechanical guide vane opening, pipe water flow, turbine torque, motor output power and generator stator temperature at the next moment is output after prediction;
[0172] Teacher Model Soft label Is a teacher model The joint probability distribution of the mechanical guide vane opening, pipe water flow, turbine torque, motor output power, motor speed and generator stator temperature at the next moment is predicted and output;
[0173] Teacher Model Soft label Is a teacher model The probability distribution of the generator stator temperature at the next moment is output after prediction;
[0174] Teacher Model Soft label Is a teacher model The joint probability distribution of the mechanical guide vane opening, pipeline water flow, turbine torque, motor output power, motor speed, generator stator temperature and pipeline pressure at the next moment is output after prediction.
[0175] S7. Build a student model, obtain the training set and test set of the student model, and train the student model using the seven-branch knowledge distillation method
[0176] Construct an LSTM model as a student model, and correspond to a training set and a test set. The training set of the student model includes the training sets of 7 teacher models and the corresponding output soft labels. The training set of the student model is composed of , the test set of the student model and the teacher model The test set is the same;
[0177] The formula for calculating distillation loss is defined as
[0178] in, Model for teachers Predicted soft labels, and is an integer, For students, the model is based on The same array Predicted soft labels;
[0179] The task loss calculation formula is defined as
[0180] in,
[0181] for The generator stator temperature data of the element in the i-th row and j-th column of any 1 matrix, and is an integer, The predicted data is obtained by the student model predicting the elements in the i-th row and j-th column based on the elements of the matrix except the elements in the i-th row and j-th column;
[0182] Define the comprehensive loss function The expression is:
[0183] Where, is the distillation loss, For mission loss, Is a weight hyperparameter used to balance the contribution of task loss and distillation loss;
[0184] The student model is trained using the seven-branch knowledge distillation method. Knowledge distillation is a process of adjusting the student model parameters with the goal of minimizing the comprehensive loss function value. Seven-branch knowledge distillation refers to the process of multiple training of the student model using the training sets and soft labels of seven teacher models. The comprehensive loss function threshold is set, and the training of the student model is stopped when the loss function value is less than the comprehensive loss function threshold for 20 consecutive times. The entire training process is as follows Figure 2 shown.
[0185] S8. Predicting the stator temperature of the generator using the trained student model;
[0186] The stator temperature of some speed control system generators and other index data are input into the student model trained by the seven-branch distillation method to predict the stator temperature of the speed control system generators. At the same time, the stator temperature of some speed control system generators and other index data are input into a single LSTM model for prediction. The two prediction results are compared with the actual temperature curve. The prediction effect is as follows: Figure 3 shown.
[0187] Depend on Figure 3 It can be seen that compared with the prediction curve of a single LSTM model, the prediction curve of the student model trained by the seven-branch distillation method is closer to the actual stator temperature curve of the speed control system generator.
[0188] In summary, the student model trained based on the seven-branch distillation method can make more accurate predictions about the generator stator of the speed control system while having the same structure as a single LSTM model.
[0189] It should be noted that, for the sake of convenience, the aforementioned method embodiments are all expressed as a series of action combinations, but those skilled in the art should know that the present invention is not limited to the described order of actions, because according to the present invention, certain steps can be performed in other orders or simultaneously.
[0190] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0191] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be considered as equivalent replacement methods and are included in the scope of protection of the present invention.
Claims
1. A pumped storage motor stator temperature prediction method based on seven-branch knowledge distillation is applied to a pumped storage speed control system. The pumped storage speed control system includes a speed control device, an external measuring device, and a monitoring device. The speed control device includes a speed regulator, an actuator, and a tachometer. The external measuring device includes a current sensor, a voltage sensor, a temperature sensor, a flow meter, a guide vane opening measuring instrument, a torque measuring instrument, and a pressure gauge. The temperature sensor is installed on the stator surface of the turbine generator in the speed control system to measure the stator temperature of the generator. , current sensor and voltage sensor are installed at the motor output end of the turbine to measure the motor output current and output voltage , the flow meter is placed in the water pipe of the turbine to measure the water flow in the pipe The speed measuring device is installed on the motor rotor to measure the motor speed. , guide vane opening measuring instrument measures the mechanical guide vane opening , The torque measuring instrument is installed on the turbine to measure the turbine torque , the pressure gauge is installed in the turbine pipeline to measure the pipeline pressure ; Characterized in that, the temperature prediction method comprises the following steps: S1. Obtain the time series data of the detection indicators of the speed control system of the pumped storage power station and form an indicator matrix. The process is as follows: Obtain time series data of detection indicators through external measuring devices, including generator power , Pipeline water flow , generator stator temperature , Mechanical guide vane opening , motor speed , turbine torque , pipeline pressure , where the generator power is determined by the turbine motor output current and output voltage Multiplying them together, ; The measurement interval of the external measuring device is one hour. It represents the generator power value corresponding to the i-th measurement moment measured on that day, and is an integer, 、 The values of pipeline water flow, generator stator temperature, mechanical guide vane opening, motor speed, turbine torque and pipeline pressure corresponding to the i-th measurement moment measured on that day are represented in sequence; Define the indicator matrix as , and obtain the index torque; S2, traverse each element in the indicator matrix, use the mathematical method of limiting the standard deviation to identify outliers and assign them a value of 0; S3, traverse each element in the indicator matrix, find the missing value, fill the missing value with data, and update the indicator matrix; S4. Build 7 teacher models and obtain a different training set for each teacher model; S5. Obtain a test set with a specified number of elements for the 7 teacher models; S6, train the teacher model and output soft labels; S7. Build a student model, obtain the training set and test set of the student model, and train the student model using the seven-branch knowledge distillation method. Knowledge distillation is a process of adjusting the student model parameters with the goal of minimizing the comprehensive loss function value. Seven-branch knowledge distillation refers to the process of multiple training of the student model using the training sets and soft labels of seven teacher models, setting a comprehensive loss function threshold, and stopping the training of the student model when the loss function value is less than the comprehensive loss function threshold for 20 consecutive times. S8. Use the trained student model to predict the stator temperature of the generator.
2. The pumped storage motor stator temperature prediction method based on seven-branch knowledge distillation according to claim 1 is characterized in that: The process of step S2 is as follows: For the indicator matrix , traverse the index matrix elements, 、 They represent the elements corresponding to the i-th row and j-th column of the indicator matrix and the i-th row and k-th column of the indicator matrix, respectively. , , and i, j, k are all integers; Calculate the standard deviation of the row elements in the indicator matrix. When the standard deviation is greater than the set standard deviation threshold τ, the indicator matrix is considered The element in row i and column k of is an abnormal value and is reassigned to 0. Then the indicator matrix The element in row i and column k of is an abnormal value and is reassigned to 0, that is, 。 3. The pumped storage motor stator temperature prediction method based on seven-branch knowledge distillation according to claim 2 is characterized in that: The process of step S3 is as follows: Traverse the indicator matrix Matrix elements of The value of is 0, that is is a missing value, Represents the indicator matrix The element in row i and column a, If satisfied or Description indicator matrix Zhongyu Data If the element data in the same row are evenly distributed, the mean method is used to calculate the data. Assignment: ; If satisfied or ; Description indicator matrix Zhongyu Data The distribution of element data in the same row changes linearly with the use time, so the median method is used to calculate the data. Assignment: After reassigning the abnormal values and missing values in the indicator matrix, the updated indicator matrix is obtained, which is recorded as 。 4. The pumped storage motor stator temperature prediction method based on seven-branch knowledge distillation according to claim 3 is characterized in that: The process of step S4 is as follows: Construct 7 independent Transformer models as 7 teacher models, respectively denoted as 、 、 、 、 , each teacher model includes a training set and a test set. In the initial state, the training set and the test set are empty sets. 、 、 、 、 The corresponding training sets are 、 、 、 、 ; Set the number of training set elements to be at least , the number of test sets is at least ; Delete the elements in rows 1, 2, 5, 6, and 7 of the indicator matrix, and the resulting matrix is recorded as : Delete the elements in rows 1, 5, 6, and 7 of the indicator matrix, and the resulting matrix is recorded as : Delete the elements in rows 1, 5, and 7 of the indicator matrix, and the resulting matrix is recorded as : Delete the elements in rows 6 and 7 of the indicator matrix, and the resulting matrix is recorded as : Delete the 7th row element from the indicator matrix, and the resulting matrix is recorded as : Delete the elements in rows 1, 2, 4, 5, 6, and 7 of the indicator matrix, and the resulting matrix is recorded as : The matrix Writing the Teacher Model The training set ; The matrix Writing the Teacher Model The training set ; The matrix Writing the Teacher Model The training set ; The matrix Writing the Teacher Model The training set ; The matrix Writing the Teacher Model The training set ; The matrix Writing the Teacher Model The training set ; The indicator matrix Writing the Teacher Model The training set ; Get the teacher model The number of elements in the training set and For comparison, if the teacher model The number of elements in the training set is greater than or equal to , then go to step S5, if the teacher model The number of elements in the training set is less than , then return to step S1 and execute steps S1, S2, S3 and S4 in sequence.
5. The pumped storage motor stator temperature prediction method based on seven-branch knowledge distillation according to claim 4 is characterized in that: The process of step S5 is as follows: Execute steps S1, S2, and S3 in sequence, and update the indicator matrix in step S3. Write 7 test sets of 7 teacher models and get the teacher model The number of elements in the test set and For comparison, if the teacher model The number of elements in the test set is greater than or equal to , then go to step S6, if the teacher model The number of elements in the test set is less than , then return to step S5 and execute step S5.
6. The pumped storage motor stator temperature prediction method based on seven-branch knowledge distillation according to claim 5 is characterized in that: The process of step S6 is as follows: The 7 teacher models are trained using their corresponding training and test sets. The training process is a process of adjusting model parameters with the goal of minimizing the loss function value. The Huber loss function is used as the loss function of the 7 teacher models, and the parameters of the teacher models are optimized accordingly. The Huber loss function formula is: in is the generator stator temperature data of the element in the i-th row and j-th column of any matrix in the test set, is the prediction data obtained by the teacher model based on the other elements of the matrix for the element in the i-th row and j-th column. δ is the error hyperparameter, which is used to balance the behavior of the loss function under small and large prediction errors. δ is set before the teacher model is used. Setting the loss function change threshold , when the loss function value is less than the loss function change threshold for 20 consecutive times , stop training; Use the 7 trained teacher models to predict the 7 corresponding training sets and generate 7 soft labels; Teacher Model Soft label Is a teacher model The joint probability distribution of the mechanical guide vane opening and the generator stator temperature at the next moment is output after prediction; Teacher Model Soft label Is a teacher model The joint probability distribution of the mechanical guide vane opening, pipe water flow and generator stator temperature at the next moment is output after prediction; Teacher Model Soft label Is a teacher model The joint probability distribution of the mechanical guide vane opening, pipe water flow, turbine torque and generator stator temperature at the next moment is output after prediction; Teacher Model Soft label Is a teacher model The joint probability distribution of the mechanical guide vane opening, pipe water flow, turbine torque, motor output power and generator stator temperature at the next moment is output after prediction; Teacher Model Soft label Is a teacher model The joint probability distribution of the mechanical guide vane opening, pipe water flow, turbine torque, motor output power, motor speed and generator stator temperature at the next moment is predicted and output; Teacher Model Soft label Is a teacher model The probability distribution of the generator stator temperature at the next moment is output after prediction; Teacher Model Soft label Is a teacher model The joint probability distribution of the mechanical guide vane opening, pipeline water flow, turbine torque, motor output power, motor speed, generator stator temperature and pipeline pressure at the next moment is output after prediction.
7. The pumped storage motor stator temperature prediction method based on seven-branch knowledge distillation according to claim 6 is characterized in that: The process of step S7 is as follows: Construct an LSTM model as a student model, and correspond to a training set and a test set. The training set of the student model includes the training sets of 7 teacher models and the corresponding output soft labels. The training set of the student model is composed of , the test set of the student model and the teacher model The test set is the same; The formula for calculating distillation loss is defined as in, Model for teachers Predicted soft labels, and is an integer, For students, the model is based on The same array Predicted soft labels; The task loss calculation formula is defined as in, for The generator stator temperature data of the element in the i-th row and j-th column of any 1 matrix, and is an integer, The predicted data is obtained by the student model predicting the elements in the i-th row and j-th column based on the elements of the matrix except the elements in the i-th row and j-th column; Define the comprehensive loss function The expression is: Where, is the distillation loss, For mission loss, is a weight hyperparameter used to balance the contribution of task loss and distillation loss.
8. The pumped storage motor stator temperature prediction method based on seven-branch knowledge distillation according to claim 7 is characterized in that: The process of step S8 is as follows: The trained student model is applied to the monitoring equipment, which is connected to the speed regulating device and the external measuring device. The speed regulating device includes a speed regulator, an actuator and a tachometer. The external measuring device includes a current sensor, a voltage sensor, a temperature sensor, a flow meter, a guide vane opening meter, a torque meter and a pressure gauge. The temperature sensor is installed on the surface of the speed regulating device to measure the stator temperature of the generator. , current sensor and voltage sensor are installed at the motor output end of the turbine to measure the motor output current and output voltage , the flow meter is placed in the water pipe of the turbine to measure the water flow in the pipe The speed measuring device is installed on the motor rotor to measure the motor speed. , guide vane opening measuring instrument measures the mechanical guide vane opening , The torque measuring instrument is installed on the turbine to measure the turbine torque , the pressure gauge is installed in the turbine pipeline to measure the pipeline pressure The above data is transmitted to the monitoring system through the speed control device and the external measuring device. The monitoring equipment inputs the above data into the trained student model, and the trained student model outputs the prediction result of the generator stator temperature.
Citation Information
Patent Citations
Fan variable pitch motor temperature fault early warning method based on collaborative expression and LightGBM algorithm
CN112598148A
Tile color difference detection method and device based on knowledge distillation
CN113554716A