FYS3240- 4240 Data acquisition & control Navigation and attitude (orientation) Spring 2021 – Lecture #6 and #7 Bekkeng 10.02.2021
FYS3240- 4240
Data acquisition & control
Navigation and attitude (orientation)
Spring 2021– Lecture #6 and #7
Bekkeng 10.02.2021
What we will cover
• An introduction to navigation
– Inertial navigation
– Satellite navigation
• Reference frames / Coordinate systems
• Attitude representation & determination
– Why do we need to know the attitude/orientation of an object?
– The attitude matrix (DCM) for 3D orientation
– Heading (2D orientation)
– The Earth’s gravity acceleration
– The Earth’s magnetic field
Support literature
Chapter (1), 2, 4 and 7.
For this lecture read chapter 2:
Page 21 - page 32 (but not 2.2.4 or 2.2.7)
2.3 – 2.3.2
Equation (2.101)
2.3.9 and 2.3.10
Introduction
Vector notation – column vectors
Right-hand-rule:
A vector must be decomposed in a
coordinate system for implementation
on a computer.
Notation
• ABR
: transformation from frame R to frame B.
– NB: read superscripts from right to left.
• 𝐴𝑅𝐵 : transformation from frame R to frame B.
– NB: read from subscript to superscript
Navigation
• Estimate the position, orientation and velocity of a vehicle
Need to select a suitable
coordinate frame!
Need for navigation solution
• Accelerometer
• GPS receiver
• Pressure sensor (for altitude)
• Camera– If known points can be identified in the picture
• Indoor positioning technology using beacons (based on infrastructure)
– UWB - Ultra-Wideband (GHz frequency)
– Ultrasound (20 kHz – 40 kHz)
– WiFi
– Bluetooth
– Bluetooth Low Energy (BLE)
Examples of position sensors
Received signal strength Indication (RSSI) and
fingerprinting (and angle of arrival – AoA).
Bluetooth 5.1 Puts Bluetooth In Its Place (nordicsemi.com)
TOF (time-of-flight) /TDOA (time-
difference-of-arrival)
Forkbeard - ultrasound indoor GPS
Orientation sensors I
• Gyroscopes
• Magnetometer
2F m v
A
Orientation sensors II
• GPS receiver
– two/three or more antennas (two for heading only)
• Sun sensor
• Star sensor
• Accelerometer
– when static
Common in space applications
Inertial Navigation
Inertial Navigation System (INS)
• Uses inertial sensors – gyroscopes
and accelerometers.
• The first INS systems were used in
the V1 and V2 rockets during the
second world war.
• In the 1960s the Apollo program used
inertial navigation in space.
Relative positioning – inertial navigation
• Relative measurements, dead reckoning (DR).
• Need to know initial position and orientation.
• Based on mathematical integration of accelerometer and
gyroscope measurements.
• The positioning solution drift (error increase) with time due to
the integration.
No external signals or infrastructure is required!
For comparison - Absolute positioning
• Active beacons (indoor)
• GPS / GNSS (outdoor)
• Landmark navigation
– for instance camera-based navigation
Requires external signals and “infrastructure” !
GNSS satellites, beacons (with known position)
or known landmarks
Satellite Navigation
Satellite navigation
• A satellite navigation system with global coverage is called a global navigation satellite system, or GNSS.
• Limitations of satellite navigation
– Need line of sight
– Can be jammed• Noise jamming
• Spofing
– Update rate 1 – 50 Hz
Figure from VectorNav
Triangulation in 3D
One satellite
Two satellites
Three satellites
Need a minimum of four satellites to determine position (latitude,
longitude, altitude), since clock error in the receiver also need to be
estimated.
r = c * t
Height is not so easy ….
• The geoid approximates mean sea level (MSL) .
• A mathematical model can only approximate the real shape of the
Earth.
• Different methods/definitions give different height measurements!
Extra
Space weather affect GNSS!
South Atlantic Anomali
Figure from
Kartverket
solar wind.
FYS4640 – Space Weather and Navigation Satellite
Systems
Extra
Space weather research at UIO
UIO raketterSatellites
Sounding rockets
Andøya
Svalbard
100 – 1000 km
Extra
• Every sensor have errors and noise!
• Need multi-sensor data fusion to build accurate
and robust systems!
Data fusion
Sensor data fusion
Data processing
algorithm
(Estimator)
Computer
Sensor 1
Sensor 2
Sensor n
.
.
• Position
• Velocity
• Acceleration
• Attitude/orientation
• Sensor errors, such as
bias (offset)
Sensor fusion gives reduced uncertainty and makes
the system more robust!
Estimated values
Data fusion example: INS + GNSS (GPS)
• The INS error increases with time because of integration
– angle error ∝ 𝑡, position error ∝ 𝑡3
• INS is not dependent on external signals such as GPS.
Combine INS and GNSS sensor data fusion
INS and GNSS are complementary!
INS/GPS integration example
• A very common INS/GPS integration
• Only INS solution when GPS not available
GPS
INS
Estimator+
-+
v, p + GPS error
v, p + INS error
INS error estimate
-
GPS error – INS error
update rate: 1 – 50 Hz
update rate: ~1 kHz
Gyroscopes &
accelerometers
Position (p) and
velocity (v)
estimates
Reference frames / Coordinate systems
What is an inertia reference frame?
• A reference frame (coordinate system) where Newton’s laws
are valid!
– No linear (translational) acceleration.
– No angular acceleration.
• If we are to use Newton's laws in a non-inertial frame we need
to add fictive forces, such as Coriolis force and
centripetal/centrifugal forces.
ECEF (Earth-Centered Earth-Fixed)
• A global reference frame with origin in the Earth’s center of mass.
• The Ez axis is normal to the equator (points along the rotation axis
• of the Earth), and is positive in the direction of the north pole.
• The Ex axis is in the direction of the Greenwich prime meridian.
Often a positon on/close to the earth is
described with polar coordinates (geodetic
coordinate system), in terms of latitude (φ),
longitude (λ) and altitude (h).
ECI (Earth-Centered Inertial)
• A global reference frame with origin in the Earth’s center of mass.
• The Ez axis is normal to the equator (points along the rotation axis of
the Earth), and is positive in the direction of the north pole.
• The Ex axis is in the direction of the vernal equinox. (The vernal
equinox is defined by the intersection of the Earth equator plane and
the ecliptic plane, where the ecliptic is the plane of the Earth’s mean
orbit about the Sun).
The frame does not rotate with Earth and serves as an inertial
reference frame for objects flying high and fast, for instance
• satellites orbiting the Earth,
• sounding rockets,
• long range ballistic missiles, and
• hypersonic vehicles
Local level frame
• The North-East-Down (NED) frame is
the most common local reference
frame.
• Often this frame is fixed to the vehicle
and moves with the body frame.
• But, it can also be fixed to the
ground, for instance at the launch
point of a rocket/missile.
• Similar to the NED frame, there is
also an East-North-Up (ENU) frame.
• A flat Earth approximation is used
– assumed inertial (not rotating). NED-frame
When can we use the local level frame?
• Examples:
– NED (North East Down)
– ENU (East North Up)
• Note: the book usually refers to ENU.
Can be used as an inertial reference frame for objects flying
low and slow (short term navigation), including tactical missiles.
E
NU
When do we have to take into account
the rotation of the Earth ?
New York
Chicago
• Assume a vehicle launched from the
North pole with the intention of flying to
New York.
• Assumed the vehicle travels at a speed
of 5795 km/h.
• During the flight time, of approximately
one hour, the Earth will have rotated by
about 15 degrees.
• If no Coriolis correction is made to the
onboard INS during the flight the vehicle
will arrive in the Chicago area rather
than New York.
What is the effect of ignoring the
rotation of the Earth ?
• We can calculate this!
• Depends on how big the contribution from the Coriolis and
centripetal acceleration are, relative to ae.
• See lecture 7 for more details!
2i ie e ei e ei ei eR a a v r
Coriolis
accelerationcentripetal
acceleration
0
0
0
z
y
z y
BA
x
x
Body frame
• A platform has its own reference frame known as the body
frame
• Origin typically placed at the platform’s center of gravity.
• Three orthogonal axes that comprise a right-handed system.
• Common definition:
– x-axis is pointing forward (“out the nose”),
– y-axis is pointing to the right, and
– z-axis is defined by the right hand system.
• Note: Some authors do not
follow this definition ….
• See next slide
Usually the x-axis!
Standard axis definitions!
x
y
z
Sensor frame (S)
• Fixed to the sensor
• Typically not (perfectly) aligned
with the body frame!
Note: The measurement (sensitive) axes can
be misaligned with the indicated sensor frame!
Typically many frames in use …..
Need to know the transformation between frames/coordinate systems.
Decompose measurements from each sensor in the body frame
Attitude representation &
determination
Example: Spacecraft attitude (orientation)
• Definition: The angular orientation
of a body-fixed coordinate frame
with respect to an external
reference frame.
• Spacecraft, aircrafts and many
other vehicles must know their
attitude.
Satellites Sounding rocketss
Pointing accuracy
• Sensors need to be pointing towards the point of interest
– Higher accuracy better results
Sensor not
looking at the
correct scene
Correct pointing
Low pointing
error (jitter) High pointing jitter
Example from http://www.s3l.be/usr/files/di/fi/2/Lecture13_ADCS_TjorvenDelabie_20181111202.pdf
Why is attitude determination
important?
• To control the pointing direction of an object, we need to first
determine where it is pointing.
• In strapdown inertial navigation, we need to calculate the attitude
(orientation) before we can determine position and velocity of an
object.
• Orientation has three degrees of freedom (DOF)
– Need to determine three or more parameters
• Simple example: What is up and what is down?
– Orientation in the Earth's gravitational field.
– Control the orientation of our phone/tablet
display (using accelerometer data).
Examples (from aerospace)
• Attitude determination & control
– Point solar panels on a spacecraft/ satellite
towards the Sun.
– Point communication antennas on a
spacecraft/satellite towards the Earth.
– Point the payload (sensors) towards the point
of interest.
Pointing accuracy:
1/36000°~ 2.78*10-5 °
Examples (from aerospace)
• Attitude determination
– Transform a vector (for instance an electric
field vector) measured on board a sounding
rocket to a non-rotating Earth-fixed frame.
– Use a common coordinate system for multi-
sensor data fusion.
• For instance to fuse data from an IMU and
a magnetometer.
IMU Magnetometer
Arduino Nano 33 BLE sense
Measured What we want
Eamb
The direction cosine matrix (DCM)
• The direction cosine matrix (DCM) is one of
the many ways to mathematically represent
an object’s orientation (attitude)
• It utilizes nine parameters. Each of these
parameters are referred to as the direction
cosine values between a reference frame (n)
and a frame (b).
DCM (attitude matrix) A
Unit vectors
The direction cosine matrix (DCM)
• This matrix is orthogonal:
• Given a vector vB
in the body frame (B). The
representation of this vector in the reference frame (R) is
given by
A rotation from frame R to frame B. Can also be labelled ABR
where
Euler Angles
• A transformation from one coordinate frame to another can be
carried out as three successive rotations about different axes.
• It is common to define the Euler roll angle φ as a rotation in the
positive sense (according to the right hand rule) about the x-axis,
the pitch angle θ about the y-axis and the yaw angle ψ about
the z-axis.
– Note that the book deviates from this.
Euler Angles
Euler Angles
• The three principal rotation matrices for rotations about the
three axes is defined as:
Note: DCMs from reference frame {R}
to body frame {B}, 𝐴𝑅𝐵
Note: axis (1, 2, 3) = (x, y, z) = (roll, pitch, yaw)
Coordinate transformation example
• Transform a vector represented in the ECEF-frame to a vector
represented in the ECI-frame.
• Use the principal rotation matrix R3 for rotations about the z-
axis
The Greenwich Mean Sidereal Time (the hour angle)
Figure: Wiley
Calculation of the principal rotation
matrices
• Given by the projection of the body vectors xB, y
Band z
Bonto
the vectors xR, y
Rand z
Rof the reference frame.
R2
R1
𝜑
𝜑
cos𝜑 cos𝜑
sin𝜑
sin𝜑
R3, B3
Extra
Rotation about axis 3 (yaw)
Euler Angles to/from DCM
• The DCM for any Euler angle sequence can be constructed
from the individual axis rotations.
• There are many different combinations of Euler angles,
however, the (3-2-1) set of Euler angles corresponding to yaw-
pitch-roll (ψ-θ-φ) is considered to be the standard
The order of these rotations is important! A (3-2-1) set of Euler angles
typically result in a different orientation than applying those same
angles in a (1-2-3) sequence!
Attitude determination - sensors
• Inertial sensors
• Attitude sensors
Attitude determination
Problem: At each time point, find the orientation of the spacecraft
body frame {b} with respect to the reference frame {r}
Attitude determination
• The fundamental problem is to calculate the
attitude matrix 𝐴𝑅𝐵 (DCM)
• Can be calculated based on two or more
vector observations from a single point in
time. Deterministic algorithms require at
least two vector measurements
• With only a single vector measurement, the
rotation about this vector can not be
resolved.
ESA
Attitude determination
• For spacecraft the Earth magnetic field vector B and the pointing
vector S to the Sun (and other celestial objects) are common to
use.
• If we ignore measurement errors we can write:
𝑺𝑏 = 𝐴𝑒𝑐𝑖𝑏 𝑺𝑒𝑐𝑖
𝑩𝑏 = 𝐴𝑒𝑐𝑖𝑏 𝑩𝑒𝑐𝑖
the attitude matrix
From modelMeasuredProblem: determine the matrix 𝐴𝑒𝑐𝑖
𝑏 that
satisfies the two (or more) measurement
equations.
Solutions: Many standard techniques
• TRIAD
• q-method
• QUEST
• Extended Kalman filter
• ++
For info only!
Heading
• Heading (= azimuth angle or yaw angle) is an important 2D
measurement.
– Navigation on land and sea can be constrained to 2D.
• Definition: Heading is the direction in which a vehicle (x-axis) is
pointing at any given moment. It is expressed as the angular distance
relative to north (true or magnetic).
• The heading may not necessarily be the direction that the vehicle
actually travels (the velocity vector v).
N
E
𝜑
x
v
y
The_Seven_Ways_to_Find_Heading
The Earth’s gravity acceleration
• The Earth gravitational vector 𝒈𝒗 is given by
• Standing on the Earth we are also subject to the centrifugal
acceleration. The total gravity acceleration on the Earth is
therefore
• Since the Earth have an ellipsoid shape (not circular) the
gravity vector magnitude varies with latitude
– However, for many applications it is sufficient to only assume
variation with altitude.
– In addition comes the inhomogeneous mass distribution of the Earth.
𝒈𝒗 = −GM𝒔𝑩𝑬
|𝑺𝑩𝑬 |𝟑
where |𝒈𝒗| = 9.82023 m/s2 on average on the Earth’s surface
B
E
𝑺𝑩𝑬
𝒈
𝒈 = 𝒈v − 𝝎𝑬𝑰x 𝝎𝑬𝑰𝒔𝑩𝑬
where the standard average value is 𝑔 = 9.8066 ~9.81 m/s2
Use of the Earth gravity acceleration
vector
• Since this vector is almost vertical we can not use
it alone to determine heading.
• Using an accelerometer we can measure roll and
pitch angles, but not heading/yaw (rotation about
the gravity vector).
• When standing still we can determine what is up
and what is down
– Think of how your phone/tablet flip the image ….
g
Earth’s magnetic field
• Magntic field vector
– Horizontal component and a vertical
component
• Models:
– World Magnetic Model (WMM).
– International Geomagnetic Reference
Field (IGRF)
Earth’s magnetic field II
• The IGRF and WMM models represent only the main
geomagnetic field, generated in the Earth’s outer core (which
resembles the field generated by a dipole magnet). This is the
dominating component of the field, accounting for over 95% of
the field strength at the Earth’s surface.
• The slow change in time of this field is also included in the
models.
• The field contributions from the Earth’s crust (arising from
magnetized crustal rocks), from currents flowing in the
ionosphere and magnetosphere, and induced currents in the
sea and the ground are not included in the model, as they are
difficult to predict.
Earth’s magnetic field II
• Magnetic inclination
– the angle between the Earth’s magnetic field
lines and a horizontal plane
• Magnetic declination
– the angle between the magnetic North Pole and
the True North (geographic North Pole)
• Varies with position on the Earth (and
slowly with time)
NCEI Geomagnetic Calculators (noaa.gov)
The South Atlantic Anomaly
• A dip in the Earth’s magnetic field over South America and the South
Atlantic ocean (dark blue = weakest field).
• This local weakness in Earth's magnetic field leads to an enhanced level
of charged particles which can cause damage to onboard electronic
systems in satellites and spacecraft.
Earth’s magnetic field
South Atlantic Anomaly
Extra