0% found this document useful (0 votes)
18 views35 pages

Data Modeling For Systems Engineering - 60m

Uploaded by

Miguel Martínez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views35 pages

Data Modeling For Systems Engineering - 60m

Uploaded by

Miguel Martínez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 35

Data Modeling for Systems

Engineering
Bruce Powel Douglass, Ph.D.
Chief Evangelist, IBM IoT
www.bruce-douglass.com
Twitter: @IronmanBruce

© 2019 IBM Corporation


What is Data Modeling?
▪ System engineering models have six primary categories of information:
− Functionality, viewed via
• Use cases
• Requirements diagrams
− Behavior, viewed via
• State machines
• Activity diagrams
• System functions (actions)
− Interactions, viewed via
• Sequence diagrams Although we will talk about “data
• Collaboration diagrams (UML only) modeling”, we also mean the
• Timing diagrams (UML only) specification of flows of various
− Structure, viewed via kinds, including discrete and
• Block Definition Diagrams
continuous flows, and flows of
• Internal Block Diagrams
information, fluids, forces, materials,
− Parametric constraints, viewed via
and energy.
• Parametric diagrams
− Data and flow, viewed via
• Block Definition Diagrams

© 2019 IBM Corporation


2
What is Data Modeling?
▪ A data model is a description or specification of information represented within a model
▪ The usage of the data shows up in other views:
− Behavior
• State machine:
• Parameters on events,
Event parameters
• Change events

Change event

© 2019 IBM Corporation


3
What is Data Modeling?
▪ A data model is a description or specification of information represented within a model
▪ The usage of the data shows up in other views:
− Behavior
• Activity diagram:
Object node
• Object store,
• Pins,
• Activity parameters

Activity parameter

Action pin

© 2019 IBM Corporation


4
What is Data Modeling?
▪ A data model is a description or specification of information represented within a model
▪ The usage of the data shows up in other views:
− Interactions
• Sequence diagrams
Message parameter
• Parameters on messages
• Flows

Operation argument

Flow

© 2019 IBM Corporation


5
What is Data Modeling?
▪ A data model is a description or specification of information represented within a model
▪ The usage of the data shows up in other views:
− Structure
• Block Definition Diagram:
Value properties (attributes)
• Value properties of blocks and interface blocks,
• Parameters on operations and event receptions
• Data flow
• Variables
Operation
• Types parameters

Flow Properties

Flow

© 2019 IBM Corporation


6
Data Schema
▪ The data schema is the definition of the data and its properties that are used in the model,
along with its relation to other data elements
▪ Logical data schemas focus on the logical properties of data elements and ignore physical
representation and types
− Most of systems engineering uses logical data schemas
▪ Physical data schemas include physical implementations of data elements down to the
byte and bit level.
− At the hand off to downstream engineering, physical data schemas must be derived
from logical data schemas
▪ Data schemas are usually visualized in class diagrams (UML) or Block Definition Diagrams
(SysML). These generally show
− Compound types (classes or blocks)
− Scalar values (attribute or value properties)
− Compound values (may be typed value properties or associations to blocks)
− Custom types (including enumerations)
− Custom dimensions
− Custom units

© 2019 IBM Corporation


7
Systems data models specify
▪ Information “known by” the system
▪ Interfaces, defined, in part, by
− Information and flows to the system from actors
− Information and flows from the system to the actors
− Between architectural elements of the system (e.g. subsystems)
▪ Non-information flows
− Materiel
− Energy
− Fluids

▪ These data elements must be specified in terms of


− Acceptable values
− Unacceptable values
− Precision
− Accuracy
− Fidelity
− Timeliness
− Availability
− …
© 2019 IBM Corporation
8
Where to I put the Data Schemas in my Model?
▪ In the Harmony aMBSE process, logical data schemas are located in
− Functional analysis
• Each use case has its own nested package for the data defined and used in it’s
“sandbox”
− Architecture
• The InterfacesPkg package contains a nested package
DataTypesPkg
• This comes from merging the data schemas from the
use case “sandboxes”
▪ Physical Schemas are located
− Hand off
• Shared model

