Create System Model

Bread Crumbs: Home - SW_Dev_Proc - Req Engr - Elicit & Ana Req - Creat Sys Modl

The system model is an abstraction of the system the customer has told you they want. It is important that there is consensus between the project team and the customer regarding the correctness of the system model since requirements will be derived from the system model.

You need to model a system that captures requirements in a clear and easy to understand manner. Since a model is a simplified abstraction of the system under develop, use a generally accepted and understood notation such as the Unified Modeling Language (UML) and resist the urge to include too much detail, especially implementation details. I recommend using UML since it is an industry-standard modeling notation. UML can be used to model the system at a high level using use case diagrams and statechart diagrams. Use case diagrams model the basic usage scenarios that exist between the system under development and the various actors. Statechart diagrams show the valid states in which the system can exist during its execution lifecycle.

Non-UML models that are well-established may also be used to model the system at a high level. Some acceptable, non-UML modeling notations are inheritance modelsstructural models, data-flow models, semantic models, and service usage models.

Use Case Diagram:

A use case diagram depicts the interactions various external entities in the customer's environment will have with they system being modeled. A use case identifies an interaction that must be supported between a given external entity, known as an actor, and the system. A use case is typically labeled as a verb since it is identifying system behavior. An actor is labeled as a noun and is the entity that is requesting some service from the system (or perhaps interacting with the system in some other fashion).

Given the microwave oven example, an actor would be the individual using the microwave to receive some sort of service. That actor is labeled as the "User" in the following diagram. The microwave oven may render a variety of services to the user such as cooking food, defrosting food, acting as a timer, and displaying the time of day. Each of these services is a behavior produced by the system on behalf of the "User" and are thus use cases. The use cases in the diagram below are labeled top-to-bottom as "Cook Food", "Defrost Food", "Set Timer", and "Get Time from Clock".

Microwave Oven Use Case Diagram PNG

Data Dictionary:

Term

Description

Type

Cook Food

The user will use the microwave oven to cook food, so this is a use case.

Use Case

Defrost Food

The user will use the microwave oven to defrost food, so this is a use case.

Use Case

Get Time from Clock

The user will use the microwave oven to get the time of day, so this is a use case.

Use Case

Set Timer

The user will use the microwave oven to set a timer, so this is a use case.

Use Case

User

A user is an external entity that will interact with the microwave oven system. A user is therefore an actor.

Actor

Inheritance Model:

An Inheritance Model models the class taxonomy of a system. The model diagram displays the taxonomy as an upside down tree where going from the top of the inverted tree to the bottom of the inverted tree, the root is the least-derived class in the model and the leaves are the most-derived classes.

Given the microwave oven example, let's model the input data that the microwave oven will use. The microwave oven will have three vectors of input, the door latch sensor, the cooker, and the keypad. The door latch sensor lets the system know whether it's door is open or closed. This is very important in regards to determining what states are valid at any given moment. The cooker component may fail. When it fails, it will likely send some sort of signal to the main controller system to indicate the error. The keypad allows the user to interact with the microwave oven controller system by providing buttons as mechanisms for entering data and function selections.

A simple inheritance model diagram
for the microwave oven example is shown below. This diagram is similar to a UML class diagram, but has less adornments and is therefore more abstract. A UML class diagram includes both "is-a" and "has-a" relationships between data entities whereas an inheritance model exclusively models only "is-a" relationships among the data entities. During the interface design and detailed design part of this process, a UML class diagram can be used to model system classes and their relationship with one another.


Microwave Inheritance Model PNG

Data Dictionary:

Term

Description

Type

amPm

AM or PM selection for setting clock.

Attribute

AutoCookKey

Selects Auto-cook preset function of microwave.

Class

autoCookDuration

Preset cooking duration for cooking a specific item.

Attribute

autoCookLevel

Preset cooking power level for cooking a specific item.

Attribute

AutoDefrost

Automatically sets the heating time and power level for defrosting items.

Class

Beverage

Automatically sets the cooking time and power level for hot beverages.

Class

Clock

Selects clock function of microwave.

Class

CookingDuration

Time duration for cooking.

Class

DoorLatchSensor

Senses if door is opened or closed.

Class

doorStatus

Status indication of door. Either microwave door closed indication or microwave door opened indication.

Attribute

Duration

Time duration for cooking or for running a timer.

Class

failure

Hardware failure indication.

Attribute

FreshVeg

Automatically sets the cooking time and power level for fresh vegetables.

Class

FrozenEntree

Automatically sets the cooking time and power level for frozen entrees.

Class

FunctionKey

Selects operational function of microwave.

Class

functionType

Type of function being processed.

Attribute

HardwareSignal

Senses failure conditions of the hardware components.

Class

hour

Hour component of current time of day (in Hours:Minutes). Used for setting the clock.

Attribute

inputType

Type of input data being processed.

Attribute

KeypadKey

Keypad key / button that enables data input and function selection.

Class

keyType

Type of keypad key / button pressed.

Attribute

keyValue

Integer value associated with the numeric key.

Attribute

level

Power level value with a range of 1 to 9.

Attribute

MicrowaveInput

Root input class for the microwave oven.

Class

minutes

Minutes component of initial timer value (Minutes:Seconds).

Attribute

NumericKey

Inputs integer data to microwave oven system.

Class

Pizza

Automatically sets the cooking time and power level for pizza.

Class

Popcorn

Automatically sets the cooking time and power level for popcorn.

Class

Potato

Automatically sets the cooking time and power level for potatoes.

Class

PowerLevel

Allows operator to set desired power level.

Class

seconds

Seconds component of initial timer value (Minutes:Seconds).

Attribute

Start

Start button starts the cooking operation.

Class

StopClear

Stop/Clear button stops the cooking operation.

Class

Timer

Selects timer function of microwave.

Class

TimerDuration

Specifies how long the timer is to run before sounding audible alarm.

Class

typeOfMeat

Type of meat to be defrosted.

Attribute

weight

Weight of meat to be defrosted.

Attribute



Statechart Diagram:

A statechart diagram models system behavior in terms of the various states a system might have as it responds to stimuli. A statechart diagram is a very important high-level diagram since it clearly describes the behavioral lifecycle of a process.

Returning to the microwave oven example, we know that this particular microwave oven will have three basic modes of operation, or states. Those states are the following: Displaying Time (idle operation), Cooking, Running Timer. The following statechart diagram shows the aforementioned states along with the transitions that occur between those states.

Microwave Oven Statechart Diagram PNG

Data Dictionary:

Term

Description

Type

Cook / Defrost Complete

Cooking / heating cycle has ended.

Transition

Cook / Defrost Start

Cooking / heating cycle has started.

Transition

Cooking

Microwave oven is cooking enclosed item.

State

Displaying Time

The microwave oven is not actively cooking or running the timer.

State

Door Opens

The microwave oven door is unlatched.

Transition

Plug-in Power

The microwave oven is plugged-in to a power source.

Transition

Running Timer

The timer function is running.

State

Stop / Clear

User aborts cooking activity or timer activity.

Transition

Timer Alarms

Timer duration expires normally.

Transition

Timer Start

Timer duration begins to count down.

Transition

Uplug Power

The microwave oven is unplugged from a power source.

Transition


Structural Model Diagram:

A structural model describes "has-a" relationships between various entities in the system. Like the inheritance model diagram, this diagram is similar to a UML class diagram, but has less detail. A UML class diagram models "is-a" relationships in addition to "has-a" relationships among data entities. During the interface design and detailed design activity, a UML class diagram can be created to provide a more detailed model of these entities and there compositional relationships.

For the microwave oven, the KeypadInterface component consists of the following three subcomponents: AutoCookInterface, NumericInterface, and FunctionInterface.
Microwave Oven Structural/Composition Model Diagram PNG

Data Dictionary:

Term

Description

Type

AutoCookInterface

Class that has the following objects all of type AutoCookPresetKey: autoDefrostObject, beverageObject, freshVegObject, frozenEntreeObject, popcornObject, potatoObject, and pizzaObject. This class implements the auto-cook interface.

Class

autoCookInterfaceObject

The instantiation of the AutoCookInterface type.

Attribute

autoDefrostObject

Automatically sets the heating time and power level for defrosting items.

Attribute

beverageObject

Automatically sets the cooking time and power level for hot beverages.

Attribute

clockObject

Selects clock function of microwave.

Attribute

freshVegObject

Automatically sets the cooking time and power level for cooking fresh vegetables.

Attribute

frozenEntreeObject

Automatically sets the cooking time and power level for cooking frozen entrees.

Attribute

FunctionInterface

Class that has the following objects all of type FunctionKey: clockObject, powerLevelObject, startObject, stopClearObject, and timerObject. This class implements the function keys interface.

Class

KeypadInterface

Class that has the following objects: autoCookInterfaceObject : AutoCookInterface, functionInterfaceObject : FunctionInterface, and numericInterfaceObject : NumericInterface. This class implements the numeric keys interface.

Class

NumericInterface

Class that has the following objects: numericKeysObject : NumericKey. This class implements the numeric keys interface.

Class

numericInterfaceObject

The instantiation of the NumericInterface type.

Attribute

numericKeysObject

Inputs integer data to microwave oven system.

Attribute

pizzaObject

Automatically sets the cooking time and power level for cooking pizza.

Attribute

popcornObject

Automatically sets the cooking time and power level for popping popcorn.

Attribute

potatoObject

Automatically sets the cooking time and power level for cooking potatoes.

Attribute

powerLevelObject

Allows operator to set desired power level.

Attribute

startObject

Start button starts the cooking operation.

Attribute

stopClearObject

Stop/Clear button stops the cooking operation.

Attribute

timerObject

Selects timer function of microwave.

Attribute


Data-Flow Model Diagram:

A data-flow model describes how data is processed by the system under development. The flow of data from one stage of processing to the next is shown in a data-flow model.

An microwave oven system will have the following stages of processing:
Now that the different stages of processing have been delineated, we can now model the data flow between these stages of processing by creating a data-flow model as follows:

Microwave Oven Data-Flow Model Diagram PNG

Data Dictionary:

Term

Description

Type

Beeper

Produces a tone when keys are pressed or when a heating process has finished.

System Component

Cooker

This device controls the radiation emitter and accepts control signals from the PIMCP.

System Component

Cooking On / Off

Cooking status data that is sent as output from the PIMCP process and becomes input to PIPPSOL process for conversion into LCD format. It indicates the current cooking status of the oven which is either on or off.

Intermediate Output

Cooking Time

A partially processed input that specifies the amount of time a food item will be heated. This is set either manually by the user or automatically when the user selects a preset function.

Processed Input

Door Signal

Binary code from the door sensor.

Input

End Signal

Binary code sent to the beeper component that commands the beeper to produce the audible alarm indicating the end of the cooking cycle.

Output

Failure

A partially processed input that indicates a hardware failure.

Processed Input

Get Door Input

The microwave oven system accepts signals from the oven door sensors which are processed to determine whether the microwave door is opened or closed.

Process

Get Keypad Input

The microwave oven system accepts signals from the keypad which are processed to determine the user’s selections.

Process

Get Hardware Signal

The microwave oven system accepts hardware signals from various hardware components which are processed to produce failure codes for display.

Process

Hardware Failure Code

This code data is derived from hardware component failure signals and is sent to the PIPPSOL for display processing.

Intermediate Output

Hardware Signal

Binary code from hardware component.

Input

Key Press Signal

Binary code sent to the Beeper that indicates a keypad key was pressed.

Output

Key Code

Binary code from the keypad.

Input

LCD

The LCD (Liquid Crystal Display) displays input and output messages.

System Component

Off Signal

Binary code sent to the cooker component that commands the cooker component to turn off.

Output

On Signal

Binary code sent to the cooker component that commands the cooker component to turn on.

Output

Open / Close

A partially processed user input that indicates the current status of the microwave door as to whether it is open or closed.

Processed Input

PIMCP

The Process Inputs and Monitor Cooking Processes (PIMCP) process accepts and processes input from the keypad, door sensor, and cooking device input processing processes. The PIMCP also controls and monitors cooking processes.

Process

PIPPSOL

The Process Inputs from PIMCP Process and Send Ouput to LCD (PIPPSOL) process accepts and processes input from the PIMCP process and sends output data to the LCD for display.

Process

Power Level

A partially processed input that specifies the power level selected by the user.  Power Level is set manually by the user or through a preset function.

Input

Power Level Data

Power level data is sent as output from the PIMCP process and becomes input to PIPPSOL process for conversion into LCD format.

Intermediate Output

Power Level Signal

Binary code sent to the cooker component that commands the cooker component to cook at the specified level of power.

Output

Start

A partially processed user input that signals that a heating process should begin.

Processed Input

Stop/Clear

A partially processed user input that signals that a heating process should be stopped and/or a cooking time should be cleared from memory.

Processed Input

Time Remaining

Time remaining data is sent as output from the PIMCP process and becomes input to PIPPSOL process for conversion into LCD format. This data is the amount of time remaining for the currently active cooking cycle.

Intermediate Output

User Selections and Operating Status

The User Selections and Operating Status data packet is sent to the LCD component for display as an output from the PIPPSOL process.

Output


Semantic Data Model Diagrams:

A semantic data model describes the basic data containers (along with their attributes) the system will need. A semantic data model also describes the relationships these data containers will have with one another. A semantic data model diagram is nearly equivalent to a UML class model diagram of the same scope and level of detail.

Returning again to the microwave oven system example, let's consider the various types of data a microwave oven must process.  Some brainstorming regarding the types of data that are part of a microwave oven follow:

A microwave oven system will have the following data inputs:

A microwave oven system will have the following data outputs:
The keypad will produce the following types of data:
The door latch sensor will produce door status data.
The hardware components will produce failure signals when hardware failures occur.

Now that the data inputs and outputs have been delineated, we can now begin our modeling of these entities along with their relationships to one another.  The Semantic model is used to model these data entities and it follows:

Microwave Oven Semantic Model Diagram - 1 PNG

Microwave Oven Semantic Model Diagram - 2 PNG

Microwave Oven Semantic Model Diagram - 3 PNG

Microwave Oven Semantic Model Diagram - 4 PNG

Data Dictionary:

Term

Description

Type

amPm

Contains the time-of-day integer antemeridiem / postmeridiem value.

Attribute

autoCookDuration

Contains the time period value for the amount of time the cooker component is to cook.

Attribute

AutoCookInterface

This interface contains all of the AutoCookPresetKey entities.

Entity

autoCookPowerLevel

Contains the power level of the cooker component.

Attribute

AutoCookPresetKey

Parent entity to the following AutoCookPresetKey-derived entities: Popcorn, Potato, Beverage, Pizza, FrozenEntree, FreshVeg. Manufacturer defined presets for heating common food items.

Entity

AutoDefrost

Derived from the AutoCookPresetKey entity. Key used to set power level and time for defrosting frozen food items.

Entity

BeeperInterface

Derives from OututInterface and provides communication with beeper component.

Entity

beepTypeSignal

Contains the style of audible alarm to be sounded.

Attribute

Beverage

Derived from the AutoCookPresetKey entity. Automatically sets the heating time and power level for hot beverages.

Entity

Clock

Derived from the FunctionKey entity. Key used in conjunction with numeric keys to set the clock.

Entity

commandSignal

Contains the specified command for the cooker component.

Attribute

CookerInterface

Derives from OutputInterface and provides communication with the cooker component.

Entity

displayData

Contains the data to be displayed on the LCD screen.

Attribute

DoorInterface

Derives from InputInterface and contains data from the door latch sensor

Entity

doorStatus

Status input from door latch sensor.

Attribute

failure

Failure indication from cooker component (if failure occurs).

Attribute

FreshVeg

Derived from the AutoCookPresetKey entity. Automatically sets the heating time and power level for fresh vegetables.

Entity

FrozenEntrée

Derived from the AutoCookPresetKey entity. Automatically sets the heating time and power level for frozen entrees.

Entity

FunctionInterface

This interface contains all of the FunctionKey entities.

Entity

FunctionKey

Part of the FunctionInterface. Allows execution of functions such as PowerLevel, Program, AutoDefrost, Stop/Clear, Start, Clock, and Timer.

Entity

functionType

Contains the type of function.

Attribute

HardwareSignalInterface

Derives from InputInterface and provides communication with hardware components.

Entity

has:1

A single DoorInterface entity has a single LatchSensor entity.

Relation

has:2 – has:4

A single KeypadInterface entity has a single instance of each of the following entities: AutoCookInterface, NumericInterface, and FunctionInterface.

Relation

has:5 – has:B

A single AutoCookInterface entity has a single instace of each of the following entities: Popcorn, Potato, Beverage, Pizza, FrozenEntree, FreshVeg.

