Presentation is loading. Please wait.

Presentation is loading. Please wait.

Department of Computing and Information Sciences Kansas State University Design Methodology for State based Embedded Systems Case Study: Maze Navigator.

Similar presentations


Presentation on theme: "Department of Computing and Information Sciences Kansas State University Design Methodology for State based Embedded Systems Case Study: Maze Navigator."— Presentation transcript:

1 Department of Computing and Information Sciences Kansas State University Design Methodology for State based Embedded Systems Case Study: Maze Navigator Vivek Subramaniam Graduate Student (Masters’ Program)

2 Department of Computing and Information Sciences Kansas State University Contents  Introduction  Design methodology for state based time triggered systems  Case Study: Maze Navigator  Demo  Questions

3 Department of Computing and Information Sciences Kansas State University Introduction

4 Department of Computing and Information Sciences Kansas State University 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 Department of Computing and Information Sciences Kansas State University Behavior Control API Behavior boolean takeControl( ) void action( ) void suppress( ) Arbitrator public Arbitrator (Behavior[ ] behaviors)

6 Department of Computing and Information Sciences Kansas State University 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 Department of Computing and Information Sciences Kansas State University 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 Department of Computing and Information Sciences Kansas State University Maze Navigator’s Behavior Model HOME BUMP MOVE Light Sensor Touch Sensor Motors S S S S S S Point of Suppression True

9 Department of Computing and Information Sciences Kansas State University Design Methodology For State based Time Triggered systems

10 Department of Computing and Information Sciences Kansas State University Definition “Rational Unified Process (RUP) is a framework that can be used to describe specific development process” - Grady Booch

11 Department of Computing and Information Sciences Kansas State University Rational Unified Process Actors Use-Cases Actors Use-Cases Class Diagrams Use-Case Realizations Class Diagrams Use-Case Realizations Implementation Use-Case Model (what) Analysis/Design Models (how) Actual Code

12 Department of Computing and Information Sciences Kansas State University Use-Case Realization WAIT WAKEUP

13 Department of Computing and Information Sciences Kansas State University Use-case realizations with asynchronous waits  Allocating a thread per scenario with Synchronization  Finite State Machine based Implementation

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

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

16 Department of Computing and Information Sciences Kansas State University Event Triggered Systems Boundary Classes Other Classes The flow of control is from the Boundary Classes to other classes

17 Department of Computing and Information Sciences Kansas State University Time Triggered System Boundary Classes Active Classes Other Classes The flow of control is from Active class to boundary and other classes.

18 Department of Computing and Information Sciences Kansas State University From this discussion we can see that we have these four options. Event Triggered Time Triggered Allocating thread Per scenario Allocating thread Per scenario Finite State Machine Finite State Machine

19 Department of Computing and Information Sciences Kansas State University 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 Department of Computing and Information Sciences Kansas State University Case Study: Maze Navigator

21 Department of Computing and Information Sciences Kansas State University 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 Department of Computing and Information Sciences Kansas State University Use Case Model for Maze Navigator

23 Department of Computing and Information Sciences Kansas State University Class Diagram

24 Department of Computing and Information Sciences Kansas State University Use Case Realization Example 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 Maze Navigator : MOVE Behavior Asynchronous waits

25 Department of Computing and Information Sciences Kansas State University Revised Use Case Realization Example 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 States Arbitrator thread Rotation Sensor thread

26 Department of Computing and Information Sciences Kansas State University takeControlC takeControlB takeControlA actionA actionC actionB Arbitrator thread Rotation sensor thread DONE Finite State Machine Method – Action Call Legend:

27 Department of Computing and Information Sciences Kansas State University Revised Class Diagram

28 Department of Computing and Information Sciences Kansas State University Demo

29 Department of Computing and Information Sciences Kansas State University Acknowledgement  Dr. Masaaki Mizuno  Dr. Rodney R. Howell  Dr. Mitchell L. Nielsen

30 Department of Computing and Information Sciences Kansas State University Questions ???


Download ppt "Department of Computing and Information Sciences Kansas State University Design Methodology for State based Embedded Systems Case Study: Maze Navigator."

Similar presentations


Ads by Google