cs0408042/analysis.tex
1: \section{Analysis for Special Cases}~\label{analysis}
2: In this section, we evaluate SFR and MADRD under the following special
3: conditions: (1) constant velocity with a turn; and (2) constant
4: velocity with periods of no motion.
5: 
6: \subsection{Change of Direction Scenario}
7: 
8: \begin{figure}[htb]
9: 	\centering
10: 		\includegraphics[scale=0.35]{figs/StLineDev.ps}
11: 	\caption{Error if deviation of $\theta$ degrees is taken}
12: 	\label{fig:stLineDev}
13: \end{figure}
14: 
15: \begin{figure}[htb]
16: 	\centering
17: 		\includegraphics[scale=0.35]{figs/ErrAnalysis.ps}
18: 	\caption{Errors in SFR and MADRD}
19: 	\label{fig:errAnalysis}
20: \end{figure}
21: 
22: Now consider the node taking the deviation of $\theta$ degrees. Let
23: the distance at which the node takes the deviation be $d$ meters after
24: the localization point $(x_t,y_t)$. The time at which the deviation
25: occurs is greater than time $t$ and lesser than $t+t_{sfr}$. Figure
26: \ref{fig:stLineDev} shows the movement of the node. The distance $x+y$
27: signifies the distance covered in time $t_{sfr}$ with constant
28: velocity $v$.
29: 
30: The error in localization between time $t$ and $t+t_{sfr}$ can be
31: split up into two parts. The first part is error before the deviation
32: occurs (identical to the fixed velocity analysis above) and the second
33: one is after the deviation. Let $n$ be any point on the expected line
34: of motion that the node would have travelled if it had not taken the
35: deviation. If the node would have travelled a distance of $n$ along
36: expected straight line, it will travel the same distance after
37: deflection because of constant velocity. Let $n=0$ at the point of
38: deviation and increases along the straight line.
39: 
40: \begin{figure*}[ht]
41: \begin{center}
42: \subfigure[Speed (4-5 m/s)(Upper Threshold 6 sec)\label{madrdmove}]{\epsfig{file=figs/madrd-movement.eps,scale=0.4}}
43: \subfigure[Speed (0.5-1 m/s)(Upper Threshold 10 sec)\label{madrdpause}]{\epsfig{file=figs/madrd-movement-pause.eps,scale=0.4,silent=}} \quad
44: 
45: \caption{MADRD Behavior with Unexpected Change in Velocity}
46: \label{rwayeng} 
47: \end{center}
48: \end{figure*}         
49: 
50: \subsubsection{SFR protocol}
51: 
52: Let the node use SFR protocol for localizing. The the error at point
53: $n$ will be the length of line $e_{sfr}$ shown in Figure
54: \ref{fig:stLineDev}. The equation for $e_sfr$ is given by Equation
55: \ref{eq:e_sfr}.
56: 
57: \begin{equation}
58: \label{eq:tanalpha}
59: \tan{\alpha} = \frac{n\times\sin{\theta}}{(x+n\times\cos{\theta})}\\
60: \end{equation}
61: 
62: \begin{equation}
63: \label{eq:e_sfr}
64: e_{sfr} = \frac{n\times\sin{\theta}}{\sin{\alpha}}
65: \end{equation}
66: 
67: Figure \ref{fig:errAnalysis} shows the graph of error against $n$ . As
68: $n$ increases from $0$ to $y$, the $e_{sfr}$ varies as shown in the
69: graph in Figure \ref{fig:errAnalysis}. We can see that for $n>0$, the
70: curve is not linear. This can be seen clearly in the case where
71: $\theta=135$.
72: 
73: As the angle of deflection increases from $0\ degrees$ to $90\
74: degrees$, the error in SFR decreases because the line of motion will
75: be nearer to $(x_t,y_t)$ when $\theta$ increases. For angles greater
76: than $90\ degrees$ and lesser than $180\ degrees$. The error decreases
77: as node moves towards $(x_t,y_t)$ and then starts increasing.
78: 
79: At $\theta=180\ degrees$, the error touches zero after the node has
80: covered $x$ distance and then the error starts increasing
81: linearly. Now the error vector is in other direction than the earlier
82: error vector. Graph in Figure \ref{fig:errAnalysis} shows the absolute
83: value of the error.
84: 
85: \subsubsection{MADRD protocol}
86: \begin{equation}
87: \label{eq:e_madrd}
88: e_{madrd} = {2 \times n \times \sin{\frac{\theta}{2}}}
89: \end{equation}
90: The length of the line $e_{madrd}$ in Figure \ref{fig:stLineDev} shows
91: the the error in MADRD protocol. It increases linearly as the $n$
92: increases. This is given by the equation \ref{eq:e_madrd}. Graph in
93: Figure \ref{fig:errAnalysis} shows the comparison of MADRD protocol
94: with SFR for different angles. We observe for acute angles, MADRD
95: protocol performs better than the SFR. However, if $\theta$ is between
96: $90\ degrees$ and $270\ degrees$, SFR starts performing better. This
97: is because the node is moving away from the predicted motion line and
98: $e_{sfr}$ is smaller than the $e_{madrd}$.
99: 
100: \subsection{Pause Scenario}
101: 
102: In this case, the node comes to a standstill after being in motion
103: with velocity $v$.  Let the distance at which the node stops be $d$
104: meters after the localization point $(x_t,y_t)$, but before the next
105: localization point.  In this case, the error in SFR increases linearly
106: until $d$, when it stops increasing.  Conversely, the error in MADRD
107: starts at 0 while the node maintains the speed of $v$.  However, when
108: it stops moving, the error in MADRD starts increasing proprtionately
109: to $v$ since the predictor assumes that the node continues in motion.
110: Interestingly, if the node is standstill but suddenly starts moving
111: with velocity $v$, SFR and MADRD will behave identically until the
112: next localization point (which may be different for each).  The reason
113: is that SFR's uses the implicit prediction that the node remains at
114: the point of the last localization.  In this scenario, MADRD uses the
115: same predictor since the node actually was not moving at the last
116: localization point.
117: 
118: Figure~\ref{madrdmove} shows the behavior of MADRD when a turn occurs.
119: In this case, the MADRD estimate continues predicting motion in the
120: original direction.  Moreover, even when localization occurs, the
121: average velocity computed as a predictor for the next period will be
122: off as well (it represents the weighted average of the original as
123: well as the new velocities).  A similar trend is observed in
124: Figure~\ref{madrdpause} where a node pauses after being in motion at a
125: constant velocity.  In this case, the MADRD estimate overshoots the
126: node along the old trajectory when it pauses.  
127: 
128: