METHOD FOR DETECTING GAS CONCENTRATION IN GLASS BOTTLE WITH DYNAMICAL THRESHOLD ADJUSTMENT

20220107264 · 2022-04-07

Assignee

Inventors

Cpc classification

International classification

Abstract

A method for detecting gas concentration in a glass bottle: firstly, second harmonic peaks P.sub.0, P.sub.a, P.sub.X of the glass bottle are obtained under the same detection environment 0%, an acceptable concentration threshold a % and a reference concentration auxiliary threshold X %; then absolute values of the differences between P.sub.0 and P.sub.a, as well as between P.sub.0 and P.sub.X, so as to obtain D.sub.a, D.sub.x, and to write P.sub.0 into a queue with a length of M; next, quality inspection is performed on each glass bottle to be detected by: collecting the second harmonic peak P.sub.N of the glass bottle and determining if P.sub.N≤P.sub.a is true; wherein if true, it is determined whether P.sub.N≤P.sub.X is true, and, if true, the second harmonic peak of the medicinal bottle is written into the queue, the queue is averaged to obtain P.sub.L, update is performed P.sub.a=P.sub.L+D.sub.a, P.sub.X=P.sub.L+D.sub.xP.sub.a=P.sub.L+D.sub.a, P.sub.X+P.sub.L+D.sub.a, which is used for the detection of the next medicine bottle after updating.

Claims

1. A method for detecting gas concentration in a glass bottle with dynamical threshold adjustment, comprising: Step 1: an acceptable concentration threshold a % and a reference concentration auxiliary threshold X % of a target gas in a glass bottle are acquired, and by using the wavelength modulation spectroscopy (WMS) detection method in the current environment, second harmonic peaks P.sub.0, P.sub.a, P.sub.X in the glass bottle are respectively acquired under the concentrations of 0%, a %, X %, wherein 0%<X %<a %; Step 2: an absolute value is calculated for the different between the second harmonic peaks P.sub.0 and P.sub.a to get D.sub.a, and an absolute value is calculated for the different between the second harmonic peaks P.sub.0 and P.sub.X to get D.sub.x; Step 3: quality inspection is performed for the glass bottle to be detected on the basis of the difference D.sub.a and D.sub.x in Step 2 as follows: Step 31: the second harmonic peaks are collected for the glass bottle to be detected in order to determine whether the peaks are less than or equal to the second harmonic peak P.sub.a under the acceptable concentration threshold a %, and, if so, the glass bottle to be detected is an acceptable medicinal bottle and the process proceeds to Step S32, otherwise the glass bottle is unacceptable and the detection is performed on the next glass bottle to be detected; Step 32: it is determined whether the second harmonic peaks of the glass bottle to be detected are less than or equal to the second harmonic peak P.sub.X under the reference concentration auxiliary threshold X %, and, if so, the second harmonic peaks of the glass bottle to be detected are sequentially added into a queue L; Wherein the queue L has a length of M, and the first element in the initial queue L is equal to the second harmonic peak P.sub.0 while the rest elements are null; and for adding new elements, old elements are sequentially discarded; Step 33: a mean P.sub.L of elements in the current queue L is calculated, and the second harmonic peak P.sub.a under the acceptable concentration threshold a % is updated with the sum of the mean P.sub.L and the difference D.sub.a, and the second harmonic peak P.sub.X under the reference concentration auxiliary threshold X % is updated with the sum of the mean P.sub.L and the difference D.sup.x, wherein the updated data is used to detect the next glass bottle to be detected following Steps S31-S33.

2. The method according to claim 1, wherein: the acceptable concentration threshold a % is 5%, and the reference concentration auxiliary threshold X % is 1%.

3. The method according to claim 1, wherein: the length M of the queue L is determined according to a moving speed of a glass bottle to be detected in the production line, and the faster the speed is, the greater the length M will be.

4. The method according to claim 3, wherein: when the moving speed is 200-600 bottles/min, the value range of the length M is [15,35].

5. The method according to claim 1, wherein: during the updating of elements in the queue L, old elements are discarded by a first-in-first-out rule.

6. The method according to claim 1, wherein: the target gas is oxygen, and the glass bottle is a medicinal glass bottle.

Description

BRIEF DESCRIPTION OF THE DRAWINGS

[0024] FIG. 1 is a schematic flowchart of a method for detecting gas concentration in a glass bottle with dynamical threshold adjustment provided by embodiments in the present disclosure;

[0025] FIG. 2 is a data comparison diagram between the embodiment 1 of the present disclosure and the algorithm in the prior art;

[0026] FIG. 3 is a data schematic view of the algorithm in the prior art according to the present disclosure;

[0027] FIG. 4 is a data schematic view of the embodiment 2 of the present disclosure.

DETAILED DESCRIPTION OF THE EMBODIMENTS

[0028] The present disclosure will be further described with reference to embodiments below.

[0029] The present disclosure provides a method for detecting gas concentration in a glass bottle with dynamical threshold adjustment is used for the target gas concentration detection in the glass bottle, wherein the glass bottle is deemed unacceptable when the target gas concentration in the glass bottle exceeds a set standard, it is regarded as unqualified glass bottle, and particularly the second harmonic peak is used as a comparative feature to identify whether the glass bottle is acceptable or not. The present disclosure is mainly used for detecting the medicinal glass bottle with oxygen being the target gas. In the detection disclosed in the present disclosure, by averaging the second harmonic peaks in the second harmonic peak range which are filtered in real time in adjacent times and meet the reference concentration auxiliary threshold X %, a dynamic second harmonic peak P.sub.L of the reference concentration is obtained, which is associated with current environment so as to replace the function of traditional on-line detection of 0% standard sample bottles in the production line. In addition, the second harmonic peak P.sub.a of the acceptable concentration threshold a % and the second harmonic peak P.sub.X of the reference concentration auxiliary threshold X % are dynamically updated by using the second harmonic peak P.sub.L of the reference concentration value. Compared with the second harmonic peak P.sub.a of a fixed acceptable concentration threshold a % in the traditional detection method, the second harmonic peak P.sub.a of the acceptable concentration threshold a % in the method provided in the present disclosure dynamically varies with the fluctuation of current environmental interference. When the second harmonic peak is used to detect the quality of the current glass bottle in real time, the environmental interference between two peaks may be offset so as to achieve a better match between the detected result and the real result. In the same way, the second harmonic peak P.sub.X of the reference concentration auxiliary threshold X % also dynamically varies with the fluctuation of current environmental interference. Therefore, the queue updated by the second harmonic peak is more consistent with the current environment, and finally the reliability of the second harmonic peak P.sub.L of reference concentration is improved, thus forming a dynamically changing determination criterion consistent with the current environment.

[0030] As shown in FIG. 1, the embodiment in the present disclosure provides a method for detecting gas concentration in a glass bottle with dynamical threshold adjustment, which mainly applies to the detection in the medicinal glass bottle with oxygen being the target gas, including:

[0031] Step 1: an acceptable concentration threshold a % and a reference concentration auxiliary threshold X % of a remaining oxygen amount in a medicinal glass bottle are acquired, and by using the wavelength modulation spectroscopy (WMS) detection method in the same environment, second harmonic peaks P.sub.0, P.sub.a, P.sub.X in the medicinal glass bottle are respectively acquired under the concentrations of 0%, a %, X %, wherein 0%<X %<a %. In the present disclosure, the acceptable concentration threshold a %=5% and the reference concentration auxiliary threshold X %=1% are preferred, and in other feasible embodiments, the acceptable concentration threshold a % and the reference concentration auxiliary threshold X % are set according to requirements of actual production and detection. It is to be noted that the medicinal glass bottle in this embodiment is sealed and measured in the air.

[0032] Step 2: an absolute value is calculated for the different between the second harmonic peaks P.sub.0 and P.sub.a to get D.sub.a, and an absolute value is calculated for the different between the second harmonic peaks P.sub.0 and P.sub.X to get D.sub.x. D.sub.a=P.sub.a−P.sub.O, D.sub.x=P.sub.X−P.sub.0, wherein in any background or environment, the differences D.sub.a and D.sub.x both keep unchanged as the real-time environmental change and the influence of air have been deducted from the difference equation.

[0033] Step 3: quality inspection is performed for the medicinal glass bottle to be detected in the production line on the basis of the differences D.sub.a and D.sub.x in Step 2, wherein the following steps are repeated for an individual medicinal glass bottle in the production line:

[0034] Step 31: the second harmonic peaks P.sub.N are collected for the medicinal glass bottle to be detected in order to determine whether the peaks are less than or equal to the second harmonic peak P.sub.a under the acceptable concentration threshold a % (it is determined that P.sub.N≤P.sub.a?); and, if so, the medicinal glass bottle to be detected is an acceptable medicinal bottle and the process proceeds to Step S32, otherwise the glass bottle is unacceptable and the detection is performed on the next medicinal glass bottle to be detected;

[0035] Step 32: it is determined whether the second harmonic peaks of the medicinal glass bottle to be detected are less than or equal to the second harmonic peak P.sub.X under the reference concentration auxiliary threshold X % (it is determined that P.sub.N≤P.sub.X?); and, if so, the second harmonic peaks of the medicinal glass bottle to be detected are sequentially added into a queue L;

[0036] Wherein the queue L has a length of M, and the first element in the initial queue L is equal to the second harmonic peak P.sub.0 while the rest elements are null; for adding new elements, old elements are sequentially discarded, that is, the element that enters the queue first is arranged at the head of the queue, and the rest elements that enter the queue afterward are arranged in sequence; and the queue should meet the first-in-first-out rule, that is, when the queue is full, if there are more elements to join the queue, the element at the head of the queue will overflow automatically.

[0037] Step 33: a mean P.sub.L of elements in the current queue L is calculated, and the second harmonic peak P.sub.a under the acceptable concentration threshold a % is updated with the sum of the mean P.sub.L and the difference D.sub.a (P.sub.a=P.sub.L+D.sub.a), and the second harmonic peak P.sub.XP.sub.X=P.sub.L+D.sub.a under the reference concentration auxiliary threshold X % is updated with the sum of the mean P.sub.L and the difference D.sub.x (P.sub.X=P.sub.L+D.sub.x), wherein the updated data is used to detect the next medicinal glass bottle to be detected following Steps S31-S33.

[0038] In order to verify the reliability of the present disclosure, the acceptable concentration threshold a %=5% and the reference concentration auxiliary threshold X %=1% are selected in Embodiment 1, and the second harmonic peaks of the standard sample bottles of 5% 1% and 0% under laser irradiation are collected, which are: P.sub.5=5, P.sub.1=1, and P.sub.0=0, therefore D.sub.a=P.sub.5−P.sub.0=5, D.sub.x=P.sub.1−P.sub.0=1. In an experimental environment, 100 sealed medicinal glass bottles are successively measured which include 11 standard medicinal glass bottles with an oxygen concentration of 4% and 9 standard medicinal glass bottles with an oxygen concentration of 6%. The measured data is processed by the algorithm in the prior art and the method of this embodiment respectively to obtain the data as shown in FIG. 2.

[0039] For Algorithm 1 in the prior art: regardless of the environmental influence on the second harmonic peaks of the medicinal bottles in the production line, that is, when a=5 is set, a constant invariant P.sub.5=5 is used as the basis that whether the medicinal bottles are acceptable or not, wherein the auxiliary threshold is P.sub.5=5.

[0040] In this embodiment: the method for using the dynamic threshold disclosed in the present disclosure is adopted, wherein the dynamic threshold is dynamically updated P.sub.5.

[0041] As shown in FIG. 2, if the constant invariant P.sub.5=5 in the algorithm in the prior art is used as the basis that whether the medicinal bottles are acceptable or not, the second harmonic peaks corresponding to the 45th and 65th standard medicinal glass bottles with an oxygen concentration of 4% rise due to the environmental interference and are larger than P5=5, resulting in that the 45th and 65th medicinal bottles are misidentified as unacceptable medicinal bottles. The second harmonic peaks corresponding to the 20th and 80th standard medicinal glass bottles with an oxygen concentration of 6% decrease due to the environmental interference and are less than P5=5, resulting in that the 20th and 80th medicinal bottles are misidentified as unacceptable medicinal bottles. After using the method of the embodiment, the dynamic threshold will change with the environment, so that the second harmonic peaks corresponding to the 45th and 65th standard medicinal glass bottles with an oxygen concentration of 4% rise due to the environmental interference but are still less than P5=5, and thus the 45th and 65th medicinal bottles will not be misidentified as unacceptable medicinal bottles. The second harmonic peaks corresponding to the 20th and 80th standard medicinal glass bottles with an oxygen concentration of 6% decrease due to the environmental interference but are still larger than P5=5, and thus the 20th and 80th medicinal bottles will not be misidentified as acceptable medicinal bottles.

Embodiment 2

[0042] In this embodiment, the oxygen concentration threshold of the acceptable medicinal bottles is determined as a %=5% and a threshold is set to X %=1%. In the background of the current environment, the second harmonic peaks of the standard sample bottles of 5%, 1%, and 0% under laser irradiation are collected to obtain corresponding second harmonic peaks P.sub.5=0.99433, P.sub.1=0.99146, and P.sub.0=0.99050. Then, the absolute values are calculate for the differences of two groups of second harmonic peaks between P.sub.0 and P.sub.a, and between P.sub.0 and P.sub.X, so as to obtain Da=0.00383 and DX=0.00096, wherein the length M of the queue L is selected as 15. Then the medicinal glass bottles are detected according to the above steps S31-S33. In an actual production line, 999 sealed medicinal glass bottles are successively measured which include 4 standard medicinal glass bottles with an oxygen concentration of 4% and 3 standard medicinal glass bottles with an oxygen concentration of 6%. The measured data is processed by the algorithm in the prior art and the method of this embodiment respectively to obtain the data as shown in FIG. 3 and FIG. 4.

[0043] For Algorithm 1 in the prior art: regardless of the environmental influence on the second harmonic peaks of the medicinal bottles in the production line, that is, when it is set a=5, an invariant P.sub.5=9433 is used as the basis that whether the medicinal bottles are acceptable or not.

[0044] In this embodiment: the method for using the dynamic threshold disclosed in the present disclosure is adopted, wherein the dynamic threshold is dynamically updated P.sub.5.

[0045] FIG. 3 shows the data obtained by using Algorithm 1 in the prior art, wherein the second harmonic peak P.sub.5=0.99433 is measured for a standard medicinal bottle with an oxygen concentration of 5% in the current environment. After the processing of standard medicinal glass bottles {circle around (1)}{circle around (4)}{circle around (6)}{circle around (7)} and {circle around (2)}{circle around (3)}{circle around (5)} with oxygen concentrations of 4% and 6% by Algorithm 1, the second harmonic peaks P.sub.{circle around (1)}=0.99443, P.sub.{circle around (4)}=0.99441, and P.sub.{circle around (7)}=0.99442, corresponding to the standard medicinal glass bottles {circle around (1)}{circle around (4)}{circle around (7)} with the oxygen concentration of 4% rise due to the environmental interference and P.sub.{circle around (1)}, P.sub.{circle around (4)}, and P.sub.{circle around (7)} are greater than P.sub.5=0.99433, resulting in that the medicinal bottles {circle around (1)}{circle around (4)}{circle around (7)} are misidentified as unacceptable medicinal bottles, while the second harmonic peak P.sub.{circle around (3)}=0.99430 corresponding to the standard medicinal glass bottle {circle around (3)} with the oxygen concentration of 6% decreases due to the environmental interference and P.sub.{circle around (3)}=0.99430<P.sub.5=0.99433. Given the above results, Algorithm 1 in the prior art will lead to false determination of the system, and acceptable medicinal bottles will be misidentified as unaccepted by the system under the environmental interference, and those unaccepted medicinal bottles may also be misidentified as acceptable. As shown in FIG. 4, it is measured in the current environment that the second harmonic peaks of the standard medicinal bottles with oxygen concentrations 5%, 1%, and 0% are P.sub.5=0.99433, P.sub.1=0.99146, and P.sub.0=0.99050. respectively. After the processing of standard medicinal glass bottles {circle around (1)}{circle around (4)}{circle around (6)}{circle around (7)} and {circle around (2)}{circle around (3)}{circle around (5)} with oxygen concentrations of 4% and 6% by using the detection method in this embodiment, the second harmonic peaks P.sub.{circle around (1)}=0.99443, P.sub.{circle around (4)}=0.99441, and P.sub.{circle around (7)}=0.99442 corresponding to the standard medicinal glass bottles {circle around (1)}{circle around (4)}{circle around (7)} with the oxygen concentration of 4% rise due to the environmental interference but P.sub.{circle around (1)}, P.sub.{circle around (4)}, and P.sub.{circle around (7)} are still less than P.sub.5, so that the medicinal bottles {circle around (1)}{circle around (4)}{circle around (7)} will not be misidentified as unacceptable medicinal bottles, while the second harmonic peak P.sub.{circle around (3)}=0.99430 corresponding to the standard medicinal glass bottle {circle around (3)} with the oxygen concentration of 6% decreases due to the environmental interference but P.sub.{circle around (3)}=0.99430>P.sub.5, so that the medicinal bottle {circle around (3)} will not be misidentified as acceptable medicinal bottle.

[0046] It can be seen from the comparison of the above results between Embodiment 1 and Embodiment 2 that the dynamic threshold P.sub.5 of the method provided in the present disclosure changes with the environment, and thus when it is used as the determination criterion, it may instead greatly reduce or eliminate the interference of environmental factors and improve the detection lower limit of residual oxygen within medicinal glass bottles.

[0047] It should be noted that the examples described in the present disclosure are illustrative but not restrictive, so the present disclosure is not limited to the examples described in the specific implementations. Any other implementations obtained by those skilled in the art according to the technical scheme of the present disclosure, no matter modified or replaced, all fall within the protection scope of the present disclosure as long as they do not deviate from the purpose and scope thereof.