CN105043431A - Method for improving stability and precision of sensor - Google Patents
Method for improving stability and precision of sensor Download PDFInfo
- Publication number
- CN105043431A CN105043431A CN201510501186.3A CN201510501186A CN105043431A CN 105043431 A CN105043431 A CN 105043431A CN 201510501186 A CN201510501186 A CN 201510501186A CN 105043431 A CN105043431 A CN 105043431A
- Authority
- CN
- China
- Prior art keywords
- threshold value
- current intensity
- output state
- sensor
- precision
- 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.)
- Granted
Links
Abstract
The invention provides a method for improving stability and precision of a sensor. The method comprises: after setting of a sensor is completed, a target threshold value, an upper threshold value, and a lower threshold value are obtained; an initial strength is obtained and is compared with the target threshold value; according to the comparison result, a corresponding step is executed; on the basis of the comparison result, the current strength and the upper threshold value are compared or the current strength and the lower threshold value are compared; and a state is outputted based on the comparison result and execution is repeated. Therefore, on the premise that stable detection is guaranteed, the guard band width or stress difference range compressed substantially; and thus the detection stability and precision are improved simultaneously.
Description
Technical field
The present invention relates to detection field, especially about a kind of method improving sensor stability and precision.
Background technology
In the occasion that a lot of application sensors detects, be utilize the intensity of signal to carry out to detect, its ultimate principle is: before work, first sets sensor, obtains the threshold value that sensor is used for comparing judgement.After normal work, sensor compares to come judgment object state according to the signal intensity received and threshold value.
Such as, the capsule count on sensor pipeline is utilized.When the surveyed area of sensor does not have capsule to enter, the signal intensity that sensor receives is 100 digital quantities; When capsule enters surveyed area, the signal intensity that sensor receives is increased to 500 digital quantities from 100 gradually.Now, the threshold value of sensor is set to 300 digital quantities, just can realizes stable detection, if namely sensor receives signal intensity and is less than 300 digital quantities, sensor is just judged to be do not have capsule, does not now count; If the signal intensity that sensor receives is greater than 300 digital quantities, be then judged to be capsule, start counting simultaneously.
But, in practical operation, signal invariably accompany noise occur.The appearance of noise significantly increases the difficulty of detection, especially in the application scenario needing high measurement accuracy.When object very thin or very thin time such as 5mm tinsel, its change in signal strength caused by surveyed area of coming in and going out is very little, now how can extract signal from faint change in signal strength, and can steady operation be the problem needing to solve always.
Existing solution detects the method for weak signal strength change except adopt the hardware design such as filtering noise reduction on circuit except, and one of common control program treating method is: first average to counting of sampling, then the mean value obtained and threshold value are made comparisons.The sampling number of averaging is more, and working sensor is more stable, but the time expended is longer, and the method is not suitable for both needing stablizing, high precision, needs again the occasion of response fast.Another kind of control program treating method is: set one and should differ from scope or boundary belt, be equivalent to additionally reset a threshold value, utilize dual threshold to slacken the impact of noise, but this is what to sacrifice certain accuracy of detection be cost.That is, boundary belt is wider, detects more stable; But the accuracy of detection that can reach is lower.
Summary of the invention
For guaranteeing that sensor is quick, stable, sensitive work, provides a kind of method improving sensor stability and precision.
Another goal of the invention of the present invention is: the precision improving stability and the detection detected.
In order to reach foregoing invention object, technical scheme provided by the invention is as follows: a kind of method improving sensor stability and precision, and its step comprises:
The first step: after sensor settings completes, obtains targets threshold, upper threshold value, lower threshold value;
Second step: obtain initial strength, and it is compared size with targets threshold; According to this comparative result, when initial strength is less than targets threshold, perform the 3rd step; When initial strength is not less than targets threshold, perform the 4th step;
3rd step: the size comparing current intensity and upper threshold value; According to this comparative result, when current intensity is less than upper threshold value, output state keeps and returns the size that the 3rd step compares next current intensity and upper threshold value; When current intensity is not less than upper threshold value, after output state flip, perform the 5th step;
4th step: the size comparing current intensity and lower threshold value; According to comparative result, when current intensity is greater than lower threshold value, output state keeps and returns the size that the 4th step compares next current intensity and lower threshold value; When current intensity is not more than lower threshold value, after output state flip, perform the 6th step;
5th step: the size comparing current intensity and lower threshold value; According to comparative result, when current intensity is greater than lower threshold value, output state keeps and returns the size that the 5th step compares next current intensity and lower threshold value; When current intensity is not more than lower threshold value, returns the 3rd step after output state flip and repeat;
6th step: the size comparing current intensity and upper threshold value; According to comparative result, when current intensity is less than upper threshold value, output state keeps and returns the size that the 6th step compares next current intensity and upper threshold value; When current intensity is not less than upper threshold value, returns the 4th step after output state flip and repeat.
Wherein, preferred implementation is: upper and lower threshold value is obtained by algorithm.
Wherein, preferred implementation is: output state flip is the upset relative to previous state.
Wherein, preferred implementation is: said method can be applicable in the sensor of the Strength Changes work utilizing signal.
A kind of method improving sensor stability and precision of the present invention has the following advantages and good effect compared to prior art: first, and realize simple, program itself has extremely strong stability; Secondly, operation time is short, ensure that the corresponding time of high-speed applications greatly; Finally, under the prerequisite ensureing stable detection, have compressed boundary belt width greatly and maybe should differ from scope, thus improve simultaneously and detect stability and precision.
Accompanying drawing explanation
Fig. 1 is the Method And Principle figure of raising sensor stability of the present invention and precision.
Fig. 2 is the method flow diagram of raising sensor stability of the present invention and precision.
Embodiment
For making there is further understanding to object of the present invention, structural attitude and function thereof, accompanying drawing is coordinated to be described in detail as follows.Should be appreciated that the specific embodiment described by this part only in order to explain the present invention, can be not intended to limit the present invention.
Please refer to Fig. 1, Fig. 1 is the Method And Principle figure of raising sensor stability of the present invention and precision.Wherein, after sensor settings, just can obtain targets threshold t
0.Obtain targets threshold t
0after, according to algorithm at targets threshold t
0the aim parameter that upwards translation is certain obtains upper threshold value t
1, the certain aim parameter of downward translation obtains lower threshold value t
2.
The stability of raising sensor of the present invention and the method step of precision are:
S10: obtain targets threshold t
0, upper threshold value t
1, lower threshold value t
2;
S20: compare initial strength R
0with targets threshold t
0size.Wherein, initial strength R
0be less than targets threshold t
0time, jump to S30 step and perform; Initial strength R
0be not less than targets threshold t
0time, jump to S35 step and perform;
S30: compare the first current intensity R
1with upper threshold value t
1size.Wherein, the first current intensity R
1be less than upper threshold value t
1time, output state keeps and repeats S30 step; First current intensity R
1be not less than upper threshold value t
1time, perform S40;
S40: perform S50 after the output state flip of sensor; This state turnover is for previous state, such as initial strength R
0be less than targets threshold t
0in time, exports without control signal, so then exports control signal after state turnover;
S50: compare the second current intensity R
2with lower threshold value t
2size.Wherein, the second current intensity R
2be greater than lower threshold value t
2time, output state keeps and repeats S50 step; Second current intensity R
2be not more than lower threshold value t
2time, perform S60 step;
S60: return after the output state flip of sensor and perform S30; This state turnover is for previous state;
S35: compare the 3rd current intensity R
3with lower threshold value t
2size.Wherein, the 3rd current intensity R
3be greater than lower threshold value t
2time, output state keeps and repeats S35 step; 3rd current intensity R
3be not more than lower threshold value t
2time, perform S45 step;
S45: perform S55 after the output state flip of sensor; This state turnover is for previous state, such as initial strength R
0be not less than targets threshold t
0time have control signal to export, so then export without control signal after state turnover;
S55: compare the 4th current intensity R
4with upper threshold value t
1size.Wherein, the 4th current intensity R
4be less than upper threshold value t
1time, output state keeps and repeats S55 step; 4th current intensity R
4be not less than upper threshold value t
1time, perform S65;
S65: return after the output state flip of sensor and perform S35; This state turnover is for previous state.
Said method is mainly used in the sensor of the Strength Changes work utilizing signal.
A kind of method improving sensor stability and precision of the present invention has the following advantages and good effect compared to prior art: first, and realize simple, program itself has extremely strong stability; Secondly, operation time is short, ensure that the corresponding time of high-speed applications greatly; Finally, under the prerequisite ensureing stable detection, have compressed boundary belt width greatly and maybe should differ from scope, thus improve simultaneously and detect stability and precision.
The above, be only preferred embodiment, and not for limiting the scope of the invention, all equivalences done according to the present patent application the scope of the claims change or modify, and are all the present invention and contain.
Claims (4)
1. improve a method for sensor stability and precision, its step comprises:
The first step: after sensor settings completes, obtains targets threshold, upper threshold value, lower threshold value;
Second step: obtain initial strength, and it is compared size with targets threshold; According to this comparative result, when initial strength is less than targets threshold, perform the 3rd step; When initial strength is not less than targets threshold, perform the 4th step;
3rd step: the size comparing current intensity and upper threshold value; According to this comparative result, when current intensity is less than upper threshold value, output state keeps and returns the size that the 3rd step compares next current intensity and upper threshold value; When current intensity is not less than upper threshold value, after output state flip, perform the 5th step;
4th step: the size comparing current intensity and lower threshold value; According to comparative result, when current intensity is greater than lower threshold value, output state keeps and returns the size that the 4th step compares next current intensity and lower threshold value; When current intensity is not more than lower threshold value, after output state flip, perform the 6th step;
5th step: the size comparing current intensity and lower threshold value; According to comparative result, when current intensity is greater than lower threshold value, output state keeps and returns the size that the 5th step compares next current intensity and lower threshold value; When current intensity is not more than lower threshold value, returns the 3rd step after output state flip and repeat;
6th step: the size comparing current intensity and upper threshold value; According to comparative result, when current intensity is less than upper threshold value, output state keeps and returns the size that the 6th step compares next current intensity and upper threshold value; When current intensity is not less than upper threshold value, returns the 4th step after output state flip and repeat.
2. a kind of method improving sensor stability and precision as claimed in claim 1, is characterized in that: upper and lower threshold value is obtained by algorithm.
3. a kind of method improving sensor stability and precision as claimed in claim 1, is characterized in that: output state flip is the upset relative to previous state.
4. a kind of method improving sensor stability and precision as described in claim 1,2 or 3, is characterized in that: said method can be applicable to utilize in the sensor of the Strength Changes work of signal.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510501186.3A CN105043431B (en) | 2015-08-14 | 2015-08-14 | A method of improving sensor stability and precision |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510501186.3A CN105043431B (en) | 2015-08-14 | 2015-08-14 | A method of improving sensor stability and precision |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105043431A true CN105043431A (en) | 2015-11-11 |
CN105043431B CN105043431B (en) | 2018-08-24 |
Family
ID=54450161
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510501186.3A Active CN105043431B (en) | 2015-08-14 | 2015-08-14 | A method of improving sensor stability and precision |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105043431B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010071878A (en) * | 2008-09-19 | 2010-04-02 | Sharp Corp | Sensitivity adjustment method, polarization measurement method, and polarization measuring instrument |
CN102270427A (en) * | 2010-06-04 | 2011-12-07 | 英华达(上海)电子有限公司 | Method and apparatus for enhancing reading effect of electronic book and electronic terminal capable of reading electronic book |
US20120218568A1 (en) * | 2011-02-24 | 2012-08-30 | Ricoh Company, Ltd. | Image forming apparatus, pattern position determining method, and image forming system |
CN103402001A (en) * | 2013-07-18 | 2013-11-20 | 沈阳华立德电子科技有限公司 | Antitheft mobile phone based on optical sensor and antitheft method thereof |
-
2015
- 2015-08-14 CN CN201510501186.3A patent/CN105043431B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010071878A (en) * | 2008-09-19 | 2010-04-02 | Sharp Corp | Sensitivity adjustment method, polarization measurement method, and polarization measuring instrument |
CN102270427A (en) * | 2010-06-04 | 2011-12-07 | 英华达(上海)电子有限公司 | Method and apparatus for enhancing reading effect of electronic book and electronic terminal capable of reading electronic book |
US20120218568A1 (en) * | 2011-02-24 | 2012-08-30 | Ricoh Company, Ltd. | Image forming apparatus, pattern position determining method, and image forming system |
CN103402001A (en) * | 2013-07-18 | 2013-11-20 | 沈阳华立德电子科技有限公司 | Antitheft mobile phone based on optical sensor and antitheft method thereof |
Also Published As
Publication number | Publication date |
---|---|
CN105043431B (en) | 2018-08-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9760223B2 (en) | Input device | |
CN105659197B (en) | A kind of disturbance restraining method of touch screen, device and terminal device | |
US8487907B2 (en) | Front-end signal detector and method for improving noise immunity of a capacitive touch sensor | |
US9182862B2 (en) | High noise immunity sensing methods and apparatus for a capacitive touch device | |
RU2017140024A (en) | METHOD AND DEVICE FOR GEST RECOGNITION | |
EP3197053A3 (en) | Proximity switch | |
EP2752750A3 (en) | Mobile terminal and controlling method thereof | |
CN106464754A (en) | Method, apparatus and device for correcting detection distance | |
CN107678010B (en) | Multi-order Gao Tongrong resistance moment identification circuit of pulse laser radar | |
JP2013220006A5 (en) | ||
KR101395330B1 (en) | Single photon detector, photon number resolving detector and detecting method thereof | |
CN107422193A (en) | A kind of circuit and method for measuring single-particle inversion transient pulse length | |
CN105043431A (en) | Method for improving stability and precision of sensor | |
CN105548641A (en) | Waveform triggering device and method and oscilloscope for waveform triggering | |
CN103793287B (en) | Method and system for capturing analog signal cycles | |
CN104199581B (en) | One kind is based on big CTP, little CTPCapacitive detection circuit and capacitance detecting device | |
TW201628310A (en) | Signal analysis method and circuit | |
CN106293023B (en) | Attitude determination method and equipment | |
CN202093098U (en) | Signal detection circuit | |
CN107505498B (en) | Peak and valley value detection circuit | |
CN103257773A (en) | Face approaching action recognition method based on capacitive touch screen | |
CN102288835A (en) | Signal detection circuit and method | |
CN102087312A (en) | Automatically controlled peak detector for signal | |
CN102004590B (en) | Front-end signal detector and method for improving noise resistance of capacitance type touch pad | |
US9823149B2 (en) | Slew rate detection circuit |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP03 | Change of name, title or address | ||
CP03 | Change of name, title or address |
Address after: 518000 No. 35, Cuijing Road, Pingshan New District, Shenzhen, Guangdong Patentee after: Ona Technology (Shenzhen) Group Co.,Ltd. Address before: 518118 No. 35, Cuijing Road, Pingshan New District, Shenzhen, Guangdong Patentee before: O-NET COMMUNICATIONS (SHENZHEN) Ltd. |