Network Working Group

Internet Engineering Task Force (IETF)                        C. Bormann
Internet-Draft
Request for Comments: 0000                       Universitaet Bremen TZI
Intended status:
Category: Standards Track                       February 19, 2020
Expires: August 22,                                     April 2020
ISSN: 2070-1721

                       Additional Units for SenML
                  draft-ietf-core-senml-more-units-05

Abstract

   The Sensor Measurement Lists (SenML) media type supports the
   indication of units for a quantity represented.  This short document
   registers a number of additional unit names in the IANA registry for
   Units in SenML.  It also defines a registry for secondary units that
   cannot be in SenML's main registry as they are derived by linear
   transformation from units already in that registry.

Status of This Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents an Internet Standards Track document.

   This document is a product of the Internet Engineering Task Force
   (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list  It represents the consensus of current Internet-
   Drafts is at https://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid the IETF community.  It has
   received public review and has been approved for a maximum publication by the
   Internet Engineering Steering Group (IESG).  Further information on
   Internet Standards is available in Section 2 of six months RFC 7841.

   Information about the current status of this document, any errata,
   and how to provide feedback on it may be updated, replaced, or obsoleted by other documents obtained at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on August 22, 2020.
   https://www.rfc-editor.org/info/rfc0000.

Copyright Notice

   Copyright (c) 2020 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (https://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
   2.  New Primary Units . . . . . . . . . . . . . . . . . . . . . .   3
     2.1.  Rationale . . . . . . . . . . . . . . . . . . . . . . . .   3
   3.  New Registry for Secondary Units  . . . . . . . . . . . . . .   4
   4.  Operational Considerations  . . . . . . . . . . . . . . . . .   6
   5.  Security Considerations . . . . . . . . . . . . . . . . . . .   7
   6.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   7
   7.  References  . . . . . . . . . . . . . . . . . . . . . . . . .   7
     7.1.  Normative References  . . . . . . . . . . . . . . . . . .   7
     7.2.  Informative References  . . . . . . . . . . . . . . . . .   8
   Acknowledgements  . . . . . . . . . . . . . . . . . . . . . . . .   8
   Author's Address  . . . . . . . . . . . . . . . . . . . . . . . .   9

1.  Introduction

   The Sensor Measurement Lists (SenML, [RFC8428]) media type supports
   the indication of a unit, using the SenML field "u", for the quantity
   given as a data value in a SenML record.  For this purpose, SenML
   defines an IANA registry of defined Unit names and their meanings; in
   the present document, we call the Unit names registered there
   "primary Unit names".

   This short document registers a number of additional units in the
   IANA registry for Units in SenML that appear to be necessary for
   further adopting SenML in other Standards Development Organizations
   (SDOs).

   The document also defines a registry for secondary Unit names that
   cannot be in SenML's main registry as they are derived by linear
   transformation from units already in that registry.  Although SenML
   version 10 [RFC8428] does not provide for the direct use of these
   secondary units, they are planned to be supported via the use of
   SenML extension mechanisms, one of which is proposed in
   [I-D.bormann-core-senml-versions].
   [SENML-VERSIONS].

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
   "OPTIONAL" in this document are to be interpreted as described in
   BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all
   capitals, as shown here.

2.  New Primary Units

   IANA is requested to assign new units in the "SenML Units"
   subregistry of the SenML registry [IANA.senml] (as defined in
   [RFC8428]):

   +--------+--------------------------------------+-------+-----------+
   | Symbol | Description                          | Type  | Reference |
   +--------+--------------------------------------+-------+-----------+
   +========+======================================+=======+===========+
   | B      | Byte (information content)           | float | RFCthis   |
   +--------+--------------------------------------+-------+-----------+
   | VA     | volt-ampere (Apparent Power)         | float | RFCthis   |
   +--------+--------------------------------------+-------+-----------+
   | VAs    | volt-ampere second (Apparent Energy)         | float | RFCthis   |
   |        | Energy)                              |       |           |
   +--------+--------------------------------------+-------+-----------+
   | var    | volt-ampere reactive (Reactive       | float | RFCthis   |
   |        | Power)                               |       |           |
   +--------+--------------------------------------+-------+-----------+
   | vars   | volt-ampere reactive second          | float | RFCthis   |
   |        | (Reactive Energy)                    |       |           |
   +--------+--------------------------------------+-------+-----------+
   | J/m    | joule per meter (Energy per          | float | RFCthis   |
   |        | distance)                            |       |           |
   +--------+--------------------------------------+-------+-----------+
   | kg/m3  | kilogram per cubic meter (mass       | float | RFCthis   |
   |        | density, mass concentration)         |       |           |
   +--------+--------------------------------------+-------+-----------+
   | deg    | degree (angle)*                      | float | RFCthis   |
   +--------+--------------------------------------+-------+-----------+

                  Table 1: New units registered for SenML

2.1.  Rationale

   SenML [RFC8428] takes the position that unscaled SI units should
   always be used.  However, SenML makes one exception: The degree
   Celsius (as Cel) is allowed as an alternative to the K (Kelvin).

   This document takes the position that the same should apply to a
   small number of alternative units in wide use:

   o

   *  The Byte.  [IEC-80000-13] defines both the bit (item 13-9.b) and
      the byte (item 13-9.c, also called octet) as alternative names for
      the coherent unit one used for dimensionless quantities, for the
      purpose of giving storage capacity and related quantities.  While
      the name octet is associated with the symbol o, this is in wide
      use only in French-speaking countries.  Globally more wide-spread
      is the symbol B for byte, even though B is already taken in SI for
      bel.  [RFC8428] therefore registers dB as the SenML unit for
      logarithmic relative power, leaving B free for the usage proposed
      here.  While this is potentially confusing, the situation is
      widely understood in engineering circles and is unlikely to cause
      actual problems.

   o

   *  The Volt-Ampere.  [IEC-80000-6]} item 6-57.a defines the VA (volt
      ampere) as a unit for apparent power; items 6-59.a, 6-60.a and
      6-61.a also use the unit for complex, reactive, and non-active
      power.

   o

   *  The Volt-Ampere-reactive.  [IEC-80000-6] item 6-60.b defines the
      var (volt ampere reactive) as an alternative (and fully
      equivalent) unit to VA specifically for reactive power (with the
      primary unit VA); it has become clear that there is strong
      interest in using this unit specifically for the imaginary content
      of complex power, i.e., reactive power [IEEE-1459].

   The unit "degrees" is in wide use in practice for plane angles (as in
   heading, bearing, etc.).  It is marked with an asterisk because the
   preferred coherent SI unit is radian ("rad").

   The Joule per meter is not a traditional electromagnetic unit.  It
   and its scaled derivatives (in particular Wh/km) are used to describe
   the energy expended for achieving motion over a given distance, e.g.,
   as an equivalent for electrical cars of the inverse of "mileage".

3.  New Registry for Secondary Units

   IANA is requested to create a "secondary units" subregistry in the
   SenML registry [IANA.senml] defined in [RFC8428].

   The registry has six columns:

   o

   *  secondary unit: a newly registered name allocated within the same
      namespace as SenML units

   o

   *  description: short description (usually just expansion of
      abbreviation)

   o

   *  SenML unit: an existing SenML unit from the SenML units registry

   o

   *  scale, offset: two rational numbers, expressed in decimal
      (optionally, with a decimal exponent given) or as a fraction
      divided by
      represented using a "/" character.

   o character to separate numerator and
      denominator.

   *  Reference: where does the entry come from.

   Quantities expressed in the secondary unit can be converted into the
   SenML unit by first multiplying their value with the scale number and
   then adding the offset, yielding the value in the given SenML unit.

   The initial content of the secondary units registry is provided in
   Table 2:

   +-----------+-------------------+-------+-----------+-----+---------+

   +-----------+----------------------+------+-----------+---+---------+
   | secondary | description       | SenML          |SenML |     scale | off | |off| refer-  |
   | unit      |                      | unit |           | set |           |set| ence    |
   +-----------+-------------------+-------+-----------+-----+---------+
   +===========+======================+======+===========+===+=========+
   | ms        | millisecond          | s    |    1/1000 | 0 | RFCthis |
   +-----------+----------------------+------+-----------+---+---------+
   | min       | minute               | s    |        60 | 0 | RFCthis |
   +-----------+----------------------+------+-----------+---+---------+
   | h         | hour                 | s    |      3600 | 0 | RFCthis |
   +-----------+----------------------+------+-----------+---+---------+
   | MHz       | megahertz            | Hz   |   1000000 | 0 | RFCthis |
   +-----------+----------------------+------+-----------+---+---------+
   | kW        | kilowatt             | W    |      1000 | 0 | RFCthis |
   +-----------+----------------------+------+-----------+---+---------+
   | kVA       | kilovolt-ampere      | VA   |      1000 | 0 | RFCthis |
   +-----------+----------------------+------+-----------+---+---------+
   | kvar      | kilovar              | var  |      1000 | 0 | RFCthis |
   +-----------+----------------------+------+-----------+---+---------+
   | Ah        | ampere-hour          | C    |      3600 | 0 | RFCthis |
   +-----------+----------------------+------+-----------+---+---------+
   | Wh        | watt-hour            | J    |      3600 | 0 | RFCthis |
   +-----------+----------------------+------+-----------+---+---------+
   | kWh       | kilowatt-hour        | J    |   3600000 | 0 | RFCthis |
   +-----------+----------------------+------+-----------+---+---------+
   | varh      | var-hour             | vars |      3600 | 0 | RFCthis |
   +-----------+----------------------+------+-----------+---+---------+
   | kvarh     | kilovar-hour         | vars |   3600000 | 0 | RFCthis |
   +-----------+----------------------+------+-----------+---+---------+
   | kVAh      | kilovolt-ampere- kilovolt-ampere-hour | VAs  |   3600000 | 0 | RFCthis |
   |           | hour              |       |           |     |         |
   +-----------+----------------------+------+-----------+---+---------+
   | Wh/km     | watt-hour per        | J/m  |       3.6 | 0 | RFCthis |
   |           | kilometer            |      |           |   |         |
   +-----------+----------------------+------+-----------+---+---------+
   | KiB       | kibibyte             | B    |      1024 | 0 | RFCthis |
   +-----------+----------------------+------+-----------+---+---------+
   | GB        | gigabyte             | B    |       1e9 | 0 | RFCthis |
   +-----------+----------------------+------+-----------+---+---------+
   | Mbit/s    | megabit per       | bit/s second   |bit/s |   1000000 | 0 | RFCthis |
   +-----------+----------------------+------+-----------+---+---------+
   | B/s       | byte per second      |bit/s |         8 | 0 | RFCthis |         |
   +-----------+----------------------+------+-----------+---+---------+
   | MB/s      | megabyte per      | bit/s second  |bit/s |   8000000 | 0 | RFCthis |
   |           | second            |       |           |     |         |
   +-----------+----------------------+------+-----------+---+---------+
   | mV        | millivolt            | V    |    1/1000 | 0 | RFCthis |
   +-----------+----------------------+------+-----------+---+---------+
   | mA        | milliampere          | A    |    1/1000 | 0 | RFCthis |
   +-----------+----------------------+------+-----------+---+---------+
   | dBm       | decibel (milliwatt)  | dBW  |         1 | -30 | |-30| RFCthis |
   |           | (milliwatt)       |       |           |     |         |
   +-----------+----------------------+------+-----------+---+---------+
   | ug/m3     | microgram per     | kg/m3 cubic  |kg/m3 |      1e-9 | 0 | RFCthis |
   |           | cubic meter                |      |           |   |         |
   +-----------+----------------------+------+-----------+---+---------+
   | mm/h      | millimeter per hour  | m/s  | 1/3600000 | 0 | RFCthis |
   |           | hour              |       |           |     |         |
   +-----------+----------------------+------+-----------+---+---------+
   | m/h       | meter per hour       | m/s  |    1/3600 | 0 | RFCthis |
   +-----------+----------------------+------+-----------+---+---------+
   | ppm       | parts per million    | /    |      1e-6 | 0 | RFCthis |
   +-----------+----------------------+------+-----------+---+---------+
   | /100      | percent (Note 1)     | /    |     1/100 | 0 | RFCthis |
   +-----------+----------------------+------+-----------+---+---------+
   | /1000     | permille             | /    |    1/1000 | 0 | RFCthis |
   +-----------+----------------------+------+-----------+---+---------+
   | hPa       | hectopascal          | Pa   |       100 | 0 | RFCthis |
   +-----------+----------------------+------+-----------+---+---------+
   | mm        | millimeter           | m    |    1/1000 | 0 | RFCthis |
   +-----------+----------------------+------+-----------+---+---------+
   | cm        | centimeter           | m    |     1/100 | 0 | RFCthis |
   +-----------+----------------------+------+-----------+---+---------+
   | km        | kilometer            | m    |      1000 | 0 | RFCthis |
   +-----------+----------------------+------+-----------+---+---------+
   | km/h      | kilometer per hour   | m/s  |     1/3.6 | 0 | RFCthis |
   |           | hour              |       |           |     |         |
   +-----------+-------------------+-------+-----------+-----+---------+
   +-----------+----------------------+------+-----------+---+---------+

               Table 2: Secondary units registered for SenML

   Note 1: This registration does not use the obvious name "%" because
   this name has been taken in [RFC8428] already, where it is a NOT
   RECOMMENDED synonym for "/" (unity) for legacy reasons.  Note that
   the presence of both "%" and "/100" with different meanings is likely
   to create confusion, so the present document adds some weight to the
   recommendation against using the counterintuitive unit name "%".

   Example: the value of a quantity given as 100 ms is first multiplied
   by 1/1000, yielding the number 0.1, and then the offset 0 is added,
   yielding the number 0.1 again, leading to a quantity of 0.1 s.  The
   value of a quantity given as 10 dBm is first multiplied by 1,
   yielding the number 10, and then the offset -30 is added, yielding
   the number -20, leading to a quantity of -20 dBW.

   New entries can be added to the registration by Expert Review as
   defined in [RFC8126].  Experts should exercise their own good
   judgment, with the same guidelines as used for SenML units
   (Section 12.1 of [RFC8428]), but without applying the rules 4, 5, and
   8.  Note that rule 7 limits the use of what could be understood as
   prefixes on their own, not the use of prefixes inside secondary unit
   names.  Guidelines to the difference between units (which can go into
   the registry) and quantities (which cannot) are widely available, see
   for instance [RS] and [BIPM].

   As of SenML version 10 [RFC8428], SenML packs are limited to using
   primary units in "u" fields.  The use of primary units enables direct
   comparison of measurements from different sources.  Also, it
   facilitates implementations that trigger on the presence of a
   quantity in a certain unit, without the need to track any additional
   secondary units that may be registered for this quantity.

   Where the benefits of directly using a secondary unit in a SenML pack
   outweigh the above considerations, the use of secondary units in "u"
   fields MAY be enabled by indicating a new SenML version that
   specifically allows this and/or by using a field with a label name
   that ends with the "_" character ("must-understand" field) whose
   definition specifically allows this.  The definition of these
   versions and fields is outside the scope of the present
   specification; one such definition is proposed in
   [I-D.bormann-core-senml-versions]. [SENML-VERSIONS].

4.  Operational Considerations

   The secondary unit registry is expected to grow at a faster pace than
   the registry of primary unit names.  It also is amenable to automatic
   interpretation, by making use of the scale and offset columns.

   Implementers may be tempted to equip each instance of their systems
   with code to download new versions of the registry from IANA
   frequently, in order to be able to make use of newly defined
   secondary unit names.  This can create high load at IANA and a
   potential single point of failure.  Instead of pulling the registry
   in each individual instance of the code, the software update
   mechanism (or a similar mechanism visiting IANA that leads to less frequently) frequent IANA
   visits) SHOULD be used to disseminate updated units registries
   obtained from IANA towards the instances via common repositories.

5.  Security Considerations

   The security considerations of [RFC8428] apply.

   The introduction of new measurement units poses no additional
   security considerations except from a possible potential for
   additional confusion about the proper unit to use, and from the risk
   that an implementation based on the assumption described in the
   penultimate paragraph of Section 3 no longer works properly.
   However, an implementation processing a pack while making use of
   secondary units is guaranteed to have been developed with an
   awareness of the risks of having multiple units available for the
   same logical type.  In any case, the existing risk of an existing
   SenML implementation not understanding a unit that was not in the
   initial registry content provided in [RFC8428], is unchanged, and
   implementations are warned properly about the potential use of
   secondary units by the need for a must-understand field or an updated
   version field.

6.  IANA Considerations

   See Section 2 and Section 3.

7.  References

7.1.  Normative References

   [IANA.senml]
              IANA, "Sensor Measurement Lists (SenML)",
              <http://www.iana.org/assignments/senml>.

   [IEC-80000-13]
              "Quantities and units - Part 13: Information science and
              technology", IEC 80000-13, Edition 1.0, IEC 80000-13, 1 March 2008.

   [IEC-80000-6]
              "Quantities and units - Part 6: Electromagnetism",
              IEC 80000-6,
              Edition 1.0, IEC 80000-6, 1 March 2008.

   [IEEE-1459]
              "IEEE Standard Definitions for the Measurement of Electric
              Power Quantities Under Sinusoidal, Nonsinusoidal,
              Balanced, or Unbalanced Conditions", IEEE Std 1459-2010,
              19 March 2010.

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119,
              DOI 10.17487/RFC2119, March 1997,
              <https://www.rfc-editor.org/info/rfc2119>.

   [RFC8126]  Cotton, M., Leiba, B., and T. Narten, "Guidelines for
              Writing an IANA Considerations Section in RFCs", BCP 26,
              RFC 8126, DOI 10.17487/RFC8126, June 2017,
              <https://www.rfc-editor.org/info/rfc8126>.

   [RFC8174]  Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
              2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
              May 2017, <https://www.rfc-editor.org/info/rfc8174>.

   [RFC8428]  Jennings, C., Shelby, Z., Arkko, J., Keranen, A., and C.
              Bormann, "Sensor Measurement Lists (SenML)", RFC 8428,
              DOI 10.17487/RFC8428, August 2018,
              <https://www.rfc-editor.org/info/rfc8428>.

