The Ultra-violet light emitted by the light source passes through the sample gas in the gas chamber, light of specific wavelength will be absorbed by the sample gas. The absorption of light is proportional to the concentration of the target gas which conforms to Lambert-Beer's law. An empirical relation curve between the laboratory calibrated absorbance and the concentration of the sample gas is established by spectral analysis, so the concentration of the target gas can be calculated in real time according to the absorbance of the sample gas.