Temperature compensation model and method for pumped storage ultrasonic flowmeter based on LSTM (Long Short Term Memory)

By constructing an LSTM-based neural network model, the measurement error problem of ultrasonic flowmeters in pumped storage power plants under high and low temperature environments was solved, achieving high-precision temperature compensation, improving the measurement accuracy and adaptability of the flowmeter, and supporting the automated management of the power plant.

CN121997704APending Publication Date: 2026-05-08CHANGDIAN NEW ENERGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHANGDIAN NEW ENERGY CO LTD
Filing Date
2025-12-17
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing temperature compensation methods cannot effectively handle the complex and variable high and low temperature conditions in pumped storage power plants, resulting in large measurement errors of ultrasonic flow meters and affecting measurement accuracy and reliability.

Method used

By employing an LSTM-based neural network model, which constructs an input layer, an LSTM layer, a fully connected layer, and an output layer, the model learns the long-term dependency between temperature and flow measurement errors. Combined with specific data processing and training strategies, it achieves high-precision temperature compensation.

Benefits of technology

It significantly reduces measurement errors in high and low temperature environments, improves the measurement accuracy and adaptability of ultrasonic flow meters, and supports the automated and intelligent operation and management of pumped storage power plants.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121997704A_ABST
    Figure CN121997704A_ABST
Patent Text Reader

Abstract

The invention discloses a pumped storage ultrasonic flowmeter temperature compensation model and method based on LSTM (Long Short Term Memory), and aims to overcome the defect that an existing temperature compensation method is difficult to process nonlinear and dynamic temperature influences under complex working conditions of a pumped storage power plant. According to the method, temperature, ultrasonic propagation time and flow data under laboratory simulation and on-site actual working conditions are collected, and after cleaning and standardized preprocessing, a neural network model comprising an input layer, an LSTM layer, a full-connection layer and an output layer is constructed and trained. The model can learn a long-term time sequence dependency relationship between the temperature and the flow error, outputs a high-precision error compensation value, and is deployed on a main control chip of the flow meter to realize real-time dynamic compensation. The measurement precision and adaptability of the ultrasonic flowmeter under the wide temperature range condition are remarkably improved, and reliable support is provided for precise operation of a pumped storage power plant.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of pumped storage technology, and in particular relates to a temperature compensation model and method for pumped storage ultrasonic flowmeters based on LSTM. Background Technology

[0002] In pumped-storage power plants, ultrasonic flow meters play a crucial role in tailrace pipes, pumping pipes, and intake pipes. As a key flow measurement device, their measurement accuracy is paramount. However, the propagation speed of ultrasonic waves in fluids is significantly affected by temperature, leading to measurement errors in the flow meters. Existing temperature compensation methods often employ linear compensation or simple empirical formulas, which are ill-suited to the complex and variable high and low temperature conditions of pumped-storage power plants and the nonlinear relationship between temperature and measurement error. Furthermore, traditional methods fail to effectively utilize the dynamic information of temperature changes over time, resulting in poor compensation performance. This severely impacts the measurement reliability of ultrasonic flow meters in extreme temperature environments, hindering the precise operation and management of pumped-storage power plants. Therefore, this patent proposes a temperature compensation technology that can effectively process time-series data and accurately capture the nonlinear relationship between temperature and measurement error.

[0003] Therefore, it is necessary to design a temperature compensation model and method for pumped storage ultrasonic flowmeters based on LSTM to solve the above problems. Summary of the Invention

[0004] The technical problem to be solved by this invention is to provide a temperature compensation model and method for pumped storage ultrasonic flowmeters based on LSTM. By constructing an LSTM-based neural network model and combining it with specific data processing and training strategies, the invention solves the problems of low compensation accuracy and poor adaptability of existing temperature compensation methods in high and low temperature environments of pumped storage power plants, and achieves high-precision temperature compensation of ultrasonic flowmeter measurement results.

[0005] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: A temperature compensation model for a pumped-storage ultrasonic flow meter based on LSTM includes: The input layer receives preprocessed temperature, ultrasonic propagation time, and flow rate data and converts them into tensor form. LSTM layers are used to learn the long-term dependency between temperature and flow measurement error; Fully connected layers are used to integrate features extracted by LSTM layers; The output layer is used to output the predicted value of the flow measurement error after temperature compensation.

[0006] Preferably, the input layer receives temperature, ultrasonic propagation time and flow rate data for the past 10 time steps, and converts them into tensor form.

[0007] Preferably, the LSTM layer includes 2-3 LSTM units, each containing 64-128 neurons; the retention and updating of information are controlled by forget gates, input gates and output gates to learn the long-term dependency between temperature and flow measurement error.

[0008] Preferably, the output layer has 1 neuron, uses a linear activation function, and outputs a continuous temperature-compensated flow measurement error prediction value.

[0009] Preferably, the model is trained using a mean squared error loss function and an Adam optimizer, with a batch size of 32-64 data inputs during training.

[0010] Preferably, a method for a temperature compensation model of a pumped-storage ultrasonic flow meter based on LSTM includes the following steps: S1, collects temperature data, ultrasonic propagation time data and flow data of ultrasonic flow meter in pumped storage power plant; S2, preprocesses the collected data, including data cleaning, outlier handling, and data standardization; S3, construct a temperature compensation model based on LSTM, including an input layer, an LSTM layer, a fully connected layer, and an output layer; S4, Train the temperature compensation model using the preprocessed data, and update the parameters based on the loss function and optimizer; S5, evaluate model performance, and optimize the model if the preset indicators are not met; S6 deploys the optimized model to the main control chip of the ultrasonic flow meter to achieve real-time temperature compensation.

[0011] Preferably, the data acquisition in step S1 includes: In the laboratory, high and low temperature operating conditions of a pumped storage power plant were simulated, and data were collected under multiple operating conditions at intervals of -50℃ to 150℃ and 5℃. Data was continuously collected for at least 6 months in an actual power plant, recording temperature, ultrasonic propagation time, actual flow rate, and unit status.

[0012] Preferably, the data preprocessing in step S2 includes: use The principle is to identify and remove outliers, and fill in missing data using linear interpolation or time series forecasting methods. The temperature, ultrasonic propagation time, and flow rate data were normalized to the [0,1] interval: .

[0013] Preferably, model training in step S4 includes: Mean squared error was used as the loss function, and the Adam optimizer was used for training with an initial learning rate of 0.001. ; The data is divided into training and testing sets according to a certain ratio, and input into the model in batches. The parameters are updated through forward and backward propagation. Stop training when the training loss no longer decreases significantly after 10-15 consecutive rounds.

[0014] Preferably, model deployment in step S6 includes: The main control chip collects temperature, ultrasonic propagation time, and flow rate data in real time, and inputs them into the model after preprocessing. The model outputs a flow measurement error compensation value, and the main control chip corrects the flow meter measurement results based on this value.

[0015] The beneficial effects of this invention are as follows: 1. Innovative Model Architecture: The unique architecture of the LSTM-based temperature compensation model is preserved. The input layer performs tensor transformation on temperature, ultrasonic propagation time, and flow rate data within a specific time window; the LSTM layer learns long-term dependencies through 2-3 layers, 64-128 neurons, and a gating mechanism; the fully connected layer integrates features; and the output layer outputs the predicted error value. This architecture design is the foundation for achieving high-precision temperature compensation, distinguishing it from traditional models. 2. Data Processing Strategy: Patented specific data acquisition and preprocessing methods, including multi-condition data acquisition through laboratory simulation of high and low temperatures and long-term multi-dimensional data acquisition in the field; data preprocessing employs the 3σ principle to clean outliers, specific interpolation methods to fill missing values, and normalization formulas to standardize data. These strategies provide high-quality data for model training, ensuring model performance. 3. Model Training and Optimization Methods: This section protects the mean squared error loss function, Adam optimizer, and related parameter settings used during model training, as well as the training process involving dataset partitioning, batch training, and backpropagation for parameter updates. Simultaneously, it protects optimization methods achieved by adjusting model parameters, expanding the dataset, and improving data preprocessing to ensure the model reaches optimal performance.

[0016] 4. Complete Temperature Compensation Methodology: This document outlines a complete temperature compensation methodology from data acquisition, preprocessing, model training and optimization to final model deployment and application. This process organically integrates each step to achieve high-precision temperature compensation of ultrasonic flowmeter measurement results, forming a complete technical solution for addressing the temperature compensation problem of ultrasonic flowmeters in pumped storage power plants.

