Accurate flow obtaining device and method

文档序号:1336133 发布日期:2020-07-17 浏览:34次 中文

阅读说明:本技术 一种精确流量获取装置及方法 (Accurate flow obtaining device and method ) 是由 安斯奇 吕东晓 陈思成 徐星辰 曽钰峻 王玥峰 于 2020-04-08 设计创作,主要内容包括:本发明为一种精确流量获取装置及方法,由储水箱、直流电机驱动泵、产生数字信号的流量传感器和产生模拟信号的液面传感器、启动与控制机构以及PC端数据处理模块组成。储水箱模拟实际储存液体容器体积,直流电机驱动泵用于改变实时流量,流量传感器用于获取实时的液体流量,液面传感器用于测量位于容器中的液体绝对体积,启动与控制机构通过AVR单片机输出PWM信号控制泵的转速、获得传感器信号并输出测量参数,数据处理模块将传感器所采集的信号进行处理,利用多传感器反馈数据并设计卡尔曼滤波信号处理算法进行数据融合,实现流量的精确测量。此装置与传统的流量测量方式相比具有精度高,实时测量准确,算法简单计算量小等优点。(The invention relates to a device and a method for acquiring accurate flow, which consists of a water storage tank, a direct current motor driving pump, a flow sensor for generating digital signals, a liquid level sensor for generating analog signals, a starting and control mechanism and a PC (personal computer) end data processing module. The water storage tank simulates the volume of an actual liquid storage container, the direct current motor drive pump is used for changing real-time flow, the flow sensor is used for acquiring real-time liquid flow, the liquid level sensor is used for measuring the absolute volume of liquid in the container, the starting and control mechanism outputs PWM (pulse width modulation) signals through the AVR single chip microcomputer to control the rotating speed of the pump, obtain sensor signals and output measurement parameters, the data processing module processes signals acquired by the sensor, and the data processing module performs data fusion by utilizing multi-sensor feedback data and designing a Kalman filtering signal processing algorithm to realize accurate measurement of the flow. Compared with the traditional flow measurement mode, the device has the advantages of high precision, accurate real-time measurement, simple algorithm, small calculated amount and the like.)

1. A precise flow rate obtaining apparatus, comprising: the device comprises a water storage tank, a direct current motor drive pump, a flow sensor, a liquid level sensor, a starting and control module and a data processing module in a PC (personal computer) end;

a water storage tank for storing water and simulating the volume of the actual liquid storage container;

the direct current motor driving pump consists of a direct current motor and a gear pump, and the direct current motor is controlled by a brushless electric regulator so as to control the rotating speed of the gear pump, so that the direct current motor driving pump is used for changing the liquid flow in the water storage tank and simulating the liquid flow under different working conditions;

the flow sensor is arranged on one side of the water outlet end of the direct current motor driving pump, when liquid flows through the magnetic rotor assembly in the flow sensor, the magnetic rotor is impacted to start rotating, rotating magnetic fields with different magnetic poles are generated, and by cutting a magnetic induction line, a Hall element in the flow sensor generates corresponding high and low pulse levels and outputs a flow signal to the PC end;

the liquid level sensor is arranged above the water storage tank, measures the liquid level height of the water storage tank, outputs a generated liquid level height signal to the PC end, and multiplies the liquid level height signal by the sectional area of the water storage tank to obtain the liquid change volume;

the starting and controlling module takes an Arduino single-chip microcomputer development board as a platform, and controls to generate an electric signal through an AVR single-chip microcomputer to start a direct current motor which drives a gear pump, a flow sensor and a liquid level sensor; the rotating speed of the gear pump is changed by a pulse width modulation pressure regulating method and by using the control of a sliding regulating potentiometer so as to achieve the purpose of measuring under different flow rates; meanwhile, digital flow signals and simulated liquid level height signals obtained by the flow sensor and the liquid level sensor are input to a PC end Arduino single chip microcomputer development board platform, and programs of the Arduino single chip microcomputer development board are converted into flow and are displayed and output in a serial port monitor of the Arduino single chip microcomputer development board platform;

and the data processing module is used for carrying out Kalman filtering fusion processing on the flow signals and the liquid level height signals output by the flow sensor and the liquid level sensor received by the PC terminal based on a Kalman filtering algorithm to finally obtain an accurate flow value.

