# Calibration for Sample-And-Hold Mismatches in \(M\)-Channel TIADCs Based on Statistics
## 3 Mismatch Compensation
By considering all the distinctions between the mean squared differences indicated by (17), the loss function can be established as  
\[P=\sum_{i=1}^{M-1}\sum_{j=0}^{i-1}\Bigg{(}D_{v_{i},v_{i-1+}\big{|}\lfloor\frac {i-1}{M}\rfloor\big{|}_{M}}-D_{v_{j},v_{j-1+}\big{|}\big{|}\lfloor\frac{i-1}{ M}\rfloor\big{|}_{M}}\Bigg{)}^{2}. \tag{22}\]  
Only when all \(\beta_{m}=0\), the cost function \(P=0\). In Stage 1, the identified coefficient \(\hat{\beta}_{1}\) is searched as the following four steps. _Step 1:_ Calculate the mean squared differences between adjacent channels' compensated signals as (In practice, the limit expressed in (17) cannot be realized, and it is approximated by a batch of finite samples instead [3,5].) \[D_{p_{i},p_{i-1+}\big{|}\lfloor\frac{i-1}{M}\rfloor\big{|}_{M}}=\frac{1}{N} \sum_{n=1}^{N}\Bigg{(}p_{i}\left[Mn\right]-p_{i-1+\big{|}\lfloor\frac{i-1}{M} \rfloor\big{|}_{|M}}\left[M\cdot\left(n+\big{\lfloor}\frac{i-1}{M}\rfloor \right)\right]\Bigg{)}^{2}, \tag{23}\]  
where \(p_{0}[Mn]=v_{0}[Mn]\). _Step 2:_ Calculate the cost function as  
\[P=\sum_{i=1}^{M-1}\sum_{j=0}^{i-1}\Bigg{(}D_{p_{i},p_{i-1+}\big{|}\lfloor\frac {i-1}{M}\rfloor\big{|}_{|M}}-D_{p_{j},p_{j-1+}\big{|}\lfloor\frac{i-1}{M} \rfloor\big{|}_{|M}}\Bigg{)}^{2}, \tag{24}\]  
which is also shown in Figure 7.  
_Step 3:_ Calculate the partial differential of \(\hat{\beta}_{m1}\) as  
\[\frac{\partial P\left(k\right)}{\partial\hat{\beta}_{m1}\left(k \right)}= 2\sum_{i=m+2}^{M-1}\sum_{j=m}^{i-1}\left(D_{p_{i},p_{i-1}}-D_{p_ {j},p_{j-1}}\right)\left(-\frac{\partial D_{p_{j},p_{j-1}}}{\partial\hat{ \beta}_{m1}\left(k\right)}\right)\] \[+2\sum_{i=m}^{m+1}\sum_{j=0}^{m-1}\left(D_{p_{i},p_{i-1}}-D_{p_{j },p_{j-1+}\big{|}\lfloor\frac{i-1}{M}\rfloor\big{|}_{|M}}\right)\cdot\frac{ \partial D_{p_{i},p_{i-1}}}{\partial\hat{\beta}_{m1}\left(k\right)}\quad, \tag{25}\] \[R_{x}\left(\tau\right)=\lim_{N\rightarrow\infty}\frac{1}{N}\sum_{n=0}^{N}x \left[n\right]x\left[n+\tau\right]. \tag{19}\]0  
\[R_{x}\left(\tau\right)=\lim_{N\rightarrow\infty}\frac{1}{N}\sum_{n=0}^{N}x \left[n\right]x\left[n+\tau\right]. \tag{19}\]1  
\[R_{x}\left(\tau\right)=\lim_{N\rightarrow\infty}\frac{1}{N}\sum_{n=0}^{N}x \left[n\right]x\left[n+\tau\right]. \tag{19}\]2  
\[R_{x}\left(\tau\right)=\lim_{N\rightarrow\infty}\frac{1}{N}\sum_{n=0}^{N}x \left[n\right]x\left[n+\tau\right]. \tag{19}\]3where \(k\) means the \(k\)-th searching loop and \(m=1,2,\cdots,M-1\). _Step 4:_ Update the coefficients as  
\[R_{x}\left(\tau\right)=\lim_{N\rightarrow\infty}\frac{1}{N}\sum_{n=0}^{N}x \left[n\right]x\left[n+\tau\right]. \tag{19}\]4  
where \(\mu\) is the searching step. In Stage 2, the identification procedure is similar to the above four steps except that \(q_{m}[Mn]\) is used instead of \(p_{m}[Mn]\). The partial derivative \(\partial q_{m}\left[Mn\right]/\partial\hat{\beta}_{m2}\left(k\right)\) used in _Step 3_ is  
\[R_{x}\left(\tau\right)=\lim_{N\rightarrow\infty}\frac{1}{N}\sum_{n=0}^{N}x \left[n\right]x\left[n+\tau\right]. \tag{19}\]5  
Moreover, it should be noted that before the identification, notch filters with notch frequencies at \(m\cdot f_{s}/(2M)\) are needed to exclude the error caused by coherent sampling, where \(m=1,2,\cdots,M-1\).