System Analysis & Design

Initial Design: Data flow diagram


The figure above showed a data flow diagram of the robotic system and was produced in week 2 to model the data processing aspects of the system. This is our preliminary step to creating an overview of the system without going into the details so that everyone in the team has a clearer view and understanding of how the robotic system would work.

Architecture Design: Component Diagram


The figure above shows a component diagram of the robotic system. It was produced in week 3 of the project. This diagram identifies all the components and their interfaces required for the robotic system. It also helped us to determine what are the reusable modules among the components, such as Read/Writing of Map descriptor module.

Behavior Design: Sequence Diagram between interface

The component diagram does not show us the functionalities and behaviour of the system. Thus we use sequence diagrams to illustrate the behaviour of the different features of the system and how the components interact with one another.

Sequence diagram for remote controlling the Robot
Sequence diagram for remote controlling the Robot

Sequence diagram for Auto-Exploring the Maze
Sequence diagram for Auto-Exploring the Maze

Sequence diagram for Fastest Path
Sequence diagram for Fastest Path

Interface Message

Each message will have an “action status”, followed by the data in the message. Action status denotes the type of message so that the receiving end knows the purpose of the message. The following shows the message format across all components.

Android to R-Pi [action status]|[robot position & direction] |[movement]|[waypoint]
R-Pi to Android [action status]|[explored map]|[explored obstacles] |[ robot position & direction]|[ movement]
Arduino to R-Pi [action status]|[sensor Info]
R-Pi to Arduino [action status]|[movement]
R-Pi to Algorithm [action status]|[robot position & direction]|[sensor Info] |[waypoint]
Algorithm to R-Pi [action status]|[explored map]|[explored obstacles]|[movement]|[robot position & direction]|[is complete]

Sample: “EX|ffe07fc0ff81ff03fe07fc0ff81ff03fe07ffcfff9fff07fc0dc01b800600000000000000003|000000000001000000000000008000200027|L90,F10,R90,F10|8,10,90|0”

Legends
Action statuses Definition
EX Exploration
TE Terminate Exploration
FP Fastest Path
MR Move robot manually using Android (without algorithm)
MV Move robot automatically with algorithm
SS Sensor
DONE Algorithm end  (RPi to android)
Robot stop moving (Arduino to RPi)
Data Type Definition and Value
explored map Map descriptor in Hexadecimal (explored)
e.g. “ffe07fc0ff81ff03fe07fc0ff81ff03fe07ffcfff9fff07fc0dc01b800600000000000000003”
explored obstacles Map descriptor in Hexadecimal (obstacles)
e.g. “000000000001000000000000008000200027”
robot position & direction [X,Y,D]  Robot is located at (X,Y) facing D direction from NORTH.
e.g.“1,3,90”
waypoint [X, Y] Waypoint located at (X, Y)
e.g. “12,13”
movement F – forward,  R- rotate right, L-rotate left
e.g.“F12” – move 12 cm ahead “R90” – rotate 90 degrees in clockwise
“L90,F10,R45” – rotate left 90, forward 10cm, rotate right 45
sensor Info e.g. “43,112,57,111,154
is complete e.g. “1” or “0”
The default value is ”0”  and is set to 1 when Algorithm send the last exploration instruction

Class diagram

We have two class diagrams – a basic and a detailed one. It was created to represent the entities in the real environment. The designed class is used in both Android application and Algorithm simulation components to represent the robot and the environment.

Basic class design After several iterations (week 3-8) of implementation