# A Sensitivity Analysis of a Computer Model-Based Leak Detection System for Oil Pipelines
## 3 Results and Discussion
### Uncertainty in \(R\) Factor
#### 3.1.2 Bulk Modulus Uncertainty  
In the leak detection system, the correction coefficient _BMC_ is applied to the wave speed:  
\[a_{c}^{2}=a^{2}\times(1-BMC) \tag{9}\]  
where \(a\) is the wave speed calculated using the input bulk modulus using Equation (3), and _a_c is the wave speed after correction. The bound for _BMC_ is set by a constraint parameter called _BMER_ and cannot exceed 0.5 [15]. Realistic errors of \(\pm 10\%\) in bulk modulus were introduced to the leak detection  
Figure 3: Effect of viscosity error on leak detectability in a system with \(R\) = 2.20 with 1% Gaussian noise: (**a**) flow decrease; and (**b**) flow increase. system. It was found that the bulk modulus error only marginally affected leak detectability during steady state operating conditions. This is because the error in wave speed only affects transient cases, and the transient wave caused by a small leak (e.g., 5% leak) was of small magnitude. Leak detection times changed by less than \(\pm 1\%\) compared to the baseline case when bulk modulus correction was disabled in Statefinder. Therefore, only results under transient operating conditions are discussed here. For all transient cases, _BMER_ was set to allow Statefinder to fully correct the bulk modulus error. This required _BMER_ to be 0.058 for +10% error and 0.078 for \(-10\%\) error. Figure 4 shows the effect of bulk modulus errors on leak detectability in an \(R\) = 2.20 system with perfect data. For the case with a +10% error in bulk modulus, the \(DVB\) curve collapsed onto the baseline curve. However, for the case with a \(-10\%\) error in bulk modulus, the \(DVB\) curve deviated from the baseline even though full correction was allowed. The leak was detected 4.9 and 7.0 min later than the 24.9 and 26.1 min with the baseline for flow decrease and increase transients, respectively. To determine the reason why the case with \(-10\%\) error in bulk modulus deviated from the baseline case even when full correction was allowed, the behavior of the bulk modulus correction coefficient _BMC_ was investigated. It was observed that the sign of _BMC_ did not always depend on whether the bulk modulus contained positive or negative errors. In Figure 5a, the _BMC_ is plotted for the case with \(-10\%\) error in bulk modulus for the flow decrease transient in the system with \(R\) = 2.20. Despite the fact that the bulk modulus required a positive correction, the sign of _BMC_ was positive (which would correspond to a negative correction in the bulk modulus) for a significant period of time. Since Statefinder does not output the computed wave speed, it is difficult to explain the observed _BMC_ behavior with certainty. However, a logical explanation is that the sign of _BMC_ is dependent upon the nature of wave propagations in the pipeline. The changes in pressure at the downstream end with and without leaks are also shown. The flow decrease transient at the downstream end caused the pressure to increase, and the two pressures (i.e., 0% and 5% leak) overlapped until the leak-caused transient arrived at the downstream end. _BMC_ was negative up to this point in time and wave speed was adjusted correctly. After this time, the pressure in the presence of a leak increased slower than if there was no leak. _BMC_ was consistently positive until a new steady state was achieved, except for a couple of instances where it briefly spiked to a negative value. The positive _BMC_ corresponds to a decrease in bulk modulus and wave speed, which is clearly incorrect. In contrast, Figure 5b plots _BMC_ for the case with +10% error in bulk modulus. A flow decrease transient was introduced at the upstream end which caused the pressure to decrease. Despite the fact that the bulk modulus required a negative correction, the negative _BMC_ corresponds to an increase in the bulk modulus and wave speed, which is also clearly incorrect. Figure 4: Effect of bulk modulus error on leak detectability in a system with \(R\) = 2.20 with perfect data: (a) flow decrease; (b) flow increase.