Flow velocity measurement method based on decision tree model
Through the flow velocity measurement method based on the decision tree model, radar echo signal processing and water level feature training are used to solve the problem of measurement difficulties of traditional radar flow velocity meter at low flow velocity, achieving higher measurement accuracy and stability.
Patent Information
- Application Number
- CN202510461599.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-14
- Publication Date
- 2025-08-01
AI Technical Summary
Traditional radar flowmeters are difficult to measure at low flow rates and have large errors, which cannot meet the needs of high-precision hydrological evaluation.
The flow velocity measurement method based on the decision tree model is adopted, and the radar echo signal is processed by 1D-FFT and 2D-FFT, the water level height data and flow velocity estimation are extracted, and the decision tree model is trained using the water level change characteristics to compensate to improve the measurement accuracy.
It improves the accuracy and stability of low flow velocity measurement, reduces the error caused by weak echo signal, and is suitable for flow velocity monitoring under a variety of complex water surface conditions.
Smart Images

Figure CN120409630A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of radar technology, and particularly to a flow velocity measurement method based on a decision tree model. Background Art
[0002] As Figure 1 shown, a radar flow velocity meter mainly measures the flow velocity by causing Bragg scattering on the water surface, and Bragg scattering depends on minute disturbances on the water surface to generate an echo signal with sufficient intensity. When the flow velocity is high, the water surface fluctuates significantly, capable of generating a strong echo signal, and the flow velocity measurement is accurate. However, when the flow velocity decreases, the water surface tends to be smooth, the Bragg scattering effect weakens, the specular reflection effect strengthens, and the intensity of the echo signal drops significantly, making it difficult to measure at low flow velocities. Traditional radar flow velocity meters are insensitive to the measurement of flow velocities in the range of 0.1 m / s - 0.5 m / s, and have large errors, which is extremely inconvenient for hydrological assessments with high accuracy requirements. Summary of the Invention
[0003] Aiming at the problems existing in the prior art, the present invention provides a flow velocity measurement method based on a decision tree model, which analyzes and corrects the measurement data using the decision tree model, improving the accuracy of the measurement.
[0004] To achieve the above object, the technical solution adopted by the present invention is as follows: A flow velocity measurement method based on a decision tree model, the method comprising: Step 1: The radar emits a radar wave signal, and after reflection by the water surface, the echo signal is received; 1D-FFT processing is performed on each frame of the received echo signal to measure the water level height data ; meanwhile, 2D-FFT processing or Doppler analysis is performed on each frame of the received echo signal, and the flow velocity estimated value is calculated ; Step 2: According to the water level height data corresponding to each frame of the echo signal, water level features are extracted; the water level features include standard deviation, main frequency, water level change rate, and average power value; Step 3: Input the water level change features of each frame into the trained decision tree model to obtain a compensation value; add the compensation value to the flow velocity estimated value of the corresponding frame to obtain the final flow velocity; Wherein, in the training process of the decision tree, the water level features are used as feature values, and the difference between the true flow velocity value and the flow velocity estimated value is used as the label value for training.
[0005] The training of the decision tree model is specifically as follows: (1) Prepare the data set; According to the methods of steps 1 and 2, obtain the flow velocity estimation values and water level change characteristic data corresponding to M frames of echo signals, and at the same time obtain the corresponding true flow velocity values. Subtract the true flow velocity value from the flow velocity estimation value to obtain the label value; Obtain the training data set based on the water level change characteristic data and the label value , where represents the water level change characteristics (including standard deviation, main frequency, water level change rate, average power value) of the th sample, represents the label value of the th sample; Divide the data set into a training set and a test set; (2) Splitting process: Select the feature and the splitting point , and divide the training set into two parts: Left subset: ; Right subset: ; (3) Calculate the residual sum of squares RSS after splitting:
[0006]
[0007]
[0008] where,
[0009]
[0010] In the above formula, is the total error after splitting, represents the sum of squared residuals of the left subset, represents the sum of squared residuals of the right subset, , represent the number of samples in the subset, represents the mean label of all samples in the left subset, represents the mean label of all samples in the right subset.
[0011] (4) Traverse all features and splitting points , and find the combination that minimizes , that is, the optimal splitting point is:
[0012] At this time, the root node is formed. Repeat the processes of (2), (3), and (4) to construct a complete tree; (5)Stop condition: All features have been traversed, or the RSS reduction after splitting is not obvious, that is, the difference between two RSS values is less than , which is a user-defined convergence value.
[0013] During the training process of the decision tree model, different training sets and test sets are divided multiple times to obtain multiple different RSS values. The model corresponding to the minimum RSS on the corresponding test set is selected as the optimal decision tree for application.
[0014] The CZT spectrum refinement algorithm is used to process the water level height data obtained after 1D-FFT processing.
[0015] After adopting the above solution, the present invention collects water level change characteristics, uses the decision tree algorithm to establish a flow velocity prediction model, and corrects the traditional measurement results. The decision tree model has the characteristics of being intuitive and easy to interpret, can process various types of data, and automatically selects the optimal features for splitting to construct a prediction model. By introducing this model, the accuracy and stability of low flow velocity measurement can be effectively improved, and the error caused by weak echo signals can be reduced. Brief Description of the Drawings
[0016] Figure 1 is a schematic diagram of the radar flow velocity meter measurement; Figure 2 is a flowchart of the method of the present invention; Figure 3 is a schematic diagram of the decision tree model of the present invention. Detailed Embodiment
[0017] The present invention discloses a flow velocity measurement method based on a decision tree model, which is specifically as follows: Step 1: The radar emits radar wave signals, and after being reflected by the water surface, the echo signals are received; 1D-FFT processing is performed on each frame of the received echo signals to measure the water level height data ; at the same time, 2D-FFT processing or Doppler analysis is performed on each frame of the received echo signals, and the flow velocity estimation value is calculated . The specific method for obtaining the flow velocity estimation value can adopt the existing flow velocity estimation method, and the present invention does not elaborate on this in detail. The flow velocity estimation value , is the Doppler frequency shift, is the angle between the radar and the water surface, is the radar wavelength.
[0018] To improve the accuracy of water level measurement, after traditional one-dimensional 1D-FFT processing, the Chirp-Z Transform (CZT) spectrum refinement algorithm can be further used to analyze the signal. Although 1D-FFT can quickly obtain frequency domain information, its frequency resolution is limited. Especially when the observation window is small, it may not be able to accurately distinguish close frequency components. In water level measurement, a small change in frequency may correspond to a subtle difference in water surface height. Therefore, higher-precision spectrum analysis means are required. Compared with the traditional FFT, the CZT algorithm can perform higher-resolution spectrum analysis in any frequency interval, and finely scan the target frequency band in a "zooming" manner, so as to more accurately extract the characteristic frequencies in the water level signal and achieve a more accurate estimation of the water level height.
[0019] Step 2: Extract water level features according to the water level height data corresponding to each frame of echo signal. The water level features include standard deviation, main frequency, water level change rate, and average power value.
[0020] Among them, the standard deviation is used to describe the amplitude of water level fluctuations, and its calculation is as follows: ,
[0021] where is the serial number of the frame, and the water level height data contains n water level heights, represents the average value of n water level heights.
[0022] The main frequency is the main frequency of water level fluctuations extracted by FFT, and its calculation is as follows:
[0023] Find the peak frequency .
[0024] The water level change rate is used to represent the water level change trend, and its calculation is as follows:
[0025] The average power is calculated as follows: , where represents the th echo sampling point in the
[0026] Then, the water level changes are also processed: delete missing values or abnormal data points with large noise, and perform standardization or normalization of eigenvalue. Missing values can be judged by statistically checking whether the calculation result is Nan; noise can be judged by methods such as too high or too low calculated values, and too large differences in the change rate of adjacent frames. These are all existing technologies and will not be elaborated here.
[0027] Step 3: Input the water level change characteristics of each frame into the trained decision tree model to obtain a compensation value; add the compensation value to the flow velocity estimation value of the corresponding frame to obtain the final flow velocity.
[0028] Among them, the training of the decision tree model is as follows: (1) Prepare the data set; According to the methods of Steps 1 and 2 above, obtain the flow velocity estimation values and water level change characteristic data corresponding to M frames of echo signals, and at the same time obtain the corresponding true flow velocity values. Subtract the flow velocity estimation value from the true flow velocity value to obtain the label value.
[0029] Obtain the training data set based on the water level change characteristic data and the label value , where represents the water level change characteristics (including standard deviation, main frequency, change rate of water level, average power value) of the th sample, represents the label value of the th sample.
[0030] Divide the data set into a training set and a test set. Among them, the training set is used to train the model, accounting for 80%; the test set is used to evaluate the performance of the model, accounting for 20%.
[0031] (2) Splitting process: Select the feature and the splitting point , and divide the training set into two parts: Left subset: ; Right subset: ; (3) Calculate the mean square error RSS after splitting (the sum of the errors of the left and right subsets):
[0032]
[0033]
[0034] Among them,
[0035]
[0036] In the above formula, is the total error after splitting, represents the sum of the squared residuals of the left subset, represents the sum of the squared residuals of the right subset, , represent the number of samples in the subset, Denote the mean label of all samples in the left subset, which represents the mean label of all samples in the right subset.
[0037] (4) Traverse all features and split points , and find the combination that minimizes , i.e., the optimal split point is:
[0038] At this time, the root node is formed. Repeat the processes of (2), (3), and (4) to construct a complete tree. Note that the features that have appeared cannot be split repeatedly. For example, if the feature is selected for splitting this time, it cannot be selected next time .
[0039] (5) Stopping condition: All features have been traversed, or the reduction of RSS after splitting is not obvious, that is, the difference between two RSS values is less than , where is a user-defined convergence value.
[0040] (6) To avoid overfitting and improve the generalization ability of the model, divide different training sets and test sets multiple times to obtain multiple different RSS values. Select the model corresponding to the minimum RSS on the corresponding test set as the optimal decision tree for application.
[0041] During the model training process, the difference between the actual flow velocity and the measured flow velocity is used as the label value. Since the measurement errors in the low flow velocity region have the statistical characteristics of being systematically larger or smaller, the decision tree model can automatically identify this pattern from the features during the learning process, output a larger compensation value when the flow velocity is small, and output a smaller compensation value when the flow velocity is large, so as to achieve adaptive correction of errors in different flow velocity segments. This phenomenon conforms to the echo signal measurement principle and error distribution characteristics, reflecting the effective characterization of physical laws by the data-driven model, and has rationality and interpretability.
[0042] In summary, the present invention collects water level change characteristics, uses the decision tree algorithm to establish a flow velocity prediction model, and corrects the traditional measurement results. The decision tree model has the characteristics of being intuitive and easy to interpret, can process various types of data, and automatically selects the optimal features for splitting to construct a prediction model. By introducing this model, the accuracy and stability of low flow velocity measurement can be effectively improved, and the errors caused by weak echo signals can be reduced. In addition, this method is applicable to flow velocity monitoring under various complex water surface conditions and has a wide application prospect. In practical applications, using the decision tree model to analyze and correct measurement data not only improves the measurement accuracy but also provides a new technical means for flow velocity monitoring, which has important practical significance.
[0043] As described above, this is only an embodiment of the present invention and does not impose any limitation on the technical scope of the present invention. Therefore, any minor modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention still fall within the scope of the technical solution of the present invention.
Claims
1. A flow velocity measurement method based on a decision tree model, characterized in that: The method includes: Step 1: The radar emits radar wave signals, and after being reflected by the water surface, the echo signals are received; 1D-FFT processing is performed on each frame of the received echo signals to measure the water level height data ; At the same time, 2D-FFT processing or Doppler analysis is performed on each frame of the received echo signals, and the flow velocity estimation value is calculated ; Step 2: Extract water level features according to the water level height data corresponding to each frame of echo signal; the water level features include standard deviation, main frequency, water level change rate, and average power value; Step 3: Input the water level change features of each frame into the trained decision tree model to obtain a compensation value; add the compensation value to the flow velocity estimation value of the corresponding frame to obtain the final flow velocity; Among them, in the training process of the decision tree, the water level features are used as feature values, and the difference between the true flow velocity value and the flow velocity estimation value is used as the label value for training.
2. The auxiliary low-flow rate measurement method based on a decision tree model according to claim 1, wherein: The training of the decision tree model is specifically as follows: (1) Prepare the data set; According to the methods of Steps 1 and 2, obtain the flow velocity estimation value and water level change feature data corresponding to M frames of echo signals, and at the same time obtain the corresponding true flow velocity value, and calculate the difference between the true flow velocity value and the flow velocity estimation value to obtain the label value; Obtain the training dataset based on the water level change characteristic data and the label values , where represents the water level change characteristics (including standard deviation, dominant frequency, rate of change of water level, average power value) of the th sample, and represents the label value of the th sample; Divide the data set into a training set and a test set; (2)Splitting process: Select features and splitting points , and divide the training set into two parts: Left subset: ; Right subset: ; (3) Calculate the residual sum of squares RSS after splitting: Among them, In the above formula, is the total error after splitting, represents the sum of squared residuals of the left subset, represents the sum of squared residuals of the right subset, , represents the number of samples in the subset, represents the mean label of all samples in the left subset, represents the mean label of all samples in the right subset. (4) Traverse all features and splitting points , and find the combination that makes the smallest, that is, the optimal splitting point is: At this time, the root node is formed, and the processes of (2), (3), and (4) are repeated to construct a complete tree; (5) Stopping condition: All features have been traversed, or the reduction in RSS after splitting is not obvious, that is, the difference between the two RSS values is less than , which is a user-defined convergence value.
3. The flow velocity measurement method based on a decision tree model according to claim 2, characterized in that: During the training of the decision tree model, different training sets and test sets are divided multiple times to obtain multiple different RSSs, and the model corresponding to the minimum RSS on the corresponding test set is selected as the optimal decision tree for application.
4. A flow velocity measurement method based on a decision tree model according to claim 1, characterized in that: Use the CZT spectrum zooming algorithm to process the water level height data obtained after 1D-FFT processing.