© 2019 IBM Corporation


9
Block (or Class) versus Type
▪ A Block (or Class) defines a type, so when should I use a block and when should I use a type?
▪ Use a block
− For structured (composite) data, that is data that is composed on multiple subparts
− When there is important behavior associated with the datum, since blocks combine values
and behavior into coherent elements
▪ Use a type or value type
− For scalars, that is, single valued data
− When the primary behavior is limited to
“set” and “get”

Note: yes you can define a type as being


structured, but we recommend that you use
blocks for structured data. Here are the
supported kinds of types:

© 2019 IBM Corporation


10
Array Attributes or Composition?
▪ Arrays are used for collections of multiple parts of the same type
▪ Recommendation: use composition relation for collections of compound types (blocks)
▪ Recommendation: use multiplicity on attributes for collections of scalar types

• Use * multiplicity for an unknown (but multiple) multiplicity


• Use a fixed number when it is known and unchanging
• Rhapsody generates an array for fixed multiplicity but
generates code for a container (e.g. list) for *
© 2019 IBM Corporation
11
Array Attributes or Composition?
▪ Recommendation: use multiplicity on attributes for collections of scalar types

© 2019 IBM Corporation


12
Array Attributes or Composition?
▪ Recommendation: Don’t attributes with multiplicity for collections of compound types

Preferred

© 2019 IBM Corporation


13
Array Attributes or Composition?
▪ Recommendation: Don’t use C++ declarations in a systems model (maybe ok for a SW model)

© 2019 IBM Corporation


14
Data Type vs Value Type
▪ While UML has DataType, SysML adds ValueType. When should I use which one?
− UML defines DataType but SysML stereotypes it to create ValueType to provide a
“information-kind neutrality”. It also adds the ability to add Dimensions and Units as tags.
▪ Answer: It kind of doesn’t matter, but it’s nice to have a consistent usage in a model.

Defining an enumerated type


Defining a useful constant for a timeout

© 2019 IBM Corporation


15
Value Types in SysML
▪ SysML provides a small set of pre-defined value types.
▪ SysML profile adds the SysML value types not already provided by UML primitive types

Rhapsody built-in types

Rhapsody SysML Value Types

© 2019 IBM Corporation


16
Types versus Dimensions versus Units
▪ To avoid your spaceship from hitting Mars because one team used kilometers and the other
used miles, it is always better to use units than types (unless the value is unit-less)
− Distance = 3000; // so how far away am I?
▪ Definitions
− Types specify value sets but not the units or dimensions in which they are specified
(integer, complex, or real?)
− Dimensions specify the kind of value but not the units (are these angles or temperatures?)
− Units specify a standard against which elements of the same dimension can be compared
(angles in degrees or radians?)
Are specified in
Contain Value comparable ways by
Blocks Units
Properties
Standardize the kind of
values specified by

Dimensions

Represented by

Types
© 2019 IBM Corporation
17
Types versus Dimensions versus Units
▪ The SysML defines a set of dimensions and units that you can use, but you can always
define your own
▪ As an alternative, you can add a tagged value that specifies the unit

Value property Unit Dimension

Kind of type Realizing type

© 2019 IBM Corporation


18
SysML SID Definitions Model Library
Selecting a unit from the SysML SID Definitions Library

© 2019 IBM Corporation


19
Flow Properties
▪ SysML defines a flow property as a single flow element to/from a block.
− Flow properties have direction. In Rhapsody, they must be stereotyped as
«directedFeatures» to be used in interface blocks

Flow property

Event receptions

Use flow properties for values flowing through


interface blocks and to/from blocks
Use value properties for data owned by blocks

© 2019 IBM Corporation


20
Meter Reader
▪ A meter reader is being planned that monitors water usage for homes. It may be interrogated wirelessly
and can identify the account number and street address of the home being monitored. It tracks water
usage as
− Total monthly flow (midnight 1st of the month to end of the month)
− Total daily flow (midnight to midnight)
− Hourly flow for each hour of the day
− 1 minute flow for each minute of the data
− Current flow – which may be broadcast every 1s when connected to a data client along with the time
of measurement (with ms accuracy)
− Except for current flow, all flow data is to be kept for some configurable number of days from 30-1000
days (default 180)

© 2019 IBM Corporation


21
Answer: Meter Reader

© 2019 IBM Corporation


22
Answer: Meter Reader

© 2019 IBM Corporation


23
Metadata
▪ It is not enough to just name the data elements and give them types. Information about the
data (metadata) is also required. Properties relevant to systems engineering data include
(but are not limited to)
− Extent (range (for continuous types) or acceptable values (for discontinuous types))
− Units (unless specified by the underlying type)
− Precision
− Fidelity
− Accuracy
− Confidence
− Maximum latency (how old can the data be before it is received?)
− Availability
− Space complexity (size, for physical schema only)
− Byte layout (interpretation of byte values, for physical schema only)
− Bit layout (interpretation of bit values, for physical schema only)

© 2019 IBM Corporation


24
Precision, Fidelity, and Accuracy: What the terms mean

Precision: Accuracy:
the degree of refinement in a the degree to which the result of a
measurement, calculation, or measurement, calculation, or
specification specification conforms to the correct
value or a standard

Fidelity:
the degree of exactness with
which something is reproduced or
copied

© 2019 IBM Corporation


25
Precision, Fidelity, and Accuracy: How we actually use the
terms

Precision: Accuracy:
Number of digits that are actually The precision of the output of the
known to be valid system and how well that output
conforms to the specification
expressed
in the precision

Fidelity:
The precision of an input to the
system

© 2019 IBM Corporation


26
Precision, Fidelity, and Accuracy: How we actually use the
terms
Precision:
The level of detail to which
information is stored, processed
and managed

Accuracy:
Fidelity:
The degree of conformance of the
The degree of control of the input
output to the desired value

© 2019 IBM Corporation


27
Subranges and value constraints
▪ Few implementation languages provide true subranges, such as in Ada for example
− subtype FingerCount is Integer;
FingerCount: Integer 0 .. 10;
subtype DegreesOfArc is Real range 0.0 .. 360.0;
▪ Or precision constraints, for example
− type My_Long_Float is digits 11;
▪ So how do we do this in a model?
▪ Answer: Stereotypes and tagged values
block Value property Stereotype

Stereotype tags

Stereotype definition

© 2019 IBM Corporation


28
Metadata
▪ The Harmony aMBSE profile contains a «qualified» stereotype that provides some of these
properties as tagged values.
▪ The «qualified» stereotype is usually applied to value properties but may be applied to
− Attributes
− Arguments
− Types
− Value Properties

All input or output numeric


values in the systems
model should be qualified

© 2019 IBM Corporation


29
Example: Aircraft Navigation
▪ An aircraft keeps track of its orientation in 3-space (attitude) in terms of roll, pitch and yaw.
It also tracks its position in terms of latitude, longitude, and altitude. These values are both
commanded and measured. Airspeed, ground speed in all directions is also tracked, as is
acceleration and jerk (the time derivative of acceleration). For smooth flight control, data
must not be older than 0.1 seconds from measurement to being received.
▪ The aircraft maintains both a commanded and measured flight data set, which is a
composition of all the above values.

▪ A flight path consists of a set of waypoints, each of which is described by a flight property
set.

▪ Step 1: Create the blocks, value properties and their relations on a block definition diagram

▪ Step 2: Add the types, dimensions, and units, as appropriate

▪ Step 3: Add the metadata as appropriate

© 2019 IBM Corporation


30
Navigation Answer: Step 1

© 2019 IBM Corporation


31
Navigation Answer: Step 2

© 2019 IBM Corporation


32
Navigation Answer: Step 3

© 2019 IBM Corporation


33
Navigation Answer : Step 3

© 2019 IBM Corporation


34
Download Papers, Presentations, Models, & Profiles for Free

www.bruce-douglass.com

© 2019 IBM Corporation


35

You might also like