Simulink / Matlab Smart Phones Application - Part 3 Real Time Android AHRS with Complementary Filter

Опубликовано: 20 Май 2026
на канале: Alireza Ghaderi
1,048
8

If you haven't watched the last videos about setting up your android phone and concept behind AHRS, Watch the last episode of this tutorial in the following link playlist:
   • Simulink / Matlab Smart Phones Application...  
Download Source Code from Mathworks (or search the name in Matlab addons)
https://www.mathworks.com/matlabcentr...

or Download from GitHub:
https://github.com/alireza787b/smartP...



Simulink Support Package for Android Devices:
https://www.mathworks.com/matlabcentr...

Simulink Support Package for Apple iOS Devices:
https://www.mathworks.com/matlabcentr...

Matlab TechTalk "Sensor Fusion Introduction" with Brian Douglas:
https://www.mathworks.com/videos/sens...

Matlab TechTalk "Understanding Complementary Filters" with Brian Douglas
   • Drone Control and the Complementary Filter  

Matlab TechTalk "Understanding Kalman Filters"
https://www.mathworks.com/videos/seri...

IMU-sensor-fusion-with-linear-Kalman-filter
https://www.mathworks.com/matlabcentr...

----------------------------------------------------------------------------------------
Attitude and Horizon Reference System (AHRS) application using Onboard smartphone Sensors with Complementary Attitude Estimation (AHRS) Using Onboard Smart Phone IMU Version 1

Using this Simulink Model, you can use your smartphone sensors to get raw gyroscope, accelerometer, magnetometer data and estimate the real-time attitude of the phone using Complementary filter. Pitch, Roll, Heading angles and rates.

This project is still in the development phase so use it at your own risk. No noise filtering is done on the output. You can implement different noise reduction algorithms according to your application.
I will Upgrade with better results in near future...

Because I don’t have an Apple development ID, I only uploaded the Android version. But you can easily just change the sensor inputs the iOS version from Simulink support Package for iOS device.

If you added a feature to this model, or fixed a bug please commit to this git project or send it to me. I will update this project with better features in near future.

Let me know if you have a similar project or need help

E-mail: [email protected]
E-mail: [email protected]
WhatsApp: +989190123481
Telegram: alireza787b
Instagram: Alireza787b