0% found this document useful (0 votes)
3 views

Module 2.1 - Accel

Uploaded by

getachew azanaw
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Module 2.1 - Accel

Uploaded by

getachew azanaw
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 61

Sensors:

Accelerometer
Module 2 – Part 1
Outline
1. Sensor Types
2. MEMS Accelerometer Measurements
3. Accelerometer Main Parameters
4. Applications: Orientation Angles Estimation
5. MEMS Accelerometer Construction
6. Accelerometers Classification
7. Applications: Device Displacement Estimation

2
2.1
Sensor Types
Sensors Overview
 An accelerometer (Accel) measures all linear forces that are working on an object.

 The gyroscope (Gyro) gives the rate of change of angular velocity over time that is working
on an object.

 These two sensors gathered together form Inertial Measurement Unit (IMU).

 The magnetometers (Magnet) are used to measure the strength of the magnetic field and in
some cases direction of the field.

 Addition of Magnetometer to the IMU forms Attitude and Heading Reference System
(AHRS).
4
Sensors Overview
 Nowadays many commercially available Accelerometers and Gyroscopes are
fabricated using Micro-Electro-Mechanical Systems (MEMS).

 The production process for the MEMS sensors combines Silicon and Mechanical
functions on the same micrometer silicon substrate.

 Hall effect is the basis for the most Magnetometer sensors commonly applied in phones,
vehicles and position sensors.

5
Accelerometer Applications
 Accels are typically used in one of three modes:

 As an inertial measurement device of module velocity and displacement (position);


 As a sensor of inclination, tilt, or orientation in 2D, as referenced from the acceleration of
gravity (1 g = 9.8m/s2);
 As a vibration or impact (shock) sensor.

 There are considerable advantages of using an analog Accels as opposed to an


Inclinometers (such as a Liquid Tilt sensor) – inclinometers tend to output binary
information (indicating a state of ON or OFF), thus it is only possible to detect when
the tilt has exceeded some thresholding angle.

6
2.2
Measurements

What does accelerometer measure?


Measurement Features

8
Check Point
 Let’s record accelerometer measurements using xSens device in predefined
positions:
 Z axis upward;

 X axis upward;

 Y axis upward;

 Abrupt movement up;

 Abrupt movement down.

 Plot the measurements using MATLAB and check the correspondence of data
signs to the physical sense.

9
2.3
Main Parameters
Accelerometer Parameters
A typical accelerometer has the following basic specifications:

 Analog/digital  Analog - output is a constant voltage

 Number of axes
which value depends on the amount of
acceleration applied;
 Output range (FS)
 Digital - output is a PWM signal (older
 Sensitivity (mg/LSB or LSB/mg) ones); output their value using multi-wire
 Typical zero-g level offset accuracy digital protocols such as I2C or SPI.

 Zero-g level change vs. temperature  There are 1 axis, 2 axes (most familiar

 Bandwidth type), 3 axes (increasingly common and


inexpensive).
 Acceleration RMS noise
11
Accelerometer Parameters
A typical accelerometer has the following basic specifications:

 Analog/digital  As a tilt sensor ±1.5 g is sufficient;

 Number of axes As an impact sensor, ±5 g or more is desired;


For our goals, about ±20-25 g.
 Output range (FS)
 Usually MC can be tuned for output
 Sensitivity (mg/LSB or LSB/mg)
range mode: ±2g, ±4g, ±8g, ±16g.
 Typical zero-g level offset accuracy
 LSB is an integer number read from sensor;
 Zero-g level change vs. temperature If we read X units, then
 Bandwidth X * sens-ty[mg/LSB] = real Accel value.
 Ex.: from 0.061 mg/LSB for ±2g mode,
 Acceleration RMS noise
to 0.0488 mg/LSB for ±16g mode 12
Accelerometer Parameters
A typical accelerometer has the following basic specifications:

 Analog/digital  Ex., ±40 mg, the smaller, the better.

 Number of axes  Ex., ±0.5 mg/C⁰, the smaller, the better.

 Output range (FS)  For humans apps - 40-60 Hz;

 Sensitivity (mg/LSB or LSB/mg) For accurate reading (vibrations) of


impact forces - hundreds of Hertz;
 Typical zero-g level offset accuracy
 Usually depends of output range mode
 Zero-g level change vs. temperature
Ex.: from 1.7 mg for ±2g mode,
 Bandwidth to 4.4 mg for ±16g mode
 Acceleration RMS noise
13
Check Point
 Check the datasheet for accelerometer parameters for LSM3DS - 3D accel +
3D gyro MS from STM;

 Record accelerometer measurements using xSens device in steady position


(laying on the table, Z axis is upward);

 Plot the measurements using MATLAB and visually check the deviations from the
mean value;

 Estimate biases for each coordinate axis measurements and display their values
using fprintf() function in command window.

14
Accel Bias and Noise - xSens

15
2.4 Applications

Estimation of Device Orientation Angles based on Accel measurements


Tasks Variety
Accelerometer Applications

Based on Gravity Sensor data Based on Linear Acceleration data


• Orientation angles determination • Velocity and displacement calculation

 Accelerometer can be considered as a device that incorporates two sensors:


 the Gravitational field (Gravity) vector sensor and

 Linear acceleration sensor.

17
Gravity Sensor Application
 Accel sensors measure the difference between any linear acceleration in the Accel’s
reference frame and the Earth's gravitational field vector.

 In the absence of Linear Acceleration, the Accel’s output can be used to determine the
Pitch and Roll orientation angles.

 The most common order is the aerospace sequence of yaw then pitch and finally a roll
rotation (XYZ).

 Accel sensors are insensitive to rotations about the Earth's gravitational field vector
(Z-axis). The equations for the roll and pitch angles therefore have mathematical
instabilities when rotation axes (X or Y) happen to become aligned with Gravity and
point upwards or downwards.
18
Extracting Gravity
 Simple Low-pass filter can be applied (-filter):

❑ ⃗
𝐺𝑘=𝛼 ∙ ❑⃗ ( ) ❑⃗
𝐵 𝐵 𝐺 𝑘− 1 + 1 − 𝛼 ∙ 𝐵 𝑎𝑘

where is filter coefficient, . Recommended values are 0.93 - 0.95.

Application of the filter to the X-axis component of acceleration,


19
Initial Assumptions

( )

𝐵 𝐺𝑘𝑋
❑ ⃗ 𝐵
( ❑ ❑
𝐸𝑎 )
𝐵 𝐺𝑘= ❑
𝐵 𝐺𝑌
𝑘
= 𝐸 𝑹 𝐸

𝑔 − ⃗
❑ 𝑍
𝐵 𝐺𝑘

where R is the RM describing the orientation of the Body relative to the Earth’s CS.
 There are two assumptions for having an ability to solve the Equation:

 The accelerometer has no linear acceleration, i.e..

 The device is lying flat with the Earth's gravitational field aligned with the Z-axis.

( )
❑ 𝑋
𝐵 𝐺𝑘
❑ ⃗
𝐺𝑘= 𝐺𝑌
𝐵
𝑹 ❑

𝐸𝑔

𝐵 𝐵 𝑘
= 𝐸 ∙
❑ 𝑍
𝐺𝑘
𝐵
20
Roll and Pitch Estimation

() ()( )
0 0 − 𝑠𝑖𝑛 ( 𝜃 )
𝐵
𝐸 𝑹 𝑋𝑌𝑍 0 =𝑹 𝑋 ( 𝜑 ) 𝑹𝑌 ( 𝜃 ) 𝑹 𝑍 ( 𝜓 ) 0 = 𝑐𝑜𝑠 ( 𝜃 ) 𝑠 𝑖𝑛 ( 𝜑 )
1 1 𝑐𝑜𝑠 ( 𝜃 ) 𝑐𝑜𝑠 ( 𝜑 )

() ()( )
0 0 𝑠 𝑖𝑛 ( 𝜑 ) 𝑠 𝑖𝑛 ( 𝜃 )
𝐵
𝐸 𝑹 𝑍𝑋𝑍 0 =𝑹 𝑍 ( 𝜑 ) 𝑹 𝑋 ( 𝜃 ) 𝑹 𝑍 ( 𝜓 ) 0 = 𝑐𝑜𝑠 ( 𝜑 ) 𝑠 𝑖𝑛 ( 𝜃 )
1 1 𝑐𝑜𝑠 ( 𝜃 )

 Note that roll, pitch and yaw rotation angles are meaningless without first defining
