SlideShare a Scribd company logo
1 of 35
Business Informatics Group
Institute of Software Technology and Interactive Systems
TU Wien
Favoritenstraße 9-11/188-3, 1040 Vienna, Austria
phone: +43 (1) 58801 - 18804 (secretary), fax: +43 (1) 58801 - 18896
office@big.tuwien.ac.at, www.big.tuwien.ac.at
Business Informatics Group
Adding Uncertainty and Units to Quantity Types
in Software Models
Tanja Mayerhofer, Manuel Wimmer
Business Informatics Group, TU Wien, Austria
Antonio Vallecillo
Atenea, Universidad de Málaga, Spain
Tanja Mayerhofer
Motivation
Uncertainty and Units in Engineering Disciplines
 Engineers naturally think about uncertainty associated with measured values
and units of values
 Examples
 A machinist estimates that the length of a produced part lies with probability 0.5
in the interval [10.07 mm, 10.15 mm]
 A calibration certificate states that with 99 percent confidence the resistance of
a standard resistor is 10.000742 Ω ± 129 μΩ
 Uncertainty and units are explicitly defined in models and considered in
model-based simulations
2
phi.start = 0 rad (rotation angle)
w.start = 10 rad/s (angular velocity)
(Coupled Clutches Example of Modelica Standard Library)
Uncertainty and Units in Software Engineering
 Very limited support for representing uncertainty and units in software models
 No support for considering such properties in model-based simulations
Problem
 Movement towards cyber-physical systems demands for the accurate
representation of properties of physical entities in software models
 Important future application domain: Internet of Things
 Analysis of huge amount sensor data
Motivation
3
Measure
value : Real
What kind of value is measured?
In which unit is the value measured?
What is the uncertainty of the
measurement method?
Contributions
1. Type system for representing measurement uncertainty and units
 Kernel representation for quantities
2. Algebra of operations for performing computations with uncertain data
and units
 Computational kernel for computing quantities
3. Implementations for Java, OCL, UML
4
Quantities
Definition: Quantity Kind (Dimension)
 Any observable property of any object that can be measured and quantified
numerically.
 Examples: Length, mass, time, force, energy, power, electric charge
Definition: Quantity
 Observable property of a particular object that can be measured and
quantified numerically.
 Examples: Length, mass, speed, temperature of a particular object
Definition: Quantity Value
 Magnitude of a quantity expressed as a product of a number and a unit.
 Example: Velocity of 3.5 m/s
5
Units and Dimensions Systems of Units
International System of Units (SI)
 Base dimensions: Length, Mass, Time, Electric Current, Thermodynamic
Temperature, Amount of Substance, Luminous Intensity
 Base units: Meter (m), Kilogram (kg), Second (s), Ampere (A), Kelvin (K), Mole
(mol), Candela (cd)
 Derived dimensions: 90 dimensions derived from the base dimensions
e.g., Area, Volume, Velocity
 Derived units: 90 units derived from the base units
e.g., Square Meter (m²), Cubic Meter (m³), Meter per Second (m/s)
Other Systems of Units
 Centimeter-Gram-Second System (CGS)
 Imperial System
 United States Customary System (USCS, USC)
6B. N. Taylor and A. Thompson. The International System of Units (SI). NIST, 2008. http://www.nist.gov/pml/pubs/sp811/.
Units and Dimensions Representation of Units
 Any unit can be derived from the base units:
𝐵1
𝑒1
∗ 𝐵2
𝑒2
… 𝐵𝑛
𝑒 𝑛
where 𝐵𝑖 represents a base unit and 𝑒𝑖 its exponent
 Hence, any unit can be defined by the exponents 𝑒𝑖 of the base units:
𝑒1, 𝑒1, … , 𝑒 𝑛
 Examples
7
𝑀𝑒𝑡𝑒𝑟 𝑚 = 𝑚1 ∗ 𝑘𝑔0 ∗ 𝑠0 ∗ 𝐴0 ∗ 𝐾0 ∗ 𝑐𝑑0 ∗ 𝑚𝑜𝑙0 ∗ 𝑟𝑎𝑑0 = 1, 0, 0, 0, 0, 0, 0, 0
𝑆𝑞𝑢𝑎𝑟𝑒 𝑀𝑒𝑡𝑒𝑟 𝑚2
= 𝑚2
∗ 𝑘𝑔0
∗ 𝑠0
∗ 𝐴0
∗ 𝐾0
∗ 𝑐𝑑0
∗ 𝑚𝑜𝑙0
∗ 𝑟𝑎𝑑0
= 2, 0, 0, 0, 0, 0, 0, 0
𝑀𝑒𝑡𝑒𝑟 𝑝𝑒𝑟 𝑆𝑒𝑐𝑜𝑛𝑑 𝑚/𝑠 = 𝑚1 ∗ 𝑘𝑔0 ∗ 𝑠−1 ∗ 𝐴0 ∗ 𝐾0 ∗ 𝑐𝑑0 ∗ 𝑚𝑜𝑙0 ∗ 𝑟𝑎𝑑0 = 1, 0, −1, 0, 0, 0, 0, 0
R. Hodgson, P. J. Keller, J. Hodges, and J. Spivak. QUDT – Quantities, Units, Dimensions and Data Types Ontologies.
TopQuadrant, Inc. and NASA AMES Research Center, 2014. http://qudt.org/.
Units and Dimensions Conversion Between Units
 Conversion of quantity values from base units 𝐵𝑖 to derived units 𝐷𝑖
 Multiply the numerical value of the quantity value with conversion factor 𝑐𝑓
 Add an offset 𝑜 to the resulting numerical value
 Definition: 𝑥 𝐷𝑖 = (𝑥 ∗ 𝑐𝑓𝑖 + 𝑜𝑖) 𝐵𝑖
 Examples:
 Conversion factors and offsets can be defined relative to the base units:
𝑐𝑓𝑖: 𝑐𝑓1, 𝑐𝑓1, … , 𝑐𝑓𝑛 , 𝑜𝑖: 𝑜1, 𝑜2, … , 𝑜 𝑛
 Examples:
8
𝐾𝑖𝑙𝑜𝑚𝑒𝑡𝑒𝑟 𝑘𝑚 : 𝑐𝑓 = 1000, 1, 1, 1, 1, 1, 1, 1 , 𝑜𝑓 = 0, 0, 0, 0, 0, 0, 0, 0
𝐶𝑒𝑙𝑐𝑖𝑢𝑠 °𝐶 : 𝑐𝑓 = 1, 1, 1, 1, 1, 1, 1, 1 , 𝑜𝑓 = 0, 0, 0, 0, 273.15, 0, 0, 0
𝐾𝑖𝑙𝑜𝑚𝑒𝑡𝑒𝑟 𝑝𝑒𝑟 𝐻𝑜𝑢𝑟 𝑘𝑚/ℎ : 𝑐𝑓 = 1000, 1, 3600, 1, 1, 1, 1, 1 , 𝑜𝑓 = 0, 0, 0, 0, 0, 0, 0, 0
𝑥 𝑘𝑚 = 𝑥 ∗ 1000 + 0 𝑚
𝑥 °𝐶 = (𝑥 ∗ 1 + 273.15) K
𝑥 𝑘𝑚/ℎ = (𝑥 ∗
1000
3600
+ 0) m/s
Units and Dimensions Model-Based Representation
 Domain Model
 Example Instances
9
Unit
name : String
symbol : String
dimensions : Real [8]
conversionFactor : Real [8]
offset : Real [8]
m : Unit
name = "Meter"
symbol = "m"
dimensions = <1,0,0,0,0,0,0,0>
conversionFactor = <1,1,1,1,1,1,1,1>
offset = <0,0,0,0,0,0,0,0>
km/h : Unit
name = "Kilometer per Hour"
symbol = "km/h"
dimensions = <1,0,-1,0,0,0,0,0>
conversionFactor = <1000,1,3600,1,1,1,1,1>
offset = <0,0,0,0,0,0,0,0>
Measurement Uncertainty Representation of Uncertainty
 It is impossible to know, estimate or measure values with complete precision
 The value of a quantity is only complete when it is accompanied by a
statement about the associated uncertainty
Definition: Standard Uncertainty [GUM]
 Uncertainty of the result of a measurement 𝑥 expressed as a standard
deviation 𝑢
 Representation: 𝑥 ± 𝑢 or (𝑥, 𝑢)
 Examples:
10[GUM] JCGM 100:2008. Evaluation of measurement data – Guide to the expression of uncertainty in measurement.
Joint Committee for Guides in Metrology, 2008.
Normal distribution: (𝑥, 𝜎) with mean 𝑥, standard deviation 𝜎
Interval 𝑎, 𝑏 : Uniform or rectangular distribution is assumed
(𝑥, 𝑢) with 𝑥 =
𝑎+𝑏
2
, 𝑢 =
(𝑏−𝑎)
2 3
Measurement Uncertainty Model-Based Representation
 Domain Model
 Example Instances
11
UReal
x : Real
u : Real
1 : UReal
x = 10.0
u = 0.0014
2 : UReal
x = 2.0
u = 0.02
10 ± 0.001 2 ± 0.02
Quantities Model-Based Representation
 Domain Model
 Example Instance: 𝐿𝑒𝑛𝑔𝑡ℎ 10 ± 0.001 𝑚
12
Unit
name : String
symbol : String
dimensions : Real [8]
conversionFactor : Real [8]
offset : Real [8]
UReal
x : Real
u : Real
Quantityvalue unit
m : Unit
name = "Meter"
symbol = "m"
dimensions = <1,0,0,0,0,0,0,0>
conversionFactor = <1,1,1,1,1,1,1,1>
offset = <0,0,0,0,0,0,0,0>
ur : UReal
x = 10.0
u = 0.001
q : Quantityvalue unit
Example
13
Measure
time : Quantity
position : Quantity
start
SectionMeasure
/duration : Quantity
/distance : Quantity
/avgVelocity : Quantity
/avgAcceleration : Quantity
end
duration = end.time – start.time
distance = end.position – start.position
avgVelocity = distance / duration
avgAcceleration = (end.velocity – start.velocity) / duration
velocity : Quantity
Start A B C N…
Measure M0 M1 M2 M3 MN
S1 S2 S3
Unit Operations
14
Unit
isBaseUnit() : Boolean
isDerivedUnit() : Boolean
isUnitless() : Boolean
isDimensionless() : Boolean
isCompatibleWith(Unit u) : Boolean
equals(Unit u) : Boolean
multiplyUnits(Unit u) : Unit
divideUnits(Unit u) : Unit
powerUnits(Real s) : Unit
Query nature of unit
Combine units
Compare units
Unit Operations
isCompatibleWith(Unit u) : Boolean
 Checks whether two units are compatible for being combined or compared
 Two units are compatible, if they are of the same dimension
 Specification: self.dimensions = u.dimensions
 Examples
15
𝑀𝑒𝑡𝑒𝑟 𝑚 = 1, 0, 0, 0, 0, 0, 0, 0
𝑆𝑞𝑢𝑎𝑟𝑒 𝑀𝑒𝑡𝑒𝑟 𝑚2
= 2, 0, 0, 0, 0, 0, 0, 0
𝑀𝑖𝑙𝑒 𝑚𝑙 = 1, 0, 0, 0, 0, 0, 0, 0
not compatible
not compatible
compatible
Unit Operations
multiplyUnits(Unit u) : Unit
 When two quantity values are multiplied, their units have to be multiplied too
 Specification:
result.dimensions = self.dimensions -> sum(u.dimensions)
 Examples
16
𝑀𝑒𝑡𝑒𝑟 𝑚 = 1, 0, 0, 0, 0, 0, 0, 0
𝑆𝑞𝑢𝑎𝑟𝑒 𝑀𝑒𝑡𝑒𝑟 𝑚2
= 2, 0, 0, 0, 0, 0, 0, 0
𝑀𝑒𝑡𝑒𝑟 𝑚 ∗ 𝑀𝑒𝑡𝑒𝑟 𝑚 = 1, 0, 0, 0, 0, 0, 0, 0 + 1, 0, 0, 0, 0, 0, 0, 0 = 2, 0, 0, 0, 0, 0, 0, 0
= Square Meter 𝑚2
Unit Operations
divideUnits(Unit u) : Unit
 When a quantity value is divided by another quantity value, their units have to
be divided too
 Specification:
result.dimensions = self.dimensions -> minus(u.dimensions)
 Examples
17
𝑀𝑒𝑡𝑒𝑟 𝑚 = 1, 0, 0, 0, 0, 0, 0, 0
𝑆𝑞𝑢𝑎𝑟𝑒 𝑀𝑒𝑡𝑒𝑟 𝑚2 = 2, 0, 0, 0, 0, 0, 0, 0
Square Meter 𝑚2
𝑀𝑒𝑡𝑒𝑟 𝑚
= 2, 0, 0, 0, 0, 0, 0, 0 − 1, 0, 0, 0, 0, 0, 0, 0 = 1, 0, 0, 0, 0, 0, 0, 0
= Meter 𝑚
Measurement Uncertainty Operations
18
UReal
add(r : UReal) : UReal
minus(r : UReal) : UReal
multiply(r : UReal) : UReal
divideBy(r : UReal) : UReal
power(s : Real) : UReal
…
lessThan(r : UReal) : Boolean
lessThanOrEquals(r : UReal) : Boolean
greaterThan(r : UReal) : Boolean
…
Arithmetic operations
Comparison operations
Measurement Uncertainty Operations
 Computations with uncertain values have to respect the propagation of
uncertainty (uncertainty analysis)
Methods for Computing Aggregated Uncertainty
 Normal or Uniform distribution: Analytical solutions
 General case: Monte Carlo simulations
19
A. Vallecillo, C. Morcillo, and P. Orue. Expressing Measurement Uncertainty in
Software Models. In Proceedings of the 10th International Conference on the Quality
of Information and Communications Technology (QUATIC), pages 1–10, 2016.
Quantity Operations
20
Quantity
compatibleUnits(q : Quantity) : Boolean
convertTo(u : Unit) : Quantity
convertToSIUnits() : Quantity
convertFromSIUnits() : Quantity
add(q : Quantity) : Quantity
minus(q : Quantity) : Quantity
multiply(q : Quantity) : Quantity
divideBy(q : Quantity) : Quantity
…
lessThan(q : Quantity) : Boolean
lessThanOrEquals(q : Quantity) : Boolean
greaterThan(q : Quantity) : Boolean
…
Arithmetic operations
Comparison operations
Unit conversion operations
Unit comparison
Quantity Operations
add(q : Quantity) : Quantity
 Quantity values of compatible units can be added
 For the addition, the summands have to be converted to the same unit
 Specification:
pre: self.compatibleUnits(q.unit)
post: result.value = self.value.add(q.convertTo(self.unit).value)
and result.unit = self.unit
 Example
 Special care has to be taken for units with an offset (e.g., °C, °F)
 Units with offsets are affine, i.e., non-multiplicative
 Require affine conversions that allows multiplication and addition
21
5 𝑚 + 1 𝑘𝑚 = 5 𝑚 + 1000 𝑚 = 1005 𝑚
UReal operation aggregates uncertainty
Unit operation converts units of summands
Example
22
startS1 : SectionMeasure
/duration = 10.0 ± 0.0019799 s
/distance = 10.0 ± 0.0014142 m
/avgVelocity = 1.0000000392 ± 0.000489 m/s
/avgAcceleration = 0.200000008 ± 0.0632468 m/s²
end
duration = end.time – start.time
distance = end.position – start.position
avgVelocity = distance / duration
avgAcceleration = (end.velocity – start.velocity) / duration
M0 : Measure
time = 0.0 ± 0.0014 s
position = 0.0 ± 0.001 km
velocity = 0.0 m/s
M1 : Measure
time = 10.0 ± 0.0014 s
position = 10.0 ± 0.001 m
velocity = 2.0 ± 0.02 m/s
Start A B C N…
Measure M0 M1 M2 M3 MN
S1 S2 S3
Quantities Static Type Checking
 Domain Model
23
Unit
name : String
symbol : String
dimensions : Real [8]
conversionFactor : Real [8]
offset : Real [8]
UReal
x : Real
u : Real
Quantityvalue unit
Mass Time Electric
Current
Thermodynamic
Temperature
AmountOf
Substance
Luminosity
Intensity Angle
Linear
Acceleration ForcePower
Length
Linear
Velocity Resistance…
Quantity types for base dimensions
Quantity types for derived dimensions
Quantities Static Type Checking
 Domain Model
24
Unit
name : String
symbol : String
dimensions : Real [8]
conversionFactor : Real [8]
offset : Real [8]
UReal
x : Real
u : Real
Quantityvalue unit
Mass Time Electric
Current
Thermodynamic
Temperature
AmountOf
Substance
Luminosity
Intensity Angle
Linear
Acceleration ForcePower
Length
Linear
Velocity Resistance…
Quantity types for base dimensions
Quantity types for derived dimensions
Length
add(l : Length) : Length
minus(l : Length) : Length
multiply(l : Length) : Area
multiply(l : Area) : Volume
divideBy (t : Time) : LinearVelocity
…
Example
25
duration = end.time – start.time
distance = end.position – start.position
avgVelocity = distance / duration
avgAcceleration = (end.velocity – start.velocity) / duration
Start A B C N…
Measure M0 M1 M2 M3 MN
S1 S2 S3
Measure
time : Time
position : Length
start
SectionMeasure
/duration : Time
/distance : Length
/avgVelocity : LinearVelocity
/avgAcceleration : LincearAcceleration
end velocity : LinearVelocity
Available Implementations
 Java: Reference implementation
 OCL (USE Tool):
 Specification of operations with
preconditions and postconditions
 Support for imperative use of
operations (SOIL)
 UML (Papyrus, MagicDraw):
 Support for specifying quantities and
computations with quantities
 Proof-of-concept prototype for executing
computations with quantities with fUML
 Download: https://github.com/moliz/moliz.quantitytypes
Implementation
26
USE Tool: https://sourceforge.net/projects/useocl/ MagicDraw: http://www.nomagic.com/products/magicdraw.html
Eclipse Papyrus UML: https://eclipse.org/papyrus/
Java Example
Length initialPosition = new Length(0, 0.001, Units.Meter);
Length finalPosition = new Length(10, 0.001, Units.Meter);
Length distance = finalPosition.minus(initialPosition);
USE OCL Example
!new UReal(’ip’)
!ip.x : = 0.0
!ip.u := 0.001
!new Quantity(’initialPosition’)
!initialPosition.value := ip
...
!distance := finalPosition.minus(initialPosition)
Papyrus UML Example
Summary
1. Type system for representing quantities
+ Allows explicit representation of measurement uncertainty and units
+ Enables static model-level checks of quantity compatibility
2. Algebra of operations for performing computations with quantities
+ Allows computations with uncertain values
+ Supports automatic conversions between units
+ Enables domain experts to use the most appropriate units
+ Supports model-level simulations that consider data uncertainty
and units
3. Implementations for Java, OCL, UML
+ Reference implementation and formal specifications for operations on quantities
+ Showcase of integrating quantities with modeling language on the example of UML
27
Ongoing and Future Work
 Implementation
 Evolve fUML proof-of-concept implementation to full implementation
 Alf implementation (textual action language for fUML)
 Full integration with Papyrus and MagicDraw
 Eclipse OCL implementation
 Refinement of the conceptual model of quantity types
 Different kinds of uncertainty (e.g., interval, different probability distributions)
 Different kinds of units (e.g., length units, time units, etc.)
 Representation of quantities
 Useable representation of quantities
 Integration with existing standards, e.g., MARTE and SysML
28
Thank you!
Questions?
Manuel Wimmer
wimmer@big.tuwien.ac.at
Antonio Vallecillo
av@lcc.uma.es
Tanja Mayerhofer
mayerhofer@big.tuwien.ac.at
Contact
Business Informatics Group
Addendum:
Implementation of Quantity Types for fUML
fUML Implementation
31
Types
fUML Implementation
32
Operations: Realized as function behaviors (syntactical elements)
…
…
…
fUML Implementation
33
Operation Implementations
 fUML execution model is extended with Execution classes for all quantity operations
(built-in extension mechanism)
 Operations of Execution classes are implemented with Java
Execution
+ execute() : void
OpaqueBehaviorExecution
+ doBody(input : ParameterValue [*], output : ParameterValue [*]) : void
+ execute() : void
BasicBehaviors
QuantityFunctions
…
QuantityMinusExecution
doBody(input : ParameterValue [*], output : ParameterValue [*]) : void+
fUML Implementation
34
Example
Classes
Behavior
fUML Implementation
35
Example
Values

More Related Content

Viewers also liked

คุณสมบัติบางประการของอะตอม
คุณสมบัติบางประการของอะตอมคุณสมบัติบางประการของอะตอม
คุณสมบัติบางประการของอะตอมWuttipong Tubkrathok
 
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)Carles Farré
 
[DSBW Spring 2009] Unit 08: WebApp Security
[DSBW Spring 2009] Unit 08: WebApp Security[DSBW Spring 2009] Unit 08: WebApp Security
[DSBW Spring 2009] Unit 08: WebApp SecurityCarles Farré
 
E4 e mtd - webinar kit - webinar-presentation
E4 e   mtd - webinar kit - webinar-presentationE4 e   mtd - webinar kit - webinar-presentation
E4 e mtd - webinar kit - webinar-presentationAIMFirst
 
Hydro Energy By Sta Jafri
Hydro Energy By Sta JafriHydro Energy By Sta Jafri
Hydro Energy By Sta JafriIEEEP Karachi
 
บทบาทของรัฐเกี่ยวกับการเปลี่ยนแปลงสภาพภูมิอากาศของโลก
บทบาทของรัฐเกี่ยวกับการเปลี่ยนแปลงสภาพภูมิอากาศของโลกบทบาทของรัฐเกี่ยวกับการเปลี่ยนแปลงสภาพภูมิอากาศของโลก
บทบาทของรัฐเกี่ยวกับการเปลี่ยนแปลงสภาพภูมิอากาศของโลกChacrit Sitdhiwej
 
Ratios modelo de_analisis_interpretación_forma_gerencial
Ratios modelo de_analisis_interpretación_forma_gerencialRatios modelo de_analisis_interpretación_forma_gerencial
Ratios modelo de_analisis_interpretación_forma_gerencialFranz Ramirez
 
ทรัพยากรธรรมชาติ
ทรัพยากรธรรมชาติทรัพยากรธรรมชาติ
ทรัพยากรธรรมชาติWuttipong Tubkrathok
 
FUENTES DE FINANCIAMIENTO EN ESPECÍFICO
FUENTES DE FINANCIAMIENTO EN ESPECÍFICOFUENTES DE FINANCIAMIENTO EN ESPECÍFICO
FUENTES DE FINANCIAMIENTO EN ESPECÍFICOaalcalar
 
The New UE Compression
The New UE CompressionThe New UE Compression
The New UE CompressionJoLynn Andrews
 
ความรู้เบื้องต้นเกี่ยวกับกฎหมาย (๑): สังคม รัฐและกฎหมาย สิทธิ หน้าที่และความร...
ความรู้เบื้องต้นเกี่ยวกับกฎหมาย (๑): สังคม รัฐและกฎหมาย สิทธิ หน้าที่และความร...ความรู้เบื้องต้นเกี่ยวกับกฎหมาย (๑): สังคม รัฐและกฎหมาย สิทธิ หน้าที่และความร...
ความรู้เบื้องต้นเกี่ยวกับกฎหมาย (๑): สังคม รัฐและกฎหมาย สิทธิ หน้าที่และความร...Chacrit Sitdhiwej
 
Las cuatro generaciones de los derechos humanos y
Las cuatro generaciones de los derechos humanos yLas cuatro generaciones de los derechos humanos y
Las cuatro generaciones de los derechos humanos yFranz Ramirez
 
แผนผังความคิดเรื่องพลังงาน
แผนผังความคิดเรื่องพลังงานแผนผังความคิดเรื่องพลังงาน
แผนผังความคิดเรื่องพลังงานWuttipong Tubkrathok
 
โรคทางพันธุกรรม ม.3
โรคทางพันธุกรรม ม.3โรคทางพันธุกรรม ม.3
โรคทางพันธุกรรม ม.3Wuttipong Tubkrathok
 
UI Testing Best Practices - An Expected Journey
UI Testing Best Practices - An Expected JourneyUI Testing Best Practices - An Expected Journey
UI Testing Best Practices - An Expected JourneyOren Farhi
 
preproduction feedback sheet
preproduction feedback sheetpreproduction feedback sheet
preproduction feedback sheeteviekASmedia
 

Viewers also liked (20)

Mercado bursátil
Mercado bursátilMercado bursátil
Mercado bursátil
 
คุณสมบัติบางประการของอะตอม
คุณสมบัติบางประการของอะตอมคุณสมบัติบางประการของอะตอม
คุณสมบัติบางประการของอะตอม
 
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)
 
Target audience
Target audienceTarget audience
Target audience
 
Genre analysis
Genre analysisGenre analysis
Genre analysis
 
Proost NV
Proost NVProost NV
Proost NV
 
[DSBW Spring 2009] Unit 08: WebApp Security
[DSBW Spring 2009] Unit 08: WebApp Security[DSBW Spring 2009] Unit 08: WebApp Security
[DSBW Spring 2009] Unit 08: WebApp Security
 
E4 e mtd - webinar kit - webinar-presentation
E4 e   mtd - webinar kit - webinar-presentationE4 e   mtd - webinar kit - webinar-presentation
E4 e mtd - webinar kit - webinar-presentation
 
Hydro Energy By Sta Jafri
Hydro Energy By Sta JafriHydro Energy By Sta Jafri
Hydro Energy By Sta Jafri
 
บทบาทของรัฐเกี่ยวกับการเปลี่ยนแปลงสภาพภูมิอากาศของโลก
บทบาทของรัฐเกี่ยวกับการเปลี่ยนแปลงสภาพภูมิอากาศของโลกบทบาทของรัฐเกี่ยวกับการเปลี่ยนแปลงสภาพภูมิอากาศของโลก
บทบาทของรัฐเกี่ยวกับการเปลี่ยนแปลงสภาพภูมิอากาศของโลก
 
Ratios modelo de_analisis_interpretación_forma_gerencial
Ratios modelo de_analisis_interpretación_forma_gerencialRatios modelo de_analisis_interpretación_forma_gerencial
Ratios modelo de_analisis_interpretación_forma_gerencial
 
ทรัพยากรธรรมชาติ
ทรัพยากรธรรมชาติทรัพยากรธรรมชาติ
ทรัพยากรธรรมชาติ
 
FUENTES DE FINANCIAMIENTO EN ESPECÍFICO
FUENTES DE FINANCIAMIENTO EN ESPECÍFICOFUENTES DE FINANCIAMIENTO EN ESPECÍFICO
FUENTES DE FINANCIAMIENTO EN ESPECÍFICO
 
The New UE Compression
The New UE CompressionThe New UE Compression
The New UE Compression
 
ความรู้เบื้องต้นเกี่ยวกับกฎหมาย (๑): สังคม รัฐและกฎหมาย สิทธิ หน้าที่และความร...
ความรู้เบื้องต้นเกี่ยวกับกฎหมาย (๑): สังคม รัฐและกฎหมาย สิทธิ หน้าที่และความร...ความรู้เบื้องต้นเกี่ยวกับกฎหมาย (๑): สังคม รัฐและกฎหมาย สิทธิ หน้าที่และความร...
ความรู้เบื้องต้นเกี่ยวกับกฎหมาย (๑): สังคม รัฐและกฎหมาย สิทธิ หน้าที่และความร...
 
Las cuatro generaciones de los derechos humanos y
Las cuatro generaciones de los derechos humanos yLas cuatro generaciones de los derechos humanos y
Las cuatro generaciones de los derechos humanos y
 
แผนผังความคิดเรื่องพลังงาน
แผนผังความคิดเรื่องพลังงานแผนผังความคิดเรื่องพลังงาน
แผนผังความคิดเรื่องพลังงาน
 
โรคทางพันธุกรรม ม.3
โรคทางพันธุกรรม ม.3โรคทางพันธุกรรม ม.3
โรคทางพันธุกรรม ม.3
 
UI Testing Best Practices - An Expected Journey
UI Testing Best Practices - An Expected JourneyUI Testing Best Practices - An Expected Journey
UI Testing Best Practices - An Expected Journey
 
preproduction feedback sheet
preproduction feedback sheetpreproduction feedback sheet
preproduction feedback sheet
 

Similar to Adding Uncertainty and Units to Quantity Types in Software Models

1 introducation to physics t
1 introducation to physics t1 introducation to physics t
1 introducation to physics thazivoc
 
Radiation physics 2
Radiation physics 2Radiation physics 2
Radiation physics 2Rad Tech
 
Physics Chapter 1,2
Physics Chapter 1,2Physics Chapter 1,2
Physics Chapter 1,2guest10e136
 
Lecture 1 physics_and_measurement
Lecture 1 physics_and_measurementLecture 1 physics_and_measurement
Lecture 1 physics_and_measurementKhairul Azhar
 
Monte carlo-simulation
Monte carlo-simulationMonte carlo-simulation
Monte carlo-simulationjaimarbustos
 
Physics_150612_01
Physics_150612_01Physics_150612_01
Physics_150612_01Art Traynor
 
12 13 h2_measurement_ppt
12 13 h2_measurement_ppt12 13 h2_measurement_ppt
12 13 h2_measurement_pptTan Hong
 
Chemistry t1
Chemistry t1Chemistry t1
Chemistry t1enpi275
 
Simple Pendulum Experiment and Automatic Survey Grading using Computer Vision
Simple Pendulum Experiment and Automatic Survey Grading using Computer VisionSimple Pendulum Experiment and Automatic Survey Grading using Computer Vision
Simple Pendulum Experiment and Automatic Survey Grading using Computer VisionAnish Patel
 
Chemistry - Chp 3 - Scientific Measurement - PowerPoint
Chemistry - Chp 3 - Scientific Measurement - PowerPointChemistry - Chp 3 - Scientific Measurement - PowerPoint
Chemistry - Chp 3 - Scientific Measurement - PowerPointMr. Walajtys
 
Chapter 3 scientific measurement
Chapter 3 scientific measurementChapter 3 scientific measurement
Chapter 3 scientific measurementmcnewbold
 
Count-Distinct Problem
Count-Distinct ProblemCount-Distinct Problem
Count-Distinct ProblemKai Zhang
 
Basic Quantities,Prefixes&Dimensions.ppt
Basic Quantities,Prefixes&Dimensions.pptBasic Quantities,Prefixes&Dimensions.ppt
Basic Quantities,Prefixes&Dimensions.pptFathiyah Morad
 
Lecture Notes: EEEC6430312 Measurements And Instrumentation - Instrument Typ...
Lecture Notes:  EEEC6430312 Measurements And Instrumentation - Instrument Typ...Lecture Notes:  EEEC6430312 Measurements And Instrumentation - Instrument Typ...
Lecture Notes: EEEC6430312 Measurements And Instrumentation - Instrument Typ...AIMST University
 
Comparison GUM versus GUM+1
Comparison GUM  versus GUM+1Comparison GUM  versus GUM+1
Comparison GUM versus GUM+1Maurice Maeck
 
Ch 3 final ppt
Ch 3 final pptCh 3 final ppt
Ch 3 final pptslabaugh98
 

Similar to Adding Uncertainty and Units to Quantity Types in Software Models (20)

Specifying quantities in software models
Specifying quantities in software modelsSpecifying quantities in software models
Specifying quantities in software models
 
1 introducation to physics t
1 introducation to physics t1 introducation to physics t
1 introducation to physics t
 
Radiation physics 2
Radiation physics 2Radiation physics 2
Radiation physics 2
 
Physics Chapter 1,2
Physics Chapter 1,2Physics Chapter 1,2
Physics Chapter 1,2
 
Lecture 1 physics_and_measurement
Lecture 1 physics_and_measurementLecture 1 physics_and_measurement
Lecture 1 physics_and_measurement
 
Monte carlo-simulation
Monte carlo-simulationMonte carlo-simulation
Monte carlo-simulation
 
Physics_150612_01
Physics_150612_01Physics_150612_01
Physics_150612_01
 
12 13 h2_measurement_ppt
12 13 h2_measurement_ppt12 13 h2_measurement_ppt
12 13 h2_measurement_ppt
 
Chemistry t1
Chemistry t1Chemistry t1
Chemistry t1
 
Simple Pendulum Experiment and Automatic Survey Grading using Computer Vision
Simple Pendulum Experiment and Automatic Survey Grading using Computer VisionSimple Pendulum Experiment and Automatic Survey Grading using Computer Vision
Simple Pendulum Experiment and Automatic Survey Grading using Computer Vision
 
Chemistry - Chp 3 - Scientific Measurement - PowerPoint
Chemistry - Chp 3 - Scientific Measurement - PowerPointChemistry - Chp 3 - Scientific Measurement - PowerPoint
Chemistry - Chp 3 - Scientific Measurement - PowerPoint
 
Chapter 3 scientific measurement
Chapter 3 scientific measurementChapter 3 scientific measurement
Chapter 3 scientific measurement
 
Count-Distinct Problem
Count-Distinct ProblemCount-Distinct Problem
Count-Distinct Problem
 
Basic introduction
Basic introductionBasic introduction
Basic introduction
 
Basic Quantities,Prefixes&Dimensions.ppt
Basic Quantities,Prefixes&Dimensions.pptBasic Quantities,Prefixes&Dimensions.ppt
Basic Quantities,Prefixes&Dimensions.ppt
 
Lecture Notes: EEEC6430312 Measurements And Instrumentation - Instrument Typ...
Lecture Notes:  EEEC6430312 Measurements And Instrumentation - Instrument Typ...Lecture Notes:  EEEC6430312 Measurements And Instrumentation - Instrument Typ...
Lecture Notes: EEEC6430312 Measurements And Instrumentation - Instrument Typ...
 
Comparison GUM versus GUM+1
Comparison GUM  versus GUM+1Comparison GUM  versus GUM+1
Comparison GUM versus GUM+1
 
Week08.pdf
Week08.pdfWeek08.pdf
Week08.pdf
 
Ch 3 final ppt
Ch 3 final pptCh 3 final ppt
Ch 3 final ppt
 
State estimation
State estimationState estimation
State estimation
 

Recently uploaded

What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 

Recently uploaded (20)

What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 

Adding Uncertainty and Units to Quantity Types in Software Models

  • 1. Business Informatics Group Institute of Software Technology and Interactive Systems TU Wien Favoritenstraße 9-11/188-3, 1040 Vienna, Austria phone: +43 (1) 58801 - 18804 (secretary), fax: +43 (1) 58801 - 18896 office@big.tuwien.ac.at, www.big.tuwien.ac.at Business Informatics Group Adding Uncertainty and Units to Quantity Types in Software Models Tanja Mayerhofer, Manuel Wimmer Business Informatics Group, TU Wien, Austria Antonio Vallecillo Atenea, Universidad de Málaga, Spain Tanja Mayerhofer
  • 2. Motivation Uncertainty and Units in Engineering Disciplines  Engineers naturally think about uncertainty associated with measured values and units of values  Examples  A machinist estimates that the length of a produced part lies with probability 0.5 in the interval [10.07 mm, 10.15 mm]  A calibration certificate states that with 99 percent confidence the resistance of a standard resistor is 10.000742 Ω ± 129 μΩ  Uncertainty and units are explicitly defined in models and considered in model-based simulations 2 phi.start = 0 rad (rotation angle) w.start = 10 rad/s (angular velocity) (Coupled Clutches Example of Modelica Standard Library)
  • 3. Uncertainty and Units in Software Engineering  Very limited support for representing uncertainty and units in software models  No support for considering such properties in model-based simulations Problem  Movement towards cyber-physical systems demands for the accurate representation of properties of physical entities in software models  Important future application domain: Internet of Things  Analysis of huge amount sensor data Motivation 3 Measure value : Real What kind of value is measured? In which unit is the value measured? What is the uncertainty of the measurement method?
  • 4. Contributions 1. Type system for representing measurement uncertainty and units  Kernel representation for quantities 2. Algebra of operations for performing computations with uncertain data and units  Computational kernel for computing quantities 3. Implementations for Java, OCL, UML 4
  • 5. Quantities Definition: Quantity Kind (Dimension)  Any observable property of any object that can be measured and quantified numerically.  Examples: Length, mass, time, force, energy, power, electric charge Definition: Quantity  Observable property of a particular object that can be measured and quantified numerically.  Examples: Length, mass, speed, temperature of a particular object Definition: Quantity Value  Magnitude of a quantity expressed as a product of a number and a unit.  Example: Velocity of 3.5 m/s 5
  • 6. Units and Dimensions Systems of Units International System of Units (SI)  Base dimensions: Length, Mass, Time, Electric Current, Thermodynamic Temperature, Amount of Substance, Luminous Intensity  Base units: Meter (m), Kilogram (kg), Second (s), Ampere (A), Kelvin (K), Mole (mol), Candela (cd)  Derived dimensions: 90 dimensions derived from the base dimensions e.g., Area, Volume, Velocity  Derived units: 90 units derived from the base units e.g., Square Meter (m²), Cubic Meter (m³), Meter per Second (m/s) Other Systems of Units  Centimeter-Gram-Second System (CGS)  Imperial System  United States Customary System (USCS, USC) 6B. N. Taylor and A. Thompson. The International System of Units (SI). NIST, 2008. http://www.nist.gov/pml/pubs/sp811/.
  • 7. Units and Dimensions Representation of Units  Any unit can be derived from the base units: 𝐵1 𝑒1 ∗ 𝐵2 𝑒2 … 𝐵𝑛 𝑒 𝑛 where 𝐵𝑖 represents a base unit and 𝑒𝑖 its exponent  Hence, any unit can be defined by the exponents 𝑒𝑖 of the base units: 𝑒1, 𝑒1, … , 𝑒 𝑛  Examples 7 𝑀𝑒𝑡𝑒𝑟 𝑚 = 𝑚1 ∗ 𝑘𝑔0 ∗ 𝑠0 ∗ 𝐴0 ∗ 𝐾0 ∗ 𝑐𝑑0 ∗ 𝑚𝑜𝑙0 ∗ 𝑟𝑎𝑑0 = 1, 0, 0, 0, 0, 0, 0, 0 𝑆𝑞𝑢𝑎𝑟𝑒 𝑀𝑒𝑡𝑒𝑟 𝑚2 = 𝑚2 ∗ 𝑘𝑔0 ∗ 𝑠0 ∗ 𝐴0 ∗ 𝐾0 ∗ 𝑐𝑑0 ∗ 𝑚𝑜𝑙0 ∗ 𝑟𝑎𝑑0 = 2, 0, 0, 0, 0, 0, 0, 0 𝑀𝑒𝑡𝑒𝑟 𝑝𝑒𝑟 𝑆𝑒𝑐𝑜𝑛𝑑 𝑚/𝑠 = 𝑚1 ∗ 𝑘𝑔0 ∗ 𝑠−1 ∗ 𝐴0 ∗ 𝐾0 ∗ 𝑐𝑑0 ∗ 𝑚𝑜𝑙0 ∗ 𝑟𝑎𝑑0 = 1, 0, −1, 0, 0, 0, 0, 0 R. Hodgson, P. J. Keller, J. Hodges, and J. Spivak. QUDT – Quantities, Units, Dimensions and Data Types Ontologies. TopQuadrant, Inc. and NASA AMES Research Center, 2014. http://qudt.org/.
  • 8. Units and Dimensions Conversion Between Units  Conversion of quantity values from base units 𝐵𝑖 to derived units 𝐷𝑖  Multiply the numerical value of the quantity value with conversion factor 𝑐𝑓  Add an offset 𝑜 to the resulting numerical value  Definition: 𝑥 𝐷𝑖 = (𝑥 ∗ 𝑐𝑓𝑖 + 𝑜𝑖) 𝐵𝑖  Examples:  Conversion factors and offsets can be defined relative to the base units: 𝑐𝑓𝑖: 𝑐𝑓1, 𝑐𝑓1, … , 𝑐𝑓𝑛 , 𝑜𝑖: 𝑜1, 𝑜2, … , 𝑜 𝑛  Examples: 8 𝐾𝑖𝑙𝑜𝑚𝑒𝑡𝑒𝑟 𝑘𝑚 : 𝑐𝑓 = 1000, 1, 1, 1, 1, 1, 1, 1 , 𝑜𝑓 = 0, 0, 0, 0, 0, 0, 0, 0 𝐶𝑒𝑙𝑐𝑖𝑢𝑠 °𝐶 : 𝑐𝑓 = 1, 1, 1, 1, 1, 1, 1, 1 , 𝑜𝑓 = 0, 0, 0, 0, 273.15, 0, 0, 0 𝐾𝑖𝑙𝑜𝑚𝑒𝑡𝑒𝑟 𝑝𝑒𝑟 𝐻𝑜𝑢𝑟 𝑘𝑚/ℎ : 𝑐𝑓 = 1000, 1, 3600, 1, 1, 1, 1, 1 , 𝑜𝑓 = 0, 0, 0, 0, 0, 0, 0, 0 𝑥 𝑘𝑚 = 𝑥 ∗ 1000 + 0 𝑚 𝑥 °𝐶 = (𝑥 ∗ 1 + 273.15) K 𝑥 𝑘𝑚/ℎ = (𝑥 ∗ 1000 3600 + 0) m/s
  • 9. Units and Dimensions Model-Based Representation  Domain Model  Example Instances 9 Unit name : String symbol : String dimensions : Real [8] conversionFactor : Real [8] offset : Real [8] m : Unit name = "Meter" symbol = "m" dimensions = <1,0,0,0,0,0,0,0> conversionFactor = <1,1,1,1,1,1,1,1> offset = <0,0,0,0,0,0,0,0> km/h : Unit name = "Kilometer per Hour" symbol = "km/h" dimensions = <1,0,-1,0,0,0,0,0> conversionFactor = <1000,1,3600,1,1,1,1,1> offset = <0,0,0,0,0,0,0,0>
  • 10. Measurement Uncertainty Representation of Uncertainty  It is impossible to know, estimate or measure values with complete precision  The value of a quantity is only complete when it is accompanied by a statement about the associated uncertainty Definition: Standard Uncertainty [GUM]  Uncertainty of the result of a measurement 𝑥 expressed as a standard deviation 𝑢  Representation: 𝑥 ± 𝑢 or (𝑥, 𝑢)  Examples: 10[GUM] JCGM 100:2008. Evaluation of measurement data – Guide to the expression of uncertainty in measurement. Joint Committee for Guides in Metrology, 2008. Normal distribution: (𝑥, 𝜎) with mean 𝑥, standard deviation 𝜎 Interval 𝑎, 𝑏 : Uniform or rectangular distribution is assumed (𝑥, 𝑢) with 𝑥 = 𝑎+𝑏 2 , 𝑢 = (𝑏−𝑎) 2 3
  • 11. Measurement Uncertainty Model-Based Representation  Domain Model  Example Instances 11 UReal x : Real u : Real 1 : UReal x = 10.0 u = 0.0014 2 : UReal x = 2.0 u = 0.02 10 ± 0.001 2 ± 0.02
  • 12. Quantities Model-Based Representation  Domain Model  Example Instance: 𝐿𝑒𝑛𝑔𝑡ℎ 10 ± 0.001 𝑚 12 Unit name : String symbol : String dimensions : Real [8] conversionFactor : Real [8] offset : Real [8] UReal x : Real u : Real Quantityvalue unit m : Unit name = "Meter" symbol = "m" dimensions = <1,0,0,0,0,0,0,0> conversionFactor = <1,1,1,1,1,1,1,1> offset = <0,0,0,0,0,0,0,0> ur : UReal x = 10.0 u = 0.001 q : Quantityvalue unit
  • 13. Example 13 Measure time : Quantity position : Quantity start SectionMeasure /duration : Quantity /distance : Quantity /avgVelocity : Quantity /avgAcceleration : Quantity end duration = end.time – start.time distance = end.position – start.position avgVelocity = distance / duration avgAcceleration = (end.velocity – start.velocity) / duration velocity : Quantity Start A B C N… Measure M0 M1 M2 M3 MN S1 S2 S3
  • 14. Unit Operations 14 Unit isBaseUnit() : Boolean isDerivedUnit() : Boolean isUnitless() : Boolean isDimensionless() : Boolean isCompatibleWith(Unit u) : Boolean equals(Unit u) : Boolean multiplyUnits(Unit u) : Unit divideUnits(Unit u) : Unit powerUnits(Real s) : Unit Query nature of unit Combine units Compare units
  • 15. Unit Operations isCompatibleWith(Unit u) : Boolean  Checks whether two units are compatible for being combined or compared  Two units are compatible, if they are of the same dimension  Specification: self.dimensions = u.dimensions  Examples 15 𝑀𝑒𝑡𝑒𝑟 𝑚 = 1, 0, 0, 0, 0, 0, 0, 0 𝑆𝑞𝑢𝑎𝑟𝑒 𝑀𝑒𝑡𝑒𝑟 𝑚2 = 2, 0, 0, 0, 0, 0, 0, 0 𝑀𝑖𝑙𝑒 𝑚𝑙 = 1, 0, 0, 0, 0, 0, 0, 0 not compatible not compatible compatible
  • 16. Unit Operations multiplyUnits(Unit u) : Unit  When two quantity values are multiplied, their units have to be multiplied too  Specification: result.dimensions = self.dimensions -> sum(u.dimensions)  Examples 16 𝑀𝑒𝑡𝑒𝑟 𝑚 = 1, 0, 0, 0, 0, 0, 0, 0 𝑆𝑞𝑢𝑎𝑟𝑒 𝑀𝑒𝑡𝑒𝑟 𝑚2 = 2, 0, 0, 0, 0, 0, 0, 0 𝑀𝑒𝑡𝑒𝑟 𝑚 ∗ 𝑀𝑒𝑡𝑒𝑟 𝑚 = 1, 0, 0, 0, 0, 0, 0, 0 + 1, 0, 0, 0, 0, 0, 0, 0 = 2, 0, 0, 0, 0, 0, 0, 0 = Square Meter 𝑚2
  • 17. Unit Operations divideUnits(Unit u) : Unit  When a quantity value is divided by another quantity value, their units have to be divided too  Specification: result.dimensions = self.dimensions -> minus(u.dimensions)  Examples 17 𝑀𝑒𝑡𝑒𝑟 𝑚 = 1, 0, 0, 0, 0, 0, 0, 0 𝑆𝑞𝑢𝑎𝑟𝑒 𝑀𝑒𝑡𝑒𝑟 𝑚2 = 2, 0, 0, 0, 0, 0, 0, 0 Square Meter 𝑚2 𝑀𝑒𝑡𝑒𝑟 𝑚 = 2, 0, 0, 0, 0, 0, 0, 0 − 1, 0, 0, 0, 0, 0, 0, 0 = 1, 0, 0, 0, 0, 0, 0, 0 = Meter 𝑚
  • 18. Measurement Uncertainty Operations 18 UReal add(r : UReal) : UReal minus(r : UReal) : UReal multiply(r : UReal) : UReal divideBy(r : UReal) : UReal power(s : Real) : UReal … lessThan(r : UReal) : Boolean lessThanOrEquals(r : UReal) : Boolean greaterThan(r : UReal) : Boolean … Arithmetic operations Comparison operations
  • 19. Measurement Uncertainty Operations  Computations with uncertain values have to respect the propagation of uncertainty (uncertainty analysis) Methods for Computing Aggregated Uncertainty  Normal or Uniform distribution: Analytical solutions  General case: Monte Carlo simulations 19 A. Vallecillo, C. Morcillo, and P. Orue. Expressing Measurement Uncertainty in Software Models. In Proceedings of the 10th International Conference on the Quality of Information and Communications Technology (QUATIC), pages 1–10, 2016.
  • 20. Quantity Operations 20 Quantity compatibleUnits(q : Quantity) : Boolean convertTo(u : Unit) : Quantity convertToSIUnits() : Quantity convertFromSIUnits() : Quantity add(q : Quantity) : Quantity minus(q : Quantity) : Quantity multiply(q : Quantity) : Quantity divideBy(q : Quantity) : Quantity … lessThan(q : Quantity) : Boolean lessThanOrEquals(q : Quantity) : Boolean greaterThan(q : Quantity) : Boolean … Arithmetic operations Comparison operations Unit conversion operations Unit comparison
  • 21. Quantity Operations add(q : Quantity) : Quantity  Quantity values of compatible units can be added  For the addition, the summands have to be converted to the same unit  Specification: pre: self.compatibleUnits(q.unit) post: result.value = self.value.add(q.convertTo(self.unit).value) and result.unit = self.unit  Example  Special care has to be taken for units with an offset (e.g., °C, °F)  Units with offsets are affine, i.e., non-multiplicative  Require affine conversions that allows multiplication and addition 21 5 𝑚 + 1 𝑘𝑚 = 5 𝑚 + 1000 𝑚 = 1005 𝑚 UReal operation aggregates uncertainty Unit operation converts units of summands
  • 22. Example 22 startS1 : SectionMeasure /duration = 10.0 ± 0.0019799 s /distance = 10.0 ± 0.0014142 m /avgVelocity = 1.0000000392 ± 0.000489 m/s /avgAcceleration = 0.200000008 ± 0.0632468 m/s² end duration = end.time – start.time distance = end.position – start.position avgVelocity = distance / duration avgAcceleration = (end.velocity – start.velocity) / duration M0 : Measure time = 0.0 ± 0.0014 s position = 0.0 ± 0.001 km velocity = 0.0 m/s M1 : Measure time = 10.0 ± 0.0014 s position = 10.0 ± 0.001 m velocity = 2.0 ± 0.02 m/s Start A B C N… Measure M0 M1 M2 M3 MN S1 S2 S3
  • 23. Quantities Static Type Checking  Domain Model 23 Unit name : String symbol : String dimensions : Real [8] conversionFactor : Real [8] offset : Real [8] UReal x : Real u : Real Quantityvalue unit Mass Time Electric Current Thermodynamic Temperature AmountOf Substance Luminosity Intensity Angle Linear Acceleration ForcePower Length Linear Velocity Resistance… Quantity types for base dimensions Quantity types for derived dimensions
  • 24. Quantities Static Type Checking  Domain Model 24 Unit name : String symbol : String dimensions : Real [8] conversionFactor : Real [8] offset : Real [8] UReal x : Real u : Real Quantityvalue unit Mass Time Electric Current Thermodynamic Temperature AmountOf Substance Luminosity Intensity Angle Linear Acceleration ForcePower Length Linear Velocity Resistance… Quantity types for base dimensions Quantity types for derived dimensions Length add(l : Length) : Length minus(l : Length) : Length multiply(l : Length) : Area multiply(l : Area) : Volume divideBy (t : Time) : LinearVelocity …
  • 25. Example 25 duration = end.time – start.time distance = end.position – start.position avgVelocity = distance / duration avgAcceleration = (end.velocity – start.velocity) / duration Start A B C N… Measure M0 M1 M2 M3 MN S1 S2 S3 Measure time : Time position : Length start SectionMeasure /duration : Time /distance : Length /avgVelocity : LinearVelocity /avgAcceleration : LincearAcceleration end velocity : LinearVelocity
  • 26. Available Implementations  Java: Reference implementation  OCL (USE Tool):  Specification of operations with preconditions and postconditions  Support for imperative use of operations (SOIL)  UML (Papyrus, MagicDraw):  Support for specifying quantities and computations with quantities  Proof-of-concept prototype for executing computations with quantities with fUML  Download: https://github.com/moliz/moliz.quantitytypes Implementation 26 USE Tool: https://sourceforge.net/projects/useocl/ MagicDraw: http://www.nomagic.com/products/magicdraw.html Eclipse Papyrus UML: https://eclipse.org/papyrus/ Java Example Length initialPosition = new Length(0, 0.001, Units.Meter); Length finalPosition = new Length(10, 0.001, Units.Meter); Length distance = finalPosition.minus(initialPosition); USE OCL Example !new UReal(’ip’) !ip.x : = 0.0 !ip.u := 0.001 !new Quantity(’initialPosition’) !initialPosition.value := ip ... !distance := finalPosition.minus(initialPosition) Papyrus UML Example
  • 27. Summary 1. Type system for representing quantities + Allows explicit representation of measurement uncertainty and units + Enables static model-level checks of quantity compatibility 2. Algebra of operations for performing computations with quantities + Allows computations with uncertain values + Supports automatic conversions between units + Enables domain experts to use the most appropriate units + Supports model-level simulations that consider data uncertainty and units 3. Implementations for Java, OCL, UML + Reference implementation and formal specifications for operations on quantities + Showcase of integrating quantities with modeling language on the example of UML 27
  • 28. Ongoing and Future Work  Implementation  Evolve fUML proof-of-concept implementation to full implementation  Alf implementation (textual action language for fUML)  Full integration with Papyrus and MagicDraw  Eclipse OCL implementation  Refinement of the conceptual model of quantity types  Different kinds of uncertainty (e.g., interval, different probability distributions)  Different kinds of units (e.g., length units, time units, etc.)  Representation of quantities  Useable representation of quantities  Integration with existing standards, e.g., MARTE and SysML 28
  • 29. Thank you! Questions? Manuel Wimmer wimmer@big.tuwien.ac.at Antonio Vallecillo av@lcc.uma.es Tanja Mayerhofer mayerhofer@big.tuwien.ac.at Contact
  • 32. fUML Implementation 32 Operations: Realized as function behaviors (syntactical elements) … … …
  • 33. fUML Implementation 33 Operation Implementations  fUML execution model is extended with Execution classes for all quantity operations (built-in extension mechanism)  Operations of Execution classes are implemented with Java Execution + execute() : void OpaqueBehaviorExecution + doBody(input : ParameterValue [*], output : ParameterValue [*]) : void + execute() : void BasicBehaviors QuantityFunctions … QuantityMinusExecution doBody(input : ParameterValue [*], output : ParameterValue [*]) : void+