2. The apparatus for obtaining a precise flow rate according to claim 1, wherein: in the data processing module, the Kalman filtering algorithm is realized as follows:

(1) correcting the estimation value of the previous moment by using the observation values from the flow sensor and the liquid level sensor at the current moment to obtain Dk-1The optimal deviation value of the liquid flow at the previous moment is obtained; rk 2=Bk 2+Ck 2Is uncertainty; b iskThe covariance of the flow sensor at the current moment; ckThe covariance of the liquid level sensor at the current moment; a. thekA deviation value is predicted for the current time instant,gain weights obtained for the flow sensors;gain weight obtained for the level sensor; obtaining a deviation prediction equation and a filtering gain weight equation which are as follows:

(2) after the filtering equity weight gain is obtained, a predicted value obtained by the flow sensor and the liquid level sensor at the last moment is obtainedAnd the flow value Y of the flow sensor obtained at the current momentkAnd the flow rate value Z of the liquid level sensor obtained at the present timekThe filter estimation equation is obtained as follows:

wherein isAn estimated value obtained by the flow sensor at the present time isThe estimated value obtained by the liquid level sensor at the present time,the flow estimation value is obtained after the fusion at the current moment.

3. The apparatus for obtaining a precise flow rate according to claim 1, wherein: be provided with pressure sensor in the water storage tank for measure the interior actual liquid level height of water storage tank, PC end is through Arduino singlechip development board monitoring, and the liquid level height is low in time stop device when crossing, ensures the normal work of direct current motor drive pump.

4. The apparatus for obtaining a precise flow rate according to claim 1, wherein: the direct current motor driving pump is a gear pump driven by a brushless direct current motor and is used for changing the actual flow of liquid.

5. The apparatus for obtaining a precise flow rate according to claim 1, wherein: the flow sensor adopts a volume turbine and a Hall principle, namely the turbine is rotated by the impact of flowing liquid, the turbine rotates to generate pulse or square wave, the pulse frequency or the high level time of the square wave is calculated, the volume relation corresponding to the pulse of the flow sensor is 10040 pulses/liter, and the actual liquid flow is obtained by the real-time flow integral measured by the flow sensor.

6. The apparatus for obtaining a precise flow rate according to claim 1, wherein: the liquid level sensor is an infrared liquid level sensor or an ultrasonic liquid level sensor, absolute measurement is carried out by utilizing the differential volume, and errors caused by repeated counting due to the fact that bubbles from a medicine box are mixed in a pipeline of the flow sensor, the resistance of an outlet of the pipeline is too large or the pressure is not uniform, and turbulence is generated can be made up.

7. The apparatus for obtaining a precise flow rate according to claim 1, wherein: the starting and control module takes an Arduino single-chip microcomputer development board as a platform, the Arduino single-chip microcomputer development board platform consists of a single-chip microcomputer with the model of AVR, a 16MHZ crystal oscillator and a 5V linear voltage-stabilizing direct-current power supply, and the Arduino single-chip microcomputer development board is an UNO type development board; the port is configured as a MiniUSB interface and is used for communicating with the PC end and burning programs; in addition, a PWM control signal is output by the slide-adjusting potentiometer to establish a control relation with the gear pump, the rotating speed of the driving pump is controlled to control the flow, and digital signals and analog signals acquired by the read flow sensor and the liquid level sensor are transmitted to the PC end through the Mini USB interface to acquire flow data.

8. A precise flow obtaining method comprises the following steps:

(1) the water storage tank simulates a direct current motor driving pump for actually storing the volume of a liquid container to change the liquid flow and simulate the liquid flow under different working conditions;

(2) the flow sensor measures the real-time flow according to the output pulse number, which is essentially integral measurement, the output pulse number of the Hall element is integral of the real-time flow, and the integral expression is as follows:

in the formula, count is the number of output pulses; v. of0(t) real-time water flow; the corresponding relation coefficient of the flow and the output pulse number is obtained; t is time (unit: millisecond);

from the equation (1.1), the number of output pulses is a constant integral of the real-time flow rate over the time from 0 to t, and is obtained from the equation (2.1) according to the relationship that the integral and the differential are inverse operations with each other:

v0(t) is the derivative of the number of output pulses count over time t, i.e. the slope of the curve;

(3) in order to improve the precision, the flow sensor is accurately calibrated, a second sensor, namely a liquid level sensor, is added on the basis, a functional relation between the height difference H from the liquid level sensor to the liquid level and the real-time water volume V in the water storage tank is established, a polynomial is selected for fitting, and the fitting relation between the volume of the water storage tank and the height difference of the liquid level is as follows:

V(H)=∑λiHi,i≥2

wherein λ isiIs a polynomial constant, i is the degree of fitting of the polynomial; v (H) a function of real-time water volume V;

(4) the method comprises the steps of taking an Arduino singlechip development board as a platform, reading digital signals and analog signals acquired by two sensors, transmitting the digital signals and the analog signals to a PC (personal computer) end through a Mini USB (universal serial bus) interface to acquire flow data, adopting a Kalman filtering method, taking the minimum mean square error as an optimal estimation criterion, correcting an estimation value at the previous moment by using observation values from different sensors at the current moment, updating estimation of state quantity to obtain an estimation value at the current moment, performing optimal estimation meeting the minimum mean square error on signals to be processed according to an established filtering estimation equation and a filtering deviation equation, and finally acquiring actual accurate flow.

Technical Field

The invention relates to a device and a method for acquiring accurate flow, which are used for multiple fields of oil mass acquisition, automatic spraying and the like.

Background

Today, electronic control systems are developed at a high speed, and precision flow devices are widely applied to various fields such as aircrafts, automobiles, agricultural production and the like. With the continuous development of economic society, more and more fields put more demands on accurate flow devices. In research on metrology systems, in terms of sensors and their data fusion. On the basis of the analysis of liquid level monitoring technologies at home and abroad in a liquid level monitoring experiment [1] ([1] whiteman. multiple sensor fusion algorithm [ D ]. Changan university, 2017.) in the whiteman, various liquid level monitoring technologies are compared from the aspects of measurement precision, reliability, cost, installation convenience and the like, an ultrasonic liquid level measuring method is selected, and aiming at the defects of a single sensor measurement technology, a multiple sensor fusion algorithm is adopted, and multiple sensors are used for collecting data and carrying out data fusion. The multi-sensor fusion algorithm is discussed in detail in terms of both accuracy and real-time. And fusing the acquired data by using a multi-sensor fusion algorithm, and submitting the fused data to an upper computer for analysis. In a control experiment [2] ([2] Zhuli. automatic control of water tower water level [ J ] quotient, 2013 (8): 216-. However, the ultrasonic liquid level sensor is actually an absolute measurement, and the error sources are the actually measured height H (t) and the accuracy of a mathematical model of the water storage tank, wherein the actually measured height H (t) is easily influenced by the fluctuation of the water surface, which is the most important error source; in addition, a small amount of error is caused by the quality and precision of the ultrasonic liquid level sensor. Therefore, when dynamic flow measurement is carried out, the metering precision is improved by only using the plurality of liquid level sensors, and the flow sensor and the liquid level sensor are fused to realize advantage complementation. Korean-Pink-Packweed, Sandwin and Shiqing research provides a novel nonlinear Kalman filtering method, namely a Simplex Unscented Quadrature Kalman Filtering (SUQKF) method [3] ([3] Korean-Pink-Packweed, Sandwin and Shiqing research, a novel nonlinear Kalman filtering method [ J ]. instrumental and instrumental science and instrument report, 2015,36(03): 632-plus 638.), and the method constructs a group of novel high-order sampling points with determined number, weight coefficient and spatial distribution by correcting the sampling points used by Simplex Unscented Kalman Filtering (SUKF) waves and combining with Gaussian-Laguerre integral criterion for filtering. Note also that SUKF is a special case of SUQKF. Comparing the method with Extended Kalman Filter (EKF) and volume product Kalman filter (CQKF) through experiments, the result shows that: the filtering precision of the SUQKF method is higher than that of EKF and CQKF, the convergence rate is higher, and the real-time performance is better than that of CQKF. Therefore, the method introduces the thought of Kalman filtering into the feedback data of the fusion sensor, and the iterative processing mode of Kalman filtering has no delay, thereby better meeting the requirement on accurate measurement.

Disclosure of Invention

The invention solves the problems: the device and the method for acquiring the accurate flow overcome the defects of the prior art, utilize a mode of fusing feedback data of a flow sensor and a liquid level sensor and designing a Kalman filtering signal processing algorithm to perform data fusion, and solve the problems of low precision, large fluctuation interference and the like commonly existing in the current flow working condition measurement.

The technical solution of the invention is as follows: a precision flow acquisition device comprising: the device comprises a water storage tank, a direct current motor drive pump, a flow sensor, a liquid level sensor, a starting and control module and a data processing module in a PC (personal computer) end;

a water storage tank for storing water and simulating the volume of the actual liquid storage container;

the direct current motor driving pump consists of a direct current motor and a gear pump, and the direct current motor is controlled by a brushless electric regulator so as to control the rotating speed of the gear pump, so that the direct current motor driving pump is used for changing the liquid flow in the water storage tank and simulating the liquid flow under different working conditions;

the flow sensor is arranged on one side of the water outlet end of the direct current motor driving pump, when liquid flows through the magnetic rotor assembly in the flow sensor, the magnetic rotor is impacted to start rotating, rotating magnetic fields with different magnetic poles are generated, and by cutting a magnetic induction line, a Hall element in the flow sensor generates corresponding high and low pulse levels and outputs a flow signal to the PC end;

the liquid level sensor is arranged above the water storage tank, measures the liquid level height of the water storage tank, outputs a generated liquid level height signal to the PC end, and multiplies the liquid level height signal by the sectional area of the water storage tank to obtain the liquid change volume;

the starting and controlling module takes an Arduino single chip microcomputer development board as a platform, and controls to generate an electric signal through an AVR single chip microcomputer to start a direct current motor which drives a gear pump, a flow sensor and a liquid level sensor; the rotating speed of the gear pump is changed by a pulse width modulation pressure regulating method and by using the control of a sliding regulating potentiometer so as to achieve the purpose of measuring under different flow rates; meanwhile, digital flow signals and simulated liquid level height signals obtained by the flow sensor and the liquid level sensor are input to a PC end Arduino single chip microcomputer development board platform, a program of the Arduino single chip microcomputer development board is converted into flow, and the flow is displayed and output in a serial port monitor of the Arduino single chip microcomputer development board platform;

and the data processing module is used for carrying out Kalman filtering fusion processing on the flow signals and the liquid level height signals output by the flow sensor and the liquid level sensor received by the PC terminal based on a Kalman filtering algorithm to finally obtain an accurate flow value.

In the data processing module, a Kalman filtering method is adopted, the minimum mean square error is used as an optimal estimation criterion, the estimation value of the previous moment is corrected by utilizing observation values from different sensors at the current moment, so that the estimation of the state quantity is updated, the estimation value of the current moment is obtained, the optimal estimation meeting the minimum mean square error is carried out on the signals to be processed according to an established filtering estimation equation and a filtering deviation equation, and finally the actual accurate flow is obtained. The flow rate value is set to the unique state quantity. The Kalman filtering method has good effect of inhibiting real-time data fluctuation and can estimate and restore real data to the maximum extent.

The specific Kalman filtering algorithm implementation process is as follows:

(1) correcting the estimation value of the previous moment by using the observation values from the flow sensor and the liquid level sensor at the current moment to obtain Dk-1The optimal deviation value of the liquid flow at the previous moment is obtained; rk 2=Bk 2+Ck 2Is uncertainty; b iskThe covariance of the flow sensor at the current moment; ckThe covariance of the liquid level sensor at the current moment; a. thekA deviation value is predicted for the current time instant,gain weights obtained for the flow sensors;gain weight obtained for the level sensor; obtaining a deviation prediction equation and a filtering gain weight equation which are as follows:

(2) after the filtering equity weight gain is obtained, a predicted value obtained by the flow sensor and the liquid level sensor at the last moment is obtainedAnd the flow value Y of the flow sensor obtained at the current momentkAnd the flow rate value Z of the liquid level sensor obtained at the present timekThe filter estimation equation is obtained as follows:

wherein isObtained at the current moment by using a flow sensorIs estimated asThe estimated value obtained by the liquid level sensor at the present time,the flow estimation value is obtained after the fusion at the current moment.

Be provided with pressure sensor in the water storage tank for measure the interior actual liquid level height of water storage tank, PC end is through Arduino singlechip development board monitoring, and the liquid level height is low in time stop device when crossing, ensures the normal work of direct current motor drive pump.

The direct current motor driving pump is a gear pump driven by a brushless direct current motor and is used for changing the actual flow of liquid.

The flow sensor adopts a volume turbine, and adopts the volume turbine and the Hall principle, namely the turbine rotates under the impact of flowing liquid, the turbine rotates to generate pulse or square wave, the pulse frequency or the square wave high level time is calculated, the volume relation formula corresponding to the pulse of the flow sensor is 10040 pulse/liter, and the actual liquid flow is obtained by real-time flow integral measured by the flow sensor. The blade of the impeller has a certain angle with the flow direction, the impulse force of the fluid enables the blade to generate a rotating torque, the rotating blade cuts a magnetic line of force in a magnetic field to generate an electric pulse signal, the pulse frequency can be obtained by utilizing the Hall principle, the pulse frequency or the square wave high level time is calculated, the volume relation corresponding to the pulse of the flow sensor is 10040 pulses/liter by measurement, the flow is measured by reading the pulse quantity output by the flow sensor at the PC end to obtain the final expression of the flow, and the actual liquid flow is obtained by real-time flow integration measured by the flow sensor.

The liquid level sensor is an infrared liquid level sensor or an ultrasonic liquid level sensor, absolute measurement is carried out by utilizing the differential volume, and errors caused by repeated counting due to the fact that bubbles from a medicine box are mixed in a pipeline of the flow sensor, the resistance of an outlet of the pipeline is too large or the pressure is not uniform, and turbulence is generated can be made up. The single flow sensor is mixed with bubbles from a medicine box, the turbine blade of the sensor rotates to generate negative pressure to separate out gas dissolved in water, so that the filling efficiency is reduced or turbulence is generated to cause repeated counting, the real-time flow measured by the flow sensor has unacceptable errors in calculation, the liquid level sensor is introduced to directly measure the absolute volume of liquid in a container, and a functional relation between the height difference from the sensor to the liquid level and the real-time water volume in the water storage tank is established. The polynomial is selected for fitting, integral drift is avoided, interference of factors such as bubbles can be avoided, the static accuracy is high, and the method is easily influenced by dynamic low-frequency disturbance of the liquid level.

The starting and control module takes an Arduin singlechip development board as a platform, the Arduino singlechip development board platform consists of a singlechip with the model of AVR, a 16MHZ crystal oscillator and a 5V linear voltage-stabilizing direct-current power supply, and the Arduino singlechip UNO development board is used; the port is configured as a Mini USB interface and is used for communicating with a PC end and burning programs; in addition, a PWM control signal is output by the slide-adjusting potentiometer to establish a control relation with the gear pump, the rotating speed of the driving pump is controlled to control the flow, and digital signals and analog signals acquired by the read flow sensor and the liquid level sensor are transmitted to the PC end through the Mini USB interface to acquire flow data. In addition, the sliding potentiometer module is used for changing the control relation between the square wave pulse voltage signal output PWM control signal and the driving pump, and controlling the rotating speed of the driving pump to control the flow.

The invention discloses a method for acquiring accurate flow, which comprises the following steps:

(1) the water storage tank simulates a direct current motor driving pump for actually storing the volume of a liquid container to change the liquid flow and simulate the liquid flow under different working conditions;

(2) the flow sensor measures the real-time flow according to the output pulse number, which is essentially integral measurement, the output pulse number of the Hall element is integral of the real-time flow, and the integral expression is as follows:

in the formula, count is the number of output pulses; v. of0(t) real-time water flow; the corresponding relation coefficient of the flow and the output pulse number is obtained; t is time (unit: millisecond);

from the equation (1.1), the number of output pulses is a constant integral of the real-time flow rate over the time from 0 to t, and is obtained from the equation (2.1) according to the relationship that the integral and the differential are inverse operations with each other:

v0(t) is the derivative of the number of output pulses count over time t, i.e. the slope of the curve;

(3) in order to improve the precision, the flow sensor is accurately calibrated, a second sensor, namely a liquid level sensor, is added on the basis, a functional relation between the height difference H from the liquid level sensor to the liquid level and the real-time water volume V in the water storage tank is established, a polynomial is selected for fitting, and the fitting relation between the volume of the water storage tank and the height difference of the liquid level is as follows:

V(H)=∑λiHi,i≥2

wherein λiIs a polynomial constant, i is the degree of fitting of the polynomial; v (H) a function of real-time water volume V;

(4) the method comprises the steps of taking an Arduino singlechip development board as a platform, reading digital signals and analog signals acquired by two sensors, transmitting the digital signals and the analog signals to a PC (personal computer) end through a Mini USB (universal serial bus) interface to acquire flow data, adopting a Kalman filtering method, taking the minimum mean square error as an optimal estimation criterion, correcting an estimation value at the previous moment by using observation values from different sensors at the current moment, updating estimation of state quantity to obtain an estimation value at the current moment, performing optimal estimation meeting the minimum mean square error on signals to be processed according to an established filtering estimation equation and a filtering deviation equation, and finally acquiring actual accurate flow.

Compared with the prior art, the invention has the advantages that:

(1) the invention is composed of a water storage tank, a direct current motor driving pump, a flow sensor generating digital signals, a liquid level sensor generating analog signals, a data processing module which processes and fuses signals obtained by the two sensors, generates electric signals through the control of an AVR single chip microcomputer to start and control and utilizes Kalman filtering. The water tank simulates the volume of a container for actually storing liquid, a pressure sensor is arranged in the water tank and used for measuring the actual liquid level height in the water tank, the PC end is monitored by an Arduino singlechip development board, and the normal work of the gear pump is ensured when the liquid level height is too low; the direct current motor driving pump is a gear pump driven by a brushless direct current motor, is positioned behind the water storage tank, and is electrically controlled by the brushless electricity to control the motor before a sensor, so that the rotating speed of the gear pump is controlled, and the direct current motor driving pump is used for changing liquid flow and simulating the liquid flow under different working conditions. Compared with the prior art, the method has better effect on precise estimation or correction of real-time signals, and the sensors of different types can expand the testing dimension and avoid the inherent defect of a single sensor, so that better fusion effect is obtained, and the measuring precision of different working conditions and the accuracy of other mathematical models related to liquid measurement are effectively improved.

(2) The Kalman filtering code quantity adopted by the invention is simple, the calculation requirement on a single chip microcomputer is low, the iterative processing mode of Kalman filtering is adopted, no delay is caused, the inhibition effect on fluctuation signals is good, and the obtained data can meet the accuracy requirement.

(3) Nowadays, electronic devices are high in integration level, low in price, light in weight and easy to obtain, and compared with traditional complex mechanical devices, the required cost is greatly reduced, and the feasibility in actual production is stronger.

(4) The invention uses low-cost components and devices and is matched with a proper metering algorithm, thereby greatly improving the metering precision and improving the low-cost thought for industrial production.

(5) The invention uses the modularized design and can be modified to a certain extent. On the premise of meeting the signal system, the power device or the adaptive sensor model can be replaced, and the universality is high.

(6) The method has the advantages of universality, wide application field and high feasibility, and can be applied to various fields requiring accurate acquisition of flow.

Drawings

FIG. 1 is a block diagram of the apparatus of the present invention;

FIG. 2 is a view of a Kalman filtering algorithm structure of the present invention;

FIG. 3 is a comparison of three signal processing modes under a large flow condition according to the present invention;

FIG. 4 is a comparison of three signal processing modes under a medium flow condition according to the present invention;

FIG. 5 is a comparison of three signal processing modes under a low flow condition in accordance with the present invention;

FIG. 6 is a comparison of three signal processing modes under dynamic flow conditions in accordance with the present invention;

FIG. 7 is a comparison of the effect of a flow sensor metering flow through volume alone versus a multi-sensor metering flow through volume.

Detailed Description

The present invention will be described in detail below with reference to the accompanying drawings and examples.

As shown in fig. 1, which is a structural diagram of a flow acquisition system, the invention mainly comprises a water storage tank 1, a direct current brushless motor centrifugal driving pump 2, a flow sensor 3 for generating digital signals, a liquid level sensor 4 for generating analog signals, a starting and control module 5 for processing and fusing signals obtained by the two sensors, a data processing module 6 for utilizing kalman filtering, wherein the starting and control module 5 is controlled by an AVR single chip microcomputer to generate electric signals.

The direct current brushless motor drives the pump 2, and it is used for controlling the fluid velocity of flow to the flow condition under the different operating modes of simulation, for avoiding blockking up the inaccurate problem of measurement that brings by the spout, install return line and be controlled by step motor at pump both ends. The duty ratio is adjusted by Pulse Width Modulation (PWM) to adjust the magnitude of the input voltage, thereby achieving the purpose of speed regulation. The flow sensor 3 adopts a positive displacement turbine, the blades of the impeller have a certain angle with the flow direction, the impulse force of the fluid enables the blades to generate a rotating moment, the rotating blades cut magnetic lines in a magnetic field to generate electric pulse signals, the pulse frequency can be obtained by utilizing the Hall principle, and the pulse frequency or the square wave high level time can be calculated. Hall element in flow sensorAfter repeated measurement, the corresponding pulse number of 1m L water is determined to be one, and the corresponding relation between the output pulse number of the flow sensor and the unit volume (liter) of water is about 1680/L, so that the corresponding pulse number per milliliter of water is 1680/LAnd (4) respectively. Metering the real-time flow size based on the number of output pulses is essentially an integral measurement. The output pulse number of the Hall element is the integral of real-time water flow, and the integral expression is as follows:

in the formula, count is the number of output pulses; v. of0(t) real-time water flow; the corresponding relation coefficient of the flow and the output pulse number is obtained; t is time (unit: millisecond).

It can be seen that the number of output pulses is a fixed integral over time 0 to t over real time flow. According to the relationship that the integral and the differential are inverse operations, the following can be obtained:

v0(t) is the derivative of the number of output pulses count over time t, i.e. the slope of the curve.

The sprayed dosage (volume) is obtained by the real-time flow integral measured by the flow sensor, in actual operation, the accuracy of the flow sensor is about +/-0.05L/L, and the problems of lower accuracy are mainly as follows:

1) air bubbles from the medicine chest are mixed in the pipeline, so that the actual flow passing through the sensor is smaller than the measured value, and an unacceptable error exists in the calculation of the total amount of the sprayed liquid medicine;

2) the turbine blade of the sensor rotates to generate negative pressure to separate out gas dissolved in water, so that the filling efficiency is reduced, and the actual flow passing through the sensor is smaller than a measured value;

3) solid residues block the nozzle, so that the resistance of the outlet of the pipeline is too large or the pressure is not uniform, turbulence is generated to cause repeated counting, and the actual flow passing through the sensor is larger than the measured value.

In order to improve the precision, the flow sensor is accurately calibrated, and a second sensor is added on the basis of the calibration. Namely, the liquid level sensor 4 in fig. 2 is added, and as shown in fig. 1, a functional relation between the height difference H from the sensor to the liquid level and the real-time water volume V in the water storage tank is established. Selecting a polynomial to carry out fitting, wherein the fitting relation of the volume of the water storage tank and the height difference of the liquid level is as follows, wherein lambdaiFor polynomial constants, i is the degree of the polynomial fit.

V(H)=∑λiHi,i≥2

The starting and controlling module 5 with the development board of the Arduino singlechip microcomputer as a platform monitors and acquires data of a controller (a lower computer) through a PC (an upper computer) and records program codes to the controller to an AVR singlechip microcomputer for data processing to achieve the control purpose.

In practical flow detection application, the liquid flow needs to be monitored, fed back and adjusted in real time, so that the measurement precision and the sensor precision are closely related, and the two sensors adopted by the invention have the advantages that: the flow sensor is positively correlated with the flow, and the dynamic measurement accuracy is high; the liquid level sensor is used for absolute measurement of the height of the liquid level, and the steady-state measurement does not drift. The flow value is now calibrated by fusing the feedback data of both.

