Based off the MATLAB Simulink examples for the double pendulum exercise for simple and quick 'true path' generation.
The Double Pendulum Simulation for IMU Testing is designed to evaluate and validate the performance of Inertial Measurement Units (IMUs) within the qfuse
system. By simulating the dynamics of a double pendulum, this project generates precise ground truth data against which IMU measurements can be compared, enabling the assessment of sensor accuracy, drift, and overall reliability in capturing complex motion patterns.
This simulation focuses on:
- Configuring and initializing IMU parameters based on datasheet specifications.
- Running dynamic simulations of a double pendulum to produce both measurement and ground truth data.
- Visualizing and comparing IMU data against simulated ground truth to evaluate sensor performance.
- Parameter Configuration: Accurately set IMU parameters such as Output Data Rate (ODR) and Full Scale Range (FSR) based on datasheet values.
- Data Generation: Generate realistic motion data through the double pendulum model for testing IMUs.
- Data Visualization: Create comparative graphs to analyse the fidelity of IMU measurements against ground truth.
- System Integration: Position the simulation within the broader
qfuse
system to support sensor fusion and data analysis workflows.
- Parameter Setup: Utilize
setIMUparameters.m
to translate IMU datasheet specifications into simulation-compatible units. - Simulation Execution: Run the
doublePendulumIMU.slx
Simulink model to simulate the double pendulum's motion and generate corresponding IMU data. - Data Processing: Use
simulationSetup.m
to initialize simulation parameters and execute the simulation, capturing both measurement and ground truth data. - Visualization: Employ
graphs.m
to plot and compare IMU measurements against the ground truth, facilitating performance analysis. - User Interaction: Although deprecated,
imuControlGUI.m
previously provided a GUI for parameter adjustments, which has now been streamlined into manual configurations withinsetIMUparameters.m
.
This simulation serves as a critical component within the qfuse
ecosystem by providing a controlled environment to test and validate IMU sensor performance. The accurate comparison between simulated ground truth and actual sensor measurements aids in refining sensor fusion algorithms, minimizing drift, and enhancing the reliability of data streams used across various applications within the qfuse
project.
The MATLAB algorithm developed through this simulation will be converted into C++ code to run locally on the qfuse board, enabling real-time sensor fusion and data processing.
Current Files
simulationSetup.m
: Sets up the universal and control parameters (such as sample rate and FSR) for the double pendulum. It usessetIMUparameters.m
to convert IMU datasheet values to simulation units.setIMUparameters.m
: Configures the IMU parameters for the double pendulum simulation by converting them from their datasheet values to the correct units used in the simulation.doublePendulumIMU.slx
: The Simulink model for the double pendulum simulation, integrating IMU sensors and simulating their responses.graphs.m
: Generates graphs for the datasets, comparing IMU measurements against the ground truth generated by the simulation.
Legacy Files Included in the Original Example
doublePendulum.mlx
: The original live script showcasing the double pendulum simulation, serving as a reference for the current implementation.
Deprecated Files
imuControlGUI.m
: Deprecated and scheduled for removal. Previously used to change IMU parameters for the double pendulum simulation during testing runs. Parameters are now manually configured in thesetIMUparameters.m
file.
Miscellaneous Files
simdata.sldd
: The Simulink data dictionary for the simulation, managing shared data across the model.doublePendulumIMU.prj
: The Simulink project file for the simulation, containing project-specific settings and configurations.doublePendulumIMU.slxc
: The Simulink cache file for the simulation, improving load times and performance.
Source Material and Links
-
Ground truth generatioin
-
IMU Simulation
-
Miscellaneous
-
TODO: Add the source material and links for the original MATLAB Simulink example for the double pendulum simulation.
-
TODO: Add background
-
TODO: Add scope
-
TODO: Add objectives
-
TODO: Add approach
-
TODO: Add position in qfuse system
-
TODO: Add parameter tables
- TODO: Add note that parameters where non-trivial to convert from datasheet to simulation