Device and method for detecting oxygen content in glass medicine bottleTechnical Field
The invention relates to the technical field of gas detection, in particular to a device and a method for detecting the oxygen content in a glass medicine bottle.
Background
Oxygen in the medicine bottle is a main factor influencing the shelf life of the medicine, a small amount of air is inevitably left in the process of vacuumizing or filling gas in the medicine bottle, if the medicine bottle is not sealed well, the oxygen proportion in the bottle is further increased, once the medicine bottle exceeds the industrial standard, the medicine is likely to deteriorate in the shelf life, and very serious influence is brought to the body of a patient.
At present, more than 98% of pharmaceutical enterprises mainly judge whether the oxygen content of the batch of products is qualified through sampling detection, and the sampled medicine bottles can be detected by a rough physical method or a related oxygen analyzer. The oxygen analyzers in the market mainly depend on traditional methods such as a chemical colorimetric method, a gas chromatography method, an electrochemical method, a magnetic oxygen analysis method and the like, the traditional analysis systems need complex pretreatment, nondestructive detection cannot be realized, the measurement error is large, the analysis time is long, and the system maintenance workload is large.
Disclosure of Invention
In order to overcome the technical problem that the oxygen content of the existing medicine bottle is inconvenient to monitor, the invention provides a device and a method for detecting the oxygen content in the glass medicine bottle, which can accurately and conveniently detect the oxygen content in the medicine bottle.
In order to achieve the technical purpose, the technical scheme of the invention is that,
a device for detecting the oxygen content in a glass medicine bottle. Comprises a laser generating device and a laser receiving device. The laser generating device is arranged on one side of the medicine bottle to be tested. The laser receiving device is arranged on the other side of the medicine bottle to be tested and receives laser emitted by the laser generating device. And the upper computer is in communication connection with the laser receiving device.
The laser generating device includes:
a sawtooth signal generator for providing a sawtooth signal with the amplitude and frequency parameters of the low-frequency harmonic signal adjusted.
And the adder is used for accumulating the sawtooth wave signal and the sine wave signal.
And the laser diode modulation and temperature controller is used for adjusting the working temperature parameters of the laser.
A laser for generating laser light.
The sawtooth wave signal generator, the adder, the laser diode modulation and temperature controller and the laser are connected in sequence.
The laser receiving device includes:
and the focusing lens assembly is used for converging the laser passing through the medicine bottle to be measured.
And the photoelectric detector assembly is used for receiving the converged laser light and converting an optical signal into an electric signal.
For receiving and phase-sensitive detecting the electrical signal. And the phase-locked amplifier selects the digital information output of the second harmonic.
And the communication module is used for receiving the digital information and outputting the digital information to the upper computer.
The photoelectric detector assembly, the phase-locked amplifier and the communication module are connected in sequence.
The phase-locked amplifier simultaneously generates a high-frequency tuning sine wave signal after the time constant, the amplitude and the frequency of the high-frequency modulation signal are adjusted, and the high-frequency tuning sine wave signal is sent to the adder.
The device for detecting the oxygen content in the glass medicine bottle. The light frequency generated by the laser covers the absorption line of oxygen.
The device for detecting the oxygen content in the glass medicine bottle. The device also comprises a collimating lens component used for enabling the laser to be emitted in a collimating way to penetrate through the medicine bottle to be measured and a focusing lens component used for converging the laser penetrating through the medicine bottle to be measured. The collimating lens is arranged between the laser and the medicine bottle to be tested. The focusing lens component is arranged between the medicine bottle to be tested and the photoelectric detector component.
The device for detecting the oxygen content in the glass medicine bottle. The surfaces of the collimating lens and the focusing lens are plated with 700-800nm band-pass coatings.
The device for detecting the oxygen content in the glass medicine bottle. The glass medicine bottle also comprises a first diaphragm used for reducing optical noise caused by excessive refraction of laser in the glass medicine bottle and a second diaphragm used for eliminating optical noise caused by stray light entering the photoelectric detector. The first diaphragm is arranged between the collimating lens component and the sealed glass medicine bottle to be tested. The second diaphragm is arranged between the focusing lens component and the photoelectric detector component.
A method for detecting the oxygen content in a glass medicine bottle. The method comprises the following steps:
the method comprises the following steps: glass vial standards of known oxygen content were collected as initial modeling samples.
Step two: and detecting each bottle of standard substance to obtain a detection result taking the second harmonic as an expression form. And data preprocessing is carried out on the detection result. And obtaining the peak area of the second harmonic semi-high spectrum as a characteristic value.
Step three: and performing linear least square fitting on the area of each second harmonic half-height spectral peak and the corresponding concentration after pretreatment. And obtaining an oxygen concentration inversion model.
Step four: and carrying out field detection on the glass medicine bottle and the vacuum medicine bottle to be detected. Data averaging, filtering, characteristic value extraction and real-time deduction of field background. And (5) sending the detection data to an oxygen concentration inversion model established in the third step. And obtaining an oxygen content prediction result.
The method for detecting the oxygen content in the glass medicine bottle. Before performing step one. First, the laser operating parameters are set. The operating temperature and operating current of the laser are varied separately. The wavelength of the emitted beam of the laser is recorded by a wavelength meter. And simultaneously observing the waveform of the absorption signal after photoelectric conversion. Eventually bringing the absorption peak to the center of the absorption signal.
The method for detecting the oxygen content in the glass medicine bottle. Before performing step one. First, system parameters are optimized. And the scanning amplitude and the scanning frequency of the low-frequency sawtooth wave signal, the modulation amplitude and the modulation frequency of the high-frequency sine wave signal and the delay time of the phase locker are changed in sequence. Multiple tests were performed. Extracting the second harmonic amplitude and solving the corresponding standard deviation. Corresponding parameter values are determined.
The method for detecting the oxygen content in the glass medicine bottle. In the first step. The standard product at least comprises more than two glass medicine bottles with known oxygen content, wherein the oxygen content is 0%.
The method for detecting the oxygen content in the glass medicine bottle. The data preprocessing in the second step comprises the following steps:
step 1: and sampling each modeling sample to obtain all second harmonic signals and averaging the second harmonic signals. A list of second harmonic data is obtained.
Step 2: and (5) moving smooth filtering and fast processing. A plurality of data points are collected, left and right of the current data point. These points were least squares fitted with a 3 rd order polynomial. And calculating the value of the measuring point by using the polynomial obtained by fitting. As a result of the smoothing.
And step 3: and extracting the peak area of the semi-high spectrum. The sampling region corresponding to the half-peak width of the second harmonic is obtained as the wavelength range by the trapezoidal integration method. The spectral peak area of the second harmonic in this range. As a second harmonic signal characteristic value.
And 4, step 4: background subtraction. And subtracting the characteristic value corresponding to 0% of the samples in the initial modeling samples from the characteristic value obtained in the third step.
The invention has the technical effects that aiming at the noise of an optical system, the collimating lens component and the focusing lens component are adopted, the surfaces of the collimating lens component and the focusing lens component are coated with films in a band-pass mode, and meanwhile, diaphragms are arranged behind the collimating lens component and in front of a photoelectric detector, so that the optical noise is eliminated to the maximum extent. Aiming at the high-strength noise background of an open space, a corresponding parameter value is determined through a system parameter optimization experiment, and meanwhile, a high-precision phase locker is adopted, and digital information is directly output through a GPIB interface, so that the system can accurately acquire second harmonic information under the condition of an open single optical path and a short optical path. In the quantitative prediction model, the second harmonic characteristic value is the peak area of the half-high spectrum, which is beneficial to inhibiting the influence of spectrum drift, reducing the influence caused by residual amplitude modulation and other interference fluctuation, and has larger discrimination, thus being more suitable for the accurate quantitative processing of short optical path and trace gas concentration.
The invention will be further explained with reference to the drawings.
Drawings
FIG. 1 is a schematic view of the overall structure of the apparatus of the present invention;
fig. 2 is a schematic diagram of the optical path structure of the device of the present invention.
Detailed Description
Referring to fig. 1, the present embodiment is composed of a sawtooth wave signal generator 1, an adder 2, a laser diode modulation and temperature controller 3, a laser 4, a collimating lens assembly 5, a sealed glass medicine bottle to be tested 6, a focusing lens assembly 7, a photodetector assembly 8, a phase-locked amplifier 9, a GPIB interface card 10, a computer 11, a first diaphragm 12 and a second diaphragm 13. The laser diode modulation and temperature controller 3 keeps the working temperature of the laser 4 constant, the sawtooth wave signal generator 1 generates low-frequency sawtooth wave working current, high-frequency tuning signals generated by the phase-locked amplifier 9 are superposed and sent to the laser diode modulation and temperature controller 3, and the light output wavelength of the laser 4 covers the vicinity of an absorption spectral line 760nm of oxygen. The laser 4 is provided with a TO5 packaging accessory, and a laser beam with high energy density can be output through the collimating lens component 5. After the single light path passes through the glass medicine bottle 6 to be detected, the light signal is converted into an electric signal by the photoelectric detector assembly 8 through the focusing lens assembly 7 and is output to the phase-locked amplifier 9, second harmonic digital information is selected for output, and the electric signal is sent to the computer 11 through the GPIB interface card 10 for data processing, so that the oxygen content is accurately and rapidly measured.
The embodiment adopts the collimating lens component 5 which enables laser to be emitted in a collimating way to penetrate through the medicine bottle to be detected and the first diaphragm 12 which reduces optical noise caused by excessive refraction of the laser in the glass medicine bottle, adopts the focusing lens component 7 which is used for converging the laser which penetrates through the medicine bottle to be detected and the second diaphragm 13 which is used for eliminating the optical noise caused by stray light entering the photoelectric detector in the laser receiving device, and the introduction of the devices can effectively improve the measurement precision in actual use and is beneficial to industrial application.
The communication module of this embodiment adopts a GPIB interface card as a device for communicating with an upper computer, and in practical applications, the corresponding communication module can be selected according to actual needs, including but not limited to various communication interfaces, or implemented in wired or wireless form.
The laser adopted in the embodiment is a DFB laser which works in a continuous mode, the central wavelength is an absorption line 760.885nm of oxygen, the laser is packaged in a TO5 package, the diameter of a spot at a position of 5cm is 2.5mm, and the output light power reaches 1 milliwatt. The optimized parameters after the experimental treatment are as follows: the working temperature of the laser is 28.25 ℃, the direct current working current is 36.1mA, the frequency of a low-frequency sawtooth wave signal is 5Hz, the amplitude is 14mV, the frequency of a high-frequency tuning signal is 10KHz, and the amplitude is 12 mV.
The frequency and the light intensity of light emitted by a laser light source are controlled by the injection current of the laser light source, the light is influenced by a direct current bias current, a low-frequency sawtooth wave current and a high-frequency sine wave current in a WMS system, and the output wavelength and the light intensity of a laser are approximately linearly changed along with the intensity of the injection current. Neglecting phase modulation, let v0Is the center frequency of the oxygen absorption peak, caused by the DC offset of the injected current, KvIs in the relationship of low-frequency sawtooth wave current-light frequency, A is the amplitude of sawtooth wave current, the frequency of high-frequency sine wave modulation signal is f, the modulation amplitude is vmAlso called modulation depth, the output frequency v (t) of the laser is:
v(t)=v0+AKvt+vmsin(wt)(1)
let vc=v0+AKvt, then equation (1) becomes:
v(t)=vc+vmsin(wt)(2)
output intensity I of laser0(t) is: i is0(t)=I'0(t)[1+αsin(wt)](3)
I'0(t) represents the average change in output intensity due to the low frequency current, and α represents the intensity modulation factor due to the high frequency sine wave.
According to the beer-Lambert law, the frequency is v and the intensity is I0(t) the transmitted light intensity of the incident light after gas absorption is:
I(v,t)=I0(t)exp[-S(T)NLPg(v)](4)
s (T) is the absorption line intensity in (cm-1/(molecule cm-2)) as a function of temperature T alone, N is the volumetric concentration of the absorbing gas in 1, L is the absorption path length in cm, P is the static total pressure of the gas in atm, and g (v) is the absorption line intensity as a function of temperature T.
And (3) expanding the light intensity after the light is absorbed by the gas according to the Fourier series:
each harmonic component HnThe following can be obtained by phase-sensitive detection of a phase lock device:
since-S (T) NLPg (v) is much smaller than 1, each harmonic component HnComprises the following steps:
the above formula shows that the amplitude of each harmonic component of the detection signal is directly proportional to the gas concentration, and is also a system-related parameter such as the center wavelength of the gas, the amplitude and frequency of the low-frequency scanning current, the amplitude and frequency of the high-frequency modulation signal, and the like, and the second harmonic signal is generally selected for output. And for each selected harmonic signal, the amplitude is proportional to the concentration at all locations within the absorption region. Therefore, the sampling region corresponding to the half-peak width of the second harmonic is taken as the wavelength range, and the half-peak area S of the second harmonic in the range is:
wherein,and delta v is the wavelength range of the sampling region corresponding to the half-peak width of the second harmonic, h is the height of each point in the half-height spectrum peak area, and k is a concentration scaling factor corresponding to each point.
The above formula shows that the half-peak area of the second harmonic is also linear with the corresponding gas concentration. Therefore, after the experimental conditions are determined, the half-peak area of the second harmonic component is used for representing the integral amplitude level of the signal, so that the suppression of the influence of spectral drift is facilitated, the influence caused by residual amplitude modulation and other interference fluctuation is reduced, the discrimination is higher, and the method is more suitable for accurate quantitative processing of the concentration of the short-path trace gas.
In this embodiment, the number of second harmonic sampling points in a complete cycle is 500 points, each measurement object (including a glass vial to be measured and a vacuum vial) samples 10 harmonics to perform data equalization preprocessing, and the processing steps are specifically as follows:
the method comprises the following steps: the 10 th order harmonic signals are averaged to reduce random noise. Namely, 10 columns of sampling data are averaged to obtain one column of second harmonic data.
Step two: and (4) moving smooth filtering and fast processing, and suppressing periodic interference of the system. I.e. collecting data points xi15 points are left and right, the points are subjected to least square fitting by using a polynomial of 3 th degree, and the value of the measurement point is calculated by using the polynomial obtained by fitting, and the result is used as a smoothing result.
Step three: and extracting the semi-high spectrum peak area. And (3) calculating a sampling area corresponding to the half-peak width of the second harmonic as a wavelength range by using a trapezoidal integration method, wherein the spectral peak area of the second harmonic in the range is used as a characteristic value of the second harmonic signal.
Step four: background subtraction, elimination of oxygen effects in air in the open optical path and reduction of system spectral drift. The characteristic value corresponding to the on-site vacuum medicine bottle sample is subtracted from the characteristic value in the third step.
And finally, sending the data in the fourth step to an oxygen concentration inversion model, obtaining an oxygen content prediction result and displaying the oxygen content prediction result on a computer in real time, wherein the oxygen concentration inversion model is obtained by performing linear least square fitting on the area of each preprocessed second harmonic half-high spectrum peak and the corresponding concentration.