Master Thesis Code
by Simon Moser
Loading...
Searching...
No Matches
jumpEstimateCalibrationParameters.m File Reference

this function estimates accelerometer calibration parameters More...

Go to the source code of this file.

Functions

function jumpEstimateCalibrationParameters (in data, in zeroVelocity, in options)
 

Detailed Description

this function estimates accelerometer calibration parameters

this function estimates accelerometer calibration parameters (sensitivity and bias) using zero velocity ranges. The function uses data coming from a 6 axis calibration sequence (rotating a cube on a flat surface) or from a 12 axis calibration sequence (rotating a dodecahedron on a flat surface). The function uses a least squares optimization to estimate the calibration parameters. The function also estimates the gyroscope bias.

Parameters
data- struct as defined in jumpCheckData, the data must contain zero movement sequences where only one axis is aligned with gravity and the other two axes are perpendicular to gravity. The data must contain at least six different sequences, i.e. every side must lay towards the ground at least once. The order of the sequences is not important.
zeroVelocity- logical vector indicating zero velocity ranges
options- the available options are:
  • plot - logical, if true, plots the results to the console (default false)
  • minZvDuration - minimum duration of zero velocity range in seconds (default 0.1 s)
  • maxZvDuration - maximum duration of zero velocity range in seconds, before splitting it into smaller ranges (default 60 s)
  • dodecahedron - logical, if true, the function expects data from a dodecahedron movement (default false). If enabled, the function expects all zero velocity ranges to be one of the 12 faces, i.e. it will not check if any wrong orientations are present.
Return values
params- struct containing the estimated calibration parameters for the accelerometer and high g sensor. The struct has the following fields:
  • acc - struct containing the accelerometer calibration parameters:
    • bias - 1x3 vector containing the estimated accelerometer biases in g
    • sensitivity - 1x3 vector (six faces case) or 3x3 matrix (twelve faces case)
  • hig - struct containing the high g sensor calibration parameters:
    • bias - 1x3 vector containing the estimated high g sensor biases in g
    • sensitivity - 1x3 vector (six faces case) or 3x3 matrix (twelve faces case) containing the estimated accelerometer sensitivities (and cross-axis sensitivities).
  • gyro - struct containing the gyroscope calibration parameters:
    • bias - 1x3 vector containing the estimated gyroscope biases in rad/s
Note
see Part 7: Initial Parameter Estimation for more detailes information.
Remarks

The calibration parameters are estimated using the following error models.

For the six faces case:

The accelerometer measurements are modeled as:

\[ \begin{align*} a_x^\text{(meas)} &= s_{x}^\text{(a)} \cdot a_x^\text{(true)} + b_{x}^\text{(a)} + \varepsilon_{ax} \\ a_y^\text{(meas)} &= s_{y}^\text{(a)} \cdot a_y^\text{(true)} + b_{y}^\text{(a)} + \varepsilon_{ay} \\ a_z^\text{(meas)} &= s_{z}^\text{(a)} \cdot a_z^\text{(true)} + b_{z}^\text{(a)} + \varepsilon_{az} \\ \end{align*} \]

where \( \varepsilon \) is the residual error.

The return value for the sensitivity is a \( 1 \times 3 \) vector containing the sensitivities in the following order: \( s_{x}^\text{(a)} \), \( s_{y}^\text{(a)} \), \( s_{z}^\text{(a)} \). The return value for the bias is a \( 1 \times 3 \) vector containing the biases in the following order: \(b_{x}^\text{(a)} \), \(b_{y}^\text{(a)} \), \(b_{z}^\text{(a)} \).

The gyroscope measurements are modeled as:

\[ \begin{align*} \omega_x^\text{(meas)} &= \omega_x^\text{(true)} + b_{x}^{(\omega)} + \varepsilon_{\omega x} \\ \omega_y^\text{(meas)} &= \omega_y^\text{(true)} + b_{y}^{(\omega)} + \varepsilon_{\omega y} \\ \omega_z^\text{(meas)} &= \omega_z^\text{(true)} + b_{z}^{(\omega)} + \varepsilon_{\omega z} \\ \end{align*} \]

The return value for the bias is a \( 1 \times 3 \) vector containing the biases in the following order: \(b_{x}^{(\omega)} \), \(b_{y}^{(\omega)} \), \(b_{z}^{(\omega)} \).

For the twelve faces case:

The accelerometer measurements are modeled as:

\[ \begin{align*} a_x^\text{(meas)} &= s_{x}^{(a)} a_{x} + s_{xy}^{(a)} a_{y} + s_{xz}^{(a)} a_{z} + b_x^{(a)} + \varepsilon_{ax} \\[3mm] a_y^\text{(meas)} &= s_{yx}^{(a)} a_{x} + s_{y}^{(a)} a_{y} + s_{yz}^{(a)} a_{z} + b_y^{(a)} + \varepsilon_{ay} \\[3mm] a_z^\text{(meas)} &= s_{zx}^{(a)} a_{x} + s_{zy}^{(a)} a_{y} + s_{z}^{(a)} a_{z} + b_z^{(a)} + \varepsilon_{az}, \end{align*}, \]

where the returned sensitivity matrix is

\[ \mathbf{s}_a = \begin{bmatrix} s_{xx}^{(a)} & s_{xy}^{(a)} & s_{xz}^{(a)} \\ s_{yx}^{(a)} & s_{yy}^{(a)} & s_{yz}^{(a)} \\ s_{zx}^{(a)} & s_{zy}^{(a)} & s_{zz}^{(a)} \end{bmatrix} \]

and the returned bias vector is identical to the six faces case.

The gyroscope measurements are modeled identically to the six faces case.

Remarks
The dodecahedron math is from Battaglia, F., & Prato, E. (2022). Generalized Laurent monomials in nonrational toric geometry. https://doi.org/10.48550/ARXIV.2212.11104

Definition in file jumpEstimateCalibrationParameters.m.

Function Documentation

◆ jumpEstimateCalibrationParameters()

function jumpEstimateCalibrationParameters ( in data,
in zeroVelocity,
in options )