diff --git a/paper/sections/00-header.tex b/paper/sections/00-header.tex index edd74f1bb041b171d75bfe28a195dfa4f497c8ae..53987d2978fcf67d5a5f33b580d6dbc043517e41 100644 --- a/paper/sections/00-header.tex +++ b/paper/sections/00-header.tex @@ -1,5 +1,5 @@ % bad trick -%\linespread{0.98} +\linespread{0.9998} %reduce space around equations \makeatletter diff --git a/paper/sections/06-results.tex b/paper/sections/06-results.tex index f9d2a9e6b9c8fcc84d43711fba3f3fdf02f392bb..3bdf286e8d8423bb1badabdb07652db57620452c 100644 --- a/paper/sections/06-results.tex +++ b/paper/sections/06-results.tex @@ -1,68 +1,4 @@ -This section describes the results obtained the model proposed in -Section~\ref{sec:gps:mod} and two different -implementations\footnote{The code for both the implementation will be - released in case the paper is accepted.}. The first one is written -in Modelica\footnote{http://www.modelica.org}, while the second one is -written in -Matlab\footnote{http://www.mathworks.com/products/matlab.html}. - -The purpose of the Modelica code is to obtain a powerful simulation -tool. The nature of Modelica -- in terms of composability and -object-orientation -- makes the implementation easy to embed. We use -the Modelica implementation to show how the model captures the -relevant dynamics of the GPS receivers, comparing the results obtained -with data obtained on real hardware. The implementation in Matlab ise -used for data analysis of real GPS traces and in combination with -sensor fusion algorithm as described in Section~\ref{sec:fusion}, to -experiment with the accuracy-battery trade-off. - -\subsection{GPS sensor dynamics} -\label{sec:res:gps} - -In this section we want to show how our model captures the dynamics of -the receiver. We start with the Time To First Fix (TTFF), the loss of -ephemeris data, and the loss of visibility. We use our Modelica model -to obtain simulation data. - -Figure~\ref{fig:TTFF} shows the results of a simulation aimed at -determining the TTFF. At time $t=10s$ the GPS receiver is turned on, -and we simulate how it fetches the position. The top row shows the -command signal. The GPS antenna has to be on for a minute before the -position becomes available. The position availability is shown in the -second row of the figure. As soon as the ranging data are received, a -position reading is taken. Then the sensor can be sampled at regular -intervals. - -As anticipated in Section~\ref{sec:related}, previous work discuss the -TTFF, e.g.,~\cite{bib:entracked-datadriven-modeling, - bib:feasibility-duty-cycling, bib:accuracy-adaptation}. However, no -contribution combines the TTFF with a model of the GPS technology. In -previous literature, the performances of GPS receivers in smartphones -are evaluated by looking at how much time it takes for a generic -application to get a position measure after the request is sent to the -GPS module. GPS sensors in smartphones implement an -\emph{Assisted-GPS} function, that allows the retrieval of the -ephemeris data from the internet instead of listening to the -satellites\footnote{The model presented in this paper can be adapted - to represent this allowing for an external input that possibly - triggers the transition \texttt{get\_ephemeris} before the delay - that instead represents the action of listening to the - satellites. The modeling of how much time the device requires for - fetching these informations from the internet and how much power - this procedure can take is non trivial because of the many different - (and often difficult to predict) involved components.}. - -Up to the (limited) extent to which they are comparable -- due to the -fact that are used Assisted-GPS sensors and the extra software layers -included in the experiments -- the results presented in these works -are coherent with the model presented here. Our model on the other -side achieves more generality, not being dependent on the specific -implementation and on the given device. Moreover, our model allows one -to look directly at what are the theoretical performances one can -expect from a GPS sensor, without the overhead that is introduced by -the operative system of a smartphone. - -\begin{figure}[t] +\begin{figure}[tb] \begin{tikzpicture} \begin{groupplot}[% group style = {group size = 1 by 2, vertical sep = 0.2cm, @@ -93,16 +29,26 @@ the operative system of a smartphone. \label{fig:TTFF} \end{figure} -Figure~\ref{fig:ephexpire} shows how our model captures the expiration -of the ephemeris data. The figure is organized as the previous one, -showing the turn on signal in the top row and the position -availability in the bottom row. It displays a duty cycling of the -sensor for quickly acquiring position -- i.e. a series of warm -starts. At time $t = 1861s$ the ephemeris data expire, making the duty -cycling ineffective. The sensor detects the loss of ephemeris data -after a few failed attempts and turns on the antenna. When the device -receives an update of the ephemeris data, the position becomes -available again as well as the possibility of performing warm starts. +This section describes the results obtained the model proposed in +Section~\ref{sec:gps:mod} and two different +implementations\footnote{The code for both the implementation will be + released in case the paper is accepted.}. The first one is written +in Modelica\footnote{http://www.modelica.org}, while the second one is +written in +Matlab\footnote{http://www.mathworks.com/products/matlab.html}. + +The purpose of the Modelica code is to obtain a powerful simulation +tool. The nature of Modelica -- in terms of composability and +object-orientation -- makes the implementation easy to embed. We use +the Modelica implementation to show how the model captures the +relevant dynamics of the GPS receivers, comparing the results obtained +with data obtained on real hardware. The implementation in Matlab ise +used for data analysis of real GPS traces and in combination with +sensor fusion algorithm as described in Section~\ref{sec:fusion}, to +experiment with the accuracy-battery trade-off. + +\subsection{GPS sensor dynamics} +\label{sec:res:gps} \begin{figure}[t] \begin{tikzpicture} @@ -168,6 +114,60 @@ available again as well as the possibility of performing warm starts. \label{fig:visibility} \end{figure} +In this section we want to show how our model captures the dynamics of +the receiver. We start with the Time To First Fix (TTFF), the loss of +ephemeris data, and the loss of visibility. We use our Modelica model +to obtain simulation data. + +Figure~\ref{fig:TTFF} shows the results of a simulation aimed at +determining the TTFF. At time $t=10s$ the GPS receiver is turned on, +and we simulate how it fetches the position. The top row shows the +command signal. The GPS antenna has to be on for a minute before the +position becomes available. The position availability is shown in the +second row of the figure. As soon as the ranging data are received, a +position reading is taken. Then the sensor can be sampled at regular +intervals. + +As anticipated in Section~\ref{sec:related}, previous work discuss the +TTFF, e.g.,~\cite{bib:entracked-datadriven-modeling, + bib:feasibility-duty-cycling, bib:accuracy-adaptation}. However, no +contribution combines the TTFF with a model of the GPS technology. In +previous literature, the performances of GPS receivers in smartphones +are evaluated by looking at how much time it takes for a generic +application to get a position measure after the request is sent to the +GPS module. GPS sensors in smartphones implement an +\emph{Assisted-GPS} function, that allows the retrieval of the +ephemeris data from the internet instead of listening to the +satellites\footnote{The model presented in this paper can be adapted + to represent this allowing for an external input that possibly + triggers the transition \texttt{get\_ephemeris} before the delay + that instead represents the action of listening to the + satellites. The modeling of how much time the device requires for + fetching these informations from the internet and how much power + this procedure can take is non trivial because of the many different + (and often difficult to predict) involved components.}. + +Up to the (limited) extent to which they are comparable -- due to the +fact that are used Assisted-GPS sensors and the extra software layers +included in the experiments -- the results presented in these works +are coherent with the model presented here. Our model on the other +side achieves more generality, not being dependent on the specific +implementation and on the given device. Moreover, our model allows one +to look directly at what are the theoretical performances one can +expect from a GPS sensor, without the overhead that is introduced by +the operative system of a smartphone. + +Figure~\ref{fig:ephexpire} shows how our model captures the expiration +of the ephemeris data. The figure is organized as the previous one, +showing the turn on signal in the top row and the position +availability in the bottom row. It displays a duty cycling of the +sensor for quickly acquiring position -- i.e. a series of warm +starts. At time $t = 1861s$ the ephemeris data expire, making the duty +cycling ineffective. The sensor detects the loss of ephemeris data +after a few failed attempts and turns on the antenna. When the device +receives an update of the ephemeris data, the position becomes +available again as well as the possibility of performing warm starts. + Figure~\ref{fig:visibility} shows how the model captures the loss of visibility of the satellites. The top row shows the number of visible satellites, while the second and third row respectively depict the @@ -194,7 +194,7 @@ satellites, together with their visibility. Apparently, this would increase the complexity of the model and decrease it usability. An extension of the model to include also this phenomenon would not be very difficult to obtain. It is enough to have parallel state machines -similar to the one shown in Figure~\ref{fig:cyberdynamics}, that +similar to the one shown in Figure~\ref{fig:cyberDynamics}, that independently capture the tracking of individual satellites. \subsection{Positioning Accuracy} @@ -394,6 +394,45 @@ variance of the estimation bounded, while reducing the on time. Consumption} \label{sec:res:tradeoff} +Finally, we would like to expose the trade-off between performance +(accuracy) and power (battery) consumption. For both the driving and +the biking scenario, we run 30 simulations with different triggering +thresholds for the sensor fusion algorithm (specifically, we use +$th \in \{ 4, 5, 6, 8, 10, 12 \}$). In principle, higher values of +the threshold guarantee a lower power consumption, at the price of +larger position estimate errors (and viceversa). + +The acquisition of satellites signals is modeled as a random variable, +uniformly distributed in the intervals specified for the model. In the +biking simulation, the number of visible satellites is a constant. In +the driving simulation (more realistically), the value of the visible +satellites is also a random variable. More in detail, for each time +step in the simulation, there is a probability of increasing or +decreasing the number of visible satellites (in a realistic bound +between 3 and 6). The overall error of a trace is defined as the +root-mean-square of the distance between the trace and the pure GPS +signal. We also normalize (removing the minimum number encountered in +the simulations), to highlight the trade-off. + +Figure~\ref{fig:bike-tradeoff} shows the simulation results for the +cycling tracking. Different colors for the marks correspond to +different threshold values. The figure highlights the trade-off and +show that it is controllable using the choice of the threshold. +Furthermore two other interesting phenomena are pointed out by this +simulation. First, for low triggering values (blue, red, and green +points) the variance of the error is lower, since the simulation is +converging to always-on scenario, saturating the achievable tracking +precision. At the same time, the energy consumption variance +increases due to frequent changes in sensor state (with the receiver +being affected by the time it takes to fetch satellites' signals). +Second, higher triggering values instead (purple, yellow, and orange +points) the opposite behavior is experienced. The variance in terms +of energy consumption is smaller, since the antenna is turned on less +frequently (implying that there will be less uncertainty on the time +spent fetching satellites' signals). The error here becomes lager and +with higher variance, due to the need to exploit more often (less +reliable) IMU data. + \begin{figure*} \begin{minipage}{0.95\columnwidth} \begin{tikzpicture} @@ -483,45 +522,6 @@ value.} \end{minipage} \end{figure*} -Finally, we would like to expose the trade-off between performance -(accuracy) and power (battery) consumption. For both the driving and -the biking scenario, we run 30 simulations with different triggering -thresholds for the sensor fusion algorithm (specifically, we use -$th \in \{ 4, 5, 6, 8, 10, 12 \}$). In principle, higher values of -the threshold guarantee a lower power consumption, at the price of -larger position estimate errors (and viceversa). - -The acquisition of satellites signals is modeled as a random variable, -uniformly distributed in the intervals specified for the model. In the -biking simulation, the number of visible satellites is a constant. In -the driving simulation (more realistically), the value of the visible -satellites is also a random variable. More in detail, for each time -step in the simulation, there is a probability of increasing or -decreasing the number of visible satellites (in a realistic bound -between 3 and 6). The overall error of a trace is defined as the -root-mean-square of the distance between the trace and the pure GPS -signal. We also normalize (removing the minimum number encountered in -the simulations), to highlight the trade-off. - -Figure~\ref{fig:bike-tradeoff} shows the simulation results for the -cycling tracking. Different colors for the marks correspond to -different threshold values. The figure highlights the trade-off and -show that it is controllable using the choice of the threshold. -Furthermore two other interesting phenomena are pointed out by this -simulation. First, for low triggering values (blue, red, and green -points) the variance of the error is lower, since the simulation is -converging to always-on scenario, saturating the achievable tracking -precision. At the same time, the energy consumption variance -increases due to frequent changes in sensor state (with the receiver -being affected by the time it takes to fetch satellites' signals). -Second, higher triggering values instead (purple, yellow, and orange -points) the opposite behavior is experienced. The variance in terms -of energy consumption is smaller, since the antenna is turned on less -frequently (implying that there will be less uncertainty on the time -spent fetching satellites' signals). The error here becomes lager and -with higher variance, due to the need to exploit more often (less -reliable) IMU data. - Finally, Figure~\ref{fig:car-tradeoff} shows the simulations performed using the car data. Given the introduction of a varying number of visible satellites and therefore the possibility of losing