## 4 Victim Detection
### Distributed Estimation Consensus  
Sensors are one of the most relevant parts for successful a victim detection process, due to that they are in charge of capturing all information from the environment. It is relevant to note that real sensors also capture noise in the measurements, which can come from electromagnetic noise, poor conditioning or even external factors depending on the type of sensors. This is the reason that in the present work, sensors are modeled using distributed linear least square with the presence of additive zero-mean Gaussian noise as shown in Figure 3 the sensing of a Gaussian signal without noise and in the presence of noise, respectively, based on the work presented in [38]. The underlying model involves the estimation of a linear function of a variable \(\beta\in\mathbb{R}^{q}\) which is additively affected by noise \(\varepsilon_{i}\) in each of the \(n\) sensors on the network, how was previously mentioned,  
\[\sigma_{i}=H_{i}\beta+\varepsilon_{i}, \tag{10}\]  
Figure 2: Consensus around a circle. where \(\sigma_{i}\), \(\varepsilon_{i}\in\mathbb{R}^{p_{i}\times 1}\) and \(H_{i}\in\mathbb{R}^{p_{i}xq}\) in which each value of the vector \(\sigma_{i}\) is a measurement channel of \(ith\) sensor, on the other hand, \(H\) is assumed to be of rank \(q\) which assures that the measurements are not entirely redundant. Taking into account that the aim of the Least Squares is to minimize the error, in the centralized case, we have by isolating it \(\varepsilon=\sigma-H\beta\) and then applying the square error \(\varepsilon^{2}=\varepsilon\varepsilon^{\prime}=\left(\sigma-H\beta\right)^ {\prime}\left(\sigma-H\beta\right)\) the result of which is \(\varepsilon^{\prime}\varepsilon=\sigma^{\prime}\sigma-2\sigma^{\prime}H \beta+\beta^{\prime}H^{\prime}H\beta\)which is a function \(f(\beta)\) that depends only on \(\beta\). In order to find the local or global minimums it is necessary to find the error gradient and the Hessian matrix, which in this case are \(\bigtriangledown f(\beta)=\frac{\mathrm{d}f}{\mathrm{d}\beta}=-2H^{\prime} \sigma+2H^{\prime}H\beta\), by isolating \(\beta\) it is found a minimum when,  
\[\hat{\beta}=\left(H^{\prime}H\right)^{-1}H^{\prime}\sigma, \tag{11}\]  
additionally to verify that is a minimum function, it must satisfy \(\frac{\mathrm{d}^{2}f}{\mathrm{d}^{2}\beta}=2H^{\prime}H>0\) taking as \(u\) a non-null vector by multiplying \(u^{\prime}H^{\prime}Hu>0\rightarrow\left(Hu\right)^{\prime}(Hu)\rightarrow \left\|Hu\right\|^{2}>0\). It is possible to conclude that due to the Hessian matrix it is always positive because the function is convex, and the critical point is not just a minimum is the optimum. Coming back to the distributed sensor network, it can be written as \(\hat{\beta}=\left(\sum_{i=1}^{n}{H_{i}}^{\prime}H_{i}\right)^{-1}\left(\sum_{ i=1}^{n}{H_{i}}^{\prime}\sigma_{i}\right)\) by solving the follow distributed optimization function \( \begin{array}{c}min\sum_{i=1}^{n}{f_{i}(\beta)}\\ s.t.\ \beta\in\mathbb{R}^{q}\end{array} \), as was shown previously each \(f_{i}::\mathbb{R}^{q}\rightarrow\mathbb{R}\) are convex function as a result the target function is given by the average of the gradient functions of each node as \(f^{*}=\frac{1}{n}\sum_{j=1}^{n}(f_{i})\), taking this into account, it can be evidenced that Equation (6) has the same form of the following  
\[\hat{\beta}=\frac{1}{n}\sum_{j=1}^{n}\sigma_{i}, \tag{12}\]  
concluding in this way that a consensus among the sensors can be achieved if some condition are satisfied, considering the iteration of a sensor as \(\hat{\beta}_{i}(k+1)=\hat{\beta}_{i}(k)+\Delta\sum_{j\in N_{i}}w_{ij}(\hat{ \beta}_{j}(k)-\hat{\beta}_{i}(k))\) in which \(\hat{\beta}_{i}(k)\) illustrate the estimation of sensor \(i\) of variable \(\beta\) at time \(k\),  
\[\lim_{k\rightarrow\infty}\hat{\beta}_{i}(k)=\left(\frac{1}{n}\sum_{i=1}^{n} \sigma_{i}\right)\mathbf{1}, \tag{13}\]  
Figure 3: Additive Gaussian noise applied to a measurements in sensors.