the order in which these rotations are to be applied.

* Reference: Freescale Semiconductor (NXP) Document Number:


“Tilt Sensing Using a Three-Axis Accelerometer” by Mark Pedley (AN3461)
21
Roll and Pitch Estimation (XYZ)
 Normalizing gravity vector components and substituting the values of RM, we get
the following equation:

( )( )



𝐵 𝐺𝑘𝑋 − 𝑠𝑖𝑛 ( 𝜃 )
𝐺𝑘
𝐵 1
= ❑ 𝑌
𝐺𝑘 = 𝑐𝑜𝑠 ( 𝜃 ) 𝑠 𝑖𝑛 ( 𝜑 )
‖ 𝐺‖
❑⃗
√ (❑𝐵 𝐺𝑘𝑋 ) +( ❑𝐵𝐺𝑌𝑘 )
2 2 𝐵
𝑍 2
+ ( 𝐵 𝐺𝑘 )

𝐵 𝑘 ❑
𝐵 𝐺𝑘
𝑍
𝑐𝑜𝑠 ( 𝜃 ) 𝑠 𝑖𝑛 ( 𝜑 )

 Solving the system of equations, finally obtain:

❑ 𝑌 ❑ 𝑋 ❑ 𝑋
𝑡𝑎𝑛 ( 𝜑 𝑋𝑌𝑍 ) =
𝐵 𝐺𝑘 − 𝐵 𝐺𝑘 − 𝐵𝐺 𝑘
❑ 𝑍 𝑡𝑎𝑛 ( 𝜃 𝑋𝑌𝑍 ) = ∨𝑠𝑖𝑛 ( 𝜃 𝑋𝑌𝑍 ) =
𝐵 𝐺𝑘 2

( 𝐵𝐺𝑘 ) + ( 𝐵 𝐺𝑘 )
❑ 𝑌 ❑ 𝑍 2
‖𝐵 𝐺𝑘‖
❑⃗

 The convention used in the aerospace sequence is that the roll angle can range
between [-180°; 180°] but the pitch angle is restricted to [-90°; 90°].
22
Roll and Pitch Estimation (XYZ)
 The convention used in the aerospace sequence is that the roll angle can range
between [-180°; 180°] but the pitch angle is restricted to [-90°; 90°].

23
Roll and Pitch Estimation (ZXZ)
 Again normalizing gravity vector components and substituting the values of RM, we
get the following equation:

( )( )



𝐵 𝐺𝑘𝑋 𝑠 𝑖𝑛 ( 𝜑 ) 𝑠 𝑖𝑛 ( 𝜃 )
𝐺𝑘
𝐵 1
= ❑ 𝑌
𝐺𝑘 = 𝑐𝑜𝑠 ( 𝜑 ) 𝑠 𝑖𝑛 ( 𝜃 )
‖ 𝐺‖
❑⃗
√ (❑𝐵 𝐺𝑘𝑋 ) +( ❑𝐵𝐺𝑌𝑘 )
2 2 𝐵
𝑍 2
+ ( 𝐵 𝐺𝑘 )

𝐵 𝑘 ❑
𝐵 𝐺𝑘
𝑍
𝑐𝑜𝑠 ( 𝜃 )

 Solving the system of equations, finally obtain:

𝑡𝑎𝑛 ( 𝜑 𝑍 𝑋𝑍 ) =

𝐵 𝐺𝑘
𝑋
𝑡𝑎𝑛 ( 𝜃 𝑍 𝑋𝑍 )=
√ ( ❑
𝐵 𝐺
𝑋 2
𝑘) +( ❑
𝐵 𝐺
𝑌 2
𝑘 )
❑ 𝑍

𝐵 𝐺
𝑌
𝑘 𝐵𝐺 𝑘

24
Check Point
 Calculate the roll and pitch angles which define the orientation of the device
relative to the starting position with respect to the level plane (the table plane),
assuming the aerospace rotation sequence XYZ for the device Accel readings:

( )
0.461105
❑ ⃗
𝐺𝑘= 0. 082198
𝐵
− 0.887432

 Apply the ATAN2 function for angles determination.

 The ATAN2 function automatically returns the angle (in radians) in the correct quadrant
based on the signs of the two arguments.

25
Atan vs. Atan2
 Definition:

 Simple check:

26
Check Point
 Record accelerometer measurements (all cases in one log file) using xSens device
corresponding to the following:
 10 sec. in steady state on the table;

 Then rotate about X axis to 45…50⁰, then -45…-50⁰;

 Do the same for Y and Z axes;

 Plot the measurements using MATLAB and visually check the data behavior;

 Write function for calculating Roll and Pitch values from accelerometer
measurements;

 Plot the estimated angles on the same plots as the corresponding angles written
in log (calculated by xSens device), i.e. one plot for one angle.
27
2.5
MEMS Accelerometers

Construction of DC-Response Capacitive MEMS Accelerometer


Capacitance

𝑄 𝜀0 ∙ 𝜀𝑟 ∙ 𝐴
𝐶 1= =
𝑉 𝑑

where
Q is the charge;
V is the applied voltage;
A is the plates area;
d is a distance between fixed plates and mass;
denotes dielectric constant of air, F/m;
is the dielectric constant of substrate relative to air. 29
Mass-Spring System
2
𝑑 ❑𝑥 𝑘𝑥
− =0
𝑑𝑡
2
𝑚

𝑘𝑥
𝑎=
𝑚

where
k is the spring constant;
m is the mass of the object;
x is the displacement.
30
Mass-Spring System

𝜀0 ∙ 𝜀𝑟 ∙ 𝐴 𝜀0 ∙ 𝜀𝑟 ∙ 𝐴 𝜀0 ∙ 𝜀𝑟 ∙ 𝐴
𝐶 1= 𝐶 2= , 𝑄1 +𝑄 2=0 𝐶 1 ≠ 𝐶 2 , 𝐶 1= , 𝐶2 =
𝑑 𝑑+𝑥 𝑑−𝑥

where and are the applied and measured voltages, respectively.


31
Mass-Spring System
𝑄1 +𝑄 2=0

𝐶1 (𝑉 0 − 𝑉 𝑥 )+ 𝐶2 (− 𝑉 0 − 𝑉 𝑥 )= 0

𝑉 0−𝑉 𝑥 −𝑉 0 −𝑉 𝑥
+ =0
𝑑−𝑥 𝑑+ 𝑥

𝑉 𝑥 𝑑
𝑥=
𝑉 0

𝐹 =𝑚𝑎= − 𝑘𝑥 𝜀 0 ∙ 𝜀𝑟 ∙ 𝐴 𝜀0 ∙ 𝜀𝑟 ∙ 𝐴
𝐶 1= ,𝐶2 =
𝑑+𝑥 𝑑−𝑥
𝒌 𝑽 𝒙 𝒅
𝒂= −
𝒎𝑽 𝟎
32
MEMS Construction

𝜀0 ∙ 𝜀𝑟 ∙ 𝐿 ∙ 𝑊
𝐶=
𝑑
where
L is a length of adjoining fixed plate and mass;
W is a thickness of fixed plate and mass;
d is a distance between fixed plates and mass. 33
How it works

34
3D Accelerometer
 There are three accelerometer sensors mounted
orthogonally

 A 3D accelerometer measures linear acceleration


along the X, Y, and Z axis.

 Under rotation, such as a roll, the distances between


the internal fixed plate and mass remain unchanged.

 The accelerometer does not respond to angular


velocity.

35
2.6
Accelerometers

Classification
Accelerometer Classifications
 There are two classifications: a) based on response and b) on built principles.

Response-based classification

AC-response Accelerometers DC-response Accelerometers


• Charge-mode piezoelectric • Capacitive
• Voltage-mode piezoelectric • Piezoresistive

Built principles classification

Capacitive sensing Accelerometers Piezoelectric effect Accelerometers


37
AC vs. DC
 The g value provides a good reference, but
velocity and displacement are the variables
needed in most design calculations.

 To derive velocity and displacement, the


signal from the Accel is integrated and
double integrated respectively in the analog
or digital domain.

 Even small amplitude deviations can result in


significant errors during numerical
AC-response Acc is used to measure a long
integration.
duration half-sine input pulse
38
2.7
AC-Response Types
Overview
 The output of such accelerometers, as the name implies, is AC coupled.

 An AC coupled device cannot be used to measure static acceleration such as gravity


and constant centrifugal acceleration, for example.

 It is only suitable for measuring dynamic events.

 The most common AC-response Accels use piezoelectric elements for their sensing
mechanism.

40
Piezoelectric Effect
 Piezoelectricity is the ability of some materials to generate an
electric potential in response to applied mechanical stress.

 The piezoelectric effect is caused by the appearance of


electric polarization in a material that strains under stress.

 Piezoelectricity is therefore a reversible effect: if a voltage is


applied to a piezoelectric device, it will strain.

 Under acceleration, the seismic mass of the accelerometer


causes the piezoelectric element to “displace” a charge,
producing an electrical output proportional to acceleration.
41
Piezoelectric Accelerometers
 Electrically, the piezoelectric elements
look like a source capacitor with a finite
internal resistance, typically in the order of
1 MΩ.
 This forms the RC time constant which
defines the high-pass characteristics of the
device.
 For this reason, piezoelectric Accel cannot be used to measure static events.

 Two types of piezoelectric accelerometer are available on the market:


a) Charge output type and b) Voltage output type.
42
Charge Mode Accelerometers
 Offer very wide temperature range (from -200°C to +640°C and beyond), broad
dynamic range, and wide bandwidth (up to >10kHz).

 A charge amplifier is generally used to interface with charge mode accelerometers to


avoid problems associated with parallel cable capacitance.

 Are housed in a hermetic, welded metal case and can be considered one of the most
durable sensors because of its ability to tolerate hostile environmental conditions.

 Are especially suitable for use in vibration measurements at temperature extremes,


such as in turbine engine monitoring.

43
Voltage Mode Accelerometers
 Unlike a charge mode devices that only contains ceramic sensing element(s), these
device includes a microelectronic circuit which limits the operating temperature of the
device to usually tops at +125°C.

 Such devices feature 3-wire or 2-wire mode. The 2-wire mode is also known as
Integral Electronics PiezoElectric (IEPE). IEPE is most popular due to its convenient
coaxial configuration in which the AC signal is superimposed on the DC power line.

 Full scale range is pre-determined by the internal amplifier at the factory and cannot
be altered.

 Are available in very small footprint and are suited for dynamic measurements in
lightweight structures.
44
2.8
DC-Response Types
Overview
 The output of such Accels is DC coupled and can respond down to 0 Hz.

 It can be used to measure static, as well as dynamic acceleration.

 Two popular sensing technologies are used in making DC-accelerometers:


Capacitive and Piezoresistive.

46
Capacitive Accelerometers
 The measurement of capacitance changes in the seismic mass under acceleration is
the most common technology used for accelerometer today.

 Employ Micro-Electro-Mechanical Systems (MEMS) fabrication technology.

 Typically suffers from poor signal-to-noise ratio and limited dynamic range.

 Bandwidth is mostly limited to a few hundred Hz partly due to its physical geometry
and its heavy gas damping.
 Maximum range of acceleration measurement is typically limited to less than 200g’s.

 Are suited for measuring low frequency motion where the g level is also low.

47
Piezoresistive Accelerometers
 Produces resistance changes in the strain gages that are part of the Accel’s seismic
system.

 Bandwidth can reach upwards of 7 kHz.

 Designs are either gas damped (MEMS types) or fluid damped (bonded strain gage type)

 Signal-to-noise performance is generally outstanding.

 For very high g shock measurements, some designs can handle acceleration levels well
above 10,000 g’s.
 Can be used to accurately derive the velocity and displacement without integration
error. Are commonly used in automotive safety testing, weapons testing, and high
shock range measurements. 48
2.9 Applications

Device Displacement Estimation


Tasks Variety
Accelerometer Applications

Based on Gravity Sensor data Based on Linear Acceleration data


• Orientation angles determination • Velocity and displacement calculation

 For picking out Gravity sensor from the Accelerometer readings Low-pass filter (LPF) is
usually applied. Then:

Linear Acceleration = Acceleration - Gravity

 Alternatively, High-pass filter (HPF) can be used to get Linear Acceleration.


