Flow velocity estimation method and device, equipment and storage medium
By determining the rate of flow velocity change in Kalman filter and calculating the target noise covariance matrix, the inaccuracy problem of flow velocity estimation when measuring environmental mutations is solved, fast follow-up and noise filtering of the mutant fluid are achieved, and the accuracy of flow velocity estimation is improved.
Patent Information
- Application Number
- CN202311777315.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-21
- Publication Date
- 2025-06-24
AI Technical Summary
During the actual fluid estimation process, the flow rate may be affected by the measurement environment mutation, resulting in inaccurate Kalman filter estimation results.
The rate of flow velocity change is determined based on the current and previous moments of the fluid at the measured position and normalized. Then, the target flow rate change rate is determined in the normalized flow rate change rate at multiple times. Combined with the pre-established relationship between the change rate and noise covariance, the target process excitation noise covariance matrix and the observed noise covariance matrix are calculated, and the flow rate estimate value at the current time is finally calculated.
The target noise covariance matrix in the Kalman filter is determined based on the rate of change of flow velocity and size of the fluid, which can not only quickly follow the mutant fluid, but also effectively filter noise interference and improve the accuracy of flow velocity estimation.
Smart Images

Figure CN120197533A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the technical field of data processing, and particularly relates to a flow velocity estimation method, device, equipment, and storage medium. Background Art
[0002] Currently, the flow velocity of a fluid is generally estimated through Kalman filtering. Among them, Kalman filtering is a signal processing method for estimating the state of a dynamic system. By combining the system model and actual observation data, an optimal estimation of the system state is obtained. Its core is to continuously update the estimation of the state based on the observed data and use the method of weighted average to obtain the optimal estimation of the system state. Because the Kalman filter has good effects in both filtering and smoothing effects and real-time data processing, this filtering method is a time-domain filtering method suitable for recursive solution. It optimally combines past and present information and has the advantages of high estimation accuracy, high computational efficiency, applicability to linear systems, and Gaussian noise.
[0003] In actual flow velocity measurement, the flow velocity may be affected by sudden changes in the measurement environment. For example, the opening and closing of valves, changes in pump frequency, fluid partial pressure, noise interference, and even some foreign objects can cause large fluctuations in the acquired data. Therefore, to identify signal interference or flow velocity mutation based on fluid measurement data and thus reasonably adjust the weight of Kalman filtering, enabling fast response while ensuring the filtering effect, can provide users with a better experience. Summary of the Invention
[0004] This application proposes a flow velocity estimation method, device, equipment, and storage medium, which can solve the technical problem that in the current actual fluid estimation process, the flow velocity may be affected by sudden changes in the measurement environment, resulting in inaccurate Kalman filtering estimation results.
[0005] The first aspect of the embodiments of this application proposes a flow velocity estimation method, including:
[0006] Determine the flow velocity change rate at the current moment based on the first flow velocity of the fluid at the current moment at the measurement position and the second flow velocity at the previous moment.
[0007] Normalize the flow velocity change rate based on the first flow velocity to obtain a normalized flow velocity change rate.
[0008] Determine the target flow velocity change rate among the normalized flow velocity change rates at multiple moments.
[0009] Determine the target process excitation noise covariance matrix and the target observation noise covariance matrix corresponding to the target flow velocity change rate in the first relationship between the change rate and the process excitation noise covariance and the second relationship between the change rate and the observation noise covariance established in advance.
[0010] Calculate the flow velocity estimation value at the current moment based on the target process excitation noise covariance matrix, the target observation noise covariance matrix, and the first flow velocity.
[0011] An embodiment of the second aspect of the present application provides a flow velocity estimation device, including:
[0012] A determination module, configured to determine the flow velocity change rate at the current moment based on the first flow velocity at the current moment of the fluid at the measurement position and the second flow velocity at the previous moment;
[0013] A normalization module, configured to normalize the flow velocity change rate based on the first flow velocity to obtain a normalized flow velocity change rate;
[0014] The determination module is further configured to determine a target flow velocity change rate among the normalized flow velocity change rates at multiple moments;
[0015] The determination module is further configured to determine the target process excitation noise covariance matrix and the target observation noise covariance matrix corresponding to the target flow velocity change rate in a first relationship between the change rate and the process excitation noise covariance and a second relationship between the change rate and the observation noise covariance established in advance;
[0016] A calculation module, configured to calculate the flow velocity estimation value at the current moment based on the target process excitation noise covariance matrix, the target observation noise covariance matrix, and the first flow velocity.
[0017] An embodiment of the third aspect of the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor runs the computer program to implement the method described in the first aspect above.
[0018] An embodiment of the fourth aspect of the present application provides a computer-readable storage medium, on which a computer program is stored, and the program is executed by a processor to implement the method described in the first aspect above.
[0019] The technical solution provided in the embodiments of the present application has at least the following technical effects or advantages:
[0020] In the embodiments of the present application, first, based on the first flow velocity of the fluid at the current moment and the second flow velocity at the previous moment at the measurement position, the flow velocity change rate at the current moment is determined. Since the meanings represented by the flow velocity change rates corresponding to different flow rates are different, the flow velocity change rate is normalized based on the first flow velocity to obtain the normalized flow velocity change rate. Further, in order to filter out the sudden changes in the flow velocity caused by some noises, the target flow velocity change rate can be determined from the normalized flow velocity change rates at multiple moments. Further, the target process excitation noise covariance matrix and the target observation noise covariance matrix corresponding to the target flow velocity change rate are determined in the first relationship between the change rate and the process excitation noise covariance and the second relationship between the change rate and the observation noise covariance established in advance; based on the target process excitation noise covariance matrix, the target observation noise covariance matrix and the first flow velocity, the flow velocity estimation value at the current moment is calculated. It realizes the determination of the target process excitation noise covariance matrix and the observation noise covariance matrix in the Kalman filter according to the flow velocity change rate and magnitude of the fluid, which can not only quickly follow the mutant fluid, but also effectively filter the data of the jumping fluid.
[0021] Additional aspects and advantages of the present application will be given in part in the following description, will become apparent in part from the following description, or will be understood through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] By reading the following detailed description of the preferred embodiments, various other advantages and benefits will become clear to those of ordinary skill in the art. The drawings are only for the purpose of showing the preferred embodiments and are not considered to be a limitation of the present application. Moreover, throughout the drawings, the same reference numerals are used to represent the same components.
[0023] In the drawings:
[0024] Figure 1 shows a flowchart of a flow velocity estimation method provided by an embodiment of the present application;
[0025] Figure 2 shows a flowchart of a flow velocity estimation method provided by an embodiment of the present application;
[0026] Figure 3 shows a schematic structural diagram of a flow velocity estimation device provided by an embodiment of the present application;
[0027] Figure 4 shows a schematic structural diagram of an electronic device provided by an embodiment of the present application;
[0028] Figure 5 shows a schematic diagram of a storage medium provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0029] The exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided so that the present application can be more thoroughly understood and the scope of the present application can be fully conveyed to those skilled in the art.
[0030] It should be noted that unless otherwise specified, the technical terms or scientific terms used in the present application should have the ordinary meaning understood by those skilled in the art to which the present application belongs.
[0031] Continuing from the above background art, in the current application process of the Kalman filter:
[0032] The Kalman filter can be divided into two parts: the time update equation and the measurement update equation.
[0033] In the prediction stage, the filter uses the estimate of the previous state to make an estimate of the current state. After a series of derivations and simplifications, the time update equation of the Kalman filter in traditional flow measurement can be obtained as:
[0034]
[0035] is the prior state estimate at step k given the state before step k. is the posterior state estimate of the known measurement variable at step k - 1. Q is the process excitation noise covariance matrix, is the prior estimation error covariance at step k, P k-1 is the posterior error covariance at step k - 1.
[0036] In the update stage, the filter uses the observed value of the current state to optimize the predicted value obtained in the prediction stage to obtain a more accurate new estimate. The measurement update equation is:
[0037]
[0038] In the formula, is the posterior state estimate, R is the observation noise covariance matrix, K k is the Kalman gain, Z k is the observed variable, P k is the posterior estimation error covariance. The filtering effect is determined by the Kalman gain K k K kWeigh which parameter, Q or R, is more important, or rather, Q and R determine the weights (importance) of the estimated value and the observed value. During the filtering process, the smaller the value of R, the faster the filter responds to the observed value, but the less obvious the filtering effect; the larger the value of R, the more obvious the filtering effect. The values of Q and R are a numerical value in the matrix and can also be represented in matrix form.
[0039] Therefore, the Kalman filter needs to be able to quickly follow the sudden change in flow rate and effectively filter out interference signals. However, in the related technology for general Kalman filtering, the process excitation noise covariance and the observation noise covariance change with each iterative calculation, their values are independent of each other, and follow a normal distribution, which cannot achieve the effect of quickly following the sudden change in flow rate and effectively filtering out interference signals.
[0040] The flow rate estimation method of this application can be executed by a computing device. The computing device can be a server, such as a single server, multiple servers, a server cluster, a cloud computing platform, etc. Optionally, the computing device can also be a terminal device, such as a mobile phone, a tablet computer, a game console, a portable computer, a desktop computer, an advertising machine, an all-in-one machine, etc. This application does not limit the type and number of the computing device.
[0041] In each embodiment of this application, the flow rate estimation method at a measurement position of the fluid is taken as an example for illustration. And for the execution subject, in each embodiment of this application, the computing device is taken as an example for illustration.
[0042] Next, a flow rate estimation method, device, equipment, and storage medium proposed according to the embodiments of this application will be described with reference to the accompanying drawings.
[0043] See Figure 1 , the method specifically includes the following steps:
[0044] S101. Determine the flow rate change rate at the current moment based on the first flow rate of the fluid at the current moment and the second flow rate at the previous moment at the measurement position.
[0045] Among them, the fluid can be liquid, gas, etc. The measurement position is generally fixed. For example, when the fluid is liquid, the measurement position is a fixed cross-section.
[0046] For the flow rate Z of the fluid measured by the sensor at time k k (observed variable), the change rate α of its flow rate is the derivative of the flow rate Z k with respect to time k, and the change rate α(k) = Z k '(k). For the convenience of implementation, in fluid measurement, it is simplified to:
[0047]
[0048] where α(k) is the flow rate change rate at the current time, and Z k is the first flow rate at the current moment, and Z k-1 is the second flow rate at the previous moment.
[0049] S102. Normalize the flow rate change rate based on the first flow rate to obtain the normalized flow rate change rate.
[0050] The reason for normalizing the change rate is that in the actual flow rate test, the meanings represented by the flow rate change rates corresponding to different flow rates are different. For example, when the flow rate is very small, the flow rate change rate is 20%. Then, there is a high probability that this is caused by measurement accuracy or environmental noise. When the flow rate is large, the flow rate change rate is 20%. Then, there is a high probability that this is a sudden change caused by adjusting the flow rate or noise. Therefore, it is necessary to normalize it according to the flow rate size to accurately judge its flow rate state. The normalized change rate is denoted as α(k).
[0051] S103. Determine the target flow rate change rate from the normalized flow rate change rates at multiple moments.
[0052] Generally, the flow rate change rate caused by noise is generally very small, and the flow rate change rate caused by the valve opening change is generally very large. However, some accidental pulse interferences can also cause a large flow rate change rate. In order to effectively filter out accidental pulse interferences, the flow rate change rates of the position fluid will be measured at multiple moments respectively to obtain the normalized flow rate change rates at multiple moments, and a suitable normalized flow rate change rate will be selected from the normalized flow rate change rates at multiple moments as the target flow rate change rate.
[0053] where the time interval between the multiple moments is less than the time interval between the current moment and the previous moment.
[0054] S104. Determine the target process excitation noise covariance matrix and the target observation noise covariance matrix corresponding to the target flow rate change rate from the first relationship between the change rate and the process excitation noise covariance and the second relationship between the change rate and the observation noise covariance.
[0055] In order to determine the final target process excitation noise covariance matrix and the target observation noise covariance matrix, the first relationship between the change rate and the process excitation noise covariance and the second relationship between the change rate and the observation noise covariance can be established in advance, and the target process excitation noise covariance matrix and the target observation noise covariance matrix corresponding to the target flow rate change rate can be determined respectively from the first relationship and the second relationship.
[0056] S105. Calculate the flow rate estimated value at the current moment based on the target process excitation noise covariance matrix, the target observation noise covariance matrix, and the first flow rate.
[0057] Calculate the flow velocity estimation value at the current moment based on the target process excitation noise covariance matrix, the target observation noise covariance matrix, and the first flow velocity, including:
[0058] Replace the process excitation noise covariance matrix and the observation noise covariance matrix in the original Kalman filter equation with the target process excitation noise covariance matrix and the target observation noise covariance matrix to obtain the target Kalman filter equation;
[0059] Determine the flow velocity estimation value at the current moment based on the target Kalman filter equation and the first flow velocity.
[0060] Through the above method, the target process excitation noise covariance matrix and the target observation noise covariance matrix corresponding to the target flow velocity change rate can be determined, and the flow velocity estimation value at the current moment can be calculated based on the target process excitation noise covariance matrix and the target observation noise covariance matrix.
[0061] In some embodiments, the process excitation noise covariance matrix and the observation noise covariance matrix in the original Kalman filter equation can be replaced with the target process excitation noise covariance matrix and the target observation noise covariance matrix to obtain the target Kalman filter equation. Since the target Kalman filter equation includes the target process excitation noise covariance matrix and the target observation noise covariance matrix corresponding to the target flow velocity change rate, this algorithm can not only quickly follow the sudden change in flow rate during measurement but also effectively filter the jumpy flow rate data.
[0062] Replace the process excitation noise covariance matrix and the observation noise covariance matrix in the original Kalman filter equation with the target process excitation noise covariance matrix and the target observation noise covariance matrix to obtain the following target Kalman filter equation:
[0063] Substitute the target process excitation noise covariance matrix into the time update equation of the Kalman filter as:
[0064]
[0065] Substitute the target observation noise covariance matrix into the calculation equation of the Kalman gain K k , and the posterior state estimation value can be calculated through the measurement update equation The formula is as follows:
[0066]
[0067]
[0068]
[0069] The posterior state estimate can be determined based on the flow rate estimate at the previous moment. Based on the flow rate change rate at the current moment and the target process excitation noise covariance matrix Determine the target process excitation noise covariance, and based on the flow rate change rate at the current moment and the target observation noise covariance matrix Determine the target observation noise covariance.
[0070] Based on P k-1 And calculate based on the target process excitation noise covariance Based on And the target observation noise covariance to determine the Kalman gain K k , and further based on the Kalman gain K k , the first flow rate Z k And the posterior state estimate Calculate the flow rate estimate
[0071] It should be noted that if the current moment is the first moment, P k-1 And Can be set to a preset value, such as 0. The preset value can be flexibly set according to the actual situation and will not be elaborated here.
[0072] An embodiment of the present application provides a flow rate estimation method. In the embodiment of the present application, first, based on the first flow rate of the fluid at the current moment at the measurement position and the second flow rate at the previous moment, determine the flow rate change rate at the current moment. The meanings represented by the flow rate change rates corresponding to different flow rates are different. Therefore, normalize the flow rate change rate based on the first flow rate to obtain the normalized flow rate change rate. Further, in order to filter out some flow rate mutations caused by noise, the target flow rate change rate can be determined from the normalized flow rate change rates at multiple moments. Further, determine the target process excitation noise covariance matrix and the target observation noise covariance matrix corresponding to the target flow rate change rate in the first relationship between the change rate and the process excitation noise covariance and the second relationship between the change rate and the observation noise covariance established in advance; calculate the flow rate estimate at the current moment based on the target process excitation noise covariance matrix, the target observation noise covariance matrix, and the first flow rate. It realizes determining the target process excitation noise covariance matrix and the observation noise covariance matrix in the Kalman filter according to the flow rate change rate and magnitude of the fluid, which can not only quickly follow the mutant fluid but also effectively filter the jumpy fluid data.
[0073] In some embodiments, in the test of actual flow rate, the significance represented by the flow rate change rate corresponding to different flow rates is different. For example, when the flow rate is very small and the flow rate change rate is 20%, there is a high probability that this is caused by metering accuracy or environmental noise. When the flow rate is large and the flow rate change rate is 20%, there is a high probability that this is a sudden change caused by the adjustment of the flow rate size or noise. Therefore, it is necessary to normalize it according to the flow rate size to accurately judge its flow state. Normalizing the flow rate change rate based on the first flow rate to obtain the normalized flow rate change rate includes:
[0074] Determine the corresponding relationship between the flow rate and the normalization coefficient;
[0075] Determine the target normalization coefficient corresponding to the flow rate at the current moment in the corresponding relationship;
[0076] Normalize the flow rate change rate based on the target normalization coefficient to obtain the normalized flow rate change rate.
[0077] In some embodiments, determining the corresponding relationship between the flow rate and the normalization coefficient includes:
[0078] Obtain the maximum flow rate fluctuations corresponding to different flow rates respectively;
[0079] Transform the maximum flow rate fluctuations of multiple flow rates according to a preset multiple to obtain multiple normalization coefficients;
[0080] Determine the normalization coefficients corresponding to different flow rates respectively based on the maximum flow rate fluctuations corresponding to different flow rates respectively.
[0081] Among them, the preset multiple can be flexibly set according to the actual situation.
[0082] In some embodiments, it should be noted that under a certain pressure, the larger the valve opening, the higher the flow rate, and the smaller the valve opening, the lower the flow rate. And the valve openings corresponding to different flow rates are known. Therefore, the normalization coefficient can be determined based on the change of the valve opening. For example, when the valve opening is 1-100, the normalization coefficient corresponding to the flow rate of 10 m / s with a valve opening of 1 is 1, and the normalization coefficient corresponding to the flow rate of 1000 m / s with a valve opening of 100 is 1 / 100.
[0083] In some embodiments, in order to make the normalized change rate better reflect the state of the fluid, it is necessary to measure the fluctuations of the flow rate at different flow rates when the valve is opened.
[0084] Generally, the flow rates under different valve openings are known. The actual flow rate under different valve openings can be measured to obtain the fluctuation situation under this valve opening, and the fluctuations under different valve openings are caused by the same noise. Therefore, the normalization coefficient can be determined based on the fluctuation situations of the flow rates under different valve openings.
[0085] For example, when the valve opening is 1, the flow rate is 10 m / s, the minimum measured actual flow rate is 9 m / s, and the maximum is 11 m / s; when the valve opening is 50, the flow rate is 500 m / s, the measured actual flow rate is 495.95 m / s, and the fluctuation is 0.05 m / s. Then, the normalization coefficient corresponding to a flow rate of 10 m / s is 1, and the normalization coefficient corresponding to a flow rate of 500 m / s is 0.05.
[0086] Furthermore, a target normalization coefficient can be determined based on the flow rate at the current moment.
[0087] Multiply the target normalization coefficient by the rate of change of the flow rate at the current moment to obtain the normalized rate of change of the flow rate.
[0088] In some embodiments, determining a target rate of change of the flow rate from the normalized rates of change of the flow rate at multiple moments includes:
[0089] Determining the normalized rate of change of the flow rate corresponding to each of multiple moments at the measurement position of the fluid;
[0090] Sorting the normalized rates of change of the flow rate corresponding to each of the multiple moments;
[0091] Determining the median normalized rate of change of the flow rate among the sorted normalized rates of change of the flow rate as the target rate of change of the flow rate.
[0092] In some embodiments, the target rate of change of the flow rate can be determined using median filtering.
[0093] To effectively filter out accidental pulse interference, the normalized rate of change of the flow rate can be measured multiple times at short time intervals, and the normalized rates of change of the flow rate corresponding to each of the multiple moments are sorted. The sorting order can be from smallest to largest or from largest to smallest, thereby obtaining the sorted normalized rates of change of the flow rate. Further, the normalized rate of change of the flow rate at the middle position among the sorted normalized rates of change of the flow rate is determined as the target rate of change of the flow rate.
[0094] In some embodiments, the process of establishing the first relationship between the rate of change and the covariance of the process excitation noise or the second relationship between the rate of change and the covariance of the observation noise is as follows:
[0095] Calculate the normalized rate of change of the flow rate corresponding to each change in the valve opening;
[0096] Measure the covariance of the process excitation noise corresponding to multiple normalized rates of change of the flow rate at a preset following time;
[0097] Alternatively, measure the covariance of the observation noise corresponding to multiple normalized rates of change of the flow rate at a preset following time;
[0098] Establish a first relationship between the rate of change and the covariance of the process excitation noise, and a second relationship between the rate of change and the covariance of the observation noise.
[0099] The preset following time can be flexibly set based on the actual situation.
[0100] It can be understood that Q and R determine the weights of the estimated value and the observed value, that is, the magnitude of the Kalman gain. In order to quickly follow the flow rate changes caused by the switching valve, environmental noise interference, etc., a relationship between the covariance of the process excitation noise, the covariance of the observation noise, and the rate of change is established.
[0101] First, the flow rate corresponding to each valve opening change can be preferentially measured, so that the normalized flow rate change rate corresponding to each valve opening change can be calculated.
[0102] Further measure the covariance of the process excitation noise corresponding to multiple normalized flow rate change rates respectively under the preset following time; establish a first relationship between the rate of change and the covariance of the process excitation noise.
[0103] At the same time, measure the covariance of the observation noise corresponding to multiple normalized flow rate change rates respectively under the preset following time, and establish a second relationship between the rate of change and the covariance of the observation noise.
[0104] Furthermore, the discrete distributions of the process noise covariance and the observation noise covariance at different normalized flow rate change rates can be obtained. Further, fit the discrete distribution to obtain a function relation about the change and Thus, based on and the Q value and the R value corresponding to the target flow rate change rate can be calculated.
[0105] In some embodiments, different normalized flow rate change rates correspond to different following times. The process of establishing the first relationship between the rate of change and the covariance of the process excitation noise or the second relationship between the rate of change and the covariance of the observation noise is as follows:
[0106] Calculate the normalized flow rate change rate corresponding to each valve opening change;
[0107] In the pre-set correspondence between the normalized flow rate change rate and the following time, determine the target following time corresponding to the target normalized flow rate change rate, and the target normalized flow rate change rate is any one of the multiple normalized flow rate change rates;
[0108] Measure the covariance of the process excitation noise corresponding to the target normalized flow rate change rate at the target following time;
[0109] Measure the covariance of the observation noise corresponding to the target normalized flow rate change rate at the target following time;
[0110] Establish a first relationship between the rate of change and the covariance of the process excitation noise at different following times, and a second relationship between the rate of change and the covariance of the observation noise at different following times.
[0111] It should be noted that the flow rate change is caused by noise or valve opening change. The flow rate change caused by noise is a jump, that is, the rate of change of the flow rate caused by noise is relatively low. The flow rate change caused by valve opening change is a mutation, that is, the rate of change of the flow rate caused by valve opening change is relatively high.
[0112] And the following time represents the response speed of the Kalman filter. The larger the following time, the slower the response speed. The smaller the following time, the faster the response speed. The flow rate change rate is relatively low, that is, the flow rate change is mainly caused by noise. Setting a relatively large following time can filter out the noise to the greatest extent. The flow rate change rate is relatively high, that is, the flow rate change is mainly caused by valve opening change. Setting a relatively small following time can quickly follow the change of the flow rate.
[0113] Therefore, the larger the normalized flow rate change rate, the smaller the corresponding following time. The smaller the normalized flow rate change rate, the larger the corresponding following time.
[0114] Furthermore, for each normalized flow rate change rate, in the pre-set corresponding relationship between the normalized flow rate change rate and the following time, determine the target following time corresponding to the normalized flow rate change rate.
[0115] Measure the covariance of the process excitation noise corresponding to the target normalized flow rate change rate at the target following time; measure the covariance of the observation noise corresponding to the target normalized flow rate change rate at the target following time; so that the obtained covariance matrix of the process excitation noise and the covariance matrix of the observation noise can be more accurate, so as to make the finally determined target covariance matrix of the process excitation noise and the target covariance matrix of the observation noise more accurate, thereby improving the accuracy of the flow rate estimation value.
[0116] In addition, the embodiment of the present application also provides a schematic flowchart of a flow rate estimation method, as Figure 2 shown. The method includes the following steps:
[0117] S201. Calculate the flow rate change rate;
[0118] S202. Normalize the flow rate change rate;
[0119] S203. Median filtering;
[0120] S204. Calculate the target covariance of the process excitation noise and the target covariance of the observation noise;
[0121] S205. Kalman filter calculation.
[0122] The embodiment of the present application further provides a flow velocity estimation device, which is used to execute the flow velocity estimation method provided in any of the above embodiments. As Figure 3 shown, the device includes: a determination module 301, a normalization module 302, and a calculation module 303.
[0123] The determination module 301 is configured to determine the flow velocity change rate at the current moment based on the first flow velocity of the fluid at the measurement position at the current moment and the second flow velocity at the previous moment;
[0124] The normalization module 302 is configured to perform normalization processing on the flow velocity change rate based on the first flow velocity to obtain a normalized flow velocity change rate;
[0125] The determination module 301 is further configured to determine a target flow velocity change rate among the normalized flow velocity change rates at multiple moments;
[0126] The determination module 301 is further configured to determine a target process excitation noise covariance matrix and a target observation noise covariance matrix corresponding to the target flow velocity change rate in a first relationship between the change rate and the process excitation noise covariance and a second relationship between the change rate and the observation noise covariance established in advance;
[0127] The calculation module 303 is configured to calculate the flow velocity estimation value at the current moment based on the target process excitation noise covariance matrix, the target observation noise covariance matrix, and the first flow velocity.
[0128] The embodiment of the present application provides a flow velocity estimation device. In the embodiment of the present application, first, based on the first flow velocity of the fluid at the measurement position at the current moment and the second flow velocity at the previous moment, the flow velocity change rate at the current moment is determined. The meanings represented by the flow velocity change rates corresponding to different flow rates are different. Therefore, the flow velocity change rate is normalized based on the first flow velocity to obtain a normalized flow velocity change rate. Further, in order to filter out some flow velocity mutations caused by noise, a target flow velocity change rate can be determined among the normalized flow velocity change rates at multiple moments. Further, a target process excitation noise covariance matrix and a target observation noise covariance matrix corresponding to the target flow velocity change rate are determined in a first relationship between the change rate and the process excitation noise covariance and a second relationship between the change rate and the observation noise covariance established in advance; based on the target process excitation noise covariance matrix, the target observation noise covariance matrix, and the first flow velocity, the flow velocity estimation value at the current moment is calculated. It realizes determining the target process excitation noise covariance matrix and the observation noise covariance matrix in the Kalman filter according to the flow velocity change rate and magnitude of the fluid, which can not only quickly follow the mutant fluid but also effectively filter the jumpy fluid data.
[0129] In some embodiments, the determining module 301 is specifically configured to:
[0130] Determine the correspondence between the flow rate and the normalization coefficient;
[0131] Determine the target normalization coefficient corresponding to the current moment flow rate in the correspondence;
[0132] Normalize the flow rate change rate based on the target normalization coefficient to obtain a normalized flow rate change rate.
[0133] In some embodiments, the determining module 301 is further specifically configured to:
[0134] Obtain the maximum flow rate fluctuations corresponding to different flow rates respectively;
[0135] Transform the maximum flow rate fluctuations of multiple ones according to a preset multiple to obtain multiple normalization coefficients;
[0136] Determine the normalization coefficients corresponding to different flow rates respectively based on the maximum flow rate fluctuations corresponding to different flow rates respectively.
[0137] In some embodiments, the determining module 301 is further specifically configured to:
[0138] Determine the normalized flow rate change rates corresponding to each of multiple moments of the fluid at the measurement position;
[0139] Sort the normalized flow rate change rates corresponding to each of the multiple moments;
[0140] Determine the median normalized flow rate change rate in the sorted normalized flow rate change rates as the target flow rate change rate.
[0141] In some embodiments, the process of establishing the first relationship between the change rate and the process excitation noise covariance or the second relationship between the change rate and the observation noise covariance is as follows:
[0142] Calculate the normalized flow rate change rates corresponding to the respective changes in the opening degrees of each valve;
[0143] Measure the process excitation noise covariance corresponding to each of the multiple normalized flow rate change rates under a preset following time;
[0144] Or measure the observation noise covariance corresponding to each of the multiple normalized flow rate change rates under the preset following time;
[0145] Establish the first relationship between the change rate and the process excitation noise covariance and the second relationship between the change rate and the observation noise covariance.
[0146] In some embodiments, different normalized flow rate change rates correspond to different following times. The process of establishing the first relationship between the change rate and the process excitation noise covariance or the second relationship between the change rate and the observation noise covariance is as follows:
[0147] Calculate the normalized flow rate change rate corresponding to each valve opening change;
[0148] In the pre-set correspondence between the normalized flow rate change rate and the following time, determine the target following time corresponding to the target normalized flow rate change rate, where the target normalized flow rate change rate is any one of the multiple normalized flow rate change rates;
[0149] Measure the process excitation noise covariance corresponding to the target normalized flow rate change rate at the target following time;
[0150] Or measure the observation noise covariance corresponding to the target normalized flow rate change rate at the target following time;
[0151] Establish the first relationship between the change rate and the process excitation noise covariance at different following times and the second relationship between the change rate and the observation noise covariance at different following times.
[0152] In some embodiments, the calculation module 303 is specifically configured to:
[0153] Use the target process excitation noise covariance matrix and the target observation noise covariance matrix to replace the process excitation noise covariance matrix and the observation noise covariance matrix in the original Kalman filter equation to obtain the target Kalman filter equation;
[0154] Based on the target Kalman filter equation and the first flow rate, determine the flow rate estimate value at the current moment.
[0155] The flow rate estimation device provided by the embodiments of the present application and the flow rate estimation method provided by the embodiments of the present application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run, or implemented by them.
[0156] The embodiments of the present application also provide an electronic device to execute the above flow rate estimation method. Please refer to Figure 4 It shows a schematic diagram of an electronic device provided by some embodiments of the present application. As Figure 4 shown, the electronic device 7 includes: a processor 700, a memory 701, a bus 702, and a communication interface 703. The processor 700, the communication interface 703, and the memory 701 are connected through the bus 702; a computer program that can run on the processor 700 is stored in the memory 701, and when the processor 700 runs the computer program, it executes the flow rate estimation method provided by any of the foregoing embodiments of the present application.
[0157] Among them, the memory 701 may include high-speed random access memory (RAM), and may also include non-volatile memory, such as at least one disk memory. The communication connection between this device network element and at least one other network element is realized through at least one communication interface 703 (which can be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. can be used.
[0158] The bus 702 can be an ISA bus, a PCI bus, an EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. Among them, the memory 701 is used to store programs. After receiving the execution instruction, the processor 700 executes the program. Any implementation manner of the flow rate estimation method disclosed in any implementation manner of the embodiments of the present application can be applied to the processor 700 or implemented by the processor 700.
[0159] The processor 700 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit in the hardware of the processor 700 or the instructions in the form of software. The above-mentioned processor 700 may be a general-purpose processor, including a central processing unit (CPU for short), a network processor (NP for short), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as being executed and completed by the hardware decoding processor, or executed and completed by the combination of the hardware and software modules in the decoding processor. The software module may be located in a mature storage medium in the art such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register, etc. This storage medium is located in the memory 701, and the processor 700 reads the information in the memory 701 and combines its hardware to complete the steps of the above method.
[0160] The electronic device provided by the embodiments of the present application and the flow rate estimation method provided by the embodiments of the present application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by it.
[0161] The embodiments of the present application also provide a computer-readable storage medium corresponding to the flow rate estimation method provided in the foregoing embodiments. Please refer to Figure 5 The computer-readable storage medium shown is an optical disc 30, on which a computer program (i.e., a program product) is stored. When the computer program is run by a processor, it will execute the flow rate estimation method provided in any of the foregoing embodiments.
[0162] It should be noted that examples of computer-readable storage media may also include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory, or other optical and magnetic storage media, which will not be elaborated here one by one.
[0163] The computer-readable storage medium provided in the above embodiments of the present application and the flow rate estimation method provided in the embodiments of the present application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run, or implemented by the application programs stored therein.
[0164] It should be noted that:
[0165] In the specification provided here, a large number of specific details are described. However, it can be understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known structures and technologies are not shown in detail so as not to obscure the understanding of this specification.
[0166] Similarly, it should be understood that, in order to streamline the present application and help understand one or more of the various inventive aspects, in the above description of the exemplary embodiments of the present application, the various features of the present application are sometimes grouped together into a single embodiment, figure, or description thereof. However, the disclosed method should not be construed as reflecting the following schematic: that the claimed present application requires more features than those explicitly recited in each claim. Rather, as reflected in the following claims, the inventive aspects lie in less than all the features of the single foregoing embodiment. Therefore, the claims following the detailed description are hereby expressly incorporated into the detailed description, where each claim itself serves as a separate embodiment of the present application.
[0167] In addition, those skilled in the art can understand that, although some of the embodiments herein include certain features included in other embodiments rather than other features, the combination of the features of different embodiments means that it is within the scope of the present application and forms different embodiments. For example, in the following claims, any of the claimed embodiments can be used in any combination.
[0168] The above are only the preferred specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present application should be covered within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims
1. A flow velocity estimation method, characterized in that, Including: Determine the flow rate change rate at the current moment based on the first flow rate of the fluid at the current moment of the measurement position and the second flow rate at the previous moment; Normalize the flow rate change rate based on the first flow rate to obtain a normalized flow rate change rate; Determine the target flow rate change rate among the normalized flow rate change rates at multiple moments; Determine the target process excitation noise covariance matrix and the target observation noise covariance matrix corresponding to the target flow rate change rate in the first relationship between the change rate and the process excitation noise covariance and the second relationship between the change rate and the observation noise covariance established in advance; Calculate the estimated value of the flow rate at the current moment based on the target process excitation noise covariance matrix, the target observation noise covariance matrix, and the first flow rate.
2. The method according to claim 1, characterized in that The step of normalizing the flow rate change rate based on the first flow rate to obtain a normalized flow rate change rate includes: Determine the corresponding relationship between the flow rate and the normalization coefficient; Determine the target normalization coefficient corresponding to the flow rate at the current moment in the corresponding relationship; Normalize the flow rate change rate based on the target normalization coefficient to obtain a normalized flow rate change rate.
3. The method according to claim 2, characterized in that, The step of determining the corresponding relationship between the flow rate and the normalization coefficient includes: Obtain the maximum flow rate fluctuations corresponding to different flow rates respectively; Transform the multiple maximum flow rate fluctuations according to a preset multiple to obtain multiple normalization coefficients; Determine the normalization coefficients corresponding to different flow rates respectively based on the maximum flow rate fluctuations corresponding to different flow rates respectively.
4. The method according to claim 1, characterized in that, The step of determining the target flow rate change rate among the normalized flow rate change rates at multiple moments includes: Determine the normalized flow rate change rates corresponding to each of the multiple moments of the fluid at the measurement position; Sort the normalized flow rate change rates corresponding to each of the multiple moments; Determine the median normalized flow rate change rate in the sorted normalized flow rate change rates as the target flow rate change rate.
5. The method according to claim 1, wherein The process of establishing the first relationship between the change rate and the process excitation noise covariance or the second relationship between the change rate and the observation noise covariance is as follows: Calculate the normalized flow rate change rates corresponding to the respective changes in the valve opening degrees; Measure the process excitation noise covariance corresponding to each of the multiple normalized flow rate change rates under a preset following time; Or measure the observation noise covariance corresponding to each of the multiple normalized flow rate change rates under the preset following time; Establish the first relationship between the change rate and the process excitation noise covariance and the second relationship between the change rate and the observation noise covariance.
6. The method according to claim 1, wherein Different normalized flow rate change rates correspond to different following times. The process of establishing the first relationship between the change rate and the process excitation noise covariance or the second relationship between the change rate and the observation noise covariance is as follows: Calculate the normalized flow rate change rates corresponding to the respective changes in the valve opening degrees; In the preset corresponding relationship between the normalized flow rate change rate and the following time, determine the target following time corresponding to the target normalized flow rate change rate, where the target normalized flow rate change rate is any one of the multiple normalized flow rate change rates; Measure the process excitation noise covariance corresponding to the target normalized flow rate change rate at the target following time; Alternatively, measure the observation noise covariance corresponding to the normalized flow rate change rate of the target at the target following time; Establish a first relationship between the change rate and the process excitation noise covariance at different following times and a second relationship between the change rate and the observation noise covariance at different following times.
7. The method according to claim 1, characterized in that, The calculating the flow rate estimation value at the current moment based on the target process excitation noise covariance matrix, the target observation noise covariance matrix, and the first flow rate includes: Replace the process excitation noise covariance matrix and the observation noise covariance matrix in the original Kalman filter equation with the target process excitation noise covariance matrix and the target observation noise covariance matrix to obtain a target Kalman filter equation; Determine the flow rate estimation value at the current moment based on the target Kalman filter equation and the first flow rate.
8. A flow velocity estimation device, characterized in that, Including: A determination module, configured to determine the flow rate change rate at the current moment based on the first flow rate of the fluid at the measurement position at the current moment and the second flow rate at the previous moment; A normalization module, configured to normalize the flow rate change rate based on the first flow rate to obtain a normalized flow rate change rate; The determination module is further configured to determine a target flow rate change rate from the normalized flow rate change rates at multiple moments; The determination module is further configured to determine the target process excitation noise covariance matrix and the target observation noise covariance matrix corresponding to the target flow rate change rate from a first relationship between the change rate and the process excitation noise covariance and a second relationship between the change rate and the observation noise covariance established in advance; A calculation module, configured to calculate the flow rate estimation value at the current moment based on the target process excitation noise covariance matrix, the target observation noise covariance matrix, and the first flow rate.
9. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor runs the computer program to implement the method according to any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by the processor to implement the method according to any one of claims 1-7.