Sensors and SensingPose Sensors and Navigation
Todor Stoyanov
Mobile Robotics and Olfaction LabCenter for Applied Autonomous Sensor Systems
Örebro University, [email protected]
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 candetect the relative linear accelerationalong an axis.
The basic principle of operation canbe thought of as an objectssuspended on a spring.
When the system is acelerated alongthe spring direction, the mass moves,relative to the spring mounting point.
The displacement of the object isproportional to the spring constant, itsmass, and the acceleration.
T. Stoyanov (MRO Lab, AASS) Sensors & Sensing 11.12.2014 3 / 25
Inertial Measurements
Angular Acceleration: gyros
Gyroscope sensors rely on thegyroscopic effect to measure angularacceleration.
The flywheel gyro uses a spinningdisc, suspended on a mobile ring.
When a torque is applied to the inputaxis, the angular momentum of thewheel transfers the torque to theoutput axis.
A sensor on the output axis measuresthe angular acceleration along theinput axis.
T. Stoyanov (MRO Lab, AASS) Sensors & Sensing 11.12.2014 4 / 25
Inertial Measurements
Physical Implementation
Both accelorometers and gyroscopes are usually implemented usingcheap 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 alongthat 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 linearand angular acceleration.
We are often interested not in acceleration, but rather speed, or moreoften position (linear/angular).
To obtain linear/angular velocity from acceleration, we need to integratemeasurements over a time window.
To obtain position/orientation, we need to integrate linear/angularvelocities over time again.
This double integration results in errors being summed into the resulttwice.
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 absoluteorientation 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 tofluctuations in the magnetic field.
Earth’s magnetic field is not perfectlyuniform.
Electronic equipment induces localmagnetic fields.
Metllic and fero-magnetic objectsdistort 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 inertailsensors on a single board.
Usually 3 accelorometers and 3 gyrosfor 6DoF pose, may inlude compass.
High-end IMUs use redundantadditional sensors and performadditional filtering operations toincrease reliability.
Calibration procedures to reducesensor drift. E.g. common to measurefor a time window without moving toremove 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 isoften used for outdoor roboticplatforms, as well as onships/airplanes/etc.
Systems like GPS/ GLONASS/ GALILEO operate a fleet ofsattelites in lower earth orbit.
GPS receivers measure thesignal from visible sattelitesand use it to deduce anabsolute 3D position ingeo-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 topof 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. Byaligning the two codes, the receiver can measure the time of travel of thesignal.
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 measuredtime of sending and toff is an unknown offset between the receiver andsender 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 operationspoint, 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 andtriangulate the position of the receiver.
Using more than 4 satelites allows for a least-squares solution tominimize 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 measurementsas they cause refractions.
Multi-path reflections can cause sporradic jumps in the position estimate.
The height estimate is usually substaantially more unreliable than thexy-position.
Low visibility of sattelites causes issues in proximity to tall buildings andof 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 onadditional ground-basedstations.
Each ground station observesthe same sattelites asreceiers.
Positions of ground stationsare precisely known.
Ground stations compute adifferential between measuredand known position andtransmit corrections.
Different way to correctsignals. Usually D-GPS refersto 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 differentialGPS.
RTK receivers and base stations usethe carrier signal, instead of the code.
Carrier signals are modulated at∼ 15MHz, code signal is modulatedat ∼ 1MHz.
Precise alignment of carrier signalsgives a more accurate estimate of thetravel time tt.
Accuracy in centimeter range.
1
1https://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 inthe 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 fusingobservations 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 agaussian pdf N (x̂t,Pt).
In addition, the KF assumes the state evolves as a linear function withGaussian noise.
This assumption is relaxed in the Extended KF (EKF), using linearizationaround 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 theprevious 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 ofcovariance P0.
We then project the next state variables:
x̂−t = Axt−1 +But (1)
P−t = APt−1AT +Q (2)
The measurements zt are then used to correct the prediction:
Kt = P−t HT(HP−t HT +R)−1 (3)
x̂t = x̂−t +Kt(zt−Hx̂−t ) (4)
Pt = (I−KtH)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 theposition 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 z′t = d1.
H relates measurements to state. In order to get a linear measurementmodel, we set zt = z′t− 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 asz1 =−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 theposition 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 z′t = d1.
H relates measurements to state. In order to get a linear measurementmodel, we set zt = z′t− 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 asz1 =−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 theposition 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 z′t = d1.
H relates measurements to state. In order to get a linear measurementmodel, we set zt = z′t− 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 asz1 =−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 theposition 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 z′t = d1.
H relates measurements to state. In order to get a linear measurementmodel, we set zt = z′t− 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 asz1 =−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 particularsensor/system which you will have to judge correct or not
Examples:
Time of flight sensors measure the phase difference between the emittedand received signal.
Incremental optical encoders cannot determine absolute position.
GPS systems need at least four sattelite signals in order to elliminate theoffset 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 particularsensor/system which you will have to judge correct or not
Examples:
Time of flight sensors measure the phase difference between the emittedand received signal.
Incremental optical encoders cannot determine absolute position.
GPS systems need at least four sattelite signals in order to elliminate theoffset 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 particularsensor/system which you will have to judge correct or not
Examples:
Time of flight sensors measure the phase difference between the emittedand received signal.
Incremental optical encoders cannot determine absolute position.
GPS systems need at least four sattelite signals in order to elliminate theoffset 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 amock-up scenario.
You will be guided through an application scenario and will have to makedecisions 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 hasto enter a pipe of diameter 30cm, move autonomously along the pipe andinspect the pipe for cracks. If a crack is detected, it’s position along the pipehas 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 mostprecise 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 resultabout a particular sensor/system.
Example questions:
Derive the equations of motion for a differential drive robot. Givenparticular 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 SensingPose Sensors and Navigation
Todor Stoyanov
Mobile Robotics and Olfaction LabCenter for Applied Autonomous Sensor Systems
Örebro University, [email protected]
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