Sensor and automatic calibration method applied thereto
11112313 · 2021-09-07
Assignee
Inventors
Cpc classification
G01P21/00
PHYSICS
G06F3/011
PHYSICS
G01J5/0806
PHYSICS
International classification
G01J5/06
PHYSICS
G01N21/27
PHYSICS
G01P21/00
PHYSICS
Abstract
The present invention discloses an automatic calibration method of a sensor, including the following steps of: (A1) setting a default trigger value; (A2) sampling a signal and accumulating a signal value to perform signal judgment; (A3) determining whether a trigger condition is met or not; (A4) if yes, recording an accumulated signal value meeting the trigger condition, and if not, returning to step (A2); and (A5) analyzing and updating the default trigger value.
Claims
1. An automatic calibration method for correcting sensing distance of a sensor, comprising the following steps: (A1) setting a default trigger value, the default trigger value comprising environment factor noise; (A2) sampling a signal and accumulating a signal value to perform signal judgment from a plurality of positions; (A3) determining whether a trigger condition is met or not for every signal value from the plurality of position; (A4) if yes, recording an accumulated signal value meeting the trigger condition, and if not, going back to step (A2); and (A5) analyzing and updating the default trigger value by obtaining an average value and filtering out relatively far deviated distance signal values away from the average value for the plurality of positions, wherein the step (A5) further comprises the following steps: (A5-1) obtaining the average value of the signal recording sensing values meeting the trigger condition; (A5-2) deleting several data farthest away from the average value and obtaining a corresponding new average value from the remaining data repeatedly and continuously until a preset number data of different positions are left for calibrating an updated average value, wherein the remaining data for calculating the corresponding new average value and deleting several data farthest away from the corresponding new average value is gradually reduced in this process; and (A5-3) obtaining the updated average value of the preset number data of different positions for updating the default trigger value.
2. The automatic calibration method according to claim 1, wherein the step (A1) further comprises the following steps: (A1-1) sampling a reference voltage of the sensor, the reference voltage comprising the environment factor noise; (A1-2) setting an initial value of a sensing signal within a certain time Δt according to the reference voltage; and (A1-3) obtaining an initial trigger value according to the reference voltage.
3. The automatic calibration method according to claim 1, wherein if the step (A3) is judged as not, the following step is performed: (A3-1) judging whether a default time is reached or not; and if yes, performing step (A5), and if not, going back to step (A2).
4. A sensor, comprising: a bottom, one side of the bottom being provided with a connection end and a wire inlet connected with the connection end for setting electrical connection with other controlled equipment; a sensing unit, electrically connected with the connection end; a middle cover, arranged on one side of the sensing unit opposite to the bottom; a lens, arranged on one side of the middle cover opposite to the bottom, and covering the sensing unit; a mask, covering the lens and exposing part of the lens; and an outer cover, arranged on one side of the mask opposite to the bottom, wherein the sensing unit is configured to perform the automatic calibration method according to claim 1.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1)
(2)
(3)
(4)
DETAILED DESCRIPTION
(5) A plurality of embodiments of the present invention will be disclosed below through description in connection with the drawings, and for the purpose of clear illustration, many details in practice will be illustrated together in the following narration. However, it is to be understood that, the details in the practice should not be used to limit the present invention. In addition, for the purpose of simplifying the drawings, some conventional known structures and assemblies are drawn out in a simple schematic manner in the drawings.
(6) The present invention is an automatic calibration method of a sensor, and is preferably applied to a human motion sensor, such as a Pyroelectric Infrared Radiation Detector (PIR), but is not limited herein. In other embodiments, the present invention may be also applied to other similar sensors, which shall fall within the scope of the present invention as long as the purpose thereof is to further control equipment through objecting motion detection.
(7) Referring to
(8) Regarding to the automatic calibration method of the present invention, please refer to flow charts of embodiments of
(9) The automatic calibration method preferably includes the following steps: (A1) setting a default trigger value; (A2) sampling a signal and accumulating a signal value to perform signal judgment; (A3) determining whether a trigger condition is met or not; (A4) if yes, recording an accumulated signal value meeting the trigger condition, and if not, going back to step (A2); and (A5) analyzing and updating the default trigger value.
(10) Step (A1) of setting the default trigger value is preferably executed when the sensor 1 is in a warming-up state. Specifically speaking, when the sensor 1 is turned on, that is, after the sensing unit 14 is powered on and stably functions (such as I/O input and output), a step (A1-1) of sampling a reference voltage V1 of the sensing unit is executed. Then a step (A1-2) of setting an initial environment sensing signal value S1 obtained by the sensor in the warming-up state according to the reference voltage V1 and circuit design within a certain time (Δt, this embodiment takes 100-250 ms as an example, but is not limited herein) is executed. Specifically speaking, S.sub.1 can be defined as the following equation: S.sub.1=∫|(V−V1)|dt. Herein, V is a single point voltage obtained from the sensing unit within the time of Δt.
(11) It should be noted that the reference voltage is related to environment factors. It is mainly set for adapting to an operating environment and an installing manner. Thus, its value is varied based on different operating environments and installing manners. The installing manner is roughly divided into an in-wall type, a wall-mount type and a ceiling type, but is not limited herein.
(12) Step (A1-3) of obtaining an initial trigger value S.sub.2 according to the reference voltage V1 is subsequently executed. The equation is shown as follows: S.sub.2=S.sub.1+S.sub.def, wherein S.sub.def is a default trigger experience value. S.sub.def has different experience values according to different equipment. In the warming-up state, a default trigger value S.sub.win=S.sub.2 is defined through the above procedure. In this embodiment, the default trigger value is regarded as the highest sensitivity of the sensor 1.
(13) After warming-up is completed, stages of human motion detection and self-learning start to be executed. Step (A2) of sampling the signal and accumulating the signal value to perform signal judgment is executed. In an embodiment, sampling is performed at set intervals. In an embodiment, n (in an embodiment n=150) points are sampled at the time interval of Δt (such as at the interval of 100-250 ms), an equation is therefore listed as follows: S.sub.t=∫|(V−V1)|dt. Herein, V is a single point voltage obtained from the sensing unit within the time of Δt, as shown in
(14) After signal sampling is completed, step (A3) of determining whether the trigger condition is met or not is executed. If the trigger condition is met, step (A4) of recording the accumulated signal value meeting the trigger condition is carried out: S.sub.t=∫|(V−V1)|dt≥V1.Math.t. As shown in
(15) Specifically speaking, the signal value meeting the trigger condition is recorded as the obtained accumulated signal sensing value. In an embodiment, P positions are sampled in total (for examples, 3 positions, 5 positions and 10 positions are sampled), and the accumulated signal value is S.sub.p=Σ.sub.i=1.sup.PS.sub.t.
(16) According to the above, step (A5) of analyzing and updating the default trigger value is subsequently executed. Specifically speaking, successful triggering is performed for N.sub.1 times (For example, 10 times, but the present invention is not limited thereto) within certain time. Under an actual condition, it is regarded as that the sensor detects an object within a sensing range and be triggered for N.sub.1 times within the certain time.
(17) The detailed process is as follows, step (A5-1) of obtaining an average value of signal recording sensing values is executed. In an embodiment, N.sub.1 times of triggering is performed within T.sub.m1 time, its sum is calculated, the average value is obtained, and herein it is defined as S.sub.N.sub.
(18) Step (A5-2) of deleting several data relatively away from the average value is performed. It is mainly made for analysis and correction with respect to the sensing distance. In an embodiment, K.sub.1 data relatively away from the average value S.sub.avg are deleted from S={S.sub.1, S.sub.2, S.sub.3 . . . , S.sub.N.sub.
(19)
(20) For step (A5-2) of deleting several data relatively away from the average value, reference can be made in combination with
(21) Through the above equation, step (A5-3) of updating the default trigger value is performed. The trigger value after being updated is defined as S.sub.win=S.sub.adj.
(22) It should be noted that in step (A3), if it is judged that the trigger condition is not met, it continues to judge whether triggering is still not occurred continuously when a default time is reached (namely, the step A3-1). If yes, step (A5) is performed; if not, the process is back to the step (A2).
(23) According to another embodiment of the present invention, under the actual condition, a user leaves after installing of the sensor 1 is completed. That is, the sensor 1 cannot meet N.sub.1 times of triggering within above T.sub.m1 time. However, even if the user leaves, the sensor 1 must still keep its functions. Thus, the sensing unit 14 continuously runs at the highest sensitivity and the following procedure is performed.
(24) If it is judged that the trigger condition is met, like the above-mentioned embodiment, step (A5-1) of obtaining the average value of the signal recording sensing values is performed. Due to the fact that triggering times within T.sub.m1 time are less than N.sub.1 times in this situation, N.sub.2 is taken as an example (that is, N.sub.2<N.sub.1) in this embodiment. Thus, the equation is defined as S.sub.N.sub.
(25) Then step (A5-2) of deleting several data relatively away from the average value is then performed. It is made mainly for analysis and correction with respect to the sensing distance. In an embodiment, K.sub.2 data relatively away from the average value S.sub.avg are flited out from S={S.sub.1, S.sub.2, S.sub.3 . . . , S.sub.N.sub.
(26)
(27) For step (A5-2) of deleting several data relatively away from the average value, reference can also be made to
(28) Through the above equations, step (A5-3) of obtaining the average value of the several data for updating the default trigger value is performed. Similarly, the trigger value after being updated is defined as S.sub.win=S.sub.adj.
(29) Compared with the prior art, the automatic calibration method of the sensor of the present invention can enable the sensor to have the self-learning function, self-calibration is continuously performed, such that the time-consuming and complicated manual adjusting operation can be effectively omitted.
REFERENCE NUMERALS
(30) TABLE-US-00001 1 sensor 11 bottom 12 connection end portion 13 wire inlet 14 sensing unit 15 middle cover 16 lens 17 mask 18 outer cover