## 2 Mathematical Modeling
### Dynamic Response Modeling  
The dynamic response time of the humidity sensor is the diffusion process of water molecules in the humidity sensing film, which [PERSON]'s second law of diffusion can describe [38]. The change in the molar concentration of water molecules can be expressed as:  
\[\frac{\partial\Delta Q(x,y,z,t)}{\partial t}=D_{x}\frac{\partial^{2}\Delta Q} {\partial x^{2}}+D_{y}\frac{\partial^{2}\Delta Q}{\partial y^{2}}+D_{z}\frac {\partial^{2}\Delta Q}{\partial z^{2}} \tag{8}\]  
where \(D\) is the diffusivity of water molecules. \(\Delta Q\) is the change in molar concentration of water molecules in the moisture-sensitive layer. As shown in Figure 1b, the moisture-sensitive medium consists of the area above the electrode plate (EP) and the size above the substrate (BASE). The absorption process of water molecules in these two parts should be considered separately. To simplify the model, the transport and diffusion of water molecules between the EP region and the BASE region are not considered. According to the basic assumptions of the model, the initial and boundary conditions of the water molecule molar concentration change model are shown in Table 1.  
In Table 1, \(i=1,2,\ldots,N-1\), \(M_{sur}\) is the molar volume concentration of water molecules on the upper surface of the dielectric, which can be considered the same as the volume concentration of water molecules in the environment where the current capacitive humidity sensor is located. \(M_{sur}\) can be expressed as a function of the current ambient relative humidity \(RH\), temperature \(T\), air pressure \(P\), and time \(t\):  
\[M_{sur}(t)=f(RH(t),T(t),P(t),t) \tag{9}\]  
Solving the boundary conditions can reduce the differential equation of Formula (8) to the first-order form. Integrating the space, the dynamic response \(h_{Q}(t)\) of the humidity sensor can be expressed as:  
\[ \begin{split} h_{Q}(t)&=L\times a\times(N-1)\times \frac{2D}{h_{1}+h_{2}}\sum\limits_{n=1}^{\infty}\exp\left\{\frac{-D(2n-1)^{2}n ^{2}t}{4(h_{1}+h_{2})^{2}}\right\}\\ &\qquad+L\times b\times N\times\frac{2D}{h_{1}}\sum\limits_{n=1} ^{\infty}\exp\left\{\frac{-D(2n-1)^{2}n^{2}t}{4h_{1}^{2}}\right\}\end{split}  \tag{10}\]  
where \(D\) is the effective diffusion coefficient of water molecules in the polyimide wet film. The number of water molecules \(Q(t)\) adsorbed on the dielectric can be expressed as the convolution between the molar volume concentration of water molecules on the surface of the dielectric and the dynamic response of the humidity sensor:  
\[Q(t)=M_{sur}(t)*h_{Q}(t)=\int_{-\infty}^{+\infty}M_{sur}(\tau)h_{Q}(t-\tau)d\tau \tag{11}\]  
According to the number \(Q(t)\) of water molecules adsorbed on the dielectric at time \(t\), the volume percentage \(\gamma\) of water vapor adsorbed by the dielectric can be calculated:  
\[\gamma(t)=\frac{Q(t)\cdot N_{A}}{L\times\left\{[N\cdot b+(N-1)a]\cdot h_{1}+( N-1)a\cdot(h_{1}+h_{2})\right\}}\times\frac{1}{\rho_{H_{2}O}} \tag{12}\]  
where \(N_{A}\) is Avogadro's constant \(N_{A}=6.022\times 10^{23}\). \(\rho_{H_{2}O}\) is the density of water. The relative permittivity \(\varepsilon_{1}(t)\) of the dielectric after water absorption can be expressed as:  
\[\varepsilon_{1}(t)=\left[\gamma(t)\cdot\left(\varepsilon_{H_{2}O}\lx@note{ footnote}{$\varepsilon_{1}(t)$}-\varepsilon_{pi}\lx@note{footnote}{$ \varepsilon_{1}(t)$}\right)+\varepsilon_{pi}\lx@note{footnote}{$ \varepsilon_{2}(t)$}\right]^{3} \tag{13}\]  
where \(\varepsilon_{H_{2}O}\) is the relative permittivity of water, and \(\varepsilon_{pi}\) is the relative permittivity of polyimide in a dry state. The constants \(\varepsilon_{H_{2}O}=78.54\) (at room temperature of 298 K) and \(\varepsilon_{pi}=2.93\) can be substituted.