A method for measuring water flow rate based on ambient temperature compensation and machine learning
By combining ambient temperature compensation and machine learning algorithms, flow rate measurement is achieved using a group of temperature sensors, which solves the problems of high cost and easy clogging in existing technologies and improves the measurement accuracy and adaptability of water heating equipment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SUZHOU JIUBASHI TECHNOLOGY CO LTD
- Filing Date
- 2025-12-12
- Publication Date
- 2026-07-21
AI Technical Summary
Current flow rate measurement in water heating equipment relies on mechanical or electromagnetic flow meters, which suffer from high costs, easy clogging, and difficult maintenance, and fails to effectively utilize the potential value of temperature sensors.
By combining ambient temperature compensation and machine learning algorithms, data is collected using existing temperature sensor clusters. Prediction errors are corrected through thermodynamic and machine learning models to achieve flow rate measurement, thereby reducing system cost and complexity.
It significantly reduces system cost and structural complexity, avoids the risk of blockage, and improves the stability and adaptability of measurement, providing a new solution for intelligent and low-cost flow monitoring of water heating equipment.
Smart Images

Figure CN121703450B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of water heating equipment control technology, and in particular to a water heating flow rate measurement method based on ambient temperature compensation and machine learning. Background Technology
[0002] Existing water heating equipment, especially water-heated blankets, is generally equipped with temperature sensors, but their function is mainly limited to monitoring the temperature of the water tank or the ambient temperature, and using this as a basis to achieve closed-loop temperature regulation. However, this traditional application does not make full use of the potential value of temperature sensors in water flow velocity monitoring, resulting in the system still relying on external dedicated flow velocity equipment for flow velocity monitoring. At present, the traditional velocity and flow measurement schemes commonly used in the industry mainly rely on mechanical flow meters or electromagnetic flow meters, which have the following problems: (1) Mechanical flow meters have a complex internal structure and are prone to clogging due to the deposition of impurities in the water. After long-term use, they wear out severely, resulting in a decrease in accuracy; (2) Although electromagnetic flow meters have high measurement accuracy, they also have problems such as high cost and high requirements for the installation environment and fluid conductivity, which increases the overall cost of the system and has high limitations in the application of miniaturized and integrated household appliances.
[0003] Water-heated blankets, as a commonly used household temperature control product, are characterized by low flow rate, small pipe diameter, and gradual temperature changes in their internal fluid pathways. Currently, no mature application based on a built-in temperature sensor for flow rate measurement has emerged among publicly available technical solutions. Summary of the Invention
[0004] To address the problems of high cost, easy clogging, and difficult maintenance associated with existing traditional flow velocity measurement solutions that rely on mechanical or electromagnetic flow meters, this invention provides a water heating flow velocity measurement method based on ambient temperature compensation and machine learning. By innovatively combining ambient temperature compensation and machine learning algorithms, this invention proposes for the first time to achieve flow velocity measurement using existing temperature sensors. This significantly reduces the material cost and structural complexity of the system, avoids the clogging risks and maintenance burdens that may arise from adding an external flow meter, and effectively overcomes the interference of ambient temperature fluctuations on measurement stability by leveraging the adaptive capabilities of machine learning. This improves the adaptability and reliability of the system in different usage scenarios, providing a brand-new solution for intelligent and low-cost flow monitoring of water-heated blankets and similar circulating water temperature control products.
[0005] To achieve the above objectives, this invention provides a method for measuring water flow velocity based on ambient temperature compensation and machine learning, comprising the following steps: Step 1: Collect the inlet water temperature of the water heating system using a group of temperature sensors. Water outlet temperature Ambient temperature around the waterway ; Step 2: Calculate the inlet water temperature Water temperature at the water outlet The temperature difference is given by the formula: ; Calculate the average temperature of the water circuit The formula is ; Step 3: Establish a thermodynamic model: The heat exchange power of the water channel is The expression is ; Establish an ambient temperature compensation model: the heat exchange power of the water circuit is The expression is ; By combining the thermodynamic model with the ambient temperature compensation model, the flow rate predicted by the thermodynamic model is obtained. The expression is ; in, The flow rate predicted by the thermodynamic model. This refers to the specific heat capacity of the fluid medium in the water system. The heat transfer coefficient is... This refers to the area of the water cooling system. Step 4: Measure the actual flow velocity of the waterway. Calculations yielded Ambient temperature around different waterways and the actual flow velocity of the waterway Repeat the experiment under the following conditions, and take The average value is used to eliminate random errors; Step 5: Learn the flow rate predicted by the thermodynamic model using a machine learning model. With the actual flow velocity of the waterway The residuals between the two values are used to correct the prediction error, thus obtaining the predicted flow velocity value of the waterway. .
[0006] Furthermore, the temperature sensor group in step 1 includes an inlet temperature sensor, an outlet temperature sensor, and an ambient temperature sensor. An inlet temperature sensor is installed at the water inlet to obtain the inlet water temperature. ; The outlet temperature sensor is installed at the water outlet to obtain the water temperature at the outlet. ; The ambient temperature sensor obtains the ambient temperature around the water circuit at the interface between the water circuit and the external environment. .
[0007] Furthermore, in step 5, the machine learning model uses a fully connected neural network and a mean squared error loss function, including an input layer, hidden layers, and an output layer; The input layer contains three nodes: water inlet temperature and water temperature. Water temperature at the water outlet temperature difference Ambient temperature around the waterway and the flow rate predicted by the thermodynamic model ; The hidden layer consists of three fully connected layers, each with 16 nodes, and the activation function is the ReLU function; The output layer contains one node, which is the predicted flow velocity of the waterway. .
[0008] Beneficial Effects: Existing traditional flow velocity measurement solutions rely on mechanical or electromagnetic flow meters, which suffer from high costs, easy clogging, and difficult maintenance. This invention provides a water heating flow velocity measurement method based on ambient temperature compensation and machine learning. By innovatively combining ambient temperature compensation and machine learning algorithms, it proposes for the first time to achieve flow velocity measurement using existing temperature sensors, significantly reducing the material cost and structural complexity of the system. It avoids the clogging risks and maintenance burdens that may be caused by adding an external flow meter. At the same time, with the adaptive capability of machine learning, it effectively overcomes the interference of ambient temperature fluctuations on measurement stability, improves the adaptability and reliability of the system in different usage scenarios, and provides a brand-new solution for intelligent and low-cost flow monitoring of water heating blankets and similar circulating water temperature control products. Attached Figure Description
[0009] Fig. 1 This is a flowchart of a water flow velocity measurement method based on ambient temperature compensation and machine learning, which is an embodiment of the present invention. Fig. 2 This is a schematic diagram of a water flow velocity measurement system based on ambient temperature compensation and machine learning, which is an embodiment of the present invention. Detailed Implementation
[0010] like Figs. 1-2 As shown, the present invention provides a method for measuring water flow velocity based on ambient temperature compensation and machine learning.
[0011] Example 1: The hardware module of this embodiment of the invention includes a water pump, a group of temperature sensors, and a controller.
[0012] The water pump drives the water circulation, and the output power is adjusted by frequency converter control.
[0013] The temperature sensor group includes an inlet temperature sensor, an outlet temperature sensor, and an ambient temperature sensor; An inlet temperature sensor is installed at the water inlet to obtain the inlet water temperature. ; The outlet temperature sensor is installed at the water outlet to obtain the water temperature at the outlet. ; The ambient temperature sensor obtains the ambient temperature around the water circuit at the interface between the water circuit and the external environment. .
[0014] The controller integrates a microprocessor, an ADC module, and a pulse width modulation module (PWM module) to handle data processing and control.
[0015] This invention provides a method for measuring water flow velocity based on ambient temperature compensation and machine learning, comprising the following steps: Step 1: Collect the inlet water temperature of the water heating system using a group of temperature sensors. Water outlet temperature Ambient temperature around the waterway ; Step 2: Calculate the inlet water temperature Water temperature at the water outlet The temperature difference is given by the formula: ; Calculate the average temperature of the water circuit The formula is ; Step 3: Establish a thermodynamic model: The heat exchange power of the water channel is The expression is (Based on the law of conservation of energy); Establish an ambient temperature compensation model: the heat exchange power of the water circuit is The expression is ; By combining the thermodynamic model with the ambient temperature compensation model, the flow rate predicted by the thermodynamic model is obtained. The expression is ; in, The flow rate (kg / s) is predicted by the thermodynamic model. The specific heat capacity of the fluid medium in the water circuit is 4186 J / (kg·K), where K is the temperature unit Kelvin. In the case of calculating the temperature difference without considering the absolute temperature value, it is still correct to replace it with degrees Celsius. The heat transfer coefficient is the coefficient of performance. Calibration is required; The water cooling area is a fixed value. Step 4: Measure the actual flow velocity of the waterway. Calculations yielded Ambient temperature around different waterways and the actual flow velocity of the waterway Repeat the experiment under the following conditions, and take The average value is used to eliminate random errors; Step 5: Learn the flow rate predicted by the thermodynamic model using a machine learning model. With the actual flow velocity of the waterway The residuals between the two values are used to correct the prediction error, thus obtaining the predicted flow velocity value of the waterway. .
[0016] The machine learning model uses a fully connected neural network and a mean squared error loss function, and includes an input layer, hidden layers, and an output layer. The input layer contains three nodes: water inlet temperature and water temperature. Water temperature at the water outlet temperature difference Ambient temperature around the waterway and the flow rate predicted by the thermodynamic model ; The hidden layer consists of three fully connected layers, each with 16 nodes, and the activation function is the ReLU function; The output layer contains one node, which is the predicted flow velocity of the waterway. .
[0017] Example 2: This example is basically the same as Example 1, except that the application scenario for water-heated blankets is indoors, with a temperature range of 20℃~30℃, and the water pump power of the water-heated blanket is generally no more than 5W. The following steps are followed: (1) Setting environmental parameters Ambient temperature range: The laboratory ambient temperature is set to 20℃~30℃ (simulating fluctuations in a home environment).
[0018] Water pump power settings: Set the water pump power to 0.5W, 1W, 2W, 3W, or 4W.
[0019] (2) Calibration test procedure Experiment 1 (Benchmark Calibration): With the pump power fixed at 2W, the flow rate was measured to be stable at 1L / min (i.e., 0.0167kg / s). The inlet water temperature was recorded. 40℃, water outlet temperature The ambient temperature around the waterway is 38℃. The temperature is 25℃. In this embodiment of the invention, the fluid medium in the water circuit is water, with a concentration of 4186 J / (kg·K), where K is the temperature unit Kelvin. Converting it to Celsius is still correct when calculating temperature differences without concern for absolute temperature values. The calculation yields: , , (Take the absolute value of 9.96 W / ℃).
[0020] Experiment 2 (Multi-condition Calibration): The experiment was repeated under different pump powers (0.5W, 1W, 2W, 3W, 4W) and ambient temperatures (20℃, 25℃, 30℃), collecting a total of 150 sets of data. The results for each set were calculated. The average value was then taken to obtain the final calibration result: (Calibration value after eliminating experimental errors).
[0021] (3) Dataset construction Each experiment collected 100 samples, and each sample contained: water inlet temperature. Water temperature at the water outlet temperature difference Ambient temperature around the waterway Flow rate predicted by thermodynamic model Actual flow velocity of waterway .
[0022] (4) Model training The network structure of a machine learning model includes an input layer, hidden layers, and an output layer; The input layer contains three nodes: water inlet temperature and water temperature. Water temperature at the water outlet temperature difference Ambient temperature around the waterway and the flow rate predicted by the thermodynamic model ; The hidden layer consists of three fully connected layers, each with 16 nodes, and the activation function is the ReLU function; The output layer contains one node, which is the predicted flow velocity of the waterway.
[0023] The machine learning model uses a fully connected neural network and a mean squared error loss function; the Adam optimizer is used with a learning rate of 0.001; the batch size is 32, and the number of iterations is 500 (stopping when the validation set loss converges).
[0024] (5) Real-time operation process Data acquisition: Read the water temperature at the water inlet. 40℃, water outlet temperature The ambient temperature around the waterway is 38℃. Given 25℃, the calculation yields: , ; Thermodynamic prediction model: ; Machine learning model correction: Adjust the water temperature at the water inlet. Water temperature at the water outlet temperature difference Ambient temperature around the waterway and the flow rate predicted by the thermodynamic model Input a machine learning model, output a predicted flow velocity value for the waterway. .
[0025] This invention provides a water flow velocity measurement method based on ambient temperature compensation and machine learning. By innovatively combining ambient temperature compensation and machine learning algorithms, it proposes for the first time to use existing temperature sensors to achieve flow velocity measurement, which significantly reduces system cost and complexity, while improving measurement accuracy and environmental adaptability.
[0026] Finally, it should be noted that the above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. However, any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for measuring water flow velocity based on ambient temperature compensation and machine learning, characterized in that, Includes the following steps: Step 1: Collect the inlet water temperature of the water heating system using a group of temperature sensors. Water outlet temperature Ambient temperature around the waterway ; Step 2: Calculate the inlet water temperature Water temperature at the water outlet The temperature difference is given by the formula: ; Calculate the average temperature of the water circuit The formula is ; Step 3: Establish a thermodynamic model: The heat exchange power of the water channel is The expression is ; Establish an ambient temperature compensation model: the heat exchange power of the water circuit is The expression is ; By combining the thermodynamic model with the ambient temperature compensation model, the flow rate predicted by the thermodynamic model is obtained. The expression is ; in, The flow rate predicted by the thermodynamic model. This refers to the specific heat capacity of the fluid medium in the water system. The heat transfer coefficient is... This refers to the area of the water cooling system. Step 4: Measure the actual flow velocity of the waterway. Calculations yielded Ambient temperature around different waterways and the actual flow velocity of the waterway Repeat the experiment under the following conditions, and take The average value is used to eliminate random errors; Step 5: Learn the flow rate predicted by the thermodynamic model using a machine learning model. With the actual flow velocity of the waterway The residuals between the two values are used to correct the prediction error, thus obtaining the predicted flow velocity value of the waterway. .
2. The water flow velocity measurement method based on ambient temperature compensation and machine learning according to claim 1, characterized in that, The temperature sensor group in step 1 includes an inlet temperature sensor, an outlet temperature sensor, and an ambient temperature sensor; An inlet temperature sensor is installed at the water inlet to obtain the inlet water temperature. ; The outlet temperature sensor is installed at the water outlet to obtain the water temperature at the outlet. ; The ambient temperature sensor obtains the ambient temperature around the water circuit at the interface between the water circuit and the external environment. .
3. The water flow velocity measurement method based on ambient temperature compensation and machine learning according to claim 1, characterized in that, The machine learning model in step 5 uses a fully connected neural network and a mean squared error loss function, including an input layer, hidden layers, and an output layer; The input layer contains three nodes: water inlet temperature and water temperature. Water temperature at the water outlet temperature difference Ambient temperature around the waterway and the flow rate predicted by the thermodynamic model ; The hidden layer consists of three fully connected layers, each with 16 nodes, and the activation function is the ReLU function; The output layer contains one node, which is the predicted flow velocity of the waterway. .