Water turbine speed regulation controller based on deep learning and long short-term memory network
By constructing a turbine speed controller based on deep learning and LSTM, the problems of untimely adjustment and insufficient robustness of traditional PID controllers in turbine speed control systems are solved, achieving more efficient turbine speed control and improving the transient performance of the system.
Patent Information
- Application Number
- CN202511013513.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-23
- Publication Date
- 2025-10-28
AI Technical Summary
Traditional PID controllers in turbine speed control systems suffer from problems such as untimely adjustment and insufficient robustness. In particular, they exhibit complex parameter tuning, large oscillations, and insufficient robustness when dealing with significant changes in operating conditions and sudden disturbances.
A turbine speed controller based on deep learning and long short-term memory (LSTM) is constructed. By building a hydro-generator model, collecting data and training the LSTM model, the traditional PID controller is replaced.
It enhances the intelligent control capability of the turbine speed regulation system, overcomes the problem of complex parameter tuning in the PID control system, and improves the transient stability and response speed of the control system.
Smart Images

Figure CN120848157A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of hydropower control technology, specifically to a turbine speed controller based on deep learning and long short-term memory networks. Background Technology
[0002] The turbine is the core equipment of a hydropower station, and the performance of its speed control system directly affects the station's safety, economy, and operational stability. Furthermore, with the integration of hydropower, wind power, and solar power, and the increasing proportion of renewable energy integration in hydropower stations, the demand for rapid response and high-precision control in the regulation system is gradually increasing. Traditional turbine governors mainly employ PID (Proportional-Integral-Derivative) control algorithms, which have advantages such as simple structure, mature regulation, and low cost. However, traditional PID governors exhibit shortcomings such as complex parameter tuning, large oscillations, and insufficient robustness when dealing with significant changes in operating conditions, sudden disturbances, and extreme conditions.
[0003] In recent years, deep learning technology has demonstrated powerful capabilities in pattern recognition, predictive analytics, and other fields. Its multi-layered neural network structure can automatically extract high-order features from complex data, exhibiting superior adaptability and strong generalization ability. It has achieved significant results in image recognition, natural language processing, and other areas. However, in the application of hydroelectric generator sets, deep learning technology is mostly focused on optimizing the PID parameters of the turbine governor, essentially still using PID control, and rarely directly applying it as a speed controller. Summary of the Invention
[0004] The purpose of this invention is to provide a turbine speed controller based on deep learning and long short-term memory networks, which solves the problems of insufficient timely adjustment and lack of robustness in PID control.
[0005] To solve the above-mentioned technical problems, the present invention adopts the following technical solution: a turbine speed controller based on deep learning and long short-term memory networks, characterized in that the speed controller is constructed through the following steps: S1. Construct a model of the hydro-generator unit; S2. Collect data of the hydro-generator unit under frequency disturbance and power disturbance conditions; S3. Construct a speed control model based on deep learning and long short-term memory networks; S4. Use the collected data for speed controller model training; S5. Replace the PID controller in the hydro-generator with the trained speed controller model.
[0006] A further technical solution is that the hydro-generator model in step S1 includes the following functions: The following transfer functions appear These are all complex frequency variables in the Laplace transform, representing the differential operator; The transfer function of the turbine model is , in, The inertial time constant of the water flow (in seconds). The transmission coefficient of the turbine's power torque to the actuator stroke, The transmission coefficient of turbine dynamic torque to head. The transfer coefficient of turbine flow rate to guide vane opening, The transfer coefficient of water head from turbine flow rate; The transfer function of the hydraulic servo system is , in, The relay time constant (seconds); The transfer function of PID control is ,in , , These are the proportional, integral, and differential coefficients, respectively. The transient feedback time constant (seconds); The transfer function of the generator and load is: , in The inertial time constant (in seconds) of the unit. This is the self-balancing coefficient of the generator unit.
[0007] A further technical solution is that the data collected in step S2 includes frequency perturbation data. / Power disturbance data Speed deviation data Time series PID controller output .
[0008] A further technical solution is that the speed controller model in step S3 includes an input layer, an LSTM layer, a fully connected layer, and an output layer. Specifically: a) Input layer: Receives three-dimensional time-series signals, including frequency perturbation signals. / Power disturbance signal Speed deviation signal Time series And perform normalization processing; b) LSTM layer: Set up multiple hidden units to extract the long-term and short-term dynamic features of the turbine operation and capture the complex time-series relationship of the input signal; c) Fully connected layer: Maps the hidden state vector of the LSTM layer to the LSTM prediction signal. ; d) Output layer: Outputs the LSTM prediction signal .
[0009] A further technical solution is to use the evaluation index of the speed controller model in step S3, which employs both mean square error (MSE) and root mean square error (RMSE) for evaluation, wherein: MSE is defined as RMSE is defined as ; in Let the mean square error loss function be . Let N be the root mean square error loss function, and N be the total number of samples. To predict the output signal for LSTM, This is the output of the PID controller.
[0010] A further technical solution is the speed controller model training in step S4, which is as follows: The data collected in step S2 is divided into a training set and a validation set in an 8:2 ratio. The LSTM model is then trained using the training set, and finally validated using the validation set, with the output signal from the PID controller being used as the validation signal. The regression target of the LSTM model is used; during training, dynamic time series length, optimizer, and adaptive learning rate are employed to optimize the training process. Mean squared error (MSE) and root mean squared error (RMSE) are used as evaluation metrics, and the model with the lowest validation error is selected as the preferred model. Specifically: a) Dynamically calculate the time series length: Set a minimum length and maximum length In the early stages of training, the shortest sequence is used. As the number of iterations gradually increases, the shortest sequence is used. The time series length used for each iteration × ,in This represents the current iteration step. This represents the maximum number of iterations. b) Update parameters by calling the Adam optimizer: Use the Adam optimization algorithm to update the network parameter vector at the current iteration step. Accelerate the update process. ,in This represents the current iteration step. For the first The learning rate of the step. This is the value after correction for the first-order momentum deviation. This is the value after correction for the second-order momentum deviation. To prevent small amounts from being divided by zero; c) Adaptive learning rate: When the evaluation metrics MSE and RMSE fail to decrease within a certain number of iterations, the learning rate... ,in This represents the current iteration step. The initial learning rate, For real numbers ( ), It is an exponential decay rate; d) If the verification error is the lowest in history, save the current model parameters.
[0011] Compared with the prior art, the beneficial effects of the present invention are: 1. First, a mathematical model of the hydro-generator unit is built, and data is collected and saved under multiple operating conditions under PID control. A speed controller model is constructed based on deep learning methods and Long Short-Term Memory (LSTM) networks. The collected data is used as training and testing for the LSTM speed controller model. The final LSTM speed controller is obtained through training and is used to replace the existing PID controller to realize intelligent control of the hydro-generator speed control system.
[0012] 2. Deep learning methods are applied to the control system of hydro-generator units to overcome the shortcomings of PID control systems that require parameter tuning for different operating conditions, while improving the transient stability of the control system.
[0013] 3. In constructing the LSTM controller, this invention employs temporal feature learning and adaptive weight optimization, significantly improving the performance of the LSTM controller. Simulation experiments show that the LSTM speed controller constructed in this invention can not only replace the PID controller but also possesses superior transient performance. Attached Figure Description
[0014] Figure 1 This is a schematic diagram of the mathematical model of a hydro-generator unit.
[0015] Figure 2 The network architecture diagram for training LSTM.
[0016] Figure 3 This is a schematic diagram of a hydro-generator unit with an LSTM controller in operation.
[0017] Figure 4 The example illustrates the convergence process of the MSE and RMSE indices.
[0018] Figure 5 This is a comparison graph showing the speed changes of the PID controller and the LSTM controller under frequency disturbances.
[0019] Figure 6 This is a comparison chart of the speed changes of the PID controller and the LSTM controller under power disturbances.
[0020] Figure 7 For different A comparison of frequency disturbance speed changes between PID controllers and LSTM controllers under different conditions.
[0021] Figure 8 For different A comparison chart of power disturbance speed changes between PID controller and LSTM controller under different conditions. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to embodiments. The specific embodiments described herein are for illustrative purposes only and are not intended to limit the invention.
[0023] Example The specific steps for constructing and using a turbine speed controller based on deep learning and long short-term memory networks are as follows: 1. Model building of hydro-generator unit like Figure 1 As shown, the specific transfer function in the mathematical model of the hydro-generator unit is as follows: Transfer function of the water turbine model in, The inertial time constant of the water flow (in seconds). The transmission coefficient of the turbine's power torque to the actuator stroke, The transmission coefficient of turbine dynamic torque to head. The transfer coefficient of turbine flow rate to guide vane opening, This is the transfer coefficient of the turbine flow rate to the water head.
[0024] Transfer function of hydraulic servo system in, is the time constant (seconds) of the hydraulic servo system.
[0025] The speed controller uses PID control. The working principle of PID is a combination of proportional, derivative, and integral PID parameters. The transfer function of PID control is: in, , , These are proportional, integral, and differential, respectively. The transient feedback time constant (in seconds).
[0026] Transfer function of generator and load: in, The inertial time constant (in seconds) of the unit. This is the self-balancing coefficient of the generator unit.
[0027] The specific parameter values are shown in Table 1: Table 1 Simulation Parameter Settings for Hydropower Generator Sets 2. Data Collection Based on the hydro-generator unit model, adopting Figure 1 The constructed operating structure was simulated with a simulation time of 100 seconds and a sampling interval of 0.1 seconds. Frequency and power disturbances were simulated, and input and output data of the system under various operating conditions, i.e., frequency disturbance data, were collected. / Power disturbance data Speed deviation data Time series PID output data The data was then saved as a dataset to serve as training data for the subsequent LSTM speed controller. The simulation time was set to 100 seconds, the sampling interval to 0.1 seconds, and data of dimension [1001×4] was generated, where the first column represents the frequency perturbation data. The second column contains the speed deviation data. The third column contains time series data. The fourth column contains the PID controller output data. .
[0028] 3. Construct a speed controller model based on deep learning and long short-term memory networks. A deep learning speed controller is constructed using a Long Short-Term Memory (LSTM) neural network. LSTM networks have unique advantages in processing time-series data and can capture the complex dynamic characteristics of water turbine operation. The input-output mapping of the Long Short-Term Memory network (LSTM) is defined as follows: in To predict the output signal for LSTM, For disturbance signals, Speed deviation signal It is a time series.
[0029] Its network architecture is as follows Figure 2 As shown in the diagram, the descriptions of each layer are as follows: (1) Input layer Receive three-dimensional time-series signals, i.e., perturbation signals. Speed deviation signal Time series The features are then fused and normalized. The original input vector is: in The original 3D input vector, For discrete time indexing One sampling point, For disturbance signals (frequency disturbance signals) / Power disturbance signal ), For the input speed deviation signal, It is a time series.
[0030] Normalized input: in The input vector after normalization. The mean vector of the three-dimensional signal. The standard deviation vector of the three-dimensional signal. This is the element-wise division operator.
[0031] (2) LSTM layer The LSTM layer is used to extract the short- and long-term dynamic features of the turbine system, and includes a forget gate, an input gate, and an output gate. For each time step... splicing and normalizing input Compared to the previous hidden layer state It can be represented as: in: Let be the hidden state vector at time (k-1).
[0032] Forgotten Gate: in Forget gate vector, Here is the forget gate weight matrix. This is the forget gate bias vector.
[0033] Input gates and candidate states: in For the input gate vector, Let be the candidate cell state vector. The input gate weight matrix, This is the input gate bias vector. The hyperbolic tangent activation function is used. The candidate state weight matrix is... Candidate state bias vector.
[0034] Update cell status: in Let be the cell state vector. Forget gate vector, This is the element-wise multiplication operator for vectors.
[0035] Output gate and hidden state in For the output gate vector, This is the output gate weight matrix. This is the output gate bias vector. For the first The state vector is hidden at all times.
[0036] (3) Fully connected layer The fully connected layer receives the output from the previous layer and maps it to the space required by the target task through a linear transformation. That is, it converts the sequence feature vectors (hidden states) extracted by the LSTM layer into control output signals, completing the linear mapping from high-dimensional features to target values (predicted values). The fully connected layer is represented as: in For the weights of the fully connected layer, For the first The state vector is hidden at all times. Given the bias vector of the fully connected layer, the fully connected layer can be further represented as: in This is the final predicted output of the LSTM model. To predict the output signal for LSTM, For disturbance signals, For the input speed deviation signal, It is a time series.
[0037] (4) Output layer The task of the output layer is to output the predicted value. The error of the predicted value is evaluated using loss functions (MSE) and (RMSE). The smaller the values of the two evaluation indicators, the more accurate the prediction model is.
[0038] MSE and RMSE are defined as follows: in Let the mean squared error loss function be used. Here, is the root mean square loss function, and N is the total number of samples. To predict the output signal for LSTM, This is the output signal for PID control.
[0039] 4. Use the collected data for speed controller model training. The LSTM controller is trained using the following steps: (1) Define the collected data as a vector ,in For disturbance signals, For speed deviation For time series, This is the PID output data. The data is divided into a training set and a validation set in an 8:2 ratio. The training set is used to train the LSTM model; the validation set is used to validate the model. Subsequently, the first three signals of each sample... , , This signal serves as the input signal to the LSTM model of the speed controller and is used to generate the output data of the PID controller. As the regression target of the model.
[0040] (2) Set various training parameters, including: optimizer, maximum number of iterations, learning rate, sequence length and training validation metrics.
[0041] The optimizer (Adam) accelerates convergence by adaptively adjusting the learning rate. During training, Adam calculates the learning rate separately for each parameter, enabling training to find the optimal solution more efficiently on complex loss functions.
[0042] Maximum number of iterations: The model adjusts its parameters during each iteration to gradually reduce the loss until the maximum number of iterations or other stopping conditions are met.
[0043] Learning rate: Used to balance training speed and accuracy, it is adjusted by changing the step size of the parameter. The learning rate is usually gradually decreased as training progresses to achieve rapid convergence in the early stages and fine-tuning in the later stages.
[0044] Sequence length: Dynamically adjusted based on the length of the time series to improve training efficiency.
[0045] Training validation metrics: Validation was performed using MSE and RMSE loss functions.
[0046] The specific steps are as follows: Specifically: a) Dynamically calculate the time series length: Set a minimum length and maximum length In the early stages of training, the shortest sequence is used. As the number of iterations gradually increases, the shortest sequence is used. The time series length used for each iteration × ,in This represents the current iteration step. This represents the maximum number of training iterations. b) Update parameters by calling the Adam optimizer: Use the Adam optimization algorithm to update the network parameter vector at the current iteration step. Accelerate the update process. ,in This represents the current iteration step. For the first The learning rate of the step. This is the value after correction for the first-order momentum deviation. This is the value after correction for the second-order momentum deviation. To prevent small amounts from being divided by zero; c) Adaptive learning rate: When the evaluation metrics MSE and RMSE fail to decrease within a certain number of iterations, the learning rate... ,in This represents the current iteration step. The initial learning rate, For real numbers ( ), It is an exponential decay rate; d) If the verification error is the lowest in history, save the current model parameters.
[0047] The collected samples were split into 80% as the training set and 20% as the validation set. In this embodiment, the input layer uses a single input dimension and performs normalization within this layer. Then, an LSTM layer with 100 hidden units is constructed, and finally, the target is output through a single-neuron fully connected layer. The Adam optimization algorithm is selected during training, with an initial learning rate of 0.001 and a maximum training iteration count of 2000. During training, the "shortest sequence" mode is used to dynamically adjust the input sequence length, and the network model with the smallest validation error is saved. The loss function dynamically changes during training as follows: Figure 4 As shown, the final calculation results converged to MSE=0.009 and RMSE=0.095. Both indicators are close to 0, indicating that the model meets the requirements.
[0048] 5. Replace the PID controller in the hydro-generator with the trained speed controller model. The trained LSTM model is used to replace the PID controller of the turbine governor, such as... Figure 3 As shown in the figure. And compared with the original PID controller for verification.
[0049] Two operating conditions were used for comparison. The first was the water flow inertia time constant (seconds). One scenario is that the disturbance to the hydro-generator unit remains constant, meaning the LSTM controller input includes both frequency and power disturbances. The other scenario is that the disturbance to the hydro-generator unit remains constant, with the water flow inertial time constant (in seconds). Change, that is, change the parameters under the first case. The size of the simulation is set, and the simulation runtime is set to 100 seconds. The following sections will explain these details.
[0050] (a) Comparison of transient rotational speed under frequency and power disturbances Figure 3 Initially, the turbine generator unit maintained stable operation. At 3 seconds, frequency and power disturbances occurred, respectively. The changes in turbine generator unit speed under PID controller mode and LSTM controller mode at this time are as follows: Figure 5 , Figure 6 As shown, the specific convergence time and overshoot are listed in Table 3. From Table 3 and... Figure 5 , Figure 6 It can be seen that the LSTM controller has better response speed and overshoot than the PID controller.
[0051] Table 2 Performance Comparison of PID Controller and LSTM Controller (b) different Transient comparison of rotational speed under parameters Change the water flow inertia time constant (seconds) The remaining parameters are the same as in (a), that is, in =2.0 s and Simulations were performed under two sets of parameters at 3.0 s. The results of the speed change in LSTM controller mode and PID controller mode are as follows: Figure 7 and Figure 8 As shown in the figure, At 2.0 s, the LSTM controller converges quickly, while the PID controller stabilizes after a longer period of time, and the amplitude is also large. At 3.0 s, the LSTM controller can still converge stably, while the PID controller oscillates and does not converge.
[0052] Experimental results show that the LSTM controller can converge stably, with a faster response speed and smaller overshoot, while the PID controller is prone to oscillation or even failure to converge under the same conditions. These comparisons demonstrate that the LSTM controller can not only replace the PID controller but also offers superior control performance.
[0053] The above experiments also show that the deep learning-based LSTM controller performs well under different operating conditions, can replace the PID controller, improve the control performance of the hydro-generator unit, and solve the problem of difficult adjustment of traditional PID parameters, thus improving the system's adaptability.
[0054] Although the invention has been described herein with reference to several illustrative embodiments, it should be understood that those skilled in the art can devise many other modifications and implementations that will fall within the scope of this application.
Claims
1. A turbine speed controller based on deep learning and long short-term memory networks, characterized in that, The speed controller is constructed through the following steps: S1. Construct a model of the hydro-generator unit; S2. Collect data of the hydro-generator unit under frequency disturbance and power disturbance conditions; S3. Construct a speed control model based on deep learning and long short-term memory networks; S4. Use the collected data for speed controller model training; S5. Replace the PID controller in the hydro-generator with the trained speed controller model.
2. The turbine speed controller based on deep learning and long short-term memory networks according to claim 1, characterized in that, The hydro-generator model in step S1 includes the following functions: The transfer function of the turbine model is , in, Let be the inertial time constant of the water flow. The transmission coefficient of the turbine's power torque to the actuator stroke, The transmission coefficient of turbine dynamic torque to head. The transfer coefficient of turbine flow rate to guide vane opening, The transfer coefficient of water head from turbine flow rate; The transfer function of the hydraulic servo system is , in, The relay time constant (seconds); The transfer function of PID control is ,in , , These are the proportional, integral, and differential coefficients, respectively. The transient feedback time constant (seconds); The transfer function of the generator and load is: , in The inertial time constant (in seconds) of the unit. Unit self-balancing coefficient In the above transfer function These are all complex frequency variables in the Laplace transform, representing the differential operator.
3. The turbine speed controller based on deep learning and long short-term memory networks according to claim 1, characterized in that, The data collected in step S2 includes frequency disturbance data. / Power disturbance data Speed deviation data Time series PID controller output .
4. A turbine speed controller based on deep learning and long short-term memory networks according to claim 1, characterized in that, The speed controller model in step S3 includes an input layer, an LSTM layer, a fully connected layer, and an output layer, specifically: a) Input layer: Receives three-dimensional time-series signals, including frequency perturbation signals. / Power disturbance signal Speed deviation signal Time series And perform normalization processing; b) LSTM layer: Set up multiple hidden units to extract the long-term and short-term dynamic features of the turbine operation and capture the complex time-series relationship of the input signal; c) Fully connected layer: Maps the hidden state vector of the LSTM layer to the LSTM prediction signal. ; d) Output layer: Outputs the LSTM prediction signal .
5. A turbine speed controller based on deep learning and long short-term memory networks according to claim 3, characterized in that, The evaluation index for the speed controller model in step S3 is jointly evaluated using the mean square error (MSE) and the root mean square error (RMSE), where: MSE is defined as RMSE is defined as ; in Let the mean square error loss function be . Let N be the root mean square error loss function, and N be the total number of samples. To predict the output signal for LSTM, This is the output of the PID controller.
6. A turbine speed controller based on deep learning and long short-term memory networks according to claim 1, characterized in that, The specific training of the speed controller model in step S4 is as follows: The data collected in step S2 is divided into a training set and a validation set in an 8:2 ratio. The LSTM model is then trained using the training set, and finally validated using the validation set, with the output signal from the PID controller being used as the validation signal. The regression target of the LSTM model is used; during training, dynamic time series length, optimizer, and adaptive learning rate are used to optimize the training process. The mean squared error loss function (MSE) and root mean square error loss function (RMSE) are used as evaluation metrics, and the model with the lowest validation error is saved as the preferred model. The specific steps are as follows: a) Dynamically calculate the time series length: Set a minimum length and maximum length In the early stages of training, the shortest sequence is used. As the number of iterations gradually increases, the shortest sequence is used. The time series length used for each iteration × ,in This represents the current iteration step. This represents the maximum number of training iterations. b) Update parameters by calling the Adam optimizer: Use the Adam optimization algorithm to update the network parameter vector at the current iteration step. Accelerate the update process. ,in This represents the current iteration step. For the first The learning rate of the step. This is the value after correction for the first-order momentum deviation. This is the value after correction for the second-order momentum deviation. To prevent small amounts from being divided by zero; c) Adaptive learning rate: When the evaluation metrics MSE and RMSE fail to decrease within a certain number of iterations, the learning rate... ,in This represents the current iteration step. The initial learning rate, For real numbers, It is an exponential decay rate; d) When the verification error is at its minimum value, save the current model parameters.
Citation Information
Patent Citations
Injection molding machine charging barrel temperature control method
CN110202768A
Variable pitch control method design based on LSTM
CN113494416A
SPR grating type sensor design method based on FPCL-DCNN
CN119598849A
Method for predicting rotating stall of axial flow compressor on the basis of stacked long short-term memory network
WO2023056614A1