## 3 SDMob Architecture
### Filter Design  
Tracking algorithms extend the localization of mobile entities in time via successive runs of localization and predictions. Higher error in localization/tracking of the mobile node leads to an erroneous calculation of the link quality and thus sub-optimal selection of parent nodes. The SDMob architecture offloads performing the filter to the more resourceful edge devices. Bayesian filters such as Kalman and particle filter, model the state space as a Hidden Markov Model as depicted in Figure 4. A hidden Markov model is a graphical statistical model that relates the unobservable states (actual position) to the previous states (by velocity) and the noisy observations (based on RSSI reports). Within the model, the Markovian property holds, meaning that each state (\(k\)-th) at a given time only depends on the previous state (\(k-1\)-th). Figure 3: Time diagram of handoff process in SDMob showing how buffer timer and congestion timer and SET/UNSET commands improve the basic SDMob [12]. The state vector and measurement vector at \(k\)-th time step are \(\mathbf{x}_{k}=[x\quad y\quad v_{x}\quad v_{y}]^{\mathsf{T}}\) and \(\mathbf{y}_{k}=[\bar{x}\quad\bar{y}\quad\bar{v}_{x}\quad\bar{v}_{y}]^{\mathsf{T}}\) respectively. \(x\) and \(y\) are positions within Cartesian coordinates. The transitional probabilities in a Markov process can be formulated using the Chapman Kolmogorov equation. Given a set of measurements before the current time slot \(z_{1:k-1}=z_{1},...,z_{k-1}\), the prior probability or \(p(x_{k}|z_{1:k-1})\) we have:  
\[p(x_{k}|z1:k-1)=\int R^{nz}p(x_{k}|x_{k-1})p(x_{k-1}|z1:k-1)dx_{k-1} \tag{1}\]  
And then after receiving the measurement \(z_{k}\), the posterior probability \(p(x_{k}|z_{1:k})\) can be given by Bayes rule:  
\[p(x_{k}|z1:k)=\frac{p(z_{k}|x_{k})p(x_{k}|z_{1:k-1})}{p(z_{k}|z_{z:k-1})} \tag{2}\]  
The state vector can be related to the previous state (Markov Property) using a function denoted by \(F\) in Equation (3) and the relation of each state with the corresponding measurements can be described using a function denoted by \(H\) in Equation (4). \[\mathbf{x}_{k}=F(\mathbf{x}_{k-1})+\mathbf{n}_{k-1} \tag{3}\]  
\[\mathbf{y}_{k}=H(\mathbf{x}_{k})+\mathbf{r}_{k} \tag{4}\]  
In this system model, \(\mathbf{n}_{k}\) and \(\mathbf{r}_{k}\) are the prediction and measurement noise respectively. These two noises are mutually independent. These equations are only analytically tractable if noise is Gaussian and functions are linear and Kalman Filter is only advantageous in linear functions and the presence of Gaussian noise. Some enhancements such as Enhanced Kalman Filter (EKF) focus on handling non-linear \(F\) and \(H\) functions. However, to counteract non-Gaussian noise under a non-linear trajectory in the controller, we are compelled to adopt some other techniques such as UKF or particle filter. Particle filter is also known as Monte Carlo Sampling and maintains a set of fully random particles as in Equation (5). The filter can take advantage of any a priori knowledge of the obstacles and infeasible positions when initializing the samples. \[p(x_{t})=\sum_{i=1}^{N}w_{i}\delta(x-x_{i}) \tag{5}\]  
Once it receives the RSSI measurements, first the distance can be estimated based on the radio model. Using the path loss model in Equation (7), the controller estimates the distance between MNs and distinct SNs and then applies triangulation. Here, \(P_{1}\) denotes the received signal strength in a 1 meter distance, and \(\alpha\) is a constant value, describing the radio propagation in the environment [44]. \[RSSI_{(d,t)}=RSSI_{d_{0}}-10\eta log_{10}(\frac{d}{d_{0}})+X_{\sigma} \tag{6}\]  
\[d=10^{\frac{RSSI-RSSI_{d_{0}}}{10\eta}} \tag{7}\]  
Figure 4: Markovian dependencies for the tracking problem. Then the filter updates the weights based on  
Figure 3:0  
In the prediction step, the filter moves all the particles based on the IMU information.