## 2 Theory and Implementation
### NDIR Mathematical Model Based on \(\Delta\)-\(\Sigma\) Modulation with Temperature Drift
#### 2.3.1 Infrared Light Source  
According to the Heat Transfer Theory, it is given by [8]:  
\[\frac{HdT_{b}}{t_{s}}+G(T_{b}-T_{a})+A_{b}\epsilon_{b}\sigma T_{b}{}^{4}=P_{e}. \tag{1}\]  
For our proposed delta-sigma system, the scan time (\(t_{s}\)) is about microsecond and the time constant of infrared light source is about 200 ms from the datasheet. It means that \(dT_{b}\), \(dt\) can be replaced by \(\Delta T_{b}\) and \(t_{s}\), respectively, within enough accuracy and Equation (2) can be derived from Equation (1):  
\[\frac{H\Delta T_{b}}{t_{s}}+G(T_{b}-T_{a})+A_{b}\epsilon_{b}\sigma T_{b}{}^{4} =P_{e} \tag{2}\]  
where \(H\) is the heat capacity coefficient, \(G\) is the thermal conductivity coefficient, \(T_{a}\) is the room temperature, the subscript \(b\) refers to the infrared light source, \(\epsilon\) is the emissivity, \(\sigma\) is the coefficient of Stefan-Boltzmann, and \(P_{e}\) is the instantaneous power of the infrared light source.  
In addition, we discussed the working state of infrared light source in order to describe the temperature phenomenon and the working duty of light source more specific. \(\Delta T_{b}\) can be separately derived as \(\Delta T_{r}\) and \(\Delta T_{f}\) during preset scan time (\(t_{s}\)) in Equations (3) and (4).  
The temperature changes of the infrared light source during heating period, \(\Delta T_{r}\):  
\[\Delta T_{r}=\frac{P_{e}t_{s}}{H}-\frac{G(T_{b}-T_{a})t_{s}}{H}\ -\frac{A_{b} \epsilon_{b}\sigma T_{b}{}^{4}}{H}. \tag{3}\]  
The temperature changes of the infrared light source during cooling period, \(\Delta T_{f}\):  
\[\Delta T_{f}=-\frac{G(T_{b}-T_{a})t_{s}}{H}\ -\frac{A_{b}\epsilon_{b}\sigma T_{b}{}^{4} }{H}. \tag{4}\]  
From Equations (3) and (4), the description of physical phenomenon of the infrared light source based on \(\Delta\)-\(\Sigma\) modulation is derived and it yields the formulation that indicates the relationship between Ratio and the infrared light source can be expressed as Equation (5):  
\[\begin{array}{l}T_{b(t+Nt_{s})}\cong T_{b(t)}+m\Delta T_{r}+(N-m)\Delta T_{ f}\\ \cong T_{b(t)}+m\Big{[}\frac{P_{e}t_{s}}{H}-\frac{G(T_{b}-T_{a})t_{s}}{H}- \frac{A_{b}\epsilon_{b}\sigma T_{b}{}^{4}t_{s}}{H}\Big{]}+(N-m)\Big{[}\frac{G( T_{b}-T_{a})t_{s}}{H}-\frac{A_{b}\epsilon_{b}\sigma T_{b}{}^{4}t_{s}}{H}\Big{]}.\end{array} \tag{5}\]  
where \(T_{b(t)}\) is the initial temperature of the light source, \(T_{b(t+Nt_{s})}\) is the temperature after the light source is heated and cooled for \(N\) times, \(m\Delta T_{r}\) is the increased temperature when the light source is heated, and (\(N\)-\(m\))\(\Delta T_{f}\) is the decreased temperature when the light source is cooled.  
In this work, after the light source starts to work for a period of time, the temperature of the light source (\(T_{b}\)) will gradually balance with the room temperature (\(T_{a}\)). At the same time, the original temperature of light source (\(T_{b(t)}\)) will also tend to the operating temperature of light source (\(T_{b(t+Nt_{s})}\)). Therefore, we can obtain the approximate equation, which shows the relationship between the average operating temperature of the light source and Ratio in the steady state, as Equation (6):  
\[T_{b}\cong\bigg{(}\frac{m}{N}\frac{P_{e}}{A_{b}\epsilon_{b}\sigma}\bigg{)}^{1 /4}. \tag{6}\]