Method for detecting gas concentration in glass bottle with dynamical threshold adjustment

11781974 · 2023-10-10

Assignee

Inventors

Cpc classification

International classification

Abstract

A method for detecting gas concentration in a glass bottle with dynamical threshold adjustment is provided includes acquiring second harmonic peaks P.sub.0, P.sub.a, P.sub.X in the glass bottle, calculating absolute values of the differences between P.sub.0 and P.sub.a, as well as between P.sub.0 and P.sub.X, and performing quality inspection on a glass bottle to be detected. The performing includes collecting the second harmonic peaks for the glass bottle to be detected, calculating a mean P.sub.L of elements in the current queue L, updating the second harmonic peak P.sub.a and the second harmonic peak P.sub.X, collecting second harmonic peaks for a current glass bottle to be detected, and determining whether the current glass bottle to be detected is an acceptable medicinal bottle based on the updated data and the collected second harmonic peaks.

Claims

1. A method for detecting gas concentration in a glass bottle with dynamical threshold adjustment, comprising: acquiring an acceptable concentration threshold a % and a reference concentration auxiliary threshold X % of a target gas in a glass bottle, and acquiring second harmonic peaks P.sub.0, P.sub.a, P.sub.X in the glass bottle respectively under the concentrations of 0%, a %, X % by using a wavelength modulation spectroscopy (WMS) detection method in a current environment, wherein 0%<X %<a %; calculating an absolute value for a difference between the second harmonic peaks P.sub.0 and P.sub.a to get D.sub.a, and calculating an absolute value for a difference between the second harmonic peaks P.sub.0 and P.sub.X to get D.sub.x; performing quality inspection on a glass bottle to be detected based on the differences D.sub.a and D.sub.x in the calculating as follows: collecting the second harmonic peaks for the glass bottle to be detected by using the WMS detection method 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 determining whether the second harmonic peak, otherwise the glass bottle is unacceptable and the detection is performed on a next glass bottle to be detected; determining 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 of the elements are null; and for adding new elements, old elements are sequentially discarded; calculating a mean P.sub.L of elements in the current queue L, and updating the second harmonic peak P.sub.a under the acceptable concentration threshold a % with the sum of the mean P.sub.L and the difference D.sub.a, and updating the second harmonic peak P.sub.X under the reference concentration auxiliary threshold X % with the sum of the mean P.sub.L and the difference D.sub.x; collecting second harmonic peaks for a current glass bottle to be detected by using the WMS detection method; and determining whether the current glass bottle to be detected is an acceptable medicinal bottle based on the collected second harmonic peaks for the current glass bottle to be detected, the updated second harmonic peak P.sub.a, and the u dated second harmonic peak P.sub.X.

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 pharmaceutical glass vial.

Description

BRIEF DESCRIPTION OF THE DRAWINGS

(1) 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;

(2) FIG. 2 is a data comparison diagram between the embodiment 1 of the present disclosure and the algorithm in the related art;

(3) FIG. 3 is a data schematic view of the algorithm in the related art according to the present disclosure;

(4) FIG. 4 is a data schematic view of the embodiment 2 of the present disclosure.

DETAILED DESCRIPTION OF THE EMBODIMENTS

(5) The present disclosure will be further described with reference to embodiments below.

(6) 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, and it is regarded as an unqualified glass bottle, whereby 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.

(7) 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:

(8) 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.

(9) Step 2: an absolute value is calculated for the difference 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 difference 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.0, 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.

(10) 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:

(11) 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 if 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;

(12) 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 if 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;

(13) 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 of the 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 of the 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.

(14) 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 such that P.sub.a=P.sub.L+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.sub.x such that 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.

(15) 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 10 standard medicinal glass bottles with an oxygen concentration of 4% and 10 standard medicinal glass bottles with an oxygen concentration of 6%. The measured data is processed by the algorithm in the related art and the method of this embodiment respectively to obtain the data as shown in FIG. 2.

(16) For Algorithm 1 in the related 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 for whether the medicinal bottles are acceptable or not, wherein the auxiliary threshold is P.sub.5=5.

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

(18) As shown in FIG. 2, if the constant invariant P.sub.5=5 in the algorithm in the related art is used as the basis for 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 P.sub.5=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 P.sub.5=5, resulting in that the 20th and 80th medicinal bottles are misidentified as acceptable 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 P.sub.5=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 P.sub.5=5, and thus the 20th and 80th medicinal bottles will not be misidentified as acceptable medicinal bottles.

Embodiment 2

(19) 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 D.sub.a=0.00383 and D.sub.x=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 related art and the method of this embodiment respectively to obtain the data as shown in FIG. 3 and FIG. 4.

(20) For Algorithm 1 in the related 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=0.99433 is used as the basis for whether the medicinal bottles are acceptable or not.

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

(22) FIG. 3 shows the data obtained by using Algorithm 1 in the related 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% respectively 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.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 related 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% respectively 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.

(23) 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.

(24) 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.