SlideShare une entreprise Scribd logo
1  sur  33
Télécharger pour lire hors ligne
Better motion control using
accelerometer/gyroscope sensor fusion
               Gabor Paller
         gaborpaller@gmail.com
                Sfonge Ltd.
         http://www.sfonge.com
Where were we?
●   Droidcon 2011, London: Motion recognition on
    Android devices
    ●   http://mylifewithandroid.blogspot.com/2011/10/my-
        presentation-about-motion.html
●   Processing only the accelerometer for motion
    recognition
Acceleration

Acceleration caused by            Acceleration caused by the change
the change of direction                        of velocity




                                      v1          dV
  dV
               v2

                                            v2
       v1
                             ΔV
                          a=
                             Δt
Extract motion information from
              accelerometer data
●   Accelerometer data is a vector, having 3 axes (x,y,z)
●   This vector has the following components:
    ●   Gravity acceleration
        –   Pointing toward the center of the Earth
        –   Value of about 10 m/s2
        –   That's what we measure when the accelerometer is used to
            calculate tilt
    ●   Any other acceleration the device is subject to
        –   Added to the gravity acceleration
        –   “Disturbs” tilt measurement in gaming (swift movements cause
            acceleration) – hence the reason for gyroscopes
        –   Can be used for movement detection
Measured acceleration
Absolute value
●   x, y, z: acceleration vector components
●   g – value of the gravity acceleration (can be
    approximated as 10)


             a= √ x +y +z −g
                     2     2    2
Snap – one way accelerating
         Movement starts:

                Movement ends: decelerating
Droidcon 2011 flashback
●   Conclusions:
    ●   Power consumption is a problem
    ●   Some neat functionality can be implemented by doing
        pattern recognition on the acceleration vector's absolute
        value
    ●   In general case the gravity and motion acceleration
        components cannot be separated
    ●   You can try to use an additional sensor like the gyro to help
        the separation
Gyroscope
●   Very new phenomenon as gyroscopes suitable for consumer
    electronic devices appeared very recently
●   First appearance: Wii Motion Plus accessory, 2009 June
●   First Android smart phone: Nexus S (end of 2010)
●   Pros:
    ●   Not sensitive to gravity
●   Cons:
    ●   Currently supported only by high-end Android phones
    ●   Drift problems (more about that later)
Compass
●   Measures the device orientation wrt. the magnetic vector of the Earth
    ●   This vector points toward the magnetic center of the Earth
         –   It has a component that points to the magnetic North pole – that's what we
             use for orientation
         –   Beware of the z component! (also called magnetic inclination). If the device
             is not held horizontally, the downward vector element influences the
             measurement
●   Pros:
    ●   Can be used to deduce gravity, not sensitive to motion acceleration
    ●   Widely available in Android devices
●   Cons:
    ●   Requires calibration
    ●   Sensitive to metal objects, magnetic fields (e.g. electric motors)
This time it is gyroscope only
Gyroscope
Gyroscope measurement data
●   Measures rotation around 3 axes
●   More exactly: measures rotation speed (angular
    velocity) around the axes


                        Δφ
                   v x=
                        Δt
Getting the rotation angle
●   Get the angle difference

               Δ φ=v x Δ t

●   Get the absolute angle
               φ ' =φ+Δ φ
Drift
Noise
Gyro as support sensor
●   Because of accumulating error, gyro alone can
    be rarely used
●   But
    ●   The accelerometer has no accumulated error but
        has the gravity component problem
    ●   The gyro has accumulated error but is not sensitive
        to gravity
●   Sensor fusion: the use of multiple sensors so
    that they compensate each other's weaknesses
Accelerometer-gyro fusion
●   The easy way
    ●   Use the virtual sensors that calculate gravity and
        linear acceleration from multiple sensors
●   The hard way
    ●   Process raw accelerometer and gyroscope data to
        yield the motion information you need
Virtual sensors




             Gravity and motion acceleration
             deduced from the accelerometer
             and the gyroscope


            Roll/pitch/yaw from the compass

            Drift-compensated gyroscope