[0017] 5. This invention utilizes an LSTM-based temperature compensation model to effectively handle the time-series characteristics of temperature and other data. Through multi-layered LSTM units and numerous neurons, it deeply learns the complex nonlinear relationship between temperature and flow measurement error. Compared to traditional compensation methods, it reduces measurement error by more than 40% in high and low temperature environments, significantly improving the measurement accuracy of ultrasonic flow meters. Extensive data collection from laboratories and field operations covers various operating conditions and temperature ranges in pumped storage power plants, enabling the model to adapt to complex and changing operating environments. Simultaneously, data preprocessing and model optimization strategies further enhance the model's generalization ability, ensuring accurate compensation in different scenarios. After deployment on the main control chip, the model can collect data in real time and perform dynamic compensation without manual intervention. It responds promptly to temperature changes, ensuring the flow meter continuously and stably outputs accurate measurement results, providing reliable support for the automated and intelligent operation management of pumped storage power plants, and improving plant operating efficiency and economic benefits. Attached Figure Description

[0018] Figure 1 This is a training flowchart in an embodiment of the present invention; Figure 2 This is a simulation training result diagram of the temperature compensation model in an embodiment of the present invention. Detailed Implementation

[0019] Example 1: like Figure 1 As shown, a temperature compensation model for a pumped-storage ultrasonic flow meter based on LSTM includes: The input layer receives preprocessed temperature, ultrasonic propagation time, and flow rate data and converts them into tensor form. LSTM layers are used to learn the long-term dependency between temperature and flow measurement error; Fully connected layers are used to integrate features extracted by LSTM layers; The output layer is used to output the predicted value of the flow measurement error after temperature compensation.

[0020] Preferably, the input layer receives temperature, ultrasonic propagation time and flow rate data for the past 10 time steps, and converts them into tensor form.

[0021] Preferably, the LSTM layer includes 2-3 LSTM units, each containing 64-128 neurons; the retention and updating of information are controlled by forget gates, input gates and output gates to learn the long-term dependency between temperature and flow measurement error.

[0022] Preferably, the output layer has 1 neuron, uses a linear activation function, and outputs a continuous temperature-compensated flow measurement error prediction value.

[0023] Preferably, the model is trained using a mean squared error loss function and an Adam optimizer, with a batch size of 32-64 data inputs during training.

[0024] Preferably, a method for a temperature compensation model of a pumped-storage ultrasonic flow meter based on LSTM includes the following steps: S1, collects temperature data, ultrasonic propagation time data and flow data of ultrasonic flow meter in pumped storage power plant; S2, preprocesses the collected data, including data cleaning, outlier handling, and data standardization; S3, construct a temperature compensation model based on LSTM, including an input layer, an LSTM layer, a fully connected layer, and an output layer; S4, Train the temperature compensation model using the preprocessed data, and update the parameters based on the loss function and optimizer; S5, evaluate model performance, and optimize the model if the preset indicators are not met; S6 deploys the optimized model to the main control chip of the ultrasonic flow meter to achieve real-time temperature compensation.

[0025] Preferably, the data acquisition in step S1 includes: In the laboratory, high and low temperature operating conditions of a pumped storage power plant were simulated, and data were collected under multiple operating conditions at intervals of -50℃ to 150℃ and 5℃. Data was continuously collected for at least 6 months in an actual power plant, recording temperature, ultrasonic propagation time, actual flow rate, and unit status.

[0026] Preferably, the data preprocessing in step S2 includes: use The principle is to identify and remove outliers, and fill in missing data using linear interpolation or time series forecasting methods. The temperature, ultrasonic propagation time, and flow rate data were normalized to the [0,1] interval: .

[0027] Preferably, model training in step S4 includes: Mean squared error was used as the loss function, and the Adam optimizer was used for training with an initial learning rate of 0.001. ; The data is divided into training and testing sets according to a certain ratio, and input into the model in batches. The parameters are updated through forward and backward propagation. Stop training when the training loss no longer decreases significantly after 10-15 consecutive rounds.

