Subject: [core] Proposed new SenML Units

From: Jaime Jiménez <[email-masked]>
Date: Mon, 9 Nov 2020 16:41:45 +0200

Dear CoRE and SeNML experts,

the IPSO WG has some new objects being registered that contain units
that are not currently present in the IANA SenML registry (
https://www.iana.org/assignments/senml/senml.xhtml ) nor derived
from it. We would like to discuss the addition of the units below:

+===========+================================+=======+
| Symbol    | Description                    | Type  |
+===========+================================+=======+
| NTU       | Nephelometric Turbidity Unit   | Float |
+-----------+--------------------------------+-------+
| mg/l      | milligrams per liter           | Float |
+-----------+--------------------------------+-------+

NTU is the most common way to measure turbidity. mg/l is used to measure
concentration, possibly g/l should also be added as shown in the table
below. 

On the secondary units table we would have the units below. 

+=========+======================+======+==========+======+
|Secondary| Description          |SenML |   Scale  |Offset| 
| Unit    |                      |Unit  |          |      |
+=========+======================+======+==========+======+
| ppb     | parts per billion    | /    |   1e-9   |    0 |
+---------+----------------------+------+----------+------+
| ppt     | parts per trillion   | /    |   1e-12  |    0 |
+---------+----------------------+------+----------+------+
| KB      | Kilobytes            | B    |    1000  |    0 |
+---------+----------------------+------+----------+------+
| VAh     | Volt Ampere x Hour   | kVAh |   1/1000 |    0 |
+---------+----------------------+------+----------+------+
| g/l     | grams per liter      | mg/l |     1000 |    0 |
+---------+----------------------+------+----------+------+

As to the KB addition, the reason is that many are still confused as to
whether KB is 1000 or 1024 bytes. If we are taking KB as 1000 bytes,
then having an entry in the table would be a good clarification to avoid
ambiguity.

ppt could be confused with parts per thousand by some, so I would like
to clarify in this email that "parts per thousand" would be the "/1000"
or "permille" entry in the secondary units registry. Please confirm this
as well. 

I believe the scale of ppb and ppt is correct, please double check just
in case. 

Thanks!
-- Jaime

---

From: Carsten Bormann <[email-masked]>
Date: Mon, 9 Nov 2020 16:12:58 +0100

Hi Jaime,

> On 2020-11-09, at 15:41, Jaime Jiménez <[email-masked]> wrote:
> 
> 

> NTU is the most common way to measure turbidity.

This one is interesting.  There are several Turbidity units, which are not in a simple linear relationship, so I would like to get some input from domain experts which ones we should have (and which are more of a historical interest).

> mg/l is used to measure

We already have    
kg/m3    kilogram per cubic meter (mass density, mass concentration) float [RFC8798]

One mg/l is 1/1000 kg/m3, so that would go into table 2.

> |Secondary| Description          |SenML |   Scale  |Offset| | Unit    |                      |Unit  |          |      |

VAh should be on the SI base unit, i.e.:

   VAh           volt-ampere-hour      VAs        3600   0

g/l is a synonym for kg/m3 (i.e. scale=1); that is not strictly needed but could be added if the g/l people can’t adjust to kg/m3.

> whether KB is 1000 or 1024 bytes.

KB = Kelvin-Byte, pretty much nonsensical.
kB is 1000 B, which is not very widely used.
KiB is 1024 B, which we already have.

> If we are taking KB as 1000 bytes,

KB is like kph, it’s not properly defined and should not be added.

> or "permille" entry in the secondary units registry. Please confirm this

Yes.
So, after adding ppb and ppt, we’ll have
/  /100  /1000  ppm   ppb   ppt
1  0.01  1e-3   1e-6  1e-9  1e-12

> I believe the scale of ppb and ppt is correct, please double check just

Yes.

Grüße, Carsten

---

From: Michael Koster <[email-masked]>
Date: Mon, 9 Nov 2020 07:43:42 -0800

> On Nov 9, 2020, at 7:12 AM, Carsten Bormann <[email-masked]> wrote:
> 
>> 

FWIW

While I'm not specifically a domain expert, I do have experience in a water turbidity measurement program.

I was responsible for process control and measurement systems in a large number of oil & gas installations in Alaska in the 1980s (please no "historical interest jokes...)

One of the installations was a water injection facility that needed to be accountable for the purity of the water injected into the ground over a period of decades. We maintained a fleet of "Surface-Scatter Turbidimeters" which measured turbidity in NTU. I was responsible for calibration of the machines and "certification" of the measurement record.

Turbidity is an indirect measure of suspended solids in water or other fluid, measured according of the amout of light blocked from transmission through the fluid. The Surface-Scatter Turbidimeter, or Nephelometer, measures the diffraction of light from surface roughness caused by the suspended solids. Standard solutions or cards (for field calibration) are used to calibrate the measurements.

A quick check on Wikipedia and discussion with an acquaintance who is a (retired) water treatment consultant (chemical salesman) confirms that NTU is still the metric of choice, though some facilities that know what their contaminants are can convert it to a concentration unit like ug/l for "internal" use.

Best regards,

Michael

---

From: Jaime Jiménez <[email-masked]>
Date: Mon, 16 Nov 2020 11:19:26 +0200

Hi Carsten,

>This one is interesting.  There are several Turbidity units, which are not in a simple linear relationship, so I would like to get some input from domain experts which ones we should have (and which…

AFAIK NTU was chosen by the experts of the uCIFI Alliance, who work on
the "Smart Water" domain field. Also Michael Koster commented on this
thread on the NTU usage. 

>One mg/l is 1/1000 kg/m3, so that would go into table 2.

That sounds very good to me. 

>   VAh           volt-ampere-hour      VAs        3600   0

OK

>g/l is a synonym for kg/m3 (i.e. scale=1); that is not strictly needed but could be added if the g/l people can’t adjust to kg/m3.

If it's not much effort, having g/l would help.

>KiB is 1024 B, which we already have.

Yes, sorry not KB but kB.
>KB is like kph, it’s not properly defined and should not be added.

I agree kB is not used in practice, though when people use KiB they
often call it kB still. Perhaps that's off-topic when it comes to senml.

>1  0.01  1e-3   1e-6  1e-9  1e-12

OK!

>> I believe the scale of ppb and ppt is correct, please double check just

OK!

---

From: Jaime Jiménez <[email-masked]>
Date: Mon, 16 Nov 2020 11:22:13 +0200

Hi Michael, 

thank you very much for your confirmation and insights on the topic. 
I now wonder if we should add ug/l as well as NTU. For IPSO it looks like NTU would be sufficient.

Ciao!
-- Jaime

---

From: Carsten Bormann <[email-masked]>
Date: Mon, 16 Nov 2020 17:38:09 +0100

> On 2020-11-16, at 10:22, Jaime Jiménez <[email-masked]> wrote:
> 
> thank you very much for your confirmation and insights on the topic. I now wonder if we should add ug/l as well as NTU. For IPSO it looks like NTU would be sufficient.

Note that we already have    
ug/m3          microgram per cubic meter kg/m3      1e-9      0      [RFC8798]

So adding ug/l would be like
ug/l          microgram per liter        kg/m3      1e-6      0

This scaled unit of mass concentration is useful beyond Turbidity; e.g. as in "the U.S. EPA set the maximum allowable concentration of lead in public drinking water at 15 µg/L” (asciified as “ug/l”).

I think we could use an updated version of the original mail so we can initiate registration from that.

Grüße, Carsten

---

From: Jaime Jiménez <[email-masked]>
Date: Mon, 16 Nov 2020 23:59:49 +0200

Hi Carsten,

The updated version of the tables in the original email would be the ones below, please
have a look and verify I did not intriduce new errors:

On the SenML Units registry:

+===========+================================+=======+                       
| Symbol    | Description                    | Type  |
+===========+================================+=======+                                                                | NTU       | Nephelometric Turbidity Unit   | Float |                      
+-----------+--------------------------------+-------+

On the Secondary Units registry:

+=========+======================+======+==========+======+
|Secondary| Description          |SenML |   Scale  |Offset|
| Unit    |                      | Unit |          |      |
+=========+======================+======+==========+======+
| ppb     | parts per billion    | /    |   1e-9   |    0 |
+---------+----------------------+------+----------+------+
| ppt     | parts per trillion   | /    |   1e-12  |    0 |
+---------+----------------------+------+----------+------+
| VAh     | volt-ampere hour     | VAs  |    3600  |    0 |
+---------+----------------------+------+----------+------+
| mg/l    | milligrams per liter | kg/m3|   1/1000 |    0 |
+---------+----------------------+------+----------+------+
| ug/l    | microgram per liter  | kg/m3|   1e-6   |    0 |  
+---------+----------------------+------+----------+------+
| g/l     |  grams per liter     | kg/m3|     1    |    0 |
+---------+----------------------+------+----------+------+   

Ciao!
-- Jaime

---

From: Carsten Bormann <[email-masked]>
Date: Mon, 16 Nov 2020 23:16:25 +0100

On 2020-11-16, at 22:59, Jaime Jiménez <[email-masked]> wrote:
> intriduce new errors:

Something weird happened with the table lines.

The units need to be singular, i.e., milligram, not milligrams.

(For ppb, ppt we probably want to stay with “parts per…” as this is vernacular anyway.)

Grüße, Carsten