0 Introduction
Carbon monoxide (CO) is the most common toxic, harmful, flammable and explosive gas, which brings great harm to industrial safety production. Therefore, it is very necessary to develop a gas detector that can accurately measure the concentration of carbon monoxide gas in real time. At present, the main detection methods used for carbon monoxide gas are gas chromatography, optical interferometry, semiconductor gas sensor, infrared spectrum absorption, etc. The above four carbon monoxide gas concentration measurement methods have their own advantages and disadvantages. However, the infrared spectrum absorption method shows more advantages. The basic principle of infrared spectrum absorption is: align the wavelength of the narrow-band light source with a certain absorption peak of the measured gas, modulate the laser wavelength with a sinusoidal signal, and the modulated laser passes through the measured gas. Due to the absorption effect of the gas, the wavelength modulation is converted into intensity modulation. When the central wavelength of the laser is aligned with the center of the gas absorption peak, the output light contains the second harmonic signal of the modulation frequency, and the signal amplitude is proportional to the concentration of the gas. By extracting the second harmonic of the absorption signal, the gas concentration can be measured. Compared with the differential absorption method, the harmonic detection method has higher resolution. This paper uses infrared spectral absorption to measure the concentration of carbon monoxide gas. In the design process of carbon monoxide gas detector, the Lagrange interpolation idea is applied to data processing. This paper mainly studies the design of the algorithm in the carbon monoxide gas detector and optimizes the data.
1 The significance of Lagrange interpolation
The basic principle of infrared spectroscopy technology is the Beer-Lambert law. The relationship between the outgoing light intensity I and the incident light intensity Io is I=Ioexp[-a(v)CL], where a(v) is the absorption coefficient of the gas at a certain frequency v; C is the gas concentration; L is the path length of the gas absorption. Since a(v) is a function of the ambient temperature and pressure, the value of a(v) can be obtained as long as the temperature and pressure in the environment are measured. However, the analytical expression of this function is quite complicated and inconvenient to process and calculate. It is impossible to accurately calculate the value of a(v) in real time, and it is also impossible to calculate the concentration of the measured gas. Therefore, designing an algorithm to accurately calculate the value of a(v) will become a key link in carbon monoxide measurement. After calculating the carbon monoxide gas absorption coefficient, the algorithm can be used to measure the carbon monoxide gas concentration according to the Beer-Lambert law.
This paper adopts the Lagrange interpolation algorithm to process the absorption coefficient a(v), and uses the program to accurately calculate the value of the absorption coefficient a(v). Here we can get many absorption coefficients of carbon monoxide gas at different temperatures and pressures through experiments, but they are some isolated and discrete points and are discontinuous. Then use the Lagrange interpolation idea to process it. Since the absorption coefficient a(v) of carbon monoxide is related to the two parameters of temperature and pressure, this paper uses the two-dimensional Lagrange interpolation algorithm to implement it.
When designing the carbon monoxide gas concentration measurement algorithm, the Lagrange interpolation algorithm is used for relevant processing, which can accurately calculate the concentration of carbon monoxide gas. It can be seen that it is very necessary to design an algorithm for carbon monoxide gas detectors. This Lagrange interpolation algorithm idea will have a great application prospect in gas detection.
2 Lagrange interpolation principle
2.1 Lagrange interpolation
Lagrange interpolation is generalized from linear interpolation and parabolic interpolation. It generalizes the interpolation of n=1 and n=2 to the general case. Consider the interpolation polynomial Ln(x) passing through (n+1) points, (xi, f(xi))(i=0,1,2,…,n), so that Ln(xi)=f(xi)i=0,1,2,…,n.
Using the interpolation basis function method, we can get:
[page]
2.2 Two-dimensional Lagrange interpolation
First, the principle of two-dimensional Lagrange interpolation is explained. Assume that the function value of f(x, y) is given at the nodes of a rectangular grid on the plane xOy, that is, the value defined at the node is fi,j=f(xi, yj). A double interpolation consists of two steps, each of which uses a one-dimensional interpolation.
The first step is to interpolate in the y direction and find the interpolation values of points E and F:
The second step is to perform linear interpolation between fE and fF:
The bilinear region of the two-dimensional region is shown in Figure 1.
By writing these two steps into a formula, we can get:
The above part uses the two-dimensional linear interpolation method to process the data. This method still has some shortcomings for data processing. According to the same data processing idea mentioned above, the two-dimensional Lagrange interpolation algorithm can be used to achieve the same function and make the data processing effect better.
3 Lagrange interpolation algorithm design
3.1 Lagrange interpolation algorithm implementation method
This algorithm uses the Lagrange interpolation formula to perform group interpolation on two-dimensional unequally spaced observation data to calculate the absorption coefficient. Different node numbers n can be selected to implement interpolation. There are observation series (x1, y1), (x2, y2), ..., (xn, yn), and x1
Where: j is the largest number among the n interpolation nodes taken during moving interpolation, and is taken as follows:
m is the number of sample points in the observation sequence.
Through the processing of the two-dimensional Lagrangian interpolation algorithm, the absorption coefficient can be calculated more accurately, and then the concentration of the measured carbon monoxide gas can be inferred according to the Beer-Lambert law I=Ioexp[-a(v)CL]
, where a(v) is the absorption coefficient; I(t), Io can be measured by a laser detector; L is the absorption path length, which is set by the designer. [page]
3.2 Steps to implement the Lagrangian interpolation algorithm
The steps to implement the Lagrangian interpolation algorithm are:
(1) Give the required input quantity, give the interpolation node control number n, the interpolation point sequence (xi, yi), i=0, 1, 2, ..., n, and the point x to be calculated.
(2) Design the Lagrangian interpolation function (pseudocode form)
Step 3: Output the calculation result fx of ln(x)
4 Experimental results
After correction using the Lagrangian interpolation algorithm, the concentration of several groups of measured gases at different temperatures and pressures was measured experimentally, and compared with the experimental given sample gas concentration value, and the difference between the measured result and the standard concentration was obtained. The performance of the gas detector can be known from the measured difference. The data is shown in Table 1:
Through experiments, we know that the temperature and pressure of the measured gas are unknown. The temperature and pressure measured by the sensor may not exist in the data table. For these non-existent temperature and pressure points, the Lagrange interpolation algorithm can be used to process them and accurately measure the concentration of the measured gas in real time. It can be seen that it is very necessary to design an algorithm for carbon monoxide gas detectors. This Lagrange interpolation algorithm idea will have a great application prospect in gas detection.
5 Conclusion
This paper uses the Lagrange interpolation idea based on the infrared spectrum absorption principle to realize the data processing of carbon monoxide gas detectors. It explains in detail the idea of Lagrange interpolation and the practical significance of using the Lagrange interpolation algorithm, and uses the Lagrange interpolation algorithm to realize the measurement of the concentration of the measured gas. Freescale microcontroller is used as the processor, Code Warrior is used as the development platform, and C language is used to implement the Lagrange interpolation algorithm. Experiments show that the system is based on the principle of infrared spectral absorption and uses the Lagrange interpolation algorithm to measure the carbon monoxide concentration in the environment. Compared with previous gas detectors, this design method reduces the hardware structure, optimizes system performance, saves costs, shortens the development cycle, and makes the detection results more accurate.
Previous article:Research and development of fault diagnosis instruments for air-to-air missile test equipment
Next article:Design of Waveform Recording Analyzer Based on LabWindows
- Keysight Technologies Helps Samsung Electronics Successfully Validate FiRa® 2.0 Safe Distance Measurement Test Case
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Seizing the Opportunities in the Chinese Application Market: NI's Challenges and Answers
- Tektronix Launches Breakthrough Power Measurement Tools to Accelerate Innovation as Global Electrification Accelerates
- Not all oscilloscopes are created equal: Why ADCs and low noise floor matter
- Enable TekHSI high-speed interface function to accelerate the remote transmission of waveform data
- How to measure the quality of soft start thyristor
- How to use a multimeter to judge whether a soft starter is good or bad
- What are the advantages and disadvantages of non-contact temperature sensors?
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- [RVB2601 Creative Application Development] Short recording, playback and printing of recording data
- When the carrier data reaches the receiving end, how does the receiving end identify this information?
- SparkRoad Review (7) - FPGA Serial Port Test
- Disable AD auto-start JLink
- Seeking guidance - stc microcontroller remote upgrade program
- Problems with creating sheet symbols for multi-page schematics
- Zigbee Z-Stack 3.0.1 Modify channels using broadcasting
- SHT31 Review + My Review Summary
- Using AT89S series microcontroller
- 【McQueen Trial】Use IPAD to program McQueen's car