# Autonomic Network Management and Cross-Layer Optimization in Software Defined Radio Environments
## 4 Realization of ANMO-SDR in SDR-Based CRNs
### Virtual Utility Function Computation  
The objective is to determine and assign non-interfering available channels to neighboring SU pairs. To achieve this, the above framework seeks to minimize an \"energy\" function, which is decomposed into a sum of set functions, called potentials, computed over the cliques of the network. The \"energy function\" corresponds to the VUF, requested from the MNs to be determined/computed by a respective VM assigned by the SDN controller. In particular, we consider the class of pairwise, nearest-neighbor potentials, where the potential of a clique is equal to 0 if it is not a singleton or doubleton:  
\[U(\omega)=\sum_{s\in S}V_{\{s\}}^{(1)}\left(x_{s}\right)+\sum_{\{s,k\}\in(S \times S),\ k\in G_{s}}V_{\{s,k\}}^{(2)}\left(x_{s},x_{k}\right) \tag{1}\]  
The potential function of singletons expresses the desire for increased bandwidth and fulfilled QoS requirements that drives each node to demand more radio resources (channels). Thus, it is designed with the purpose of increasing the spectrum utilization by minimizing the number of non-assigned available channels at each SU. To quantify this desire we employ a sigmoid utility function, which depending on the parametrization chosen can be used for different services with diverse objectives (e.g., \(d=0\) corresponds to a network with best-effort traffic based on the proportional fairness concept): \(sig(x)=\frac{A}{1+e^{-C(x-d)}}+B\). The parameters \(A\) and \(B\) determine the range of the sigmoid function, whereas \(d\) is the inflection point, i.e., the critical threshold above which there is a significant increase of satisfaction. The variable \(x\) represents the assigned amount of resources, which is equivalent to the number of assigned channels at each node \(s\) denoted by \(\left|\left|\vec{u}_{s}\right|\right|_{1}\). Taking into account all of the above, the potential function of singletons is chosen as follows:  
\[V_{\{s\}}^{(1)}\left(x_{s}\right)= \begin{cases}\lambda_{1}\cdot\left(1-\frac{ A}{1+exp(-C(x_{s}-d))}-B\right)&if\ \left|\left|\vec{u}_{s}\right|\right|_{1}\geq 1\ and\\ &\vec{u}_{s}\cdot\vec{a}_{s}=\vec{u}_{s}\cdot\vec{1}\\ \delta_{1}>0&otherwise\end{cases} \]  
By setting the parameter \(\delta_{1}\) to a high value, we discourage a SU from transmitting at an unavailable channel or becoming disconnected (i.e., not selecting any channel at all). Modifying the sigmoidal function of the singleton terms, a term depending on the flows of the network layer can be included, thus extending the cross-layer approach to the three lower layers of the protocol stack. This feature was not realized in the implementation presented in the next section, but it will be included in our future work. The potential function of doubleton cliques expresses the energy cost inflicted by the interaction of competitive SUs and seeks for a joint optimization of physical-MAC layer operation. Through the assignment of orthogonal \(\vec{u}_{s}\) vectors between competitive users, collision-free secondary transmissions are guaranteed and channel congestion is avoided. Pair interactions of node \(s\) in its MRF neighborhood can be described by the following potential function, which exploits the interference information obtained through vector \(\vec{c}_{s}\) and the local exchange of vectors \(\vec{u}_{s}\) and \(\vec{a}_{s}\):  
\[V_{\{s\}}^{(2)}\;(x_{s},x_{k})= \begin{cases}\lambda_{2}\cdot\vec{u}_{s}\cdot \vec{u}_{k}&if\;k\in T_{s}\;and\;\vec{u}_{s}\cdot\vec{a}_{k}\
eq 0\\ \frac{\lambda_{2}\cdot\sum_{\vec{u}_{s}}\left(\vec{u}_{s}\cdot\vec{u}_{s} \right)+\lambda_{3}\cdot\vec{u}_{s}\cdot\vec{c}_{s}}{\left|\vec{c}_{s}\setminus \{T_{s}\}\right|}&if\;k\in G_{s}\setminus\{T_{s}\}\\ \delta_{2}>0&otherwise\end{cases} \]  
where the binary vector \(\vec{n}_{sj}\) is derived from vectors \(\vec{n}_{j}\) and \(\vec{u}_{s}\) and represents the channels used by nodes in \(T_{j}\setminus\{s\}\).