System Context Diagram

25

Transcript of System Context Diagram

Page 1: System Context Diagram
Page 2: System Context Diagram

System Context Diagram

RVC

Control

Front Sensor Input

Left Sensor Input

Right Sensor Input

Dust Sensor Input

Direction

Clean

Motor

Cleaner

Sensor

Page 3: System Context Diagram

Data DictionaryInput/ Output Event Description Format / Type

Front Sensor Input Detects obstacles in front of the RVC True / False , Interrupt

Left Sensor Input Detects obstacles in the left side of the RVC periodically True / False , Periodic

Right Sensor Input Detects obstacles in the right side of the RVC periodically True / False , Periodic

Dust Sensor Input Detects dust on the floor periodically True / False , Periodic

Front Obstacle Result of Front Sensor True / False

Left Obstacle Result of Left Sensor True / False

Right Obstacle Result of Right Sensor True / False

Dust Existence Existence of dust checked by dust sensor True / False

Obstacle Location &

Dust Existence

Location of Obstacle and Existence of Dust Obstacle: Front / Left / Right

Dust: True / False

Obstacle Location Location of obstacles checked by front, left, right sensor Forward / Left / Right

Final Dust Existence Same with Dust Existence True / False

Cleaner Power RCV’s cleaner power based on the Dust Existence On / Off / Up / Down

Motor Command Where RCV should go based on the Obstacle Location Forward / Left / Right / Stop

Cleaner Command Same with Cleaner Power On / Off / Up / Down

Page 4: System Context Diagram

Input/ Output Event Description Format / Type

DirectionDirection commands to the Motor

(go forward / turn left with an angle / turn right with an angle / stop)Forward / Left / Right / Stop

Clean Clean commands to the Cleaner

(Turn off / Turn on / Power-Up / Power-Down)

On / Off / Up / Down

Page 5: System Context Diagram

DFD - Level 0

RCVControl

0

Front Sensor

Left Sensor

Right Sensor

Dust Sensor

Digital Sensor

Motor

Cleaner

Front Sensor Input

Left Sensor Input

Direction

Clean

Tick

Right Sensor Input

Dust Sensor Input

Page 6: System Context Diagram

Data Process SpecificationReference No. 0

Name RCV Control

Input Front Sensor Input, Left Sensor Input, Right Sensor Input

, Dust Sensor Input, Tick

Output Direction, Clean

Process

Description

“Front Sensor Input” process reads an analog value of the

front sensor by interruption.

“Left, Right Sensor Input” processes read an analog value of

the left, right sensor periodically.

It converts value of “Front, Left, Right Sensor Input” into an

Analog value such as Forward / Left / Right / Stop and

Assigns them into output variable "Direction”.

“Dust Sensor Input” process reads an analog value of the

Dust sensor periodically, converts it into an analog value

Such as On / Off / Up / Down and assigns it into output

Variable “Clean”.

Page 7: System Context Diagram

DFD – Level 1

Front Sensor Input

Left Sensor Input

Tick

Right Sensor Input

Dust Sensor Input

Cleaner &MotorControl

2

Cleaner &MotorControl

1

Direction

Clean

Obstacle Location & Dust Existence

Tick

Page 8: System Context Diagram

Data Process SpecificationReference No. 1

Name Cleaner & Motor Control

Input Front Sensor Input, Left Sensor Input, Right Sensor Input

, Dust Sensor Input, Tick

Output Obstacle Location & Dust Existence

Process

Description

“Front Sensor Input” process reads an analog value of the

front sensor by interruption.

“Left, Right Sensor Input” processes read an analog value of

the left, right sensor periodically.

“Dust Sensor Input” process reads an analog value of the

Dust sensor periodically.

It converts value of “Front, Left, Right Sensor Input” into an

analog value such as Front / Left / Right and value of

“Dust Existence” into a digital value such as True / False.

It assigns them into output variable

“Obstacle Location & Dust Existence”.

Page 9: System Context Diagram

Reference No. 2

Name Cleaner & Motor Control

Input Obstacle Location & Dust Existence, Tick

Output Direction, Clean

Process

Description

It reads both analog and digital value of the

“Obstacle Location & Dust Existence”.

It converts an analog value into an analog value such as

Forward / Left / Right / Stop and assigns them into

Output variable “Direction”.

It converts a digital value into an analog value such as

On / Off / Up / Down and assigns it into output variable “Clean”.

Data Process Specification

Page 10: System Context Diagram

DFD – Level 2

Determine

Obstacle

Location

1.5

Front Sensor Input

Left Sensor Input

Right Sensor Input

Dust Sensor Input

Tick

Obstacle

Location

Front

Sensor

Interface

1.1

Left

Sensor

Interface

1.2

Right

Sensor

Interface

1.3

Dust

Sensor

Interface

1.4

Tick

Tick

Front Obstacle

Left Obstacle

Right Obstacle

Determine

Dust

Existence

1.6Dust Existence

Final

Dust

Existence

Main

Control

2.1

Motor

Interface

2.2

Cleaner

Interface

2.3

Motor Command

Cleaner Command

Direction

CleanTick

Page 11: System Context Diagram

Data Process SpecificationReference No. 1.1

Name Front Sensor Interface

Input Front Sensor Input

Output Front Obstacle

Process

Description

“Front Sensor Input” process reads an analog value of the

front sensor by interruption, converts it into a digital value

such as True/False and assigns it into output variable

“Front Obstacle.”

Reference No. 1.2

Name Left Sensor Interface

Input Left Sensor Input, Tick

Output Left Obstacle

Process

Description

“Left Sensor Input” process reads an analog value of the

left sensor periodically, converts it into a digital value such as

True/False and assigns it into output variable “Left Obstacle.”

Page 12: System Context Diagram

Data Process SpecificationReference No. 1.3

Name Right Sensor Interface

Input Right Sensor Input, Tick

Output Right Obstacle

Process

Description

“Right Sensor Input” process reads an analog value of the

right sensor periodically, converts it into a digital value

such as True/False and assigns it into output variable

“Right Obstacle.”

Reference No. 1.4

Name Dust Sensor Interface

Input Dust Sensor Input , Tick

Output Dust Obstacle

Process

Description

“Dust Sensor Input” process reads an analog value of the

dust sensor periodically, converts it into a digital value

such as True/False and assigns it into output variable

“Dust Existence.”

Page 13: System Context Diagram

Data Process SpecificationReference No. 1.5

Name Determine Obstacle Location

Input Front Obstacle, Left Obstacle, Right Obstacle

Output Obstacle Location

Process

Description

Reads an analog value of “Front, Left, Right Obstacle”.

Converts them into an analog value such as Forward, Left,

Right.

Assigns this value into output variable “Obstacle Location”

Reference No. 1.6

Name Determine Dust Existence

Input Dust Existence

Output Final Dust Existence

Process

Description

Reads a digital value of “Dust Existence” and assigns same

digital value Into output variable “Final Dust Existence”

Page 14: System Context Diagram

Data Process SpecificationReference No. 2.1

Name Main Control

Input Obstacle Location, Dust Existence, Tick

Output Motor Command, Cleaner Command

Process

Description

Reads an analog value of "Obstacle Location” and a digital

value of “Dust Existence”.

Based on "Obstacle Location”, it assigns an analog value such

as Forward, Left, Right, Stop into output variable

“Motor Command”.

Based on “Dust Existence”, it assigns an analog value such

as On / Off / Up / Down into output variable

“Cleaner Command”

Page 15: System Context Diagram

Reference No. 2.2

Name Motor Interface

Input Motor Command

Output Direction

Process

Description

Reads data of “Motor Command”.

Converts it to an analog value such as Forward / Left / Right

/ Stop and assigns it into output value “Direction”.

For example, if it reads “Stop” from “Motor Command” from

“Move Forward” and “Stop”(two “Stop” commands),

an analog value “Stop” is assigned into “Direction”

Reference No. 2.3

Name Cleaner Interface

Input Cleaner Command

Output Clean

Process

Description

Reads data of “Cleaner Command”.

Converts it to an analog value such as On / Off / Up / Down

and assigns it into output value “Clean”.

For example, if it reads “On” from “Cleaner Command”,

An analog value “On” is assigned into “Clean”.

Page 16: System Context Diagram

DFD – Level 3

Determine

Obstacle

Location

1.5

Front Sensor Input

Left Sensor Input

Right Sensor Input

Dust Sensor Input

Tick

Obstacle

Location

Front

Sensor

Interface

1.1

Left

Sensor

Interface

1.2

Right

Sensor

Interface

1.3

Dust

Sensor

Interface

1.4

Tick

Tick

Front Obstacle

Left Obstacle

Right Obstacle

Determine

Dust

Existence

1.6Dust Existence

Final

Dust

Existence

Page 17: System Context Diagram

DFD – Level 3

Move

Forward

2.1.2

Obstacle

Location

Controller

2.1.1

Tick

Turn

Left

2.1.3

Turn

Right

2.1.4

Motor

Interface

2.2

Cleaner

Interface

2.3

Direction

Clean

Enable

Disable

Trigger

Trigger

Motor Command

Motor Command

Motor Command

Cleaner Command

Tick

Tick

Final

Dust

Existence

Stop

2.1.5

Motor Command

Tick

Power

2.1.6

Cleaner Power

Trigger

Page 18: System Context Diagram

Data Process SpecificationReference No. 1.1

Name Front Sensor Interface

Input Front Sensor Input

Output Front Obstacle

Process

Description

“Front Sensor Input” process reads an analog value of the

front sensor by interruption, converts it into a digital value

such as True/False and assigns it into output variable

“Front Obstacle.”

Reference No. 1.2

Name Left Sensor Interface

Input Left Sensor Input, Tick

Output Left Obstacle

Process

Description

“Left Sensor Input” process reads an analog value of the

left sensor periodically, converts it into a digital value such as

True/False and assigns it into output variable “Left Obstacle.”

Page 19: System Context Diagram

Data Process SpecificationReference No. 1.3

Name Right Sensor Interface

Input Right Sensor Input, Tick

Output Right Obstacle

Process

Description

“Right Sensor Input” process reads an analog value of the

right sensor periodically, converts it into a digital value

such as True/False and assigns it into output variable

“Right Obstacle.”

Reference No. 1.4

Name Dust Sensor Interface

Input Dust Sensor Input , Tick

Output Dust Obstacle

Process

Description

“Dust Sensor Input” process reads an analog value of the

dust sensor periodically, converts it into a digital value

such as True/False and assigns it into output variable

“Dust Existence.”

Page 20: System Context Diagram

Data Process SpecificationReference No. 1.5

Name Determine Obstacle Location

Input Front Obstacle, Left Obstacle, Right Obstacle

Output Obstacle Location

Process

Description

Reads an analog value of “Front, Left, Right Obstacle”.

Converts them into an analog value such as Forward, Left,

Right.

Assigns this value into output variable “Obstacle Location”

Reference No. 1.6

Name Determine Dust Existence

Input Dust Existence

Output Final Dust Existence

Process

Description

Reads a digital value of “Dust Existence” and assigns same

digital value Into output variable “Final Dust Existence”

Page 21: System Context Diagram

Data Process SpecificationReference No. 2.1.1

Name Controller

Input Obstacle Location, Dust Existence, Tick

Output If returns Enable: Enable, Cleaner Command

If returns Disable: Disable, Trigger to Turn Left or Turn Right

, Cleaner Command

Process

Description

Reads an analog value of “Obstacle Location” and

“Dust Existence”.

Depends on “Obstacle Location”, it Enable / Disable “Move

Forward” or Trigger “Turn Left / Turn Right / Stop”.

Also, Depends on “Final Dust Existence”, it converts its’ data

to analog value such as On / Off / Up / Down.

Assigns this value into output variable “Cleaner Command”.

Reference No. 2.1.2

Name Move Forward

Input Enable / Disable

Output Motor Command

Process

Description

If triggered, assigns an analog value Forward if triggered

By Enable or Stop if triggered by Disable into output value

“Motor Command”.

Page 22: System Context Diagram

Data Process SpecificationReference No. 2.1.3

Name Turn Left

Input Trigger, Tick

Output Motor Command

Process

Description

If triggered, assigns an analog value Left into output value

“Motor Command”.

Reference No. 2.1.4

Name Turn Right

Input Trigger, Tick

Output Motor Command

Process

Description

If triggered, assigns an analog value Right into output value

“Motor Command”.

Page 23: System Context Diagram

Data Process SpecificationReference No. 2.1.5

Name Stop

Input Trigger, Tick

Output Motor Command

Process

Description

If triggered, assigns an analog value Stop into output value

“Motor Command”.

Reference No. 2.1.6

Name Power

Input Cleaner Power

Output Cleaner Command

Process

Description

Assigns data of Cleaner Power into output variable

“Cleaner Command”.

Page 24: System Context Diagram

Reference No. 2.2

Name Motor Interface

Input Motor Command

Output Direction

Process

Description

Reads data of “Motor Command”.

Converts it to an analog value such as Forward / Left / Right

/ Stop and assigns it into output value “Direction”.

For example, if it reads “Stop” from “Motor Command” from

“Move Forward” and “Stop”(two “Stop” commands),

an analog value “Stop” is assigned into “Direction”

Reference No. 2.3

Name Cleaner Interface

Input Cleaner Command

Output Clean

Process

Description

Reads data of “Cleaner Command”.

Converts it to an analog value such as On / Off / Up / Down

and assigns it into output value “Clean”.

For example, if it reads “On” from “Cleaner Command”,

An analog value “On” is assigned into “Clean”.

Page 25: System Context Diagram

DFD – Level 4

Move

Forward

Turn RightTurn Left

/ Enable “Move Forward”, Cleaner Command(On)

Tick [F && L && !R]

/ Disable “Move Forward”,

Cleaner Command (Off),

Trigger “Turn Right”

Tick

/ Enable “Move Forward”,

Cleaner Command (On)

Tick [F && !L]

/ Disable “Move Forward”,

Cleaner Command (Off),

Trigger “Turn Left”

Tick

/ Enable “Move Forward”,

Cleaner Command (On)

Stop

Tick [F && L && R]

/ Disable “Move Forward”,

Cleaner Command (Off),

State Transition Diagram for Controller 2.1.1

Tick[!F || !L || !R]

/ Enable “Move Forward”,

Cleaner Command (On)

Tick[D]

/ Cleaner Command(Up)

[Motor]

F: Front sensor detects obstacle

L: Left sensor detects obstacle

R: Right sensor detects obstacle

[Cleaner]

D: Dust sensor detects dust

Power

Tick[!D]

/ Cleaner Command(Down)