Drift-compensated gyroscope
The hard way
●   Why would you go the hard way?
    ●   Sensor fusion co-processing provided by the phone
        is not precise enough or can have undesirable
        properties (like auto-calibration in Nexus S)
    ●   Virtual sensors are not available (is there any such
        case with gyro-equipped phone?)
    ●   You would like to understand how it works and what
        to expect from built-in sensor fusion
    ●   Just for the fun of it :-)
What we want
●   Remember: accelerometer measures the sum
    of gravity and motion acceleration
●   Kills two use cases:
    ●   If you need device tilt, the motion acceleration
        component corrupts the measurement
    ●   If you want motion acceleration, it is impossible to
        subtract the gravity acceleration in a general case
●   Separate gravity and motion acceleration with
    the help of the gyroscope
Idea
Idea in words
●   Pick a reliable gravity vector measurement
    (make sure that there's no motion then)
●   If you detect motion (more about later), rotate
    the previous gravity vector using the gyroscope
    data and use it as gravity vector estimation
●   Subtract this gravity vector estimation from the
    measured acceleration – this yields the motion
    acceleration
Updating the gravity vector
               estimation
●   The gravity vector estimation has to be updated
    time to time as rotation angle errors accumulate
●   If we detect an acceleration measurement
    where there is no motion acceleration, we can
    take it as new reliable gravity vector estimation
●   Remember slide #7: if the absolute value of the
    accelerometer output is close to the Earth's
    gravity, we can assume that there's no motion
    → the gravity vector estimation can be updated
    with the current accelerometer output
Implementation
●   Example program:
    http://www.sfonge.com/forum/topic/example-
    application-accelerometergyroscope-
    processing-android
Now what?




3D linear acceleration signal of a well-known motion
Recognizing motion
●   3D linear acceleration signals are not so
    intuitive
●   Motion recognition:
    ●   Record acceleration pattern of reference motion
        and compare with these references
    ●   Convert from acceleration domain to something
        more intuitive like velocity
        –   Accelerometer/gyroscope bias will become linearly
            growing drift after you integrate the acceleration signal!
Walking with swinging hand
Walking with steady hand
Cutting corners
Conclusions
●   Each sensor has strengths and weaknesses
●   Combine them and they compensate each
    other
●   Some sensor fusion is already built-in
●   If not → don't worry, come up with your own, it's
    fun!
●   Motion recognition based on 3D linear
    acceleration signal is much more exact than
    doing the same from 1D signal
Questions?

Contenu connexe

Tendances

제2회 오픈 로보틱스 세미나 (제10세션 ROS를 활용한 SLAM과 내비게이션)
제2회 오픈 로보틱스 세미나 (제10세션 ROS를 활용한 SLAM과 내비게이션)제2회 오픈 로보틱스 세미나 (제10세션 ROS를 활용한 SLAM과 내비게이션)
제2회 오픈 로보틱스 세미나 (제10세션 ROS를 활용한 SLAM과 내비게이션)Yoonseok Pyo
 
하이퍼커넥트에서 자동 광고 측정 서비스 구현하기 - PyCon Korea 2018
하이퍼커넥트에서 자동 광고 측정 서비스 구현하기 - PyCon Korea 2018하이퍼커넥트에서 자동 광고 측정 서비스 구현하기 - PyCon Korea 2018
하이퍼커넥트에서 자동 광고 측정 서비스 구현하기 - PyCon Korea 2018승호 박
 
정수론적 알고리즘 - Sogang ICPC Team, 2020 Winter
정수론적 알고리즘 - Sogang ICPC Team, 2020 Winter정수론적 알고리즘 - Sogang ICPC Team, 2020 Winter
정수론적 알고리즘 - Sogang ICPC Team, 2020 WinterSuhyun Park
 
Online signature recognition
Online signature recognitionOnline signature recognition
Online signature recognitionPiyush Mittal
 
현대백화점 리테일테크랩과 AWS Prototyping 팀 개발자가 들려주는 인공 지능 무인 스토어 개발 여정 - 최권열 AWS 프로토타이핑...
현대백화점 리테일테크랩과 AWS Prototyping 팀 개발자가 들려주는 인공 지능 무인 스토어 개발 여정 - 최권열 AWS 프로토타이핑...현대백화점 리테일테크랩과 AWS Prototyping 팀 개발자가 들려주는 인공 지능 무인 스토어 개발 여정 - 최권열 AWS 프로토타이핑...
현대백화점 리테일테크랩과 AWS Prototyping 팀 개발자가 들려주는 인공 지능 무인 스토어 개발 여정 - 최권열 AWS 프로토타이핑...Amazon Web Services Korea
 
문석진, 프로젝트DH의 절차적 애니메이션 시스템 Ⅱ, NDC2018
문석진, 프로젝트DH의 절차적 애니메이션 시스템 Ⅱ, NDC2018문석진, 프로젝트DH의 절차적 애니메이션 시스템 Ⅱ, NDC2018
문석진, 프로젝트DH의 절차적 애니메이션 시스템 Ⅱ, NDC2018devCAT Studio, NEXON
 
BIOMETRICS FINGER PRINT TECHNOLOGY
BIOMETRICS FINGER PRINT TECHNOLOGYBIOMETRICS FINGER PRINT TECHNOLOGY
BIOMETRICS FINGER PRINT TECHNOLOGYsathish sak
 

Tendances (8)

제2회 오픈 로보틱스 세미나 (제10세션 ROS를 활용한 SLAM과 내비게이션)
제2회 오픈 로보틱스 세미나 (제10세션 ROS를 활용한 SLAM과 내비게이션)제2회 오픈 로보틱스 세미나 (제10세션 ROS를 활용한 SLAM과 내비게이션)
제2회 오픈 로보틱스 세미나 (제10세션 ROS를 활용한 SLAM과 내비게이션)
 
하이퍼커넥트에서 자동 광고 측정 서비스 구현하기 - PyCon Korea 2018
하이퍼커넥트에서 자동 광고 측정 서비스 구현하기 - PyCon Korea 2018하이퍼커넥트에서 자동 광고 측정 서비스 구현하기 - PyCon Korea 2018
하이퍼커넥트에서 자동 광고 측정 서비스 구현하기 - PyCon Korea 2018
 
정수론적 알고리즘 - Sogang ICPC Team, 2020 Winter
정수론적 알고리즘 - Sogang ICPC Team, 2020 Winter정수론적 알고리즘 - Sogang ICPC Team, 2020 Winter
정수론적 알고리즘 - Sogang ICPC Team, 2020 Winter
 
Online signature recognition
Online signature recognitionOnline signature recognition
Online signature recognition
 
현대백화점 리테일테크랩과 AWS Prototyping 팀 개발자가 들려주는 인공 지능 무인 스토어 개발 여정 - 최권열 AWS 프로토타이핑...
현대백화점 리테일테크랩과 AWS Prototyping 팀 개발자가 들려주는 인공 지능 무인 스토어 개발 여정 - 최권열 AWS 프로토타이핑...현대백화점 리테일테크랩과 AWS Prototyping 팀 개발자가 들려주는 인공 지능 무인 스토어 개발 여정 - 최권열 AWS 프로토타이핑...
현대백화점 리테일테크랩과 AWS Prototyping 팀 개발자가 들려주는 인공 지능 무인 스토어 개발 여정 - 최권열 AWS 프로토타이핑...
 
문석진, 프로젝트DH의 절차적 애니메이션 시스템 Ⅱ, NDC2018
문석진, 프로젝트DH의 절차적 애니메이션 시스템 Ⅱ, NDC2018문석진, 프로젝트DH의 절차적 애니메이션 시스템 Ⅱ, NDC2018
문석진, 프로젝트DH의 절차적 애니메이션 시스템 Ⅱ, NDC2018
 
BIOMETRICS FINGER PRINT TECHNOLOGY
BIOMETRICS FINGER PRINT TECHNOLOGYBIOMETRICS FINGER PRINT TECHNOLOGY
BIOMETRICS FINGER PRINT TECHNOLOGY
 
Lecture 4: VR Systems
Lecture 4: VR SystemsLecture 4: VR Systems
Lecture 4: VR Systems
 

En vedette

Mems gyroscope working, principle of operation of disc resonator gyroscope
Mems gyroscope working, principle of operation of disc resonator gyroscopeMems gyroscope working, principle of operation of disc resonator gyroscope
Mems gyroscope working, principle of operation of disc resonator gyroscopeAnkush Wawoo
 
Evaluation of dynamics | Gyroscope, Accelerometer, Inertia Measuring Unit and...
Evaluation of dynamics | Gyroscope, Accelerometer, Inertia Measuring Unit and...Evaluation of dynamics | Gyroscope, Accelerometer, Inertia Measuring Unit and...
Evaluation of dynamics | Gyroscope, Accelerometer, Inertia Measuring Unit and...Robo India
 

En vedette (6)

Gyroscope
GyroscopeGyroscope
Gyroscope
 
Mems gyroscope working, principle of operation of disc resonator gyroscope
Mems gyroscope working, principle of operation of disc resonator gyroscopeMems gyroscope working, principle of operation of disc resonator gyroscope
Mems gyroscope working, principle of operation of disc resonator gyroscope
 
Gyroscopes
Gyroscopes Gyroscopes
Gyroscopes
 
Evaluation of dynamics | Gyroscope, Accelerometer, Inertia Measuring Unit and...
Evaluation of dynamics | Gyroscope, Accelerometer, Inertia Measuring Unit and...Evaluation of dynamics | Gyroscope, Accelerometer, Inertia Measuring Unit and...
Evaluation of dynamics | Gyroscope, Accelerometer, Inertia Measuring Unit and...
 
Gyroscope
GyroscopeGyroscope
Gyroscope
 
Gyroscope
GyroscopeGyroscope
Gyroscope
 

Similaire à Better motion control using accelerometer/gyroscope sensor fusion

Motion recognition with Android devices
Motion recognition with Android devicesMotion recognition with Android devices
Motion recognition with Android devicesGabor Paller
 
Sensors Data Processing for Innovative Swimming Tracking Device
Sensors Data Processing for Innovative Swimming Tracking DeviceSensors Data Processing for Innovative Swimming Tracking Device
Sensors Data Processing for Innovative Swimming Tracking DeviceGlobalLogic Ukraine
 
Swimming Tracker - Motion Recognition
Swimming Tracker - Motion RecognitionSwimming Tracker - Motion Recognition
Swimming Tracker - Motion RecognitionGlobalLogic Ukraine
 
Low-g Accelerometers Part 1 - Basic Knowledge of Accelerometers
Low-g Accelerometers Part 1  - Basic Knowledge of AccelerometersLow-g Accelerometers Part 1  - Basic Knowledge of Accelerometers
Low-g Accelerometers Part 1 - Basic Knowledge of AccelerometersPremier Farnell
 
Activity Recognition using Cell Phone Accelerometers
Activity Recognition using Cell Phone AccelerometersActivity Recognition using Cell Phone Accelerometers
Activity Recognition using Cell Phone AccelerometersIshara Amarasekera
 
Android gps, location services, camera and sensors - Paramvir Singh
Android gps, location services, camera and sensors - Paramvir SinghAndroid gps, location services, camera and sensors - Paramvir Singh
Android gps, location services, camera and sensors - Paramvir SinghParamvir Singh
 
Apresentação IMU (2).pdf
Apresentação IMU (2).pdfApresentação IMU (2).pdf
Apresentação IMU (2).pdfarsalhabib1
 
Working with Windows Phone sensors, gps and maps
Working with Windows Phone sensors, gps and mapsWorking with Windows Phone sensors, gps and maps
Working with Windows Phone sensors, gps and mapsMalin De Silva
 
International Journal of Engineering and Science Invention (IJESI)
International Journal of Engineering and Science Invention (IJESI)International Journal of Engineering and Science Invention (IJESI)
International Journal of Engineering and Science Invention (IJESI)inventionjournals
 
Build Your Own VR Display Course - SIGGRAPH 2017: Part 3
Build Your Own VR Display Course - SIGGRAPH 2017: Part 3Build Your Own VR Display Course - SIGGRAPH 2017: Part 3
Build Your Own VR Display Course - SIGGRAPH 2017: Part 3StanfordComputationalImaging
 
Gyromat Technology (function & principle))
Gyromat Technology (function & principle))Gyromat Technology (function & principle))
Gyromat Technology (function & principle))venuss1231
 
Tk2323 lecture 10 sensor
Tk2323 lecture 10   sensorTk2323 lecture 10   sensor
Tk2323 lecture 10 sensorMengChun Lam
 
booysen_vehicle_paper automotive 2015.pdf
booysen_vehicle_paper automotive 2015.pdfbooysen_vehicle_paper automotive 2015.pdf
booysen_vehicle_paper automotive 2015.pdfYogi Adi Wijaya
 
Data logging
Data loggingData logging
Data loggingLim1990
 
iwatchjr | Mobile Handset Sensors Coordinate System
iwatchjr | Mobile Handset Sensors Coordinate Systemiwatchjr | Mobile Handset Sensors Coordinate System
iwatchjr | Mobile Handset Sensors Coordinate Systemiwatchjr
 
Powerpoint presentation for data logging
Powerpoint presentation for data loggingPowerpoint presentation for data logging
Powerpoint presentation for data loggingSufinah Ensian
 

Similaire à Better motion control using accelerometer/gyroscope sensor fusion (20)

Motion recognition with Android devices
Motion recognition with Android devicesMotion recognition with Android devices
Motion recognition with Android devices
 
Sensors Data Processing for Innovative Swimming Tracking Device
Sensors Data Processing for Innovative Swimming Tracking DeviceSensors Data Processing for Innovative Swimming Tracking Device
Sensors Data Processing for Innovative Swimming Tracking Device
 
Generic sensors for the Web
Generic sensors for the WebGeneric sensors for the Web
Generic sensors for the Web
 
Swimming Tracker - Motion Recognition
Swimming Tracker - Motion RecognitionSwimming Tracker - Motion Recognition
Swimming Tracker - Motion Recognition
 
Low-g Accelerometers Part 1 - Basic Knowledge of Accelerometers
Low-g Accelerometers Part 1  - Basic Knowledge of AccelerometersLow-g Accelerometers Part 1  - Basic Knowledge of Accelerometers
Low-g Accelerometers Part 1 - Basic Knowledge of Accelerometers
 
Activity Recognition using Cell Phone Accelerometers
Activity Recognition using Cell Phone AccelerometersActivity Recognition using Cell Phone Accelerometers
Activity Recognition using Cell Phone Accelerometers
 
Android gps, location services, camera and sensors - Paramvir Singh
Android gps, location services, camera and sensors - Paramvir SinghAndroid gps, location services, camera and sensors - Paramvir Singh
Android gps, location services, camera and sensors - Paramvir Singh
 
Apresentação IMU (2).pdf
Apresentação IMU (2).pdfApresentação IMU (2).pdf
Apresentação IMU (2).pdf
 
Working with Windows Phone sensors, gps and maps
Working with Windows Phone sensors, gps and mapsWorking with Windows Phone sensors, gps and maps
Working with Windows Phone sensors, gps and maps
 
