Creation of Imu geometric model in Matlab In order to generate Synthetic data(Accelerometer and Gyroscope) 6DOF

21 views (last 30 days)
I am looking to create a geometric model(using the simulink blocks) of an IMU sensor that is available in Mathworks 'Sensor Fusion Toolbox'. I have to generate synthetic data of the 3-axis accelerometer,3-axis gyroscope(6DOF) in order to calculate the quaternions(to calculate the orientation) using an sensor fusion algorithm(Madgwick Filter or any similar one). I want to do this in Simulink without using real hardware sensors.I am stuck at this point how to go forward.
Looking for any suggestions or references of similar models.
Thanks in advance.

Answers (1)

Brian Fanous
Brian Fanous on 25 Aug 2022
You can use waypointTrajectory and imuSensor to accomplish this in MATLAB. There is an equivalent Simulink block for imuSensor but you'd have to put the waypointTrajectory code in a MATLAB Function block to handle the trajectory generation portion:
% Simulink IMU data during a trajectory between two random orientations
wp = waypointTrajectory('Waypoints', zeros(2,3), 'Orientation', randrot(2,1), 'TimeOfArrival', [0 1].');
sampleRate = 10;
[~, orient, ~, acceleration, angvel] = lookupPose(wp, 0:(1/sampleRate):1);
imu = imuSensor('SampleRate', sampleRate);
[acc, gyro] = imu(acceleration, angvel, orient);
  1 Comment
Revanth Kumar Adireddy
Revanth Kumar Adireddy on 19 Sep 2022
Edited: Revanth Kumar Adireddy on 20 Sep 2022
Hi,
Dear Brian,
I wanted to generate artificial imu data using kinematic trajectory generation.
Trajectory : 0° to 90° and back from 90° to 0°.
Any ideas or piece of code would be helpful.
Thanks!

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!