Re: [T2TRG] [One Data Model Group] [Asdf] Representation issues and protocol bindings

Bruce Nordman <bnordman@lbl.gov> Tue, 01 September 2020 16:00 UTC

Return-Path: <bnordman@lbl.gov>
X-Original-To: t2trg@ietfa.amsl.com
Delivered-To: t2trg@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 157533A058F for <t2trg@ietfa.amsl.com>; Tue, 1 Sep 2020 09:00:57 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.898
X-Spam-Level:
X-Spam-Status: No, score=-1.898 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=lbl-gov.20150623.gappssmtp.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yLvJ1O20p8Tw for <t2trg@ietfa.amsl.com>; Tue, 1 Sep 2020 09:00:54 -0700 (PDT)
Received: from mail-vs1-xe36.google.com (mail-vs1-xe36.google.com [IPv6:2607:f8b0:4864:20::e36]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D6D163A0D9E for <t2trg@irtf.org>; Tue, 1 Sep 2020 09:00:10 -0700 (PDT)
Received: by mail-vs1-xe36.google.com with SMTP id q67so898459vsd.5 for <t2trg@irtf.org>; Tue, 01 Sep 2020 09:00:10 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lbl-gov.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=B0TEZin/rRam2rHAAL8NI4kIQ8EwNLUF+yX4+g0emYU=; b=k7PFo509FfxlF3IRfnQC92M2T+TyssuMd6zUOgQjGhyYSzzZvOLowFVuQAAJsCaU62 NWrD816eqf97BCYTr3Kv9Tze47siyt6v9LrScgvheo/rhJAheGzs7ij8yAb4SdHjhhHS h9PJ5FRe68nptJEr/lHto9mxRjz+H919SEhXaIkihAfDOmLPiiYga/yaw0k5xJCseuu0 VRl7up9eUfT8I/FjSGvOat3taRVPjuz4aEYZb75mPl8r6WkqcbrDRhV+iOUHOV6M0BMT mF3/CwwXUf3H9s5By0wjwBdKcKzCT6WQp0IsF1QzQ2kn2nXmnxf/sMu0OtU+RYhBv6oD +/Hw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=B0TEZin/rRam2rHAAL8NI4kIQ8EwNLUF+yX4+g0emYU=; b=bjJL5GXbPKbLLTLPjhoZTSMvIB4KV4kprxeS2idkzPXN101pcWCRAvOizTpat+H5kY Ox7JHeDU1XldK8YjByY/4SFy2l9ALG37lyjKai5kcoVDVlJJSJ/GQIX20hYXY/r8PhFE gSV+Z+JbSJLg2U/nc1TALc66W/CyzKXmg7QMFZ/AdyDQwgQuo02wk2ZJT2g8qJtcfkRg VBAo3E/utt40GhMzERRlV1SKnNguOBCN3G4R3PgFIErhXGLElowvFpNXbY0uC/45KWO8 2EM5l+AYFdZzpL6vugHd0/dGQ6juDqH6wo0TCWQe8xNmiZXVCMk7ZO/ibGPWQ/Xaz7pj ooXw==
X-Gm-Message-State: AOAM53229R/4HvFqJSYfGi9jFIpYdzt4qjR2VpfhrQnxTMtVN4ZGKWu6 PS1y0dApLL+p0eNLFlODNxp6HRAXgNDur293bBUZEXNFghJe19f3k6dqLgE8CK2NCmpgfd/BVp0 NLfibBcPK/eoBL4U20xqFpji+PH+ETw4nlK4qD6OpwZ6s2f3CDb+WEqRLU0NNamz0LU29pAd7qT jmMm2IzQ==
X-Google-Smtp-Source: ABdhPJw+v0hBCO0EPTk32db74gBBuodXWmUP5rsCNcZZ1zEnPaEws8EJwGj0LlSz92pE5g4yxj4OyCevry7pypAKR/4=
X-Received: by 2002:a67:c81:: with SMTP id 123mr2208892vsm.225.1598976009314; Tue, 01 Sep 2020 09:00:09 -0700 (PDT)
MIME-Version: 1.0
References: <2ED86F4F-2926-4FBB-91A7-39F32FE7A970@tzi.org> <MWHPR11MB1838A7BB2F9D868DBF59B962D2510@MWHPR11MB1838.namprd11.prod.outlook.com> <BYAPR18MB2536E401A07C0F5DFF3376B6CE510@BYAPR18MB2536.namprd18.prod.outlook.com> <CAE5tNmoYSNPjndwo12O+RE+BdYG2bpadM1L6fAb+KKgairxkcw@mail.gmail.com> <A4218763-14BE-44DF-BB13-C248911CE84C@tzi.org> <CAE5tNmqJ=h2WvBf9Y8Z91as18_mtgO1crQG7S2+dgnigUSURbQ@mail.gmail.com>
In-Reply-To: <CAE5tNmqJ=h2WvBf9Y8Z91as18_mtgO1crQG7S2+dgnigUSURbQ@mail.gmail.com>
From: Bruce Nordman <bnordman@lbl.gov>
Date: Tue, 01 Sep 2020 08:59:58 -0700
Message-ID: <CAK+eDP85v9ubv_RBG-CWOq_F7f5LvPFbSotxEfDL1x4uu2YpJw@mail.gmail.com>
To: One Data Model Group <onedm@iotliaison.org>
Cc: "t2trg@irtf.org" <t2trg@irtf.org>, "asdf@ietf.org" <asdf@ietf.org>
Content-Type: multipart/alternative; boundary="0000000000000aa82005ae429d8a"
Archived-At: <https://mailarchive.ietf.org/arch/msg/t2trg/DrUg45iLAfwhSZrRLNsh0IkO7Uk>
Subject: Re: [T2TRG] [One Data Model Group] [Asdf] Representation issues and protocol bindings
X-BeenThere: t2trg@irtf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: IRTF Thing-to-Thing Research Group <t2trg.irtf.org>
List-Unsubscribe: <https://www.irtf.org/mailman/options/t2trg>, <mailto:t2trg-request@irtf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/t2trg/>
List-Post: <mailto:t2trg@irtf.org>
List-Help: <mailto:t2trg-request@irtf.org?subject=help>
List-Subscribe: <https://www.irtf.org/mailman/listinfo/t2trg>, <mailto:t2trg-request@irtf.org?subject=subscribe>
X-List-Received-Date: Tue, 01 Sep 2020 16:00:57 -0000

I am all in favor of using SI units, and existing good mechanisms for
encoding them (I assume SenML is a good choice), but once we have
established the name and meaning of a characteristic, we are almost done.
I think the bigger problem is when there are divergent structures for
describing a device or its capabilities, with different meanings and
namings (or worse, same name but different meanings).

This particularly comes up with devices that are similar but different.
Consider an electric resistance water heater that has a capacity value.  It
has just one as all electricity consumption is converted to heat in the
water. If another protocol addresses heat pump water heaters, then the
input and output capacities are different, and both (and the efficiency)
vary with both the water and air temperature.

In other cases, the interaction model is different. For example, I have
worked for a long time on the topic of 'energy reporting' - individual
devices tracking and reporting on their own energy use. Some models for
this have the end-use device keep track of time-series data, which requires
the ability of central devices to configure the timing of such data
collection. Another interaction model is that the central device is
responsible for the time-series data, so that the only interaction with the
end-use device is requests from the central device for their data. Thus the
information to be passed is dependent on the interaction model.

I'm sure there are many such instances in network technology of this.  I
remember years ago using uucp email addresses that did source routing of
the email, which is fundamentally different from the DNS based email we use
today.

The number of such problem domains is large, some may be intractable, and
others will take years for domain experts to solve. However, I think there
are a good number of ones that are addressable and can provide great value
to standardize and are worth addressing.  Some of these are domain-specific
to a particular device type, but others are 'horizontal' across many or all
(e.g. energy reporting, device types).  Creating a list of possible topics
to address, and prioritizing it to identify a small number to address
initially, seems worth doing. This to be a modest side-project, not to
distract from the current central flow of ODM work, but possibly growing
once other work is more complete.

Thanks,

--Bruce

On Tue, Sep 1, 2020 at 6:33 AM One Data Model Group <onedm@iotliaison.org>
wrote:

>
>
> On Mon, Aug 31, 2020 at 4:19 PM Carsten Bormann <cabo@tzi.org> wrote:
>
>> I think it is already relatively easy to find the right level of
>> abstraction for information that can be expressed in SI units.
>> (Units can be specified in SDF 1.0.)
>>
>> SenML (RFC 8428) got that right, so I think we can follow that example in
>> SDF.
>> We did have to make a little bit of a compromise (adding scaling prefixes
>> in RFC 8798) in areas where the natural units are habitually scaled (there
>> aren’t many electricity meters indicating J — it’s always kWh), but even
>> here it should be easy to agree on a natural unit between domain experts.
>>
>
>  SenML's primary units and secondary (scaled) units did get that right,
> with nomenclature and values that make sense to subject matter experts:
>
> {"u":"%RH", "v":20},
>
> {"u":"lon", "v":24.30621},
>
> {"u":"lat", "v":60.07965},
>
> {"n":"temperature","u":"Cel","v":25.2},
>
> {"n":"EGT", "u":"Fahr", "v":1374}
>
>
> (I made the last one up - the U.S. should have gone metric back in the 1970's, but it didn't.  In this backward part of the world subject matter experts
>
> might appreciate a familiar secondary unit of temperature.  "F" was already taken for farad, so ...)
>
>
> But the problem remains how the ecosystem specifications can relate to the
>> converged model if that had to abstract some more.  And that’s where the
>> binding comes in.  To make ecosystem experts feel at home, we probably need
>> to make this rather accessible.
>
> For information that is a ratio to a reference value (e.g., a lamp an
>> undefined metric of which can be set to a value between 0 to 100 %), SenML
>> has “/”  (the dimensionless unit).  So we would normally not use
>> percentages (or permille, or ppm, …), but a number that is typically
>> clamped between 0 and 1.  Of course, most ecosystems will scale this to get
>> an integer representation, and that is probably the largest source of
>> variation (*).
>>
>
> Are there separate problems to be solved?
> 1) Devices that could but for some reason don't send/receive data in
> meaningful units (e.g., uint8 values from 0 .. 255 or 0..100) instead of 38
> %RH?
> 2) Devices for which it is impossible to use absolute units (3.7 volts on
> a 10v dimmer circuit -> uint8 37 on a scale of 0-100 -> 0,37 dimensionless
> -> some level of room illumination that architects and occupational health
> people need to measure but consumers don't care about and the controller
> can't know)
> 3) Devices for which meaningful units haven't been defined?
>
>
>> Also, RFC 8798 is limited to linear scales (scale/offset).  For sound and
>> RF power levels we can cheat with dB.  For lighting, the models are more
>> complicated (which led to gamma and all that).  If different ecosystems use
>> different models here, there may be no straightforward way to do the
>> conversions.  So we have to be prepared to express these anyway.
>>
>
> A parametric model might be useful for problems 1 and 2.  Linear scales
> define min and max values for data (transmitted bits) and information
> (subject-meaningful values):
>
> -128  ->  -40.0 Cel
>  127 -> 300.0 Cel
>
> or
>
>   0 -> -40.0 Cel
> 65,536 -> 300.0 Cel
>
> But for SDF that could be generalized to allow calibration points, the way
> gradients in an image editor specify at least start and end colors, but may
> also add intermediate values.  The domain of the transfer function is
> scalar and integer or real, but the range is always real and could be
> non-linear and multi-dimensional:
>
> 0 -> (0.4, 0.8, 0.25)           min domain value
> 25 -> (0.5, 0.8, 0.9)           intermediate control point(s)
> 100 -> (0.0, 0.0, 0.1)         max domain value
>
> After doing linear interpolation to get the range values between control
> points, an output function selected from a list could be applied.  The
> initial list of output functions might be quite small - I can't think of
> any good examples other than linear and log:
>
> 1: linear: y = x
> 2: exponential: y = e^x
>
> The parametric model of a mapping table followed by an optional output
> curve might cover 95% of use cases instead of 80%.  Is it simple enough for
> an SDF description?
>
> Regards,
> Dave
>
>


-- 
*Bruce Nordman*
Lawrence Berkeley National Laboratory
*nordman.lbl.gov <http://nordman.lbl.gov>*
BNordman@LBL.gov
510-486-7089; m: 510-501-7943
m: 510-501-7943