Skip to content
Snippets Groups Projects
Commit ac523222 authored by Martina Maggio's avatar Martina Maggio
Browse files

pass on 5

parent a87d1a2d
Loading
......@@ -39,12 +39,14 @@ information.
\subsection{Sampling Strategy}
Given these considerations we designed a simple sampling stategy that tries to keep the ephemeris data updated and samples the GPS sensor according to the uncertainty of the state estimation of the Kalman filter. To do this we use the trace of the covariance matrix $P$ which represents the estimation variance of the position. When this quantity overcomes a defined threshold the position is requested to the sensor. This is formally encoded in the state machine represented in figure~\ref{fig:controller}.
\textbf{The controller}: The logical controller sends a \texttt{turn\_on} signal at the start up in order to collect the ephemeris data (state 2). Then once those are available it starts cycling between states 3 and 4 through alternatively triggering the \texttt{turn\_off}, \texttt{turn\_on} signals. For readability, in the same way as we did in the sensor model, the states in which the antenna is turned on are filled with green.
When the ephemeris data are about to expire or the sensor loses visibility of the satellites it was tracking, the controller goes back to state 2 and keeps the antenna on in order to update the ephemeris data. In the case that the ephemeris data are only about to expire the sensor can actually still be sampled, represented by taking the transition \texttt{sensor in position\_avaialable}. The previous ephemeris data are in fact still valid and the ranging data come along with the fetching of the satellites signals.
With these considerations in mind, we designed a sampling stategy 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
represents the estimation variance of the position. When the trace
overcomes a predefined threshold, 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}.
%------------------------------------------
\begin{figure}[t]
......@@ -58,25 +60,24 @@ font=\footnotesize]
%states
\node[thick] (ni) at ( 0, 0) [p_off, label={No Info}] {1};
\node[thick] (re) at ( 0, -4) [p_on, label={Read Ephemeris}] {2};
\node[thick] (gp) at ( 5, -4) [p_on, label={Get Position}] {3};
\node[thick] (re) at ( 0, -3) [p_on, label={Read Ephemeris}] {2};
\node[thick] (gp) at ( 5, -3) [p_on, label={Get Position}] {3};
\node[thick] (wst) at ( 5, 0) [p_off, label={Wait}] {4};
\node[thick] (zero) at ( 0, 1.5) [circle, draw=black!60, fill=black!60, inner sep=0.75mm] {};
\node[thick] (zero) at ( -1, 0) [circle, draw=black!60, fill=black!60, inner sep=0.75mm] {};
%transitions
\draw [arr] (zero) to (ni);
%arrow from 1
\draw [arr] (ni) to node [above] {\texttt{turn\_on}} (re);
\draw [arr] (ni) to node [left, at start, yshift=-2mm] {\textcolor{red}{\texttt{turn\_on}}} (re);
%arrow from 2
\draw [arr] (re) to node [below] {\texttt{get\_ephemeris}} (gp);
\draw [arr, loop below] (re) to node [right] {\texttt{sensor in position\_available}} (re);
\draw [arr, bend right] (re) to node [below, near end, yshift=-1mm, xshift=2mm] {\texttt{get\_ephemeris}} (gp);
\draw [arr, loop below] (re) to node [below] {\texttt{sensor in position\_available}} (re);
%arrows from 3
\draw [arr, bend left] (gp) to node [below] {\texttt{sensor in position\_available -- turn\_off}} (wst);
\draw [arr, bend right] (gp) to node [above] {\texttt{ephemeris\_about\_to\_expire V lost\_visibility}} (re);
\draw [arr, bend left] (gp) to node [near start, left, yshift=2mm, align=right] {\texttt{sensor in position\_available} \\ \textcolor{red}{\texttt{turn\_off}}} (wst);
\draw [arr, bend right] (gp) to node [below, align=center, yshift=-2mm] {\texttt{lost\_visibility} \\ \textbf{\texttt{or}} \texttt{ephemeris\_about\_to\_expire}} (re);
%arrows from 4
\draw [arr, bend left] (wst) to node [above] {\texttt{estimation triggering -- turn\_on}} (gp);
\draw [arr, bend right] (wst) to node {\texttt{ephemeris\_about\_to\_expire -- turn\_on}} (re);
\draw [arr, bend left] (wst) to node [right, align=left, xshift=2mm, yshift=-3mm, at start] {\texttt{estimation} \\ \texttt{triggering} \\ \textcolor{red}{\texttt{turn\_on}}} (gp);
\draw [arr, bend right] (wst) to node [left, at start, xshift=-2mm, yshift=3mm, align=right] {\texttt{ephemeris\_about\_to\_expire} \\ \textcolor{red}{\texttt{turn\_on}}} (re);
\end{tikzpicture}
\caption{State machine of the controller.}
\label{fig:controller}
......@@ -84,5 +85,21 @@ font=\footnotesize]
%-------------------------------------------
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, 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, 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}.
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment