## 4 A Hybrid Algorithm for Power Allocation in Macrocell/Femtocell Architecture
### Estimating Link Data Rate

In this step, the agent estimates the number of resource block for each video connection. The agent depends mainly on video rate encoding and the date rate of channel after mitigating interference by proceeding as the following:

* The achievable data rate \(u_{m}\) for all video connections in the system is calculated according to their CQIs. * The number of RBs for video connection in the system is calculated depending principally on the video and the physical layer data rates. Thus, the calculation of the number of RBs can be achieved by the following equation: \[h=\lceil\frac{u_{i}}{|M_{t}|}\sum_{j\in M_{t}}u_{j}\frac{\bar{u}_{i}}{|M_{t}|} \sum_{j\in M_{t}}\bar{u}_{j}\rceil,\] (12) where \(\bar{u}_{i}\) is the average traffic rate for video connection \(i\). In essence, this allocation exploits multiuser diversity by allocating more RBs to the connection with better channels. For instance, assuming that average traffic rates of all connection are equal, the factor \(u_{i}/\frac{1}{|M_{t}|}\sum_{j\in M_{t}}u_{j}\) is equal to one. A connection with relatively good channel conditions, i.e, its \(\bar{u}_{i}(t)>\sum_{j\in M_{t}}\bar{u}_{j}(t)/|M_{t}|\) will initially be allocated two or more RBs. On the other hand, a UE with relatively bad channel conditions will initially be allocated only one RB. The role of weighting factor \(u_{i}/\frac{1}{|M_{t}|}\sum_{j\in M_{t}}u_{j}\) is to weight the allocation proportional to video's average rate [26]. ### Matching between Resource Blocks and SVC Segments

After obtaining the number of RBs for each connection, it should be decided how many video segments of BL and ELs can be transmitted approximately. We hereby define the term \"resolution\" to indicate the level of temporal segmentation and the number of ELs [25]. To this regard, if BL is guaranteed to be delivered, while more ELs can be also obtained when the link can afford it, a better video quality can be expected. Let \(V=(v_{1},...,v_{h})\) be the set of RBs allocated to each video connection and \(RV=(Rv_{1},...,Rv_{h})\) are the date rate of each RB. Let \(R_{BL}\) be the bit rate of BL and \(R_{EL}\) be the bit rate of EL. The algorithm starts to allocate RBs to the BL and EL by comparing the sum of RBs data rate to the sum of both EL and BL data rate by

\[\sum_{i=1}^{h}RV_{i}\geq\sum_{j=1}^{J}R_{EL_{j}}+R_{BL}, \tag{13}\]

where \(j\) is the number of then ELs in the connection. If this condition is true, then allocate all the RBs to the connection; otherwise, if

\[\sum_{i=1}^{h}RV_{i}\geq\sum R_{BL}, \tag{14}\]

then allocate only RBs to BL, so we can guarantee that the video streaming will be delivered with the minimum quality of minimum resolution due to the lack of enough RBs allocated to the connection. ## 6 Simulation Analysis

### Network Topology

We used the LTE-Sim simulator to implement the proposed power allocation approach. Our network topology consists of multiple cells [27]. Each MUE is randomly positioned and is moving according to Manhattan walk mobility model. The Fs are located in a street with a rational distance from an MBS (\(>\)300 m). Each F is placed in one building with four FUEs who are CSG users having low speed mobility compared to the outdoor users (3 km/h). The simulation parameters are listed in Table 3[24]. As for the path loss propagation model, we specified it according to the 3 GPP TSG especially for the channel gain \(|G_{T,R}|^{2}\) between (T) \(M/F_{i}\) and (R) \(MUE_{i}\) can be computed as in [28]:

\[L_{(d_{M,MUE_{i}})}=128.1+37.6\times log_{10}\left(D\times 0.001\right), \tag{15}\]

\[L_{(d_{F_{i},MUE_{i}})}=128.1+37.6\times log_{10}\left(D^{\prime}\times 0.001 \right)+B, \tag{16}\]

where \(B\) is the external wall attenuation (20 dBm) if the MUEs is found outside, and \(D\) and \(D^{\prime}\) are the distance between a \(MUE_{i}\) and their \(M\) and \(F_{i}\), respectively. Regarding the SVC configuration and parameters, H.264/SVC video coding with frame rate expressed by the number of temporal layer has been used.