Está en la página 1de 39

Sensors and Sensing

Pose Sensors and Navigation

Todor Stoyanov

Mobile Robotics and Olfaction Lab


Center for Applied Autonomous Sensor Systems
Örebro University, Sweden
todor.stoyanov@oru.se

11.12.2014

T. Stoyanov (MRO Lab, AASS) Sensors & Sensing 11.12.2014 1 / 25


Admin

Lab 3 has been scheduled for 15th of Jan. 10:00-12:00. Room T1210.
Who has not selected Lab assignment yet?
Who has the Lab 1 sets?

T. Stoyanov (MRO Lab, AASS) Sensors & Sensing 11.12.2014 2 / 25


Outline

1 Inertial Measurements

2 Absolute Position Measurement

3 Kalman Filters

4 Practice: Exam Questions

T. Stoyanov (MRO Lab, AASS) Sensors & Sensing 11.12.2014 3 / 25


Inertial Measurements

Outline

1 Inertial Measurements

2 Absolute Position Measurement

3 Kalman Filters

4 Practice: Exam Questions

T. Stoyanov (MRO Lab, AASS) Sensors & Sensing 11.12.2014 3 / 25


Inertial Measurements

Linear Acceleration: accelorometers

Accelorometers are sensors that can


detect the relative linear acceleration
along an axis.
The basic principle of operation can
be thought of as an objects
suspended on a spring.
When the system is acelerated along
the spring direction, the mass moves,
relative to the spring mounting point.
The displacement of the object is
proportional to the spring constant, its
mass, and the acceleration.

T. Stoyanov (MRO Lab, AASS) Sensors & Sensing 11.12.2014 3 / 25


Inertial Measurements

Angular Acceleration: gyros

Gyroscope sensors rely on the


gyroscopic effect to measure angular
acceleration.
The flywheel gyro uses a spinning
disc, suspended on a mobile ring.
When a torque is applied to the input
axis, the angular momentum of the
wheel transfers the torque to the
output axis.
A sensor on the output axis measures
the angular acceleration along the
input axis.

T. Stoyanov (MRO Lab, AASS) Sensors & Sensing 11.12.2014 4 / 25


Inertial Measurements

Physical Implementation

Both accelorometers and gyroscopes are usually implemented using


cheap on-chip systems.
MEMS implementations, based on vibrations.
Each sensor only measures along a single axis: linear or rotational.
If a torque/force is applied to the system, we only see the projection along
that axis.

T. Stoyanov (MRO Lab, AASS) Sensors & Sensing 11.12.2014 5 / 25


Inertial Measurements

Integral Measurements and Errors

Accelorometers and gyros provide instantaneous measurements of linear


and angular acceleration.
We are often interested not in acceleration, but rather speed, or more
often position (linear/angular).
To obtain linear/angular velocity from acceleration, we need to integrate
measurements over a time window.
To obtain position/orientation, we need to integrate linear/angular
velocities over time again.
This double integration results in errors being summed into the result
twice.
Thus, a lot of drift over time. Reliable only over short intervals.

T. Stoyanov (MRO Lab, AASS) Sensors & Sensing 11.12.2014 6 / 25


Inertial Measurements

Magnetic Compass

A different mode of sensing orientations is by using a magnetic compass.


A compass aligns with the magnetic field of earth and measures absolute
orientation in the XY-plane (relative to magnetic north).
Implementation using hall effect sensors is common.
Only for in-plane orientation.

T. Stoyanov (MRO Lab, AASS) Sensors & Sensing 11.12.2014 7 / 25


Inertial Measurements

Compass error modes

Compasses are very sensitive to


fluctuations in the magnetic field.
Earth’s magnetic field is not perfectly
uniform.
Electronic equipment induces local
magnetic fields.
Metllic and fero-magnetic objects
distort the field.
Problems with shielding.

T. Stoyanov (MRO Lab, AASS) Sensors & Sensing 11.12.2014 8 / 25


Inertial Measurements

IMUs

Inertial Measurement Units (IMUs)


usually integrate several inertail
sensors on a single board.
Usually 3 accelorometers and 3 gyros
for 6DoF pose, may inlude compass.
High-end IMUs use redundant
additional sensors and perform
additional filtering operations to
increase reliability.
Calibration procedures to reduce
sensor drift. E.g. common to measure
for a time window without moving to
remove systematic background noise.

T. Stoyanov (MRO Lab, AASS) Sensors & Sensing 11.12.2014 9 / 25


Absolute Position Measurement

Outline

1 Inertial Measurements

2 Absolute Position Measurement

3 Kalman Filters

4 Practice: Exam Questions

T. Stoyanov (MRO Lab, AASS) Sensors & Sensing 11.12.2014 10 / 25


Absolute Position Measurement

Global Positioning System (GPS)

Sattelite-based localization is
often used for outdoor robotic
platforms, as well as on
ships/airplanes/etc.
Systems like GPS/ GLONASS
/ GALILEO operate a fleet of
sattelites in lower earth orbit.
GPS receivers measure the
signal from visible sattelites
and use it to deduce an
absolute 3D position in
geo-reference frame.

T. Stoyanov (MRO Lab, AASS) Sensors & Sensing 11.12.2014 10 / 25


Absolute Position Measurement

GPS operation principle

How does it work exactly?


Each sattelite sends a pseudo-random sequence of bits, encoded on top
of a carrier signal.
The code transmitted is related to the internal clock of the sattelite.
Receiers generate the same sequence based on their local clocks. By
aligning the two codes, the receiver can measure the time of travel of the
signal.
The time of travel of the singal tt is:

tt = tr − ts + toff

where tr is the measured time of receiving the signal, ts is the measured


time of sending and toff is an unknown offset between the receiver and
sender clocks.

T. Stoyanov (MRO Lab, AASS) Sensors & Sensing 11.12.2014 11 / 25


Absolute Position Measurement

GPS operation principle

The clocks of all sattelites are synchronized by the central operations


point, correcting for relativistic effects.
Given two sattelite signal travel times tt1 and tt2 , we can compute

tt1 − tt2 = tr1 − ts1 + tr2 − ts2

this elliminates the clock offset toff .


With at least 4 sattelites, we can compute 3 time differentials and
triangulate the position of the receiver.
Using more than 4 satelites allows for a least-squares solution to
minimize the error in position.

T. Stoyanov (MRO Lab, AASS) Sensors & Sensing 11.12.2014 12 / 25


Absolute Position Measurement

GPS Errors

GPS systems have several common issues:


Clouds and stratospheric effects can alter significantly the measurements
as they cause refractions.
Multi-path reflections can cause sporradic jumps in the position estimate.
The height estimate is usually substaantially more unreliable than the
xy-position.
Low visibility of sattelites causes issues in proximity to tall buildings and
of course indoors.
Position accuracy is on the order of 1-2 meters.

T. Stoyanov (MRO Lab, AASS) Sensors & Sensing 11.12.2014 13 / 25


Absolute Position Measurement

Differential GPS

Differential GPS relies on


additional ground-based
stations.
Each ground station observes
the same sattelites as
receiers.
Positions of ground stations
are precisely known.
Ground stations compute a
differential between measured
and known position and
transmit corrections.
Different way to correct
signals. Usually D-GPS refers
to code-space correction.
T. Stoyanov (MRO Lab, AASS) Sensors & Sensing 11.12.2014 14 / 25
Absolute Position Measurement

Real-time Kinematic (RTK) GPS

RTK-GPS is a form of differential


GPS.
RTK receivers and base stations use
the carrier signal, instead of the code.
Carrier signals are modulated at
∼ 15MHz, code signal is modulated
at ∼ 1MHz.
Precise alignment of carrier signals
gives a more accurate estimate of the
travel time tt .
Accuracy in centimeter range.

1
1
https://extension.usu.edu/nasa/files/uploads/GTK-tuts/
RTK_DGPS.pdf
T. Stoyanov (MRO Lab, AASS) Sensors & Sensing 11.12.2014 15 / 25
Absolute Position Measurement

Indoor Positioning Systems

Indoor global positioning systems use a set of landmarks, distributed in


the environment.
Landmark observations are fused in a filter.

T. Stoyanov (MRO Lab, AASS) Sensors & Sensing 11.12.2014 16 / 25


Absolute Position Measurement

Indoor Positioning Systems

T. Stoyanov (MRO Lab, AASS) Sensors & Sensing 11.12.2014 16 / 25


Kalman Filters

Outline

1 Inertial Measurements

2 Absolute Position Measurement

3 Kalman Filters

4 Practice: Exam Questions

T. Stoyanov (MRO Lab, AASS) Sensors & Sensing 11.12.2014 17 / 25


Kalman Filters

Kalman filter — what is it?

The Kalman filter (KF) is one of the classical methods for fusing
observations from different sensors for a more robus state estimate.
Proposed by Rudolph Kalman in 1950s.
It is a linear Gaussian filter.
The assumptions are that the state variable can be modeled using a
gaussian pdf N (x̂t , Pt ).
In addition, the KF assumes the state evolves as a linear function with
Gaussian noise.
This assumption is relaxed in the Extended KF (EKF), using linearization
around the current estimate.

T. Stoyanov (MRO Lab, AASS) Sensors & Sensing 11.12.2014 17 / 25


Kalman Filters

Kalman filter — Formulation

Given a state variable over time xt , the next state is a linear function of the
previous state and the controls ut :

xt = Axt−1 + But + εt

where εt ∼ N (0, Q)
The probability of measuring a landmark zt is also a linear function of xt
with added Gaussian noise:

zt = Hxt + δt

where δt ∼ N (0, R)

T. Stoyanov (MRO Lab, AASS) Sensors & Sensing 11.12.2014 18 / 25


Kalman Filters

Kalman filter — Formulation

The KF assumes an initial state x0 , with a normal distribution of


covariance P0 .
We then project the next state variables:

x̂t− = Axt−1 + But (1)


P−
t = APt−1 A + Q T
(2)

The measurements zt are then used to correct the prediction:

Kt = P− T − T
t H (HPt H + R)
−1
(3)
x̂t = x̂t− + Kt (zt − H x̂t− ) (4)
Pt = (I − Kt H)P− t (5)

Kt is the Kalman gain.

T. Stoyanov (MRO Lab, AASS) Sensors & Sensing 11.12.2014 19 / 25


Kalman Filters

Kalman filter — Formulation

T. Stoyanov (MRO Lab, AASS) Sensors & Sensing 11.12.2014 20 / 25


Kalman Filters

Kalman filter — Example

Simple 1D example. Robot moving on a line, robots state xt is the


position along the line in m. Pt is the varaince (1D).
Controls ut are 1D speeds (+/-) in m/s. For simplicity we take ∆t = 1s.
A = B = 1.
Measurements are the distance to a landmark l1 = 1m. Let z0t = d1 .
H relates measurements to state. In order to get a linear measurement
model, we set zt = z0t − l1 . Then, H = −1.
Set the variances of controls and sensors: Q = 0.3, R = 0.1.
Let x0 = 2m, P0 = 2 be an uncertain initial position estimate.
We observe controls u1 = 1, u2 = 1, u3 = −2 and landmarks as
z1 = −3.8T , z2 = −4.9, z3 = −2.2.

T. Stoyanov (MRO Lab, AASS) Sensors & Sensing 11.12.2014 21 / 25


Kalman Filters

Kalman filter — Example

Simple 1D example. Robot moving on a line, robots state xt is the


position along the line in m. Pt is the varaince (1D).
Controls ut are 1D speeds (+/-) in m/s. For simplicity we take ∆t = 1s.
A = B = 1.
Measurements are the distance to a landmark l1 = 1m. Let z0t = d1 .
H relates measurements to state. In order to get a linear measurement
model, we set zt = z0t − l1 . Then, H = −1.
Set the variances of controls and sensors: Q = 0.3, R = 0.1.
Let x0 = 2m, P0 = 2 be an uncertain initial position estimate.
We observe controls u1 = 1, u2 = 1, u3 = −2 and landmarks as
z1 = −3.8T , z2 = −4.9, z3 = −2.2.

T. Stoyanov (MRO Lab, AASS) Sensors & Sensing 11.12.2014 21 / 25


Kalman Filters

Kalman filter — Example

Simple 1D example. Robot moving on a line, robots state xt is the


position along the line in m. Pt is the varaince (1D).
Controls ut are 1D speeds (+/-) in m/s. For simplicity we take ∆t = 1s.
A = B = 1.
Measurements are the distance to a landmark l1 = 1m. Let z0t = d1 .
H relates measurements to state. In order to get a linear measurement
model, we set zt = z0t − l1 . Then, H = −1.
Set the variances of controls and sensors: Q = 0.3, R = 0.1.
Let x0 = 2m, P0 = 2 be an uncertain initial position estimate.
We observe controls u1 = 1, u2 = 1, u3 = −2 and landmarks as
z1 = −3.8T , z2 = −4.9, z3 = −2.2.

T. Stoyanov (MRO Lab, AASS) Sensors & Sensing 11.12.2014 21 / 25


Kalman Filters

Kalman filter — Example

Simple 1D example. Robot moving on a line, robots state xt is the


position along the line in m. Pt is the varaince (1D).
Controls ut are 1D speeds (+/-) in m/s. For simplicity we take ∆t = 1s.
A = B = 1.
Measurements are the distance to a landmark l1 = 1m. Let z0t = d1 .
H relates measurements to state. In order to get a linear measurement
model, we set zt = z0t − l1 . Then, H = −1.
Set the variances of controls and sensors: Q = 0.3, R = 0.1.
Let x0 = 2m, P0 = 2 be an uncertain initial position estimate.
We observe controls u1 = 1, u2 = 1, u3 = −2 and landmarks as
z1 = −3.8T , z2 = −4.9, z3 = −2.2.

T. Stoyanov (MRO Lab, AASS) Sensors & Sensing 11.12.2014 21 / 25


Kalman Filters

Kalman filter — Example

Predict:

x̂t− = 2 + 1 (6)
P−
t = 2 + 0.3 (7)

Correct:

Kt = 2.3 ∗ −1 ∗ (−1 ∗ 2.3 ∗ −1 + 0.1)−1 = −0.95 (8)


x̂t = 3 − 0.95 ∗ (−3.8 − (−1) ∗ 3) = 3.7 (9)
Pt = (1 − (−0.95 ∗ −1))2.5 = 0.125 (10)

Variance drops substantially as we obtain more certain measurements.


Same procedure for the next two observations.

T. Stoyanov (MRO Lab, AASS) Sensors & Sensing 11.12.2014 22 / 25


Practice: Exam Questions

Outline

1 Inertial Measurements

2 Absolute Position Measurement

3 Kalman Filters

4 Practice: Exam Questions

T. Stoyanov (MRO Lab, AASS) Sensors & Sensing 11.12.2014 23 / 25


Practice: Exam Questions

Exam Questions

You may bring any form of printed material to the exam


Computers, cell phones, e-book readers etc. are not allowed
Three types of questions at the exam: True/False, Design, Derive
True/False questions will make a statement about a particular
sensor/system which you will have to judge correct or not
Examples:
Time of flight sensors measure the phase difference between the emitted
and received signal.
Incremental optical encoders cannot determine absolute position.
GPS systems need at least four sattelite signals in order to elliminate the
offset between calculated and real sattelite positions.

T. Stoyanov (MRO Lab, AASS) Sensors & Sensing 11.12.2014 23 / 25


Practice: Exam Questions

Exam Questions

You may bring any form of printed material to the exam


Computers, cell phones, e-book readers etc. are not allowed
Three types of questions at the exam: True/False, Design, Derive
True/False questions will make a statement about a particular
sensor/system which you will have to judge correct or not
Examples:
Time of flight sensors measure the phase difference between the emitted
and received signal.
Incremental optical encoders cannot determine absolute position.
GPS systems need at least four sattelite signals in order to elliminate the
offset between calculated and real sattelite positions.

T. Stoyanov (MRO Lab, AASS) Sensors & Sensing 11.12.2014 23 / 25


Practice: Exam Questions

Exam Questions

You may bring any form of printed material to the exam


Computers, cell phones, e-book readers etc. are not allowed
Three types of questions at the exam: True/False, Design, Derive
True/False questions will make a statement about a particular
sensor/system which you will have to judge correct or not
Examples:
Time of flight sensors measure the phase difference between the emitted
and received signal.
Incremental optical encoders cannot determine absolute position.
GPS systems need at least four sattelite signals in order to elliminate the
offset between calculated and real sattelite positions.

T. Stoyanov (MRO Lab, AASS) Sensors & Sensing 11.12.2014 23 / 25


Practice: Exam Questions

Exam Questions

Design type questions will require you to set up a sensor system in a


mock-up scenario.
You will be guided through an application scenario and will have to make
decisions on what sensors to use.
Example question:

T. Stoyanov (MRO Lab, AASS) Sensors & Sensing 11.12.2014 24 / 25


Practice: Exam Questions

Exam Questions

Example question:
You are designing a robot for in-pipe inspection of a gas plant. Your robot has
to enter a pipe of diameter 30cm, move autonomously along the pipe and
inspect the pipe for cracks. If a crack is detected, it’s position along the pipe
has to be reported. Describe and motivate your robot design. Pay attention to:
what kind of positioning system would you recommend?
what kind of positioning precision guarantees can you give?
what would be the most cost-efficient option? what would be the most
precise option?
what assumptions on the environment do you need to make?
what means of detecting the cracks would you use?
what algorithms would you use?

T. Stoyanov (MRO Lab, AASS) Sensors & Sensing 11.12.2014 24 / 25


Practice: Exam Questions

Exam Questions

Derive type questions would require you to derive a formula or result


about a particular sensor/system.
Example questions:
Derive the equations of motion for a differential drive robot. Given
particular input parameters, compute the pose of a robot at time t
Use a median filter on a particular image.
Apply a Kalman filter step on a particular signal.
Derive the log-odds update rule for an occupancy map.

T. Stoyanov (MRO Lab, AASS) Sensors & Sensing 11.12.2014 25 / 25


Practice: Exam Questions

Sensors and Sensing


Pose Sensors and Navigation

Todor Stoyanov

Mobile Robotics and Olfaction Lab


Center for Applied Autonomous Sensor Systems
Örebro University, Sweden
todor.stoyanov@oru.se

11.12.2014

T. Stoyanov (MRO Lab, AASS) Sensors & Sensing 11.12.2014 25 / 25


Practice: Exam Questions

References

T. Stoyanov (MRO Lab, AASS) Sensors & Sensing 11.12.2014 25 / 25

También podría gustarte