According to the invention, Kalman filtering is selected to process and fuse data obtained by two sensors, and as shown in FIG. 2, a Kalman filtering algorithm structure chart is shown, the Kalman filtering shown in FIG. 2 has the advantages of simple code amount, low calculation requirement on a single chip microcomputer, suitability for use on remote equipment, no delay due to the adoption of an iterative processing mode of Kalman filtering, and capability of meeting the requirement of accurately measuring liquid flow.

By adopting a Kalman filtering method, the method plans to simultaneously solve two problems of filtering and parameter estimation of a random linear discrete system: and taking the minimum mean square error as an optimal estimation criterion, adopting a state space model comprising signals and noise, and correcting the estimation value of the previous moment by using the observation values from different sensors at the current moment so as to update the estimation of the state quantity and obtain the estimation value at the current moment, wherein the algorithm makes the optimal estimation meeting the minimum mean square error on the signals to be processed according to the established system equation and observation equation. The flow rate value is set to the unique state quantity. As shown in fig. 2, D is obtained by correcting the estimated value at the previous time using the observed values from the flow sensor and the liquid level sensor at the current timek-1The optimal deviation value of the liquid flow at the previous moment is obtained; rk 2=Bk 2+Ck 2Is uncertainty; b iskThe covariance of the flow sensor at the current moment; ckThe covariance of the liquid level sensor at the current moment; a. thekA deviation value is predicted for the current time.Gain weights obtained for the flow sensors;gain weight obtained for the level sensor; obtaining a deviation prediction equation and a filtering gain weight equation which are as follows:

after the filtering equity weight gain is obtained, the predicted value obtained by the two sensors at the last moment can be usedAnd the flow value Y of the flow sensor obtained at the current momentkAnd the flow rate value Z of the liquid level sensor obtained at the present timek. The filter estimation equation is obtained as follows:

wherein isThe estimated value obtained by the flow sensor at the current moment. Is an estimated value obtained by the liquid level sensor at the current time.The flow estimation value is obtained after the fusion at the current moment.

In order to verify that the effect of the Kalman filtering method can reach the purpose of the experiment, a common arithmetic averaging method (arithmetric averaging approach) and a weighted filtering method (weighted smoothing approach) are introduced and are simultaneously compared with the Kalman filtering method, the gain weight α obtained by a flow sensor and the gain weight β obtained by a liquid level sensor are used for weighted filtering, wherein the weighted filtering method is used for filtering the gain weight which meets α + β to 1, and the weighted filtering method is used for filtering an estimation equation as follows:

the method comprises the steps of obtaining a filter estimation equation, comparing a Kalman filtering method, a weighted filtering method and an arithmetic mean method, verifying the advantages of the Kalman filtering method, setting the sampling rate to be 100 at the moment, regulating the speed of a spray pump to obtain different flow working conditions, and processing real-time data from an ultrasonic liquid level sensor and a flow sensor in real time through an on-chip program to obtain a steady-state flow signal value comparison and a dynamic flow signal value comparison, wherein MAT L software is utilized to perform relevant numerical calculation, control system analysis and simulation performance verification, a system block diagram and a simulation environment are established under MAT L AB to obtain steady-state flow signal comparison values under different flow working conditions as shown in figures 3, 4 and 5, figure 3 is a flow result obtained by respectively using an arithmetic mean method, a weighted filtering method and a Kalman filtering method under a large flow working condition, figure 4 is a flow simulation result obtained by respectively using an arithmetic mean method, a weighted filtering method and a Kalman filtering method under a medium flow working condition, and a simulation result obtained by respectively using an arithmetic mean weighted filtering method and a weighted filtering method to obtain a weighted mean flow simulation result which is accurate and a weighted average flow measurement result obtained by respectively using a Kalman filtering method and a Kalman filtering method under a weighted average filtering method, and a weighted filtering method, and a simulation result obtained by using a weighted filtering method which is accurate weighted average filtering method under a low-weighted filtering method, and a simulation result obtained by a weighted average filtering method under a low-weighted filtering method which is more accurate and a simulation result of a Kalman filtering method under a low-weighted average filtering method.

As shown in fig. 7, under the steady-state flow condition, the flow sensor is interfered by high frequency, and there is an integral drift phenomenon through simple integration, that is, the volume flowing through the flow sensor is measured for a long time and is smaller than the true value. Because the liquid level sensor measures the absolute volume, the problem of integral drift can be effectively avoided by combining a multi-sensor fusion method of the liquid level sensor. The ordinate measuredvolume measures the volume.

15页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种流量测量机构及测量装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类