[0028] Preferably, model deployment in step S6 includes: The main control chip collects temperature, ultrasonic propagation time, and flow rate data in real time, and inputs them into the model after preprocessing. The model outputs a flow measurement error compensation value, and the main control chip corrects the flow meter measurement results based on this value.

[0029] Example 2: This embodiment provides a practical process for applying this method to a pumped storage unit, as detailed below: A temperature compensation model for a pumped-storage ultrasonic flow meter based on LSTM includes: 1. Input layer: Receives preprocessed temperature data, ultrasonic propagation time data, and flow rate data. It takes data within a certain time window (such as the past 10 time steps) as input. Each time step contains three features: temperature, ultrasonic propagation time, and flow rate, and converts them into tensor form. 2. LSTM layer: Set up 2-3 LSTM units, each containing 64-128 neurons. Control the retention and updating of information through forget gate, input gate and output gate to learn the long-term dependency between temperature and flow measurement error; 3. Fully connected layer: Connects to the output of the LSTM layer and integrates the features extracted by the LSTM layer; 4. Output layer: Outputs the predicted value of flow measurement error after temperature compensation. It has 1 neuron and uses a linear activation function to output continuous numerical results. A temperature compensation method for a pumped storage ultrasonic flow meter based on the above model, comprising the following specific steps: 1. Data Collection: a. Laboratory data acquisition: Under the simulated high and low temperature conditions of a pumped storage power plant, the temperature was gradually increased from -50℃ to 150℃ in 5℃ increments. At each temperature point, a stable fluid with different flow rates (covering the flow measurement range) was generated using a high-precision standard flow device. The ultrasonic propagation time, temperature sensor data, and standard flow rate values ​​of the ultrasonic flow meter were collected under each operating condition. 10-20 sets of data were collected for each operating condition. b. On-site data collection: In actual pumped storage power plants, select ultrasonic flow meter installation points at different locations and operating states, and continuously collect data for at least 6 months. Record data such as temperature, ultrasonic propagation time, actual flow rate, and unit operating status every 5-10 minutes, and record corresponding data for special events such as equipment start-up and shutdown and operating condition switching. 2. Data preprocessing: a. Data cleaning: Use the 3σ principle to identify and remove outliers in temperature, ultrasonic propagation time and flow rate data, and use linear interpolation or time series-based prediction methods to fill in missing data; b. Data standardization: Use normalization formulas Temperature, ultrasonic propagation time, and flow rate data are mapped to the [0,1] interval. c. Model training: Determine the loss function and optimizer: Use the mean squared error (MSE) as the loss function, with the following formula: ; The Adam optimizer was used for training, with an initial learning rate of 0.001, which was then dynamically adjusted based on the training progress. Training process: The preprocessed data is divided into training set and test set in an 8:2 ratio. The training set is input into the model in batches (batch size is 32-64). The predicted value is calculated through forward propagation. The error is calculated according to the loss function. The model parameters are updated using the backpropagation algorithm. The loss value of each training round is recorded. Training is stopped when the loss value no longer decreases significantly for 10-15 consecutive rounds. d. Model evaluation and optimization: Evaluation metrics: The mean squared error (MSE), mean absolute error (MAE), and coefficient of determination (R²) are used to evaluate the model's performance on the test set. Optimization methods: If the model evaluation metrics do not meet expectations, optimization can be achieved by adjusting model parameters (such as the number of LSTM layers, the number of neurons, and the learning rate), expanding the dataset, and improving data preprocessing methods. e. Model Deployment and Application: The optimized LSTM temperature compensation model is deployed into the main control chip of the ultrasonic flow meter. The main control chip collects temperature, ultrasonic propagation time and flow data in real time, and inputs them into the model after preprocessing. The model predicts the flow measurement error compensation value, and the main control chip corrects the flow meter measurement results accordingly.

[0030] 3. Data Analysis: The simulation results obtained by implementing the above simulation program for the temperature compensation model of the LSTM-based ultrasonic flow meter for pumped storage using Python and PyTorch frameworks are as follows: Figure 2 As shown. This program covers steps such as data generation, preprocessing, model building, training, and evaluation.

[0031] Convergence speed: The curve drops rapidly in the early stages of training, indicating that the model can quickly learn the patterns in the data and converges quickly.