50
Algorithm Block-Scheme
⃗ 𝑔𝑦𝑟
𝑢 𝑘

⃗ 𝑘𝑓𝑖𝑙𝑡
𝑢


𝑎𝑘 ❑ ⃗
𝐺𝑘 ⃗𝑎𝑐𝑐


𝑎𝑘 ⃗

𝑙 𝑎𝑘
𝐵 𝐵 𝑢𝑘 𝐸 𝐸

𝐵

𝑎𝑘


❑ ⃗
𝑑𝑘


𝑣𝑘
𝑓𝑖𝑙𝑡

𝑣𝑘
❑ ⃗
𝑑 𝑘𝑓𝑖𝑙𝑡 𝐸 𝐸 𝐸
𝐸

51
Linear Acceleration Extraction
 Having the Gravity vector data, , Linear acceleration is obtained as:

⃗ 𝑎𝑘 − ⃗
𝑙𝑎 𝑘 = ⃗ 𝐺𝑘 ⃗
𝐺 𝑘=𝛼 ∙ ⃗
𝐺𝑘 −1 + (1 − 𝛼 ) ∙ 𝑎
⃗𝑘

where is a Linear Acceleration measurements.

52
Accel Tilt Compensation
 Obtained by integrating Linear acceleration:

𝑣 𝑣 𝑘 −1 + ⃗
⃗ 𝑘= ⃗ 𝑙𝑎 𝑘 ∙ ∆ 𝑡

where is a sampling period.

53
Velocity Estimation
 Obtained by integrating Linear acceleration:

𝑣 𝑣 𝑘 −1 + ⃗
⃗ 𝑘= ⃗ 𝑙𝑎 𝑘 ∙ ∆ 𝑡

where is a sampling period.

 High-pass Filtering of estimated velocity, , can be done using any appropriate


digital filter. For example, Butterworth filter of the 1st order:

order = 1;
filtCutOffF = 0.1;
[b, a] = butter(order, (2*filtCutOffF)/(1/TS), 'high');
velFilt = filtfilt(b, a, vel);
54
Velocity Estimation

55
Displacement Estimation
 Obtained by integrating object velocity:


𝑑𝑘 = ⃗ ⃗𝑘 ∙ ∆ 𝑡
𝑑 𝑘 −1 + 𝑣

where is a sampling period.

 High-pass Filtering of estimated displacement, , is needed in order to eliminate


biases and can be done, for example, by the same Butterworth filter of the 1st
order which is applied for filtering low-frequency components of velocity on the
previous stage.

56
Displacement Estimation

57
Displacement Estimation

58
Tasks description
1. Capture Accelerometer measurements which correspond to the stationary position of the
device (log 1); stationary but with roll angle equal to 45 ⁰ ( log 2); stationary but with pitch
angle equal to 45⁰ (log 3); stationary but with roll and pitch angles equal to 45 ⁰ ( log 4);
dynamic – start with pitch and roll 0⁰ (5 sec.), then change roll to 45 ⁰ ( log 5).

2. Capture Accelerometer measurements in dynamic mode – for example, start with pitch
and roll 0⁰ (5 sec.), then change roll to 45⁰ (5 sec.), then return back and hold (5 sec.),
then change pitch to 45⁰ (5 sec.), then return back and hold (5 sec.), then change roll
and pitch to 45⁰ simultaneously and hold (5 sec.), then return to initial position.

3. Estimate angles based on Accelerometer measurements for all captured logs and depict
input measurements and estimated output angle values.
59
Tasks description
4. Estimate Accelerometer bias and noise STD using logs corresponded to stationary cases;

5. Capture Accelerometer measurements which correspond to the dynamic mode: move the
device up and down, left and right (log 6); move device straight ahead as far as cable
makes it possible (imitation of flight mode) (log 7);

6. Perform Tilt Compensation for dynamic logs and depict the result plots;

7. Extract Linear Acceleration from dynamic logs and depict the result plots;

8. Calculate displacement of the device from dynamic logs and depict the result plots;

9. Apply high-pass filters to estimated velocity and displacement of the device and compare
the results with the unfiltered case.

60
Well Done and
Thank You for attention!

You might also like