# A New Algorithm Model Based on Extended Kalman Filter for Predicting Inter-Well Connectivity
## 2 Construction of the SV-DC Model  
### Traditional Capacitance Model  
The capacitance model used for well connectivity evaluation introduced in the literature review is referred to as the traditional capacitance model (TC model) hereafter, so it can be distinguished from the new model proposed in this paper (SV-DC model). The TC model effectively captures the dynamic relationships between injectors and producers, making it a valuable tool for reservoir management. Considering a reservoir with \(N_{i}\) injectors and \(N_{j}\) producers, the total mass balance equation is [21]:  
\[C_{t}V_{ij}\frac{d\overline{p}_{ij}}{dt}=\lambda_{ij}Q_{wi}(t)-Q_{ij}(t) \tag{1}\]  
where \(C_{t}\) represents the compressibility; \(V_{ij}\) denotes the pore volume; \(Q_{ij}\) and \(\overline{P}_{ij}\) are the flow rate and average pressure between injector \(i\) and producer \(j\); \(Q_{wi}\) is the injection rate of injector \(i\); \(\lambda_{ij}\) is a proportionality coefficient that reflects the degree of influence of injector \(i\) on producer \(j\), known as the inter-well connectivity coefficient. \[Q_{ij}=J_{j}(\overline{P_{ij}}-P_{wfj}) \tag{2}\]  
where \(J_{j}\) is the productivity index of the production well, and \(P_{wfj}\) is the bottom-hole flowing pressure (BHP) of the production well. By taking the time derivative of Equation (2), we obtain:  
\[\frac{dQ_{ij}}{dt}=J_{j}(\frac{d\overline{P_{ij}}}{dt}-\frac{dP_{wfj}}{dt}) \tag{3}\]  
\[\frac{d\overline{P_{ij}}}{dt}=\frac{dQ_{ij}}{J_{j}dt}+\frac{dP_{wfj}}{dt} \tag{4}\]  
Substituting Equation (4) into Equation (1), it yields:  
\[C_{t}V_{ij}(\frac{dQ_{ij}}{J_{j}dt}+\frac{dP_{wfj}}{dt})=\lambda_{ij}Q_{wi}(t )-Q_{ij}(t) \tag{5}\]  
Equation (6) links the pore volume (connectivity volume) \(V_{ij}\) and \(\tau_{ij}\)[20]:  
\[\tau_{ij}=\frac{C_{t}V_{ij}}{J_{j}} \tag{6}\]  
where \(\tau_{ij}\) is the first order system's time constant and indicates how quickly the reservoir responds to changes in injection rates. Although calculated as a static parameter, \(\tau_{ij}\) varies dynamically in real reservoir conditions. Combining Equations (5) and (6) yields:  
\[\tau_{ij}\frac{dQ_{ij}}{dt}=\lambda_{ij}Q_{wi}(t)-Q_{ij}(t)-\tau_{ij}J_{j} \frac{dP_{wfj}}{dt} \tag{7}\]  
After reviewing the method used by previous researchers [34], it has been observed that as producer bottom pressure fluctuates much less than the production rate, the influence of the pressure term can be regarded as a secondary factor. Consequently, Equation (7) can be simplified into the following:  
\[\tau_{ij}\frac{dQ_{ij}}{dt}=\lambda_{ij}Q_{wi}(t)-Q_{ij}(t) \tag{8}\]  
Solving the differential equation for Equation (8) yields the following:  
\[Q_{ij}(t)=Q_{ij}(t_{0})e^{-\frac{t-t_{0}}{\tau_{ij}}}+\int_{t_{0}}^{t}\frac{ \lambda_{ij}}{\tau_{ij}}Q_{wi}(\zeta)e^{-\frac{t-\zeta}{\tau_{ij}}}\ d\zeta \tag{9}\]  
Taking into account that the total production rate \(Q_{j}(t)\) is the combined contributions from all injectors \(N_{i}\) to the producer \(j\), the total production rate \(Q_{j}(t)\) can be expanded as:  
\[Q_{j}(t)=\sum_{i=1}^{N_{i}}Q_{ij}(t)=\sum_{i=1}^{N_{i}}Q_{ij}(t_{0})e^{\frac{ -(t-t_{0})}{\tau_{ij}}}+\sum_{i=1}^{N_{i}}\lambda_{ij}\frac{e^{-\frac{t}{\tau_ {ij}}}}{\tau_{ij}}\int_{t_{0}}^{t}e^{\frac{\zeta}{\tau_{ij}}}Q_{wi}(\zeta)d\zeta \tag{10}\]  
Then, Equation (10) can be discretized with monthly intervals. The first term on the right of the equals sign is a time-dependent variable correlated with the initial production and decays exponentially over time as follows:  
\[Q_{ij}=J_{j}(\overline{P_{ij}}-P_{wfj}) \tag{2}\]0  
Thus, the discretized form of Equation (10) is given by  
\[Q_{ij}=J_{j}(\overline{P_{ij}}-P_{wfj}) \tag{2}\]1  
where \(Q_{j}(n)\) represents the producer's total production \(j\) in time step \(n\), \(n_{0}\) is the initial time, \(m\) and \(n\) are the time step indexes. The above derivation process is well documented elsewhere [34; 35] and lays the theoretical foundation of the TC model.