[0032] Convergence stability: The curve decreases smoothly.

[0033] Overfitting or underfitting: If the loss function continuously decreases on the training set, but the performance on the test set does not improve or even decreases, overfitting may have occurred. Conversely, if the loss function decreases slowly on both the training and test sets, the model complexity may be insufficient, resulting in underfitting.

Claims

1. A temperature compensation model for a pumped-storage ultrasonic flow meter based on LSTM, characterized in that, include: The input layer receives preprocessed temperature, ultrasonic propagation time, and flow rate data and converts them into tensor form. LSTM layers are used to learn the long-term dependency between temperature and flow measurement error; Fully connected layers are used to integrate features extracted by LSTM layers; The output layer is used to output the predicted value of the flow measurement error after temperature compensation.

2. The temperature compensation model for a pumped-storage ultrasonic flowmeter based on LSTM according to claim 1, characterized in that, The input layer receives temperature, ultrasonic propagation time, and flow rate data for the past 10 time steps, and converts them into tensor form.

3. The temperature compensation model for a pumped-storage ultrasonic flowmeter based on LSTM according to claim 1, characterized in that, The LSTM layer comprises 2-3 LSTM units, each containing 64-128 neurons; the retention and updating of information are controlled by forget gates, input gates, and output gates to learn the long-term dependency between temperature and flow measurement errors.

4. The temperature compensation model for a pumped-storage ultrasonic flowmeter based on LSTM according to claim 1, characterized in that, The output layer has one neuron and uses a linear activation function to output a continuous temperature-compensated flow measurement error prediction value.

5. The temperature compensation model for a pumped-storage ultrasonic flowmeter based on LSTM according to claim 1, characterized in that, The model is trained using the mean squared error loss function and the Adam optimizer, with data input in batch sizes of 32-64 during training.

6. A method for temperature compensation model of a pumped-storage ultrasonic flow meter based on LSTM according to any one of claims 1-5, characterized in that, Includes the following steps: S1, collects temperature data, ultrasonic propagation time data and flow data of ultrasonic flow meter in pumped storage power plant; S2, preprocesses the collected data, including data cleaning, outlier handling, and data standardization; S3, construct a temperature compensation model based on LSTM, including an input layer, an LSTM layer, a fully connected layer, and an output layer; S4, Train the temperature compensation model using the preprocessed data, and update the parameters based on the loss function and optimizer; S5, evaluate model performance, and optimize the model if the preset indicators are not met; S6 deploys the optimized model to the main control chip of the ultrasonic flow meter to achieve real-time temperature compensation.

7. The method for temperature compensation model of LSTM-based ultrasonic flowmeter for pumped storage as described in claim 6, characterized in that, Data collection in step S1 includes: In the laboratory, high and low temperature operating conditions of a pumped storage power plant were simulated, and data were collected under multiple operating conditions at intervals of -50℃ to 150℃ and 5℃. Data was continuously collected for at least 6 months in an actual power plant, recording temperature, ultrasonic propagation time, actual flow rate, and unit status.

8. The method for temperature compensation model of LSTM-based ultrasonic flowmeter for pumped storage as described in claim 6, characterized in that, The data preprocessing in step S2 includes: use The principle is to identify and remove outliers, and fill in the missing data using linear interpolation or time series forecasting methods. The temperature, ultrasonic propagation time, and flow rate data were normalized to the [0,1] interval: 。 9. The method for temperature compensation model of LSTM-based ultrasonic flowmeter for pumped storage as described in claim 6, characterized in that, Model training in step S4 includes: Mean squared error was used as the loss function, and the Adam optimizer was used for training with an initial learning rate of 0.

001. ; The data is divided into training and testing sets according to a certain ratio, and input into the model in batches. The parameters are updated through forward and backward propagation. Stop training when the training loss no longer decreases significantly after 10-15 consecutive rounds.

10. The method for temperature compensation model of LSTM-based pumped storage ultrasonic flow meter according to claim 6, characterized in that, Model deployment in step S6 includes: The main control chip collects temperature, ultrasonic propagation time, and flow rate data in real time, and inputs them into the model after preprocessing. The model outputs a flow measurement error compensation value, and the main control chip corrects the flow meter measurement results based on this value.