# On Developing Techniques for Sharing Satellite Spectrum with Indoor Small Cells in 5G +
## 3 Mathematical Analysis
### Estimation of an Optimal Number of Almost Blank Subframes (ABSs)  
The arrival rates of the UEs of SBSs and CGC stations are not the same, and typically, the average number of satellite UEs is relatively lower than that of SBS UEs over a certain duration of time. Under such a scenario, static allocation of satellite spectrum resources to CGC stations and SBSs suffers from unfairness in resource allocation. We considered overcoming this effect by allocating the satellite spectrum to the UEs of CGC stations and SBSs in proportion to the ratio of the average rate of arrivals of UEs of one node to another over a certain time period as the condition for optimality. Given that for apartments deployed with only SBSs, the SBSs can be made active over the whole duration of time, the concept of an optimal number of TTIs allocated to SBSs, in this case, does not need to be addressed. However, for apartments where both a CGC station and a SBS are collocated, we intend to explore the above concept for an optimal condition in order to find an optimal number of TTIs allocated to SBSs per building. ```
01:Input:\(M_{\text{SPS}}\), \(M_{\text{aTMS}}\), \(T_{\text{APP}}\), \(t\in\{1,2,3,\ldots,T\}\), \(L\in\{1,2,3,\ldots,L_{\text{max}}\}\)\(m_{\text{SPS}}\in\mathbf{M_{\text{SPS}}}=\{1,2,3,\ldots,M_{\text{aTMS}}\}\)\(m_{\text{aTMS}}\in\mathbf{M_{\text{aTMS}}}=\{1,2,3,\ldots,M_{\text{aTMS}}\}\)
02:For\(t\in\{1,2,3,\ldots,T\}\)
03:For\(m_{\text{aTMS}}\in\mathbf{M_{\text{aTMS}}}=\{1,2,3,\ldots,M_{\text{aTMS}}\}\)
04:Find\(\sigma_{\text{aTMS}}\) using Equation (1) for all outdoor macro UEs
05:End
06:End
07:For\(L\in\{1,2,3,\ldots,L_{\text{max}}\}\)
08:For\(t\in\{1,2,3,\ldots,T\}\)
09:For\(m_{\text{SPS}}\in\mathbf{M_{\text{SPS}}}=\{1,2,3,\ldots,M_{\text{SPS}}\}\)
10:Find the following subsets of apartments for the building \(L\):
11:\(\{S_{\text{SBS}},\S_{\text{CGC}}\}\in\{S_{\text{SBS}}=\varnothing,\S_{\text{ CGC}}=\varnothing\}\)
12:\(\{S_{\text{SBS}},\S_{\text{CGC}}\}\in\{S_{\text{SBS}},\S_{\text{CGC}}=\varnothing\}\)
13:\(\{S_{\text{SBS}},\S_{\text{CGC}}\}\in\{S_{\text{SBS}}=\varnothing,\S_{\text{ CGC}}\}\)
14:\(\{S_{\text{SBS}},\S_{\text{CGC}}\}\in\{S_{\text{SBS}},\S_{\text{CGC}}\}\)
15: Estimate \(\xi_{\text{reuse}}=S_{F}/\Delta_{\text{3D cluster}}\) for the building \(L\)
16:For\(\forall|S_{\text{SBS}},\S_{\text{CGC}}|\in\{S_{\text{SBS}},\S_{\text{CGC}}= \varnothing\}\) % non-collocated
17:\(\forall t\ m_{\text{SPS}}\in\mathbf{M_{\text{SPS}}}\to s_{\text{SBS}}\in\mathbf{S_{ \text{SBS}}}\)
18:End
19:For\(\forall|S_{\text{SBS}},\S_{\text{CGC}}|\in\{S_{\text{SBS}},\S_{\text{CGC}}\}\) % collocated
20:If\(t==T_{\text{aABS}}\in\mathbf{T_{\text{aABS}}}\)
21:\(m_{\text{SPS}}\in\mathbf{M_{\text{SPS}}}\to s_{\text{SBS}}\in\mathbf{S_{\text{SBS}}}\)
22:Elseif\(t==T_{\text{ABS}}\in\mathbf{T_{\text{ABS}}}\)
23:\(m_{\text{SPS}}\in\mathbf{M_{\text{SPS}}}\to\varsigma_{\text{CGC}}\in\mathbf{S_{\text{ CGC}}}\)
24:End
25:End
26:End
27:End
28:Find system-level capacity, spectral efficiency, and energy efficiency for the orthogonal allocation of the satellite spectrum with small cells for the building \(L\) using Equations (17)-(19)
29:Find system-level capacity, spectral efficiency, and energy efficiency for the non-orthogonal allocation of the satellite spectrum with small cells for the building \(L\) using Equations (20)-(22)
30:End
31:Estimate and Output: Plot system-level capacity, spectral efficiency, and energy efficiency for both orthogonal and non-orthogonal spectrum allocations to small cells for all \(L\in\{1,2,3,\ldots,L_{\text{max}}\}\). Note that in nOSS, an optimal number of TTIs is estimated for the average number of SBSs and CGC stations per 3D cluster of these nodes, instead of per building, as in the case of OSS. According to [28; 29], sessions or call arrivals can be modeled as a Poisson process.