# A Crack Characterization Method for Reinforced Concrete Beams Using an Acoustic Emission Technique
## 3 Technical Background
### The CUMSUM Algorithm  
The CUMSUM is a technique for sequential analysis developed by [PERSON] [41] that is usually used for change detection for monitoring purposes. In this technique, the quality number \(\theta\) is used as a parameter of the probability distribution. For example, \(\theta\) can be the data mean. The CUMSUM method can be devised to deduce changes in the parameter. Additionally, a criterion to decide when to take corrective action is also proposed in the CUMSUM. If we use the CUMSUM algorithm to track changes in \(\theta\), it is possible to detect the steps of a time series.  
Let the \(MD[w]\) be a discrete random signal with independent and identically distributed samples that follow a probability density function (PDF). The deterministic parameter can either be a mean (\(u_{w}\)) or variance (\(\sigma_{w}^{2}\)) of the \(MD[w]\). The \(MD[w]\) may contain an abrupt change occurring at the change time \(w_{c}\). Based on the theory proposed by [PERSON], this change is modeled by the instant modification of \(\theta\), taking place at the change time \(w_{c}\). Therefore, \(\theta=\theta_{0}\) before \(w_{c}\) and \(\theta=\theta_{1}\) from \(w_{c}\) to the current sample. For the above-mentioned assumptions, the entire PDF of the signal \(P_{w}\), observed between the first sample (\(MD\left[0\right]\)) and the current one (\(MD\left[k\right]\)), can have two different forms:  
1. Under the no-change hypothesis (\(H_{0}\)), the PDF of \(MD\) (\(w\)) is \[P_{w}|H_{0}=\prod_{w=0}^{k}P\left(MD[w],\theta_{0}\right)\] (6)
2. Under one change hypothesis (\(H_{1}\)), the PDF is as follows: \[P_{w}|H_{1}=\prod_{w=0}^{w_{c}-1}P\left(MD[w],\theta_{0}\right)\prod_{w=w_{c} }^{k}P\left(MD[w],\theta_{1}\right)\] (7)  
To design the CUMSUM algorithm, a sudden change in the past signal has to be sequentially detected sample after sample. For every new sample \(MD\left[k\right]\) either \(H_{0}\) or \(H_{1}\) must be decided. If \(H_{1}\) is decided, it is necessary to decide the change time using an estimator, \(\hat{w}_{c}\). It is quite difficult to choose between \(H_{0}\) and \(H_{1}\). If \(H_{1}\) is decided, it can be concluded that an abrupt change is detected. One easy way to solve this is calculating the loglikelihood ratio. If the loglikelihood ratio is greater than the set threshold (\(h\)), we can determine the set hypothesis to be \(H_{1}\). To obtain a simplified version of the algorithm, we need an instantaneous loglikelihood ratio at time \(w\). This is derived by the following equation:  
\[s[w]=\ln\left\{\frac{P(MD[w],\theta_{1})}{P(MD[w],\theta_{0})}\right\} \tag{8}\]The cumulative sum from 0 to \(k\) can be written as  
\[S[k]=\sum\limits_{w=0}^{k}s[w] \tag{9}\]  
The loglikelihood function can be rewritten as  
\[L_{MD}[k,w_{c}]=S[k]-S[w_{c}-1] \tag{10}\]  
Finally, the decision function and the estimator can be written as  
\[G_{MD}[k]=S[k]-\min\limits_{1\leq w_{c}\leq k}S[w_{c}-1] \tag{11}\]  
\[\hat{w}_{c}=\operatorname*{argmin}_{1\leq w_{c}\leq k}S[w_{c}-1] \tag{12}\]  
Algorithm 1 describes the CUMSUM algorithm in brief based on the above discussion and formulations.  
```
Initialization  set the detection threshold \(h>0\) \(k=0\) end while whilethe algorithm is not stoppeddo  measure the current sample \(MD\)\([k]\) \(s[k]=\ln\(\frac{P(MD[k],\partial_{1})}{P(MD[k],\partial_{0})}\) \(S[k]=\sum\limits_{w=0}^{k}s[w]\) \(G_{MD}[k]=S[k]-\min\limits_{1\leq w_{c}\leq k}S[w_{c}-1]\) if\(G_{MD}[k]>h\)then \(w_{d}\gets k\) \(\hat{w}_{c}=\operatorname*{argmin}_{1\leq w_{c}\leq k}S[w_{c}-1]\) stop or reset the algorithm end \(k=k+1\) End
```  
**Algorithm 1** CUMSUM Algorithm