Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reference Model: Strapdown IMU #19

Merged
merged 66 commits into from Oct 30, 2023
Merged

Conversation

buckbaskin
Copy link
Owner

@buckbaskin buckbaskin commented Sep 19, 2023

FormaK aims to combine symbolic modeling for fast, efficient system modelling
with code generation to create performant code that is easy to use.

The Five Key Elements the library provides to achieve this user experience are:

  1. Python Interface to define models
  2. Python implementation of the model and supporting tooling
  3. Integration to scikit-learn to leverage the model selection and parameter tuning functions
  4. C++ and Python to C++ interoperability for performance
  5. C++ interfaces to support a variety of model uses

This design focuses on an example of the "Python Interface to define models" to
define a reference model for a strapdown IMU. This serves two purposes:

  1. Provide a reference for implementing a strapdown IMU as a part of other models
  2. Further exercise the FormaK interface to sand down rough edges

As a third consideration, this will also provide a reference design for how
other reference models will be designed and presented in the future.

Solution Approach

The Strapdown IMU

What is a strapdown IMU?

A strapdown IMU is an IMU mounted to the vehicle of interest (instead of being
mounted on a gimbal or on some reference point).

Definitions

This design will implement the strapdown IMU model defined by the source
Strapdown inertial navigation | Rotations.
The site is a joint resource from the mechanical engineering departments at
Rose-Hulman Institute of Technology and UC Berkeley.

Definition of terminology and axis

  • Source

  • $e_{i}$ axis of rigid body (1, 2, 3)

  • $\omega$ vector of rotations of the rigid body

  • $\omega_{i}(t) = \omega \cdot e_{i}$ IMU reading of rotation

  • $g$ acceleration due to gravity

  • $\ddot{x_{A}}$ acceleration of the rigid body at the IMU measurement point A

  • $f_{i}(t) = (\ddot{x_{A}} - g) \cdot e_{i}$ IMU reading of acceleration (specific force)

The reference design uses 3-2-1 Euler angles.

Rotations

Accelerations

With the accelerations defined, we can then integrate the acceleration once into velocity and then twice into position.

$$v_{t + 1} = v_{t} + dt * a_{t}$$

$$x_{t + 1} = x_{t} + dt * x_{t} + \dfrac{1}{2} dt^{2} * a_{t}$$

@buckbaskin buckbaskin self-assigned this Sep 19, 2023
@buckbaskin
Copy link
Owner Author

ad5946c Acceleration shows matching behavior

  • pose and to a lesser extent velocity show drift relative to the true circular motion

image

@buckbaskin buckbaskin marked this pull request as ready for review October 24, 2023 06:52
@buckbaskin buckbaskin merged commit be4ba07 into main Oct 30, 2023
5 checks passed
@buckbaskin buckbaskin added the enhancement New feature or request label Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant