1 / 30

Design Methodology for State based Embedded Systems Case Study: Maze Navigator

This article presents a design methodology for state-based embedded systems using a case study of a Maze Navigator robot. It discusses the behavior control, time-triggered architecture, Rational Unified Process (RUP), and implementation details.

rasaro
Download Presentation

Design Methodology for State based Embedded Systems Case Study: Maze Navigator

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Design Methodology for State based Embedded SystemsCase Study: Maze Navigator Vivek Subramaniam Graduate Student (Masters’ Program)

  2. Contents • Introduction • Design methodology for state based time triggered systems • Case Study: Maze Navigator • Demo • Questions

  3. Introduction

  4. Behavior Control • Behavior – tasks that process external/internal sensory information and issues an action. • Complex behavior – series of alternations of simple behaviors. • Hierarchical Model. • Reactive robot control architecture.

  5. Behavior Control API Behavior boolean takeControl( ) void action( ) void suppress( ) Arbitrator public Arbitrator (Behavior[ ] behaviors)

  6. Time triggered Architecture • Initiated at predetermined instances of real-time. • Event inputs or interrupts are queued and polled periodically. • Relatively easy to validate, test and certify.

  7. Maze Navigator • A modification of the Navigator robot as given in Brian Bagnall’s book “Core Lego Mindstorms Programming”. • Sensors and Inputs: Touch sensor, Light Sensor, Timer and two Rotation Sensors. • Actuators: Two motors. • Due to limitations of system, a simulation was developed

  8. Maze Navigator’s Behavior Model Light Sensor HOME S Touch Sensor BUMP True Motors MOVE S S Point of Suppression

  9. Design Methodology For State basedTime Triggered systems

  10. Definition “Rational Unified Process (RUP) is a framework that can be used to describe specific development process” - Grady Booch

  11. Rational Unified Process Actors Use-Cases Class Diagrams Use-Case Realizations Implementation Use-Case Model (what) Actual Code Analysis/Design Models (how)

  12. Use-Case Realization WAKEUP WAIT

  13. Use-case realizations with asynchronous waits • Allocating a thread per scenario with Synchronization • Finite State Machine based Implementation

  14. RUP for Concurrent Programs using Synchronization RUP Component Code Actors Use-cases Class Diagram Scenarios Specify global invariant Scenarios identify synchronization regions in which synchronization is required Complete code Global invariants (patterns) Coarse-grained solution Fine-grained code Synchronization aspect code development (A structured approach to develop concurrent programs in UML)

  15. RUP for time triggered systems using FSM Actors Use-Cases Class Diagrams Use-Case realizations Revised Class Diagrams + Scenarios for threads Use-Case Model (what) Analysis/Design Models (how) Implementation Original Class Diagram + State information + Active Classes Actual Code

  16. Event Triggered Systems Boundary Classes Other Classes The flow of control is from the Boundary Classes to other classes

  17. Time Triggered System Boundary Classes Other Classes Active Classes The flow of control is from Active class to boundary and other classes.

  18. From this discussion we can see that we have these four options. Event Triggered Finite State Machine Time Triggered Allocating thread Per scenario

  19. Methodology • Identify the Use Cases • Describe the Use Case realizations and class diagrams • Identify states and thread scenarios • Revise Class Diagram and use-case realization • Form the Finite State Machine • Translate to code

  20. Case Study: Maze Navigator

  21. Use Cases for Maze Navigator • MOVE (true): • Scan for an unvisited/ least visited cell. • Determine random No. of steps in the direction of picked cell. • Travel the required No. of steps in that direction. • BUMP (Input from touch sensor): • Travels back to the last cell location. • GO HOME (Timer as input): • Calculate the angle and distance for initial point (0,0). • Rotate for the angle and travel the distance in straight line. • STEER (Inputs from Rotation Sensors): • Uses rotation sensor to find angle rotated and distance traveled. • Keeps the travel in straight line.

  22. Use Case Model for Maze Navigator

  23. Class Diagram

  24. Use Case Realization Example Maze Navigator : MOVE Behavior Scan for a unvisited or least visited cell Calculate random No. of steps to take in that direction Calculate angle and distance Start the motors Wait Until required angle is rotated. Stop motors Update geometry Start the motors Wait Until required distance is traveled Stop motors Update geometry Asynchronous waits

  25. Revised Use Case Realization Example States Wait until input trigger Move Behavior : Scan for unvisited/ least visited cell Calculate random steps in that cells direction Calculate angle and distance Start the motors Wait Until required angle is rotated. Stop motors Update geometry Start the motors Wait Until required distance is traveled Stop motors Update geometry Arbitrator thread Rotation Sensor thread

  26. Finite State Machine Method – Action Call actionC takeControlC actionB takeControlB takeControlA DONE Legend: Arbitrator thread actionA Rotation sensor thread

  27. Revised Class Diagram

  28. Demo

  29. Acknowledgement • Dr. Masaaki Mizuno • Dr. Rodney R. Howell • Dr. Mitchell L. Nielsen

  30. Questions ???

More Related