# Double-Layer Compressive Sensing Based Efficient DOA Estimation in WSAN with Block Data Loss
## 3 Double-Layer CS Framework-Based DOA Estimation
### Improved DOA Estimation by DCS-DDOA
#### 3.3.1 Joint Sparse Representation  
Suppose an \(N\)-point DFT has been performed on the raw data vector at each array sensor, i.e., \(\mathbf{x}_{h}=\mathbf{\Psi}\boldsymbol{\alpha}_{h},h=1,...,H\). As we plan to skip the step of signal recovery at the FC, the locations of the nonzero elements in \(\boldsymbol{\alpha}_{h}\) are unknown. Therefore, we need to deal with all of the \(N\) frequency sub-bands. In a similar fashion, the array output vector at the \(n\)-th frequency sub-band \(\mathbf{\tilde{\alpha}}\left[n\right]\) is presented as:  
\[\mathbf{\tilde{\alpha}}\left[n\right]=\mathbf{\tilde{A}}\left(n,\mathbf{ \tilde{\theta}}\right)\mathbf{\tilde{s}}\left[n\right]+\mathbf{w}\left[n\right] \tag{15}\]  
where \(\mathbf{\tilde{\alpha}}\left[n\right]=\left[\mathbf{\tilde{\alpha}}\left[n \right],...,\mathbf{\tilde{\alpha}}_{H}\left[n\right]\right]^{T}\), \(\mathbf{\tilde{A}}\left(n,\mathbf{\tilde{\theta}}\right)=\left[\mathbf{ \tilde{a}}\left(n,\mathbf{\tilde{\theta}}_{1}\right),...,\mathbf{\tilde{a}} \left(n,\mathbf{\tilde{\theta}}_{Q}\right)\right]\) is the array manifold matrix corresponding to the virtual source signal vector \(\mathbf{\tilde{s}}\left[n\right]\) and \(\mathbf{\tilde{a}}\left(n,\mathbf{\tilde{\theta}}_{q}\right)\) is the steering vector related to \(\mathbf{\tilde{\theta}}_{q}\). The sampling grid of all potential directions is denoted by \(\mathbf{\tilde{\theta}}=\left[\mathbf{\tilde{\theta}}_{1},...,\mathbf{\tilde {\theta}}_{Q}\right]^{T}\), and \(\mathbf{w}\left[n\right]\) is the noise vector.  
Spontaneously, we can derive the joint array output vector across the \(N\) frequency sub-bands as follows:  
\[\mathbf{\tilde{\alpha}}=\mathbf{\tilde{B}}\mathbf{\tilde{s}}+\mathbf{w} \tag{16}\]  
where \(\mathbf{\tilde{\alpha}}=\left[\mathbf{\tilde{\alpha}}^{H}\left[0\right], \mathbf{\tilde{\alpha}}^{H}\left[1\right],...,\mathbf{\tilde{\alpha}}^{H} \left[N-1\right]\right]^{H}\), \(\mathbf{\tilde{s}}=\left[\mathbf{\tilde{s}}^{H}\left[0\right],\mathbf{\tilde {s}}^{H}\left[1\right],...,\mathbf{\tilde{s}}^{H}\left[N-1\right]\right]^{H}\) is the joint sparse indicator vector, \(\mathbf{w}=\left[\mathbf{w}^{H}\left[0\right],\mathbf{w}^{H}\left[1\right],...,\mathbf{w}^{H}\left[N-1\right]\right]^{H}\) is the joint noise vector and \(\mathbf{\tilde{B}}=\text{diag}\left\{\mathbf{\tilde{A}}\left(0,\mathbf{ \tilde{\theta}}\right),\mathbf{\tilde{A}}\left(1,\mathbf{\tilde{\theta}} \right),...,\mathbf{\tilde{A}}\left(N-1,\mathbf{\tilde{\theta}}\right)\right\}\) is the joint array manifold matrix, with a dimension of \(HN\times QN\).  
Let us define a \(H\times N\) matrix \(\mathbf{D}=\left[\mathbf{\tilde{\alpha}}\left[0\right],\mathbf{\tilde{\alpha }}\left[1\right],...,\mathbf{\tilde{\alpha}}\left[N-1\right]\right]\). Observe that \(\mathbf{D}\) can also be represented as \(\mathbf{D}=\left[\mathbf{\alpha}_{1},\mathbf{\alpha}_{2},...,\mathbf{\alpha}_ {H}\right]^{T}\). Obviously, \(\mathbf{\tilde{\alpha}}=\text{vec}\left(\mathbf{D}\right)\) and \(\mathbf{\alpha}=\text{vec}\left(\mathbf{D}^{T}\right)\), so the elements in \(\mathbf{\alpha}\) and \(\mathbf{\tilde{\alpha}}\) are just the identical elements from the matrix \(\mathbf{D}\). In this way, we can construct a permutation matrix \(\mathbf{P}\) such that:  
\[\mathbf{\alpha}=\mathbf{P}\mathbf{\tilde{\alpha}} \tag{17}\]  
where \(\mathbf{P}\) is utilized to adjust the locations of the elements in \(\mathbf{D}\), mapping \(\mathbf{\tilde{\alpha}}\) onto \(\mathbf{\alpha}\), which can be easily obtained. Equation (17) relates \(\mathbf{\alpha}\), which emphasizes the sparsity in the frequency domain, to \(\mathbf{\tilde{\alpha}}\), which is the virtual array output vector corresponding to the sparse sources in the spatial domain. In other words, a joint frequency and spatial domain sparse representation of the sensor array data, which will be used for DOA estimation in the next step, is exhibited through the elements in matrix \(\mathbf{D}\)