diff --git a/paper/main.tex b/paper/main.tex index 204bd5c0a0daf3c2dd1c42b61e960c36077b3b3e..0d8c9c9ba25c486a88e8f99d1781696cfea3132f 100644 --- a/paper/main.tex +++ b/paper/main.tex @@ -101,7 +101,7 @@ Politecnico di Milano, Italy} positioning accuracy. We present the model and propose a GPS sampling strategy that uses both the current positioning confidence, and information about the GPS status. We complement the GPS sensor - with internal measurment units and show how the given model exposes + with internal measurement units and show how the given model exposes the battery-accuracy trade-off in the context of sensor fusion. We demonstrate the usefulness of the proposed sampling strategy using both simulation and real data. diff --git a/paper/sections/01-intro.tex b/paper/sections/01-intro.tex index 8bb3fa014537241998211906e92e7db62586b6b1..f867c05b93529c14864def7fa20f90c14f2c3ce8 100644 --- a/paper/sections/01-intro.tex +++ b/paper/sections/01-intro.tex @@ -13,12 +13,12 @@ provided by more than one sensor type could allow one to exploit the sensor benefits and to limit their drawbacks. One alternative is merging data from GPS sensors with data provided by -intertial measurments sensors~\cite{bib:gps-imu}. While the GPS is -power-hungry but provided very precise information, inertial -measurments sensors are less demanding in terms of battery, but also +inertial measurements sensors~\cite{bib:gps-imu}. While the GPS is +power-hungry but provides very precise information, inertial +measurements sensors are less demanding in terms of battery, but also less precise. In the literature, optimizations of this type are -accompanied by experimental data~\cite{ bib:microsoft-leap, bib:enloc-smartphones, - bib:virtualGPS, bib:accuracy-adaptation, +accompanied by experimental data~\cite{bib:microsoft-leap, + bib:enloc-smartphones, bib:virtualGPS, bib:accuracy-adaptation, bib:feasibility-duty-cycling, bib:traffic-delay, bib:entracked-datadriven-modeling, bib:senseLess, bib:framework-for-energy-efficiency}, that are time-consuming to @@ -47,15 +47,15 @@ design choices that are behind the GPS system. These choices greatly influence what can be achieved with any GPS sensor, as they introduce basic limitations and characteristics of the technology. In this specific context, we highlight how a dynamical model is necessary to -capture the involved \emph{phenomena}. In fact, a GPS sensor that -receive the same input data can behave differently, depending on its -internal state. +capture the involved \emph{phenomena}. In fact, GPS sensors that +receive the same input data can behave differently, depending on the +sensor's internal state. \item \textbf{Design:} It identifies opportunities for battery savings. Specifically, modeling the GPS-related \emph{phenomena} allows us to devise a sampling strategy that exploits the technology characteristics. \item \textbf{Integration:} It integrates the GPS with an ecosystem of -intertial measurment sensors. While this is not a new idea, thanks to +inertial measurement sensors. While this is not a new idea, thanks to our model we are able to capture the trade-offs between the different sensor types programmatically and to exploit the characteristics of each sensor. @@ -66,7 +66,7 @@ the topic of GPS optimization, Section~\ref{sec:related} describes related work. Section~\ref{sec:gps} describes the physical principles behind the GPS receiver and shows how we capture these principles with our model. Section~\ref{sec:fusion} discusses a sensor fusion -algorithm that merges the information obtained by Intertial +algorithm that merges the information obtained by Inertial Measurement Units (IMUs) with the GPS data. The sampling strategy that is derived using the given models is described in Section~\ref{sec:control}. We evaluate our proposal with data from diff --git a/paper/sections/02-related-work.tex b/paper/sections/02-related-work.tex index 30a16ea50601a7d5ef2eee83ab5cd4a776ce273e..4ef0cc785ddbaea1726a2c1b868b4f84683cefa5 100644 --- a/paper/sections/02-related-work.tex +++ b/paper/sections/02-related-work.tex @@ -12,7 +12,7 @@ bib:computation-offloading, bib:selective-tracking, bib:microsoft-leap, bib:sparse-fourier}. The authors of \cite{bib:computation-offloading} aim at outsourcing the device computation (once the data has been received) to some server, using a -network connnection. \cite{bib:selective-tracking} improves the GPS +network connection. \cite{bib:selective-tracking} improves the GPS receiver power-efficiency selecting only a subset of visible satellites to be tracked. Other works aim at improving the speed of the signal acquisition, either using information from previous @@ -21,13 +21,13 @@ for the decoding of the signal~\cite{bib:sparse-fourier, 7528057}. The second class includes several attempts to build an \emph{adaptation} layer that controls the usage of positioning -sensors, keeping the antenna off for as much time as +sensors, keeping the receiver off for as much time as possible~\cite{bib:enloc-smartphones, bib:virtualGPS, bib:accuracy-adaptation}. Usually, this is achieved implementing a trade-off controller, that trades accuracy for energy consumption. In the same class we can include works that exploit other sensors. When the adaptation layer detects that the user state does not need high -accuracy, it minimizes the GPS antenna usage by turning it off and +accuracy, it minimizes the GPS receiver usage by turning it off and enabling it again only on demand~\cite{bib:feasibility-duty-cycling, bib:traffic-delay, bib:entracked-datadriven-modeling, bib:senseLess, bib:framework-for-energy-efficiency}. Among the works on this diff --git a/paper/sections/03-model.tex b/paper/sections/03-model.tex index 3f4d9ed171870f095be1985fcbddef7326de5d78..ebc81b9fb60b06a14aa631e8162d3b4120812a7c 100644 --- a/paper/sections/03-model.tex +++ b/paper/sections/03-model.tex @@ -79,19 +79,24 @@ improves the position accuracy. The GPS framework includes (circa) 30 satellites. These satellites orbit around the Earth following known trajectories. While orbiting, they broadcast periodic signals that encode a set of parameters, -called \emph{ephemeris data}. The emphemeris data describe the -satellites' orbits (see for example the trajectory of satelite $s_3$ +called \emph{ephemeris data}. The ephemeris data describe the +satellites' orbits (see for example the trajectory of satellite $s_3$ in Figure~\ref{fig:globe}), and therefore allow the GPS receiver to accurately determine their position in time. The satellite trajectories are not constant in time, due to uncertainties and disturbances, like corrections for collision avoidance. +The hypothesis that the clocks of the receiver and the satellites are +synchronized is not valid, so one extra satellite must be tracked and +used for the trilateration procedure. The fourth satellite allows the +receiver to compensate its time reference offset. + The ephemeris data expire after 30 minutes, i.e., after 30 minutes they are not considered valid anymore. To correctly estimate the current position, the receiver should ensure that the ephemeris data are frequently updated. The transmission of the ephemeris data has a duration of 30 seconds, and the satellites continuously broadcast new -data. In order to ensure the correct aquisition of one data point, the +data. In order to ensure the correct acquisition of one data point, the receiver then has to fetch and decode the signal for a time that is in the interval $[30,60)$ seconds (in the worst case, the receiver is turned on right after the start of a new message transmission). @@ -99,9 +104,9 @@ turned on right after the start of a new message transmission). All the satellites transmit on the same frequency and then the different signals are multiplexed using the Code Division Multiple Access (CDMA) technique. Using CDMA, the signal has three components: -(i) the carrier wave, (ii) the data waveform, and (iii) a spreding +(i) the carrier wave, (ii) the data waveform, and (iii) a spreading waveform. The spreading waveform is a deterministic signal, different -for each satellite\footnote{Each satellite's spreding waveform is +for each satellite\footnote{Each satellite's spreading waveform is unique and has been chosen to be a \emph{golden code}, i.e., it looks like white noise and it does not correlate with any other satellite sequence.}, transmitted at much higher frequency with @@ -113,7 +118,7 @@ between the satellite and the receiver. Assuming the satellite and the receiver share a time reference, the receiver can measure the delay it takes to receive the signal from the satellite. In Figure~\ref{fig:globe} the delay to receive the message from satellite -$s_1$ is denoted by $\Delta_1$. Multiplying this quantitiy by the +$s_1$ is denoted by $\Delta_1$. Multiplying this quantity by the speed of light $C$, the receiver can determine how far the signal has been travelling, i.e., the distance from the satellite, indicated in Figure~\ref{fig:globe} with $d_1$. For a generic satellite $x$, this @@ -121,11 +126,6 @@ can be written as $d_{x} = \Delta_{x} \cdot C$. The set of the distances the receiver measures from the visible satellites is called \emph{ranging data}. -The hypothesis that the clocks of the receiver and the satellites are -synchronized is not valid, so one extra satellite must be tracked and -used for the trilateration procedure. The fourth satellite allows the -receiver to compensate its time reference offset. - Due to the satellites' and the receiver's movements, the doppler effect will distort the signal reception. The effect is a shift in the frequency spectrum of the signal. To fetch the signal, the receiver @@ -134,8 +134,8 @@ shift. As a consequence, the process of fetching the signal directly includes the measurement of the ranging data\footnote{Additionally, the receiver can estimate its own speed from the measured doppler effect and compensate for the satellite speed retrieved with the - ephemeris data.}. This process takes some milleseconds (usually in -the range from $2ms$ to $10ms$), depending mainly on signal stength. + ephemeris data.}. This process takes some milliseconds (usually in +the range from $2ms$ to $10ms$), depending mainly on signal strength. \subsection{GPS modeling} \label{sec:gps:mod} @@ -235,13 +235,15 @@ font=\footnotesize] The GPS receiver provides a position estimate when it has collected both the ephemeris and the ranging data for at least 4 satellites. -Detecing data from more than 4 satellites improves the positioning +Detecting data from more than 4 satellites improves the positioning accuracy. As for power consumption, the receiver always consumes a (negligible) idle power. On top of that, the sensor consumes additional power when its radio is turned on, which is precisely the cause of battery draining. This power has been experimentally shown to be constant in time~\cite{bib:enloc-smartphones, bib:microsoft-leap} -and usually around 400mW. Our model needs to capture whether: +and usually between 20mW and 400mW. We use the latter for our model, +but this is just a constant that can be changed depending on the +device. The important states that our model needs to capture are: \begin{enumerate} \item \emph{ephemeris data} are available or not; \item \emph{ranging data} are available or not; @@ -274,9 +276,9 @@ consecutively to the satellites' signal for long enough (transition \texttt{get\_ephemeris}). The loss of availability happens either at the expiration of the ephemeris data, or when the tracked satellites disappear from the visible sky. In theory, the second event does not -necessarly force an update of the ephemeris data. For instance, a -satellite may disapper for a limited time interval and appear again -before its ephemeris data's expiration. For simplicity (and without +necessarily force an update of the ephemeris data. For instance, a +satellite may disappear for a limited time interval and appear again +before its ephemeris data expiration. For simplicity (and without loss of information with respect to our model usage) we do not include the specific tracking of different satellites in the model and, consequently, we do not distinguish between these two cases. The @@ -328,7 +330,7 @@ rectangle encloses the states in which the ranging data are available. The yellow polygon shows the states in which the ephemeris data are available. -In general, each state accepts only the transitions that alterate the +In general, each state accepts only the transitions that change the properties that define it. For instance, if the antenna is off (states No Info \textcircled{\scriptsize 1} and Warm Start Available \textcircled{\scriptsize 6}), the automaton can accept the transition @@ -343,7 +345,8 @@ Finally, two (discrete) equations complement the model dynamics. They saturate the number of tracked satellites (both in terms of ephemeris and ranging data) to the number of visible satellites, implementing the fact that the receiver can only track visible satellites. These -are, repsectively, \texttt{sat\_tracked\_ephemeris := +are, respectively, \texttt{sat\_tracked\_ephemeris := min\{sat\_tracked\_ephemeris, visible\_satellites\}} and \texttt{sat\_tracked\_freq\&phase := min\{sat\_tracked\_freq\&phase, visible\_satellites\}}. + diff --git a/paper/sections/04-fusion.tex b/paper/sections/04-fusion.tex index 0a68af423d651e7b541f91874c91a4dc4f31ddc0..c17d5ef14d9b7aed8111466ba3ce729ca46c907c 100644 --- a/paper/sections/04-fusion.tex +++ b/paper/sections/04-fusion.tex @@ -28,7 +28,7 @@ cubically in time. IMUs are therefore considered reliable only for short time intervals. The idea of \emph{GPS-IMU} sensor fusion algorithm is to exploit the IMUs to provide continuous low-power positioning. At the same time, the GPS can be sampled at lower rate to -compensate for the low frequency erors. +compensate for the low frequency errors. The GPS model devised in this paper captures the delays introduced by the GPS receiver and its power consumption. This allows us to @@ -58,7 +58,7 @@ attitude at time $k$, using its (adimensional) quaternion representation, i.e., $q(k)\in \mathbb{R}^4 [-]$. The IMU provides the following measurements at time $k$: the -acceleration and the angular rates. Both the accelaration $s(k)$ and +acceleration and the angular rates. Both the acceleration $s(k)$ and the angular rates are provided along the three axis, i.e., $s(k) \in \mathbb{R}^3 [m/s^2]$, and $\omega(k)\in \mathbb{R}^3 [rad/s]$. Equation~\eqref{eq:integration} @@ -134,14 +134,14 @@ affected by an additive white noise $e(k)$ with covariance $R$. \tilde{p}_{\text{GPS}}(k) = p(k) + e(k) \end{equation} -The Kalman filter measures the discrepancy betwen the output of the +The Kalman filter measures the discrepancy between the output of the INS and the GPS and uses it to correct the position and biases estimation. The correction is based on the \emph{Kalman gain}, computed online. This technique was proved to be optimal in case of -gaussian disturbances and noises. In fact, the Kalman gain is computed +Gaussian disturbances and noises. In fact, the Kalman gain is computed according to the uncertainty of the quantities to be estimated, formally defined as their covariance matrix, usually denoted with -$\mathbf{P}$. The convariance matrix is also updated +$\mathbf{P}$. The covariance matrix is also updated online\footnote{If the system was linear, the covariance matrix would be updated at every step with the same system dynamics and covariances of disturbances and noises. This would apparently make @@ -153,7 +153,7 @@ based on the linearized model of the system dynamics (i.e., how the \emph{past} estimation uncertainty propagates to the following one), and on the disturbances and noise models (i.e., their variance). -We now provide details about how the kalman filter is implemented, and +We now provide details about how the Kalman filter is implemented, and how it corrects the estimates. We would like to obtain an estimate $\hat{x}(k)$ of $x(k)$\footnote{In general, we use $\hat{\cdot}$ to indicate the estimate of the variable represented by $\cdot$.}. We @@ -315,6 +315,3 @@ specified in Section~\ref{sec:gps}, we can now describe the dynamical limitations that the GPS sensor imposes and the opportunities available for optimizing its sampling. - - - diff --git a/paper/sections/05-control.tex b/paper/sections/05-control.tex index fce3630dc06154a63090e72070607ef2ba747027..8c3043e75518e96a453088fc2714aebc3aa4be4a 100644 --- a/paper/sections/05-control.tex +++ b/paper/sections/05-control.tex @@ -46,19 +46,19 @@ data. The two occur at very different time scales, both in terms of acquisition time and in terms of data validity. \textbf{Ephemeris data:} The ephemeris data live in the time scale of -\emph{minutes}, requiring betwen 30 and 59 seconds to be aquired and -having a validity of 30 minutes from the aquisition. There are two -implications of these facts. First, this induces a startup delay -equivalent to the aquisition time of the ephemeris data. This is +\emph{minutes}, requiring between 30 and 59 seconds to be acquired and +having a validity of 30 minutes from the acquisition. There are two +implications of these facts. First, this induces a start-up delay +equivalent to the acquisition time of the ephemeris data. This is referred to as \emph{Time To First Fix} (TTFF). Second, an effective sampling strategy refreshes the ephemeris data at least every 30 minutes. This requires the antenna to be turned on for enough time to capture the data and affects the sensor battery consumption. -\textbf{Ranging data:} The ranging data are caracterized by a time +\textbf{Ranging data:} The ranging data are characterized by a time scale of the order of milliseconds. They require from 2 to 10 milliseconds to be acquired. This could be critical for real-time -applications. The data validitiy is instantaneous, since they are used +applications. The data validity is instantaneous, since they are used as soon as they are received to compute the current position (and moving will invalidate them). The time scale allows us to derive a bound in the sensor sampling period. Sampling as frequently as the @@ -75,7 +75,7 @@ information. \subsection{Sampling Strategy Controller} -With these considerations in mind, we designed a sampling stategy that +With these considerations in mind, we designed a sampling strategy that aims at keeping the ephemeris data updated, and sampling the GPS sensor according to the uncertainty of the position estimation (in the Kalman filter). We use the trace of the covariance matrix $P$, which @@ -84,7 +84,6 @@ overcomes a predefined threshold $th$, we consider the position too uncertain and request the GPS intervention. This is formally encoded in the state machine shown in Figure~\ref{fig:controller}. - The logical controller sends a \textcolor{red}{\texttt{turn\_on}} signal when the system is starting, to collect the ephemeris data (State \textcircled{\scriptsize 2} in Figure~\ref{fig:controller}). Then, once the ephemeris data are available (which is defined by the very same transition of the sensor model), it starts cycling between states \textcircled{\scriptsize 3} and \textcircled{\scriptsize 4}, alternatively triggering the \textcolor{red}{\texttt{turn\_off}} and \textcolor{red}{\texttt{turn\_on}} signals. For readability, and consistently with the sensor model shown in Figure~\ref{fig:cyberDynamics}, the states in which the antenna is turned on are filled in green. When the ephemeris data are about to expire (intuitively defined as $time>expiry\_time\_ephemeris-60$), or the sensor loses visibility of the tracked satellites, the controller goes back to State \textcircled{\scriptsize 2} and keeps the antenna on, to refresh the ephemeris data. If the ephemeris data are valid (and about to expire) the sensor can actually still be sampled, represented by taking the transition \texttt{sensor in position\_avaialable}. diff --git a/paper/sections/06-results.tex b/paper/sections/06-results.tex index 4ac500a4be9ca713ab55e90346697135cd42eaff..2251488f49f891741b8e4382daa489417c645d0a 100644 --- a/paper/sections/06-results.tex +++ b/paper/sections/06-results.tex @@ -42,7 +42,7 @@ 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 +with data obtained on real hardware. The implementation in Matlab is 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. @@ -143,7 +143,7 @@ satellites\footnote{The model presented in this paper can be adapted 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 + fetching this information 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.}. @@ -400,7 +400,7 @@ 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). +larger position estimate errors (and \emph{viceversa}). The acquisition of satellites signals is modeled as a random variable, uniformly distributed in the intervals specified for the model. In the @@ -532,3 +532,4 @@ affect both the accuracy (as the GPS data wont be available until a sufficient number of satellites become visible again) and the energy consumption (as the sensor will have to be turned on for relatively long time to reacquire the ephemeris data). + diff --git a/paper/sections/07-concl.tex b/paper/sections/07-concl.tex index 5261d1d654b8d659fc92037a9e24a00d47a20c90..a05a9d609c95b554f1a4f3df83629aa0310b99eb 100644 --- a/paper/sections/07-concl.tex +++ b/paper/sections/07-concl.tex @@ -1,6 +1,6 @@ This paper presented a first-principle model of a GPS receiver, able to capture the dynamics of the data acquisition. We used the model to -enhance a sensor fusion algorithm that merges data from intertial +enhance a sensor fusion algorithm that merges data from inertial measurement sensors with the GPS trace, to improve the GPS battery consumption. The paper presented the model, simulation results, and experiments obtained with real GPS traces, and exposes the trade-off