International Journal of Engineering and Science Invention (IJESI)
International Journal of Engineering and Science Invention (IJESI)International Journal of Engineering and Science Invention (IJESI)
International Journal of Engineering and Science Invention (IJESI)
 
Build Your Own VR Display Course - SIGGRAPH 2017: Part 3
Build Your Own VR Display Course - SIGGRAPH 2017: Part 3Build Your Own VR Display Course - SIGGRAPH 2017: Part 3
Build Your Own VR Display Course - SIGGRAPH 2017: Part 3
 
Gyromat Technology (function & principle))
Gyromat Technology (function & principle))Gyromat Technology (function & principle))
Gyromat Technology (function & principle))
 
Sensors 9
Sensors   9Sensors   9
Sensors 9
 
Sensor's inside
Sensor's insideSensor's inside
Sensor's inside
 
Track o-shoes
Track o-shoes Track o-shoes
Track o-shoes
 
Tk2323 lecture 10 sensor
Tk2323 lecture 10   sensorTk2323 lecture 10   sensor
Tk2323 lecture 10 sensor
 
booysen_vehicle_paper automotive 2015.pdf
booysen_vehicle_paper automotive 2015.pdfbooysen_vehicle_paper automotive 2015.pdf
booysen_vehicle_paper automotive 2015.pdf
 