Relation

has:C

A single NumericInterface entity has multiple NumericKey entities.

Relation

has:D – has:H

A single FunctionInterface entity has a single instace of each of the following entities: PowerLevel, AutoDefrost, Stop/Clear, Start, Clock, and Timer.

Relation

hour

Contains the time-of-day integer hour value.

Attribute

InputInterface

Parent entity to the following InputInterface-derived entities: DoorInterface, CookerInterface, KeypadInterface.

Entity

inputType

Type of interface data.

Attribute

is-a:1 - is-a:3

The DoorInterface, CookerInterface (input), and KeypadInterface are all entities derived from the InputInterface entity.

Relation

is-a:4 - is-a:A

Popcorn, Potato, Beverage, Pizza, FrozenEntree, and FreshVeg, and AutoDefrost are all entities derived from the AutoCookPresetKey entity.

Relation

is-a:B - is-a:D

BeeperInterface, LcdInterface, and CookerOutputInterface are all entities derived from the OutputInterface entity.

Relation

is-a:E - is-a:I

PowerLevel, AutoDefrost, Stop/Clear, Start, Clock, and Timer are all entities derived from the FunctionKey entity.

Relation

KeypadInterface

Derives from InputInterface.  KeypadInterface has a single instance of each of the following entities: AutoCookInterface, NumericInterface, FunctionInterface.

Entity

keyType

Contains the type of interface to which a given key belongs.

Attribute

keyValue

Contains the integer value of the numeric key.

Attribute

LatchSensor

Senses whether or not door is open.

Entity

LcdInterface

Derives from OutputInterface and provides communication with LCD.

Entity

level

Contains the integer value of the selected level of power for the cooker component.

Attribute

minute

Contains the time-of-day integer minute value.

Attribute

minutes

Contains the timer integer minutes value that specifies the number of minutes.

Attribute

NumericInterface

This interface contains all of the NumericKey entities.

Entity

NumericKey

Part of the NumericInterface. Keys are numbered 0-9 for manually entering numeric values used for setting the clock, the timer, the power level, and the cooking time.

Entity

OutputInterface

Parent entity to the following OutputInterface-derived entities: BeeperInterface, LcdInterface, CookerInterface.

Entity

outputType

Type of interface data.

Attribute

Pizza

Derived from the AutoCookPresetKey entity. Automatically sets the heating time and power level for pizza.

Entity

Popcorn

Derived from the AutoCookPresetKey entity. Automatically sets the heating time and power level for microwave popcorn

Entity

Potato

Derived from the AutoCookPresetKey entity. Automatically sets the heating time and power level for one potato.

Entity

PowerLevel

Derived from the FunctionKey entity. Key used in conjunction with numeric keys to change power level.

Entity

seconds

Contains the timer integer seconds value that specifies the number of seconds.

Attribute

Start

Derived from the FunctionKey entity. Key used to begin a cooking process.

Entity

Stop/Clear

Derived from the FunctionKey entity. Key used to stop a cooking process and/or clear a heating time.

Entity

Timer

Derived from the FunctionKey entity. Key used in conjunction with numeric keys to set the timer.

Entity

typeOfMeat

Type of meat to be defrosted.

Attribute

weight

Weight of meat to be defrosted.

Attribute


Service Usage Model:

Service usage models describe the services used by objects in the system. In this case, the objects would include the user as well as the food items being prepared by the user.  The services include the features and options offered by the microwave unit.

The following service usage model diagram applies to the microwave oven example:

Microwave Oven Service Usage Model Diagram PNG

Data Dictionary:

Term

Description

Type

User

Individual using microwave.

Object

Food Item

Item to be prepared by user.

Object

Auto Cook

Auto Cook service includes auto cook preset functions.

Service

Power

Allows user to manually set power level.

Service

Timer

Allows user to manually set the microwave timer.

Service

Custom Cook

Custom Cook service includes manual power and timer functions. Allows user to heat food items not included in auto cook presets.

Service

Clock

Allows user to manually set the time displayed on the microwave clock.

Service


Now that the problem domain has been modeled, requirements can now be derived from these system models.

No part of this work should be produced or used without the permission of the authors: Michael Turner and Dr. Sharon A White.