The improvements generally relate to the field of measuring a liquid level of a reservoir, and more particularly to the field of addressing the effect of sloshing in such liquid level measurements.
Measuring a liquid level in a reservoir is typically performed using a liquid level sensor provided inside the reservoir and immersed in the liquid. While reliable liquid level measurements can be obtained in some conditions, occurrences of sloshing led to unreliable liquid level measurements. In a mobile reservoir, such as a liquid reservoir of a deicing truck for instance, movement of the reservoir can lead to sloshing of the liquid within the reservoir. Sloshing can also occur in a fixed reservoir, such as when liquid is filed in and/or extracted from the reservoir at a relatively high flow rate. When sloshing occurred inside the reservoir, the value of liquid which was displayed to the user varied significantly and was not representative of the actual liquid level in the reservoir for a given period of time.
There thus remained room for improvement, particularly in terms of addressing the effect of sloshing in the measurements of a liquid level in a reservoir.
In accordance with one aspect, there is provided a method for outputting a liquid level value, the method comprising the steps of: measuring a measured liquid level value in the reservoir; generating a filtered liquid level value including applying a noise filtration stage to the measured liquid level value to limit a change of the filtered liquid level value compared to at least one previously measured liquid level value; determining a variation of the generated filtered liquid level value over a given period of time; comparing the determined variation to a threshold value; when the determined variation is below the threshold value, processing the liquid level value in a non-sloshing mode including outputting a liquid level value corresponding to the filtered liquid level value; and when the determined variation is above the threshold value, processing the liquid level value in a sloshing mode including outputting a liquid level value corresponding to a filtered liquid level value generated prior to entering the sloshing mode.
In accordance with another aspect, there is provided a method for filtering noise in liquid level measurements of a reservoir, the method comprising the steps of: measuring a measured liquid level value indicative of a liquid level in the reservoir at a given point in time; estimating a liquid level value in the reservoir at the given point in time, said estimation being based on the measured liquid level value at the given point in time and on at least one liquid level value measured before the given point in time; obtaining a deviation value by comparing the measured liquid level value to the estimated liquid level value; obtaining a number of noisy deviation values by comparing an amount of the previously obtained deviation values to a noise threshold value; and outputting a noise-reduced liquid level value, the noise-reduced liquid level value corresponding to the estimated value when the number of noisy deviation values is below a noise limit and to a previously outputted liquid level value when the number of noisy deviation values is above the noise limit.
In accordance with another aspect, there is provided a system for outputting a liquid level value in a reservoir having a liquid level sensor therein, the system comprising: a computer being adapted to receive a measured liquid level value from the liquid level sensor, the measured liquid level value being indicative of a liquid level in the reservoir at a given point in time, wherein the computer is adapted to: apply a first noise filtration stage to the measured liquid level value, the first noise filtration stage including estimating a liquid level value in the reservoir at the given point in time, said estimation being based on the measured liquid level value at the given point in time and on at least one liquid level value measured before the given point in time; apply a second noise filtration stage including obtaining a deviation value by comparing the measured liquid level value to the estimated liquid level value; obtaining a number of noisy deviation values by comparing an amount of the previously obtained deviation values to a noise threshold value; and outputting a noise-reduced liquid level value corresponding to the estimated value when the number of noisy deviation values is below a noise limit and to a previously outputted liquid level value when the number of noisy deviation values is above the noise limit; and a display being adapted to receive the outputted noise-reduced liquid level value from the computer and being adapted to display the outputted noise-reduced liquid level value.
In accordance with another aspect, there is provided a method for filtering noise in liquid level measurements of a reservoir, the method comprising the steps of: measuring one of a plurality of measured liquid level values indicative of a liquid level in the reservoir at a corresponding time; estimating the one of the plurality of measured liquid level values to obtain one of a plurality of estimated liquid level values being indicative of the liquid level in the reservoir at the corresponding time, said estimation being based at least on a preceding one of the plurality of measured liquid level values; obtaining one of a plurality of deviation values by comparing the one of the plurality of the measured liquid level values to the one of the plurality of estimated liquid level values; obtaining a number of noisy deviation values by comparing an amount of the previously obtained deviation values to a noise threshold value; and outputting one of a plurality of filtered liquid level values being indicative of a noise-reduced liquid level in the reservoir at the corresponding time, the outputted one of the plurality of filtered values being one of the one of the plurality of estimated values when the number of noisy deviation values is below a noise limit or the preceding outputted one of the plurality of filtered liquid level values when the number of noisy deviation values is above the noise limit.
Many further features and combinations thereof concerning the present improvements will appear to those skilled in the art following a reading of the instant disclosure.
In the figures,
In one embodiment, the first noise filtration stage 14 estimates the fluctuation of liquid level inside the reservoir thus obtaining an estimated liquid level value representative of the measured liquid level value in the reservoir. The first noise filtration stage 14 is based at least on previous measured liquid level and limits how the estimated liquid level value is allowed to change within a period of time. More specifically, the first noise filtration stage 14 limits the change of the estimated liquid level value compared to previous liquid level value measurements. This allowed change can vary depending on the application. Therefore, the allowed change can be greater for applications wherein the liquid level value change during the period of time is expected to be important and, conversely, will be smaller for applications wherein the liquid level value change during the period of time is expected to be less important.
This filtration stage 14 can be based on a mathematical model modelling how the liquid level can vary inside the reservoir, but it can also be based on the previously measured liquid level values, on estimated liquid level values, as well as on initial parameters. For instance, the estimated liquid value can be a previous estimated liquid value to which is added a period of time multiplied by a flow rate. Accordingly, if a reservoir operator pumps liquid out of the reservoir at a rate of 0.5 liters per second, and a measurement is taken each 0.1 s, then the estimated liquid level value can be the previous estimated liquid level value minus 0.5 liters per second times 0.1 s, i.e. minus 0.05 liters. The instantaneous flow rate of the pump can optionally be used in the estimation of the liquid level value. While this particular mathematical model is described herein, other state models can also be used along with the method for filtering noise in liquid level measurements in a reservoir.
Moreover, the first noise filtration stage 14 can estimate the measured liquid level values using a moving average filter provided in simple, cumulative and/or weighted forms, Linear Quadratic Estimation (LQE) such as a Kalman filter (as will be described below) or other suitable filters, for instance. In the embodiment presented in
ELL
i
=ELL
i−1
+K
Li*(MLLi−ELLi−1) (1)
K
Li
=P
Li/(PLi+RT) (2)
P
Li
=P
Li−1*(1−KLi−1)+2*dT*PLFi−1+dT2*PFi−1+dT3*Q/3 (3)
P
LFi
=P
LFi−1*(1−KLi−1)+dT*PFi−1+dT2*Q/2 (4)
P
Fi
=P
Fi−1
−K
Fi*(PLFi−1)+dT2*Q (5)
K
Fi
=P
LFi/(PLi+RT) (6)
where MLLi is the measured liquid level value for iteration i, ELLi is the estimated liquid level value for iteration i, dT is the difference of time between two consecutive liquid level value measurements, F is the flow rate indicative of the flow entering/exiting the reservoir, the parameter Q, KL, RT and PL are adjustable parameters of the Kalman filter. In an example involving a state model different from the constant flow rate state model, the Kalman filter may be given by a different set of equations, for instance. Moreover, in some applications, the algorithm can adjust the parameter Q dynamically.
Once the measured liquid level value is estimated, a step of applying a second noise filtration stage 16 to the resulting estimated liquid level value is performed. In this second noise filtration stage 16, the estimated liquid level value is analyzed in order to determine if the current measured liquid level is in a sloshing mode or not in a sloshing mode. To do so, for instance, a variation of the estimated liquid level value over a given period of time is determined and compared to a threshold value. If the variation is below the threshold value, the estimated liquid level value will be outputted as the filtered liquid level value at step 20. However, if the variation is above the threshold value, the liquid in the reservoir is considered to be in the sloshing mode, i.e. a mode in which the sloshing noise value is evaluated to be important relative to the liquid level value. Therefore, a previously outputted filtered liquid level value will be repeatedly outputted as the filtered liquid level value until the determined variation is below the threshold value at the step 20.
Optionally, when the liquid in the reservoir is considered to be in the sloshing mode, the allowed change between the estimated liquid level value compared to previous liquid level value measurements during the first noise filtration stage can be increased. Therefore, while the outputted filtered liquid level value is a previously outputted filtered liquid level value, the first noise filtration stage is modified to allow for faster converging in order to reduce the time required for the determined variation to be reduced below the threshold value. Accordingly, in a situation where a reservoir operator monitors the outputted filtered liquid level value when the liquid is considered to be in the sloshing mode, he/she will observe the same repeated outputted filtered liquid level value for as long as the liquid is identified as being in the sloshing mode. However, in the background, the first noise filtration stage 14 is modified to converge to the measured liquid level values within a shorter amount of time.
Referring back to
The method for filtering noise in liquid level measurements can be implemented using either a measured liquid level which is sampled with an acquisition module having a sampling frequency or with an analog liquid level detector (not shown). In this latter situation, the determined variation may be an integral of the variation over a given period of time, for instance. Such a mathematical operation can be implemented in a printed circuit board (PCB) using electrical components such as op-amps and resistors interacting one with another to process the analog signal adequately.
More specifically, in the illustrated embodiment, the computer 42 is adapted to receive a measured liquid level value from the liquid level sensor wherein the measured liquid level value is indicative of a liquid level in the reservoir 36 at a given point in time. In this example, the computer 42 is adapted to apply the first noise filtration stage 14 to the measured liquid level value, wherein the first noise filtration stage 14 includes estimating a liquid level value in the reservoir 36 at the given point in time. The step of estimating is based on the measured liquid level value at the given point in time, on at least one liquid level value measured before the given point in time and on a converging rate. Once the first noise filtration stage 14 is performed, the computer 42 is adapted to apply the second noise filtration stage 16 which includes obtaining a deviation value by comparing the measured liquid level value to the estimated liquid level value; obtaining a number of noisy deviation values by comparing an amount of the previously obtained deviation values to a noise threshold value; and outputting, on the display 48 of the computer 42, a noise-reduced liquid level value corresponding to the estimated value when the number of noisy deviation values is below a noise limit and to a previously outputted liquid level value when the number of noisy deviation values is above the noise limit. Optionally, the computer 42 is further adapted to apply the first noise filtration stage 14 while allowing the converging rate to be increased when a previous number of noisy deviation values is above the noise limit. Moreover, the computer 42 is further adapted to apply the third noise filtration stage 18 which includes maintaining the outputted filtered liquid level value to a prior outputted filtered liquid level value when the difference between the two successive outputted liquid level values is smaller than a clipping threshold. For instance, the noise filtration stages can be provided in the form of a single software, or more than one software, which is(are) stored on the memory 46 and executed by the processor 44. Alternatively, it is noted that either one of the noise filtration stages can be performed by a corresponding electrical circuit mounted on a PCB. In another example, the second and third noise filtration stage is performed using two independent parts of a single software while the first noise filtration stage is performed using an electric circuit integrating a Kalman filter or other suitable noise filter via corresponding electronic components.
In this example, the algorithm starts at iteration zero (i=0) and is performed repeatedly for all the measured liquid level values. For instance, the analysis of the seventh iteration is presented here below (i=7). First, the measured liquid level value MLL7 indicative of a liquid level in the reservoir at the corresponding time t7 is obtained. Then, the measured liquid level value MLL7 is estimated to obtain the estimated liquid level value ELL7 being indicative of the liquid level in the reservoir at the corresponding time t7 also. The estimation can be based on MLL6, for instance, and optionally on a converging rate. It is to be noted that the estimation can be based on a plurality of previous MLLi as well as on a plurality of previous ELLi. Still in this example, the second noise filtration stage 16′ includes computing a deviation value DV7 by subtracting the estimated liquid level value ELL7 from the measured liquid level value MLL7. Then, a number of noisy deviation values NND is obtained by comparing an amount of the previously obtained deviation values, say DV3 to DV7, to the threshold value LLth. If DV3, DV4, DV5, DV6 and DV7 are above the threshold value LLth, then the number of noisy deviation values NND is five. In this example, the liquid level is considered to be in a sloshing mode when the number of noisy deviation is above the noise limit NL. For instance, if the noise limit NL is ten, then the liquid level is not considered to be in the sloshing mode. However, if the noise limit NL is four then the liquid level is considered to be in the sloshing mode. When the liquid level is not in the sloshing mode, the filtered liquid level value FLL7 is fixed to the estimated liquid level value ELL7, therefore FLL7=ELL7. However, when the liquid level is in the sloshing mode, the filtered liquid level value FLL7 is fixed to the previous filtered liquid level value FLL6, therefore FLL7=FLL6. In this situation, the converging rate of the first noise filtration stage can be increased for the eighth iteration in order the reduce the amount of time required to exit the sloshing mode. The converging rate can be changed, for instance, by taking more measurements in a predetermined period of time or also by increasing the allowed change of liquid level value between two successive estimated liquid level values. Finally, the last and optional third noise filtration stage 18′ acts on the filtered liquid level value FLL7 and determines if the change between FLL7 and FLL6 is high enough, i.e. higher than the clipping threshold CL, to be outputted to the user. The flow chart ends with i=i+1, which indicates that the flow chart is iterative and that the steps are to be performed for the following iteration, say the eight iteration in this case.
As can be understood, the examples described above and illustrated are intended to be exemplary only. For instance, instead of being processed iteratively, the first stage filtration can be performed in real time, such as by using electronic components to form the filter rather than a computer. The scope is indicated by the appended claims.
Number | Date | Country | Kind |
---|---|---|---|
2855761 | Jul 2014 | CA | national |
This application claims priority and the benefit of U.S. Provisional Application No. 62/021,060 and Canadian Application No. 2,855,761, both entitled METHOD AND SYSTEM FOR FILTERING NOISE OF LIQUID LEVEL MEASUREMENTS FROM A RESERVOIR, both filed on Jul. 4, 2014. These applications are hereby incorporated by reference in their entireties.
Number | Date | Country | |
---|---|---|---|
62021060 | Jul 2014 | US |