CN104457911B - A kind of liquid level detection system and liquid-level detecting method - Google Patents

A kind of liquid level detection system and liquid-level detecting method Download PDF

Info

Publication number
CN104457911B
CN104457911B CN201410823709.1A CN201410823709A CN104457911B CN 104457911 B CN104457911 B CN 104457911B CN 201410823709 A CN201410823709 A CN 201410823709A CN 104457911 B CN104457911 B CN 104457911B
Authority
CN
China
Prior art keywords
value
photoelectricity
variance
real
time
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201410823709.1A
Other languages
Chinese (zh)
Other versions
CN104457911A (en
Inventor
叶明�
罗争光
李宝福
廖威
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai SK Petroleum Chemical Equipment Corp Ltd
Shanghai Shenkai Petroleum Instrument Co Ltd
Original Assignee
Shanghai SK Petroleum Chemical Equipment Corp Ltd
Shanghai Shenkai Petroleum Instrument Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai SK Petroleum Chemical Equipment Corp Ltd, Shanghai Shenkai Petroleum Instrument Co Ltd filed Critical Shanghai SK Petroleum Chemical Equipment Corp Ltd
Priority to CN201410823709.1A priority Critical patent/CN104457911B/en
Publication of CN104457911A publication Critical patent/CN104457911A/en
Application granted granted Critical
Publication of CN104457911B publication Critical patent/CN104457911B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a kind of liquid level detection system, comprising:Photoelectricity acquisition module, threshold calculation module, variance computing module, condition judgment module and the liquid level moment computing module being sequentially connected;Described photoelectricity acquisition module is used to gather photosignal in real time;Described threshold calculation module is used to store high state threshold value, low state threshold value, maximum stable variance and minimum stable variance;Described variance computing module is used for the variance that real-time opto-electronic value is calculated using mobile variance method;Described condition judgment module is used to judge photoelectricity value status;At the time of described liquid level moment computing module drops to photoelectricity acquisition module for obtaining testing liquid.The invention also discloses a kind of liquid-level detecting method.The present invention detects liquid level due in using moving method difference, under various circumstances, for different testing liquids, Accurate Detection of Liquid Level, strong antijamming capability.

Description

A kind of liquid level detection system and liquid-level detecting method
Technical field
The present invention relates to detection technique field, and in particular to a kind of liquid level detection system and liquid-level detecting method.
Background technology
With the development of electronic technology, progressively substitution manually detects liquid level to robot.Traditional level sensing Method generally simply sets a certain fixed threshold, when photoelectricity value is more than threshold value, then judges that liquid level reaches.Such a determination methods The shortcomings that it is as follows:(1) transparency of oil sample differs, when detecting relatively transparent oil sample, when its liquid blocks light photoelectricity value with Photoelectricity value is all higher than set threshold value when not blocking light, then can not detect liquid level.(2) kinematic viscosity needs to survey at a constant temperature Amount, when (such as 100 DEG C of constant temperature) measure at high temperature, photoelectricity value can change as temperature raises, when photoelectricity value minimum value When alreading exceed threshold value, then liquid level can not be detected.(3) in liquid level due in reflection and refraction occur for light, and photoelectricity value may be high Low to change back and forth, influence is smaller when moving quickly through photoelectricity by simply setting fixed threshold i.e. liquid level smaller on viscosity number, but Larger to viscosity number is that liquid level has a great influence when passing slowly photoelectric tube, can not accurately catch liquid level, poor repeatability.
The content of the invention
It is an object of the invention to provide a kind of liquid level detection system and liquid-level detecting method, is examined using moving method difference Liquid level due in is surveyed, under various circumstances, for different testing liquids, Accurate Detection of Liquid Level, strong antijamming capability.
In order to achieve the above object, the present invention is achieved through the following technical solutions:A kind of liquid level detection system, its feature It is, comprising:
When the photoelectricity acquisition module, threshold calculation module, variance computing module, condition judgment module and the liquid level that are sequentially connected Carve computing module;
Described photoelectricity acquisition module is used to gather photosignal in real time;
Described threshold calculation module is used to store high state threshold value, low state threshold value, maximum stable variance and minimum surely Determine variance;
Described variance computing module is used for the variance that real-time opto-electronic value is calculated using mobile variance method;
Described condition judgment module is used to judge photoelectricity value status;
At the time of described liquid level moment computing module drops to photoelectricity acquisition module for obtaining testing liquid.
A kind of liquid-level detecting method, in liquid level detection system detect testing liquid by photoelectricity acquisition module when Carve, be characterized in, comprise the steps of:
S1, the initialization liquid level detection system;
S2, photoelectricity acquisition module monitor photoelectricity value changes in real time, obtain real-time opto-electronic value;
S3, condition judgment module judge whether real-time opto-electronic value is in high state;
If it is not, then repeat step S2-S3;
If so, then perform step S4;
S4, liquid level moment computing module obtain the liquid level moment using default processing strategy.
Described step S1 is included:
S1.1, photoelectricity acquisition module obtain actual high state photoelectricity value and actual low state photoelectricity value;
S1.2, threshold calculation module calculate high state threshold according to actual high state photoelectricity value and actual low state photoelectricity value Value, low state threshold value, maximum stable variance and minimum stable variance.
The actual high state photoelectricity value that photoelectricity acquisition module obtains in described step S1.1 is to block light without testing liquid The photoelectricity value measured during electric acquisition module, the actual low state photoelectricity value that photoelectricity acquisition module obtains are blocked completely for testing liquid The photoelectricity value measured during photoelectricity acquisition module.
Described step S3 is specifically included:
S3.1, variance computing module calculate the variance of real-time opto-electronic value using preset algorithm;
S3.2, condition judgment module judge whether the variance of real-time opto-electronic value is more than maximum stable variance;
If so, then real-time opto-electronic value enters dynamic process, step S2-S3 is repeated;
If it is not, then perform step S3.3;
S3.3, condition judgment module judge whether the variance of real-time opto-electronic value is less than minimum stable variance;
If it is not, then real-time opto-electronic value maintains dynamic process, step S2-S3 is repeated;
If so, then real-time opto-electronic value enters stable state, step S3.4 is performed;
S3.4, condition judgment module judge whether real-time opto-electronic value is less than low state threshold value;
If so, then real-time opto-electronic value enters low state, step S2-S3 is repeated;
If it is not, then perform step S3.5;
S3.5, condition judgment module judge whether real-time opto-electronic value is more than high state threshold value;
If it is not, then real-time opto-electronic value maintains dynamic process, step S2-S3 is repeated;
If so, then perform step S4.
Preset algorithm is mobile variance method in described step S3.1.
Described step S4 also comprising liquid level moment computing module draw real-time opto-electronic value curve map, the curve map with Time is abscissa, and photosignal value is ordinate.
Described step S4 is specially:
S4.1, liquid level moment computing module are fitted straight line by initial data of the data of curve where dynamic process;
S4.2, fitting a straight line intersect with the horizontal line corresponding to actual low state photoelectricity value, corresponding to intersection point during abscissa Between point be liquid level to be measured at the time of pass through photoelectricity acquisition module.
A kind of liquid level detection system of the present invention and liquid-level detecting method have advantages below compared with prior art:The present invention Set threshold value is calculated all in accordance with actual conditions, the testing liquid to differ suitable for various transparencies;The present invention is logical The change for crossing detection sample variance detects liquid level, strong antijamming capability;The present invention is according to sample variance come detection light Electrical change Dynamic process, level sensing can be carried out under various temperature environments, temperature change is on it without influence;The present invention is in detection photoelectricity After dynamic process, dynamic process is analyzed, can Accurate Detection of Liquid Level.
Brief description of the drawings
Fig. 1 is a kind of overall structure diagram of liquid level detection system of the present invention;
Fig. 2 is a kind of flow chart of liquid-level detecting method of the present invention;
Fig. 3 is liquid level due in calculated curve figure.
Embodiment
Below in conjunction with accompanying drawing, by describing a preferable specific embodiment in detail, the present invention is further elaborated.
As shown in figure 1, a kind of liquid level detection system, comprising:The photoelectricity acquisition module 1 that is sequentially connected, threshold calculation module 2nd, variance computing module 3, condition judgment module 4 and liquid level moment computing module 5;Described photoelectricity acquisition module 1 is used for light Electric signal is gathered in real time;Described threshold calculation module 2 is used to store high state threshold value, low state threshold value, maximum stable Variance and minimum stable variance;Described variance computing module 3 is used for the variance that real-time opto-electronic value is calculated using mobile variance method; Described condition judgment module 4 is used to judge photoelectricity value status;Described liquid level moment computing module 5 is to be measured for obtaining At the time of liquid drops to photoelectricity acquisition module.
As shown in Fig. 2 in order to preferably describe systematic difference, the invention also discloses a kind of liquid-level detecting method, uses At the time of detection testing liquid passes through photoelectricity acquisition module 1 in liquid level detection system, comprise the steps of:
S1, the initialization liquid level detection system;
S1.1, photoelectricity acquisition module 1 obtain actual high state photoelectricity value and actual low state photoelectricity value, wherein actual high shape The photoelectricity value that state photoelectricity value measures when being and blocking photoelectricity acquisition module 1 without testing liquid, actual low state photoelectricity value is prepare liquid The photoelectricity value measured during body fully shading light electricity acquisition module 1;
S1.2, threshold calculation module 2 calculate high state threshold according to actual high state photoelectricity value and actual low state photoelectricity value Value, low state threshold value, maximum stable variance and minimum stablize variance, and high state threshold value (minSyHigh) takes 2/3 times in the present invention ActSyHigh and 1/3 times of actSyLow sum, low state threshold value (maxSyLow) take 1/3 times actSyHigh and 2/3 times ActSyLow sums, maximum stable variance (maxSeStable) take in certain sample interval photoelectricity value by actual low state photoelectricity It is worth (actSyLow) mutation to the calculating variance of actual high state photoelectricity value (actSyHigh)/7, the stable variance of minimum (minSeStable) certain decay can be carried out by maximum stable variance (maxSeStable) to obtain, the present invention takes MaxSeStable/16 is as the minimum stable variance of system, i.e., more than high state threshold value, then the photoelectricity value is in high shape to photoelectricity value State, photoelectricity value be less than low state threshold value then the photoelectricity value is in low state, be therebetween dynamic process, high state with it is low State is also known as stable state;
S2, photoelectricity acquisition module 1 monitor photoelectricity value changes in real time, obtain real-time opto-electronic value, specifically (are directly deposited using DMA Storage accesses) interrupt method acquisition photoelectricity value;
S3, condition judgment module 4 judge whether real-time opto-electronic value is in high state;
S3.1, variance computing module calculate the variance of real-time opto-electronic value using preset algorithm, and wherein preset algorithm is movement Variance method;
S3.2, condition judgment module judge whether the variance of real-time opto-electronic value is more than maximum stable variance;
If so, then real-time opto-electronic value enters dynamic process, step S2-S3 is repeated;
If it is not, then perform step S3.3;
S3.3, condition judgment module judge whether the variance of real-time opto-electronic value is less than minimum stable variance;
If it is not, then real-time opto-electronic value maintains dynamic process, step S2-S3 is repeated;
If so, then real-time opto-electronic value enters stable state, step S3.4 is performed;
S3.4, condition judgment module judge whether real-time opto-electronic value is less than low state threshold value;
If so, then real-time opto-electronic value enters low state, step S2-S3 is repeated;
If it is not, then perform step S3.5;
S3.5, condition judgment module judge whether real-time opto-electronic value is more than high state threshold value;
If it is not, then real-time opto-electronic value maintains dynamic process, step S2-S3 is repeated;
If so, then perform step S4;
S4, liquid level moment computing module 5 obtain the liquid level moment using default processing strategy, avoid photoelectricity value height and change Influenceed caused by judging liquid level, liquid level moment computing module draws the curve map of real-time opto-electronic value, and the curve map is with the time For abscissa, photosignal value is ordinate;
Presetting processing strategy is
S4.1, liquid level moment computing module are fitted straight line by initial data of the data of curve where dynamic process;
S4.2, fitting a straight line intersect with the horizontal line corresponding to actual low state photoelectricity value, corresponding to intersection point during abscissa Between point be liquid level to be measured at the time of pass through photoelectricity acquisition module.
Specifically, mobile variance method is to be located at moment tk=k Δ t, corresponding to obtained photoelectricity value isUsing the moment as Center, it is rightAnd its data set of front and rear each m data compositionCarry out statistical analysis, Average value isVariance isWherein Δ t is dynamic window, is Dynamic sampling section, photoelectricity value variance is calculated in section, and the window elapses forward over time.
As shown in figure 3, with 0.024S × 10 in liquid level due in calculated curve figure4For abscissa, ordinate is collection The photosignal arrived, it is fitted straight line by initial data of the data between A, B at 2 points, does extended line and actual low state light Horizontal line where electric value intersects, and the abscissa corresponding to intersection point N is liquid level due in.
Although present disclosure is discussed in detail by above preferred embodiment, but it should be appreciated that above-mentioned Description is not considered as limitation of the present invention.After those skilled in the art have read the above, for the present invention's A variety of modifications and substitutions all will be apparent.Therefore, protection scope of the present invention should be limited to the appended claims.

Claims (2)

1. a kind of liquid-level detecting method, at the time of passing through photoelectricity acquisition module for detecting testing liquid in liquid level detection system, Characterized in that, comprise the steps of:
S1, the initialization liquid level detection system;
S2, photoelectricity acquisition module monitor photoelectricity value changes in real time, obtain real-time opto-electronic value;
S3, condition judgment module judge whether real-time opto-electronic value is in high state;
If it is not, then repeat step S2-S3;
If so, then perform step S4;
S4, liquid level moment computing module obtain the liquid level moment using default processing strategy;
Described step S1 is included:
S1.1, photoelectricity acquisition module obtain actual high state photoelectricity value and actual low state photoelectricity value;
S1.2, threshold calculation module calculate high state threshold value, low according to actual high state photoelectricity value and actual low state photoelectricity value State threshold, maximum stable variance and minimum stable variance;
The actual high state photoelectricity value that photoelectricity acquisition module obtains in described step S1.1 is adopted to block photoelectricity without testing liquid Collect the photoelectricity value measured during module, the actual low state photoelectricity value that photoelectricity acquisition module obtains is testing liquid fully shading light electricity The photoelectricity value measured during acquisition module;
Described step S3 is specifically included:
S3.1, variance computing module calculate the variance of real-time opto-electronic value using preset algorithm;
S3.2, condition judgment module judge whether the variance of real-time opto-electronic value is more than maximum stable variance;
If so, then real-time opto-electronic value enters dynamic process, step S2-S3 is repeated;
If it is not, then perform step S3.3;
S3.3, condition judgment module judge whether the variance of real-time opto-electronic value is less than minimum stable variance;
If it is not, then real-time opto-electronic value maintains dynamic process, step S2-S3 is repeated;
If so, then real-time opto-electronic value enters stable state, step S3.4 is performed;
S3.4, condition judgment module judge whether real-time opto-electronic value is less than low state threshold value;
If so, then real-time opto-electronic value enters low state, step S2-S3 is repeated;
If it is not, then perform step S3.5;
S3.5, condition judgment module judge whether real-time opto-electronic value is more than high state threshold value;
If it is not, then real-time opto-electronic value maintains dynamic process, step S2-S3 is repeated;
If so, then perform step S4;
Described step S4 also draws the curve map of real-time opto-electronic value comprising liquid level moment computing module, and the curve map is with the time For abscissa, photosignal value is ordinate;
Described step S4 is specially:
S4.1, liquid level moment computing module are fitted straight line by initial data of the data of curve where dynamic process;
S4.2, fitting a straight line intersect with the horizontal line corresponding to actual low state photoelectricity value, abscissa time point corresponding to intersection point At the time of liquid level as to be measured passes through photoelectricity acquisition module.
2. liquid-level detecting method as claimed in claim 1, it is characterised in that preset algorithm is movement in described step S3.1 Variance method.
CN201410823709.1A 2014-12-26 2014-12-26 A kind of liquid level detection system and liquid-level detecting method Active CN104457911B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410823709.1A CN104457911B (en) 2014-12-26 2014-12-26 A kind of liquid level detection system and liquid-level detecting method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410823709.1A CN104457911B (en) 2014-12-26 2014-12-26 A kind of liquid level detection system and liquid-level detecting method

Publications (2)

Publication Number Publication Date
CN104457911A CN104457911A (en) 2015-03-25
CN104457911B true CN104457911B (en) 2018-01-02

Family

ID=52904335

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410823709.1A Active CN104457911B (en) 2014-12-26 2014-12-26 A kind of liquid level detection system and liquid-level detecting method

Country Status (1)

Country Link
CN (1) CN104457911B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104697607A (en) * 2015-02-06 2015-06-10 太仓天衡电子科技有限公司 Non-contact type digital liquid level detection instrument and working method thereof
TWI590196B (en) * 2016-06-06 2017-07-01 財團法人成大水利海洋研究發展文教基金會 Method for detecting of liquid
CN112161681A (en) * 2020-11-16 2021-01-01 山东秉恬信息科技有限公司 Dynamic metering method of ultrasonic metering instrument
CN115326165B (en) * 2022-10-12 2023-01-24 山东特联信息科技有限公司 Tank car remote monitoring system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101241021A (en) * 2008-03-21 2008-08-13 中国石化扬子石油化工有限公司 Horizontal type agitated bed reactor material volume detection method
CN101614554A (en) * 2009-07-08 2009-12-30 保定市三川电气有限责任公司 Continuous physical measuring device and method
CN103676988A (en) * 2013-12-27 2014-03-26 深圳市得汛科技有限公司 Water level detection control circuit applied to draining pump and working method thereof
TW201430319A (en) * 2013-01-16 2014-08-01 Finetek Co Ltd Self calibration method for photoelectric liquid level switch and device thereof

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3228852B2 (en) * 1995-08-11 2001-11-12 アルプス電気株式会社 Liquid level detector

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101241021A (en) * 2008-03-21 2008-08-13 中国石化扬子石油化工有限公司 Horizontal type agitated bed reactor material volume detection method
CN101614554A (en) * 2009-07-08 2009-12-30 保定市三川电气有限责任公司 Continuous physical measuring device and method
TW201430319A (en) * 2013-01-16 2014-08-01 Finetek Co Ltd Self calibration method for photoelectric liquid level switch and device thereof
CN103676988A (en) * 2013-12-27 2014-03-26 深圳市得汛科技有限公司 Water level detection control circuit applied to draining pump and working method thereof

Also Published As

Publication number Publication date
CN104457911A (en) 2015-03-25

Similar Documents

Publication Publication Date Title
CN104457911B (en) A kind of liquid level detection system and liquid-level detecting method
CN202916242U (en) Flow pattern online monitoring device for gas-liquid two-phase flow
CN203949857U (en) Hand-held colloidal gold strip card reader
CN104422406A (en) Planeness measurement system and method
CN102680481B (en) Detection method for cotton fiber impurities
CN102635056A (en) Measuring method for construction depth of asphalt road surface
CN102621154B (en) Method and device for automatically detecting cloth defects on line based on improved differential box multi-fractal algorithm
CN109754406A (en) Lithium battery pole slice burr detection device and method based on two-dimensional silhouette instrument
CN104483243A (en) Adhered-rice detection and segmentation method, device and system
CN112014413A (en) Mobile phone glass cover plate window area defect detection method based on machine vision
CN102937412B (en) Foreign matter blocking detection and intelligent alarm method for camera devices
CN104515473A (en) Online diameter detection method of varnished wires
CN112330675B (en) Traffic road image atmospheric visibility detection method based on AOD-Net
CN107818556A (en) Bad the line Autonomous test and self-repair method of capacitance type fingerprint acquisition system
CN104123728A (en) Hough transform based round pipe detection method
CN113446932A (en) Non-contact crack measuring method and system
CN103063674A (en) Detection method for copper grade of copper block, and detection system thereof
CN102980536B (en) Brake block steel back flatness detection system and method
CN107607548A (en) The hidden method for splitting defect of photovoltaic module is detected by 3-D view
CN115526878B (en) Coal flow detection method and device for belt conveyor
CN106706559B (en) Measurement method, system and the server of fallen leaves moisture content
CN106500577A (en) A kind of clinac vane grating method for detecting position
CN207114374U (en) A kind of Hydrophobicity of Composite Insulator level images detection image detection device
CN112699824B (en) Method and device for detecting constant of electric energy meter and storage medium
Yu et al. Surface defect detection of hight-speed railway hub based on improved YOLOv3 algorithm

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant