2018 International Conference on Sensor Network and Computer Engineering (ICSNCE 2018) 80 Research and Application of SO2 Concentration Monitoring Algorithm in Flue Gas Wang Qinqin School of Computer Science and Engineering Xi’an Technological University Xi’an, 710021, China e-mail: 1466122350@qq.com Su Xiaohui School of Computer Science and Engineering Xi’an Technological University Xi’an, 710021, China e-mail: 287099144@qq.com Abstract—This paper mainly focuses on the concentration calculation of SO2 in flue gas. There are many methods for smoke detection. First of all, this paper mainly introduces the basic Differential Optical Absorption Spectroscopy technology. Then, in order to solve the problem of overlapping absorption between different gases in the flue gas, this paper use cyclic iteration algorithm to measure the concentration of SO2. It is concluded that the basic DOAS algorithm has a large error for the concentration measurement of mixed gas with overlapping absorption, the he error is above 25%. However, the cyclic iterative algorithm has a good effect on processing with it which can get a more stable result after three iterations, and the measurement error can be controlled finally within 2%. Keywords-Differential Optical Absorption Spectroscopy; SO2 Monitoring; Mixed Gas; Spectral Overlap Absorption; Cyclic Iterative Algorithm I. INTRODUCTION With the rapid development of industrialization and human destruction, their pollution is becoming more and more serious. Therefore, monitoring the harmful gases of the atmosphere is the primary prerequisite for controlling and treating pollution. At present, people mainly use portable gas analysis equipment to carry on flue gas analyze, and The Differential Optical Absorption Spectroscopy (DOAS) is the most commonly and effective method which is used to real-time detect gas concentrations in the atmosphere by characteristic absorption of absorbable molecules in the near ultraviolet region[1]. The traditional DOAS algorithm exist large errors for the gas concentration measurement of short path and low concentration. In order to decrease limit of detection and enhance environment adaptability of the portable flue gas analyzer, to improve measurement accuracy, Wang Kunpeng completed the research and design of portable gas analyzer based on AVR micro-controller, and increase it’s detection accuracy and environmental adaptability[2]. Deng Meng developed the portable gas analyzer based on the non- dispersive ultraviolet absorption, and has improved resolution and stability in high humidity and low concentration of SO2 gas monitoring[3].Wang Jing designed concentration calculation method based on the least square method on the basis of DOAS algorithm, which is used in the short optical path and a low SO2 calculation[4]. Zhou Mi proved the monitoring accuracy of Fourier infrared method for the low concentration SO2 in straw burning flue gas[5]. Yan Yue’s experiment has proved that BP neural network based on adaboost optimization algorithm has a good effect in monitoring concentration of SO2 gas with interference[6]. In order to separate and calculate the gas concentration from the absorption spectrum signal of the mixed gas, Xu Shuping designed the portable smoke analyzer based on the cyclic iteration algorithm. It conclude that the method can simultaneously calculate various gas concentration and has strong anti-interference ability[7]. Wang Yingjian designed Strong independence and multi-scale wavelet discrete decomposition method, and obtained accurate concentration of SO2 with NO gas absorption interference [8]. In the paper, a portable flue gas analyzer is used as an experimental instrument to study the method of measuring the SO2 content in the exhaust emission of the factory. The 2018 International Conference on Sensor Network and Computer Engineering (ICSNCE 2018) 81 experiment mainly research on the DOAS absorption model and the cyclic iterative algorithm. It can get the efficient method on SO2 concentration measurement in the mixed gas. So, it can provide the best technical support for the factory exhaust emission monitoring and reduce the air pollution. II. DIFFERENTIAL ABSORPTION SPECTROMETRY Differential absorption spectroscopy is proposed by U.Platt of the Institute of environmental physics at Heidelberg University in Germany. The basic principles are as follows: Firstly, It need irradiate the tested substance with a beam of light, ten, select the corresponding absorption wavelength of the gas, lastly, calculate the gas absorbance and then get its concentration. The theory is based on the Lambert-Bee law. A. Lambert-Beer Law The basic principle of Lambert-Beer law: when abeam of parallel monochromatic light through a certain absorbable material in the vertical direction and generate transmission, the medium itself will absorbs a part of light, so, the original intensity weakened, and the thicker the medium, the higher the concentration, the greater decreases the light intensity [9]. The specific expression is as follows: KLC I I A  1 0log  Among them, A is absorbance, I0 is the intensity of incident light, I1 is transmission light intensity, Kis constant, absorption coefficient, Lis the thickness of medium, C is the concentration of absorption material. Set I0(λ) as the original light intensity, I(λ) as receiving light intensity and σ(λ) as the absorption cross section of the gas to be measured, then the mathematical model of the spectral absorption of a single gas can be expressed as: )](exp[)()( 0   CLI I  Lambert-Beer law is used only for the concentration measurement of single gas and it requires no interference in the experimental environment. However, in the actual measurement process, the measured material is usually a mixture materials which concluding kinds of interfere with the impurities such as sols and solid particles. B. Actual Spectral Absorption Model Due to the uneven refractive index, when the light incident into the uneven medium, it will produce scattered light and reduce the transmittance of light, including Rayleigh scattering and Mie scattering which are show broadband absorption and narrowband absorption in the optical spectrum chart. Therefore, it is necessary to establish a spectral absorption model under actual conditions. Set i as the type of gas, and introduce the extinction coefficient of gas including  R and  M . The model of the gas absorb light is as follows:       ]exp[)()( 0   MRiiCLII    When analyzing and calculating, the absorption cross section will be decomposed into fast parts and slow parts. So, The High pass filtering will avoid the influence of Rayleigh scattering and Mie scattering. Set the absorbance of the gas to be measured is D, the actual absorbance model is finally as follows:   )(])()(ln[ 0   iiCI LID   From the formula 4, It can be known that the difference optical density  D is linear with the differential absorption cross section  i in a certain concentration range. Although the differential absorption method can accurately calculate the concentration of most of the gases, the loss of the slow change absorption spectrum information in the filtering process will lead to produce some wrong results for gas concentration measurement. Therefore, it is necessary to study other methods of concentration inversion to improve the measurement precision of gas composition. 2018 International Conference on Sensor Network and Computer Engineering (ICSNCE 2018) 82 III. CYCLIC ITERATIVE ALGORITHM The absorbance has Superposition property. When the gases is used as a mixture, the total absorbance is equal to the sum of the absorbance of each component in the mixture if each kind of gas has a absorption of the light in a particular wavelength[10]. According to the superposition property of absorption spectrum, the cyclic iteration algorithm can gradually eliminates the interference between gas molecules through successive cycle calculation, and finally approach the real concentration of the gas. C. The Model of Cyclic Iterative Algorithm The paper mainly research the concentration measurement of SO2 of mixed gases with overlapping absorption characteristics. The experiment only consider the interference of NO2 on spectral absorption of SO2 in the range of 200nm~300nm band of the near ultraviolet region. Two standard gases of SO2 and NO2 are added one by one, the absorption spectra of two kinds of gases are shown in Figure 1. 190 200 210 220 230 240 250 260 270 280 290 300 0 10000 20000 30000 40000 50000 60000 In te n si ty (c o u n ts ) Wavelength(nm) 零气线 NO2 SO2 Figure 1. Absorption spectrogram of SO2 and NO2. As shown in Figure1, although both NO2 and SO2 have the absorption of light at wavelength 230nm and 270nm, the absorption intensity is very different. The absorbance of NO2 at 230nm is much greater than that of its absorbance at 270nm, while the absorbance of SO2 at 270nm is much greater than that of its absorbance at 230nm [9]. Therefore, at 230nm, the absorption of NO2 can be seen as the main absorption and the absorption of SO2 as an interference. On the contrary, at the wavelength of 270nm, the absorption of SO2 can be seen as the main absorption, and the absorption of NO2 as the interference of the main absorption of SO2. The basic calculation steps of the cyclic iteration method are as follows: At 230nm, the total absorbance (A1) is considered as the absorbance of NO2 (AS1). Step 1, at 230nm,according to AS1, it can obtain the concentration of NO2 (CS1) by looking up the table; Step 2, at 270nm, according to Cs1. it can obtain was to the absorbance of NO2 (AS2); Step 3, at 270nm, the total absorbance (A2) minus AS2 is equal to the absorbance of SO2 (AN2); Step 4, at 270nm, it can obtain the concentration of SO2 (CN2) by looking up the table; Step 5, at 230nm,according to CN2, it can obtain the absorbance of SO2 (AN1) by looking up the table; Step 6, at 230nm, A1 minus AN1is equal to the absorbance of NO2 (AS1); Repeat steps one to six, it can get the exact values of SO2 concentration. The above algorithm flow can not only calculate the concentration of each component of the mixture gases which include SO2 and NO2, but also it is suitable for concentration measurement of any mixed gas. IV. DESIGN OF EXPERIMENTAL SYSTEM The experimental system is mainly composed of light source, spectrometer, optical fiber and computer. Firstly, open the light source, and the emitted light of the optical fiber pass through a double convex lens, after that, it becomes parallel light and pass through the measured gas. Next, the light enters into the spectrometer after focusing through the focusing lens. Lastly, the spectrometer converts the optical signal into electrical signal and sends it to the computer to collect and process the spectral signal. The specific experimental device and system flow are shown in Figure 2 and Figure 3. 2018 International Conference on Sensor Network and Computer Engineering (ICSNCE 2018) 83 Figure 2. Experimental device diagram. Gas entry Air chamber Exhaust fume Spectrometer Computer UV light source Optical fiber Data line Optical fiber Figure 3. Flow chart of the experimental system. In the experiment. Firstly, it measured the dark spectrum when the light source does not pass into the spectrometer. Then, add the gas and open the light source, so that the light can enter the air chamber through the optical fiber. After the gas was absorbed, the number of photons will decrease correspondingly, and the number of absorbed photons will change with the change of gas concentration. Finally, the transmission light goes into the spectrometer, converts the light signal into the electrical signal, and sends it to the computer to display the spectrum. It can obtain original absorption spectrum after calculation the average value of absorption spectrum for many times. From the original spectra deducted the data of dark spectrum, it can get the actual spectrum. V. EXPERIMENTAL RESEAECH AND RESULT ANALYSIS In order to verify the feasibility and practicability of DOAS and cyclic iteration algorithm, we will compare the result and accuracy of them through experiments, and summarize the advantages and disadvantages of each algorithm. D. Research on Curve Fitting Lambert-Beer law provides a linear relationship between gas absorbance and concentration. In practice, the linear relationship is not always true due to the influence of various factors. Therefore, the curve fitting method is used to fit the measured data. In order to improve the efficiency of the algorithm, the number of photons absorbed by the experiment is first converted into the absorption intensity. Because the dark spectrum is included in the spectrum after the light is passed into the light source, therefore, In calculating the absorbance and concentration of the substance to be measured, the dark spectrum should be removed from the original spectrum. The calculation model of absorbance is as follows:   DS DR A    lg  Among them, A is an absorbance, R is a number of incident photons, S is a number of transmitted photons,  is a wavelength, D is a dark noise. In this paper, the effect of NO2 on the absorption spectrum of SO2 is only considered. The mixture of NO2 and SO2 is used in the experiment, and there are two kinds of standard gas concentration, such as 100ppm and 500ppm. It can fit the concentration and absorbance curves of each gas at a certain wavelength by the measured gas absorption spectra, and then obtain the fitting data relation table of each gas. The fitting formula is as follows:  PCCC C A CA i i i   2i2i2i2i  Among them, p is the change rate of average absorbance along with increasing concentration, Ci+2 is the gas concentration, 2iA is a absorbance of gas to be measured. As long as there are two points ii CA  1i1i  CA on the measured curve, the relationship between concentration and absorbance can be fitted. At 230nm and 270nm,the relationship figures between concentration and absorbance of SO2 and NO2 can be obtained by using excel, respectively. As shown in Figure 4 and 5 (horizontal coordinate is concentration, ordinate is absorbance). 2018 International Conference on Sensor Network and Computer Engineering (ICSNCE 2018) 84 Figure 4. Data relationship between concentration and absorbance of NO2. Figure 5. Data relationship between concentration and absorbance of SO2. E. Experimental Results and Analysis In the experiment, firstly, we should turn off the light source and measure the dark spectrum. Then, measure the original spectrum. Finally, two kinds of mixed gas with different ratio of SO2 and NO2 are introduced to measure the spectral data. The mixed concentrations of SO2 are 301ppm and 102ppm, respectively. The mixed concentrations of NO2 are 199ppm and 498ppm, respectively. Then, the concentration of the measured spectral data is respectively calculated by using DOAS and cyclic iterative algorithm. The SO2 concentration under the interference of NO2 as shown in Table I. The iterative results of cyclic iteration algorithm are shown in Table II. TABLE I. THE COMPARISON OF MEASURED CONCENTRATION WITH ACTUAL VALUES OF SO2 Computational Method Standard Value 301 Standard Value 102 Measured value Measured deviation(%) Measured value Measured deviation(%) DOAS 368.35 22.3% 128.07 25.5% Cyclic iterative algorithm 298.71 0.7% 100.46 1.5% TABLE II. THE RESULTS OF CYCLIC ITERATIVE ALGORITHM Iterations 1st time 2nd time 3rd time 4th time FirstGroup SO2 (ppm) 310.24 299.86 299.71 299.71 NO2 (ppm) 193.83 201.47 201.47 201.47 Second Group SO2 (ppm) 134.71 101.90 101.46 101.46 NO2 (ppm) 487.62 497.36 497.64 497.64 In the experiment, DOAS and cyclic iteration algorithms are used to invert the concentration of SO2 in the mixture gas respectively. According to Table I, under the interference of NO2 gas, with the increase of NO2 concentration, the greater the deviation, the lower the measurement accuracy. It is shown that the error is more than 25% when the DOAS method is used to measure the SO2 concentration in the mixed gas. Combined with Table I and Table II, the results show that the inversion effect of DOAS method for the mixture gas concentration with overlapping absorption is not satisfactory. On the contrary, the accuracy of the cyclic iteration algorithm is the highest, and the content of the mixed components can be accurately measured 2018 International Conference on Sensor Network and Computer Engineering (ICSNCE 2018) 85 by only three cycles, and the measurement deviation is finally within 2%. VI. SUMMARY OF THE PAPER In order to find a method with high detection accuracy and good calculation efficiency, this paper mainly study the concentration monitoring method of SO2 in flue gas. First, the advantages and disadvantages of the current equipment and algorithm of smoke composition detection can be obtained. Then, the basis theoretical and calculation principle of DOAS are introduced in detail. Next, according to the actual detection environment, a cyclic iterative algorithm is designed for the spectral absorption characteristics of measured gas. Finally, the spectral data are obtained through experiments, and use the DOAS method and cyclic iteration algorithm to calculate the concentration of SO2. It is concluded that the cyclic iteration algorithm is superior to the content monitoring of SO2 in flue gas, and greatly reduces the calculation deviation, finally control the error within 2%. The cyclic iteration algorithm is not only suitable for the concentration monitoring of the gas in the paper. It has a high accuracy for the detection of exhaust gas emissions in industrial production, especially for the concentration measurement of the of various components in the mixed gases with overlapping absorption spectra. The study results provide a good technology for industrial development and environmental protection. It make the factory exhaust gas to reach the safety target, and reduce the air pollution. ACKNOWLEDGMENT Provincial Science and Technology Project, Shaan’xi Provincial Education Department Project (15JF019). REFERENCES [1] Sun Liqun, Chen Kexin, Yang Huadong, “On-line detection of atmospheric trace gases based on differential absorption light spectrum,” J.Applied Optics, Vol.33, No.1, Jan.2012, pp.115-119. [2] Wang Kunpeng, Wang Xianzhong, Design of Portable smoke detector based on AVR Microcontroller. D. Zhengzhou: Zhengzhou University, 2013. [3] Deng Meng. “Application and research of portable flue gas analyzer based on non-dispersive ultraviolet absorption method in flue gas sulfur dioxide monitoring,” J. Comprehensive Utilization of Chinese Resources, Vol.34, No 2, Feb.2016, pp.23-26. [4] Wang Jing, Huang Yunbiao, “ The study on low concentration SO2 On-line Monitoring Technology based on DOAS,” J.Optics Technology, Vol.42, No.6, Nov. 2016, pp.567-570. [5] Zhou Mi, Yang Xi, Zhang Minghui,“Discussion on the monitoring method of sulfur dioxide in sinter smoke,” J.Fine Chemical Intermediate, Vol.47, No.2, Apr.2017, pp.68-72. [6] Yan Yue, Yan Shi, Yang Yongbin,Jiang Bin, “Application ofAdaboost integrated BP neural network in the detection of SO2 concentration in thermal power plant,”Transducer and Micro-system Technologies, Vol.35, No.9, May.2016, pp.148-151. [7] Xu Shuping, Liu Yushu,“A portable gas analyzer based on cyclic iterative algorithm,” J. Journal of Xi'an Technological University, Vol.33, No.7, Jul.2013, pp.543-548. [8] Wang Yingjian, Feng Hailiang,Concentration monitoring of mixed gas of Sulfur dioxide and nitricoxide based on UV absorption spectrum, D. Chongqing: Chongqing University, 2016. [9] Jiang Xuqian, Wang Qingbao, Design of portable ultraviolet flue gas analyzer, D. Nanjing: Nanjing University of Science and Technology , 2012. [10] Chen Bin, Wang Zhihua, Design of UV flue gas analyzer,D. Nanjing: Nanjing University of Science and Technology, 2013.