modeling structure with sysml blocks · roots & relations 5 engineers draws blocks from the...

52
Budapest University of Technology and Economics Department of Measurement and Information Systems Modeling Structure with Blocks in SysML Critical Embedded Systems Dr. Balázs Polgár Prepared by Budapest University of Technology and Economics Faculty of Electrical Engineering and Informatics Dept. of Measurement and Information Systems © All rights reserved. This material can only used by participants of the course.

Upload: dangdiep

Post on 16-Aug-2019

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

Budapest University of Technology and Economics Department of Measurement and Information Systems

Modeling Structure with Blocks in SysML

Critical Embedded Systems Dr. Balázs Polgár

Prepared by Budapest University of Technology and Economics Faculty of Electrical Engineering and Informatics Dept. of Measurement and Information Systems

© All rights reserved.

This material can only used by participants of the course.

Page 2: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

System Modeling Process

2

Page 3: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

Block Definitions

Block Definition Diagrams

3

Page 4: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

What is it about?

Context of the Modeling Aspect

4

Page 5: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

Roots & Relations

5

Engineers draws blocks from the beginning

o By hand or with CAD tools

o Many formats

• e.g. Entity-relationship diagram

Page 6: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

Block Definition Diagram

6

Page 7: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

Modeling Aspect

What are the building blocks? What are their relations in general?

7

Page 8: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

Objectives

Define component types

o Support organization into taxonomy (generalization)

Define data model

Define system decomposition

Define interfaces and ports

8

Page 9: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

Example – System Context

9

Page 10: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

Example - Signals

10

Page 11: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

Example – Component definition

11

Page 12: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

Example – System Decomposition

12

Page 13: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

Example – Interfaces and Ports

13

Page 14: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

Example – System Context with Ports

14

Page 15: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

Relations to other aspects

Realizes requirements

Provides types for parts & ports

Executes actions

Defines participants in collaborations

Provides context for state machines

15

Page 16: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

Realizes requirements

16

Page 17: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

Provides types for parts & ports

17

Page 18: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

Executes actions

18

Page 19: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

Defines participants in collaborations

19

Page 20: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

Provides context for state machines

20

Page 21: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

What are the building blocks?

Modeling Elements & Notation

Page 22: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

Essential Elements of Block Definition Diagrams

Nodes

o Block nodes

o Signals

o Value Type, Quantity Kind and Unit

o Enumeration nodes

o Actor nodes

Paths

Ports and Flows

Constraint blocks

Page 23: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

Block nodes

Basic structural elements, that describe the structure of the system

Compartments o Property types (e.g. parts,

properties, references, values)

o Behavioral (e.g. operations)

o Constraints

Describe o (Sub)Systems – Hardware /

Software / Data

o Person

Page 24: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

Signal

A signal is a specification of send request instances communicated between objects.

The receiving object handles the received request instances as specified by its receptions.

The data carried by a send request (which was passed to it by the send invocation occurrence that caused that request) are represented as attributes of the signal.

A signal is defined independently of the classifiers handling the signal occurrence.

24

Page 25: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

Value Type, Quantity Kind and Unit Uniform definition of a quantity Value Type

o Data type, that can have Unit and QuantityKind nodes o Type for value properties in blocks

Quantity Kind o Identifies a physical quantity

Unit o Describes the structure of a physical unit – the unit of measure o Must be related to a Quantity Kind

Page 26: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

Enumeration and Actor nodes

Enumeration

o Defines a type, the value range of which is a limited set of named values, called literals.

Actor

o Represents any stakeholder (human, organisation or external system) that participates in the use of the system

Page 27: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

Defining Paths between Blocks

Paths

o Part Association

o Shared Association

o Reference Association

o Association Class

o Generalization

o Dependency

Page 28: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

Part Association

Specifies a strong whole-part hierarchy

o From a composite

o To a composite part

Denoted with a black diamond on the whole end

Role name on the part end

Can be directed or undirected

Page 29: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

Shared Association

Specifies a weaker whole-part hierarchy

o "Shared" indicates, that the whole part is not the only one, it can be more of it

o The parts are not owned by the whole part

Denoted with an empty diamond

Page 30: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

Reference Association

Represents a relationship between two blocks

o Undirected: reference in both blocks

o Directed: reference only in one block

Can have properties

o Multiplicity

o Name

o Reference on both sides

Page 31: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

Association Class

Describes the structural properties of an association

Combination of

o Association

o Block

Page 32: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

Generalization

Specifies an object oriented relationship between a more general block and a more specific one (ISA relationship)

Denoted with a closed arrowhead from the specific block to the general one

Page 33: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

Dependency

Between two elements

One element needs the other element for its

o Specification

o Implementation

Almost between any model elements

Page 34: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

Defining Ports and Flows

Port

Flow Property

Interface

Page 35: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

Port

Port

o Interaction points at which external entities can be connected

o Limits and differentiates the possible connection types

o Defines the available features (e.g. properties, operations)

o More denotation alternative

Page 36: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

Flow Property

Specifies the possible types of flowing items on a port

o Part of flow specification

oWhat "can" flow?

• Data

• Material

• Energy

• …

Page 37: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

Flow Item

Specifies what flows between the blocks

o What "does" flow?

Page 38: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

Interfaces

Definition An interface declares a set of public features and obligations that constitute a coherent service offered by a classifier. o An interface specifies a contract; any instance of a classifier that

realizes the interface must fulfill that contract.

38

Interface

Interface realization

Implementing block

Page 39: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

Interface

Specifies the behavioral features of a block

o Provided interface

• A service is provided by the block for its environment

• Denoted with a lollipop / ball symbol

o Required interface

• The set of the operations is required by the block for its operation.

• Denoted with a socket symbol

Page 40: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

Defining Constraint Blocks

Constraint Block node

o Specify a network of constraints to

• Constrain the physical properties of the system

• Identify critical performance paramaters

o Constraints represent mathematical expressions

• F = m*a

• a = dv / dt

Page 41: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

Block Usage

Internal Block Diagrams

41

Page 42: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

What is it about?

Context of the Modeling Aspect

42

Page 43: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

Block Definition Diagram

43

Page 44: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

Modeling Aspect

How are components used in a given context or system?

44

Page 45: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

Objectives

Define how components are interacting with each other within a given system

o Define relations

o Define data flow

o Define interfaces

45

Page 46: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

BDD vs. IBD

Block Definition vs. Usage

o Block diagram Definition of the structure

o Internal block diagram Usage of this structure in different contexts

46

Page 47: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

Relations to other aspects

Interpreted in the context of a block

Defines usage of blocks

Item flows can be mapped to object flows in activities

47

Page 48: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

What are the building blocks?

Modeling Elements & Notation

Page 49: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

Defining Blocks - 1

Nodes

o The instances of the nodes from the related block diagram (Part properties)

o Can have a unique name with type indication

o Can also be nested into more levels

Page 50: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

Defining Blocks - 2

Paths

o The properties can be connected to each other with

• Unidirectional Connector

• Bidirectional Connector

o Connectors are the instances of the associations

o Can have multiplicity on both ends

Page 51: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

Defining Ports and Flows

Ports are to define the interaction points of the part property

Flows are to specify the items that flow across a connector

Both are understanded in a particular context

51

Page 52: Modeling Structure with SysML Blocks · Roots & Relations 5 Engineers draws blocks from the beginning oBy hand or with CAD tools oMany formats •e.g. Entity-relationship diagram

Summary

Block Definition Diagram

o What are the elements of the system?

Internal Block Diagram

o How are elements within a system relates to each other?

52