Transform-based water turbine state prediction method and system

Generative modeling of turbine data through Trans-GAN model based on Transformer, the problems of large-scale data and diversified anomaly feature extraction are solved, and high-precision prediction of turbine state abnormalities is achieved, which improves prediction accuracy and real-timeness.

CN119089257APending Publication Date: 2024-12-06GUIZHOU WUJIANG HYDROPOWER DEV

Patent Information

Application Number
CN202410986037.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-23
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

Existing methods are difficult to generalize to large-scale data and diversified anomaly feature extraction, resulting in reduced accuracy and efficiency of turbine state anomaly prediction.

Method used

The Trans-GAN model based on Transformer is adopted, combined with the generative GAN algorithm and self-attention mechanism, generative modeling of turbine monitoring data is carried out, large-scale long sequence features are extracted, and high-precision state anomaly prediction is achieved.

Benefits of technology

It realizes rapid and accurate prediction of abnormal states of turbines, with high accuracy and low false alarm rates, which reduces the work burden of turbine maintenance personnel, and improves the prediction accuracy and real-timeness of intelligent hydropower systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119089257A_ABST
    Figure CN119089257A_ABST
Patent Text Reader

Abstract

The invention discloses a water turbine state prediction method and system based on Transform, and relates to the technical field of water turbine state prediction.The water turbine state prediction method comprises the steps that water turbine data are collected and preprocessed, and preprocessed data are obtained; performing construction and training of a Trans-GAN model by using the preprocessed data; and using the trained Trans-GAN model to predict the state of the water turbine. According to the method, the historical data of the water turbine are combined, the abnormal segments of the time sequence can be rapidly and accurately predicted through data cleaning and a sequence reconstruction algorithm based on Transform and GAN, the real-time abnormal prediction effect is achieved, the method has the advantages of being high in accuracy and low in false alarm rate, and the method has a good application prospect for reducing the workload of water turbine maintenance personnel. And a foundation is laid for the intelligent hydroelectric system with improved prediction accuracy and punctuality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of water turbine state prediction, and in particular to a water turbine state prediction method and system based on Transformer. Background Art

[0002] Turbine state prediction is a key link in the intelligent operation of hydropower. The overall automation level of hydropower plants is high, and the turbines themselves have rich sensor data, which can provide a data basis for predicting the operation state modeling. Turbine anomalies mainly occur in the shaft system, guide bearings and other parts. The state anomaly prediction methods currently used mainly include support vector machines, deep learning RNN (recurrent neural network), etc. These traditional machine learning-based methods have solved the problem of abnormal state prediction of some turbines to a certain extent, but it is difficult to generalize to large-scale data and diversified abnormal feature extraction, thereby reducing the accuracy and efficiency of state anomaly prediction.

[0003] This patent aims at a Transformer-based turbine state prediction method, which combines the Transformer model's ability to extract and model large-scale long sequence features, and the generative GAN (generative adversarial network) algorithm's efficient training method and unsupervised self-training ability. It uses the Trans-GAN model to generatively model turbine monitoring data and applies it to large-scale hydropower operation data to actively predict data points with abnormal turbine states, thereby achieving high-precision anomaly prediction capabilities. Summary of the invention

[0004] In view of the above-mentioned problems, the present invention is proposed.

[0005] Therefore, the problem to be solved by the present invention is: how to solve the problem that existing methods are difficult to generalize to large-scale data and extract diversified abnormal features.

[0006] To solve the above technical problems, the present invention provides the following technical solutions: a Transformer-based turbine state prediction method, comprising: collecting turbine data and preprocessing it to obtain preprocessed data; using the preprocessed data to construct and train a Trans-GAN model; and using the trained Trans-GAN model to predict the turbine state.

[0007] As a preferred solution of the Transformer-based turbine state prediction method described in the present invention, wherein: the turbine data includes mechanical operating parameters, environmental monitoring parameters, electrical performance data and operating time data; the collected data is time series data; the preprocessing includes data cleaning and processing of missing values, and data analysis; the data analysis includes extracting the main features of the collected data of all feature dimensions using a machine learning method, performing data dimensionality reduction using a principal component analysis method, and converting the monitoring data represented by linearly correlated variables into data represented by linearly independent variables using an orthogonal transformation.

[0008] As a preferred solution of the Transformer-based turbine state prediction method described in the present invention, the Trans-GAN model includes a Transformer model as a backbone network, the encoding network and the decoding network are both composed of self-attention mechanism modules, and after the input information is encoded, an encoding vector of important feature information implicit in the input time series is obtained, and then the encoding vector is combined with the feature sequence and the position encoding information and simultaneously input into the decoding network, and the original sequence is reconstructed through the decoding network; the Transformer model is used as a generator network, and for the discriminator, only the binary classification task needs to be completed, so the discriminator network is realized by constructing a multi-layer perceptron, and then the Trans-GAN model based on the GAN architecture is realized.

[0009] As a preferred solution of the Transformer-based turbine state prediction method described in the present invention, the Trans-GAN model also includes obtaining a reconstructed output from the preprocessed original data through a generator network G based on the Transformer model, and the reconstructed output is combined with the original data and input into a discriminant network L based on a multi-layer perceptron. The true and false binary classification probability values ​​are obtained through the forward operation of the multi-layer perceptron, and then the model parameter gradient is updated through the back propagation algorithm.

[0010] As a preferred solution of the Transformer-based turbine state prediction method described in the present invention, the generator network includes an encoding network and a decoding network, and the encoding network is expressed as:

[0011] MultiHead(Q,K,V)=Concat(head1,head2,…,head h )W O

[0012]

[0013]

[0014] G=LayerNorm(FFN(MultiHead(Q,K,V))+MultiHead(Q,K,V))

[0015] Among them, G is the output of the encoding network, LayerNorm is the layer normalization function, FFN is the feedforward neural network, MultiHead is the multi-head attention mechanism, Q, K, and V are the query, key, and value obtained by different linear transformations of the input, respectively. i is the output of the i-th attention head, Concat is the concatenation of the outputs of each head along the feature dimension, W O is the linear transformation weight matrix after merging the multi-head attention output, are the weight matrices for linear transformation queries, keys, and values, respectively. Softmax is the activation function. k is the dimension of the key vector; the decoding network is represented as:

[0016] En=MultiHead(Q,G,G)