Editor's Notes

  1. CoupledClutches in Modelica Standard Library 3.0 Rotating body J1: Absolute rotation angle: 0 rad Absolute angular velocity of component: 10 rad/s
  2. For example, the Centimeter-Gram-Second System (CGS) is a variant of the metric system that has the same dimensions but uses centimeters, grams and seconds as base units. The Imperial System used in UK also defines the same dimensions as the SI, but uses several different units: miles, feet, inches, stones, pounds, Fahrenheit degrees, etc. In USA, the United States Customary System (also called USCS or USC) is a variant of the Imperial System that uses different units for fluids. Since they define the same dimensions, conversions among these systems of units are possible
  3. 8th dimension: Angle; unit: Radian There is an additional supplementary dimension in the SI, for angles. The SI committee has not yet fully agreed on the nature of this angular dimension, because it is considered dimensionless. However, it is required to represent Angular Velocity (rad/s), Angular Acceleration (rad/s2), Area Angle (m2st) and Power per Angle (W/st). Therefore we decided to incorporate it, treating angular units like normal base units. So we will consider eight base dimensions. The base unit for Angle is Radian (rad). There is also a derived unit for solid angle measurement, the Steradian (st), which corresponds to rad2.
  4. When dealing with real-world entities, models need to take into account the inability to know, estimate or measure with complete precision the value of any quantity. For instance, in physical systems measurement uncertainty normally arises in partially observable and/or stochastic environments, or when the system properties are not directly measurable or accessible. On other occasions estimations are needed because the exact values are too costly to measure, or simply because they are unknown—for example, the duration of a given task in a software process or the life of a battery. Sometimes values are based on expert judgments and estimations. Such estimates normally feature ranges, or intervals, not exact values, which determine the possible lower and upper bounds for the exact values, or are given by a probability distribution that represents a range of its variation. This is why, in general, a measurement result that determines the value of a quantity is only complete when it is accompanied by a statement of the associated uncertainty [15, 16]. --- The GUM framework also identifies two ways of evaluating the uncertainty of a measurement, Type A evaluation of uncertainty: the knowledge about the quantity X is inferred from repeated measured values Type B evaluation of uncertainty: the knowledge about the quantity x is inferred from scientific judgment or other information concerning the possible values of the quantity. In Type A evaluation, if X={x1,…,xn} is the set of measured values, then the estimated value x is taken as the mean of these values, and the associated uncertainty u as their experimental standard deviation, i.e., u^2=(1 / (n *(n-1))) Σ (xi – x)^2 In Type B evaluation of uncertainty, only lower and upper bounds [a,b] for the values of X are known, without any further information about the possible values of X within the interval. Thus, we can only assume a uniform or rectangular distribution of the values, and therefore x is calculated as the midpoint of the interval, x = (a+b)/2, and its associated variance is taken as u^2=(b-a)^2/12. Therefore, u=(b-a)/(2 sqrt{3}).
  5. This is why uncertain values admit two implementations: one that assumes that all the probability distributions of the individual uncertainties follow Normal or Uniform distributions allowing the application of analytic solutions to compute the aggregated uncertainty, and the other that deals with the general case where that assumption cannot hold requiring Monte Carlo simulations. Although being more specific, the first one is more efficient and represents the most usual case. The second one is more general, but requires more number crunching.