7.2.  Informative References

   [BIPM]     Bureau International des Poids es Mesures, "The
              International System of Units (SI), 9th edition", 2019,
              <https://www.bipm.org/utils/common/pdf/si-brochure/SI-
              Brochure-9-EN.pdf>.

   [I-D.bormann-core-senml-versions]
              Bormann, C., "SenML: Features and Versions", draft-
              bormann-core-senml-versions-00 (work in progress),
              February 2020.

   [RS]       Rohde&Schwarz, "Standard-compliant usage of quantities,
              units and equations", version 4.0, November 2016,
              <https://karriere.rohde-schwarz.de/fileadmin/user_upload/
              Standard-compliant_usage_of_quantities_units_and_equations
              _bro_en_5214-5061-62_v0400_96dpi.pdf>.

   [SENML-VERSIONS]
              Bormann, C., "SenML Features and Versions", Work in
              Progress, Internet-Draft, draft-bormann-core-senml-
              versions-01, 6 March 2020, <https://tools.ietf.org/html/
              draft-bormann-core-senml-versions-01>.

Acknowledgements

   Ari Keranen pointed out the need for additional units in SenML.
   Comments provided by him as well as by Thomas Fossati, Joaquin Prado,
   Jaime Jimenez, Benjamin Kaduk, and Rob Wilton helped improve the
   document.

Author's Address

   Carsten Bormann
   Universitaet Bremen TZI
   Postfach 330440
   Bremen
   D-28359 Bremen
   Germany

   Phone: +49-421-218-63921
   Email: cabo@tzi.org