[0017] G(z)=LayerNorm(FFN(En)+MultiHead(Q,K,V)

[0018] Among them, G(z) is the output of the generator network, and En is the encoder-decoder attention mechanism.

[0019] As a preferred solution of the Transformer-based turbine state prediction method described in the present invention, the discriminant network includes inputting the reconstructed output in combination with the original data into the discriminant network L based on the multi-layer perceptron, and obtaining the true and false binary classification probability values ​​through the forward operation of the multi-layer perceptron, which is expressed as:

[0020] I=Concat(G(x),x)

[0021] L(I)=σ(W n LeakyReLU(W n-1 (…LeakyReLU(W1I+b1)…)+b n-1 )+b n )

[0022] Among them, I is the input of the discriminant network, x is the original data, W1, ..., W n is the weight matrix of each layer of the discriminant network, b1,...,b nis the bias vector of each layer of the discriminant network, σ is the sigmoid activation function, LeakyReLU is the activation function, allowing small gradients to flow through the negative part, and L(I) is the probability of discriminant network output; set the true and false probability threshold, if L(I) is greater than the true and false probability threshold, it is real data, if L(I) is less than or equal to the true and false probability threshold, it is generated false data; train the model, for real data x, the output L of the discriminator is close to 1, that is, the data is considered to be real, and the loss function is expressed as:

[0023] -log(L)

[0024] For the data G(z) generated by the generator G, the output L(I) of the discriminator is close to 0, that is, the data is considered to be generated, and the loss function is expressed as:

[0025] -log(1-L(G(z)))

[0026] The overall loss function of the model is expressed as:

[0027]

[0028] in, is the overall loss function, p data is the distribution of real data, p z Input the distribution of noise to the generator; calculate the gradient of the parameters through the back-propagation algorithm, and update the parameters to minimize the loss function, expressed as:

[0029]

[0030] Among them, θ Lnew is the updated parameter, θ Lold is the parameter before updating, and η is the learning rate.

[0031] As a preferred solution of the Transformer-based turbine state prediction method of the present invention, the turbine state prediction includes generating a prediction sequence using a trained Trans-GAN model, the input time series segment data is z, and after being processed by the generator G, the reconstructed prediction sequence is expressed as:

[0032] T(z)=G(z)

[0033] Calculate the error between the original sequence z and the reconstructed sequence T(z), expressed as:

[0034] E=||zT(z)||

[0035] Where E is the error between the original sequence and the reconstructed sequence; set the dynamic threshold, expressed as:

[0036] δ=μ(E)+κ·σ(E)

[0037] Among them, δ is the dynamic threshold, μ(E) is the average of the most recent N error values, κ is the adjustment factor, and σ(E) is the standard deviation of the most recent N error values; if the error E is greater than δ, it is determined that the sequence is abnormal at a certain time node in the future, and the abnormal state of the turbine is predicted.

[0038] Another object of the present invention is to provide a system of a Transformer-based turbine state prediction method, which can solve a Transformer-based turbine state prediction problem by constructing a turbine state prediction system.

[0039] To solve the above technical problems, the present invention provides the following technical solutions: a Transformer-based turbine state prediction system, comprising a data acquisition module, a model building and training module and a prediction module; the data acquisition module is used to collect turbine data and perform preprocessing to obtain preprocessed data; the model building and training module is used to use the preprocessed data to build and train a Trans-GAN model; the prediction module is used to use the trained Trans-GAN model to predict the turbine state.

[0040] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the above-mentioned Transformer-based turbine state prediction method are implemented.

[0041] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a Transformer-based turbine state prediction method as described above.

[0042] The beneficial effects of the present invention are as follows: a Transformer-based turbine state prediction method provided by the present invention is combined with turbine historical data. After data cleaning and a sequence reconstruction algorithm based on Transformer and GAN, the abnormal segments of the time series can be quickly and accurately predicted, achieving the effect of real-time abnormality prediction, and has the characteristics of high accuracy and low false alarm rate, laying the foundation for reducing the workload of turbine maintenance personnel and improving the prediction accuracy and punctuality of the intelligent hydropower system. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0044] Figure 1 A flow chart of a Transformer-based turbine state prediction method provided for the first embodiment of the present invention.

[0045] Figure 2 A Transformer structure diagram of a Transformer-based turbine state prediction method provided in a second embodiment of the present invention.

[0046] Figure 3 A Trans-GAN model architecture diagram of a Transformer-based turbine state prediction method provided in the second embodiment of the present invention.

[0047] Figure 4 A structural diagram of a Transformer-based turbine state prediction system provided for the second embodiment of the present invention. DETAILED DESCRIPTION

[0048] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings.

[0049] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0050] Example 1, reference Figure 1 to Figure 3 , which is the first embodiment of the present invention, and provides a Transformer-based turbine state prediction method, including: collecting turbine data and preprocessing it to obtain preprocessed data; using the preprocessed data to construct and train a Trans-GAN model; and using the trained Trans-GAN model to predict the turbine state.

