Presentation is loading. Please wait.

Presentation is loading. Please wait.

Real-Time Sensing on Android Reliable Mobile Systems Group Fiji Systems Inc. Yin Yan, Shaun Cosgrove, Ethan Blanton, Steven Y. Ko, Lukasz Ziarek

Similar presentations


Presentation on theme: "Real-Time Sensing on Android Reliable Mobile Systems Group Fiji Systems Inc. Yin Yan, Shaun Cosgrove, Ethan Blanton, Steven Y. Ko, Lukasz Ziarek"— Presentation transcript:

1 Real-Time Sensing on Android Reliable Mobile Systems Group Fiji Systems Inc. Yin Yan, Shaun Cosgrove, Ethan Blanton, Steven Y. Ko, Lukasz Ziarek http://rtdroid.cse.buffalo.edu

2 Interest in Real-Time Android Evaluating Android OS for Embedded Real-Time Systems Android and RTOS together: The dynamic duo for today’s medical devices RTAndroid: A real-time extension to Android with non-blocking GC RTDroid: RTOS + RTVM + RT-Android Framework http://rtdroid.cse.buffalo.edu 1 / 19

3 http://rtdroid.cse.buffalo.edu Indoor Positioning Inertial sensor data Bluetooth GSM Wireless Lan Wearable Tracking activity Sleeping quality Daily calorie consumption Sensor Event Driven Apps in Mobile 2 / 19

4 http://rtdroid.cse.buffalo.edu Sensor Event Driven Apps in Real-time GPS inertial measurement unit Camera and antenna pointing Stabilization 3 / 19

5 http://rtdroid.cse.buffalo.edu Requirement for Sensor Architecture Traditional mobile sensing app Multi sensors Multi components Hardware control Real-time sensing app Predictability in data delivery 4 / 19

6 Available Sensors in Android Hardware sensor  Accelerometer  Ambient temperature  Geomagnetic field  Gyroscope  Light  Pressure  Humidity Software Sensors  Linear acceleration  Significant motion  Step detector  Step counter  Rotation sensor  Game rotation vector  Gravity  Magnetometer  Orientation  … http://rtdroid.cse.buffalo.edu 5 / 19

7 http://rtdroid.cse.buffalo.edu What Does the Android Sensor Architecture Provide? Application Sensor Manager SensorEvent Listener SensorEvent Listener Accelerometer Gyroscope Magnetometer … … enable/disable Change sampling rate Subscript sensor event 6 / 19

8 Sensor Event Listener Sensor Service Input Event Sensor Manger How Does Android Sensor Manager Work? Sensor Fusion Sensor Thread Event Queue Native SensorManger Sensor Thread KernelSystem Runtime FrameworkApplication http://rtdroid.cse.buffalo.edu 7 / 19

9 What Happens In a Real-Time Context? Accelerometer Data Gyroscope Data One application is listening on two sensors Accelerometer with higher priority Gyroscope with lower priority Kernel Application Unbound Delivery Time Android Framework http://rtdroid.cse.buffalo.edu 8 / 19

10 RT SensorManager Event-driven architecture Polling and processing thread Receiver-based priority inheritance Polling and processing inherit the highest priority of the receivers RT-Handler for delivery sensor events with to different receivers http://rtdroid.cse.buffalo.edu 9 / 19

11 RT-Handler RT SensorManager Polling Threads Processing Threads gyroscope Accelerometer Handler … gyroscope Accelerometer http://rtdroid.cse.buffalo.edu 10 / 19 Apps Accel Listener Gyroscope Listener P1P1 P2P2 P2P2 P1P1 P1P1 P1P1 P2P2 P2P2 P 1 > P 2

12 Evaluation on jPapabench http://rtdroid.cse.buffalo.edu 11 / 19

13 Porting jPapaBench into RTDroid Fly-By-Wired (FBW)SimulationAutopilot SensorManager TestPPMTask Handler TestPPMTask Handler SendDataTo Autopolit SendDataTo Autopolit CheckFailsafe TaskHandler CheckFailsafe TaskHandler CheckMega128 ValuesTaskHandler CheckMega128 ValuesTaskHandler SimulatorFlight ModelTaskHandler SimulatorFlight ModelTaskHandler SimulatorIR TaskHandler SimulatorIR TaskHandler SimulatorGPS TaskHandler SimulatorGPS TaskHandler Navigation TaskHandler Navigation TaskHandler Stablization TaskHandler Stablization TaskHandler AltitudeControl TaskHandler AltitudeControl TaskHandler … … Data injectionData subscription http://rtdroid.cse.buffalo.edu 12 / 19

14 Simulated workload: Memory intensive load: allocating a 2.5 MB integer array every 20ms Computation intensive load: tight loop performing a floating point multiplication every 20ms Client intensive load: 1 higher priority a listener with number of lower priority listeners Evaluation on jPapabench Measurement : The latency of the IR sensor data delivery Time cost from the time of sensor data buffered to the time of the sensor data delivered in IR Sensor reading task http://rtdroid.cse.buffalo.edu 13 / 19

15 RT Linux RTEMS  Soft Real-time Smartphone  ARM Cortex-A8 1000MHz  512 MB memory  Android 4.1.1 on Linux 3.0 with real time patch  Hard Real-time Embedded  SPARC, Leon3, 50 MHz  8MB flash PROM  64MB SDRAM  RTEMS 4.9.4 Evaluation Platforms http://rtdroid.cse.buffalo.edu 14 / 19

16 RTEMS Evaluation for Java Autopilot Base line performance on Nexus S Base line performance on LEON3 http://rtdroid.cse.buffalo.edu 15 / 19

17 RTEMS Evaluation for Java Autopilot RT SensorManager stress tests on LEON3 http://rtdroid.cse.buffalo.edu 16 / 19

18 Future Extensions to jPapabench http://rtdroid.cse.buffalo.edu 17 / 19 Flight dynamic model IR & GPS Connect jPapabench with physical simulator Drivers in kernel for RTDroid SensorManager jPapabench Application Simulator in Paparazzi Sensor Manager Kernel Driver

19 Future extensions to jPapabench PaparazzijPapabench http://rtdroid.cse.buffalo.edu 18 / 19

20 Real-time extension of Android manifest for off-line analysis and resource pre-allocation Programming model design with scoped memory Multi-application execution in partitioned system Alterative of Binder for inter-process communication Future Work on RTDroid http://rtdroid.cse.buffalo.edu 19 / 19 Thanks

21 Visit Us http://rtdroid.cse.buffalo.edu

22 Application: soft real-time fall detector Simulated workload: Memory intensive load: allocating a 2.5 MB integer array every 20ms Computation intensive load: tight loop performing a floating point multiplication every 20ms http://rtdroid.cse.buffalo.edu Evaluation for RT Sensor Architecture Measurement : the latency of the sensor data delivery Time cost from the time of sensor data buffered in kernel to the time of the sensor data delivered in application

23 RTEMS Memory stress test for the fall detection app on Nexus S http://rtdroid.cse.buffalo.edu Evaluation for RT Sensor Architecture


Download ppt "Real-Time Sensing on Android Reliable Mobile Systems Group Fiji Systems Inc. Yin Yan, Shaun Cosgrove, Ethan Blanton, Steven Y. Ko, Lukasz Ziarek"

Similar presentations


Ads by Google