## 2 Modeling and Theory  
### Application of Beer-Lambert Law and Thermal Modeling to NDIR Response  
By combining a narrow bandpass filter, a detector, an IR illumination, and a gas chamber, we can create an optical system for NDIR gas sensors; also, these components impact the output signal of IR.  
The corresponding relations between the electrical model and thermal model can be revealed by the following heat equation. Changes in temperature over time for IR light sources are described with a simple heat transfer equation including the electrical heating power and heat dissipations.  
\[\frac{dT}{dt}=\frac{1}{c\rho s}p_{el}(t)-\frac{1}{c\rho s}k(T-T_{0})-\frac{1}{ c\rho s}\varepsilon\sigma(T^{4}-T_{a}^{4}) \tag{1}\]  
where \(c\) is the specific heat, \(\rho\) it's the density, \(s\) is the surface area of the light source wire which is also described in Figure 6, \(k\) is the heat transfer coefficient, \(\varepsilon\) is the emissivity, \(\sigma\) is the Stefan-Boltzmann constant. Electrical heating power \(P_{el}(t)\), dissipated for light source, is described as a function of the supplying voltage \(U(t)\) and resistance \(R(T)\) of the light source changed with the temperature \(T\), the initial temperature as \(T_{0}\), the room temperature as \(T_{a}\).  
\[p_{el}(t)=\frac{U^{2}(t)}{R(T)} \tag{2}\]  
Furthermore, the corresponding relationships between the electrical model and the optical model must be developed on the basis of the Beer-Lambert law, which characterizes the absorptivity of IR by a concentration of gas (\(C\)) and absorption length (\(d\)), as illustrated in Figure 1. A broadband infrared source creates IR, the gas in an optical tube's test chamber absorbs IR at gas-specific wavelengths, and an IR detector at the cell's end monitors residual radiation strength. A narrow bandpass gas-specific filter is positioned on the front of the sensor to measure the concentration of the target gas. In consequence, as the received IR light intensity (\(l\)) declines, so does the signal level of the IR sensor. While we take a look at the Stefan-Boltzmann law, we can find out that the fourth power of the temperature (\(T\)) is in direct proportion to the total power of the radiation received on the IR sensor per time (\(t\)), and the formulation for the sensor's net flux is given as (3). \(d(\theta)\) is the effective length of the well-controlled gas chamber matching to the angle \(\theta\), and \(\lambda\) is the gas absorption coefficient. \(A(\theta)\) and \(B\) are the geometrical parameter factors for the IR illumination and detector, respectively. \(T_{b}\) is called the working temperature, which is the temperature of the infrared light source after heating. \(A(\theta)\) is the geometrical parameter factor including the effective luminous surface area of the infrared light source, optical path of the gas chamber and the filter of the sensor. \(B\) is the geometrical parameter factor detector which keeps at the \(T_{a}\). Because \(T_{b}\)4 is much larger than \(T_{a}\)4, the product value of \(T_{a}\)4 term is ignored. Sincethe radiation from the source far outweighs the sensor, (3) may be rewritten and simplified in (4). The angle from 0 degrees counterclockwise to the optical is \(\theta\) degrees.  
\[I(t)=\int A(\theta)\varepsilon_{b}\sigma T_{b}^{4}(t)\times e^{-\lambda Cd( \theta)}d\theta-B\varepsilon_{a}\sigma T_{a}{}^{4} \tag{3}\]  
\[I(t)=A\varepsilon_{b}\sigma T_{b}^{4}(t)\times e^{-\lambda Cd} \tag{4}\]