evaluation stand

This commit is contained in:
toni
2016-05-04 10:32:28 +02:00
parent ce1a1b4d99
commit e3d7e83159
9 changed files with 66 additions and 62 deletions

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject> <!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 3.6.0, 2016-05-03T09:50:19. --> <!-- Written by QtCreator 3.6.0, 2016-05-04T09:06:07. -->
<qtcreator> <qtcreator>
<data> <data>
<variable>EnvironmentId</variable> <variable>EnvironmentId</variable>

View File

@@ -17,9 +17,9 @@ namespace MiscSettings {
const int timeSteps = 500; const int timeSteps = 500;
const int numParticles = 2500; const int numParticles = 50;
const int numBSParticles = 500; const int numBSParticles = 25;
const int lag = 5; const int lag = 5;

View File

@@ -330,8 +330,8 @@ public:
statsDistFiltering.add(errDist); statsDistFiltering.add(errDist);
errorsNorm.push_back(err); errorsNorm.push_back(err);
errorsDistNorm.push_back(errDist); errorsDistNorm.push_back(errDist);
std::cout << "FilteringTime: " << se.ts << " " << statsFiltering.asString() << std::endl; //std::cout << "FilteringTime: " << se.ts << " " << statsFiltering.asString() << std::endl;
std::cout << "FilteringDist: " << se.ts << " " << statsDistFiltering.asString() << std::endl; //std::cout << "FilteringDist: " << se.ts << " " << statsDistFiltering.asString() << std::endl;
} }
if(cnt > skip){ if(cnt > skip){
@@ -377,8 +377,8 @@ public:
errorsSmooth.push_back(errSmoothed); errorsSmooth.push_back(errSmoothed);
errorsDistSmooth.push_back(errDistSmoothed); errorsDistSmooth.push_back(errDistSmoothed);
std::cout << "SmoothingTime: " << tsHistory[(tsHistory.size() - 1) - MiscSettings::lag] << " " << statsSmoothing.asString() << std::endl; //std::cout << "SmoothingTime: " << tsHistory[(tsHistory.size() - 1) - MiscSettings::lag] << " " << statsSmoothing.asString() << std::endl;
std::cout << "SmoothingDist: " << tsHistory[(tsHistory.size() - 1) - MiscSettings::lag] << " " << statsDistSmoothing.asString() << std::endl; //std::cout << "SmoothingDist: " << tsHistory[(tsHistory.size() - 1) - MiscSettings::lag] << " " << statsDistSmoothing.asString() << std::endl;
//plot //plot
vis.clearStates(); vis.clearStates();
@@ -420,10 +420,10 @@ public:
//Point2 p2 = p1 + Angle::getPointer(obs.orientation.values[0]) * 0.05; //Point2 p2 = p1 + Angle::getPointer(obs.orientation.values[0]) * 0.05;
vis.gp << "set arrow 999 from screen " << p1.x<<","<<p1.y << " to screen " << p2.x<<","<<p2.y<<"\n"; vis.gp << "set arrow 999 from screen " << p1.x<<","<<p1.y << " to screen " << p2.x<<","<<p2.y<<"\n";
vis.show(); //vis.show();
// prevent gnuplot errors // prevent gnuplot errors
usleep(1000*33); //usleep(1000*33);
} }
} }
@@ -487,7 +487,9 @@ public:
vis.gp << "set arrow 999 from screen " << p1.x<<","<<p1.y << " to screen " << p2.x<<","<<p2.y<<"\n"; vis.gp << "set arrow 999 from screen " << p1.x<<","<<p1.y << " to screen " << p2.x<<","<<p2.y<<"\n";
vis.show(); vis.show();
vis.show();
vis.show();
vis.show();
// prevent gnuplot errors // prevent gnuplot errors
usleep(1000*33); usleep(1000*33);

View File