[0051] The workload of daily inspection, maintenance and abnormality prediction of turbines is huge. The traditional manual prediction method is prone to abnormal problems being missed or misjudged. The use of deep learning algorithms to model turbine data and predict abnormal situations can reduce costs and improve safety and reliability. In this patent, combined with historical turbine data, after data cleaning and sequence reconstruction algorithms based on Transformer and GAN, abnormal segments of time series can be quickly and accurately predicted, achieving the effect of real-time abnormality prediction, and with the characteristics of high accuracy and low false alarm rate, it lays the foundation for reducing the workload of turbine maintenance personnel and improving the prediction accuracy and punctuality of intelligent hydropower systems.

[0052] S1. Collect turbine data and preprocess them to obtain preprocessed data.

[0053] The turbine data includes mechanical operating parameters, environmental monitoring parameters, electrical performance data, operating time data, etc.; the collected data is time series data.

[0054] Mechanical operating parameters include speed, vibration data, bearing temperature and pressure. Record the speed of the turbine, which is an important factor affecting power generation efficiency and mechanical wear; capture the vibration frequency and amplitude of various parts of the turbine. Abnormal vibration is usually an early sign of mechanical failure; monitor the temperature and pressure of bearings and other key components. Abnormal increases in temperature or pressure may indicate overload or fault conditions.

[0055] Environmental monitoring parameters include water temperature, flow rate and water level. Changes in water source temperature may affect the efficiency and life of the turbine; real-time monitoring of inlet flow and reservoir water level, these parameters have a direct impact on the operating status of the turbine.

[0056] Electrical performance data includes power generation, current and voltage. Monitoring actual power generation and comparing it with theoretical power generation can be used to determine the operating efficiency of the turbine; monitoring the output voltage and current of the generator, abnormal fluctuations may indicate problems in the electrical system.

[0057] Running time data records the running time of the turbine. Long-term operation may cause mechanical fatigue.

[0058] Preprocessing includes data cleaning and processing of missing values, and data analysis; for data analysis, traditional methods generally use manual selection to extract independent monitoring indicators that are unrelated to each other for data analysis, but manual selection is very time-consuming and there are problems with missed screening or over-screening. This patent uses machine learning methods to extract the main features of the full feature dimensions collected to reduce labor costs and error rates and improve the automated processing capabilities of data links. The prediction method used only requires abnormal predictions for key monitoring indicators. Other indicators that have implicit correlations with key indicators have similar abnormal properties. Repeated predictions will increase system load and waste resources. Therefore, it is necessary to observe the correlation of previous data indicators and perform data dimensionality reduction processing. This patent uses principal component analysis (PCA) to reduce data dimensionality, and uses orthogonal transformation to convert monitoring data represented by linearly correlated variables into data represented by linearly independent variables. The linearly independent variables finally obtained are the indicators that need to be predicted.

[0059] S2. Use the preprocessed data to build and train the Trans-GAN model.

[0060] In the prediction of abnormal turbine status, the correlation between data of different time lengths needs to be modeled, especially for turbine equipment in the long-term operation process. When the hardware working parameters are affected by ambient temperature, humidity, operating time, etc., cumulative deformation, temperature anomalies and other phenomena may occur. The self-attention mechanism in the Transformer structure is good at handling contextual correlation, so it can well mine long-term contextual dependencies in time series data prediction.

[0061] Transformer structure is as follows Figure 2 As shown in the figure, the encoder is on the left, and the input is the encoded time series feature vector and the corresponding position encoding vector. After the multi-head attention mechanism and multi-level encoding of the forward neural network, the output is a low-dimensional encoding vector of the important feature encoding information of the time series feature sequence. The decoding network is on the right, which contains three dimensions of input information: the encoded time series feature vector, the position encoding vector, and the encoding vector obtained by the encoding network.

