Sensor Fusion of Differential Gps and Inertial Measuring Unit To Measure State of A Test Vehicle
Sensor Fusion of Differential Gps and Inertial Measuring Unit To Measure State of A Test Vehicle
Sensor Fusion of Differential Gps and Inertial Measuring Unit To Measure State of A Test Vehicle
SENSOR FUSION OF
DIFFERENTIAL GPS AND
INERTIAL MEASURING UNIT
TO MEASURE STATE OF A
TEST VEHICLE
AUTOR:
ii
Acknowlegdgements
First of all I want to thank my thesis director Tobias Hesse and supervisor Thomas
Sattel for giving me an opportunity as a foreign student to work in this project,
as well as, for giving me the means and help to develop my thesis.
Secondly to Sascha for helping me when I did not understand something, or just
for being there when I was a bad day.
My friends and family in Spain, for understanding my situation at the time.
And finally to Pablo, for calling me everyday, helping with my research, visiting
me... and everything else.
iii
Abstract
Driver assistance systems are being developed by most car brands to try to decrease the high number of traffic accidents in current times. This project is part
of an overall driver assistance project based on obstacle avoidance path planning.
Of course, in order to plan the path, as well as knowledge of the obstacles state,
the vehicles state is also necessary. This thesis will show the reader how the
vehicles state can be known accurately and at a high update rate (100Hz). To
achieve this goal, a Global Positioning System GPS and an Inertial Measuring
Unit IMU are fused by a Kalman filter.
After a general introduction is made in the first chapter, chapter 2 explains how
the two measuring devices involved in the project, GPS and IMU, work and why
one is of no use without the other. In order to know the vehicles kinematic state
both devices are necessary. The GPS is only able to provide position, while the
IMU provides only acceleration, orientation and turning rates, only by fusing both
of them the vehicles velocity estimation is accurate enough. Furthermore, the
GPS update rate is only 20Hz, while the IMU update rate is 100Hz. Kalman
filter fusion can also be a tool for estimating the vehicles position at the IMUs
update rate.
Chapter 3 describes the general structure of a Kalman filter both from a mathematical as from a control point of view. The Kalman algorithm is presented, a
recursive algorithm consisting on 2 time update equations and 3 measurement update equations. These equations, as well as the Kalman filter inputs and outputs,
are also explained in this chapter.
In Chapter 4 the Kalman algorithm is once more described, but this time for
the particular case of vehicle state estimation using the GPS and IMU measurements as Kalman filter inputs, and obtaining the vehicles position and velocity
as outputs. All matrices and vectors involved in the Kalman algorithm are clearly
deduced for this particular case.
Chapter 5 concerns all the practical work developed for this thesis, this is, working
with the measuring devices and programming the algorithm. The GPS used is
a differential GPS consisting on a rover station fixed on the roof of test vehicle
which receives corrections from a fixed base station. The IMU is also fixed on the
roof of the test vehicle next to the GPS antenna. A C + + implemented program
is in charge of logging the data from both the GPS and the IMU and saving it
on a file. The data is imported from the file to Matlab to be used as Kalman
filter inputs. These inputs have to be modified or adapted to fit the Kalman filter
equations that are programmed in Matlab. A pseudocode of the programmed
filter can also be found in this chapter.
Finally, chapter 6 presents the results obtained. Several test are taken, driving
in different ways to test how well the implemented Kalman filter works. A description of these test is made and a series of graphics show the behavior of the
variables of interest. Among these graphics, the most interesting one is that showing the vehicles position estimation at the IMUs update rate compared with the
iv
GPS position measurement. Another graphic that will have special importance
is the one were the results of the Kalman filter implemented in this thesis are
comparer to the ones obtained from a commercial platform IMAR, which already has an internal Kalman filter implemented. This comparison will serve as
a tool to validate the Kalman filter here implemented, it will be the graphic on
which the conclusions will be based. At the end of the chapter conclusions on how
accurate the measuring devices are and how good the Kalman implementation
is are reflected. Finally a brief note on the future challenges this thesis arises is
made.
Resumen
Sistemas de conduccion asistida estan siendo desarrollados por la mayora de las
marcas automovilsticas con el fin de disminuir los accidentes de trafico. Este
proyecto representa una parte de un proyecto de mayor alcance sobre conduccion
asistida basada en evitar un obstaculo a traves del planeamiento de la trayectoria
del vehculo. Para planear la trayectoria es necesario, a parte del conocimiento
del estado del obstaculo, el estado del vehculo. Este proyecto explicara al lector
como se puede calcular el estado del vehculo de manera precisa y a una frecuencia
de muestreo suficientemente alta (100Hhz). Para conseguir esto, se fusionara a
traves de un filtro Kalman un GPS (Global Positioning System) y un medidor de
inercia (Inertial Measuring Unit IMU).
Tras una introduccion general en el primer captulo, el captulo 2 explica como
los dos aparatos de medida utilizados en el proyecto, GPS e IMU, funcionan
y porque uno necesita del otro para que funcionen de manera correcta. Para
conocer el estado cinematico del vehculo son necesarios ambos aparatos. El
GPS solo proporciona posicion, mientras que el medidor de inercia proporciona
aceleraciones, orientacion y velocidades de giro; solo fusionando ambos aparatos
se podra estimar la velocidad del vehculo de una manera suficientemente precisa.
Por otra parte, la frecuencia de muestreo del GPS solo es 20Hz, mientras que para
el IMU es 100Hz. El filtro de Kalman tambien puede ser una potente herramienta
para estimar la posicion del vehculo a la frecuencia de muestreo del IMU.
El captulo 3 consiste en una descripcion general de la estructura del filtro Kalman
tanto desde un punto de vista matematico, como desde un punto de vista de control. Se presenta el algoritmo de Kalman, un algoritmo recursivo que consiste dos
ecuaciones de actualizacion del tiempo y tres de actualizacion de la medida. Estas ecuaciones, al igual que las variables entrada y salida del filtro, estan tambien
explicadas en este captulo.
En el captulo 4 nuevamente se explica el filtro Kalman, pero esta vez para el caso
particular de estimacion de variables de estado cinematico de un vehculo usando
las medidas del GPS e IMU como entradas del filtro, y obteniendo la velocidad
del vehculo como salida. En este captulo son deducidas todas las matrices y
vectores que aparecen en el algoritmo de Kalman.
En captulo 5 se centra en el trabajo practico realizado para llevar a cabo el
proyecto, principalmente, trabajar con los aparatos de medida y programar el
algoritmo. El GPS usado es diferencial, donde la estacion movil se sit
ua sobre el
techo del vehculo de pruebas y recibe las correcciones de la estacion base (fija).
El IMU tambien esta situado sobre el techo del vehculo, al lado de la antena
del GPS. Un programa implementado en C + + es el encargado de capturar
los datos tanto del GPS como del IMU y guardarlos en un archivo. Los datos
son importados del archivo a Matlab, donde se usaran como entradas del filtro.
Estas entradas han de ser modificadas o adaptadas para encajar en las ecuaciones
de Kalman que seran programadas en Matlab. Tambien sera mostrado en este
captulo un pseudocodigo del programa.
vi
Finalmente, el captulo 6 muestra los resultados obtenidos. Se hicieron una serie
de test, conduciendo de distintas maneras, para comprobar como de bien funciona
el filtro implementado. Se realizara una descripcion de estos test y una serie de
graficos mostraran las variables de interes. Entre estas graficas, la mas interesante
es en la que se ense
na una comparativa entre la posicion del vehculo estimada a
la frecuencia de muestreo del IMU y la medida del GPS. Otra grafica que tiene
especial interes es aquella en la que se comparan los resultados del filtro de Kalman
implementado en este proyecto con los de una plataforma comercial IMAR, que
ya tiene un filtro de Kalman internamente implementado. Esta comparacion
servira como herramienta para validar el filtro de Kalman implementado en este
proyecto, sera la grafica en la que se basen las conclusiones. Al final del captulo
se mostraran las conclusiones del proyecto, como de precisos son los aparatos de
medida, y como de bueno es el filtro Kalman implementado. Finalmente una
breve descripcion de los futuros desarrollos a tener en cuanta es planteada.
vii
CONTENTS
Contents
Part I: Memory
1 Introduction
2 Measuring Devices
2.1
2.2
2.1.1
2.1.2
2.1.3
GPS Problems . . . . . . . . . . . . . . . . . . . . . . . .
15
2.2.1
Xsens MTi . . . . . . . . . . . . . . . . . . . . . . . . . . .
15
2.2.2
17
18
3.1
18
3.2
19
3.3
21
3.3.1
21
3.3.2
24
. . . .
28
4.1
Matrices Ad , Bd . . . . . . . . . . . . . . . . . . . . . . . . . . . .
29
4.2
Matrix C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
33
4.3
Matrix R . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
33
4.4
Matrix Q . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
34
4.5
36
5 Practical Work
5.1
5.2
37
37
5.1.1
38
5.1.2
Setup of Tests . . . . . . . . . . . . . . . . . . . . . . . . .
41
5.1.3
Reference Frames . . . . . . . . . . . . . . . . . . . . . . .
44
Data Logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
47
5.2.1
47
viii
CONTENTS
5.2.2
5.3
49
51
5.3.1
51
5.3.2
58
5.3.3
Defining Matrix C . . . . . . . . . . . . . . . . . . . . . .
58
5.3.4
Defining Matrix R . . . . . . . . . . . . . . . . . . . . . .
59
5.3.5
Defining Matrix Q . . . . . . . . . . . . . . . . . . . . . .
61
5.3.6
62
64
65
5.3.7
5.4
6 Results
6.1
6.2
6.3
6.4
6.5
70
70
6.1.1
GPS Inputs . . . . . . . . . . . . . . . . . . . . . . . . . .
70
6.1.2
IMU Inputs . . . . . . . . . . . . . . . . . . . . . . . . . .
72
6.1.3
74
6.1.4
79
82
6.2.1
GPS Inputs . . . . . . . . . . . . . . . . . . . . . . . . . .
82
6.2.2
IMU Inputs . . . . . . . . . . . . . . . . . . . . . . . . . .
84
6.2.3
85
6.2.4
88
91
6.3.1
GPS Inputs . . . . . . . . . . . . . . . . . . . . . . . . . .
91
6.3.2
IMU Inputs . . . . . . . . . . . . . . . . . . . . . . . . . .
92
6.3.3
93
6.3.4
97
6.4.2
6.4.3
6.4.4
CONTENTS
6.6
6.7
ix
6.5.2
6.5.3
6.5.4
Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
6.6.1
6.6.2
References
120
Annexes
121
LIST OF FIGURES
List of Figures
1.1
2.1
GPS Segments . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2
GPS Triangulation . . . . . . . . . . . . . . . . . . . . . . . . . .
2.3
2.4
Differential GPS . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.5
10
2.6
11
2.7
12
2.8
Vehicles angles . . . . . . . . . . . . . . . . . . . . . . . . . . . .
13
2.9
Vehicles orientation . . . . . . . . . . . . . . . . . . . . . . . . .
13
2.10 IMU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15
16
3.1
19
3.2
Autocorrelation X1 , X2 . . . . . . . . . . . . . . . . . . . . . . . .
20
3.3
20
3.4
21
3.5
25
3.6
27
4.1
28
5.1
Differential GPS . . . . . . . . . . . . . . . . . . . . . . . . . . . .
38
5.2
GPS Receiver . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
38
5.3
GPS Antenna . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
39
5.4
39
5.5
IMU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
40
5.6
DGPS Set Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
41
5.7
Base Station . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
42
5.8
42
5.9
Fixed IMU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
43
43
44
45
45
LIST OF FIGURES
xi
46
50
52
53
54
54
55
56
57
60
62
64
65
66
67
5.29 R calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
68
6.1
Path Followed . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
71
6.2
71
6.3
72
6.4
73
6.5
73
6.6
75
6.7
76
6.8
77
6.9
78
80
81
82
83
84
84
84
85
86
LIST OF FIGURES
xii
87
88
89
90
91
92
92
93
93
94
95
96
97
98
99
LIST OF FIGURES
xiii
LIST OF TABLES
xiv
List of Tables
3
Logged data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
48
NOTATION
xv
Reference Frames
Notation
G:
6
- (G*,
I: (I*,
6
-
ex ,
ey ,
ez )
ex , I ey , I ez )
E
6
-: (I*,
6
P
-:(P*,
M:(M*,
6
-
Description
ex ,
er ,
er ,
ey ,
e ,
e ,
ez )
e )
e )
Symbols
Symbol
Unit
Description
rn
(x, y, z)
(xn , yn , zn )
c
b
0
x
y
z
x,a
y,a
z
t
DOP
V DOP
HDOP
P DOP
T DOP
GDOP
rk
vk1,k
ak1,k
m
m
m
m/s
m
m
m
m
m
m
m
m
m
m
m
m/s
m/s2
o
o
NOTATION
xvi
Symbol
Unit
Description
fx (x)
2
X
N (, 2 )
Rx ( )
E(x)
x[k]
x(t)
x(t)
x [k]
x[k]
+
x[k]
u(t)
u[k]
y(t)
y[k]
w(t)
v(t)
(w)
(v)
A
yaw angle
roll angle
pitch angle
probability density function
mean
variance
random variable
normal probability of mean and variance 2
time increment
covariance matrix
expected value of x
estimated state at step k
estimated state at time t
derivative of state x(t) at time t
real state at step k
a priori state estimate at step k
a posteriori state estimate at step k
input at time t
input at step k
measurement at time t
measurement at step k
process noise
measurement noise
process noise probability distribution
measurement noise probability distribution
matrix that relates a state x(t) with its derivative
x(t)
matrix that relates previous state x[k 1] with current state x[k]
matrix that relates the input u(t) with derivative of
o
o
Ad
Bd
Q
R
e[k]
+
e[k]
P[k]
+
P[k]
K[k]
U
aIM
m
m/s2
NOTATION
xvii
Symbol
Unit
Description
S
rGP
m
rsens
xsens
ysens
x sens
ysens
xsens
ysens
U
ax,m aIM
x,m
IM U
ay,m ay,m
ax,bias
ay,bias
xGP S
y GP S
xIM AR
y IM AR
Xr,x
m
m
m
m
m/s
m/s
m/s2
m/s2
m/s2
m/s2
m/s2
m/s2
m
m
m
m
Xr,y
Xa,x
Xa,y
RGL
Rz
Ry
Rx
G
E
E G
R
R
latk
lonk
pd
Gd
P
G
P G
o
o
o
m
m
m
m
m
m
o
o
o
PART I: MEMORY
Introduction
Introduction
The incredible high number of traffic accidents in every day life is one of the main
concerns in our modern society. Statistics show that over 90% of car accidents are
due to human errors [K
uhnen 1995]. Traffic authorities are continuously throwing
strong campaigns that cause great impact to try to make people more conscious
of the dangers on the road and how important it is to drive savely. As for vehicle
development, the only thing that can be done is try to somehow help the driver
avoid these mistakes that lead to dangerous situations. Many vehicle brands
(BMW, VW, Mercedes) are investigating on the possibility of guiding the driver
on some level, this is what is known as driver assistance systems.
There are many types of driver assistance systems, the one studied in this project
consist of a control system which, considering the environment surrounding the
vehicle and its kinematics state, calculates the path the vehicle should follow to
avoid the environmental obstacles. Once the path is calculated, the path following
algorithm is in charge calculating the value of the torque that should be applied
to steering wheel in order to follow the path correctly. This algorithm calculates
the difference between the desired torque and the one the driver is applying. The
difference of torques provides the absolute value that is sent to the steering wheel,
helping the driver notice what he should be doing. It is named driver assistance
and not autonomous driving because it is always the driver that is in control.
The car will move following the drivers orders, but the driver will be able to
sense on the wheel if he is doing something wrong. If the driver turns the steering
wheel the same angle as the calculated one, he will not sense anything, but if he
turns more or less than the optimal angle, he will feel a small torque indicating
he should turn a bit more to the left or right.
To calculate the path the vehicle is supposed to follow, all environmental obstacles
are given a high potential value, while all safe driving spaces have a low potential
value. This way a potential field hazard map is given for every time instant. The
path is modeled as an elastic band; the potential acts as an external force on the
elastic band, forcing it to drive through low potential areas, safe driving spaces.
Information on environmental obstacles are given by sensors such as radar, lidar
and video cameras while information on the vehicle is given by sensors such as
GPS, inertial measuring units, wheel speed sensors and engine speed sensors
[Thomas Sattel 2005].
This project handles the part in charge of providing the vehicles position, velocity, acceleration and orientation. These variables are needed as an input for
the path following algorithm. To achieve this goal two sensors, a GPS and an
inertial measuring unit IMU are fused by a Kalman filter. A GPS is able to
provide position coordinates, while an inertial measuring unit provides acceleration, turning rates and orientation angles, but none of the two measuring devices
provides velocity directly. In addition, the GPS update rate is too low (20Hz)
for the update rates needed for the path following controller, while the inertial
measuring units update rate is high enough (100Hz).
Introduction
A Kalman filter is a powerful tool for sensor fusion; it can estimate certain parameters based on an input related to these parameters. In this case it is used
to estimate position and velocity based on acceleration (see figure 1.1), relating them both by integrating the acceleration once or twice, respectively. This
way the position and velocity are known at the inertial measuring units update
rate and every time a GPS position measurement is made, it is compared to the
estimation to correct the estimation errors.
Furthermore, the GPS measurements depend on the quality of the signal; they
are not always as accurate as they should. The Kalman filter also deals with this
problem. In addition to the acceleration input; there are two other inputs, the
process noise, which indicates how good the estimation is, and the measurement
noise, which indicates how good the GPS measurement is. The process noise is
represented by the process noise covariance matrix Q, which depends on the IMU
acceleration errors. The measurement noise is represented by the measurement
noise covariance matrix R, which depends on the GPS measurement errors. The
Kalman gain works as a weight factor based on these two noise inputs to keep
the optimal value of the estimated parameters. If the measurement noise is really
low, the value kept is the GPS measurement, if on the contrary, the signal is very
bad, the measurement noise will be very high and the value kept will be closer to
the estimation.
Figure 1.1 shows the basic scheme that is used. The IMU provides acceleration,
orientation and the process noise covariance matrix Q at 100Hz. The GPS provides position and the measurement noise covariance matrix R at 20Hz. The
Kalman fusion provides position and velocity at 100Hz.
Measuring Devices
Measuring Devices
This chapter is going to introduce the reader to the two measuring devices used,
the GPS and the IMU. A description of what they are, how they work and their
different operation modes will be made. Also an evaluation of what problems
each device may present and how they could be solved will be made.
2.1
In our modern society, GPS have acquired great popularity, especially in navigation systems, the information it provides is well known: position coordinates.
But what may not be so well known is how exactly it works. Being one of the
two measuring devices involved in this project, a brief description of each of the
possible operating modes a GPS can adapt and how they work will be made.
Finally some problems a GPS may not be able to deal with will be analyzed.
2.1.1
As can be seen in figure 2.1 there are three basic segments in a GPS system, the
space segment, the control segment and the user segment.
Measuring Devices
rn =
p
(xn x)2 + (yn y)2 + (zn z)2 ,
(2.1)
where
rn = c t,
(2.2)
rn =
p
(xn x)2 + (yn y)2 + (zn z)2 b,
(2.3)
Measuring Devices
2.1.2
In theory the method seems perfect, but in practice it is not very precise, obtaining
accuracies with the most modern GPS receivers of about 2 meters [OEM ],p.64.
With that kind of error the measurement can not be considered reliable (at least
for collision avoidance purposes), research was made to know why there were such
errors, and how to correct them.
Figure 2.3 illustrates the principle source errors.
Measuring Devices
The best solution to avoid these errors is provided by a differential GPS (DGPS).
As can be seen in figure 2.4 in a DGPS there are two GPS antennas receiving
position data and are able to correct each other.
Measuring Devices
DOP factors would be by what factor will the initial error (pseudorange error) be
multiplied to obtain the final error (position error), for the standard deviation of
the position measurement will be [Clynch 2006],p.3[Roger C. Hayward 1998],p.6
= 0 DOP.
(2.4)
The smaller the DOP factor is, the better the solution will be.
There are different DOP factors depending on the kind of error they want to
quantify [Clynch 2006],p.3[Roger C. Hayward 1998],p.6:
VDOP: Vertical Dilution of Precision
V DOP = z /0
(2.5)
(2.6)
q
x2
y2
z2
/0
(2.7)
(2.8)
q
x2 + y2 + z2 + t2 c2 /0
(2.9)
For a DGPS the standard deviation of the pseudoranges 0 will be much smaller
than for a single point solution, so the standard deviation of the measurements
will also be smaller. Also notice that for a DGPS the DOP factors can be smaller
than 1 since the GPS corrections can make measurements error be even smaller
than the initial pseudorange errors.
Measuring Devices
2.1.3
GPS Problems
It may seem that a DGPS solution is a good measurement for our purpose, to
know the vehicles position, but it is not as simple as that. To know the vehicles
position is the main goal, but the knowledge of the vehicles velocity and acceleration is also important, as well as its yaw angle (orientation of the vehicle).
Another important issue is the update rate of these variables. Remember that
these measurements work as an input to calculate the trajectory of the car in
order to avoid the obstacle, therefore, the update rate needs to be high enough to
fit this use. Finally one more problem appears: The GPS measurements depend
on the quality of the signal, if the signal is not good, or it does not even exist
(driving though a forest for example) the measurements will not be at all reliable,
even when working with a DGPS.
A more detailed description of each problem will now be made to understand why
exactly they are problems and how they may be solved.
1. Knowledge of the vehicles velocity
GPS can provide a vehicles velocity, but it is calculated by difference of
position (distance traveled) in a period of time.
vk1,k =
rk rk1
.
t
(2.10)
This assumption is not very good, it only considers the case of constant
velocity during the period of time and the calculated velocity is always that
of the previous time increment, but not of the current time, there is a delay.
Figure 2.5 illustrates this problem. The first graphic of the figure shows
an example of a possible trajectory that could describe a vehicle. This
trajectory has been modeled by the polynomial function
Measuring Devices
10
Measuring Devices
11
In figure 2.6 the real and the calculated velocity can be both seen in the
same graphic. As said before, the calculated velocity only considers the
case of constant velocity, when it is so, both graphics are very similar (for
example between 5 and 6 seconds). As the real velocitys slope increases,
the calculated velocitys error becomes higher.
ak1,k =
rk 2 rk1 + rk2
vk1,k -vk2,k1
=
.
t
t2
(2.11)
Figure 2.7 represents the real and calculated acceleration for the same
example polynom used in the previous section. It can be seen how if the
real accelerations slope is closer to zero, the similar the curves are.
Measuring Devices
12
13
Measuring Devices
k = tan1
yk yk1
.
xk xk1
(2.12)
The main problem is that this is not the orientation of the vehicle , but
the orientation of velocity . In order to know the orientation of the vehicle
two GPS antennas would be needed. As can be seen in figure 2.9 the
vector going from one antenna to the other can be used to measure angles
in a certain reference frame.
Measuring Devices
14
15
Measuring Devices
2.2
Xsens MTi
The IMU that will be used for this project is the Xsens MTi - miniature gyroenhanced Attitude and Heading Reference Sensor (figure 2.10). The MTi can accurately calculate absolute real-time driftless orientation as well as calibrated acceleration, rate of turn and earth-magnetic field data in three-dimensional space.
Measuring Devices
16
Measuring Devices
2.2.2
17
Now that a brief introduction on the IMU has been made, a description of how
all the problems mentioned in section 2.1.3 can be solved by fusing a GPS and
an IMU with a Kalman filter.
Remember there where 5 basic problems the GPS could not deal with:
1. Knowledge of the vehicles velocity
2. Knowledge of the vehicles acceleration
3. Knowledge of vehicles orientation
4. GPS update rate too slow
5. GPS measurements depend on the quality of the signal
The IMU itself, without the help of any fusion, can solve problems 2 and 3,
knowledge of the vehicles acceleration and orientation; fixing the IMU on the
vehicle it can directly measure its acceleration and its orientation, which will
be the yaw angle. As for the other three problems a Kalman filter must be
implemented.
As was briefly mentioned in the introduction, and will be seen in detail in chapter
3, the Kalman filter is able to estimate position and velocity based on the acceleration measurements. The position and velocity estimations can be updated
every time there is a new acceleration measurement. Comparing the position
estimation with a real GPS measurement when it is available, the estimation can
be corrected. The IMU has a much higher update rate than the GPS, 100Hz
compared to the 20Hz of the GPS, this means that the position update rate has
increased by a factor of 5.
By estimating the vehicles position the other three problems are implicitly being
solved. The knowledge of the velocity is not anymore calculated by the difference
of position in a period of time, but estimated. The update rate has been increased
by a factor of five, not only for the velocity estimation, but also for the acceleration
and orientation of the vehicle since now they are a direct IMU output, whose
update rate is higher. As for the dependence of the quality of the GPS signal
for the GPS measurements, the ability of the Kalman gain to work as a weight
factor assures that the best value (between the estimation and the measurement)
is kept; this way if the measurement is very bad due to a bad quality signal, the
estimation will be kept.
18
The Kalman filter, just like any other type of filter estimates a value of the variable
of interest as accurately as possible. This filter combines a set of mathematical
equations forming an optimal recursive data processing algorithm. Its main use
is providing stochastic estimation from noisy sensor measurements.
3.1
Deterministic models are those that describe the behavior of a physical process
determining the values of certain variables. Stochastic models are those that do
not determine the value of the variable but the probability of that value to be, they
estimate states, they do not calculate values. Most physical systems are usually
described with deterministic models, much more simple than the stochastic ones,
and mainly because they are used so often, they are assumed to be correct.
Considering that neither deterministic nor stochastic models can strictly be the
same as the given physical system we ought to agree that many times, when the
deterministic models has an error that can be considered acceptable, a stochastic
model is not worth the effort.
On the other hand, deterministic models have several problems [Maybeck 1979]:
Only those effects of interest are taken into account.
No model can be perfect when certain effects are left out, in addition to
the fact that those variables of interest, the ones that really are modeled,
are just approximated by mathematical equations.
The only data available are the self-controlled inputs and the sensor measured outputs of the system.
Deterministic models cannot control the other inputs, those in the form of
disturbances.
Sensors used to measure the outputs cannot provide perfect readings.
Due to all these accuracy problems, sometimes there is a need to use stochastic
estimations, this is, using all the possible data provided by the sensors, and considering the noisy nature of these measurements, predict a state for the variables
of interest. In the case of knowledge of a vehicles position based on the IMU
and GPS measurements a stochastic model is needed, since the readings of these
measuring devices are not very accurate.
19
3.2
In order to understand how Kalman filters work, there are some statistic concepts
that need to be described. The Kalman filter has some noise inputs which will be
assumed to be white noise with a normal probability distribution. The probability
density function fx (x) of a normally distributed random variable X with mean
and variance 2 , X N (, 2 ), is calculated as [Greg Welch 2001][Maybeck 1979]
fx (x) =
1
2 2
2
1 (x)
2
e 2
(3.1)
(3.2)
E(X) =
xfX (x)dx.
(3.3)
If the process is stationary (density function invariant with time) the autocorrelation depends only on the time difference = t1 t1 , the autocorrelation can
therefore be written as
(3.4)
20
3.3
21
Figure 3.4 illustrates the basic structure of a Kalman filter. The plant represents
the real process where an input u(t) generates an output y(t). The observer is
a discrete model of the plant which will provide an estimation of a state vector
x(t). The state x(t) must contain at least the output y(t), though other variables
may also be part of the state vector.
22
To obtain a model of the plant knowledge of the relationship between the input u(t) and the output y(t) is necessary. This relation can be described by
[Greg Welch 2001]
x(t)
= A x(t) + B u(t) + w(t),
(3.5)
being A the matrix relates the state x(t) to its derivative x(t)
and B the matrix
that relates the input u(t) to the derivative of the state x(t).
The variable w(t) represents the process noise. It is assumed to be white and
with a normal probability distribution
p(w) N (0, Q) ,
(3.6)
(3.7)
p(v) N (0, R) ,
(3.8)
Ad = eAK =
X
An K n
n=0
n!
(3.9)
ZK
X
An K n+1
A
e dB =
Bd =
B.
(n
+
1)!
n=0
23
(3.10)
Matrix C does not change, the relation between the measurement and the state
is the same.
Obtaining now the discrete time equations for the observer:
(3.11)
y[k] = C x[k]
(3.12)
Notice that the observer, being an electronic model has no noise. However the
noise will influence when calculating the Kalman gain K as will be seen in the
ongoing paragraphs.
Defining a a priori state estimate x[k], the state thought more likely to be,
considering the process prior to time step k and a a posteriori state estimate
+
x[k], the state more likely to be, after knowing the measurement y[k] we can
define a a priori and a a posteriori estimate error
(3.13)
(3.14)
24
(3.15)
(3.16)
The residual is defined as the difference between the measurement and the a priori
state estimate (y[k] C x[k]), the Kalman gain K works as a weight factor
minimizing the a posteriori error estimate covariance, modeling the a posteriori
state as a linear combination of a a priori and the residual
(3.17)
The value of K that minimizes a posteriori error estimate covariance can be calculated considering the equations above and it is known to be [Greg Welch 2001],p.3:
P[k] CT
C P[k] CT + R
K[k] =
3.3.2
(3.18)
(3.19)
(3.20)
25
The measurement update equations are responsible for obtaining the a posteriori
state estimate
P[k] CT
C P[k] CT + R
K[k] =
(3.21)
(3.22)
(3.23)
26
Now that the algorithm has been presented it is easier to understand how the
Kalman gain works as a weight factor, as can be seen in equation 3.21 when the
process noise covariance matrix R tends to zero
lim K[k] =
R[k]0
1
C
(3.24)
x[k] = x[k] +
1
(y[k] C x[k]) = y[k].
C
(3.25)
On the other hand when the a priori error estimate covariance P [k] tends to
zero
lim K[k] = 0
P [k]0
(3.26)
(3.27)
In conclusion, when the process noise covariance R approaches zero the actual
measurement y[k] is more liable than the predicted state while when the a priori
error estimate covariance P [k] tends to zero it is better to trust the predicted
measurement.
27
After seeing the Kalman algorithm equations, taking another look at the Kalman
filter block diagram (figure 3.6) can help understand the process better how matrix
C influences the process depending on if it is empty or not.
Figure 3.6: Kalman Filter Block Diagram to observe the effect of matrix C
Observe how if there is no measurement available (C is an empty matrix, see
section 4.2) the a posteriori state estimate is equal to the a priori state estimate,
but once a measurement is available, the Kalman gain acts as a weight factor,
correcting the estimate by this now known value.
28
In this chapter the Kalman algorithm will be described for the particular case of
vehicle state estimation. As seen in the introduction the inputs will be the IMU
U
acceleration measurement aIM
(t) and process noise covariance matrix Q, the
m
GP S
GPS position measurement rm (t) and measurement noise covariance matrix R
and the initial conditions x[k 1].
Figure 4.1 shows the Kalman filter block diagram for this particular case.
(4.1)
(4.2)
29
K[k] =
(4.3)
(4.4)
(4.5)
4.1
Matrices Ad , Bd
As said in the previous section the acceleration measured by the IMU will be used
to estimate the position of the vehicle every 10ms (100Hz update rate). This
acceleration can be expressed as
U
aIM
= asens + abias + noise,
m
(4.6)
where
U
aIM
represents the acceleration measured by the IMU,
m
The acceleration at the sensors location can be expressed as the second derivative
of the position of the sensor, obtaining a relation between acceleration measured
and position:
(4.7)
(4.8)
30
x sens
y sens
x
sens
ysens
a x,bias
a y,bias
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0 0
0
xsens
ysens
1 0
0
0 1 0
x sens
0 0 1
y sens
0 0
0 ax,bias
0 0
0
ay,bias
{z
}
A
+
|
0
0
1
0
0
0
0
0
0
1
0
0
{z
B
ax,m
ay,m +noise
(4.9)
This matricial equation has the structure of a linear time equation, but there is
a need of a discrete form in order to apply a Kalman filter. As said before, the
only change needed is for matrices A and B to be discrete:
AK
Ad = e
X
An K n
n=0
n!
ZK
X
An K n+1
A
e dB =
Bd =
B
(n + 1)!
n=0
0
where
K represents the discrete time steps (time expressed in seconds)
(4.10)
(4.11)
31
Ad =
Bd =
0 K
0
K 2 /2
0
1
0
K
0
K 2 /2
0
1
0
K
0
0
0
1
0
K
0
0
0
1
0
0
0
0
0
1
1
0
0
0
0
0
K 2 /2
0
0
K 2 /2
K
0
0
K
0
0
0
0
(4.12)
(4.13)
xsens
ysens
x sens
y sens
ax,bias
ay,bias
{z
xk
1
0
0
0
0
0
0 K
0
K 2 /2
0
1
0
K
0
K 2 /2
0
1
0
K
0
0
0
1
0
K
0
0
0
1
0
0
0
0
0
1
{z
K 2 /2
0
0
K 2 /2
K
0
0
K
0
0
0
0
{z
Bd
Ad
ax,m
ay,m
| {z }
ak
}|
xsens
ysens
x sens
y sens
ax,bias
ay,bias
{z
xk1
+(4.14)
32
Observe how if instead of simply applying equations 4.10 and 4.11 to obtain the
discrete matrices Ad and Bd the kinematic equations 4.7 and 4.8 would have been
integrated the solution would have been the same.
This method will be described for both equations being rsens the position vector
(xsens , ysens ). rsens will be integrated twice to obtain the position co-ordinates
between an initial state (x0 , t0 ) and a generic state (x, t).
am = rsens + abias
(4.15)
drsens
= am abias
dt
drsens = (am abias )dt
Zr
Zt
(4.16)
(4.17)
(4.18)
(4.19)
drsens =
drsens
= rsens,0 + am (t t0 ) abias (t t0 )
dt
drsens = (rsens,0 + am (t t0 ) abias (t t0 ))dt
Zr
drsens =
Zt
(4.20)
(4.21)
(4.22)
t2 t2
t2 t20
t0 t+t20 )abias ( 0 t0 t+t20 ) (4.23)
2 2
2 2
am
a
bias
= rsens,0 + rsens,0 (t t0 ) +
(t t0 )2
(t t0 )2
(4.24)
2
2
Note that the initial state (x0 , t0 ) was denoted by zero to simplify the equations,
but this state could have been any state previous to the generic one (x, t). Also
notice that the time steps should be discrete, therefore the integration could have
been between a state k-1 and a state k obtaining the equation
abias
am
K 2
K 2 ,
2
2
(4.25)
which is the same equation as the one shown in the matrix form in equation 4.14
33
4.2
Matrix C
Matrix C relates the state to the measurement, which is the position x and y
xsens
ysens
| {z
= C
rsens
xsens
ysens
x sens
y sens
ax,bias
ay,bias
{z
x
k
(4.26)
where
C=
being
4.3
C1 =
1 0 0 0 0 0
0 1 0 0 0 0
C2 =
0 0 0 0 0 0
0 0 0 0 0 0
Matrix R
(4.28)
where v(t) represented the GPS measurement noise and R will be the measurement noise covariance matrix. Denoting Xr,x and Xr,y as the variables that
describe, the GPS x and y position measurement noise, respectively, v(t) can be
expressed as [Kohler 2000]:
v(t) =
Xr,x
Xr,y
(4.29)
34
R = E[v(t) v(t) ] =
(4.30)
2
E[Xr,x Xr,x ] = E[Xr,x
] represents the square of the standard deviation of the
2
variable Xr,x the same happens with y, E[Xr,y Xr,y ] = E[Xr,y
] represents the
square of the standard deviation of the variable Xr,y . Since there is no dependence
between the GPS error in the measurement of the x position and the y position
E[Xr,x Xr,y ] = 0. R can be expressed as
R=
4.4
2
r,x
0
2
0 r,y
(4.31)
Matrix Q
The deduction of matrix Q, is just the same as for matrix R but a bit more
complicated. The state estimation is described as:
(4.32)
where w(t) represented the process noise and Q will be the process noise covariance matrix. The input u is going to be the acceleration, so the noise will mainly
be due to the IMU acceleration noise. Looking back at equation 4.26 may help
understand the process better.
x sens
y sens
x
sens
ysens
a x,bias
a y,bias
=
|
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0 0
0
xsens
1 0
0 ysens
0 1 0
x sens
0 0 1
y sens
ax,bias
0 0
0
0 0
0
ay,bias
{z
}
A
+
|
0
0
1
0
0
0
0
0
0
1
0
0
{z
B
ax,m
(4.33)
ay,m + w(t)
35
Denoting Xa,x and Xa,y as the variables that describe, respectively, the IMU x
and y acceleration measurement noise, w(t) can be expressed as:
w(t) =
0
0
Xa,x
Xa,y
0
0
(4.34)
T
Q = E[w(t) w(t) ] =
0
0
0
0
0
0
0
0
0
0
0
0
0 E[Xa,x Xa,x ] E[Xa,x Xa,y ]
0 E[Xa,x Xa,y ] E[Xa,y Xa,y ]
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
(4.35)
Like happened with the measurement noise, E[Xa,x Xa,x ] and E[Xa,y Xa,y ]
represent the square of the standard deviation of the variables Xa,x and Xa,y
and since there is no dependence between the noise in the x and y acceleration
E[Xa,x Xa,y ] = 0 for Q can be expressed as:
Q=
0
0
0
0
0
0
0 0
0
0 0
0
2
0 a,x
0
2
0 0 a,y
0 0
0
0 0
0
0
0
0
0
0
0
0
0
0
0
0
0
(4.36)
4.5
36
The initial conditions are not as important as matrices Q and R since, in contrast
to these matrices, + x[k 1] and + P[k 1] will be updated by the algorithm, this
is, they will only be used for the first iteration, if they are well or not well chosen
will only affect the time the algorithm takes to converge into a good estimate.
The ideal will be to have some experimental measurements to know more or less
the initial state, being able to express + x[k 1] as
x0 =
xsens,0
ysens,0
x sens,0
ysens,0
ax,bias
ay,bias
(4.37)
It is important to notice as can be seen in equation 4.14, that even though the
state estimate is updated every estimation, the bias accelerations are never
updated, so this parameter in particular is important and here experimental test
are necessary (these test will be shown in section 5.3.6).
As for matrix + P[k 1] the same as said for + x[k 1] can be applied, the ideal
is to fix its value based on experimental knowledge.
Practical Work
37
Practical Work
The previous chapters have explained the theory of how the two measuring devices, GPS and IMU, work and what a Kalman filter is. In this chapter, all
practical tasks developed throughout this project will be shown. These task are
mainly divided in four subtasks:
1. Working with each of the measuring devices independently
Before the data that will be used to implement the filter can be logged, an
independent study of each of the two measuring devices, GPS and IMU,
must be done. The devices must be checked to see if the work correctly,
think which operating modes (if there are several) fit best the projects
needs and which are the outputs of interest. As well a draft of the logging
program must be developed and checked for each device.
2. Logging the data from the measuring devices
This will be done by a C++ implemented program synchronously for both
devices, GPS and IMU, and saved in an excel file. Data from an Inertial
Measuring and Surveying System, IMAR, will also be logged synchronously
to the one logged from the GPS and IMU. An IMAR platform is a commercial device which already has an internal Kalman filter implemented, it
provides position data based on high updated acceleration and slow position
measurements just like will be done in this paper. The data logged from
the IMAR platform is provided in an excel file, how it is logged does not
concern this paper.
3. Fusing the data
This task will be done offline, this is, once the data is logged and saved in
a file, it is fused through a Matlab implemented program, the fusion is not
real time.
4. Comparing the results with those from the IMAR platform to validate the
Kalman filter
The IMAR platform has already been tested and validated, so a comparison
between the position it obtains, and the estimation obtained from the GPS
and IMU fusion will ensure whether the Kalman filter here implemented is
good enough or not.
5.1
This section will teach the reader the how the work with the GPS and IMU
was done. The equipment needed, how the test were set up as well as a clearly
specified reference frame for each of the measuring devices are shown. A much
wider description of how the GPS works can be found in Annex A.
38
Practical Work
5.1.1
GPS:
To obtain the best accuracy as possible a DGPS was used, remember that a DGPS
consists of a fixed base station and a moving rover station as can be seen in figure
5.1. The base stations receiver has knowledge of two positions for the base, the
fixed (or known) position and the one coming from the satellite constellation.
By difference of both positions the receiver calculates the errors and sends the
correction data to the rover station.
39
Practical Work
40
Practical Work
IMU:
The equipment needed to work with the IMU is much more simple.
Xsens Inertial Measuring Unit (figure 5.5)
41
Practical Work
5.1.2
Setup of Tests
The setup of a DGPS on top of a table is shown in figure 5.6. A 12V battery provides power for the receivers which are communicated by radio. A GPS antenna
is also communicated to each of the receivers and a computer is used to setup
the receivers mode as well as to log the data. The base station only needs to
be connected to a PC for the setup (it does not log any data), therefor only one
computer is needed (first setup the base station and then use that same computer
for the setting up and data logging of the rover station).
Radio 1
Battery
Antenna 2
Antenna 1
Radio 2
Receiver 1
Receiver 2
42
Practical Work
43
Practical Work
To fuse both measuring devices the ideal is for them to be fixed in the exact same
point, that of course, is impossible. They will be fixed both on top of the test car,
close enough to suppose that the measuring point is the same, but not too close
to avoid a possible magnetic field distortion. Also, as will be seen in section 5.1.3
the IMU provides measurements in a sensor fixed coordinate system, so it should
be positioned so that the measuring units X-axis matches the cars longitudinal
axis and the measuring units Y-axis matches the cars lateral axis.
44
Practical Work
5.1.3
Reference Frames
It is important to clearly specify all reference frames for each of the measuring
devices involved. For the GPS, since a DGPS is being used, the easiest is to work
with a system fixed on the base station like shown in figure 5.11.
45
Practical Work
46
Practical Work
The IMAR platform has not been mentioned much yet since it is not part of
this project to know how exactly it works, only its outputs are of interest. Nevertheless, the reference frame these outputs are referred to is important. As
can be seen in figure 5.14 the IMAR platform uses a spherical reference frame
P : (E , P er , P e , P e ). The position of the vehicle is given in terms of latitude
with origin in the Greenwich meridian and longitude with origin in the Equator.
Practical Work
5.2
47
Data Logging
This section will show an example of the data logged and explain the most important issues of the data logging program. It is important for the data from
both devices to be logged through the same program because they must be fused.
As said before the logging tool was a C + + program. The data must be taken
synchronously in order to compare the measurements in the different time steps,
logging with the same program allows the IMU (faster update rate) to work as a
trigger every time there is a new measurement, logging both devices at the same
time.
5.2.1
48
Practical Work
Practical Work
5.2.2
49
Figure 5.15 represents a brief pseudocode of the C + + program1 that logs the
data and saves it on a file. The program is of course much more complicated than
it may seem in the pseudocode, but the most important issues are here exposed.
The most interesting part of the program that should be noticed is how (as has
already been said) the IMU works as a trigger for the GPS. The GPS will not
look to see if there is a new measurement available unless there has been a new
GPS update. Once the IMU has detected new data it will be logged and saved
in a variable. The CPU time and the GPS data will be logged and saved as well
and then they will all be saved in the excel file. Notice how the log GPS data is
always the latest, this is, the last known position will be saved, but maybe it has
not changed since the last loop. Also notice that when a new GPS measurement
is detected, the incoming data is raw, a conversion most be made to obtain
understandable data.
50
Practical Work
Practical Work
5.3
51
Once all the data is logged the only thing left to do is to implement the Kalman
filter to check if it works adequately. This implementation is programmed in
Matlab, the main structure of the program is:
1. Import the data from the file2 .
2. Fixing the initial conditions.
3. Applying the Kalman algorithm for each time step. This will be done in a
recursive loop having a new state estimation in every loop.
4. Saving the vehicles state in a vector after each loop.
In chapter 4, what was needed to implement the Kalman filter and its structure
for the position estimation was shown. The variables of interest were matrices
Ad , Bd C, Q and R and the initial conditions + x[k 1] and + P[k 1]. This
section will show how to adapt the logged data to fit these variables and some
important aspects that affect how to implement the program.
5.3.1
The first thing that should be noticed from the data obtained from the GPS and
the IMU is that their reference frames are not the same. While the GPS has a
fixed reference frame on the base station G, the IMU uses a moving system I.
To apply the Kalman filter it is important that all measurements use the same
system. To know the position of an object a reference is always necessary, so the
best will be to have all the data in a fixed reference frame, use the GPS reference
frame G, this way the GPS data will not have to be changed.
To adapt the IMU data to G, a rotation matrix will be used. A rotation matrix
allows to express vectors measured in the IMU sensor reference frame I in a global
reference frame G and the other way round.
RGI rotates a vector in the IMU local reference frame (I) to the global GPS
reference frame (G)
RGI = RZ RY RX
RGI
2
(5.1)
1
0
0
cos 0 sin
cos sin 0
1
0 0 cos sin (5.2)
= sin cos 0 0
0 sin cos
sin 0 cos
0
0
1
52
Practical Work
RGI
So to know the IMU acceleration in a global system only the following rotation
is needed:
IM U
Ga
= RGI I aIM U
(5.4)
Since working only with a 2 dimension (X,Y) reference frame, the only rotation
needed is the one around the z axes, for this particular case
RGI
cos sin 0
= RZ = sin cos 0
0
0
1
(5.5)
The problem is that this rotation has to be applied being the angle from the
GPS reference frame G to the IMU local reference frame I, but this angle is not
directly known from the logged data. Remember that the yaw angle that the IMU
provided was that going from the Earth fixed reference frame E to the IMU local
reference frame I. In figure 5.16 the yaw angle in the different reference frames
can be seen.
53
Practical Work
Knowing the relative position between both fixed reference frames, this is, the
angle going from the Earth fixed frame E to the GPS fixed frame G (E G ), the
GPS yaw angle G can be calculated as:
=E E G
(5.6)
To obtain a good enough estimation of E G a test where the vehicle was moving
straight will be analyzed. If the vehicle is moving straight, no curves, its yaw
angle should be always constant measured from one, or another reference frame.
As can be seen in figure 5.17 the angle of the velocity can be calculated as
= tan1
y1 y0
y2 y1
y2 y0
= tan1
= tan1
.
x1 x0
x2 x1
x2 x0
(5.7)
54
Practical Work
In general this angle is not the same angle as the yaw angle (orientation of
the vehicle), but for the particular case of the vehicle moving straight the sideslip
angle is zero, so these two angles are the same, G as can be seen in figure
5.18
55
Practical Work
= tan1
yk+50 yk
xk+50 xk
(5.8)
56
Practical Work
This test was repeated in case there were for some reason big measurement errors.
Figure 5.21 shows the path followed while figure 5.22 the yaw angle measured from
the different reference frames as well as the relative position between both frames.
57
Practical Work
=E 95o
(5.9)
58
Practical Work
5.3.2
K = tk tk1
(5.10)
Remember also that the estimation should be compared with the GPS measurement and that is why they were logged synchronously. If the estimations were
to be made every 0.01 seconds the 5th estimation would be at time 0.05s and if
the new GPS measurement were to be at time 0.052s then the comparison will
be made of two values at different times.
5.3.3
Defining Matrix C
C=
being
C1 =
1 0 0 0 0 0
0 1 0 0 0 0
C2 =
0 0 0 0 0 0
0 0 0 0 0 0
59
Practical Work
if
gps
xgps
k xk1 = 0
then
C = C2 =
0 0 0 0 0 0
0 0 0 0 0 0
else
C = C1
5.3.4
1 0 0 0 0 0
0 1 0 0 0 0
Defining Matrix R
R=
2
r,x
0
2
0 r,y
(5.12)
where r,x and r,y represent the standard deviation of the x and y position
measurement error, respectively.
Going back to equation 2.4 the horizontal standard deviation of the position
measurement error h is the pseudorange standard deviation 0 times the HDOP
factor
h = 0 HDOP.
(5.13)
r,x = h cos,
(5.14)
r,y = h sin.
(5.15)
60
Practical Work
The HDOP is obtained from the GPS, but the pseudorange standard deviation
0 will have to be calculated. Since there is no way of knowing the exact position
of the GPS antenna and there is no data available on the satellites position, the
pseudorange standard deviation 0 will be estimated from a test where the vehicle
just stood still for some time. Calculating the x and y standard deviation r,x ,
r,y for this test the horizontal standard deviation h is
q
h = (r,x )2 + (r,y )2 .
(5.16)
0 =
h
HDOP
(5.17)
2
N
i (Xi )
,
N
(5.18)
61
Practical Work
r,x = 0.0023,
r,y = 0.0029.
The horizontal standard deviation is therefore
h =
p
(0.0023)2 + (0.0029)2 = 0.0037
Since the position of the GPS antenna was still throughout the test and it lasted
only about 1.5 minutes the HDOP was always the same, 0.9, obtaining an estimation of the pseudorange standard deviation of
0 =
0.0037
= 0.0041.
0.9
If the test had lasted longer maybe the HDOP factor would have changed, being
then a possible solution to use only those parts of the tests where the HDOP
factor is constant to estimate the pseudorange standard deviation 0 .
5.3.5
Defining Matrix Q
T
Q = E[w(t) w(t) ] =
0
0
0
0
0
0
0 0
0
0 0
0
2
0 a,x
0
2
0 0 a,y
0 0
0
0 0
0
0
0
0
0
0
0
0
0
0
0
0
0
(5.19)
where a,x and a,y represent the standard deviation of the x and y acceleration
measurement error, respectively.
Just as in the previous section, to calculate the pseudorange standard deviation
a test with the vehicle standing still for a while was considered, here the same
test will be analyzed to calculate the acceleration standard deviation.
62
Practical Work
a,x = 0.0492
a,y = 0.0213
5.3.6
As explained in chapter 4, for + x[k1] the ideal will be to have some experimental
measurements to know more or less the initial state vector
+
x[k 1] = x0 =
xsens,0
ysens,0
x sens,0
ysens,0
ax,bias
ay,bias
(5.20)
63
Practical Work
As for this first Kalman filter validation, the program is not working real time,
but with data saved on a file, the initial position can be known, being taken as
the first GPS position measurement. When working real time, it is advised to
begin every test at the same known spot, being able to initialize in advance the
vehicles position. On the contrary to the position, even if not working real time,
the velocity is not in anyway known till there is an estimation. Since this velocity
should be very small at the beginning of each test, it will be initialized to zero.
As for the acceleration biases, remember that they were the only parameters of
the state vector that were not updated, for it was, in this case, important to have
some test to know the biases values.
The test that will be used is the same one as for calculating the position and
acceleration standard deviations, the one where the vehicle was still for some
time. In figure5.24, the x and y acceleration means where already shown. Since
the vehicle was still, there should have been an acceleration of zero, but the means
were not zero, so these mean values are what will be considered the bias values.
+
x[k 1] =
S
xGP
0
GP S
y0
0
0
0.1077
0.1926
(5.21)
For + P[k 1] there is no way of knowing without previous test, and the its value
will probably change in every test, since its initialization is not so important, it
will be updated. It is going to be initialized as an identity matrix.
+
P[k 1] =
1
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
1
(5.22)
Practical Work
5.3.7
64
Like in the section 5.2.2 , here too a brief pseudocode of the Matlab program3 is
found.
Practical Work
5.4
65
As said in the introduction of this chapter, the IMAR platform data will be used
to validate the Kalman filter implemented. The study of this platform is not
concern of the project, therefore it has not been mentioned much before. The
results of the comparison will be shown in the results chapter. In this chapter
what will be done will be adapting the data obtained from the IMAR platform
to a form in which it is easier to compare with the results from the filter.
The data was logged from the three devices, GPS IMU and IMAR, synchronously, but some problems appear when wanting to compare the results. The
main problem is that while the estimation is referred to the GPS base G, the
IMAR platform provides position, but in the form of latitude and longitude in
the reference frame P. The problem can be solved since the GPS provided as well
as Cartesian coordinates x and y, latitude and longitude data coordinates, and
the latitude and longitude from the GPS base station G is also known. Therefore
the relation between both coordinates can be calculated, and that same relation
can be applied to obtain the Cartesian coordinates for the IMAR data. The
pseudocode of how the relationship between both cordinate systems is obtain is
shown in figure 5.26.
66
Practical Work
As can be seen in figure 5.27 the Cartesian coordinates x1 and y1 are referred to
a 2D system over a plane that cuts (x0 , y0 ), (x1 , y1 ) and (x0 , y1 ) which origin is
at latitude and longitude zero, x0 and y0 .
(5.23)
y1 lat1 R,
(5.24)
Practical Work
67
In the case here studied, the vehicles position, which in figure 5.28 is noted by
x2 , y2 , is referred to a system which origin is at the GPS base station, x1 , y1 ,
expressed in a plane defined by the origin (x1 , y1 ) and tangent to the Earths
surface at the origin (x1 , y1 ).
(5.25)
(5.26)
Here the approximation in equations 5.26 and 5.24 is really good since the distance
between the vehicle and the base station will be so much smaller than the Earths
radius, that the arc distance is practically the same as the projected distance.
The reference frame just described is not exactly the same as the IMAR platform
68
Practical Work
Mx
(5.27)
My
= (lat2 lat1 ) R.
(5.28)
Note that for the M x coordinate the radius is no longer R but R , being R =
R cos(lat1 ) as can be seen in figure 5.29.
Md
Gd
Md
=G d
Mx
Gx
+M y 2
(5.29)
+G y 2
(5.30)
(5.31)
The system formed by equations 5.27, 5.28, 5.29, 5.30 and 5.32 provides the
exact radius R that the GPS receiver used to convert from longitude and latitude
spherical coordinates to the GPS base G Cartesian coordinates.
R2 =
+G y 2
(lon2 lon1 )2 cos2 (lat1 ) + (lat2 lat1 )2
Gx
(5.32)
69
Practical Work
This system was applied for the GPS data throughout several tests and the value
of R calculated was:
R = 6.3904 106 m
Now that the exact radius used is known, the angle that goes from each of the
systems to the vehicle M and G can be calculated as:
= tan1
= tan1
My
(5.33)
Mx
Gy
(5.34)
Gx
M G
= M G
(5.35)
Once this angle is known, the IMAR data can be converted from latitude and
longitude coordinates to GPS based coordinates as:
IM AR
AR
AR
AR
= (lonIM
lonIM
) R cos(latIM
)
2
1
1
(5.36)
IM AR
AR
AR
= (latIM
latIM
)R
2
1
(5.37)
Mx
My
xG,IM AR
y G,IM AR
cos(M G ) sin(M G )
sin(M G ) cos(M G )
M,IM AR
x
(5.38)
y M,IM AR
This angle was calculated for the GPS data throughout several test just like when
R was calculated, which should be the same throughout all these tests, this angle
turned out to be M G =0.046o , which can be considered zero, but anyway the
rotation was made.
Results
70
Results
This chapter will take a look at several tests made, analyzing for each of them:
GPS inputs
Position measurements
Horizontal Dilution of Precision HDOP
IMU inputs
Acceleration measurements
Yaw angle
Kalman filter outputs
Estimated position
Estimated velocity
Estimated position compared with IMAR position
6.1
The first test to be analyzed is one just driving around an about 15m radius circle
for several laps as can be seen in figure 6.1. The speed was meant to be constant
throughout all the test.
6.1.1
GPS Inputs
The two GPS inputs are the position measurements and the HDOP factor, both
updated at 20Hz. Figure 6.1 shows the position measurements x and y in the
horizontal and vertical axis, respectively.
Figure 6.2 shows the HDOP for this test. Remember the HDOP was a parameter
that expressed how good the GPS signal was, it was the factor by which the input
error (pseudorange standard deviation 0 ) was multiplied to obtain the output
error (horizontal standard deviation h ) being better, the smaller it was. As can
be seen in figure 6.2, the HDOP varies from 0.9 to 1.9, which indicates a very
good GPS signal (as said in chapter 3, it may be a bit smaller than one, but it
will never get close to zero, it is impossible to have no output error if having an
input error).
71
Results
72
Results
6.1.2
IMU Inputs
The IMU provided, among many others, two inputs that were used for the Kalman
filter implementation, the yaw angle and the acceleration, both at an update
rate of 100Hz. As can be seen in first graphic of figure 6.3 the yaw angle for the
IMU reference frame I describes the 4 circles driven. The second graphic shows
the yaw angle but expressed in the GPS base fixed reference frame G, which is
rotated 95o with respect to I.
73
Results
Results
6.1.3
74
The two outputs obtained from the Kalman implementation were the vehicles
position and velocity. Figures 6.6 and 6.7 show both the GPS and the estimated
position for the x and y direction, respectively. As can be seen in the zoomed
graphics the estimation is quite good, observe how the estimated values adapt to
the GPS measurement curve quite smoothly but at a higher update rate. Every
5 estimations (IMU update rate 5 times higher than GPS update rate) the GPS
measurement and the estimation are practically the same, this is, because the
HDOP factor is so low (the measurement is very reliable) that the estimation is
almost the same as the measurement.
The estimation may seem to swing a little sometimes, but this deviation is very
small, maybe of about one centimeter. The estimation for this test has been
successful: the update rate is higher than that of the measurement and the estimation is good enough (or a lest it adapts to the GPS measurement curve very
good).
75
Results
76
Results
77
Results
In figure 6.8 the estimated position and velocity, as well as the IMU measured
acceleration for the x direction can be seen in the GPS reference frame G.
78
Results
The kinematic parameters in the y direction are practically the same as for the x
direction but with a delay of as expected (if x = R cos then y = R sin)
Results
6.1.4
79
Figure 6.10 shows both the IMAR x position data as well as the Kalman filter
estimation in reference frame G. Both graphics seem very similar, but when
looking at the zoomed areas some jumps are noticeable in the IMAR data, these
jumps are larger when the graphic changes its slope rapidly (lower left), but also
exist when the slop is constant (lower right). On the other hand, not taking into
account the jumps, the IMAR graphic seems smother than the estimation when
the slope changes.
In the graphics in the lower part of figure 6.10 it is possible to see each data value
logged for the IMAR platform and each estimation. As just mentioned the IMAR
data is smoother (lower left) when having a change of slope till there is suddenly
a jump in the position, and then it continues being smooth again; in the case of
the estimation, the graphic is not so smooth, it has very little jumps, but this
avoids the big jumps. The estimation runs in the middle of the IMAR graphic
before and after its large jump, obtaining at the end a better value.
In the case of having a constant slope (lower right), the estimation is both smother
and has smaller jumps.
Something similar happens in the case of the y position (figure 6.11). When there
is a slop change (left part of the figure) the IMAR position data is a bit smoother
than the estimation, but it presents large jumps. On the other hand, when the
slop is constant (right part of the figure) both graphics present little jumps, but
the IMAR position data also sometimes presents a large jump.
This is clear proof that the Kalman filter implementation here developed is good
enough, it may even be said that it is better than that of the commercial IMAR
platform.
80
Results
81
Results
82
Results
6.2
The second test is very similar to the first, also driving in a circle at constant
speed but this time it is a small circle, of about an 8m radius, almost half the
one driven in the first test.
6.2.1
GPS Inputs
Figure 6.12 shows the GPS position measurements in the x and y direction in
each of the Cartesian axes, respectively.
83
Results
In figure 6.13 the HOP factor can be seen. For this test the value is constant to
0.9, indicating a very good GPS signal throughout all the test. The fact that this
value is so low and that it does not change implies that when a GPS measurement
is available, the estimation is going to practically be the same as the measurement
and this will happen throughout all the test.
84
Results
6.2.2
IMU Inputs
In figure 6.14 the Yaw angle already in global coordinates can be seen. Just
like in the case of the previous test, this figure illustrates the 4 circles driven.
85
Results
6.2.3
Figures 6.17 and 6.18 show both the GPS and the estimated position for the x
and y direction, respectively.
86
Results
The results are the same as for test 1, the estimated values adapt to the GPS
measurement curve quite smoothly at a higher update rate.
87
Results
The other Kalman filter output is the vehicles velocity. Figures 6.19 and 6.20
show the 3 kinematic parameters (position, velocity and acceleration) all in G
for the x and y direction, respectively. Like in the first test they are all shown
because there is nothing to compare the estimated velocity with to know if it is
correct or not. By comparing the velocity with the position and acceleration it is
possible to know if it is correct, since the velocity should be the derivative of the
position, and the acceleration should be the derivative of the velocity.
In the case of analyzing a circle it is easy to know since the derivative of a sin is
a cosin and the derivative of a cosin a sin like saw in the previous test.
This is the case for figures 6.19 and 6.20, so the velocity estimation is probably
correct.
88
Results
6.2.4
Figures 6.21 and 6.22 show both the IMAR position data as well as the Kalman
filter estimation for both x and y direction, respectively. What is seen is the
same as for the first test, when having a change of slope the IMAR data is much
smoother but presents vary large jumps compared with the estimation. These
jumps imply great position errors.
When the slope is constant the IMAR data presents smaller jumps than in the
case of having a changing slope, but the graphic drawn by the IMAR data seems
less smooth than that of the estimated position.
89
Results
90
Results
91
Results
6.3
This test consists only on driving in a straight path at constant speed, the interesting part is that the HDOP factor is quite high in some parts of the test, bad
GPS signal.
6.3.1
GPS Inputs
Figure 6.23 shows the path followed, the GPS position measurements in the x
and y direction in each of the Cartesian axes.
92
Results
6.3.2
IMU Inputs
The yaw angle (figure 6.25) is basically constant throughout all the test. It
may not seem so when analyzing the graphic, but notice that the yaw angle
axis goes from -10 to -2, the highest angle difference is not even of 8o , therefore
the yaw angle can be assumed constant.
93
Results
Figures 6.26 and 6.27 show the other IMU input, the acceleration, in both x
and y direction, respectively. They are shown in in GPS G coordinates and are
basically zero for the test was driven at constant speed.
6.3.3
In figure 6.28 the GPS measurements and the estimation for the x direction
can be seen. The zoomed graphic shows the part where the GPS signal was
not so good. The estimation is quite good, smooth and adapted to the GPS
measurement. Around time 81.95s, where the HDOP factor jumped from 2 to
8, the Kalman gain effect can be seen: the signal was not so good, one GPS
measurement derived a little from the rest, so the estimation instead of trusting
this measurement trusted the a priori estimation, obtaining a smoother curve.
94
Results
95
Results
When analyzing the position in the y direction (figure 6.29) the estimation seems
much lees smoother than for the x direction, but taking a look at the position
axis for both directions notice that the scale for the y direction is much smaller
(5cm jumps compared to 50cm jumps in the x direction). In the y direction the
jumps seem more noticeable, but are of a maximum of 2cm.
96
Results
In figures 6.30 and 6.31 the 3 kinematic parameters can be seen. The velocity
estimation is considered to be correct since for both x and y direction the position
estimation draw a constant slope line, which derivative is a zero slope line at a
specific value, just like the one drawn in the graphics. The derivative of this type
of graphic is a zero slope line at value zero, which is exactly the acceleration
graphic obtained.
97
Results
6.3.4
For the x direction comparison of the IMAR data with the estimation (figure
6.32) both curves are very smooth, both are equally good.
In the case of the y direction both curves (the one obtained from the IMAR data
and the estimation) are less smooth than in the case of the x direction. But as
happened in test 1 and 2, while both curve present little jumps, the one coming
from the IMAR data also present some not so little jumps. Therefore, the Kalman
filter here implemented can be considered better than the IMAR platform.
98
Results
99
Results
100
Results
6.4
This test does not follow any specific path, it was driven drawing different forms
and accelerating and decelerating rapidly.
6.4.1
GPS Inputs
Figures 6.34 and 6.35 show the two GPS inputs, the x and y position estimation
and the HDOP factor. Analyzing figure 6.35 it is seen that the GPS signal was
very good during the test, with a HDOP factor always smaller than 1.5.
101
Results
102
Results
6.4.2
IMU Inputs
The yaw angle (figure 6.36) shows how the test did not follow any specific
pattern, the orientation changes form one way to another throughout all the test.
103
Results
6.4.3
Figures 6.39 and 6.40 show the GPS measurements and the estimation for the x
and y direction, respectively. As happened with the other test, the estimation is
quite good, smooth and following the curve drawn by the GPS measurement but
at a higher update rate.
104
Results
The estimation is a bit smoother when the slope is constant (right parts of the
figures) than when it is changing (left parts of the figures), but both can be
considered good enough estimations.
105
Results
Figures 6.41 and 6.42 show the position and velocity estimation as well as the
global acceleration for both direction, x and y, respectively. Like in all test
analyzed before, the relation between the 3 parameters, velocity and acceleration
the first and second derivative of the position, respectively, can be checked in
these figures. Since the graphics seem to adapt to these relations, the velocity
estimation can be considered correct.
106
Results
6.4.4
In figures 6.43 and 6.44 the IMAR data and the estimation for the x and y position
can be seen. Just like in the previous tests, when the slope changes (left part
of the figures) the IMAR data is smoother than the estimation but some large
jumps appear that imply some kind of error. When the slope is constant (right
part of the figures) the IMAR data is not so smooth anymore and there also some
small jumps.
107
Results
108
Results
109
Results
6.5
This test was driven through areas where there was a bad GPS signal or even no
signal at all to see how well the Kalman filter reacted under these conditions.
6.5.1
GPS Inputs
As can be seen in figure 6.45 the GPS measurements are a complete chaos, not
smooth at all, and of course, this is not due to the fact that that the path followed
was a chaos, but to the huge errors in the GPS measurements due to the bad
signal.
110
Results
6.5.2
IMU Inputs
The yaw angle (figure 6.47) graphic does not say much, only that the driver
was not following a specific path
111
Results
Figures 6.48 and 6.49 show the acceleration in the x and y direction, respectively.
This acceleration is around zero almost during all the test in both cases (x and
y direction), so all that can be extracted from these graphics is that the test was
done driving at constant speed.
As can be seen both in figure 6.50 and figure 6.51 as soon as the GPS signal is
lost, the estimation is totally off, it is even worse than the GPS measurements,
that were already bad enough.
Though looking at the zoomed parts of the figures it seems that when the GPS
signal is not totally lost, but it just has bad quality, the Kalman estimation is
quite good. The Kalman estimation is smoother than the GPS measurements,
ignoring those that derive from the rest of the curve.
112
Results
113
Results
114
Results
Figures 6.52 and 6.53 show the 3 kinematic parameters in the x and y direction,
respectively. The velocity estimation, looks very bad, lots of jumps (especially in
the y direction), but of course, having such a bad position estimation, the velocity
estimation will be as bad.
115
Results
6.5.4
In this case the IMAR platform is clearly better than the Kalman filter here
implemented, even in the parts were the GPS signal was not totally lost, and
the estimation seemed to be better than the GPS measurement (center graphic
of figure 6.54) the IMAR curve is much smoother. When the GPS signal is lost
(lower graphic of figure 6.54) the IMAR solution is perfect, while the estimation
is even worse than the initial GPS measurement.
In figure 6.55 the same conclusions can be extracted for the y direction
116
Results
117
Results
Results
6.6
6.6.1
118
Conclusions
Good GPS signal
As was seen in section 6.1 to 6.4 when the GPS signal is good enough, the Kalman
filter implemented in this thesis is very accurate. The position estimations fit the
curve drawn by the GPS measurements perfectly, obtaining precisions of about
1cm, good enough to fit our purposes.
The update rate of these estimations is of 100Hz as desired. With this update
rate the signal can be considered continuous, as needed to serve as an input for
the path following controller.
Good results were also obtained when the signal was good, but lost a bit of precision (see section 6.5.3). In this case the estimations followed the position curve
more smoothly than the GPS measurements, which drifted from the expected
curve. The Kalman gain worked perfectly as a weight factor.
The filter was considered a success in this case (good GPS signal) since it was
even better than the one implemented in the comertial IMAR platform.
6.6.2
On the other hand, when the GPS signal was bad (high HDOP) or if there was
none at all, the Kalman filter here implemented did not work at all (section 1.5.4).
The estimations drifted way too much. Being the HDOP factor so high (up to
9 108 ) the GPS measurements were never considered by K (Kalman gain), so
the signal did not correct its drifting errors. The acceleration measured by the
IMU is suppose to let the position know how it should react in the text time
interval, but our IMU is not good enough to do this alone (without the help of
the GPS measurements). For our purpose this is not so important because the
driver assistance system will be tried out in a test field were the GPS has already
been tested and the signal is perfect, but for the future it could be interesting to
used a IMU with a higher precision.
Results
6.7
119
Future Challenges
The main challenge is, now that the Kalman filter has been implemented and
works (at least with a good GPS signal), to implement the filter in C + + and
adjust it to work real time. This is, to add a module to the C + + program that
logged the data, so that once the data is logged, it directly enters the Kalman
algorithm and calculates the state estimations that will be passed on to the path
following algorithm. The driver assistance system can not be tried out till the
fusion is developed real time.
Another possible challenge, as mention in the previous section, is to enhance the
filter when having a bad GPS signal. A more precise IMU would be needed in
order to achieve this goal.
Other future challenges also appeared when trying out the GPS. They can be
found in Annex A.
REFERENCES
120
References
[MTi ] MTi and MTx User Manual and Tecnical Documentation
[OEM ] OEM4 Family Use Manual - Volue 1. Instalation and Operation
[Carlson 2004] Carlson, Christopher R.: GPS: Theory of Operations and Applications. 2004
[Clynch 2006] Clynch, James R.: The Global Positioning System. 2006
[Greg Welch 2001] Greg Welch, Gary B.: An Introduction to Kalman Filter.
University of North Carolina, 2001
[Kohler 2000] Kohler, Marjus: Using a Kalman Filter to Track Human Interactive Motion. Dortmund University, 2000
[K
uhnen 1995] K
uhnen, B
uhning E. Schepers A. Schmid M.: Unfallgeschehen
Auf Autobahnen-Structuruntersuchung. 1995
[Maybeck 1979] Maybeck, Peter S.: Stochastic Models, Estimation and Control.
Department of Electrical Engineering, Air Forse Institute of Tecnology, Ohio,
1979
[Roger C. Hayward 1998] Roger C. Hayward, J.David P.: GPS-Based Attitude for Aircraft. 1998
[Ryu 2004] Ryu, Jihan: State and Parameter Estimation for Vehicle Dynamics
Control Using GPS. 2004
[Thomas Sattel 2005] Thomas Sattel, Thorsten B.: Ground Vehicle Guidance Along Collision-Free Trajectories Using Elastic Bands. Heinz Nixdorf
Institute, University of Paderborn, 2005
ANNEXES
121
ANNEXES
Contents
1. Annex A: Novatel GPS Tryout...........................................................122
2. Annex B: Visit to Braunschweig.........................................................152
ANNEXES
122
Annex A
Novatel GPS Try Out (16.08.2006-18.09.2006).
This protocol will document everything done during the 4 weeks the GPS was rented,
explaining the different operating modes that were tried out, the problems that
appeared and how those problems were solved and what was left unsolved and will
been considered a future challenge. It is meant to be a quick guide for posterior
users of the GPS.
If there were any doubts or questions please contact Beln Arronte
b.arronte@gmail.com
All necessary documentation and software: GPS User Guide
1. Operating Modes
A single point solution, this is, one GPS antenna receiving position data from a
constellation of satellites is usually not very accurate due to the lengthen in the GPS
carrier path produced by Ionosphere and Troposphere, reflection in GPS signals
against objects and the relative position between the antenna and the satellites
(satellites positioned directly above the antenna give worse measurements than more
horizontal signals). Novatels GPS receivers can give accuracies of at best 1.8m with
a single point solution. This is why were we more interested in a differential GPS
solution.
A differential GPS (DGPS) is were there are two GPS antennas receiving position
data and are able to correct each other. Normally there will be a base station, this is,
an antenna located in a know position that does not move and a rover station, this
would be the antenna located on the car that does move. As the base station knows its
position, it is able to calculate the GPS signal errors (the difference between its
know, real, position and the supposed position the GPS is saying it has) so it can
send the rover station correction data on its position based on this difference. The
accuracy with this operation mode can go down to 2cm.
We tried two different modes to get a DGPS solution, using our own base station
with a second antenna and a second receiver and getting corrections from a virtual
base station, witch would be a mobile phone cell that is able to see our position. Both
methods will be better described in the on the ongoing paragraphs.
ANNEXES
123
Figure 1
Before testing the DGPS solution it is first necessary to check if a simple single point
solution is obtained and start getting familiar with the devises involved. To get a
single point solution the equipment needed is:
GPS receiver
Picture 1
ANNEXES
124
GPS antenna
Picture 2
Picture 3
PC
Install software GPSolutoion
Antenna cable
ANNEXES
Source cable
Serial cable
125
The serial cable used is a regular RS232, though a virtual serial RS232 cable
with a serial port head on one end and a USB head on the other end (to
connect to the PC) can also be used.
If a USB-end-cable is going to be used it is necessary to install some software
so the computer can see the USB port as a virtual serial port.
USB software: USB Driver 3000
Installation guide: Release Notes 3000
Picture 4
In Picture 4 the basic single point setup can be seen. The receiver must be connected,
from left to right (see Picture 1) to:
Car battery source with the source cable through receivers output POWER
PC with serial (or virtual serial) cable though receivers output COM1,
COM2 or AUX, we have used output COM1
GPS antenna with a normal antenna cable though receiver output GPS
Outdoor, preferably open space with a clear view of the sky to get better satellite
signals open GPSolution and connect to the GPS receiver following the instructions
found on GPSolution Guide. If connected with a real serial port the com port will
normally be Com1, but if connected with a USB com it may be necessary to go
through all the com ports until the correct one is found. To find the correct USB com
ANNEXES
126
Figure 2
ANNEXES
127
Figure 3
In Figure 3 the basics of a DGPS solution getting corrections from a virtual base
station can be seen. What needs to be set in order to apply this method is the rover
station, the set up is just the same as for the single point position solution but we also
need to communicate with the virtual base station; that will be done through a GSM
modem, a call will be made to a phone company sending our position, they can also
see the position where the call was made from, so by calculating the difference they
can see the error and send us back the adequate correction data.
The equipment necessary is:
GPS receiver
Just like in the single point solution (Novatel ProPak-G2+DB9-RT2W)
GPS antenna
ANNEXES
128
Picture 5
Sim card
Picture 6
In order to get correction data the sim card must be registered with either
ASCOS or SAPOS (when working in Germany) and the companies that have
been tested and work are O2 and T-Mobile, but it is necessary that these card
ANNEXES
129
are original from the phone company (a sim card from O2 or T-Mobile will
not work if it is purchased from The Phone House)
PC
Picture 7
Picture 7 shows how the connection should be made, it can be seen how the GSM
modem is connected to Com2 of the receiver being the rest of the connections
exactly the same as in the example for single point solution.
In Picture 8 and 9 the setup on the car can be seen
ANNEXES
130
Picture 8
Picture 9
ANNEXES
131
Once the connection has been made we are ready to try out the GPS.
1. Open GPSolution and check if the single point solution is working correctly.
2. Open the console window (View Console window)
The console window is the interface between the PC and the receiver.
As can be seen in
Figure 4 it is working correctly, connected to con USB1 and waiting for a
command
<OK
[USB1]
The commands must be typed in, and if valid they will appear on screen
followed by <OK (
Figure 5). If the message is invalid an error will appear and the commands
will not be passed on to the receiver, so it should be corrected and typed in
again (the invalid commands have no consequences, so no need there is no
need to start again)
Figure 4
ANNEXES
132
Figure 5
3. Type in the next commands to get corrections from the virtual base station
See Note1 on how to send commands via Hyper Terminal
All commands con be found in OEM4 User Manual Volume 2, the pages
have been identified on each command
FIX NONE
UNLOGALL
ANNEXES
133
ECUTOFF 5
ANNEXES
134
Note1: It is also possible to send the commands via some kind of interface
program such as Hyper Terminal (START PROGRAMS
ACCESSORIES COMMUNICATIONS HYPER TERMINAL).
Hyper Terminal allows you to send all the commands on a text file
instead of having to type them in one by one and also the data logged
can be seen (but it is raw data), how to do this can be found in
Working with HyperTerminal. The problem is that since it is all sent
at a time, if it doesnt work it is difficult to detect in what command
the problem was, but once it has been tryout it is much more
comfortable. Another problem is that some of the commands are not
admitted by Hyper Terminal.
Hyper Terminal can not work simultaneously with GPSolution, so
after sending the text file it is important to disconnect.
ANNEXES
135
Figure 6
ANNEXES
136
Figure 7
Figure 7 shows the basics of this method, just like in the case of the virtual base
station, the base station sends its known position and by difference with the real
position it can calculate errors and send correction data to the rover station. The setup
of the single point position is the same, but the base station must also be set. The
necessary equipment is listed below:
2 GPS receivers, one for the rover station and one for the base station
Just like in the single point solution we used Novatel ProPak-G2+DB9RT2W for the rover station and Novatel ProPak-G2+DB9-Generic for the
base station, but they can probably be exchanged
2 Radios to send correction data from the base to the rover station
We used Satel 2As (Picture 10)
ANNEXES
137
Picture 10
PC
In Picture 11 the connections can be seen, both receivers are set just as if two
independent single point solutions were going to be found but also connecting the
radios to COM2 (just like we did with the modems in the previous setup). It may be
important to connect the radios before giving power and seeing if their lights go on
(the ones we tried would not work if connected after the receiver was already
powered.
ANNEXES
138
Picture 11
Picture 12
ANNEXES
139
Picture 12 shows a more clear view of how each receiver is independently connected
to its own PC, antenna, radio and battery (in the picture the battery is common, but if
when the base and rover are separated two different batteries will be needed). A PC
in the base station is not necessary though out all the measurements, only when first
set, to send commands to set up the receiver, this can also be done with one single
PC for both receivers, GPSolution is able to open to devices at a time (see Picture 15)
After seeing the connections indoor we are going to have a look at them in a real
scenario, outdoor.
Picture 13
Picture 13 shows the base station, the PC may or not may be necessary throughout all
the measurements depending on the post processing method. When using this
method (communicating through radio) it is important not to interfere with other
users, so it is better to try it in a place far away from buildings, or if you have some
kind of permission you can only work where discussed.
In Picture 14 both types of antennas (GSM and radio) can be seen fixed on the car,
both of them were tryout, but of course not both at a time, only one of them is
connected.
ANNEXES
140
Picture 14
Once the connection has been made we are ready to try out the GPS.
1. Open GPSolution and check if both receivers are working correctly, both
getting a single point solution is.
2. Open the console window for each receiver.
3. Type in the appropriate commands for each receiver
All commands con be found in OEM4 User Manual Volume 2, the pages
have been identified on each command
a) Base Station
The base station is going to be the one on witch the correcting depend, so
it is important it is setup first.
UNLOGALL
ANNEXES
COM COM2 9600
141
b) Rover Station
FIX NONE
UNLOGALL
ANNEXES
142
PSRDIFFSOURCE AUTO
DYNAMICS AIR
ECUTOFF 5
ANNEXES
143
When getting any other type of solution check the manuals OEM4 User
Manual Volume 1 and OEM4 User Manual Volume 1
Picture 15
ANNEXES
144
logging data before the rover station, and must stop logging after the rover
station.
Figure 8
This is not a different method to get correction data; here we are just trying to get
position data from 2 different moving objects, for example 2 cars or 2 positions on
the same car as shown on Figure 8. Placing 2 antennas on the top of a car allows us
to measure yaw angles by difference of position from the 2 antennas.
That can be done measuring data independently for one antenna and the other, 2
single point position solutions, the problem is that is we want more accurate
measurements, to get correction data for both antennas we need either a third antenna
working as base station or 2 sim cards cards, one for each antenna. We did not have
any of those, so we had to think of something else.
We tried to get a correction data by GSM modem for one of the receivers and them
pass it on (the correction data) to the other receiver by cable (it could also maybe be
pass by radio, but we didnt try that).
The equipment needed would be:
2 GPS receivers
Just like in the single point solution we used Novatel ProPak-G2+DB9RT2W for one antenna and Novatel ProPak-G2+DB9-Generic for the other
ANNEXES
2 GPS antennas
145
Just like on the other method we used Wavecom-WM0D2 dual band modem
Sim card
PC
Receiver 1 (the one that calls the modem to get correction data)
Just like the connection made to get to for the DGPS getting correction data
from a virtual reference station (Picture 7), but also a cross cable is connected
to receivers input AUX
Receiver 2
Like the connection made to get a single point solution (Picture 4) with the
cross cable coming from AUX of receiver 1 connected to AUX of receiver 2
To try this method we went through the same basic steps as in the previous ones,
after preparing the installation:
1. Open GPSolution and check if both receivers are working correctly, both
getting a single point solution is.
2. Open the console window for each receiver.
3. Type in the appropriate commands for each receiver
All commands con be found in OEM4 User Manual Volume 2, the pages
have been identified on each command
a) Receiver 1
It is the one in charge of making the call to the virtual base station, so the
commands are pretty much the same as in this method with only one
ANNEXES
146
antenna but with some little changes. The commands already commented
will not be mentioned again, but can be seen in the previous method.
Note that even though the cable is connected to receivers input AUX in
the commands we type COM3, there is no rule for knowing if internally it
is named COM3 or AUX (the label outside does not have to be the same
as the one inside). To know if you have to type in COM3 or AUX you
have to try, and see when the lights go on on the port.
FIX NONE
UNLOGALL
COM COM1 115200
COM COM2 9600
COM COM3 115200
ANNEXES
147
ANNEXES
148
As the connection by cable with the pass command did not work we had to look for
another way to pass the data, another possibility was splitting the data coming from
the modem to both of the receivers. This was made with a Y cable (1 input and 2
outputs) the data is inputted from the modem and then split to two different cables,
one of them not crossed (1:1) that goes to the receiver making the call (receiver 1)
and the other crossed (X) that goes to receiver 2.
The connections can be seen in Picture 16; both of the cables coming from the
modem are connected to COM2 of the receivers.
Picture 16
The commands in this case are very similar to the ones just mentioned, when we
were joining the receivers by cable through AUX
a) Receiver 1
None of the commands for COM3 are now needed (since it is not used),
and the pass commands has no use know anymore
FIX NONE
UNLOGALL
COM COM1 115200
COM COM2 9600
ANNEXES
INTERFACEMODE COM1 NOVATEL NOVATEL
INTERFACEMODE COM2 RTCM NOVATEL OFF
RTKSOURCE AUTO
PSRDIFFSOURCE AUTO
DYNAMICS AIR
ECUTOFF 5
SEND COM2 "AT+CPIN=nnnn"
SEND COM2 "AT+CBST=7"
SEND COM2 "ATD020128982"
LOG COM2 GPGGA ONTIME 5
LOG COM1 BESTPOSA ONTIME 0.05
b) Receiver 2
Just the same as before, no COM3 commands
FIX NONE
UNLOGALL
COM COM1 115200
COM COM2 9600
INTERFACEMODE COM1 NOVATEL NOVATEL
INTERFACEMODE COM2 RTCM NOVATEL OFF
RTKSOURCE AUTO
PSRDIFFSOURCE AUTO
DYNAMICS AIR
ECUTOFF 5
LOG COM1 BESTPOSA ONTIME 0.05
149
ANNEXES
150
Unfortunately this second experiment also did not work, the same as before, receiver
1, the one connected with the 1:1 cable that made the call got correction data, but the
other still had a single point solution.
We went through the commands with our GPS provider (Novatel) and they all
seemed to be correct for both of the tests (joining both receivers through AUX and
with the Y cable), so we are not sure if the had some mistake that we were not able to
detect or perhaps it is just not possible to use correction both coming for the same
source for 2 different receivers.
ANNEXES
151
2. Future Challenges
Working with Jan Schomerus GPSconnect program
GPSconnect is a program coded in C++, able to log position data from the GPS to an
excel file in a simple and intuitive way. It has been designed to operate a DGPS
solution getting data from our own base station, though it could probably be adapted
to work with a virtual base station.
We were not able to work with the GPSconnect because the program was unable to
detect the receiver, so debugging those problems will be one of the main challenges
for the future as well as adapting the program to work with a virtual base station.
ANNEXES
152
Annex B
Visit to Braunschweig (07-08 August 2006)
This document explains in details everything done in Braunschweig, where the data
from the IMU, GPS and IMAR platform was captured synchronously.
From the IMU the variables of interest would be all the calibrated data: accelarations,
turn rates and location referenced to the magnetic north (X-Y-Z-acc, X-Y-Z-turn, XY-Z-mag) as well as the Euler angles: roll, pitch and yaw.
Total
Seconds
0,0193
0,0273
0,0446
0,0515
0,0595
0,0665
0,0844
0,0907
0,0984
0,1064
Y-acc
3,285
3,926
3,983
3,520
3,456
3,083
2,569
3,339
3,818
2,626
X-acc
-0,786
-0,984
-0,974
-0,822
-0,537
-0,153
0,103
0,256
0,127
-0,228
IMU data
8,888
9,528
10,749
10,241
10,208
11,234
10,429
10,078
10,953
10,280
Z-acc
GPS data
4
4
4
4
4
4
4
4
4
4
-0,033
-0,022
-0,027
-0,073
-0,036
-0,023
-0,044
-0,045
-0,035
-0,032
-0,012
-0,044
-0,060
-0,051
-0,042
-0,023
-0,037
-0,024
-0,025
-0,021
Y-turn
52,316
52,316
52,316
52,316
52,316
52,316
52,316
52,316
52,316
52,316
0,828
0,823
0,836
0,841
0,831
0,831
0,815
0,816
0,826
0,834
Z-turn
-0,400
-0,398
-0,397
-0,400
-0,399
-0,396
-0,398
-0,397
-0,396
-0,398
0,031
0,034
0,037
0,040
0,043
0,045
0,049
0,053
0,055
0,058
49,97
49,97
49,99
49,99
49,99
49,99
50,03
50,03
50,03
50,03
Loc X
-0,906
-0,908
-0,906
-0,907
-0,905
-0,908
-0,905
-0,906
-0,907
-0,908
Z-mag
177,9
177,9
174,4
174,4
174,4
174,4
172,6
172,6
172,6
172,6
Course
Y-mag
1,002
1,002
1,014
1,014
1,014
1,014
0,973
0,973
0,973
0,973
Speed
X-mag
10,564
10,564
10,564
10,564
10,564
10,564
10,564
10,564
10,564
10,564
X-turn
Total
System System System System
GPS
Seconds Time[h] Time[m] Time[s] Time[ms]
Time
0,0193
12
30
50
9
123049
0,0273
12
30
50
9
123049
0,0446
12
30
50
41
123049
0,0515
12
30
50
41
123049
0,0595
12
30
50
41
123049
0,0665
12
30
50
56
123049
0,0844
12
30
50
72
123050
0,0907
12
30
50
72
123050
0,0984
12
30
50
88
123050
0,1064
12
30
50
88
123050
Example
11,10
11,15
11,18
11,16
11,17
11,15
11,11
11,10
11,11
11,08
Roll
-7,65
-7,65
-7,81
-7,81
-7,81
-7,81
-7,98
-7,98
-7,98
-7,98
Loc Y
-5,75
-5,74
-5,74
-5,75
-5,77
-5,80
-5,84
-5,89
-5,93
-5,95
Pitch
1,4
1,4
1,4
1,4
1,4
1,4
1,4
1,4
1,4
1,4
Yaw
0,9
0,9
0,9
0,9
0,9
0,9
0,9
0,9
0,9
0,9
hdop
-149,20
-148,70
-148,21
-147,73
-147,25
-146,79
-146,35
-145,84
-145,32
-144,89
pdop
1,1
1,1
1,1
1,1
1,1
1,1
1,1
1,1
1,1
1,1
vdop
ANNEXES
154
12:00-13:00: Lunch
Figure 9
Reference Receiver:
Picture 17
ANNEXES
155
Picture 18
The GPS was already installed and had been tested; it worked correctly by itself, now
we had to fix the measuring unit to the car and see if it worked properly and logged
predictable (expected) values.
In order to apply a Kalman filter to fusion the IMU and GPS we need to log data
from the same point, so we fixed the measuring unit direct after the GPS on the top
of the car, trying to fix the measuring units X-axis on the cars longitudinal axis and
the measuring units Y-axis on the cars lateral axis.
ANNEXES
156
Picture 19
Picture 20
Picture 21
ANNEXES
157
Figure 10
ANNEXES
158
Figure 11
We viewed it while driving, and it moved just like the car did, the sensor worked
correctly.
ANNEXES
159
Step 3: First log without movement to check if the logger program works correctly
File: gpslog060807121750_1minStillstand
Note: all the file names start with gpslog followed by a 12 digit number that
represents the date and time when the test was ran
(year/month/day/hour/minute/second).
Figure 12
As can be seen in figure 4 we were located, more or lees, 15m in Y and 40m in X
away from the reference receiver, consistent to where we were standing. The
variation both in X and in Y are from the furthest to the nearest measure about 10cm,
when we were standing still, a bit of an error, but the GPS seemed to be working.
ANNEXES
160
z-Accel [m/s2]
y-Accel [m/s 2]
x-Accel [m/s 2]
Accelerations
0.4
0.3
0.2
1000
2000
3000
4000
5000
6000
7000
8000
1000
2000
3000
4000
5000
6000
7000
8000
1000
2000
3000
4000
5000
6000
7000
8000
0.5
0
10.2
10
9.8
Figure 13
The accelerations measured from the IMU were close to zero in X and Y and gravity
acceleration in Z. The IMU also seemed to be working.
ANNEXES
161
Step 4: Real Tests driving though diverse paths and in different ways
Test 1. From the football field to the garage drawing a little curve in the
middle
File: gpslog060807122555_geradeausfahrt01
Test 2. From the garage back to the football field
File: gpslog060807122851_geradeausfahrt02
Test 3. Drawing a complete circle in 1st gear with the steering wheel turned
all the way (360)
File: gpslog060807123308_kreis01
Test 4. Drawing a complete circle in 3rd gear with the steering wheel turned
all the way (360)
File: gpslog060807123601_kreis02
Test 5. Drawing a complete circle in 1st gear with the steering wheel turned
half way (180)
File: gpslog060807123853_kreis03
Test 6. Driving throughout a strait path accelerating and decelerating rapidly
at first, then a relax ride and near the end of the test we lost the some
quality of the GPS signal due to some obstacles
File: gpslog060807124352_FahrtumFlughafen
Test 7. Same ride as in test 1
File: gpslog060807125451_geradeausfahrt03
Test 8. Same ride as in test 2
File: gpslog060807125641_geradeausfahrt04
ANNEXES
162
Figure 14
ANNEXES
163
z-Accel [m/s2]
y-Accel [m/s 2]
x-Accel [m/s 2]
Accelerations
2
1
0
-1
1000
2000
3000
4000
5000
6000
1000
2000
3000
4000
5000
6000
1000
2000
3000
4000
5000
6000
2
0
-2
-4
12
10
Figure 15
The location seemed correct as well as the accelerations, around 0.5 m/s2 in X and Y,
consistent to a 1st gear circle and gravity acceleration in Z.
The problem came when we looked at the turn rates (figure 8) and angles (figure 9).
The yaw-rate wasnt constant as expected, the roll and pitch angle werent constant
zero and the yaw angle didnt describe a circle. We had to revise the logging
program
ANNEXES
164
Yaw-Rate [rad/s]
Pitch-Rate [rad/s]
Roll-Rate [rad/s]
-0.5
1000
2000
3000
4000
5000
6000
1000
2000
3000
4000
5000
6000
1000
2000
3000
4000
5000
6000
-0.88
-0.9
-0.92
-0.94
0.5
-0.5
Figure 16
Yaw-ang [deg]
Pitch-ang [deg]
Roll-ang [deg]
Orientation
0.5
-0.5
1000
2000
3000
4000
5000
6000
1000
2000
3000
4000
5000
6000
1000
2000
3000
4000
5000
6000
0.5
-0.5
-0.88
-0.9
-0.92
-0.94
Figure 17
ANNEXES
165
12:00-13:00: Lunch
ANNEXES
166
Picture 22
Picture 23
ANNEXES
Step 1: IMU Calibration
Just the same as in the first day we calibrated our magnetic field, in order to get the
best precision as possible.
167
ANNEXES
168
Step 3: First log without movement to check if the logger program works correctly
File: gpslog060808122301_1minStillstand
Figure 18
The location seems to be correct, just like in the first tests a bit of movement can be
seen, but it is only about 10cm, it can be considered standing still.
ANNEXES
169
Accelerations
x-Accel [m/s2]
0.4
0.2
1000
2000
3000
4000
5000
6000
7000
8000
9000
10000
1000
2000
3000
4000
5000
6000
7000
8000
9000
10000
1000
2000
3000
4000
5000
6000
7000
8000
9000
10000
y-Accel [m/s 2]
-0.2
-0.4
z-Accel [m/s 2]
10
9.9
9.8
9.7
Figure 19
The accelerations are really close to zero in X and Y as they should since we are still
and Y suffers gravity acceleration, seems correct.
Yaw-Rate [rad/s]
Pitch-Rate [rad/s]
Roll-Rate [rad/s]
-0.05
1000
2000
3000
4000
5000
6000
7000
8000
9000
10000
1000
2000
3000
4000
5000
6000
7000
8000
9000
10000
1000
2000
3000
4000
5000
6000
7000
8000
9000
10000
0.05
-0.05
0.1
-0.1
Figure 20
ANNEXES
170
Orientation
Roll-ang [deg]
-0.5
-1
Pitch-ang [deg]
-1.5
1000
2000
3000
4000
5000
6000
7000
8000
9000
10000
1000
2000
3000
4000
5000
6000
7000
8000
9000
10000
1000
2000
3000
4000
5000
6000
7000
8000
9000
10000
-0.5
-1
-1.5
Yaw-ang [deg]
-2
-2.5
-3
Figure 21
The angles are constant, much better than in the first tests, the yaw angle seems to
change a little, but only about 0.5, we can assume it is constant.
The data logger seems to be working, we can start moving.
ANNEXES
171
Step 4: Real Test driving though diverse paths and in different ways
Test 1. Drawing a complete small circle turning right in 1st gear with the
steering wheel turned all the way (360, full turn)
File: gpslog060808122614_kleinerKreisGang1rechts
Test 2. The same as test 1 but in a different location
File: gpslog060808122746_kleinerKreisGang1rechts02
Test 3. Drawing a complete small circle turning left in 1st gear with the
steering wheel turned all the way (360, full turn)
File: gpslog060808122923_kleinerKreisGang1links
Test 4. Drawing a complete small circle in 3rd gear with the steering wheel
turned all the way (360, full turn)
File: gpslog060808123049_kleinerKreisGang3
Test 5. Drawing a complete large circle in 1st gear with the steering wheel
turned all the way (180, half turn)
File: gpslog060808123216_grosserKreisGang1
Test 6. Driving with no specific direction accelerating and decelerating
rapidly
File: gpslog060808123550_ChaosFahrt
Test 7. Driving throughout a strait path in 1st gear
File: gpslog060808123808_geradeausGang1
Test 8. Driving throughout a strait path stopping and driving again and some
extra turn (we forgot to stop the data logger)
File: gpslog060808124034_geradeaus(zurueck)Stop&Go
Test 9. Driving throughout a strait path in 3rd gear
File: gpslog060808124225_geradeausGang3
Test 10. Driving between building and trees to see signal how the signal
quality changed
File: gpslog060808124724_DLRGelaende
ANNEXES
172
As can be seen the GPS works perfectly, providing the same positions the car drove.
Figure 22
Accelerations tending to zero, figure 15 (except for Z-axis, gravity), we were driving
at a constant speed.
Turn rates zero for roll and pitch and about 0.4rad/s for yaw rate, consistent with a 1st
gear circle (figure 16).
ANNEXES
173
z-Accel [m/s 2]
y-Accel [m/s 2]
x-Accel [m/s 2]
Accelerations
1
0
-1
-2
1000
2000
3000
4000
5000
6000
7000
1000
2000
3000
4000
5000
6000
7000
1000
2000
3000
4000
5000
6000
7000
2
0
-2
-4
11
10
9
8
Figure 23
Yaw-Rate [rad/s]
Pitch-Rate [rad/s]
Roll-Rate [rad/s]
-0.2
1000
2000
3000
4000
5000
6000
7000
1000
2000
3000
4000
5000
6000
7000
1000
2000
3000
4000
5000
6000
7000
0.1
-0.1
0
-0.2
-0.4
-0.6
Figure 24
ANNEXES
174
Orientation
Roll-ang [deg]
-2
-4
-6
1000
2000
3000
4000
5000
6000
7000
1000
2000
3000
4000
5000
6000
7000
1000
2000
3000
4000
5000
6000
7000
Pitch-ang [deg]
2
0
-2
-4
Yaw-ang [deg]
200
-200
Figure 25
In figure 17 we can see how 4 complete circles were drawn, and a pattern is shown in
the roll and pitch angles, that vary about 3, there where probably some little bumps
that made the car tilt a little.
Figure 18 shows the yaw angle, the first graphic counts only from -180 to180, we
can see how 4 circles are drawn, but it doesnt show a real evolution. The second
graphic doesnt have any value constrains, being easier to observe how the circles
were consecutively drawn.
ANNEXES
175
Yaw-ang [deg]
200
100
0
-100
-200
1000
2000
3000
4000
5000
6000
7000
1000
2000
3000
4000
5000
6000
7000
0
-500
-1000
-1500
-2000
Figure 26
ANNEXES
176
Figure 27
In this test we drove through diverse paths accelerating and stopping the car when we
were on a straight path.
As can be seen in figure 20 high accelerations were obtain both in longitudinal
(5m/s2) and lateral directions (10m/s2)
There was also yaw rate when we drove in curves (figure 21).
ANNEXES
177
Accelerations
x-Accel [m/s 2]
-5
1000
2000
3000
4000
5000
6000
7000
8000
9000
1000
2000
3000
4000
5000
6000
7000
8000
9000
1000
2000
3000
4000
5000
6000
7000
8000
9000
y-Accel [m/s 2]
10
0
-10
-20
z-Accel [m/s 2]
15
10
Figure 28
-0.5
1000
2000
3000
4000
5000
6000
7000
8000
9000
1000
2000
3000
4000
5000
6000
7000
8000
9000
1000
2000
3000
4000
5000
6000
7000
8000
9000
0.5
-0.5
Yaw-Rate [rad/s]
Pitch-Rate [rad/s]
Roll-Rate [rad/s]
1
0
-1
-2
Figure 29
ANNEXES
178
Orientation
Roll-ang [deg]
20
0
-20
-40
1000
2000
3000
4000
5000
6000
7000
8000
9000
1000
2000
3000
4000
5000
6000
7000
8000
9000
1000
2000
3000
4000
5000
6000
7000
8000
9000
Pitch-ang [deg]
10
0
-10
-20
Yaw-ang [deg]
200
-200
Figure 30
We also road up and down little hills as can be seen in the roll and pitch angle in
figure 22.
Yaw-ang [deg]
200
100
0
-100
-200
1000
2000
3000
4000
5000
6000
7000
8000
9000
1000
2000
3000
4000
5000
6000
7000
8000
9000
200
0
-200
-400
-600
-800
Figure 31
ANNEXES
CONCLUSION:
We have achieved or targets, logged the data, and made sure that it was correct, now
we just need to implement the Kalman filter and check the process with the real
device that provides the state estimate.
179
ii
CONTENTS
Contents
1 Budget
1.1
Equipment Expenses . . . . . . . . . . . . . . . . . . . . . . . . .
1.1.1
IMU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.1.2
GPS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.1.3
Computers . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.1.4
Test Vehicle . . . . . . . . . . . . . . . . . . . . . . . . . .
1.1.5
1.2
Software Expenses . . . . . . . . . . . . . . . . . . . . . . . . . .
1.3
Human Labor . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.4
Other Expenses . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.4.1
Office Stationary . . . . . . . . . . . . . . . . . . . . . . .
1.4.2
Phone Bill . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.4.3
Trip to Braunschweig . . . . . . . . . . . . . . . . . . . . .
1.4.4
. . . . . . . . . . . . . . . . . . . .
Total Budget . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.5
Annexes
10
Budget
Budget
This chapter will study the costs needed to develop this project, which will basically be divided in:
Equipment expenses (fixed tangible assets)
Software expenses (fixed intangible assets)
Human labor (current assets, salaries)
Others: office stationary, trips, phone bill (current tangible and intangible
assets)
Notice that in the case of the fixed assets the amortization most be considered in
order to calculate the real cost or the project. This amortization will be done in a
2 year basis, which is the duration of the overall driver assistance system project,
considering that this specific part of the project last 6 months; this is, the real
cost of the fix assets for this part of the project will be a forth of the total cost.
All cost are expressed in Euros except for the GPS expenses, which appear in US
Dollars. Once the total GPS cost is summed up, the change of currency will be
made.
Budget
1.1
1.1.1
Equipment Expenses
IMU
Product
Discount
Amount
1.759,00
10
1.575,00
100,00
10
90,00
30,00
100
0,00
450,00
10
405,00
Suitcase MT DK
25,00
10
22,50
-335,00
10
-301,50
Shipping Cost
35,00
35,00
TOTAL EUROS
1.826,00
2 year amortization
456,50
GPS
Product
Discount
Amount
11.495,00
11.495,00
9.995,00
9.995,00
University Discount
-10.745,00
-10.745,00
995,00
1.999,00
80,00
80,00
DL4+RT2
ceiver
Re- 1
Budget
160,00
160,00
Magnetic
/Bracket
230,00
460,00
Antenna
Support 2
2-way-radio Modem
1.500,00
3.000,00
GSM-Modem
750,00
750,00
1.350,00
1.350,00
TOTAL
Discount
18.535,00
16,2
3.000,00
TOTAL US DOLLARS
TOTAL EUROS
15.535,00
20.195,50
2 year amortization
5.049,00
Budget
1.1.3
Computers
Product
Discount
Amount
2.000,00
2.000,00
1.000,00
1.000,00
TOTAL EUROS
3.000,00
2 year amortization
750,00
Two laptops were needed because data was captured from both the GPS base
station receiver as well as from the rover station receiver. Data was logged form
both receivers because an important part of this thesis was to understand how
the differential GPS works. Once the GPS has been studied and how it works is
totally clear to the developer engineer, only one laptop will be necessary.
1.1.4
Test Vehicle
In the case of this project the test vehicle was a donation for the university from
the vehicle brand, BMW. This car was out of circulation, it could only be used
for study inside the test field, and of course, it could not be sold afterward. This
is why in this particular case the vehicle has no cost associated, but it should
be an important cost to considered if wanting to develop a similar project in the
future.
1.1.5
Equipment
Total Cost
2 year Amortization
IMU
1.826,00
456,50
GPS
20.195,50
5.049,00
Computer
3.000,00
750,00
Vehicle
0,00
0,00
TOTAL EUROS
25.021,50
6.255,50
Budget
1.2
Software Expenses
All software needed to use the GPS and IMU is already included in the equipment
expenses. It is also considered that the laptops come completely equipped with
Windows XP and Microsoft Office. Therefore, the only two software expenses are
Matlab and Microsoft C++ Visual Studio.
Product
Discount
Amount
3.100,00
3.100,00
799,00
799,00
TOTAL EUROS
3.899,00
2 year amortization
974,75
Budget
1.3
Human Labor
The Human Labor has been calculated considering cost per hour of the engineer
developing the project, which is estimated to be 50 euros per hour and of the
engineer supervising the project, estimated 70 euros per hour. The duration of
the project was 6 months, considering 20 day months (no work on weekends), the
total days work sum up to be 120 days. The developing engineer dedicates all his
working time to the project, but the supervisor only dedicates 1 hour per day.
Considering all the mentioned above:
Type of Human Labor
Total
Hours
Amount
Engineer
project
developing
the 50
120
960
48000,00
Engineer
project
supervising
the 70
120
120
8400,00
TOTAL EUROS
56400,00
Budget
1.4
Other Expenses
1.4.1
Office Stationary
Paper
Pens
DVDs
Printer
Total estimated cost 150 Euros
1.4.2
Phone Bill
When obtaining GPS corrections from a virtual GPS station through a GSM
modem, it was already explained that a phone call had to be done. Since these
calls were long, the cost has to be considered.
Total estimated cost 100 Euros
1.4.3
Trip to Braunschweig
The data used to implement the Klaman Filter was captured in a partner company
in Braunschweig (city about 200Km away). It was necessary to capture the data
in Braunschweig because it is where there was access to the IMAR platform. The
cost of the trip was:
Hotel: 2 rooms (one for the developer engineer and one for the supervisor
engineer) at an approximated cost of 100 euros per room, sums up to 200
euros
Car rent: 2 day rent cost approximately 200 euros
Gas: approximately 50 euros for the 400 Km
The whole trip sums up to a cost of 450 euros
Budget
1.4.4
Expense
Total Cost
Office Stationary
150
Phone Bill
100
Trip to Braunschweig
450
TOTAL EUROS
700,50
Budget
1.5
Total Budget
Expense
Total Cost
Equipment Expenses
6.255,50
Software Expenses
974,75
Human Labor
56.400,00
Others
700,50
TOTAL EUROS
64.330,75
It can be observed that the cost that has the most weight in this thesis is the
human labor, but remember that in this case the university discounts were very
generous, furthermore, the car was donated for research purposes. It is important
to note this because the figures here presented can create a wrong opinion of the
real cost of this project.
ANNEXES
ANNEXES
Contents
1. Annex C: IMU Quote......................................................................11
2. Annex D: GPS Quote 1...................................................................12
3. Annex E: GPS Quote 2...................................................................15
10
University of Paderborn
Tobias Hesse
Heinz Nixdorf Institut
Frstenallee 11
33102 Paderborn
Germany
Quote
Page 1
Invoice Address
University of Paderborn
Tobias Hesse
Heinz Nixdorf Institut
Frstenallee 11
33102 Paderborn
Germany
Salesperson
E-Mail
Shipment Address
Phone No.
Fax No.
VAT Reg. No.
Bank
Account No.
IBAN
BIC
+31-53-4836444
+31-53-4836445
NL808707309B01
ABN Amro
565550675
NL94 ABNA 0565 5506 75
ABNANL2A
Line
20000
30000
35000
40000
50000
60000
70000
Product No.
Description
10666
Quantity
Unit Price
D%
Amount
1,750.00
10
1,575.00
100.00
10
90.00
1
1
1
1
1
30.00
450.00
25.00
-335.00
35.00
100
10
10
10
405.00
22.50
-301.50
35.00
Shipment Method
Shipment Date
1,826.00
Payment options:
- Payment in Advance (2% reduction)
- Credit card payment (VISA or MasterCard)
- Account (not eligible for first purchase or exceeding Euro 10,000.00)
This offer is 30 days valid. All our deliveries and orders will be executed in accordance with our general terms and conditions
as registered at the Chamber of Commerce Veluwe & Twente, no 08088230, available at www.xsens.com.