# Constant-Beamwidth LCMV Beamformer with Rectangular Arrays
## Appendix B Pseudocode Algorithms  
These algorithms are written in a Python-like pseudolanguage. Brackets can denote both vector definition and vector slicing/indexing. For example, \(a=[1,2,3,4,5]\) denotes a \(1\times 5\) vector, while \(b=a[0:3]\) denotes a \(1\times 3\) vector, such that \(b=[1,2,3]\) (last exclusive slicing, zero indexing). Comments are added where necessary to clarify the steps. ```
Input: \(\mathbf{h}_{1}\), \(\mathbf{h}_{2}\), \(\cdots\), \(\mathbf{h}_{K}\) # Input beamformers \(M_{1,y}\), \(M_{2,y}\), \(\cdots\), \(M_{K,y}\) # Beamformer y-axis sizes Output: \(\mathbf{h}\) # Full-array beamformer \(M_{\mathrm{x}}\), \(M_{\mathrm{y}}\) # Output beamformer sizes Procedure: \(\mathbf{H}\leftarrow[[1]]\) # \(1\times 1\) matrix \(M_{\mathrm{y}}\leftarrow 1\) for\(0\leq k<K\)do \(\mathbf{H}^{\prime}\leftarrow\mathcal{V}\)-\(\mathbf{1}\)(\(\mathbf{h}_{k}\); \(M_{k,y}\)) \(\mathbf{H}\leftarrow\mathbf{H}\)# \(\mathbf{H}^{\prime}\) \(M_{\mathrm{y}}\gets M_{\mathrm{y}}+M_{\mathrm{k,y}}-1\) endfor \(\mathbf{h}\leftarrow\mathcal{V}(\mathbf{H})\) \(M\leftarrow\mathrm{len}(\mathbf{h})\)# Length of output vector \(M_{\mathrm{x}}\leftarrow\frac{M}{M_{\mathrm{y}}}\)
```  
**Algorithm A1** RCKP beamforming algorithm  
```
Input: \(M_{1,\mathrm{x}}\), \(M^{\prime}_{2,\mathrm{x}}\), \(M^{\prime\prime}_{2,\mathrm{x}}\), \(M_{1,y}\), \(M_{2,y}\) # Array sizes \(\mathbf{d}_{\theta_{1},\mathrm{LCMV}}\), \(\cdots\), \(\mathbf{d}_{\theta_{N},\mathrm{LCMV}}\), \(N\)# LCMV nulls \(\mathbf{d}_{\mathrm{x}}\), \(\mathbf{d}_{\mathrm{y}}\)# Steering vectors \(\mathbf{\Phi}_{\mathrm{y}}\), \(\mathbf{G}\)# Coherence matrices \(\beta\)# CB parameter Output: \(\mathbf{h}\)# Full-array beamformer Procedure: # LCMV beamformer \(\mathbf{d}_{\mathrm{LCMV}}\leftarrow\mathbf{d}_{\mathrm{x}}[0:M_{1,\mathrm{x}} ]\otimes\mathbf{d}_{\mathrm{y}}[0:M_{1,y}]\) \(\mathbf{C}\leftarrow[\mathbf{d}_{\mathrm{LCMV}}\mathbf{d}_{\theta_{1},\mathrm{LCMV }}\)\(\cdots\)\(\mathbf{d}_{\theta_{N},\mathrm{LCMV}}]\) \(\mathbf{q}\leftarrow[1]+[0]*N\); \(\mathbf{q}\leftarrow\mathbf{q}^{\mathrm{T}}\)# Equation (12a) # CB beamformer \(\mathbf{d}_{\mathrm{CB}}\leftarrow\mathbf{d}_{\mathrm{y}}[0:M_{2,\mathrm{y}}]\) \(\mathbf{h}_{\mathrm{CB}}\leftarrow[0]*M_{2,\mathrm{y}}\); \(\mathbf{h}_{\mathrm{CB}}\leftarrow\mathbf{h}_{\mathrm{CB}}^{\mathrm{T}}\) for\(0\leq m<M_{2,\mathrm{y}}\)do \(\mathbf{h}_{\mathrm{CB}}[m]\leftarrow\mathrm{calcCB}(m,M_{2,\mathrm{x}},\beta)\)# \(\mathrm{calcCB}()\) is as in Equation (13) endfor \(\mathbf{h}_{\mathrm{CB}}\leftarrow\mathbf{h}_{\mathrm{CB}}/\sum\mathbf{h}_{ \mathrm{CB}}\)# SD and DS beamformers \(\mathbf{d}_{\mathrm{SD}}\leftarrow\mathbf{d}_{\mathrm{x}}[0:M^{\prime}_{2, \mathrm{x}}]\) \(\mathbf{d}_{\mathrm{DS}}\leftarrow\mathbf{d}_{\mathrm{x}}[0:M^{\prime\prime}_{ 2,\mathrm{x}}]\) \(\mathbf{h}_{\mathrm{SD}}\leftarrow\mathbf{d}^{\mathrm{-}\mathbf{d}_{\mathrm{x }}}_{\mathrm{d}^{\mathrm{-}\mathbf{d}}}\)# Equation (15a) \(\mathbf{h}_{\mathrm{DS}}\



## References

* (1) [PERSON]; [PERSON]; [PERSON] Opportunistic beamforming using dumb antennas. _IEEE Trans. Inf. Theory_**2002**, _48_, 1277-1294. [CrossRef]
* (2) [PERSON]; [PERSON] [PERSON]; [PERSON] [PERSON] Joint Optimization of LCMV Beamforming and Acoustic Echo Cancellation for Automatic Speech Recognition. In Proceedings of the (ICASSP '05), IEEE International Conference on Acoustics, Speech, and Signal Processing, Philadelphia, PA, USA, 23-23 March 2005; Volume 3, pp. 77-80. [CrossRef]
* (3) [PERSON]; [PERSON]; [PERSON] Acoustic beamforming for noise source localization--Reviews, methodology and applications. _Mech. Syst. Signal Process._**2019**, _120_, 422-448. [CrossRef]
* (4) [PERSON]; [PERSON]. _Handbook on Array Processing and Sensor Networks_; Wiley-IEEE Press: New York, NY, USA, 2009. * (5) [PERSON]; [PERSON] Beamforming: A versatile approach to spatial filtering. _IEEE ASSP Mag._**1988**, \(5\), 4-24. [CrossRef]
* (6) [PERSON]; [PERSON] _Wideband Beamforming Concepts and Techniques_; Wiley: New York, NY, USA, 2010.