# Optimal Mobility-Aware Wireless Edge Cloud Support for the Metaverse
## 3 System Model
### Latency, Energy Consumption and Quality of Perception Experience  
Similar to our previous work in [12], the MAR service can be decomposed into computational-intensive and storage-intensive functionalities and are defined as \(\eta\) and \(\varrho\), respectively. For these functionalities, their corresponding execution locations are then denoted as \(x_{ri}\) and \(y_{ri}\), respectively [12]. In a mobility event, the user's moving probability from the starting location to an allowable destination can be known to mobile operators through learning from the historical data and, hence, is defined as \(u_{f(r)k}\in[0,1]\) (\(\{f(r),k\}\subset\mathbb{M}\)). The size of foreground interactions is denoted as \(F_{\eta r}^{fore}\), the size of pointers used for matching AROs is denoted as \(F_{\varrho r}\), and the size of the related model \(s\) used for background content checking is \(F_{sr}^{back}\)[9; 12]. During the matching and background-content validation process, the target AROs and/or the background content are possibly not pre-cached in the local cache, and such a case is known as a \"cache miss\" (otherwise there is a \"cache hit\"). A cache miss in the local cache inevitably triggers the redirection of the request to the metaverse region stored in a core cloud deeper in the network and this extra cost in latency is defined as the penalty \(D\). After rendering, the model and target AROs are integrated into a compressed final frame for transmission and its compressed size is denoted as \(F_{sr}^{res}\). In this section, a joint optimization scheme is proposed which aims to balance the service delay and the energy consumption under the constraint of the user perception quality of the decomposed metaverse AR services in the EC supported network. The cache hit/miss is expressed by the decision variable \(z_{rj}\) and can be written as follows,  
\[z_{\eta j}= \begin{cases}1,\text{ if }\sum_{l\in\mathbf{L_{rs}}}\sum_{s\in \mathbf{S_{r}}}p_{sj}h_{rl}^{s}\geqslant L_{rs},\\ 0,\text{ otherwise}.\end{cases}  \tag{12}\]  
The cache capacity of an EC and the cache hit/miss relation can be written as follows,  
\[\sum_{r\in\mathbf{R}}\sum_{l\in\mathbf{L_{rs}}}\sum_{s\in\mathbf{S_{r}}}p_{sj }h_{rl}^{s}\mathcal{O}_{l}\leq\Theta_{j},\forall j\in\mathbf{M},\ j\
eq j, \tag{13}\]  
\[ \begin{split}\sum_{l\in\mathbf{N}}\sum_{s\in\mathbf{S_{r}}}h_{rl}^ {s}+\epsilon\leq L_{rs}+U(1-q_{rj})\\ \forall j\in\mathbf{M},\ j\
eq j_{r},r\in\mathbf{R}\end{split}  \tag{14}\]where \(\Theta_{j}\) denotes the cache available memory at node \(j\). In (14), to transfer the either-or constraint (i.e., \(\sum_{l\in\mathbf{N}}\sum_{\varepsilon\in\mathbf{S_{r}}}h_{rl}^{s}<L_{rs}\) or \(2r_{j}=1\)) into inequality equations, we bring in \(\epsilon\) as a small tolerance value, \(U\) as a large arbitrary number and \(q_{rj}\) as a new decision variable satisfying \(1-q_{rj}=z_{rj}\)[12]. Undoubtedly, increased levels of pro-caching decisions related to the background models and embedded AROs in a request inevitably brings about an extra execution burden for the matching function. Taking the above into account, the actual processing delay of the computational-intensive function can be expressed as follows,  
\[V_{rj}=\frac{\omega_{\eta}F_{\eta r}^{fore}}{f_{V}^{j}} \tag{15}\]  
Similarly, the processing delay of the matching and background-content checking function is assumed to happen only at servers, and can be written as  
\[W_{rj}=\frac{\omega_{\varrho}(F_{\varrho r}+\sum_{l\in\mathbf{L_{rs}}}\sum_{ \varepsilon\in\mathbf{S_{r}}}p_{sj}h_{rl}^{s}O_{l}+\sum_{\varepsilon\in \mathbf{S_{r}}}F_{sr}^{back}p_{sj})}{f_{V}^{j}} \tag{16}\]  
where \(\omega_{\eta}\) and \(\omega_{\varrho}\) (cycles/bit) represent the computation load of foreground interaction and background matching, \(f_{V}^{j}\) is the virtual CPU frequency (cycles/sec), and \(F_{\varrho r}\) is the size of uploaded pointers of AROs in foreground interactions [9; 12].