from control model to program

From Control Model to Program: Investigating Robotic Aerial Vehicle - PowerPoint PPT Presentation

From Control Model to Program: Investigating Robotic Aerial Vehicle Accidents with M AYDAY Taegyu Kim 1 , Chung Hwan Kim 2 , Altay Ozen 1 , Fan Fei 1 , Zhan Tu 1 , Xiangyu Zhang 1 , Xinyan Deng 1 , Dave (Jing) Tian 1 , Dongyan Xu 1 1 Purdue


  1. From Control Model to Program: Investigating Robotic Aerial Vehicle Accidents with M AYDAY Taegyu Kim 1 , Chung Hwan Kim 2 , Altay Ozen 1 , Fan Fei 1 , Zhan Tu 1 , Xiangyu Zhang 1 , Xinyan Deng 1 , Dave (Jing) Tian 1 , Dongyan Xu 1 1 Purdue University 2 UT Dallas

  2. Drone (Robotic Aerial Vehicle) Accidents

  3. RAV Control and Control-Semantic Bugs 𝑨 𝑧𝑏π‘₯ π‘žπ‘—π‘’π‘‘β„Ž Control Program Observed vehicle states in β€œ6DoFs” 𝑧 𝑦 π‘ π‘π‘šπ‘š Control Control-Semantic Bug Mission Sensor Station Module Module β€’ Accident root cause inside control program β€’ Incorrect or incomplete Control Model Physical implementation of Environment control model Motor Aerodynamics

  4. A Motivating Accident

  5. Challenges in Investigating the Accident Control-level Attack Log impact β€’ β€œTwo Gaps” Control Control Model β€’ Domain gap ? Domain Gap β€’ Control domain β†’ Program domain Program Control Program β€’ Time gap Root Cause β€’ Attack time β†’ Impact time 80 Velocity (cm/s) β€’ Our solution: M AYDAY 60 Attack CMD 40 β€’ Bridge the gaps Reference Velocity 20 Impact Actual Velocity 0 β€’ Enable cross-domain investigation 4800 4900 5000 5100 5200 Control Loop Iteration Time Gap

  6. MAYDAY Workflow Control-level Control Program Program Log Program Crash Investigation (Source Code) Instrumentation Analysis Result Program-level Control Variable Investigation Dependency Graph (CVDG) Runtime Offline Analysis & Instrumentation Post-Accident Investigation Logging

  7. ሷ ሷ ሷ ሢ ሷ ሢ ሷ ሢ ሢ ሢ ሷ ሢ ሢ ሷ ሷ ሢ ሢ ሢ ሢ ሷ ሷ ሢ ሷ ሢ ሷ ሢ ሷ ሢ ሷ ሢ ሢ ሢ ሷ ሷ ሷ ሷ RAV Control Model Control Variable Dependency Graph (CVDG) S M P S M P S M P 𝑠 πœ” 𝑦 πœ” 𝑙 πœ” ANGLE 𝑦 𝑦 𝑠 𝑙 𝑦 POS 𝑦 𝑧 𝑠 𝑙 𝑧 POS 𝑦 𝑧 Controller Controller Controller 𝑠 πœ” VEL VEL VEL 𝑦 πœ” 𝑦 𝑦 𝑠 𝑦 𝑧 𝑠 𝑙 πœ” 𝑙 𝑦 𝑙 𝑧 6DoF 𝑦 𝑧 Controller Controller Controller ACCEL ACCEL ACCEL 𝑦 πœ” 𝑠 πœ” 𝑦 𝑦 𝑠 𝑦 𝑧 𝑠 𝑙 πœ” 𝑙 𝑦 𝑙 𝑧 Controller 𝑦 Controller 𝑧 Controller X-axis Cascading Yaw Cascading Y-axis Cascading Controller Controller Controller Cascading πœ’ = π‘π‘’π‘π‘œ βˆ’ ሷ π‘¦π‘‘π‘—π‘œπœ” + ሷ π‘§π‘‘π‘π‘‘πœ” πœ„ = βˆ’π‘π‘’π‘π‘œ ሷ π‘¦π‘‘π‘π‘‘πœ” + ሷ π‘§π‘‘π‘—π‘œπœ” 𝑕 𝑕 controller S M P S M P S M P 𝑠 𝑠 𝑠 πœ„ 𝑦 𝑨 𝑙 𝑨 POS 𝑦 πœ’ 𝑙 πœ’ ANGLE 𝑦 πœ„ 𝑙 πœ„ ANGLE 𝑨 πœ’ Controller Controller Controller VEL 𝑦 𝑨 𝑠 𝑠 VEL VEL 𝑙 𝑨 𝑦 πœ’ 𝑙 πœ’ 𝑦 πœ„ 𝑠 πœ„ 𝑙 πœ„ 𝑨 πœ’ Controller Controller Controller Inter- ACCEL ACCEL ACCEL 𝑦 𝑨 𝑠 𝑙 𝑨 𝑦 πœ’ 𝑠 𝑙 πœ’ 𝑦 πœ„ 𝑠 πœ„ 𝑙 πœ„ 𝑨 Controller πœ’ Controller Controller S dependency Z-axis Cascading Roll Cascading Pitch Cascading Controller Controller Controller between Motor Controller controllers : Sensor Input S P : Parameter Input x 4 M : Mission Input

  8. ሢ ሢ ሷ ሷ ሢ ሷ ሢ ሢ ሢ Mapping Control Model to Control Program Control Model S M P Control Program void AC_PosControl::rate_to_accel_z( POS 𝑠 𝑦 𝑨 𝑙 𝑨 𝑨 Controller … Mapping vel_err.z = vel_target.z - cur_vel.z VEL p = _p_velz._kP() * vel_err.z; 𝑦 𝑨 𝑠 𝑙 𝑨 𝑨 Controller accel_target.z = accel_ff.z + p ; … ACCEL 𝑠 𝑦 𝑨 𝑙 𝑨 Controller 𝑨 : Parameter : Reference : Vehicle state 𝑠 𝑦 𝑨 𝑙 𝑨 𝑨 : Sensor input : Parameter input : Mission input S M P β€’ Control model variable β†’ Control program variable β€’ Control model data flow β†’ Control program execution paths

  9. Logging Enhancement β€’ Control/vehicle operation log β€’ Recorded by default β€’ Supported by major drone control programs β€’ Recorded by control-level logging functions β€’ Program execution log If err.z -= cur.z; else err.z = 0.0; p = kP* err.z; β€’ Enabled by M AYDAY β€’ Logging functions inserted via LLVM-level instrumentation β€’ Guided by mapping between control model and program

  10. Control-Level Investigation Initial Investigation Digression 1000 Initial 800 X-axis Velocity Digression 600 400 200 0 -200 8000 15000 22000 29000 36000 Control Loop Iteration : Reference β€’ Identify initial digressing controller : Actual state β€’ [Controller, corrupted variable, initial digression time] β€’ Infer control-level corruption path based on CVDG

  11. Moving from Control Domain to Program Domain Initial Investigation Digression 1000 Initial 800 X-axis Velocity Digression 600 400 200 0 -200 8000 15000 22000 29000 36000 Control Loop Iteration : Reference β€’ Corrupted control variable β†’ Corrupted program variable : Actual state

  12. Program-Level Investigation Initial Investigation Digression 1000 Initial 800 X-axis Velocity Digression 600 400 Attack Input 200 0 -200 Attack Input Program-level 8000 15000 22000 29000 36000 Corruption Path Control Loop Iteration : Reference β€’ Control-level corruption path β†’ Program-level corruption path : Actual state β€’ From initial digression to attack input β€’ Bug localized in basic blocks that implement the corruption path

  13. Evaluation: Effectiveness of M AYDAY

  14. Evaluation: Solving the Earlier Case Control-Level Log 1000 Initial 800 X-axis Velocity Digression β€’ Initial digressing controller: X, Y-axis velocity controller 600 400 Attack β€’ Corrupted control variable: X, Y-axis acceleration reference Input 200 β€’ Control-level corruption path: 0 -200 8000 15000 22000 29000 36000 Control Loop Iteration Program-Level Log β€’ Attack input: Control gain k P β€’ Number of BBs on corruption path: 34 β€’ Source LoC: 89

  15. Evaluation: Runtime Overhead of M AYDAY

  16. Conclusion β€’ Drone accident may be caused by control semantic bugs β€’ Control-level logs alone are not sufficient for bug-tracing β€’ M AYDAY : a cross-domain accident investigation tool β€’ Bridging the domain gap and the time gap β€’ Mapping control model to control program β€’ Integrating control-level and program-level logging β€’ Connecting control-level and program-level investigation

  17. Thank you! This work was supported in part by ONR Grant #N00014-17-1-2045. tgkim@purdue.edu

Recommend


More recommend