Data logging
Data loggingData logging
Data logging
 
iwatchjr | Mobile Handset Sensors Coordinate System
iwatchjr | Mobile Handset Sensors Coordinate Systemiwatchjr | Mobile Handset Sensors Coordinate System
iwatchjr | Mobile Handset Sensors Coordinate System
 
Powerpoint presentation for data logging
Powerpoint presentation for data loggingPowerpoint presentation for data logging
Powerpoint presentation for data logging
 

Plus de Gabor Paller

Towards a floating plastic waste early warning system
Towards a floating plastic waste early warning systemTowards a floating plastic waste early warning system
Towards a floating plastic waste early warning systemGabor Paller
 
Dataflow-based heterogeneous code generator for IoT applications
Dataflow-based heterogeneous code generator for IoT applicationsDataflow-based heterogeneous code generator for IoT applications
Dataflow-based heterogeneous code generator for IoT applicationsGabor Paller
 
Sigfox szenzorfejlesztéssel kapcsolatos tapasztalatok
Sigfox szenzorfejlesztéssel kapcsolatos tapasztalatokSigfox szenzorfejlesztéssel kapcsolatos tapasztalatok
Sigfox szenzorfejlesztéssel kapcsolatos tapasztalatokGabor Paller
 
Energy-efficient operation of GSM-connected infrared rodent sensors
Energy-efficient operation of GSM-connected infrared rodent sensorsEnergy-efficient operation of GSM-connected infrared rodent sensors
Energy-efficient operation of GSM-connected infrared rodent sensorsGabor Paller
 
AgroDat poster at Sensornets 2015 conference
AgroDat poster at Sensornets 2015 conferenceAgroDat poster at Sensornets 2015 conference
AgroDat poster at Sensornets 2015 conferenceGabor Paller
 
Connect your Android to the real world with Bluetooth Low Energy
Connect your Android to the real world with Bluetooth Low EnergyConnect your Android to the real world with Bluetooth Low Energy
Connect your Android to the real world with Bluetooth Low EnergyGabor Paller
 
Sensor fusion between car and smartphone
Sensor fusion between car and smartphoneSensor fusion between car and smartphone
Sensor fusion between car and smartphoneGabor Paller
 
Advantages and limitations of PhoneGap for sensor processing
Advantages and limitations of PhoneGap for sensor processingAdvantages and limitations of PhoneGap for sensor processing
Advantages and limitations of PhoneGap for sensor processingGabor Paller
 
LiveFolders as feeds
LiveFolders as feedsLiveFolders as feeds
LiveFolders as feedsGabor Paller
 
Understanding the Dalvik bytecode with the Dedexer tool
Understanding the Dalvik bytecode with the Dedexer toolUnderstanding the Dalvik bytecode with the Dedexer tool
Understanding the Dalvik bytecode with the Dedexer toolGabor Paller
 
The dedexer disassembler
The dedexer disassemblerThe dedexer disassembler
The dedexer disassemblerGabor Paller
 

Plus de Gabor Paller (11)

Towards a floating plastic waste early warning system
Towards a floating plastic waste early warning systemTowards a floating plastic waste early warning system
Towards a floating plastic waste early warning system
 
Dataflow-based heterogeneous code generator for IoT applications
Dataflow-based heterogeneous code generator for IoT applicationsDataflow-based heterogeneous code generator for IoT applications
Dataflow-based heterogeneous code generator for IoT applications
 
Sigfox szenzorfejlesztéssel kapcsolatos tapasztalatok
Sigfox szenzorfejlesztéssel kapcsolatos tapasztalatokSigfox szenzorfejlesztéssel kapcsolatos tapasztalatok
Sigfox szenzorfejlesztéssel kapcsolatos tapasztalatok
 
Energy-efficient operation of GSM-connected infrared rodent sensors
Energy-efficient operation of GSM-connected infrared rodent sensorsEnergy-efficient operation of GSM-connected infrared rodent sensors
Energy-efficient operation of GSM-connected infrared rodent sensors
 
AgroDat poster at Sensornets 2015 conference
AgroDat poster at Sensornets 2015 conferenceAgroDat poster at Sensornets 2015 conference
AgroDat poster at Sensornets 2015 conference
 
Connect your Android to the real world with Bluetooth Low Energy
Connect your Android to the real world with Bluetooth Low EnergyConnect your Android to the real world with Bluetooth Low Energy
Connect your Android to the real world with Bluetooth Low Energy
 
Sensor fusion between car and smartphone
Sensor fusion between car and smartphoneSensor fusion between car and smartphone
Sensor fusion between car and smartphone
 
Advantages and limitations of PhoneGap for sensor processing
Advantages and limitations of PhoneGap for sensor processingAdvantages and limitations of PhoneGap for sensor processing
Advantages and limitations of PhoneGap for sensor processing
 
LiveFolders as feeds
LiveFolders as feedsLiveFolders as feeds
LiveFolders as feeds
 
Understanding the Dalvik bytecode with the Dedexer tool
Understanding the Dalvik bytecode with the Dedexer toolUnderstanding the Dalvik bytecode with the Dedexer tool
Understanding the Dalvik bytecode with the Dedexer tool
 
The dedexer disassembler
The dedexer disassemblerThe dedexer disassembler
The dedexer disassembler
 

Dernier

New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 

Dernier (20)

New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 