@@ -80,7 +80,7 @@ public:
smoothing_heading_sigma = 5.0; smoothing_heading_sigma = 5.0;
smoothing_baro_sigma = 0.05; smoothing_baro_sigma = 0.05;
bool smoothing_resample = false; bool smoothing_resample = true;
//Smoothing using Simple Trans //Smoothing using Simple Trans
@@ -115,6 +115,7 @@ public:
//Smoothing using Simple Trans //Smoothing using Simple Trans
//bf->setEstimation( std::unique_ptr<K::ParticleFilterEstimationOrderedWeightedAverage<MyState>>(new K::ParticleFilterEstimationOrderedWeightedAverage<MyState>(0.50f)));
bf->setEstimation(std::unique_ptr<K::ParticleFilterEstimationWeightedAverageWithAngle<MyState>>(new K::ParticleFilterEstimationWeightedAverageWithAngle<MyState>())); bf->setEstimation(std::unique_ptr<K::ParticleFilterEstimationWeightedAverageWithAngle<MyState>>(new K::ParticleFilterEstimationWeightedAverageWithAngle<MyState>()));
if(smoothing_resample) if(smoothing_resample)
bf->setResampling( std::unique_ptr<K::ParticleFilterResamplingSimple<MyState>>(new K::ParticleFilterResamplingSimple<MyState>()) ); bf->setResampling( std::unique_ptr<K::ParticleFilterResamplingSimple<MyState>>(new K::ParticleFilterResamplingSimple<MyState>()) );
@@ -145,7 +146,7 @@ public:
smoothing_heading_sigma = 5.0; smoothing_heading_sigma = 5.0;
smoothing_baro_sigma = 0.05; smoothing_baro_sigma = 0.05;
bool smoothing_resample = false; bool smoothing_resample = true;
//Smoothing using Dijkstra //Smoothing using Dijkstra
@@ -174,7 +175,7 @@ public:
smoothing_heading_sigma = 5.0; smoothing_heading_sigma = 5.0;
smoothing_baro_sigma = 0.05; smoothing_baro_sigma = 0.05;
bool smoothing_resample = false; bool smoothing_resample = true;
//Smoothing using Simple Trans //Smoothing using Simple Trans
@@ -242,7 +243,7 @@ public:
smoothing_heading_sigma = 5.0; smoothing_heading_sigma = 5.0;
smoothing_baro_sigma = 0.05; smoothing_baro_sigma = 0.05;
bool smoothing_resample = false; bool smoothing_resample = true;
//Smoothing using Simple Trans //Smoothing using Simple Trans
@@ -311,7 +312,7 @@ public:
smoothing_heading_sigma = 5.0; smoothing_heading_sigma = 5.0;
smoothing_baro_sigma = 0.05; smoothing_baro_sigma = 0.05;
bool smoothing_resample = false; bool smoothing_resample = true;
//Smoothing using Simple Trans //Smoothing using Simple Trans
@@ -379,7 +380,7 @@ public:
smoothing_heading_sigma = 5.0; smoothing_heading_sigma = 5.0;
smoothing_baro_sigma = 0.05; smoothing_baro_sigma = 0.05;
bool smoothing_resample = false; bool smoothing_resample = true;
//Smoothing using Simple Trans //Smoothing using Simple Trans
@@ -448,7 +449,7 @@ public:
smoothing_heading_sigma = 5.0; smoothing_heading_sigma = 5.0;
smoothing_baro_sigma = 0.15; smoothing_baro_sigma = 0.15;
bool smoothing_resample = false; bool smoothing_resample = true;
//Smoothing using Simple Trans //Smoothing using Simple Trans
@@ -499,7 +500,7 @@ public:
smoothing_heading_sigma = 5.0; smoothing_heading_sigma = 5.0;
smoothing_baro_sigma = 0.15; smoothing_baro_sigma = 0.15;
bool smoothing_resample = false; bool smoothing_resample = true;
//Smoothing using Simple Trans //Smoothing using Simple Trans
@@ -551,7 +552,7 @@ public:
smoothing_heading_sigma = 5.0; smoothing_heading_sigma = 5.0;
smoothing_baro_sigma = 0.15; smoothing_baro_sigma = 0.15;
bool smoothing_resample = false; bool smoothing_resample = true;
//Smoothing using Simple Trans //Smoothing using Simple Trans
@@ -604,7 +605,7 @@ public:
smoothing_heading_sigma = 5.0; smoothing_heading_sigma = 5.0;
smoothing_baro_sigma = 0.15; smoothing_baro_sigma = 0.15;
bool smoothing_resample = false; bool smoothing_resample = true;
//Smoothing using Simple Trans //Smoothing using Simple Trans

View File

@@ -313,8 +313,8 @@ public:
statsDistFiltering.add(errDist); statsDistFiltering.add(errDist);
errorsNorm.push_back(err); errorsNorm.push_back(err);
errorsDistNorm.push_back(errDist); errorsDistNorm.push_back(errDist);
std::cout << "FilteringTime: " << se.ts << " " << statsFiltering.asString() << std::endl; //std::cout << "FilteringTime: " << se.ts << " " << statsFiltering.asString() << std::endl;
std::cout << "FilteringDist: " << se.ts << " " << statsDistFiltering.asString() << std::endl; //std::cout << "FilteringDist: " << se.ts << " " << statsDistFiltering.asString() << std::endl;
//save the current estimation for later smoothing. //save the current estimation for later smoothing.
pfHistory.push_back(pf->getNonResamplingParticles()); pfHistory.push_back(pf->getNonResamplingParticles());
@@ -395,8 +395,8 @@ public:
errorsSmooth.push_back(errSmoothed); errorsSmooth.push_back(errSmoothed);
errorsDistSmooth.push_back(errDistSmoothed); errorsDistSmooth.push_back(errDistSmoothed);
std::cout << "SmoothingTime: " << tsHistory[(tsHistory.size() - 1) - MiscSettings::lag] << " " << statsSmoothing.asString() << std::endl; //std::cout << "SmoothingTime: " << tsHistory[t] << " " << statsSmoothing.asString() << std::endl;
std::cout << "SmoothingDist: " << tsHistory[(tsHistory.size() - 1) - MiscSettings::lag] << " " << statsDistSmoothing.asString() << std::endl; //std::cout << "SmoothingDist: " << tsHistory[t] << " " << statsDistSmoothing.asString() << std::endl;
// plot // plot
@@ -486,6 +486,9 @@ public:
//Point2 p2 = p1 + Angle::getPointer(obs.orientation.values[0]) * 0.05; //Point2 p2 = p1 + Angle::getPointer(obs.orientation.values[0]) * 0.05;
vis.gp << "set arrow 999 from screen " << p1.x<<","<<p1.y << " to screen " << p2.x<<","<<p2.y<<"\n"; vis.gp << "set arrow 999 from screen " << p1.x<<","<<p1.y << " to screen " << p2.x<<","<<p2.y<<"\n";
vis.show();
vis.show();
vis.show();
vis.show(); vis.show();
// prevent gnuplot errors // prevent gnuplot errors

View File

@@ -87,40 +87,42 @@ void testModelWalk() {
int main(void) { int main(void) {
// {SmoothingEval1 eval; {SmoothingEval1 eval;
// eval.fixedIntervallSimpleTransPath4(); eval.fixedIntervallSimpleTransPath4();
// eval.run();} eval.run();}
for(int i = 0; i < 10; ++i){ // for(int i = 0; i < 10; ++i){
//nexus // //nexus
std::string name = "bergwerk_path1_nexus_simple_interval_" + std::to_string(i); // std::string name = "bergwerk_path1_nexus_simple_interval_" + std::to_string(i);
{SmoothingEval1 eval; eval.bergwerk_path1_nexus_multi(name); eval.run();} // {SmoothingEval1 eval; eval.bergwerk_path1_nexus_multi(name); eval.run();}
name = "bergwerk_path2_nexus_simple_interval" + std::to_string(i); // name = "bergwerk_path2_nexus_simple_interval" + std::to_string(i);
{SmoothingEval1 eval; eval.bergwerk_path2_nexus_multi(name); eval.run();} // {SmoothingEval1 eval; eval.bergwerk_path2_nexus_multi(name); eval.run();}
name = "bergwerk_path3_nexus_simple_interval" + std::to_string(i); // name = "bergwerk_path3_nexus_simple_interval" + std::to_string(i);
{SmoothingEval1 eval; eval.bergwerk_path3_nexus_multi(name); eval.run();} // {SmoothingEval1 eval; eval.bergwerk_path3_nexus_multi(name); eval.run();}
name = "bergwerk_path4_nexus_simple_interval" + std::to_string(i); // name = "bergwerk_path4_nexus_simple_interval" + std::to_string(i);
{SmoothingEval1 eval; eval.bergwerk_path4_nexus_multi(name); eval.run();} // {SmoothingEval1 eval; eval.bergwerk_path4_nexus_multi(name); eval.run();}
//galaxy // //galaxy
name = "bergwerk_path1_galaxy_simple_interval" + std::to_string(i); // name = "bergwerk_path1_galaxy_simple_interval" + std::to_string(i);
{SmoothingEval1 eval; eval.bergwerk_path1_galaxy_multi(name); eval.run();} // {SmoothingEval1 eval; eval.bergwerk_path1_galaxy_multi(name); eval.run();}
name = "bergwerk_path2_galaxy_simple_interval" + std::to_string(i); // name = "bergwerk_path2_galaxy_simple_interval" + std::to_string(i);
{SmoothingEval1 eval; eval.bergwerk_path2_galaxy_multi(name); eval.run();} // {SmoothingEval1 eval; eval.bergwerk_path2_galaxy_multi(name); eval.run();}
name = "bergwerk_path3_galaxy_simple_interval" + std::to_string(i); // name = "bergwerk_path3_galaxy_simple_interval" + std::to_string(i);
{SmoothingEval1 eval; eval.bergwerk_path3_galaxy_multi(name); eval.run();} // {SmoothingEval1 eval; eval.bergwerk_path3_galaxy_multi(name); eval.run();}
name = "bergwerk_path4_galaxy_simple_interval" + std::to_string(i); // name = "bergwerk_path4_galaxy_simple_interval" + std::to_string(i);
{SmoothingEval1 eval; eval.bergwerk_path4_galaxy_multi(name); eval.run();} // {SmoothingEval1 eval; eval.bergwerk_path4_galaxy_multi(name); eval.run();}
}
// std::cout << "We are in loop number: " << i << "of " << 10 << std::endl;
// }
return 0; return 0;

Binary file not shown.

View File

@@ -18,8 +18,6 @@ All walks start with a uniform distribution (random position and heading) as pri
To allow the system to stabilize its initial state, the first few estimations are omitted from error calculations. To allow the system to stabilize its initial state, the first few estimations are omitted from error calculations.
Even though, the error during the following few seconds is expected to be much higher than the error when starting with a well known initial position and heading. Even though, the error during the following few seconds is expected to be much higher than the error when starting with a well known initial position and heading.
\commentByToni{Absatz drunter muss ich noch rumschreiben.}
The measurements were recorded using a Motorola Nexus 6 and a Samsung Galaxy S5. The measurements were recorded using a Motorola Nexus 6 and a Samsung Galaxy S5.
As the Galaxy's \docWIFI{} can not be limited to the \SI{2.4}{\giga\hertz} band only, its scans take much longer than those of the Nexus: \SI{3500}{\milli\second} vs. \SI{600}{\milli\second}. As the Galaxy's \docWIFI{} can not be limited to the \SI{2.4}{\giga\hertz} band only, its scans take much longer than those of the Nexus: \SI{3500}{\milli\second} vs. \SI{600}{\milli\second}.
Additionally, the Galaxy's barometer sensor provides fare more inaccurate and less frequent readings than the Nexus does. Additionally, the Galaxy's barometer sensor provides fare more inaccurate and less frequent readings than the Nexus does.
@@ -33,20 +31,16 @@ As mentioned earlier, the position of all \docAP{}s (about 5 per floor) is known
Due to legal terms, we are not allowed to depict their positions and therefore omit this information within the figures. Due to legal terms, we are not allowed to depict their positions and therefore omit this information within the figures.
Additionally, we used five \docIBeacon{}s for slight enhancements in some areas. Additionally, we used five \docIBeacon{}s for slight enhancements in some areas.
The empirically chosen values for \docWIFI{} were $P_{0_{\text{wifi}}} = \SI{-46}{\dBm}, \mPLE_{\text{wifi}} = \SI{2.7}{}, \mWAF_{\text{wifi}} = \SI{8}{\dB}$, and $\mPLE_{\text{ib}} = \SI{1.5}{}$ for the \docIBeacon{}s, respectively. The empirically chosen values for \docWIFI{} were $P_{0_{\text{wifi}}} = \SI{-46}{\dBm}, \mPLE_{\text{wifi}} = \SI{2.7}{}, \mWAF_{\text{wifi}} = \SI{8}{\dB}$, and $\mPLE_{\text{ib}} = \SI{1.5}{}$ for the \docIBeacon{}s, respectively.
Due to omitting a time-consuming calibration process for those values we expect the localisation process to perform generally worse compared to standard fingerprinting methods \cite{Ville09}. The system was tested by omitting any time-consuming calibration processes for those values.
%However, incorporating prior knowledge will often compensate for those poorly chosen system parameters. We therefore expect the localisation process to perform generally worse compared to standard fingerprinting methods \cite{Ville09}.
However, incorporating prior knowledge and smoothing will often compensate for those poorly chosen system parameters.
\commentByToni{Hier eure noetigen Werte eintragen.} For the filtering we used $\sigma_\text{wifi} = \sigma_\text{ib} = 8.0$ as uncertainties, both growing with each measurement's age.
As uncertainties we used $\sigma_\text{wifi} = \sigma_\text{ib} = 8.0$, both growing with each measurement's age.
While the pressure change was assumed to be \SI{0.105}{$\frac{\text{\hpa}}{\text{\meter}}$}, all other barometer-parameters are determined automatically (see \ref{sec:sensBaro}). While the pressure change was assumed to be \SI{0.105}{$\frac{\text{\hpa}}{\text{\meter}}$}, all other barometer-parameters are determined automatically (see \ref{sec:sensBaro}).
The step size $\mStepSize$ for the transition was configured to be \SI{70}{\centimeter} with an allowed derivation of \SI{10}{\percent}. The heading deviation in \refeq{eq:transSimple}, \refeq{eq:transShortestPath} and \refeq{eq:transMultiPath} was \SI{25}{\degree}. The step size $\mStepSize$ for the transition was configured to be \SI{70}{\centimeter} with an allowed derivation of \SI{10}{\percent}. The heading deviation in \refeq{eq:transSimple}, \refeq{eq:transShortestPath} and \refeq{eq:transMultiPath} was \SI{25}{\degree}.
Edges departing from the pedestrian's destination are downvoted using $\mUsePath = 0.9$. Edges departing from the pedestrian's destination are downvoted using $\mUsePath = 0.9$.
%
% all paths we evaluated % all paths we evaluated
\begin{figure} \begin{figure}
\input{gfx/eval/paths} \input{gfx/eval/paths}
@@ -58,6 +52,8 @@ Edges departing from the pedestrian's destination are downvoted using $\mUsePath
\end{figure} \end{figure}
%kurz zeigen das activity recognition was bringt
%Smoothing mit großen lag kann die zeitliche information schwer halten. das liegt hauptsächlich daran, das im smoothing nur die relativen positionsinfos genutzt werden. das wi-fi wird nicht beachtet und deswegen können absolute justierungen der position (sprünge) nur sehr schlecht abgefedert werden. %Smoothing mit großen lag kann die zeitliche information schwer halten. das liegt hauptsächlich daran, das im smoothing nur die relativen positionsinfos genutzt werden. das wi-fi wird nicht beachtet und deswegen können absolute justierungen der position (sprünge) nur sehr schlecht abgefedert werden.

View File

@@ -33,11 +33,11 @@ Then the backward step for determining the smoothing distribution is carried out
The weights are obtained through the backward recursion in line 9. The weights are obtained through the backward recursion in line 9.
\commentByFrank{mir (als laie) wird nicht klar: mache ich erst alle forwaertsschritte (also alles bis zum pfadende durchlaufen) und gehe dann von da rueckwaerts (so klingts etwas im text), oder gehe ich nach jedem forwartsschritt rueckwarts (so klingts im pseudocode)} \commentByFrank{mir (als laie) wird nicht klar: mache ich erst alle forwaertsschritte (also alles bis zum pfadende durchlaufen) und gehe dann von da rueckwaerts (so klingts etwas im text), oder gehe ich nach jedem forwartsschritt rueckwarts (so klingts im pseudocode)}
\begin{algorithm}[t]
\caption{Forward-Backward Smoother
\commentByFrank{reihenfolge von $\{ W^i_t, \vec{X}^i_t\}^N_{i=1}$ war oben andersrum. ned schlimm. nur wegen konsistenz :P} \commentByFrank{reihenfolge von $\{ W^i_t, \vec{X}^i_t\}^N_{i=1}$ war oben andersrum. ned schlimm. nur wegen konsistenz :P}
}
\label{alg:forward-backwardSmoother} \label{alg:forward-backwardSmoother}
\begin{algorithm}[t]
\caption{Forward-Backward Smoother}
\begin{algorithmic}[1] % The number tells where the line numbering should start \begin{algorithmic}[1] % The number tells where the line numbering should start
\For{$t = 1$ \textbf{to} $T$} \Comment{Filtering} \For{$t = 1$ \textbf{to} $T$} \Comment{Filtering}
\State{Obtain the weighted trajectories $ \{ W^i_t, \vec{X}^i_t\}^N_{i=1}$} \State{Obtain the weighted trajectories $ \{ W^i_t, \vec{X}^i_t\}^N_{i=1}$}