[0062] The GAN network consists of a two-way architecture, in which one network is used to generate a target from any input and make the target approach the real target; the other network inputs the generated target and the real target, and maximizes the difference between the two as much as possible to distinguish the difference between the two. Based on the particularity of the GAN network architecture, its adversarial training method can be easily applied to unsupervised learning scenarios. When there are a large number of positive samples and a very small number of negative samples in the large-scale data of turbines, the generator will learn the normal sequence distribution characteristics from most of the positive samples. At the same time, the discriminator can use the loss function to continuously improve the generator's reconstruction ability for normal samples by back-propagation to update parameters. Turbine data has the above characteristics to a large extent. It is in a normal working state with a high probability, and the probability of abnormal state is low. Using the GAN network architecture to process abnormal turbine data can reduce the work of negative sample screening and labeling.

[0063] This patent uses the Transformer model as the backbone network. Both the encoding network and the decoding network are composed of three stacked self-attention mechanism modules. After the input information is encoded, an encoding vector of important feature information implicit in the input time series sequence is obtained. This vector is then combined with the feature sequence and position encoding information and input into the decoding network at the same time to reconstruct the original sequence through the decoding network. Using the Transformer model alone for sequence reconstruction cannot correctly obtain timing features from normal time series sequences and reduce the interference of abnormal sequences. Therefore, the construction of the Transformer encoding and decoding network needs to be combined with the GAN training architecture. This patent uses the Transformer model as a generator network, and for the discriminator, only a binary classification task needs to be completed. Therefore, the discriminator network is realized by constructing a multi-layer perceptron, and then the Trans-GAN model based on the GAN architecture is realized. The model architecture is as follows Figure 3 shown.

[0064] The generator network includes an encoding network and a decoding network. The encoding network is expressed as:

[0065] MultiHead(Q,K,V)=Concat(head1,head2,…,head h )W O

[0066]

[0067]

[0068] G=LayerNorm(FFN(MultiHead(Q,K,V))+MultiHead(Q,K,V))

[0069] FFN(a)=max(0,xW f1+b f1 )W f2 +b f2

[0070]

[0071] Among them, G is the output of the encoding network, and LayerNorm is the layer normalization function, which is used to standardize the activation value of the input layer in the neural network to improve the stability and convergence speed of the training process. FFN is a feedforward neural network, a network structure composed of linear layers and nonlinear activation functions, which increases the expressive power of the Transformer model. MultiHead is a multi-head attention mechanism that allows the model to learn information in parallel in different representation subspaces and capture complex dependencies in the input data. Q, K, and V are the query (Query), key (Key), and value (Value) obtained by different linear transformations of the input, respectively. Head i is the output of the i-th attention head, Concat is the concatenation of the outputs of each head along the feature dimension, W O is the linear transformation weight matrix after merging the multi-head attention output, are the weight matrices for linear transformation queries, keys, and values, respectively. Softmax is the activation function. k is the dimension of the key vector; W f1 is the weight matrix of the first layer in the feedforward neural network, W f2 is the weight matrix of the second layer in the feedforward neural network, b f1 is the bias vector of the first layer in the feedforward neural network, b f2 is the bias vector of the second layer in the feedforward neural network, μ is the mean of the normalized data of the input layer, σ is the standard deviation of the normalized data of the input layer, and γ and β are learning parameters.

[0072] The decoding network is represented as:

[0073] En=MultiHead(Q,G,G)

[0074] Gz)=LayerNorm(FFN(En)+MultiHead(Q,K,V)

[0075] Among them, Gz) is the output of the generator network, and En is the encoder-decoder attention mechanism.

[0076] Network data flow process: The original data is reconstructed through the generative network G based on the Transformer model, and then combined with the original data, it is input into the discriminative network L based on the multi-layer perceptron. After the forward operation of the multi-layer perceptron, the true and false binary classification probability values ​​are obtained, and then the model parameter gradient is updated through the back propagation algorithm.

[0077] The discriminant network inputs the reconstructed output together with the original data into the discriminant network L based on the multi-layer perceptron. After the multi-layer perceptron forward operation, the true and false binary classification probability values ​​are obtained, which are expressed as:

[0078] I=Concat(G(x),x)

[0079] L(I)=σ(W n LeakyReLU(W n-1 (…LeakyReLU(W1I+b1)…)+b n-1 )+b n )

[0080] Among them, I is the input of the discriminant network, x is the original data, W1, ..., W n is the weight matrix of each layer of the discriminant network, b1,…,b n is the bias vector of each layer of the discriminant network, σ is the sigmoid activation function, which is used to limit the output between 0 and 1, indicating the probability that the data is true. LeakyReLU is the activation function that allows small gradients to flow through the negative part, and L(I) is the probability of the discriminant network output.

[0081] Set the true or false probability threshold. If L(I) is greater than the true or false probability threshold, it is real data. If L(I) is less than or equal to the true or false probability threshold, it is generated false data.

[0082] The model is trained. For real data x, the output L of the discriminator is close to 1, which means that the data is considered to be real. The loss function is expressed as:

[0083] -log(L)

[0084] For the data G(z) generated by the generator G, the output L(I) of the discriminator is close to 0, that is, the data is considered to be generated, and the loss function is expressed as:

[0085] -log(1-L(G(z)))

[0086] The overall loss function of the model is expressed as:

[0087]

[0088] in, is the overall loss function, p datais the distribution of real data, p z The distribution of the noise input to the generator.

[0089] The gradient of the parameters is calculated through the back-propagation algorithm, and the parameters are updated to minimize the loss function, which is expressed as:

[0090]

[0091] Among them, θ Lnew is the updated parameter, θ Lold is the parameter before updating, and η is the learning rate.

[0092] S3. Use the trained Trans-GAN model to predict the turbine status.

[0093] When performing state prediction, it is only necessary to input the time series fragment data z into the training, and then obtain the Trans-GAN model, obtain the reconstructed prediction sequence T(z), and then calculate the error between the original sequence and the reconstructed sequence according to the formula E=||zT(z)||. Since there is a trend of inconsistency between abnormal fragments and normal sequences, resulting in an increase in errors, the error value can accurately reflect whether there will be abnormal phenomena in the future, and the fragments where the difference exists are abnormal fragments. Therefore, it is only necessary to combine the given threshold δ. If the error E is greater than δ, it is determined that the sequence may be abnormal at a certain time node in the future, thereby realizing the abnormal state prediction of the turbine.

[0094] Use the trained Trans-GAN model to generate a prediction sequence. The input time series fragment data is z. After being processed by the generator G, the reconstructed prediction sequence is expressed as.

[0095] T(z)=G(z)

[0096] Calculate the error between the original sequence z and the reconstructed sequence T(z), expressed as:

[0097] E=||zT(z)||

[0098] Where E is the error between the original sequence and the reconstructed sequence.

[0099] Set the dynamic threshold, expressed as:

[0100] δ=μ(E)+κ·σ(E)

[0101] Among them, δ is the dynamic threshold, μ(E) is the average of the most recent N error values, κ is the adjustment factor, and σ(E) is the standard deviation of the most recent N error values.

[0102] If the error E is greater than δ, it is determined that the sequence has an abnormality at a certain time node in the future, and the abnormal state of the turbine is predicted.

[0103] Example 2, reference Figure 4 , which is the second embodiment of the present invention, is different from the previous embodiment in that it provides a Transformer-based turbine state prediction system, including: a data acquisition module, a model building training module and a prediction module.

[0104] The data acquisition module is used to collect turbine data and perform preprocessing to obtain preprocessed data.

[0105] The model building and training module is used to build and train the Trans-GAN model using preprocessed data.

[0106] The prediction module is used to predict the status of the turbine using the trained Trans-GAN model.

[0107] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.

[0108] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.

[0109] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.

[0110] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0111] Embodiment 3 is the third embodiment of the present invention. It is different from the first two embodiments in that it is used to verify the technical effects adopted in the present invention so as to verify the real effects of the method.

[0112] Simulation condition settings:

[0113] Dataset: Uses actual operating data from a typical hydropower station, including sensor data of key components such as shafting and guide bearings.

[0114] Time period: Select data from the past year, including data for normal operation and various abnormal conditions.

[0115] Data preprocessing: including data cleaning, missing value processing, standardization and other steps to ensure the quality and consistency of input data.

[0116] Performance evaluation indicators:

[0117] Accuracy: The ratio of correctly predicted abnormal states to the total abnormal states.

[0118] Recall: The ratio of correctly predicted abnormal states to actual abnormal states.

[0119] F1 score: The harmonic average of precision and recall, used to measure the overall performance of the model.

[0120] Run time: The time it takes for the model to complete a full prediction on the standard test set.

[0121] False alarm rate: the ratio of normal data points that are incorrectly marked as abnormal to the total normal data points.

[0122] This example uses the traditional method and the method of the present invention to perform detection simultaneously, and the detection comparison results are as follows

[0123] As shown in Table 1:

[0124]

[0125]

[0126] In this table, we can see that the method of the present invention surpasses the traditional SVM and RNN models in all major indicators. In particular, the accuracy and recall are significantly higher than the traditional models, which shows its superior anomaly detection ability and effective learning of complex data patterns. At the same time, the running time of the present invention is shorter and the false alarm rate is significantly lower than the traditional method, which further proves its efficiency and reliability in practical applications.

[0127] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

Claims

1. A Transformer-based turbine state prediction method, Features: include, Collecting turbine data and preprocessing it to obtain preprocessed data; Use the preprocessed data to build and train the Trans-GAN model; Use the trained Trans-GAN model to predict the turbine state.

2. A method for predicting a turbine state based on Transformer according to claim 1, Features: The turbine data includes mechanical operating parameters, environmental monitoring parameters, electrical performance data and operating time data; The collected data is time series data; The preprocessing includes data cleaning and processing of missing values, and performing data analysis; The data analysis includes extracting main features from the collected data of all feature dimensions using machine learning methods, performing data dimensionality reduction using principal component analysis, and converting monitoring data represented by linearly correlated variables into data represented by linearly independent variables using orthogonal transformation.

3. A Transformer-based turbine state prediction method as claimed in claim 2, Features: The Trans-GAN model includes a Transformer model as a backbone network, and both the encoding network and the decoding network are composed of self-attention mechanism modules. After the input information is encoded, an encoding vector containing important feature information implicit in the input time series is obtained, and then the encoding vector is combined with the feature sequence and the position encoding information and simultaneously input into the decoding network, and the original sequence is reconstructed through the decoding network; The Transformer model is used as the generator network, and the discriminator only needs to complete the binary classification task. Therefore, the discriminator network is implemented by building a multi-layer perceptron, and then the Trans-GAN model based on the GAN architecture is realized.

4. A method for predicting a turbine state based on Transformer according to claim 3, Features: The Trans-GAN model also includes obtaining a reconstructed output from the preprocessed raw data through a generator network G based on a Transformer model. The reconstructed output is combined with the raw data and input into a discriminant network L based on a multi-layer perceptron. The true and false binary classification probability values ​​are obtained through a forward operation of the multi-layer perceptron, and then the model parameter gradient is updated through a back-propagation algorithm.

5. A method for predicting a turbine state based on Transformer according to claim 4, Features: The generator network includes an encoding network and a decoding network. The encoding network is expressed as: MultiHead(Q,K,V)=Concat(head 1 ,head 2 ,…,head h )W O G=LayerNorm(FFN(MultiHead(Q,K,V))+MultiHead(Q,K,V)) Among them, G is the output of the encoding network, LayerNorm is the layer normalization function, FFN is the feedforward neural network, MultiHead is the multi-head attention mechanism, Q, K, and V are the query, key, and value obtained by different linear transformations of the input, respectively. i is the output of the i-th attention head, Concat is the concatenation of the outputs of each head along the feature dimension, W O is the linear transformation weight matrix after merging the multi-head attention output, are the weight matrices for linear transformation queries, keys, and values, respectively. Softmax is the activation function. k is the dimension of the key vector; The decoding network is represented as, En=MultiHeadQ,G,G) Gz)=LayerNorm(FFN(En)+MultiHead(Q,K,V) Among them, G(z) is the output of the generator network, and En is the encoder-decoder attention mechanism.

6. A method for predicting a turbine state based on Transformer according to claim 5, Features: The discriminant network includes inputting the reconstructed output and the original data together into the discriminant network L based on the multi-layer perceptron, and obtaining the true and false binary classification probability values ​​through the forward operation of the multi-layer perceptron, which is expressed as: I = Concar(G(x),x) L(I)=σ(W n LeakyReLUW n-1 (…LeakyReLU(W 1 I+b 1 )…)+b n-1 )+b n ) Among them, I is the input of the discriminant network, x is the original data, and W 1 , …, W n is the weight matrix of each layer of the discriminant network, b 1 , …, b n is the bias vector of each layer of the discriminant network, σ is the sigmoid activation function, LeakyReLU is the activation function that allows small gradients to flow through the negative part, and L(I) is the probability of the discriminant network output; Set the true or false probability threshold. If L(I) is greater than the true or false probability threshold, it is real data. If L(I) is less than or equal to the true or false probability threshold, it is generated false data. The model is trained. For real data x, the output L of the discriminator is close to 1, which means that the data is considered to be real. The loss function is expressed as, -log(L) For the data G(z) generated by the generator G, the output L(I) of the discriminator is close to 0, that is, the data is considered to be generated, and the loss function is expressed as, -log(1-L(G(z))) The overall loss function of the model is expressed as, in, is the overall loss function, p data is the distribution of real data, p z The distribution of noise input to the generator; The gradient of the parameters is calculated through the back-propagation algorithm, and the parameters are updated to minimize the loss function, which is expressed as, Among them, θ Lnew is the updated parameter, θ Lold is the parameter before updating, and η is the learning rate.

7. A method for predicting a turbine state based on Transformer according to claim 6, Features: The turbine state prediction includes using the trained Trans-GAN model to generate a prediction sequence. The input time series segment data is z. After being processed by the generator G, the reconstructed prediction sequence is expressed as: T(z)=G(z) Calculate the error between the original sequence z and the reconstructed sequence T(z), expressed as, E=||zT(z)|| Where E is the error between the original sequence and the reconstructed sequence; Set the dynamic threshold, expressed as, δ=μ(E)+κ·σ(E) Among them, δ is the dynamic threshold, μ(E) is the average of the most recent N error values, κ is the adjustment factor, and σ(E) is the standard deviation of the most recent N error values; If the error E is greater than δ, it is determined that the sequence has an abnormality at a certain time node in the future, and the abnormal state of the turbine is predicted.

8. A system using a Transformer-based turbine state prediction method as claimed in any one of claims 1 to 7, Features: Including data collection module, model building training module and prediction module; The data acquisition module is used to collect turbine data and perform preprocessing to obtain preprocessed data; The model building and training module is used to build and train the Trans-GAN model using the preprocessed data; The prediction module is used to predict the state of the turbine using the trained Trans-GAN model.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program. Features: When the processor executes the computer program, the steps of a Transformer-based turbine state prediction method described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, Features: When the computer program is executed by a processor, the steps of a Transformer-based turbine state prediction method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Reliability data anomaly detection and correction method based on big data and artificial intelligence

    CN118260693A

Cited By

  • Water turbine runner health state evaluation method, system, device and medium

    CN120632541A

  • Data analysis and real-time environment monitoring method and system based on photovoltaic power plant

    CN120875534A

  • A photovoltaic power plant data analysis and real-time environment monitoring method and system

    CN120875534B