# On Deploying the Internet of Energy with 5G Open RAN Technology including Beamforming Mechanism
## 4 Implementation of Beamforming in Open RAN Networks
### Zero-Forcing Implementation  
Zero-forcing beamforming is a method that is widely considered in massive MIMO systems [11]. Zero-forcing encodes the signal sent to the air interface in such a way that the signals sent to different users are orthogonal. This reduces at the user's side, the interferences created by the signals sent to other users. The most straightforward approach to zero-forcing implementation is to invert the channel through the pseudo-inverse, called ZF precoding; this technique allows transmitting and receiving data to desired users and nullifying the directions from the interference users. The performance of zero-forcing beamforming depends on the accuracy of received channel status information (CSI) of each user to manage the precoder and beamforming weight vector. This channel carries the signal properties such as propagation features from the transmitter to the receiver, scattering, fading, and power consumption with distance [31; 32; 33]. For implementing zero-forcing, the BS sends a synchronization message applying the generated precoder \(\mathbf{W}\) in the O-RU (here where the beamforming has been applied), with size, \(Nt\ \times\ K\), so that the sampled transmitted signal is:  
\[\boldsymbol{x}\ =\ \sum_{k=1}^{K}\boldsymbol{w}_{k}s_{k}=\mathbf{W}\boldsymbol{s} \tag{2}\]  
where \(\mathbf{W}=[\boldsymbol{w}_{1},\boldsymbol{w}_{2},\ldots,\boldsymbol{w}_{K}] \ \in\mathbb{C}^{Nt\times K}\) is the precoding matrix, and \(\boldsymbol{s}=[s_{1},s_{2},\ldots,s_{K}]\) is a transmitted symbol vector. The received signal vector obtained by user \(k\) is given by  
\[y_{k}=\boldsymbol{h}_{k}^{*}\boldsymbol{x}+n_{k}\,\ k=1,2,3,\ldots,K \tag{3}\]  
This signal should be received by the desired user without signals from interference users, where the \(1\times Nt\) channel vector for user \(k\) is \(\boldsymbol{h}_{k}\ =\ [h_{1,k},h_{2,k},h_{3,k},\ldots,h_{Nt,k}]\), \((. )^{*}\) denotes complex conjugate, and \(n_{k}\) is the noise sample (additive white Gaussian noise with zero mean and variance \(\sigma_{n}^{2}\)). Theoretically the interference signal of user \(k^{\prime}\) that can be received by all users is given by:  
\[y_{k}\ =\ \boldsymbol{h}_{k}^{*}\sum_{k=1,k\
eq k^{\prime}}^{K}\boldsymbol{w}_{k} s_{k}+\boldsymbol{h}_{k}^{*}\boldsymbol{w}_{K}s_{K^{\prime}}+n_{k},k=1,2, \ldots,K \tag{4}\]  
The goal is nulling the interference signals, and to achieve this scenario we inserted Equation (2) into Equation (3); in general, a received signal is obtained given as in Equation (5). \[y_{k}=\boldsymbol{h}_{k}^{*}\sum_{k^{\prime}=1}^{K}\boldsymbol{w}_{k}s_{k}+ n_{k}\,k=1,2,3,\ldots,K \tag{5}\]From the transmit power constraint for user \(k\), which is \(P_{k}~{}=~{}E[|s_{k}|^{2}]\), we can calculate the interference caused by other users through the received SINR of the \(k\)-th user:  
\[\gamma_{ZF,k}~{}=~{}\frac{P_{k}\left|\mathbf{h}_{k}^{*}\mathbf{w}_{k}\right|^{2}}{\sigma _{n}^{2}~{}+~{}\sum_{k\
eq k}P_{k\
u}\left|\mathbf{h}_{k}^{*}\mathbf{w}_{k\
u}\right|^{2}} \tag{6}\]  
The ZF-BF precoding is closely related to the concept of generalized inverses in linear algebra, where each beam generated by the ZF-BF precoder is orthogonal to all the other user channel vectors. In the destination direction, we need to calculate the inverse of channel matrix \(\mathbf{H}~{}=~{}[\mathbf{h}_{1},\mathbf{h}_{2},\mathbf{h}_{3},\ldots,\mathbf{h}_{K}]\), and, for this aim, we applied the well-known Moore-Penrose inverse generalization to obtain \(\widetilde{H}~{}=~{}\left[\widetilde{h}_{1},\widetilde{h}_{2},\ldots, \widetilde{h}_{K}\right]^{*}\) and, recalling that \(\mathbf{W}~{}=~{}[\mathbf{w}_{1},\mathbf{w}_{2},\mathbf{w}_{3},\ldots,\mathbf{w}_{k}]\) denotes an \(Nt\times K\) matrix whose columns are transmit beamforming vectors then the ZF precoding vectors can be expressed as in Equation (7). \[\mathbf{W}=\widetilde{H}^{H}\left(\widetilde{H}\widetilde{H}^{H}\right)^{-1} \tag{7}\]  
where \((. )^{H}\) denotes Hermitian transpose.