Better motion control using accelerometer/gyroscope sensor fusion

  • 1. Better motion control using accelerometer/gyroscope sensor fusion Gabor Paller gaborpaller@gmail.com Sfonge Ltd. http://www.sfonge.com
  • 2. Where were we? ● Droidcon 2011, London: Motion recognition on Android devices ● http://mylifewithandroid.blogspot.com/2011/10/my- presentation-about-motion.html ● Processing only the accelerometer for motion recognition
  • 3. Acceleration Acceleration caused by Acceleration caused by the change the change of direction of velocity v1 dV dV v2 v2 v1 ΔV a= Δt
  • 4. Extract motion information from accelerometer data ● Accelerometer data is a vector, having 3 axes (x,y,z) ● This vector has the following components: ● Gravity acceleration – Pointing toward the center of the Earth – Value of about 10 m/s2 – That's what we measure when the accelerometer is used to calculate tilt ● Any other acceleration the device is subject to – Added to the gravity acceleration – “Disturbs” tilt measurement in gaming (swift movements cause acceleration) – hence the reason for gyroscopes – Can be used for movement detection
  • 6. Absolute value ● x, y, z: acceleration vector components ● g – value of the gravity acceleration (can be approximated as 10) a= √ x +y +z −g 2 2 2
  • 7. Snap – one way accelerating Movement starts: Movement ends: decelerating
  • 8. Droidcon 2011 flashback ● Conclusions: ● Power consumption is a problem ● Some neat functionality can be implemented by doing pattern recognition on the acceleration vector's absolute value ● In general case the gravity and motion acceleration components cannot be separated ● You can try to use an additional sensor like the gyro to help the separation
  • 9. Gyroscope ● Very new phenomenon as gyroscopes suitable for consumer electronic devices appeared very recently ● First appearance: Wii Motion Plus accessory, 2009 June ● First Android smart phone: Nexus S (end of 2010) ● Pros: ● Not sensitive to gravity ● Cons: ● Currently supported only by high-end Android phones ● Drift problems (more about that later)
  • 10. Compass ● Measures the device orientation wrt. the magnetic vector of the Earth ● This vector points toward the magnetic center of the Earth – It has a component that points to the magnetic North pole – that's what we use for orientation – Beware of the z component! (also called magnetic inclination). If the device is not held horizontally, the downward vector element influences the measurement ● Pros: ● Can be used to deduce gravity, not sensitive to motion acceleration ● Widely available in Android devices ● Cons: ● Requires calibration ● Sensitive to metal objects, magnetic fields (e.g. electric motors)
  • 11. This time it is gyroscope only
  • 13. Gyroscope measurement data ● Measures rotation around 3 axes ● More exactly: measures rotation speed (angular velocity) around the axes Δφ v x= Δt
  • 14. Getting the rotation angle ● Get the angle difference Δ φ=v x Δ t ● Get the absolute angle φ ' =φ+Δ φ
  • 15. Drift
  • 16. Noise
  • 17. Gyro as support sensor ● Because of accumulating error, gyro alone can be rarely used ● But ● The accelerometer has no accumulated error but has the gravity component problem ● The gyro has accumulated error but is not sensitive to gravity ● Sensor fusion: the use of multiple sensors so that they compensate each other's weaknesses
  • 18. Accelerometer-gyro fusion ● The easy way ● Use the virtual sensors that calculate gravity and linear acceleration from multiple sensors ● The hard way ● Process raw accelerometer and gyroscope data to yield the motion information you need
  • 19. Virtual sensors Gravity and motion acceleration deduced from the accelerometer and the gyroscope Roll/pitch/yaw from the compass Drift-compensated gyroscope
  • 21. The hard way ● Why would you go the hard way? ● Sensor fusion co-processing provided by the phone is not precise enough or can have undesirable properties (like auto-calibration in Nexus S) ● Virtual sensors are not available (is there any such case with gyro-equipped phone?) ● You would like to understand how it works and what to expect from built-in sensor fusion ● Just for the fun of it :-)
  • 22. What we want ● Remember: accelerometer measures the sum of gravity and motion acceleration ● Kills two use cases: ● If you need device tilt, the motion acceleration component corrupts the measurement ● If you want motion acceleration, it is impossible to subtract the gravity acceleration in a general case ● Separate gravity and motion acceleration with the help of the gyroscope
  • 23. Idea
  • 24. Idea in words ● Pick a reliable gravity vector measurement (make sure that there's no motion then) ● If you detect motion (more about later), rotate the previous gravity vector using the gyroscope data and use it as gravity vector estimation ● Subtract this gravity vector estimation from the measured acceleration – this yields the motion acceleration
  • 25. Updating the gravity vector estimation ● The gravity vector estimation has to be updated time to time as rotation angle errors accumulate ● If we detect an acceleration measurement where there is no motion acceleration, we can take it as new reliable gravity vector estimation ● Remember slide #7: if the absolute value of the accelerometer output is close to the Earth's gravity, we can assume that there's no motion → the gravity vector estimation can be updated with the current accelerometer output
  • 26. Implementation ● Example program: http://www.sfonge.com/forum/topic/example- application-accelerometergyroscope- processing-android
  • 27. Now what? 3D linear acceleration signal of a well-known motion
  • 28. Recognizing motion ● 3D linear acceleration signals are not so intuitive ● Motion recognition: ● Record acceleration pattern of reference motion and compare with these references ● Convert from acceleration domain to something more intuitive like velocity – Accelerometer/gyroscope bias will become linearly growing drift after you integrate the acceleration signal!
  • 32. Conclusions ● Each sensor has strengths and weaknesses ● Combine them and they compensate each other ● Some sensor fusion is already built-in ● If not → don't worry, come up with your own, it's fun! ● Motion recognition based on 3D linear acceleration signal is much more exact than doing the same from 1D signal