## 4 Gain Correction
### Algorithm with Reference  
The above-identified problems with the basic algorithm for \(\hat{g}_{t}\) given in (17) can be practically circumvented by introducing a _reference node_, similar to the case of offset calibration presented in Section 3.2. We assume again that the first node has been micro-calibrated in advance, so that \(\hat{g}_{ref}^{1}=\alpha^{1}\hat{a}_{t}^{1}=\alpha^{1}\hat{a}_{0}^{1}\) represents a reference gain (one can fix, in the ideal case, that \(\hat{a}_{0}^{1}=1/\alpha^{1}\) after micro-calibrating sensor \(1\) in a convenient way). In practice, our desire is to construct an algorithm that is able to achieve that all \(\hat{g}_{t}^{i}\), and \(i=2,\ldots,n\) are asymptotically as close as possible to each other, at the same time ensuring a small distance from the ideal reference value. Formally, we derive local recursions for \(s_{t}^{i}=\hat{g}_{t}^{i}-g_{ref}^{1}\) in a similar way as those for \(r_{t}^{i}\) in the case of offset calibration, \(i=2,\ldots,n\). After straightforward manipulations with (19), we obtain  
\[s_{t+1}^{i}=s_{t}^{i}+\delta\Delta x_{t}^{2}\alpha^{i2}\sum_{j}\gamma_{ij}[(s_{t }^{j}-s_{t}^{i})+(w_{t\delta t}^{j}-w_{t\delta t}^{i}\hat{g}_{t}^{i})](1-w_{t} ^{i}). \tag{20}\]  
Further, we have \(\sum_{j=1}^{n}\gamma_{ij}w_{t\delta t}^{j}\hat{g}_{t}^{j}=\sum_{j=1}^{n}\gamma _{ij}w_{t}^{j}(s_{t}^{j}+1)\) (where we have included \(g_{ref}^{1}=1\)). Therefore, the algorithm model at the network level becomes  
\[s_{t+1}=s_{t}+\delta\Delta x_{t}^{2}(\alpha^{-})^{2}[(\Gamma_{t}^{w})^{-}s_{t} +(I+W_{t}^{-})\Gamma^{-}w_{t}^{-}], \tag{21}\]  
where \(s=[s^{2}\cdots s^{n}]^{T}\), \(\alpha^{-}=\operatorname{diag}\{\alpha^{2},\ldots,\alpha^{n}\}\), \((\Gamma_{t}^{w})^{-}\) is obtained from matrix \(\Gamma_{t}^{w}\) by extracting the sub-matrix corresponding to the indices \(i,j=2,\ldots,n\), and \(w_{t}^{-}=[w_{t}^{n}\cdots w_{t}^{n}]^{T}\). The global model (21) is a linear time-varying system, to which the B.I.B.O. stability result given below in Theorem 3 can be applied. It is to be noticed that additional time variations, making the analysis of (21) more complex than the analysis of (11), result from the term \(\Delta x_{t}^{2}\). In order to apply the general theory of time-varying systems, we need an additional assumption concerning the sequence \(\{\Delta x_{t}\}\). 1. \(\sum_{i=1}^{N}\Delta x_{t}^{2}=\infty\). Assumption A4 prevents situations in which the presence of too small increments of \(x_{t}\) makes convergence of the algorithm too slow; in other words, we require that the signal is sufficiently exciting for the considered algorithm, see, e.g., [49]. Similarly, the assumption that \(x_{t}\) is a random process leads to the condition \(E\{\Delta x_{t}^{2}|\hat{g}_{t},\hat{g}_{t-1},...\}>0\), see [44; 45]. **Remark 11**. : _Notice that the only formal restriction concerning the measured signal is given in A2 and A4. In principle, variability in the input signal may have positive effects on the calibration procedure (as in process identification; for example, see [49; 61])._  
**Theorem 3**. : _Let the model (21) hold and let the assumptions A1-A4 be satisfied; let node \(1\) be a center node of the graph \(\mathcal{G}\). Then, the following are true:_  
1. \(\forall t>0\)__\(\exists x_{1}^{\prime}>0\)_, such that_ \(\forall(0<\kappa_{1}<x_{1}^{\prime})\)_; the inequality_ \(\|w_{t}^{-}\|<\kappa_{1}\) _implies_ \(\max_{I}\mathcal{R}\{\lambda_{I}(\Gamma_{t}^{w})^{-}\}<\kappa_{2}<0\)_, where_ \(\lambda_{I}(\cdot)\) _is the_ \(l\)_-th eigenvalue of an indicated matrix._
2. \(\exists\kappa_{3}>0\)_, such that_ \(\exists\delta^{\prime\prime}>0\)_, such that the model (_21_) is uniformly asymptotically stable_ \(\forall(0<\delta<\delta^{\prime\prime})\)_, if, in addition,_ \(\|\Delta x_{t+1}^{2}(\alpha^{-})^{2}(\Gamma_{t+1}^{w})^{-}-\Delta x_{t}^{2}( \alpha^{-})^{2}(\Gamma_{t}^{w})^{-}\|<\kappa_{3}\)_,_ \(\forall t>0\)_._
3. _The model (_21_) is B.I.B.O.-stable._
4. \(\|s_{t}\|\to 0\)_, when_ \(t\to\infty\) _and_ \(\|w_{t}\|\to 0\)_._  
Proof.