Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
RETROFIT DEVICE AND METHOD OF RETROFITTING AND ANALYSING A FLOW METER
Document Type and Number:
WIPO Patent Application WO/2018/152350
Kind Code:
A1
Abstract:
A retrofit device and method of installing such a device for supplementing a legacy flow meter in a fluid pipe system. The retrofit device enhances the function of the legacy flow meter by providing a digital interface and means for error diagnostics and tamper detection. The retrofit device adapts to the mechanical and casing form factor design of the legacy flow meter, particularly a flow meter already installed, such as buried in the ground. An infrastructure and methods for the analysis of flow in pipe systems. In a preferred form, the infrastructure and methods account for energy status of a sensor device and wear cost functions. The infrastructure comprises a controller and a plurality of sensor devices coupled to the pipe system to collect measurements related to one or more of the following: vibration, magnetic field, fluid pressure, temperature, humidity, chemical composition of the fluid, fluid flow or fluid throughput. The controller has access to a database containing one or both of— (i) current energy status of a sensor device and/or (ii) a cost allocation relating to use of a sensor device and assigns workloads using energy status and/or cost.

Inventors:
MACKIE DAVID (US)
GREFEN STEFAN (US)
BOELTER COREY JAMES (US)
JAEHDE ASTRID (US)
Application Number:
PCT/US2018/018404
Publication Date:
August 23, 2018
Filing Date:
February 15, 2018
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
OLEA NETWORKS INC (US)
International Classes:
G01D4/00; H04Q9/00; G01F1/56; G01F1/60; G01M3/28
Domestic Patent References:
WO2014089249A12014-06-12
WO2015132687A12015-09-11
Foreign References:
US20090322884A12009-12-31
US8279080B22012-10-02
US9506785B22016-11-29
US20160286490A12016-09-29
US20160261115A12016-09-08
US20160018283A12016-01-21
Attorney, Agent or Firm:
BURKETTE, Scott L. (US)
Download PDF:
Claims:
CLAIMS

WHAT IS CLAIMED IS:

1. A method of retrofitting an already installed legacy flow meter having a meter display, comprising: connecting a retrofit device to said flow meter, said retrofit device having a camera positioned when connected to said flow meter to record the meter display; powering said retrofit device with an autonomous power source; transmitting the camera record periodically to a network; and receiving commands from the network to perform a function with the retrofit device.

2. The method of claim 1, said transmitting step based on a time interval, request from the network, or both.

3. The method of claim 1, the received network commands comprising a command to record said meter display.

4. The method of claim 1, the meter display comprising one or more of flow rate, cumulative flow or fluid pressure for said legacy flow meter.

5. The method of claim 1, including a magnetic coupling driving said display of said legacy flow meter, further comprising: positioning one or more magnetic sensors proximate said magnetic coupling, and detecting the variation in the strength of the magnetic field of the magnetic coupling.

6. The method of claim 5, including, determining the rotation of the magnetic coupling over a time interval, computing flow volume over said time interval through the flow meter, comparing said computed flow volume with a flow volume derived from said camera record.

7. The method of claim 1, said retrofit device including a controller operable for determining time intervals for periodically recording said meter display and transmitting said recording to said network.

8. The method of claim 6, determining abnormalities in said flow meter based on said comparing step.

9. A retrofit device adapted for installation to an autonomous, already installed flow meter having a meter display having a magnetic coupling, the retrofit device comprising: one or more magnetic sensors positioned proximate said magnetic coupling and operative for detecting the variation in the strength of the magnetic field of the magnet coupling; a controller connected to the magnetic sensors to determine rotation of the magnetic coupling over a time interval and compute flow volume through the flow meter for the time interval; a camera positioned to record the meter display at the beginning and end of said time interval, whereby the flow volume of the flow meter can be determined from said camera record and compared with the computed flow volume by said controller.

10. The retrofit device of claim 9, whereby said device includes a ring adapter for mounting at least a portion of said device adjacent said meter display.

11. The retrofit device of claim 9, whereby said device includes an autonomous power source.

12. The retrofit device of claim 9, whereby said device includes a network connection.

13. The retrofit device of claim 9, wherein the comparison of the computed flow volume with the determined flow volume is used to diagnose errors in the flow meter.

14. The retrofit device of claim 9, wherein the comparison of the computed flow volume with the determined flow volume is used detect tampering with the flow meter.

15. The retrofit device of claim 13, wherein the error diagnostics of the flow meter include one or more of: misalignment or deformation of magnetic coupling components; backpressure in a pipe; meter display error or failure; debris or sediment build up in the flow meter; gearbox blockage; or tamper attempts.

16. A method of measuring fluid throughput through an already installed flow meter by observing mechanical components of the flow meter, the flow meter having a meter display and a magnetic coupling, comprising: positioning one or more magnetic sensors proximate said magnetic coupling to sense rotation of the magnetic coupling; recording with the magnetic sensors a time series of signals indicative of the variation of strength of the magnetic field of the magnetic coupling;

analyzing the time series of signals to determine the number of rotations during a time interval; and calculating the flow volume of fluid flow through the flow meter over the time interval.

17. The method of claim 16, including determining the flow rate of fluid through the flow meter.

18. The method of claim 16, including knowing the fluid flow of one rotation of the magnetic coupling to assist in calculating flow volume.

19. The method of claim 16, including recording the meter display with a camera at the beginning and end of said time interval, whereby the meter display indicates cumulative fluid flow, determining fluid flow through the flow meter using the camera record and comparing the camera record fluid flow with the calculated flow volume.

20. A system of sensor devices connected to a pipe system transporting a fluid, comprising: a plurality of sensor devices operatively coupled to the pipe system to collect measurements related to one or more of the following: vibration, magnetic field, fluid pressure, temperature, humidity, chemical compensation of the fluid, fluid flow or fluid throughput; each sensor device having an autonomous power source, a current energy status and a network connector; a network connecting a number of said sensor devices through said network connectors; a controller connected to the network and to the number of sensor devices and to a database containing one or both of--(i) current energy status of a sensor device, (ii) a cost allocation relating to use of a sensor device; the controller being operable to determine assigned workloads to one or more of said number of sensor devices based on one or both of--(i) maximizing the number of workloads performed by said sensor devices based at least in part on current energy status, (ii) said cost allocation relating to use of a sensor device, the controller being operable to command operation of one or more of said number of sensor devices based on said assigned workloads by communicating through the network to said sensor devices.

21. The system of claim 20, said current energy status comprising charge status of a battery powering a sensor device.

22. The system of claim 20, said cost allocation comprising wear schedule of a sensor device before required maintenance and the cost of the required maintenance.

23. The system of claim 20, said cost allocation comprising wear schedule of a sensor device before failure of said sensor device.

24. The system of claim 20, said assigned workloads also based on priority of workload.

25. The system of claim 20, said assigned workloads comprising determining back pressure in the pipe system.

26. The system of claim 20, one of said assigned workloads comprising fluid flow rate at a location in the pipe system.

27. The system of claim 26, said assigned workloads comprising determining flow rate at said location over a time interval to determine fluid throughput in the pipe system.

28. The system of claim 27, said assigned workloads comprising determining fluid throughput at a second location and comparing the fluid throughput at the first and second locations to determine fluid leaks.

29. The system of claim 20, wherein said controller communicates through the network to a sensor device using a peer to peer scheme.

30. The system of claim 20, the pipe system comprising a municipal potable water distribution system and the sensor devices being distributed over a wide geographic area.

31. A method of operating a network of sensor devices connected to a pipe system transporting a fluid, comprising: communicating the energy status of a number of said sensor devices through a network to a controller; scheduling a workload for one or more sensor devices with the controller based at least in part on one or both of— (i) current energy status of a sensor device, (ii) a cost allocation relating to use of a sensor device; communicating the scheduled workload to a sensor device through the network.

32. The method of claim 31, the scheduled workloads of said sensor devices comprising collecting measurements related to one or more of the following: vibration, magnetic field, fluid pressure, temperature, humidity, chemical compensation of the fluid, fluid flow or fluid throughput.

33. The method of claim 31, determining the current energy status based at least in part on the charge status of a battery powering a sensor device.

34. The method of claim 31, determining said cost allocation based on a wear schedule of a sensor device before required maintenance and the cost of the required maintenance.

35. The method of claim 31, using said scheduled workloads for determining one or more of—back pressure in the pipe system, fluid flow rate at a location in the pipe system, fluid throughput in the pipe system, fluid leaks.

36. The method of claim 31, recording the measurements in a database to analyze the current state of the pipe system.

Description:
RETROFIT DEVICE AND METHOD OF RETROFITTING AND ANALYSING A FLOW

METER

CROSS-REFERENCE

[0001] This application is a continuation of application of U.S. Non-Provisional Application No.15/433,507, filed February 15, 2017, and U.S. Non-Provisional Application No. 15/433,603, filed February 15, 2017, each of which are incorporated herein by reference in its entireties.

BACKGROUND

Field of the Invention

[0002] In one form, the invention hereof presents a retrofit device for supplementing a legacy flow meter with a digital interface for control and data transmission. A primary embodiment of the invention includes a retrofit device for a legacy turbine flow meter used in a pipe system. Aside providing a digital interface, the presented retrofit device enhances the function of the legacy flow meter by adding means for error diagnostics and tamper detection. The presented design also solves various challenges arising from the requirement to adapt the retrofit device to the mechanical and casing form factor design of the legacy flow meter, particularly a flow meter already installed, such as buried in the ground.

[0003] In general, the present invention relates to infrastructure and methods for the analysis of flow in pipe systems. In a preferred form, the infrastructure and methods account for energy status of a sensor device and wear cost functions.

[0004] Many industrial or technical installations contain a substantial number of measurement or control devices that function on a purely mechanical basis. In many such installations a

measurement or control device may have a part of its function realized by electrical or electronic components, but its capabilities for remote control or digital transmission of data are inadequate for integration into modern management systems, such as for centralized control, accounting, or data mining.

[0005] The term legacy device in general is applied herein to devices in industrial or technical installations, that are primarily mechanical and often do not accommodate recent technical advancements, or contemporary requirements. Typically, this means such installations are not enabled with a digital interface or with an outdated one, which prevents integration of them into modern systems for networking, automation, and data management. Legacy devices abound in industrial and technical installations, for instance in mining, agriculture, transport, or a utility system in an urban area. Examples of legacy devices are mechanical valves, flow or pressure meters, levers or shutoff devices in pipe installations, or recording devices for environmental data that function on a purely mechanical basis.

[0006] Such legacy devices ideally would be upgraded to newer designs, equipped with a digital interface and enabled for remote control, yet often there are outweighing reasons for their replacement. Such legacy devices often have a complex, mature design that is proven in terms of reliability and longevity. Also, replacing a legacy device with a new one that is digitally enabled and has equal functionality may not be economical to do. Aside from design and production costs, the expense of replacing a legacy device in a technical installation may be considerable. For instance, exchanging a flow meter or pressure valve in a pipe system may require a complete shutoff of large sections of the pipe infrastructure and be a substantial manual labor effort. Further, a legacy device may not be upgraded for reasons of compliance with safety or other standards, if a standards qualification is costly or nor a priority for a regulatory body.

[0007] Notwithstanding reasons to keep legacy devices in place, there are compelling reasons for their digital enablement, for remote control, monitoring and data transmission. For example, equipping flow meters in a pipe installation for remote, real time data collection provides new uses and diagnostic capabilities for the pipe system. For instance, by means of simultaneous data collection, leaks in the pipe system may be detected. Also, obtaining real-time usage data in a residential water supply infrastructure would allow for billing system with rates depending on the time of day.

[0008] Though desirable, retroactively equipping a legacy device for digital monitoring and data transmission has many challenges. Such design has many requirements, posed by the existing installation in terms of form factor and function. For instance, there are limitations in the placement of sensors, typically required for enabling a device with mechanical parts with a digital interface. A design to retrofit a legacy device for digital enablement often has the requirement that the enclosure of the legacy device cannot be opened or tampered with, or its mechanical parts not be affected in any manner. Also, the retrofit of a device with a digital interface should not obstruct the uses that device has been designed for.

[0009] Recent technological advancements in the realm of IoT and wireless communication make it feasible to design pipe infrastructures that extend across large geographic areas for automated control and monitoring. While digital control has been integrated into the designs of spatially constrained pipe installations for a long time, for instance in factories and chemical processing plants, enabling it for geographically distributed pipe systems is challenging. Control and monitoring devices often need to be installed at locations without access to the electric grid, requiring such devices to function autonomously, on a small energy footprint. [0010] Presently, many efforts are underway to upgrade water meters in municipal water supply systems with so called smart meters. A smart meter is a digitally enabled flow meter, that presents the measured throughput and possibly other data in digital format, is capable of transmitting data by means of a network and enabled for communication and coordination of actions with a

management system. Adoption of smart meter technologies though is slow for several reasons, one of them being the lack of maturity of many aspects of IoT technologies. A legacy flow meter, working on a purely mechanical basis, typically has an expected lifespan of 15 years or more. Many electronic components in IoT device fall short of these lifetimes, more so if deployed outdoors, in harsh climate conditions. For instance, a rechargeable Lithium-ion battery has an expected lifetime of three years in hot climates, whereby the temperature exposure is the main factor for battery aging, rather than the number of recharge cycles. Using rewriteable memory or storage devices with a maximum number of program-erase cycles, such as SSD storage devices, requires careful design, to avoid premature wear. Short lifespans of many components, limiting the overall lifetime of the device, or increasing maintenance costs, are one reason for the slow adoption of smart meters. The cost versus benefit analysis presently is not in favor of them.

[0011] A legacy flow meter is a flow meter that does not have a digital interface or if it has one, its capabilities does not satisfy the requirements for integration into a system for the management of smart meters. For instance, a flow meter that functions on a purely mechanical basis, or a flow meter that has a digital interface but no capabilities for long range data transmission by means of a network are regarded as legacy flow meters. See U.S. patent application, "Retrofit Device and Method of Retrofitting a Flow Meter" filed concurrently herewith (Att. Dock. #5654-0601) (incorporated by reference). This "Retrofit Device" patent application presents the design of a retrofit device for a legacy flow meter, to enable a legacy flow meter with a mean to digitally represent and transmit measurement data. Aside from the cumulative throughput since installation, typically presented on a flow meter, the retrofit device provides the current rate of flow and is equipped with sensors to collect additional measurement data, such as vibration signals measured in proximity of the pipe envelope.

[0012] Retrofit devices reduce the adoption cost for smart meter technology, since equipping a legacy flow meter with a retrofit device avoids the costs associated with replacing that flow meter, which would requires interrupting a pipe. Also, retrofit devices reduce the risk associated with the introduction of new technology. In case of a premature failure of a device, replacement costs are smaller, and, moreover, the legacy flow meter that has been retrofitted, still in place, serves as a functional fallback option. [0013] Pipe infrastructures frequently are old and costly to upgrade, and have defects that are hard to diagnose. For instance, in municipal water supply systems, up to 20% of water is assumed to be lost due to leaks in pipes. Yet pipe leaks are difficult and costly to find, and thus this often is not attempted. Another problem are underreporting water meters, caused by wear or a premature failure of parts under adverse conditions. For instance, turbine flow meters may be affected by sediment build-up near the turbine or the occurrence of back pressure in the pipe, which may lead to gradual or sudden failures.

[0014] Both leaks in pipes and underreporting flow meters, are difficult to identify. To determine either condition, one needs to essentially measure throughput in a pipe before and after the location where it is suspected. This typically is infeasible or very costly to do, since it requires an interruption of the pipe envelope and insertion of a measurement instrument into the pipe. Leaks in pipes are often diagnosed by means of analyzing vibration signals. This is a manual, labor intense process, requiring the placement of devices that generate or record sound waves in proximity to pipes at probe points.

[0015] Having a pipe system comprehensively equipped with smart devices, capable of capturing measurement data and transmitting them in digital format, allows for large scale data collections, concurrently at many measuring points. Such data might be used for the detection of water leaks or defects in flow meters, correlating measurement data of multiple types, including the rate of throughput and vibration signals. However, smart meters operate on a limited energy budget, as they are frequently not connected to the electrical grid. Designs of such systems for water leak detection need to take into account the constraints set by a limited battery power and computational capacity.

SUMMARY

[0016] The problems outlined above are addressed by one or more of the embodiments of the present invention. Broadly speaking the present invention includes a method of retrofitting an already installed legacy flow meter having a mechanical meter display, connecting a retrofit device to the flow meter, where the retrofit device has a camera positioned when connected to flow meter to record the meter display. The method includes powering the retrofit device with an autonomous power source, transmitting the camera record periodically to a network; and receiving commands from the network to perform a function with the retrofit device. Preferably the function is to command the retrofit device to record the meter display, e.g. with a camera.

[0017] In a broad aspect the present invention also addresses a retrofit device adapted for installation to an autonomous, already installed flow meter having a mechanical meter display with a magnetic coupling, e.g. the magnetic coupling drives the meter display. The device includes one or more magnetic sensors positioned proximate the magnetic coupling and is operative for detecting the variation in the strength of the magnetic field of the magnet coupling. The device also includes a controller connected to the magnetic sensors to determine rotation of the magnetic coupling over a time interval and to compute flow volume through the flow meter for the time interval. A camera is positioned to record the meter display at the beginning and end of said time interval, whereby the flow volume of the flow meter can be determined from the camera record and compared with the computed flow volume by said controller.

[0018] In another aspect the invention includes a method of measuring fluid throughput through an already installed flow meter by observing mechanical components of the flow meter, where the flow meter has a meter display and a magnetic coupling. The method includes positioning one or more magnetic sensors proximate the magnetic coupling to sense rotation of the magnetic coupling and recording with the magnetic sensors a time series of signals indicative of the variation of strength of the magnetic field of the magnetic coupling. The method then analyzes the time series of signals to determine the number of rotations during a time interval; and calculates the flow volume of fluid flow through the flow meter over the time interval.

[0019] Provided herein is a method of retrofitting an already installed legacy flow meter having a meter display, comprising: connecting a retrofit device to said flow meter, said retrofit device having a camera positioned when connected to said flow meter to record the meter display;

powering said retrofit device with an autonomous power source; transmitting the camera record periodically to a network; and receiving commands from the network to perform a function with the retrofit device.

[0020] In some embodiments, said transmitting step based on a time interval, request from the network, or both. In some embodiments, the received network commands comprising a command to record said meter display. In some embodiments, the meter display comprising one or more of flow rate, cumulative flow or fluid pressure for said legacy flow meter. In some embodiments, the method further includes a magnetic coupling driving said display of said legacy flow meter, further comprising: positioning one or more magnetic sensors proximate said magnetic coupling, and detecting the variation in the strength of the magnetic field of the magnetic coupling. In some embodiments, the method further includes determining the rotation of the magnetic coupling over a time interval, computing flow volume over said time interval through the flow meter, comparing said computed flow volume with a flow volume derived from said camera record In some embodiments, said retrofit device including a controller operable for determining time intervals for periodically recording said meter display and transmitting said recording to said network. In some embodiments, the method further comprises determining abnormalities in said flow meter based on said comparing step.

[0021] Another aspect provided herein is a retrofit device adapted for installation to an

autonomous, already installed flow meter having a meter display having a magnetic coupling, the retrofit device comprising: one or more magnetic sensors positioned proximate said magnetic coupling and operative for detecting the variation in the strength of the magnetic field of the magnet coupling; a controller connected to the magnetic sensors to determine rotation of the magnetic coupling over a time interval and compute flow volume through the flow meter for the time interval; a camera positioned to record the meter display at the beginning and end of said time interval, whereby the flow volume of the flow meter can be determined from said camera record and compared with the computed flow volume by said controller.

[0022] In some embodiments, said device includes a ring adapter for mounting at least a portion of said device adjacent said meter display. In some embodiments, said device includes an autonomous power source. In some embodiments, said device includes a network connection. In some embodiments, the comparison of the computed flow volume with the determined flow volume is used to diagnose errors in the flow meter. In some embodiments, the comparison of the computed flow volume with the determined flow volume is used detect tampering with the flow meter. In some embodiments, the error diagnostics of the flow meter include one or more of: misalignment or deformation of magnetic coupling components; backpressure in a pipe; meter display error or failure; debris or sediment build up in the flow meter; gearbox blockage; or tamper attempts.

[0023] Another aspect provided herein is a method of measuring fluid throughput through an already installed flow meter by observing mechanical components of the flow meter, the flow meter having a meter display and a magnetic coupling, comprising: positioning one or more magnetic sensors proximate said magnetic coupling to sense rotation of the magnetic coupling; recording with the magnetic sensors a time series of signals indicative of the variation of strength of the magnetic field of the magnetic coupling; analyzing the time series of signals to determine the number of rotations during a time interval; and calculating the flow volume of fluid flow through the flow meter over the time interval.

[0024] In some embodiments, the method further includes determining the flow rate of fluid through the flow meter. In some embodiments, the method further includes knowing the fluid flow of one rotation of the magnetic coupling to assist in calculating flow volume. In some

embodiments, the method further includes recording the meter display with a camera at the beginning and end of said time interval, whereby the meter display indicates cumulative fluid flow, determining fluid flow through the flow meter using the camera record and comparing the camera record fluid flow with the calculated flow volume.

[0025] Another aspect provided herein is a system of sensor devices connected to a pipe system transporting a fluid, comprising: a plurality of sensor devices operatively coupled to the pipe system to collect measurements related to one or more of the following: vibration, magnetic field, fluid pressure, temperature, humidity, chemical compensation of the fluid, fluid flow or fluid throughput; each sensor device having an autonomous power source, a current energy status and a network connector; a network connecting a number of said sensor devices through said network connectors; a controller connected to the network and to the number of sensor devices and to a database containing one or both of--(i) current energy status of a sensor device, (ii) a cost allocation relating to use of a sensor device; the controller being operable to determine assigned workloads to one or more of said number of sensor devices based on one or both of--(i) maximizing the number of workloads performed by said sensor devices based at least in part on current energy status, (ii) said cost allocation relating to use of a sensor device, the controller being operable to command operation of one or more of said number of sensor devices based on said assigned workloads by communicating through the network to said sensor devices.

[0026] In some embodiments, current energy status comprising charge status of a battery powering a sensor device. In some embodiments, said cost allocation comprising wear schedule of a sensor device before required maintenance and the cost of the required maintenance. In some

embodiments, said cost allocation comprising wear schedule of a sensor device before failure of said sensor device In some embodiments, said assigned workloads also based on priority of workload. In some embodiments, said assigned workloads comprising determining back pressure in the pipe system. In some embodiments, one of said assigned workloads comprising fluid flow rate at a location in the pipe system. In some embodiments, said assigned workloads comprising determining flow rate at said location over a time interval to determine fluid throughput in the pipe system. In some embodiments, said assigned workloads comprising determining fluid throughput at a second location and comparing the fluid throughput at the first and second locations to determine fluid leaks In some embodiments, wherein said controller communicates through the network to a sensor device using a peer to peer scheme. In some embodiments, the pipe system comprising a municipal potable water distribution system and the sensor devices being distributed over a wide geographic area.

[0027] Another aspect provided herein is a method of operating a network of sensor devices connected to a pipe system transporting a fluid, comprising: communicating the energy status of a number of said sensor devices through a network to a controller; scheduling a workload for one or more sensor devices with the controller based at least in part on one or both of— (i) current energy status of a sensor device, (ii) a cost allocation relating to use of a sensor device; communicating the scheduled workload to a sensor device through the network.

[0028] In some embodiments, the scheduled workloads of said sensor devices comprising collecting measurements related to one or more of the following: vibration, magnetic field, fluid pressure, temperature, humidity, chemical compensation of the fluid, fluid flow or fluid throughput. In some embodiments, the method further comprises determining the current energy status based at least in part on the charge status of a battery powering a sensor device. In some embodiments, the method further comprises said cost allocation based on a wear schedule of a sensor device before required maintenance and the cost of the required maintenance. In some embodiments, said scheduled workloads for determining one or more of—back pressure in the pipe system, fluid flow rate at a location in the pipe system, fluid throughput in the pipe system, fluid leaks. In some embodiments, the measurements in a database to analyze the current state of the pipe system.

[0029] The problems outlined above are addressed by one or more of the embodiments of the present invention. In a broad form a system in accordance with the present invention comprises a plurality of sensor devices operatively coupled to the pipe system to collect measurements related to one or more of the following: vibration, magnetic field, fluid pressure, temperature, humidity, chemical composition of the fluid, fluid flow or fluid throughput. Each sensor device of the system has an autonomous power source, a current energy status and a network connector. The system includes a network and a controller, where the network connects a number of said sensor devices through said network connectors to the controller. The controller has access to a database containing one or both of— (i) current energy status of a sensor device, (ii) a cost allocation relating to use of a sensor device. In the system, the controller operates to determine assigned actions to one or more of said number of sensor devices based on one or both of— (i) maximizing the number of actions performed by said sensor devices based at least in part on current energy status, (ii) said cost allocation relating to use of a sensor device. The controller also operates to command operation of one or more of said number of sensor devices based on said assigned actions by communicating through the network to said sensor devices.

[0030] A preferred method operates a network of sensor devices connected to a pipe system transporting a fluid by communicating the energy status of a number of said sensor devices through a network to a controller. The controller schedules an action for one or more sensor devices based at least in part on one or both of— (i) current energy status of a sensor device, (ii) a cost allocation relating to use of a sensor device. The controller then communicates the scheduled action to a sensor device through the network. [0031] Preferably, in the method the scheduled actions of said sensor devices comprises collecting measurements related to one or more of the following: vibration, magnetic field, fluid pressure, temperature, humidity, chemical compensation of the fluid, fluid flow or fluid throughput. In a preferred form the cost allocation is based on a wear schedule of a sensor device before required maintenance and the cost of the required maintenance. In another preferred form, the scheduled actions are used for determining one or more of—back pressure in the pipe system, fluid flow rate at a location in the pipe system, fluid throughput in the pipe system, fluid leaks.

INCORPORATION BY REFERENCE

[0032] All publications, patents, and patent applications mentioned in this specification are herein incorporated by reference to the same extent as if each individual publication, patent, or patent application was specifically and individually indicated to be incorporated by reference.

BRIEF DESCRIPTION OF THE DRAWINGS

[0033] The novel features of the invention are set forth with particularity in the appended claims. A better understanding of the features and advantages of the present invention will be obtained by reference to the following detailed description that sets forth illustrative embodiments, in which the principles of the invention are utilized, and the accompanying drawings of which:

[0034] Other objects and advantages of the invention will become apparent upon reading the following detailed description and upon reference to the accompanying drawings.

[0035] FIG. 1 is a block diagram of a device in accordance with the present invention in the context of an IoT device;

[0036] FIG. 2 is a schematic of a legacy flow meter with components in accordance with the present invention shown in general relation:

[0037] FIG. 3 is a schematic illustrating the operation of a magnetic coupling of a flow meter;

[0038] FIG. 4 is a block diagram of an embodiment of a retrofit device;

[0039] FIG. 5 is a functional diagram of a network of IoT devices connected through a network to a management infrastructure;

[0040] FIG. 6 is a side elevation view of an embodiment of a retrofit device coupled to a legacy flow meter;

[0041] FIG. 7 is another side elevation view of an embodiment of a retrofit device coupled to a legacy flow meter;

[0042] FIG. 8a is a perspective view of an adapter ring for connecting a retrofit device to a legacy flow meter; [0043] FIG. 8b is a perspective view of a two part adapter ring for connecting a retrofit device to a legacy flow meter;

[0044] FIG. 9a is a exploded, plan view of an adapter ring being connected to a retrofit device to a legacy flow meter;

[0045] FIG. 9b is a plan view of the adapter ring of FIG. 9a connecting the retrofit device to the legacy flow meter;

[0046] FIG. 10 is a perspective view of a retrofit device emphasizing the camera module;

[0047] FIG. 11 is a perspective view of portions of the camera module of FIG. 10;

[0048] FIG. 12 is a schematic illustrating illumination of the meter display of a flow meter;

[0049] FIG. 13 is an exploded view of the lighting elements of FIG. 12;

[0050] FIG. 14 is a schematic diagram of another form of illumination of the meter display; and

[0051] FIG. 15 is a cross section of a legacy flow meter and portions of a retrofit device attached.

[0052] FIG. 16 is a functional diagram of a network of IoT devices connected through a network to a management infrastructure.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0053] An Internet of Things device ("IoT device") is an example of a retrofit device as used in the present disclosure. Typically, an IoT device is a small, network capable embedded computing device that is designed to collect environmental data by means of sensors. An IoT device has a network connection, for participation in an infrastructure to coordinate its actions, either by a central point of control or in a system where many IoT devices act autonomously. An IoT device often is designed for participation in a decentralized network, such as a mesh network. Optionally, an IoT device has actuator capabilities, i.e., it has capabilities to control technical equipment.

[0054] An IoT device consist of one or more modules. A module is a component of a device with a physical enclosure, i.e. casing, that contains micro-boards, sensors, or other electronic components that are part of an embedded design. The modules of an IoT device contain the entirety of components that jointly provide its functions. Such components include, among others, batteries, solar panels, storage devices, for instance SSD drivers and cards, network adapters, antennas, and micro-boards containing Systems on a Chip, SoC, micro-controllers, sensors, network adapters and storage devices. At least one module contains a micro-board that provides for a control of electrical components in one or more modules, or alternatively, multiple micro-boards in multiple units might jointly provide for the control of the IoT device. A retrofit device typically contains various sensors, to gather environmental data. In a retrofit device, sensors may be used to observe the state of the legacy device. Further, a retrofit device may contain actuators, such as switching devices, to control technical equipment. [0055] In general, the present invention presents a comprehensive infrastructure for the analysis of flow in a pipe system, for the detection of pipe leaks and defects in flow meters. The infrastructure takes into account the limited energy and computational capacity of smart meters or retrofit devices.

[0056] A smart meter typically records the cumulative throughput, that is flow volume units that passed the pipe since installation of it, or since its last reset, and also the rate of throughput, which is equivalent to the first derivative of the function that models the cumulative throughput. In addition, it may contain sensors to record further environmental data, such as vibration signals, intra-pipe pressure, chemical properties of the water, air humidity and ambient temperature. A smart meter typically operates autonomously, without an external power supply, and a design point often is that it may be intermittently unavailable. For instance, if a smart meter is solar powered and has exhausted battery power, it will go offline until the solar panels have recharged the batteries.

[0057] FIG. 1 shows an example of a component schematics of an IoT device, made up of multiple modules. An IoT device may consist of fewer or more modules than the one shown in FIG. 1, but at least one module. It may have all functions of the device shown in FIG. 1. and described in the following, or a subset of them, and in addition others, not mentioned here. The IoT device in FIG. 1. consists of modules, (11), (12), (24), (28), and (29). Each module contains one or more micro- boards, connected by pins, bridges, cables or similar. A module runs software or firmware; the software and firmware jointly run on all modules implements the functions of the device. Typically, at least one module runs an operating system, such as embedded Linux or a micro-kernel.

[0058] Each module contains one or more controllers. A controller is a functional unit that provides one or more services, for instance encryption, management of electrical power and hibernation state, or hosting an operating system. The function of a controller is realized either by hardware, such as a micro-controller that controls persistent storage, for instance an SSD card, by software or firmware that runs on a set of electronic components on one or more micro-boards, or by a combination of both. Multiple controllers may share the same hardware units on a micro-board. For instance, a micro-controller may perform multiple function, such as power management and sensor control, or a System on a Chip, SoC, may perform encryption and host the operating system. Two controllers, residing in separate modules, may act cooperatively to provide a function.

[0059] FIG. 1. shows controllers typically required in an IoT device, though an IoT device may implement further ones or not require all that are shown in FIG. 1. Module (11) contains controllers (35), (36) and (37). Controller (35) may implement communication with other components, (12), (18), and (29). Controller (36) may implement encryption and controller (37) may manage the charge state for the batteries, (21), of component (11). [0060] FIG. 1 shows an example of a component schematics of an IoT device, made up of multiple modules. An IoT device may consist of fewer or more modules than the one shown in FIG. 1, but at least one module. It may have all functions of the device shown in FIG. 1. and described in the following, or a subset of them, and in addition others, not mentioned here. The IoT device in FIG. 1. consists of modules,

[0061] A module may contain one or more sensors. In FIG. 1, module (11) contains a set of sensors, (34), module (12) contains a set of sensors, (23), module (24) contains sensor set (25), module (28) contains sensor set (33) and (29) contains sensor sets (30) and (40). Each set of sensor may contain zero or more sensors, or various types. For instance, sensor set (25) may contain pressure and temperature sensors. A given sensor of a sensor set may be controlled by one or more controllers. For instance, in module (11), a sensor of the set of sensors (34) may be controlled by one or more of the set of controllers made up of (35), (36), and (37). In FIG. 1, connections between controllers and other items, such as sensors or batteries, are shown when it is required to highlight their function. For instance, for module (11), a connection between (37) and batteries (21) is shown. Whereas controller (35) may interact with controllers (36) and (37), and sensors (34), yet no connection of (35) to the latter is shown.

[0062] Each module contains one or more micro-boards, connected by pins, bridges, cables or similar. A module runs software or firmware; the software and firmware jointly run on all modules implements the functions of the device. Typically, at least one module runs an operating system, such as embedded Linux or a micro-kernel.

[0063] Module (12) contains controllers (18), (19), and (22). Controller (18) controls antennas (13) and (14) and implements one or more functions for network communication, such as a cellular modem, an Ethernet adapter, or a wireless adapter that runs one or more wireless protocols, for instance cellular LTE, ZigBee, USB, Bluetooth, BLE, or Wireless 802.11. Controller (19) may be a charge controller for the batteries, (20) of module (12), and also for batteries (21) of module (11). Controller (19) is connected to two solar panels, (15) and (16). Alternatively, not shown here, controller (19) may be connected to the electric grid. An antenna or solar panel may be a standalone unit, (13) or (15), or contained in an enclosure. For instance, (17) is an enclosure that contains a solar panel, (16) and two antennas, one of which is (14). An antenna, solar panel or enclosure containing both may as well be integrated into a module. For instance, (13), (14), or (17) may be integrated into the casing of module (12). Controller (18) may as well implement a network protocol stack, such as TCP/IP, and security functions, for instance encryption or a block chain based protocol for auditing purposes, as described in "System and Method for Data Management Structure Using Auditable Delta Records in a Distributed Environment," application Ser. No.

15/367,873, filed Dec. 2, 2016 (incorporated by reference).

[0064] Each module may contain one or more controllers. A controller is a functional unit that provides one or more services, for instance encryption, management of electrical power and hibernation state, or hosting an operating system. The function of a controller is realized either by hardware, such as a micro-controller that controls persistent storage, such as an SSD card, by software or firmware that runs on a set of electronic components on one or more micro-boards, or by a combination of both. Multiple controllers may share the same hardware units on a micro- board. For instance, a micro-controller may perform multiple function, such as power management and sensor control, or a System on a Chip, SoC, may perform encryption and host the operating system. Two controllers, residing in separate modules, may act cooperatively to provide a function.

[0065] A module is connected to one or more other modules by means of a network connection, for communication to coordinate actions and data transfer. The network connection between two modules may be of any architecture suited for use in connections between micro-boards, for instance USB, Ethernet, Wifi 802.11, ZigBee, Bluetooth, BLE, Near-field communication, NFC, or RF signaling. In FIG. 1, a network connection between two modules is depicted as a connection between controllers belonging to these modules. For instance, controller (22) implements communication with other modules, (11) and (24). Controller (35) of module (11) is connected with controller (22) of module (12). Module (29) has a network connection with modules (11) and (28). In a device that contains these components, the connection between (11) and (28) or between (28) and (29) may be USB, Ethernet, Bluetooth, or BLE. Assuming controllers (32) of (28) and (41) of (29) need to communicate occasionally to coordinate actions, (28) and (29) may also communicate by means of an RF based protocol.

[0066] Modules (24), (28) and (29) are auxiliary modules, for instance used to control sensors, containing components that cannot be integrated into modules (11) or (12). The requirement for an auxiliary module in the design of an IoT device sometimes arises from conditions at the install site. For instance, due to spatial constraints it may not be possible to place all components of a device into a common enclosure. Also, functional requirements may dictate placing a sensor in a distance to other sensors, or at a location where other modules of the device cannot be placed. For instance, module (24) may contain one or more vibration sensors, in set (25), that need to be in close contact with a pipe of a water supply infrastructure, to detect vibration, whereas another module of the IoT device needs to be mounted in proximity to a flow meter, hence sensors (24) require a separate module. Controller (26) belonging to module (24), may control the operation of sensor of (25), process signals recorded by them, and communicates with controller (22) by means of a network connection. For instance, module (24) may to correspond to (6) in FIG. 1.

[0067] Auxiliary modules may have their own power source, such as batteries, solar panels, or sensors that are used for energy harvesting. For instance, module (28) contains a solar panel, (31), used to recharge its battery, (38), for which controller (32) performs charge control functions.

Module (29) may contain a piezoelectric vibration sensor, in set (40), that generates energy which is used to recharge its battery, (39), controller (41) performing charge control.

[0068] A module may not have a battery but receive its energy by means of a power supply connection from another module. For instance, module (11) or (24) may not contain battery (22) or

(27) respectively, but receive power by means of a power connection, such as a DC line or USB cable from module (12).

[0069] FIG. 1 shows controllers typically required in an IoT device, though a device may implement further ones or not require all that are shown in FIG. 1. Module (11) contains controllers (35), (36) and (37). Controller (35) may implement communication with other components, (12), (18), and (29). Controller (36) may implement encryption and controller (37) may manage the charge state for the batteries, (20), of component (11).

[0070] A module may contain one or more sensors. In FIG. 1, module (11) contains a set of sensors (34), module (12) contains a set of sensors, (23), module (24) contains sensor set (25), module (28) contains sensor set (33) and (29) contains sensor sets (30) and (40). Each set of sensor may contain zero or more sensors, of various types. For instance, sensor set (25) may contain pressure and temperature sensors. A given sensor of a sensor set may be controlled by one or more controllers. For instance, in module (11), a sensor of the set of sensors (34) may be controlled by one or more of the set of controllers made up of (35), (36), and (37). In FIG. 1, connections between controllers and other items, such as sensors or batteries, are only shown when it is required to highlight their function. For instance, for module (11), a connection between (37) and batteries (20) is shown. Whereas controller (35) may interact with controllers (36) and (37), and sensors (34), yet no connection of (35) to the latter is shown.

[0071] Module (12) contains controllers (18), (19), and (22). (18) controls antennas (13) and (14) and implements one or more functions for network communication, such as a cellular modem, an Ethernet adapter, or a wireless adapter that runs one or more wireless protocols, for instance cellular LTE, ZigBee, USB, Bluetooth, BLE, or Wireless 802.11. Controller (19) may be a charge controller for the batteries, (21) of module (12), and also for batteries (20) of module (11).

Controller (19) is connected to two solar panels, (15) and (16). Alternatively, not shown here, (19) may be connected to the electric grid. An antenna or solar panel may be a standalone unit, (13) or (15), or being contained in an enclosure. For instance, (17) is an enclosure that contains a solar panel, (16) and two antennas, one of which is (14). An antenna, solar panel or enclosure containing both may as well be integrated into a module. For instance, (13), (14), or (17) may be integrated into the casing of module (12). Controller (18) may as well implement a network protocol stack, such as TCP/IP, and security functions, for instance encryption or a block chain based protocol for auditing purposes, as described in "System and Method for Data Management Structure Using Auditable Delta Records in a Distributed Environment," application Ser. No. 15/367,873, filed Dec. 2, 2016 (incorporated by reference) (sometimes referred to herein as "Audit Blockchain

application").

[0072] A module may be connected to one or more other modules by means of a network connection for communication to coordinate actions and data transfer. The network connection between two modules may be of any architecture suited for use in connections between micro- boards, for instance USB, Ethernet, Wifi 802.11, ZigBee, Bluetooth, BLE, Near-field

communication, NFC, or RF signaling. In FIG. 1, a network connection between two modules is depicted as a connection between controllers belonging to these modules. For instance, controller (22) implements communication with other modules, (11) and (24). Controller (35) of module (11) is connected with controller (22) of module (12). Module (29) has a network connection with modules (11) and (28). In a device that contains these components, the connection between (11) and (28) may be USB, Ethernet, Bluetooth, or BLE. Assuming controllers (32) of (28) and (41) of (29) need to communicate occasionally to coordinate actions, (28) and (29) may also communicate by means of an RF based protocol.

[0073] Modules (24), (28) and (29) are auxiliary modules, for instance used to control sensors, containing components that cannot be integrated into modules (11) or (12). The requirement for an auxiliary module in the design of an IoT device often arises from conditions at the install site. For instance, due to spatial constraints it may not be possible to place all components of a device into a common enclosure. Also, functional requirements may dictate placing a sensor at a distance to other sensors, or at a location where other modules of the device cannot be placed. For instance, module (24) may contain one or more vibration sensors, in set (25), that need to be in close contact with a pipe of a water supply infrastructure, to detect vibrations, whereas another module of the IoT device needs to be mounted in proximity to a flow meter, hence sensors (24) require a separate module. Controller (26) belonging to module (24), may control the operation of sensor of (25), process signals recorded by them, and communicates with controller (22) by means of a network connection. [0074] Auxiliary modules may have their own power source, such as batteries, solar panels, or sensors that are used for energy harvesting. For instance, module (28) contains a solar panel, (31), used to recharge its battery, (38), for which controller (32) performs charge control functions. Module (29) may contain a piezoelectric vibration sensor, in set (40), that generates energy which is used to recharge its battery, (39), controller (41) performing charge control.

[0075] A module may not have a battery but receive its energy by means of a power supply connection from another module. For instance, module (11) or (24) may not contain battery (20) or (27) respectively, but receive power by means of a power connection, such as a DC line or USB cable from module (12).

[0076] A sensor typically is used to measure physical properties associated with objects or the environment in which the sensor is situated. In most cases, for signals generated by one or more sensors, further processing, referred to as signal conversion, is required to arrive at a suitable representation, such as a measurement value for a physical property or a state value for an object. Signal conversion of the signals generated by sensors often is a non-trivial task. For instance, in the design of a retrofit device in the patent application entitled "Retrofit Device and Method of Retrofitting a Flow Meter," magnetic sensors are used to measure the rotation count of a magnetic coupling of a legacy flow meter, to determine the rotation speed of a mechanical part, from which a current rate of throughput of a medium in a pipe is calculated. Signal conversion entails calculating the current rate or throughput of the cumulative rate of throughout from signals of a set of magnetic sensors during a time interval.

[0077] Signal conversion for the signals generated by magnetic sensors requires various steps. Typically, this calculation involves a normalization of signals with respect to the magnetic field, the detection of an angular movement, a full rotation or part of it, and building an approximation for the first derivative of the speed of rotation, which, knowing the amount of volume flowing through the pipe corresponds to one rotation, can be translated into a current rate of throughput. Similarly, the cumulative throughput per time interval can be obtained by counting the rotations during that time unit.

[0078] A sensor processor associated with a set of sensors is made up of software or firmware to configure these sensors, control their operation, and further process the signals generated by them. Such software and firmware may reside on multiple controllers, that may not all reside on the same module. For instance, sensors (25) in FIG. 1 are electrically connected to controller (26), which records signals generated by sensors (25). (26) may perform further processing of signals of the set of sensors (25), or perform it in conjunction with controller (22) on module (12), and possibly further controllers. [0079] For a set of sensors, their associated sensor processor may perform any subset of steps required in the signal conversion of the signal they generate. It may do none at all, or perform a subset, to arrive at an intermediate representation, such as for magnetic sensors, calculating a rotation speed from recorded signals, or all steps, such as calculating a rate of throughput from the recorded signals of magnetic sensors. For signals recorded by a vibration sensor, the sensor processor associated with it, may perform any subset of steps in signal processing, which for instance may include applying a signal filter, or a Fast Fourier Transformation.

[0080] Signals, generated by a set of sensors, given in a representation that is arrived at after the processing of the signals by the sensor processor associated with that set of sensors, are referred to as converted signals, which means no more than the signals are given in a format that is the result of processing them by a sensor processor. Converted signals may be stored or cached on the sensor device or sent to another computing device, such as a server which performs administration functions for a set of sensor devices, and stores data generated by sensor devices in a database. In the following, instead of the term ' converted signal ' the term ' measurements generated by a sensor device ' or ' signals generated by sensors of a sensor device ' may be used. The term ' converted signal ' means to stress that a sensor device may send data that require further processing. For instance, instead of sending a rate of throughput, the measurement device may send a rotation count for the turbine of a flow meter and a program that uses the rotation count, is assumed to transform the rotation count into a rate of throughput using knowledge about the flow volume that needs to pass in a pipe to effect one turbine rotation.

[0081] An important design consideration to maximize the lifetime of an IoT device is to prevent an early failure of electronic or other components whose lifespan is influenced by usage patterns. For instance, some memory and storage types have a maximum number of erase or rewrite cycles. Most battery types have a maximum lifespan that is determined, among others, by the number of recharge cycles and charge and discharge patterns. The design of an IoT device aims to extend the lifetime of such components by optimizing their usage.

[0082] For example, the IoT device shown FIG. 1 may be a sensor device, and the batteries in modules (11) and (12), (20) and (21) respectively, may be of different type. (20) may be a set of Lithium-Ion, Li-ion, batteries and (21) a set of Nickel-Cadmium, NiCd, batteries. The charge controller, (19), is connected to both sets of batteries. The set of sensors (25) of auxiliary module (24) contains vibration sensors and magnetic sensors, and their associated sensor processor runs on controllers (22) and (26). The converted signals generated by sensors of (25) may be stored on (22), or sent to another device by means of communication controller (18). Controller (35) may be the operating system of the sensor device, and controllers (18), (22) and (26) run autonomously, independent of (35), though these controllers may communicate with (35). To save energy, (35) may be in a state of minimal activity while, such as running with a minimal set of threads or in a hibernation state, while controllers (22), (26) and (18) cooperatively process signals recorded by sensors (25), transform them into converted signals and send them. Controllers (35), (36), and (36) on module (11) are supplied with power by batteries (20), and the controllers in (11) and their combined power requirements for most of the time will be minimal, given (35) is most of the time in a state of reduced activity. Batteries (20) will be kept at maximum charge state and since (20) are Li-ion batteries, a deep discharge of them is avoided, because it would reduce battery lifetime. Self- discharge is low for Li -ion batteries, hence they are suited as reliable energy store. Controllers (18), (22), and (26) continually perform a recording of signals generated by sensors (25), process these signals to generate converted signals and send the latter to another computing device. Controllers (18), (22), and (26) perform this task as long as the charge state of (21) permits, and (21) may fully discharge, which is even required to be done for a NiCd battery once in a while, to prevent premature aging. The generation of converted signals from signals recorded by sensors and their forwarding to another server is a low priority task, that is performed gratuitously, as long as energy resources permit. Also, the self-discharge rate for NiCd batteries is high, thus there is little benefit in trying to conserve their power. The design of power management for the IoT device is such that battery (21) is allowed to run empty, while the aim for (20) is to keep it at full charge state. The design thus optimizes the use of battery types, taking into account task priorities and properties of the batteries with regards to wear and aging.

[0083] A distributed infrastructure is a set of computing devices that can communicate with each other, to coordinate actions among all or a subset of the computing devices. Examples of computing devices are servers, virtual servers, smart phones, tables, network gateways, routers, switches or edge devices, or IoT devices. Each computing device is connected with at least one other device, by means of a shared network connection, shared storage or shared memory.

[0084] FIG. 2 depicts a turbine flow meter (48). A turbine flow meter (48) measures the current rate of flow of a gas or liquid in a pipe by means of the rotation of a turbine that is immersed into the transported medium. The rotation speed of the turbine varies with the speed of the medium, and the rotation count per time unit is translated into a flow volume for that time unit. The turbine flow meter design is widely used for meters in pipes that transport gas or liquids of low viscosity, such as oil, water, or wastewater, or liquids occurring in chemical industries or aerospace. Turbine flow meters can be used to measure flow volumes ranging from large ones, occurring in oil or gas transport pipelines, to small ones, such as residential water pipelines, or, even for pipes of smaller diameter in industrial installations. A flow meter typically displays the cumulative throughput, that is flow volume units that passed the pipe since installation of the flow meter, or since its last reset. It also may display the rate of throughput, which is equivalent to the first derivative of the function that models the cumulative throughput.

[0085] A turbine flow meter (48) typically consists of two disjoint components, an external component and one that is integrated into the pipe. In FIG. 2, the casing of the external component is made up of (52), (54), and (55), and (51) belongs to the component that is integrated into the pipe. Riser (51) is the exterior casing, which is joined to a pipe segment, (50), and thus part of the envelope of the transported medium. Riser (51) is the casing of the turbine pickup. The turbine pickup is an apparatus that provides for the translation of the rotation movement of the turbine into a signal that can be observed externally to the component that is integrated into the pipe. The transmitted signal typically is the strength of a magnetic field, which is used as a power source for a measuring device or observed by a measuring device. In a turbine flow meter that functions partially or entirely mechanically, the magnetic field generated by the turbine is used to power a gearbox, that is situated inside casing part (54). Power transmission occurs by means of a magnet that is placed close to the turbine pickup and connected to the gearbox. In FIG. 2, that magnet is enclosed in casing part (52). The two magnets, the one belonging to the turbine pickup situated in riser (51), and the other in casing (52), together constitute the magnetic coupling. The two casing parts, (51) and (52), are closely aligned, typically by surface contact. In FIG. 2, for better illustration, this alignment, (53), is shown with a spacing between parts.

[0086] The meter display, (55), typically has a transparent cover, often made of glass or acrylic glass. The meter display contains one or more elements, typically a digit display, (56), showing the accumulated flow of the medium in numeric format, and possibly further elements, (57), showing other measurements, such as the current rate of throughput or water pressure.

[0087] In a turbine flow meter that functions entirely on a mechanical basis, (56) is a mechanically driven digit display and the gearbox (54) translates rotation movements of the magnet in casing component (52) into movements of the mechanically driven digit display via a magnetic coupling. If the turbine flow meter has electronic components, the digit display (56) may be an LED or LCD display. Also, a flow meter with electronic components may not contain a gearbox but translate the signal of the turbine pickup in (51) by means of magnetic sensors, to obtain the rotation speed of the turbine. The magnetic coupling of such flow meter may be made up of two magnets, one situated in (51) and one in (52), or (51) may contain a magnet and sensors are located in proximity of (51), typically in a casing component (52). The magnetic coupling of a flow meter that has electronic components thus also may be made up by a magnet and a set of magnetic sensors. A flow meter with electronic control elements may be capable of storing a history of measurement data, and have a digital interface, (58), to retrieve measurement data or state information about the device. (58) may be a network adapter and the flow meter may have capabilities for communication and data transmission by means of (58). For instance, (58) may be an RF, USB, ZigBee, Bluetooth, or BLE device, listening to signals, and in response may transmit a history of measurement data that have been recorded and stored. For instance, for a flow meter that works on an electronic basis, (58) in FIG. 2 may be an RF antenna, and respond to an RF signal by transmitting recent measurement data.

[0088] FIG. 2, in addition shows various elements, (59), (60), (61), (62), (63), and (64), that pertain to the functioning of the retrofit device that is presented in one embodiment of this invention.

[0089] A turbine flow meter (48) may underreport flow, which is tantamount to a failure of the flow meter. Several factors can cause this, for instance attempts to tamper with the device or conditions in a pipe system may cause wear and a premature failure of parts. In more detail, the following conditions may cause an underreporting of flow:

[0090] Misalignment or deformation of components belonging to the magnetic coupling, which is housed in (51) and (52) of FIG. 2, may cause an incorrect transmission of the rotation speed of the turbine to the external component. For instance, the surface of the magnetic coupling, (53), may have been inadvertently damaged or deformed, or (51) and (52) are not properly aligned because of debris.

[0091] Backpressure in a pipe is a condition where the expected pressure gradient between two measurement points is reversed, the opposite of the expected. Backpressure leads to a reversal of flow direction, which puts stress onto the mechanical parts of a turbine flow meter, leading to sudden or gradual failures. Gears in the gearbox, contained in (54), might slip, or break, causing a transmission loss between the turbine and a display element, (56), or (57). The advent of backpressure itself is an important event to detect.

[0092] The digit display, (56) or a mechanical display element, (57), may fail, caused by wear or as consequence of water backpressure. In meter with a digital interface, a failure of electronic components, or batteries, may cause an incorrect display of internal representation of accumulated flow.

[0093] Debris or build-up of sediment, such as calcium or salt, may cause damage to the turbine.

[0094] A Register in the gearbox (54) may become blocked.

[0095] Tamper attempts, such as blocking the magnetic coupling with a magnet may reduce the rotation count transmitted to the element of the magnetic coupling that is contained in (52), and also cause damage to the turbine or magnetic transmission. [0096] To determine that a flow meter is underreporting, one needs to either remove the meter from its installation site for testing in a laboratory, or insert measurement devices before and after it into the pipe where it is installed. Both methods are labor intense and require an outage. They are economic to do only if one knows with high confidence that the rate of underreporting for a given flow meter lies above a certain threshold. This is often difficult to determine. For instance, if a flow meter in a municipal water utility starts reporting lower water usage than before, this may not be due to a defect developing gradually, caused by conditions cited herein, but just be due to increased awareness for water savings by a consumer. Also, a pipe infrastructure tends to develop numerous small leaks as is ages. While finding these leaks is a task that is separately of importance, such leaks further complicate the identification of meters, for which an estimate of underreporting can be made with high confidence. Water utility companies assume revenue losses due to underreporting meters to be in a double digits percentage range. Yet, the costs for identifying underreporting flow meters are high.

[0097] Presently many efforts are underway to replace residential water meters with so called smart meters. A smart meter is a digitally enabled flow meter, that presents the measured throughput in digital format and is enabled for integration into a network and central management. Adoption of smart meters technologies though is slow for several reasons, one of them being the lack of maturity of many aspects of IoT technologies. A legacy flow meter, working on a purely mechanical basis, often has a life expectancy of 15 years or more. Many electronic components in IoT device fall short of these lifetimes, more so if deployed outdoors, in harsh climate conditions. For instance, a rechargeable Lithium-ion battery has an expected lifetime of three years in hot climates. Using rewriteable SSD memory storage requires careful design, to avoid premature wear. Immaturity of IoT technologies is one of the main reasons for the slow adoption of smart meters. The cost versus benefit analysis presently is not in favor of them.

[0098] Equipping a legacy flow meter with a retrofit device in accordance with some embodiments of the present invention is a solution for supplying flow meters with a digital interface and networking capability that reduces the adoption costs for smart meters. Retrofitting a flow meter avoids the costs associated with replacing a flow meter that requires interrupting a pipe and also reduces the risk associated with the introduction of new technology. In case of a premature failure of a device, replacement costs are smaller, and, moreover, the legacy device that has been retrofitted, still in place, serves as a functional fallback option. This motivates the design of a retrofit device for a legacy flow meter. [0099] A retrofit device in accordance with some embodiments of the present invention to supplements a legacy flow meter. Such device meets a business need for many pipe infrastructures. Functionally, it may have the following capabilities:

[0100] Autonomous operation: Flow meters often are located outdoors, in locations where a connection with an electric grid does not exist. Thus, a retrofit device needs to operate

autonomously, without external power supply. Typically, it is assumed that such device may experience intermittent outages. For instance, if it is solar powered and has exhausted battery resources, it will go offline until the solar panels have recharged the batteries.

[0101] Digital representation of present state and measurement values: A legacy flow meter typically displays the cumulative throughput of the medium at the point of installation in the pipe. Additionally, it may display the current rate of throughput, intra-pipe pressure and further environmental data, such as ambient temperature. The retrofit device generates a digital representation of these measurement values. It is capable to do so frequently, on demand, and of storing a set of most recent measurement values.

[0102] Network interface: The retrofit device has one or more network adapters, for instance for cellular LTE, Wireless 802.11, Ethernet, ZigBee, Bluetooth, BLE, USB, or RF signaling. It is enabled to participate in a network architecture, such as an edge network or mesh network. It has sufficient energy resources to support the network bandwidth required for its operation.

[0103] Central and peer-to peer management: The retrofit device is enabled for management by a central point of control, the management infrastructure, and implements protocols for this. It also may be enabled for participation in a peer-to-peer protocol, for coordination of actions with other retrofit devices. For instance, the device many coordinate with the management infrastructure or other retrofit devices, called peer devices, to capture measurements for throughput in the pipe during a specified time interval.

[0104] Security and device identity: The retrofit device satisfies common security requirements for devices installed in insecure locations, outside the perimeter of a datacenter. For small devices that are deployed outdoors, establishing device identity is of crucial importance. A device may be stolen or replaced. It is required, that a management infrastructure can detect if a retrofit device has been exchanged. For instance, if retrofit devices are used in a municipal water pipeline to retrofit water usage meters at residential end points, tamper attempts such as two retrofit devices having been exchanged between the meters on which they are installed, need to be detectable. Further, the retrofit device needs to supports secure network connections, encryption, and secure auditing. [0105] Introspection of the legacy device: The retrofit device is equipped with sensors to observe the function of the legacy flow meter and detect an incorrect functioning of the latter, caused by defect, environmental conditions or tamper attempts, as described above.

[0106] Beyond detecting incorrect function of the legacy flow meter, the retrofit device is capable to perform diagnostic actions, for instance detecting special conditions in the pipe, such as backpressure or accumulation of debris.

[0107] The retrofit device may collect auxiliary data that may be of interest to the operator of an installation, or to third parties. For instance, it may collect environmental data, such as air temperature or humidity.

[0108] A retrofit device having functions described herein can be used in an installation in a pipe system for data analysis, such as for water leak detection. Also, it can be used for predictive failure analysis for legacy flow meters, by inferring failure probabilities for devices not equipped with retrofit device from data gathered for devices that have been equipped with one. This further adds to the economic appeal of using retrofit devices to improve the accuracy of measurements in a pipe system with legacy flow meters.

[0109] In addition, a retrofit device should fulfill various requirements towards its casing and form factor design, to make its deployment in a pipe infrastructure economical. Different embodiments of the present invention propose various solutions for this, that address the following requirements: Modular: Pipe infrastructures typically have various types for flow meters installed, of different brands, age and manufacturer. A retrofit device must be modular and adaptable for installation on multiple types of flow meters and environmental conditions at the site, for instance the length and intensity of daylight.

[0110] Adaptable to spatial constraints at the installation site: Flow meters often are located at sites with limited physical access. They may be situated in tight niches or manholes; which may require for instance the placement of solar panels in a distance to other components of the retrofit device.

[0111] Preferably, a retrofit device does not obstruct the manner of use a legacy device has been designed for, nor compromise its casing. For instance, if a legacy flow meter has a meter display, (55), a retrofit device should not obstruct it and prevent manual inspection of it.

[0112] FIG. 2 shows the schematics of an arrangement of sensors in proximity of a turbine flow meter (48), to observe its behavior and collect environmental data about the flow in the pipe (50).

[0113] One or more cameras, (59), (60), may exist, that take photographic images or videos of the meter display, (55), or sections or elements of it. Information about the state of the meter display (55) is extracted from those images or videos. For instance, by means of pattern recognition techniques, a numeric representation of the accumulated water usage may be determined from an image taken of digit display (56) of the meter.

[0114] Vibration sensors (62), (64) may be attached at various locations to capture vibration signatures. A vibration signature is a characteristic set of frequencies that is observable by a sensor attached to an object, in response to mechanical movements of the latter. For instance, water flow in a pipe generates movements of the pipe, that is characterized by a set of frequencies that can be observed by a vibration sensor. Depending on external conditions, such as water content in the surrounding soil, the vibration signature generated in response to mechanical movement of the pipe may vary. A range of vibration signatures is understood to be a set of vibration signatures, each of which may be possibly generated in response to an event that causes mechanical movement for a given object. For instance, a range of vibration signatures is associated with water flow in a pipe, and the specific observed frequency pattern determined, among others, by the material of the pipe, its length and geometric shape. Similarly, for a gearbox, activity of it, the rotation of its digits, will cause a specific range of vibration signatures, observable by a vibration sensor that is attached to the casing of the gearbox. In FIG. 2, (62) is a vibration sensor(s) that is mounted on the casing of the gearbox (54), and (64) is a vibration sensor that is mounted on the pipe (50).

[0115] Two or more magnetic sensors, (61), may exist, situated in proximity of the magnetic coupling, (53), to detect the movement of the rotating magnets in (51) and (52). The signals recorded by these sensors can be used as a rotation counter for the turbine, and to detect misalignment of the magnetic coupling, gear slippage or blocking, and attempts to tamper by slowing down the gear by attaching magnets nears the magnetic coupling.

[0116] Sensors (63) are inserted into the pipe to measure environmental conditions inside the water envelope, for instance water pressure or chemical properties, such as salt or calcium content of the water.

[0117] Sensors (64) are for the collection of further environmental data. For instance, (64) may include a vibration sensor attached to the pipe, to collect sonic signatures. (64) may as well be sensor to measure the ambient temperature or humidity.

[0118] The retrofit device has a component schematics as described in general for an IoT device in FIG. 1. and described herein incorporating the sensors described above, corresponding to sensors in FIG. 2. The retrofit device may contain all of the sensors (51), (52), (54) and (55) in FIG. 2. or a subset of them. For instance, at minimum a retrofit device may just contain one or two of the cameras (59), (60), or the set of magnetic sensors (61). The throughput in the flow meter could be determined either way, by photographic images of the meter display or keeping track of the rotation count observed by sensors (61). The retrofit device may have a decomposition into modules as shown in FIG. 1. or it may be made up of fewer or more modules.

[0119] In one possible design, module (11) may have a form factor that lends itself to an attachment to the exterior casing parts of the flow meter, (51), (52), (54) and (55) in FIG. 2. The sensor belonging to module (11), sensors (34) in FIG. 1, would correspond to the set of sensors made up of (59), (60), (61) and (62). They are mounted in the casing of module (11) of FIG. 1, at positions suited for each to fulfill its designated purpose. Module (12) contains controllers for battery management, (19) and communication (20). Alternatively, the design of the retrofit device may not contain a separate module (12), for controllers (18) and (19), and (11) may be connected to solar panels, 15), (16), and antennas (13), (14), and the function of (18) and (19) being performed by controllers hosted in (11).

[0120] A retrofit device for a flow meter may implement only a subset of sensors of the set made up by (59, (60), (61), (62), (63) and (64). A sensor of this set may be contained in any module shown in FIG. 1, (11), (12), (24), (28) or (29). Any number of auxiliary modules may exist to implement the functions of the retrofit device, none or also a number larger than three. In one possible design, auxiliary module (24) in FIG. 1. may house one of the sensors belonging to set (63) in FIG. 2, and the sensor sets (30) and (40) in auxiliary module (29), FIG. 1. may correspond to sensors belonging to set (63) and (64) in FIG. 2. Sensors of set (40) in FIG. 1. may be sensors of set (64). For instance, (40) may contain one or more piezoelectric vibration sensor, to capture sonic signatures for further processing and also be used to recharge battery (39).

[0121] If a legacy flow meter contains a digit display (56) as in FIG. 2, the retrofit device may determine the displayed throughput value by taking photographic images of it. One or more cameras may be used for this, in FIG. 2, two cameras are shown, (59), (60). Their lenses may not have the same focal length, and they may capture different sections or elements of the meter display, (55.), which aside (56) may include further elements, (57), for a visual display of other measurements and state of the meter. The photo images taken by one or more cameras are processed to obtain a digital representation of the objects captured by the cameras. Such digital representation may just be a compressed photo image, for instance in JPG format, or one or more photo images taken by one or more cameras would be processed further by means of image recognition techniques to obtain a numeric value for the measurements presented by the meter, typically the cumulative throughput and additional data, if present on meter display (55), for instance the current rate of throughput or intra-pipe pressure.

[0122] One or more cameras (59) and (60) may record videos of elements of meter display (55). For instance, a meter display often contains elements to show the rotation of a turbine by means of a needle display, to show minuscule flow activity. A camera may generate a video of the movement of a needle of such display.

[0123] More generally, the conversion of an image or video to a digital representation entails any post processing of the image or video, such as compression, or using pattern recognition techniques to extract the numeric value or the color a display shows, or quantitative analysis to determine percentages of image regions with a certain property, such as color or texture, or geometric characteristics such as angles of lines, or sets of geometric shapes, or their transitions or changes over time, or combinations of all aforementioned. For a video, it may entail performing pattern recognition on a sequence of images, and performing further analysis on obtained results, such as to establish a correlation between them. An example would be to determine the movement of a number in a digit display, or the jitter of a needle in a display.

[0124] A legacy flow meter that contains electronic elements might have an LCD or LED display for elements (56) or (57). Such display element may be permanently enabled or activated upon a signal, such as light shining on a photovoltaic element, that is integrated into the meter display (55), not shown in FIG. 1, or a signal received by antenna (58). A retrofit device in accordance with a preferred embodiment for such flow meter may generate photographic images or videos of (56) and elements of (57), if needed, activating display elements (56) or (57) before. For instance, the retrofit device, before activating camera (59) or (60), may send a signal to (58) or to a photovoltaic element to active (56) or (57). Alternatively, if the flow meter is capable of sending measurement data by means of network interface (58), the retrofit device may send a signal to (58) to obtain

measurement data.

[0125] The use of magnetic sensors for the detection of movement of mechanical parts of machinery, such as rotation of a part or a trajectory of a reference point, is well established technology. FIG. 3. shows the magnetic coupling of a turbine flow meter that has a gearbox and adjacent sensors. (70) is the turbine pickup, and mechanically connected to the turbine. (70) is made of one or more magnets and contained in casing part (51) in FIG. 2. (71) is another magnet, that is mechanically connected to the gearbox. (71) is contained in component (52) of the exterior casing. Rotation of (70) will affect a rotation of (71).

[0126] Magnetic sensors are used to detect the rotation of the magnets in the magnetic coupling. (72) and (73) show sets of magnetic sensors, placed adjacent to the magnetic coupling, (70), (71). The set of magnetic sensors (61) in FIG. 1. corresponds to sensors in (72), (73). A retrofit device in accordance with a preferred embodiment may contain any subset of sensors in (72), (73) that is suited to implement its functions, and possibly a later number then shown in FIG. 3. [0127] Two magnetic sensors, placed near the magnetic coupling made up of (70) and (71), in an axis that is not perpendicular to the rotational plane of the magnetic coupling, are suited to detect and count revolutions of the magnets that make up the magnetic coupling, and thus, the number of revolutions of the turbine. An algorithm that counts the number of revolutions per time unit, by means of signals generated by these sensors, uses standard methods of vector calculus, and requires a set of signals recorded sufficiently frequent to do so. The rotational plane is understood to be a plane in terminology of geometry, that is parallel to the adjacent circular parts of the surfaces of

(70) and (71), shown in FIG. 3. Counting the number of revolutions of the turbine per time unit, including fractions of them, yields an approximation for the turbine speed. Assuming knowledge of the amount of volume of the medium, which needs to pass through the pipe to effect one rotation movement of the turbine, an approximation for the current rate of throughput is obtained. Counting the turbine revolutions during a time interval yields the cumulative flow during that time interval.

[0128] For instance, in FIG. 3, the signals of any two sensors, either belonging to set (72) or (73), may be used in the determination of rotation speed of the magnetic coupling, by means of vector calculus. Alternatively, a sensor of set (72) and one of (set (73) may be used to generate a set of signal from which to detect rotation of the magnetic coupling. For any two sensors used, it is assumed they are not aligned in a line that is orthogonal to the rotational plane.

[0129] The power transmission between magnets (70) and (71) may not work accurately due to inertia or resistance of mechanical components connected to (71). For instance, a jammed digit in the gearbox contained in (54) may cause a total blockage of movement of (71) or introduce friction that is sufficient to cause a difference in the rotation count of (70) and (71) while the turbine is rotating. Such condition can be detected analyzing the signals generated by two sensors, each belonging either to set (72) or (73), that are not aligned in a line that is orthogonal to the rotational plane of the magnetic coupling.

[0130] Another condition that may cause a difference in rotation speed between (70) and (71) is a geometric misalignment of (70) and (71). For accurate transmission of the rotation count, the adjacent circular parts of surfaces of the two magnets need to be aligned in parallel, within small tolerances. If the two surfaces are misaligned, outside tolerances, the magnetic coupling may not be strong enough ensure an accurate transmission of the rotation movement. In that case, inertia of

(71) and mechanical components (71) is connected to, and for instance energy loss due to friction in the gearbox, may cause the rotation count of (71) to be lower than the one of (70) while the turbine is moving. This condition can be as well detected analyzing the signals generated by two sensors, each belonging either to (72) or (73), that are not aligned in a line that is perpendicular to the rotational plane. [0131] In designs of a retrofit device to detect differences in the rotation count of (70) and (71), more than two sensors may be used. FIG. 3. shows a possible placement of sensors; other arrangements and a number of magnetic sensors that is larger than the one shown in FIG. 3 may be used. A design will strive to minimize the energy footprint of the device. A number of sensors larger than two may be used to simplify vector calculations performed by the sensor processor associated with the magnetic sensors, to determine the rotation count and patterns of signals generated by the sensors that are indicative of differences in rotation speed of the two magnets or their geometric misalignment. Also, the magnetic sensors may be in an alignment than is different to the one shown in FIG. 3. For instance, the geometric position of a sensor may intersect with the rotational plane of the magnetic coupling.

[0132] Another condition that can be detected by a time series of signals generated by two sensors is a reversal of the direction of rotation of magnet (70), the pickup, caused by backpressure in the pipe. With a suitable geometric placement of sensors, the rotation direction of the magnetic coupling can be detected using two sensors.

[0133] An attempt to tamper by placing a magnet near the magnetic coupling, to slow down the rotation speed of the magnets, will lead to changes in the strength of the magnetic field. If a record is kept of values observed for signals corresponding to the strength of the magnetic field during normal operation, it can discern the scenario when strength of the ambient magnetic field has been altered.

[0134] The use of magnetic sensors for the detection of defects also is warranted in a retrofit device used for a legacy flow meter that has electronic components and for which the exterior part of its magnetic coupling may be made up of magnetic sensors instead of magnets. Conditions that lead to a malfunction of the magnetic coupling of a flow meter that works on a purely mechanical basis, such as a misalignment of the components of the coupling, reversal of flow direction, or tamper attempts using a magnet, will affect a flow meter with electronic components as well. Legacy flow meters that are equipped with magnetic sensors often do not detect aforementioned conditions. Thus, a retrofit device for such flow meter may contain magnetic sensors to observe the behavior of the magnetic coupling and perform an analysis of signals generated by its magnetic sensors similar to a retrofit device for a flow meter that works on a purely mechanical basis.

[0135] The retrofit device in accordance with a preferred embodiment may contain vibration sensors for several purposes. If the legacy flow meter contains a gearbox in casing component (54), the retrofit device may contain one or more vibration sensor attached to (54), such as sensor (62) shown in FIG. 2. Such vibration sensors may perform multiple functions. For instance, they may function as watchdog to wake up the device from a hibernation state when they detect a vibration signature that is indicative of movements in the gearbox, caused by flow in the pipe. The device then may capture images of elements of the meter display using cameras (59) or (60). One or more sensors (62) may also capture the vibration signature of the gearbox during turbine movement and transmit the signature to a controller that determines if it lies within the range of vibration signatures that is deemed indicative of normal operation for the device. If the vibration signature is not within that range, the controller may initiate sending a notification to the management infrastructure, to alert about a potential defect of the flow meter. A vibration signature observed by sensors (62) observed during gearbox activity also may be used for the detection of slow pipe leaks. A slow pipe leak is a miniscule loss of fluid caused by a small fracture in the pipe infrastructure. Slow leaks often are hard to detect. For instance, in a municipal water supply system, a slow water leak that is downstream from a water meter at a residential endpoint may be detected this way. At a residential endpoint, periods of inactivity are expected, when no water is used and thus no flow should be present. During such periods, a slow leak should nevertheless cause a minuscule movement of turbine and gearbox, causing a characteristic vibration signature emitted by the gearbox, observable by sensors (62).

[0136] One or more pressure sensors may be installed in the pipe in vicinity of the flow meter. Current technology permits the installation of such sensors into the pipe envelope with low costs. Such pressure sensors may be integrated into any of the modules (11), (12), (24), (28), or (29) in FIG. 1. Their sensor readings may be part of a comprehensive system for water leak detection. They also may be used for error analysis at a flow meter. For instance, sediments and debris may cause a blockage of the turbine and pipe, leading to an observable pressure gradient between two measurement points, or fluctuation of measured pressure at one point. This information may be used to determine a correct functioning of the turbine.

[0137] Further sensors may exist, measuring environmental parameters, such as temperature, humidity, or chemical properties of the transported medium. For instance, sensors (64) may include temperature sensors, and one of sensors (63), installed in the pipe envelope, may measure chemical properties of the transported medium, such as the salt content.

[0138] In FIG. 2 the cameras (59, 60) capture an image of the meter display (55) and generates a digital representation of the measurement presented by the meter display. Concurrently, two magnetic sensors (e.g. 61) are used to count revolutions of the turbine by means of the magnetic field generated by the magnets in the magnetic coupling. Assuming knowledge of gear translation of the transmission box, the number of revolutions per time unit of the magnetic coupling can be used to calculate measured water volume. If the value captured by the cameras (59, 60) and the one derived from the rotation count do not coincide, it is assumed that the meter has a defect affecting a component in the path of power transmission from the turbine to the digit display. For instance, the magnetic coupling may be misaligned or transmission blocked in the gearbox.

[0139] Many designs for legacy flow meters exist, distinguished by the laws of physics on which their operations are based, or mechanical design. Beyond turbine flow meters, the design principles of presented retrofit device can be applied to a class of flow meter types, that are all based on observing the movement of a mechanical part, often a rotation of that part, being driven by the medium as it passes through the pipe. Examples are paddle wheel and propeller flow meters, and positive displacement flow meters. These flow meter types have the same essential design like a turbine flow meter in that the moving mechanical part is driven by the medium transported in the pipe, and its movement transmitted by a signal, typically a magnetic field, that is observed by an external component, which translates the magnetic signals to display a cumulative or current rate of throughput, or both. The external component works on a purely mechanical or electronic basis, or a combination of both. What is common to these types of flow meters is that their components that are situated in the pipe envelope and also their external component have similar designs and operating principles, and thus are affected by similar failures. All methods of introspection that have been described for a turbine flow meter, such as the observation of the rotation count of the mechanic coupling and comparing a rate of throughput and cumulative throughput derived of it with the values obtained from the digit display, and the probing for mechanical failures using magnetic and vibration sensors, are applicable to these flow meter types and can be equally used in a retrofit device for a legacy flow meter of one of these types.

[0140] If a retrofit device in accordance with a preferred embodiment is installed in a location distant from access to the electric grid (autonomous), it will typically be powered by an

autonomous power source, such as battery backed solar, and thus energy management is a concern. The operating system on the retrofit device may spend the majority of time in a hibernation state. A hibernation state may be implemented in various ways. It may entail the state of the operating system being inactive, with a snapshot of the operating system resident in memory or storage. A snapshot of an operating system is a representation of the state of memory and registers. Upon a wakeup signal, the snapshot is activated. Wakeup may be performed by a coprocessor that is resident on the same controller or by another controller. Alternatively, hibernation state may just entail a state of reduced activity, with a minimum set of threads and processes active and a subset of device drivers that are active at other times, being unloaded or suspended. The operating system will be activated periodically, such as to send it status or data by means of a network connection, or in case activity is detected for the flow meter. The wake-up may be performed by a controller after a time counter expires, or upon sensor activity. For instance, in FIG. 1, controller (35) may host the operating system. Controller (41) may server as state manager for controller (35) and periodically active the operating system. The sets of sensors (30), (40), connected to controller (41) may include a vibration sensor that is attached to the pipe or gear box, (62) or (64) in FIG. 1, or magnetic sensors (61). Upon detection of a vibration signature that is characteristic for water flow, captured by the vibration sensor, or rotation movements of the magnetic coupling respectively, controller (41) may wake up the operating system on (35).

[0141] A sensor processing unit consists of sensors and sensor processors. A sensor processor is made up of software or firmware to configure one or more sensors, control their operation, and process the signals generated by them. Such software and firmware may reside on multiple controllers, that may not all reside on the same module.

[0142] The tasks a sensor processor may perform in processing signals may be complex. Consider magnetic sensors (61) in FIG. 2. that periodically record the magnetic field adjacent to the magnetic coupling. Their sensor processor reads the signals generated by them and converts signals into data that represent a time series of vectors that model the strength of the magnetic field at measurement points. The value of a vector needs to be normalized with respect to the Earth's magnetic field. A sequence of vectors of a time series needs to be identified as a rotation movement of the magnetic coupling or a component of it, (70) or (71) in FIG. 3. The time series of signals generated by magnetic sensors, that is associated with a sequence of vectors that has been established to correspond to a full rotation or partial rotation of a certain angle, is used to identify rotation movements and speed from further signals generated by the magnetic sensors. A sequence of vectors of a time series associated with a rotation also can be used as a reference for a correct alignment of the magnets of the magnetic coupling, and signals of further recorded rotations be compared against them, to detect misalignments or infer the magnetic field may have been altered by a magnet in an attempt to tamper.

[0143] The tasks of a sensor processor may be cooperatively performed by software or firmware that resides on multiple controllers. For instance, if magnetic sensors (61) correspond to sensors (33) in FIG. 1. controller (32) may cache a set of signals recorded by (33) and convent them into a rotation count, performing vector calculus. (32) forwards the rotation count to controller (35) on module (11), that runs the operating system. A program may be active on controller (35) that maintains a database with rotation counts recorded by (33), and patterns of time series of vectors associated with a rotation. The program may communicate with the software or firmware that is active on (32), for instance to change control parameters for the sensors. The sensor processor of the magnetic sensors (33) is made up of the software and firmware that is active on (32) and (35) to cooperatively perform aforementioned tasks. In another embodiment, the sensor processor may run on controllers belonging to the same module. For instance, in FIG. 1, the magnetic sensors may be contained in sensor set (34), and controller (35) may perform all described functions of the sensor processor for the magnetic sensors.

[0144] A sensor processor also may communicate with controllers that perform other functions. For instance, if sensor set (40) contains a piezoelectric vibration sensor, its sensor processor, active on controller (41), may manage wakeup of the operating system that is active on (35). Upon detection of a signal recorded by the vibration sensor, the sensor processor may send a signal by means of a network or system bus interface to (35).

[0145] After attachment of the retrofit device in accordance with a preferred embodiment to a legacy flow meter, sensor processors typically require calibration, which entails an adjustment of parameters used by sensor processors in the interpretation of signals recorded by sensors. For instance, a sensor processor that converts signals generated by magnetic sensors into a rotation count, requires information which signal pattern corresponds to the expected flow direction in the pipe, and which is indicative of reverse flow. Some of these adjustments required for sensor processors, to interpret signals by sensors, may entail hardware configurations, such as setting hardware switches or setting up static configuration data. For others, it may not be possible to determine them before installing the retrofit device and observing the signals that are generated by a set of sensors in response to the operation of the flow meter and environmental conditions. These may be determined by means of learning algorithms and adjustment, possibly aided by a technician who performs the installation of the device. For a retrofit device for a turbine flow meter, calibration is required for the sensor processors of various sensors:

[0146] The vibration signature associated with flow in the pipe depends on weight, diameter and the material of pipe and flow meters, physical properties of the medium, such as viscosity, geological properties of ambient soil, pipe attachment points and ambient vibration signals. Thus, it may not be possible to pre-configure a sensor processor for a sensor that records the vibration signature in a pipe, such as sensor (64) in FIG. 2. The range of vibration signatures indicative of flow may be determined by a learning algorithm. Such learning algorithm would sample the flow in the pipe during time intervals when flow is established to occur by other means. For instance, if the sensor processor of the magnetic sensors is calibrated, information generated by it for the current rate of throughput can be used by a learning algorithm to determine vibration signatures that are characteristic for flow in the pipe. Vibration signatures are sampled for both states, that flow is detected in the pipe or not detected, to build a model of vibration signatures that are indicative of flow in the pipe. [0147] The vibration signature of mechanical parts of the meter, such as a gear box contained in casing part (54) depends on the construction of the meter. Determining the range of vibration signatures associated with flow in the pipe may be performed similar to described herein.

[0148] Calibration of the sensor processor of magnetic sensors (61) is desirable for multiple reasons. First, the signal of any magnetic sensor needs to be normalized with regards to the direction of the Earth's magnetic field and strength of the magnets in the magnetic coupling. Also, the geometric position of sensors (61) relative to the magnetic coupling in (51), (52) may vary between flow meter types, and also for a given flow meter type the positioning may be determined by conditions at the installation site. Third, the rotation direction of the magnets in the magnetic coupling needs to be configured, and the amount of water flow per revolution of the turbine, if these values are not part of static configuration data of the sensor processor of the magnetic sensors, based on knowledge of the meter type on which the retrofit device is installed. The strength of a magnetic field associated with a rotation and throughput volume per rotation may be determined through calibration. The sampling algorithm run during calibration may derive the throughput volume per rotation by counting rotations for a time interval and calculating the throughput volume for that time interval by comparison with the throughput volume calculated from the difference of values for the cumulative throughput read at the beginning and end of the time interval on the digit display, (56), or obtained from the digital interface (58).

[0149] A camera (such as 59, 60 in FIG. 2) may be adjusted to use a certain focal length or time of lens exposure, and if the sensor processor of the camera as well controls lights, to illuminate the meter display, the light intensity may need to be adjusted. Both can be performed by a learning algorithm that analyzes digital image taken by the cameras.

[0150] If calibration is performed by a learning algorithm, the process of calibration for a sensor processor entails recording signals generated by a set of sensors, correlating them to known states of objects observed by the sensors, and adjusting a computational model that is used to determine the state of observed objects based on the signals generated by the sensors.

[0151] An observable state associated with a legacy flow meter is a value that models the occurrence of an observed event or an operational state, or a combination of one or more of both of aforementioned. An observed event models a condition that is external to the legacy device. For a flow meter, examples of an observed event are the state that a medium flows through the pipe, or the intra-pipe pressure pipe being above a threshold value. An operational state models a property of the legacy device's internal functioning. For a turbine flow meter, examples of an operational state are that the turbine is rotating, perhaps further specifying that the revolution count is within a given range, or that the transmission gear box is active, yet assumed to be defective. [0152] An observable state is determined from a set of signals, sig l, . . . , sig n, generated by a set of sensors, SI, . . . , SN, of the retrofit device in accordance with a preferred embodiment. A signal sig i, generated by sensor Si, may be a point-in-time signal generated by the sensor, associated with a timestamp, or a series of signals generated by a sensor, each associated with a timestamp. For instance, Si may be a magnetic sensor and sig i a time series of signals. An observable state is then calculated by a set of functions, fl, . . . , fk, and another function, F. A function is understood to be a function in programming language terminology sense, that takes a set of arguments as input and by means of an algorithm calculates a result. A function may for instance implement a vector analysis calculation. Each function fi, in its set of arguments includes a subset, or generally speaking all signals sig l, . . . , sig_n. A function fi may have further arguments, ti_l, . . . , ti ki, that further determine the result that fi calculates for a given set of input values sig l, . . . , sig n, ki is an index that is the number arguments of the set ti l, . . . , ti ki. The observable state then is calculated by means of function F, that takes as input the results of functions fi and determines a Boolean value from it, signifying whether the observable state has been present at the time during the time interval during which the sets of signals sig l, . . . , sig n had been generated, or not. The result of F is assumed to be of Boolean type. It can easily be understood that the set of functions fl, . . . , fk, F can be replaced with another function, that takes sig l, . . . , sig n, and all sets ti l, ti ki as input. The sets ti l, . . . , ti ki, for i=l, . . . , n make up the tuning parameters for an observable state. They account for local environmental conditions that need to be considered in the computational model (given by fl, . . . , fk, F) for the observable state. For instance, for a signal sig i that is generated by a magnetic sensor, the set of tuning parameters ti l, . . . , ti ki may model adjustments that need to be done in the calculation of vector modelling the magnetic field, that takes into account the strength of the Earth's magnetic field. With described computational model, the calibration of a sensor processor associated with sensors SI, . . . , SN entails the determination of tuning parameters for an observable state. The sensor processor records signals sig l, sig_n, applies function F that takes as input sig l, . . . , sig n and for each sig i a set of tuning parameters ti l, . . . , ti ki. Some of these sets of tuning parameters may be empty. A sensor processor may evaluate signals of its associated sensors for multiple observable states, having for each a dedicated computational model, a function Fj and tuning parameters tj_i_l, . . . , tj i kzi for sig i as described.

[0153] In one embodiment it is assumed that a modification of tuning parameters ti l, . . . , ti ki, as described herein is of limited complexity. If it cannot be performed on the retrofit device, due to its limited computational resources, the retrofit device instructs the management infrastructure to perform the calculation and obtains the result from it. [0154] For a flow meter, an example of an observable state and defining tuning parameters for it is the determination of the vibration signature associated with an observable state, here called WF V, signifying flow in the pipe. For a set of sensors, VI, . . . , Vn, flow will generate a vibration signature for each, according to a computational model used by the sensor processor associated with the set of sensors VI, . . . , Vn. The vibration signature is, as explained, specific to properties of the medium, such as viscosity, and pipe material, size, geometry, and surroundings, sigj is the signal generated by sensor VJ of the set VI, . . . , Vn, sampled during a time interval. Function fj, taking as arguments sigj, and tj 1 , . . . , tj kj is applied to the vibration signature, tj 1 , . . . , tj kj are tuning parameters for the observable state WF V. fj may apply in its algorithm a frequency signal filter, that determines if signals in given frequency ranges have been observed by VJ, and may give as a result a numeric value. F=F_WF_V is applied to the results that each fj yields for a set of input values, sig, tj 1 , . . . , tj k, and the result determines if the set of signals observed by sensors VI, . . . , Vn corresponds to water flow in the pipe, i.e. if observable state WF V holds. It is easily understood that the tuning parameters for observable state WF V, parameters tj 1 , . . . , tj k, allow the adjustment of the result calculated by function fj, to account for conditions specific to the environment of the flow meter. For instance, they may, among others, in the determination if a vibration signature is indicative of flow of the medium, specify to discard certain frequencies, that may be generated by other sources in close location to the flow meter.

[0155] Another example of an observable state, called WFT, may describe that water flow is present and no errors are detected for the turbine. This observable state would process the signals generated by three sensors, a vibration sensor, V, and two magnetic, sensors, Ml, M2. Three functions exist, fl=fl(sig_v, tl 1 , . . . , t_vk) and fs=fs(sig_ms, ts_l, . . . , ts_l), and s=2 or s=3. fl corresponds to a function fj that models the vibration signature for a sensor Vj, as described in 12.2.3. Here, fj models the vibration signatures of sensor V that are associated with movement in the gearbox, fs takes as arguments signals sig_ms, generated by Ml or M2 for s=2 or s=3 respectively, and a set of tuning parameters ts l, . . . , ts k. The set of function fs includes in its calculation if the signals sig ms, s=2,3, recorded by Ml and M2, correspond to a rotation of the turbine. Function F=F_WFT then is made up of functions fl, f2 and f3. F calculates a Boolean value for the observable state WFT that signifies that water flow exists and no errors are detected for the gearbox. The determination of the tuning parameters for observable state WFT entails the determination of ti l, . . . , ti ki, to obtain a model for vibration signature calculated from signals of V that is indicative of activity of the gearbox, and in addition parameters ts l, . . . , ts ks, s=2,3, to obtain an interpretation of the range of signals generated by the magnetic sensors Ml and M2 that is suited to determine signal patterns associated with flow in the pipe. [0156] The implementation of the software to control a retrofit device includes a set of sensor processors. The calibration of a retrofit device in accordance with a preferred embodiment entails the calibration of all sensor processors. The retrofit device is in operating state calibration, if one or more sensor processors are in state calibration.

[0157] For a sensor processor, the initial values for tuning parameters for an observable state may be preconfiguring on a device during software install or set during manual initial configuration. They may then be further adjusted by means of calibration, which also may be performed periodically during operation of the device.

[0158] The initial values for tuning parameters for an observable state may be given as a set of configuration parameters, that take into account information about the environment where a retrofit device is installed. For instance, for a sensor processor for vibration sensors 64 attached to a pipe, (64) in FIG. 2, initial values for tuning parameters may be given taking into account the pipe material and geometry, meter type, and soil condition. Initial values for tuning parameters for an observable state may be a best guess, or provided by a configuration that has been cloned from another retrofit device, installed on a flow meter in vicinity of the present one, or from the retrofit device of another meter, situated in an environment that is assumed to produce a similar vibration signature in response to flow of the medium.

[0159] During the operation of a retrofit device in accordance with a preferred embodiment, the tuning parameters for an observable state are corrected in response to feedback on their validity. For present example of one or more vibration sensors (64) to detect flow, a learning algorithm may work as follows:

[0160] Upon detection of vibration by sensor (64) (e.g. FIG. 2), its sensor processor, P_V, records the signals generated by (64) and invokes a function F=F_WF_V as described herein, to determine if the recorded signals are indicative of flow in the pipe. F WF V takes as input the set of signals, sig l, . . . , sig n, and for each sigj current tuning parameters tj 1 , . . . , tj k for an observable state associated with F WF V, here the event of flow in the pipe. Concurrently, the sensor processor associated with sensors (61), called PJVI, samples signals generated by the magnetic sensors and determines if the signals recorded by magnetic sensors are indicative of a rotation of the magnetic coupling. It is assumed that the sensor processor for sensors (61) has already been calibrated. If sensor processors P_V and P JVI, each doing its calculation using as input signals from its associated sensors and tuning parameters for the observable state, flow of the medium in the pipe, come to the same result, that either flow in the pipe exists, or not, the learning algorithm will terminate, as the calculation by P_V, with input signals and current tuning parameters for an observable state correctly determined the state. If the calculations by P_V and P JVI do not coincide, sensor processor P_V will adjust tj 1 , . . . , tj k in a way described in 12.2.3, such that a determination by P_V using these modified tuning parameters in its model yields the same result like the calculation done by PJVI.

[0161] In response to the detection of activity by a vibration sensor or by the magnetic sensors are repeated until corrections to the sets of tuning parameters tj l, . . . , tj kj of function F_WF_V as described in 13.1 no longer are required. The system may keep a history log of past observed vibration signatures and modifications to tuning parameters. If the described method of adjustment of tuning parameters does not eventually lead a set of parameters that correctly indicate water flow, the history log is analyzed, in an attempt to establish a pattern of recorded frequencies according to the time of day. If such pattern can be determined, the tuning function F WF V is modified to include another variable, the time of day. Self-modification of a function may be a too

computationally costly task to be performed by a sensor processor on the retrofit device. The retrofit device may request from the management infrastructure to be sent a modified function F WF V, that takes the time of day as an additional parameter. Alternatively, the set of tuning parameters may include an anchor for a list of time intervals. The learning algorithm is assumed to eventually lead a set of tuning parameters tj l, . . . , tj kj that is stable, i.e. no longer require further corrections. In rare situations, the learning algorithm may not arrive at such set of tuning parameters that does not require further corrections. In these cases, an operator would be required to configure the tuning parameters.

[0162] One or more sensors and associated sensor processor may act as watchdog to monitor for flow in the pipe. For instance, in FIG. 2, the magnetic sensors (61), or vibration sensors belonging to set (62) or (64), upon detection of flow may initiate actions, to record the value for throughput displayed by (56) or obtained from (58). A signal to the sensor processor of cameras (59) or (60) will be sent, that will, if energy resources of the device permit, instruct the cameras to periodically generate images or videos of elements (56) or (57) of the meter display, (55), and convert them to a digital representation of values shown on them. Concurrently, the sensor processor associated with magnetic sensors (61) may record the rotation of the magnetic coupling. For a given meter type, the expected rotation count per volume unit is known, since it has been determined earlier during calibration. Thus, the rotation count can be used as supplemental measurement, to obtain greater granularity for measurements of the cumulative throughput, or to confirm the accuracy of the values shown by elements on the meter display.

[0163] A retrofit device in accordance with a preferred embodiment may initiate a process for error diagnostics if for an observable event signals by a set of sensors are outside the expected range that had been established during calibration of the associated sensor processor. An example is that the flow volume during a time interval, as determined by the difference of two cumulative throughput values obtained from the digit display (56) does not correspond to the flow volume determined by counting turbine rotations by means of the magnetic sensors (61). The retrofit device may initiate a process for error diagnostics upon an instruction originating from an administration infrastructure. Error diagnosis may entail the following steps:

[0164] Establishment of the correct functioning of the magnetic coupling, i.e. verifying the signals recorded by the magnetic sensors (61) are in the expected range that had been established during calibration of its associated sensor processor. A failure of this test may indicate a deformed or misaligned magnetic coupling, or an attempt to tamper, by slowing the turbine with a magnet.

[0165] Determination if signals recorded by sensor (62) are within the range that is deemed to be normal. A failure of this test may indicate damage to the gearbox.

[0166] During a sampling period, compare the rotation count for the turbine, as determined by means of signals from magnetic sensors (61), with the accumulated water usage determined from the digit display (56), as described in 10.6. A failure of this test may indicate damage to the gearbox or magnetic coupling.

[0167] "System and Method for Data Management Structure Using Auditable Delta Records in a Distributed Environment," application Ser. No. 15/367,873, filed Dec. 2, 2016 (incorporated by reference) describes a method to generate audit data that is based on audit blockchains. An audit blockchain is a sequence of records linked by a cryptographic hash calculation. A given record in its metadata contains a cryptographic hash value that is calculated taking as input one or more predecessor records in the chain. Audit blockchains are a mean to establish device identity for a small device, with limited computational resources, such as the situation in an insecure location. An example of such device is an IoT devices that is installed outdoors. Device identity entails for a given device, dev l, that it cannot be spoofed by another device, dev_2. I.e. it is not possible that dev_2 assumes the identity of dev l and for instance communicates with another entity, such as a management infrastructure, without the latter noticing that it no longer communicates with dev l . In addition to device identity, for devices that are installed in insecure locations, proof of device location frequently is required. Under proof of location for a device it is understood that the location of the device at a given datum can be established in a manner that satisfies regulatory criteria. For instance, for a retrofit device installed on a legacy flow meter at a residential end point of a water supply system, to ensure authenticity of measurement data sent from the device, it is also required to prove that the device is mounted on a given water meter, and that it hasn't been moved to another meter, in an attempt to tamper. Proof of location also is important for instance in industrial installations, for post incident forensic investigations. [0168] Using audit blockchains in conjunction with elements of active and passive security designs provides a comprehensive security implementation for IoT devices that satisfies typical regulatory standards for the generation of data used for audit or forensics.

[0169] Active security for a component of an electronic device entails encasing that component in a sealed enclosure, and tamper or opening of the enclosure can be detected. Frequently, the enclosure of such device is monitored electronically for tamper, for instance by means of a sensor that is installed in the interior of the casing. If the casing has been detected as opened, various actions may be performed, such as generating an event or notifying a remote infrastructure that controls the device, or initiating erasure of or part or all data that are stored in volatile or non-volatile memory or storage, that is contained in the device. If memory and storage is erased, the device would be rendered unusable after the tamper seal has been broken, and any data stored on the device would be lost. For an IoT device that communicates with a management infrastructure, the use of audit blockchains in conjunction with active security is a mean to establish device identity for the IoT device with a management infrastructure, that satisfies audit requirements. The IoT device, dev l, sends data to the management infrastructure in blockchain format. A device, dev_2, that attempts to assume the identity of dev l and send data to the management structure in place of dev l, would be required to generate blockchain records that preserve the continuity of the blockchain, i.e.

contain the hash value of one of more predecessor records. These records are stored in dev l, in memory or storage, and, if active security is enabled, during a tamper attempt are not accessible to be copied to dev_2, since it would be ensured that on dev l memory or storage containing these predecessor records would be erased upon breaking the tamper seal of the device. Thus, active security in conjunction with block chains yields a method to prove device identity.

[0170] A way to establish location for a sensor device by means of active security is to attach a retrofit device to a fixed, immovable structure, by means of an electronic locking device. An electronic locking device provides for secure, physical attachment of a device to another object, and electronic monitoring of the mean of attachment. For instance, a cable lock with electronic monitoring is an example of an electronic locking device. It consists of a cable that is connected to an electronic component, which monitors if the cable has been severed, and if so, will send a notification, using a mean of network transmission. The electronic component, that monitors the state of the cable may be enclosed in a tamper proof enclosure and transmit signals periodically, advertising its state and the state of the cable. It may do so, for instance, using a ZigBee or BLE network connection or RF signaling. [0171] Establishing location for a retrofit device by means of active security, using an electronic locking device, is not always practical; it may be complex to don in on-site installations, and error prone.

[0172] Passive security for a device or component of it entails establishing for that device a link by means of a digital signature, with an entity, whose security has been established in another way. In FIG. 4, a retrofit device is shown that consists of two modules, (90) and (91). Both have active security enabled, i.e. have a tamper seal. Module (90) contains a controller for communication, (93), that is connected to an antenna, (94). Module (91) has a component, (95), to communicate with a device, (92), that is assumed to be trusted, and at a known location. Component (95) communicates with (92) by means of component (96), and (96) is capable of sending a signal containing a signature to component (95) that is suited to identify the location of (95) and thus also module (91). The location of (95) may be for instance given as distance of (95) to (91), or in a format that allows for an accurate identification of (95) in a 3D space. For instance, (95) may be an RF antenna and (96) is an RF antenna. (95) receives from (96) a message containing a digital signature from device (92) combined with a notification of the distance between (96) and (95). Also, (92) may be made up of multiple components, not shown here, each having an RF antenna (96). The antennas (96) have a spatial placement that, when communicating with component (95) allows for the determination of the location of (95). Component (95) receives from (96) a message containing a digital signature issued by device (92) combined with a notification of the location of (95). The message amounts to a proof of location for (95) and thus device (91). (92) also may be an electronic locking device that has been attached to an immovable structure, such as a pipe or a flow meter, during a supervised installation. Such electronic locking device does not necessarily need to secure a retrofit device; it just needs to be capable of the functions of device (92) with regards to communication with module (91).

[0173] The method of establishing location identity that has been illustrated using FIG. 4, by means of communication with a device for which location identity has been established, device (92) in FIG. 4, is applicable beyond retrofit devices; it is a mean to establish location identity for an IoT device in general. Also, the components contained in modules (90) and (91) may all be contained in the same module for that method of establishing location identity to be applicable.

[0174] This establishes for module (91) a geographic location, signed by trusted entity (92). A controller, (97), on module (91) communicates with controller (98) on module (90), by means of a network connection, (99). Connection (99) may be any network connection between modules of a device as described for FIG. 1. The communication between (97) and (98) is trusted by means of cryptographic keys. Thus, a chain of trust has been established to communicate the location of the device to the management infrastructure. (91) receives its geographic location from (92), a trusted device, and passes it on to module (90), by means of a trusted connection. (90) sends the location to a management infrastructure, as payload of a block chain record, generated by (93) and sent across a network connection, (94). Prof of identity for modules (90) and (91) is given by active security. This establishes a tamper proof mean for the device containing modules (90) and (91) to establish its geographic location with a management infrastructure. Instead of determination of the location of (95) and thus (91) by RF antennas, passive security for (91) may be established in other ways, involving a mean of signaling between (91) and (92), and (92) being situated in a trusted location.

[0175] In addition, module (92) may send messages to module (91) in blockchain format, which are then encapsulated into the payload of the blockchain generated by (93). This allows to include (92) into a system for auditing for an installation of IoT devices.

[0176] Component (95) may be a vibration sensors and (96) a component capable of emitting acoustic signals. For instance, for a flow meter, (95) may be attached to a pipe near the flow meter, and (96) attached to the same pipe segment to which the flow meter belongs, in proximity to component (95), and with no other flow meter nearby at an install location where the signal emitted by (92) can be detected. Device (92) is situated in a secure location, for instance a building. (96) emits an acoustic signal with a unique signature, identifying the location of (92), that is received by component (95) and further transmitted to the management infrastructure, by means of network connection (99), and using cryptographic keys. Another possibility for signal transmission from a trusted source is that (95) is a GPS receiver.

[0177] Alternatively, module (91) may not communicate with an electronic device, but (95) may be a sensor or transmitter that probes for signals that are generated by a passive source, i.e. sources that do not require electric power to generate a signal. For instance, (102) may be an RFID chip that is permanently mounted to the pipe infrastructure, in vicinity of the flow meter, in a tamper proof manner, and (95) is an RFID reader. (102) encodes a unique location ID, and (95) periodically sends out signals to query (102).

[0178] Location identity also may be established by detection of movement. A device may be installed in a supervised manner, during which its location is verified and recorded. For a retrofit device for a flow meter that has a magnetic coupling, (95) may be the set of magnetic sensors corresponding to (61) in FIG. 2. The sensor processor associated with (95) periodically evaluates the signals generated by sensors (95) to verify the presence of the magnetic field generated by the magnetic coupling, and created a notification containing the result of that test, to be forwarded to the management infrastructure. Thus, the management infrastructure receives periodically a notification whether or not the retrofit device has been moved. Alternatively, (95) may be an acceleration sensors that detects movements of the retrofit device, indicative of tampering. Both methods of detecting relocation of the device require that module (91) has a power source suited to support the periodic activation of (95) and its associated sensor processor without interruption, and independent of module (90). Further, (91) would need to have the computational resources to store results of the test of sensor signals, if for a period of time results cannot be sent to the management infrastructure.

[0179] A device may record signals by various sensors and generate a signal profile that is deemed to uniquely identify the site of installation, or a distance from a known location. For instance, component (95) may be one or more sensors that sample environmental signals, such as vibration, magnetic field, or RF signals, to generate a unique signal profile of the environment. The sensor processor associated with component (95) then evaluates signals captured by (95) periodically, to compare them against the captured signal profile, and sends notifications to the management infrastructure.

[0180] A retrofit device for a legacy flow meter may be able to establish device identity by taking photographic images of the meter display, (55) in FIG. 2, or querying digital interface (58). Often a meter display contains a serial number, and a photographic image of it may be converted to a numeric representation by means of image recognition. (58) might provide a unique identifier of the flow meter upon query.

[0181] A retrofit device may implement one or more of the described security methods, active security, determination of location or audit blockchains independently of others.

[0182] The retrofit device is enabled to participate in an automated management system for IoT devices. Such automated management system for administration of IoT devices may be used to instruct the IoT devices to perform actions, or store and process data sent by them. For instance, an automated management system to administer retrofit devices for flow meters in a pipe installation may provide for the storage of a history of measurements of cumulative or current rates of throughput, forwarded by the retrofit devices, and further functions for accounting and analysis of the data, for instance to find defects in the pipe system.

[0183] FIG. 5. shows an example of a management infrastructure, (110), for a set of IoT devices, PI, . . . , P8, (114) depicts P7. The IoT devices are connected to network devices (115), in FIG. 5, El, . . . , E3. The set of network devices may contain gateways, routers or edge devices, which are connected to the management infrastructure by means of a network connection, (116). The management infrastructure may be made up of one or more servers, that may also be virtual servers in a cloud. The management infrastructure implements several functions, such as a device manager, (111), a database (112), and an administration interface, (113). If the IoT devices (114) implements audit blockchains, (110) also includes a blockchain manager, (117), which stores data in blockchain format, generated by the IoT devices. The device manager (111) provides for administration of the IoT devices (114). For instance, if an IoT device is a retrofit device for a flow meter, the device manager may issue a request to the retrofit device to send a history of recent measurement of throughput values, or statistics about device health. The IoT devices as well may implement a protocol for peer-to-peer communication, to communicate directly with each other, without participation of the management infrastructure. For instance, P2 and P3 may communicate with each other to coordinate the recording of signals generated by sensors.

[0184] The software and firmware of a retrofit device implements functions for communication with a management infrastructure (110), and also may contain function for peer-to-peer

communication. The retrofit device is capable of receiving instructions for the collection of signals generated by its sensors, performed at a scheduled time interval, and send the results to other devices or a management infrastructure. In addition, the retrofit device may perform analysis of recorded signals before sending them. If a retrofit device is not connected to the electric grid, it must be capable of performing such autonomous actions under the constraints of limited battery power, and also, the implementation of the device manager, (111), needs to account for the possibility that such device may have insufficient energy resources. For instance, for a device of the set PI, . . . , P8 (114) upon request by the device manager or a peer device to collect signals of its sensors, its response may include a value for the probability that it will have sufficient electrical energy reserves to perform the data collection at during the specified time interval.

[0185] In a legacy pipe system, without a mean to simultaneously determine the current rate of throughput at many probe points, many defects are difficult to analyze. Examples are flow in a pipe caused by leaks or backpressure in a pipe. Both events may only occur if the intra-pipe pressure is above a threshold or within a certain range. Often, the operator of a pipe infrastructure is aware that pipe leaks exist, yet localizing them is difficult and labor intense, and therefore often not attempted. Currently, leak detection in pipes frequently is performed by means of acoustic signal detection, attaching devices that record acoustic signals at probe points in the pipe system.

[0186] The presented retrofit device for a flow meter supports water leak detection using large scale data analysis, since it allows for integration into an automated management system that schedules measurements of rates of flow at many probe points simultaneously. Several tasks in analyzing flow in a pipe infrastructure depend on the ability to effectively determine the rate flow in real time, concurrently at many probe points. Moreover, a device that probes the rate of flow at a probe point, must be capable of detecting small rates of flow, since the rate of flow in a pipe that is caused by a leak may be miniscule. By measuring the rotation speed of the magnetic coupling, the retrofit device is capable of determining the present rates of flow during a minimal sampling interval, with maximum possible precision, limited by the design of the component of the meter that is immersed into the pipe, such are the turbine. Its capability to measure the rate of flow during a minimal sampling interval, and thus with a small energy footprint, makes it practical for the retrofit device, that has a limited power supply, to be integrated into an automated system for analysis of a pipe infrastructure.

[0187] FIG. 6, shows a retrofit device (119) installed on a water meter. (120) shows the exterior casing of the water meter installed in a pipe. The retrofit device is made up of parts (121),

(128). The casing of the retrofit sensor device consists of four modules. A module is as had been defined for FIG. 1 component of a device with a physical enclosure. One module is the camera module and another is the main module, (124). The casing of the camera module (129) is made up of parts (121), (122), and (123). In addition, two auxiliary modules exist, (125) and (126), that are affixed to the pipe envelope. (125) is attached to the meter casing and contains a vibration sensor. (126) is attached to the pipe and contains a pressure sensor. The camera module contains one or more cameras, one or more light sources, and a controller for the light sources and cameras. The controller casing, (124), contains the controller that provides all services except camera control, such as hosting the embedded operating system, network communication, and battery charge control. (124) also may contain rechargeable batteries, or they may be in a separate unit, not shown here. The electrical components that reside in the camera housing (129) are connected to electrical components in (125) by means of a cable, not shown in FIG. 6. The electronic components of auxiliary module (125) are connected to the ones in the camera housing by means of a cable, now shown in FIG. 6, and the electronic components of (127) are connected to the ones in (124) by means of cable (127). Further cables connect to (124), not shown from this perspective, that connect to a solar panel, and rechargeable batteries, not shown here. (121) is an adapter ring that is mounted onto the water meter display and (123), the main part of the camera housing (129) is attached to (121) by means of screws. One screw is shown here, (128). (122) is a lid for the camera housing (129), covering a transparent display, which allows for the manual inspection of the meter display.

[0188] FIG. 6 shows a legacy flow meter (120), equipped with a retrofit device (119). The retrofit device (119) is installed on top of the meter display, (123) of the flow meter (120). The casing of the retrofit flow meter is made up of housing (129), containing the majority of electronic components, mounted on the meter display by means of screws (128). Housing (129) contains sensors to read the meter display and observe the function of internal parts of the legacy flow meter for additional information, such as for obtaining the current rate of flow. The retrofit device collects data in addition to measurement data presented by the flow meter, (120). Attachment (125) is mounted to the pipe and contains a vibration sensor. Casing (124) has been installed into the pipe envelope, to expose sensors to the pipe interior. Such installations can be performed safely on-site. Casing (124) for instance may contain a pressure sensor to measure intra-pipe pressure or sensors to measure the chemical properties of the medium in the pipe, such as the salt content of water. The retrofit device (119) typically is equipped with solar panels and a networking device, not shown in FIG. 6, to transmit data, typically a cellular antenna, or devices for other protocols, such as

Wireless 802.11, Ethernet, ZigBee, Bluetooth, BLE, USB, or RF signaling.

[0189] A retrofit device for a flow meter implements the same essential functions like a smart meter, recording the cumulative and rate of throughput of the medium transported in a pipe, and optionally data collected by further sensors, and being capable of network transmission of these recorded data. In addition, a retrofit device is capable of observing the function of the legacy flow meter which is supplements. For this, it is equipped with sensors to observe the behavior of the legacy flow meter and detect an incorrect functioning of the latter, caused by defects,

environmental conditions or tamper attempts. For instance, a retrofit device may monitor the behavior of the magnetic coupling of a flow meter, for the correct mechanical alignment of parts.

[0190] Retrofit devices and smart meters provide comparable sets of functions. In the following they are referred to as sensor devices for a pipe infrastructure, or sensor devices. A sensor device is capable of generating measurement values in digital format frequently, on demand, and of storing a set of most recent measurement values. It is enabled to participate in a network architecture, such as an edge network or mesh network. It has sufficient energy reserves to support the network bandwidth required for its operation. A sensor device may collect auxiliary data that may be of interest to the operator of an installation, or to third parties. For instance, it may collect

environmental data, such as air temperature or humidity and intra-pipe temperature. A sensor device can be an example of an IoT device.

[0191] An important design consideration for IoT devices that are deployed in outdoor locations is longevity. Maintenance costs for a device that is deployed outdoors typically are higher than for a computer that is located in a datacenter. A hardware maintenance task, such as the exchange of battery or storage card involves retrieving the device from the location where it is installed and often also opening and restoring a tamper-proof enclosure. A strategy to increase longevity of an IoT device is to employ components with different aging and wear characteristics and design their utilization to maximize the time span during which a replacement of components is not required.

[0192] FIG. 7 shows a schematic drawing for the design of a casing and mounting base for a main module of a retrofit device (119) that is similar that is similar to the one in FIG. 6. The casing of the camera module is made up of parts (132), . . . , (136). (132) is the main component of the casing of the camera module. The exterior frame of the meter display is shown, (131), and (132) is attached to the meter display by means of (134), which is an adapter ring. (134) is attached to the top of the meter by means of the meter clamp, (135), which is attached to the casing of the water meter, (130).

(134) and (135) are connected by screws or bolts, one of which is (136). (133) is the lid of the camera module. (137) is the main module, connected to the camera module by cable (138).

[0193] FIG. 8a. shows the adapter ring (134) of FIG. 7 and FIG. 8b. shows meter clamp (135). These two components comprise an adapter, whose purpose, aside from affixing casing part (132) of the camera module to the meter display, is to account for the various types of flow meters used in pipe installations, that typically differ in size and form factor. This allows for an economical manufacturing of the casing of the retrofit device, with one form factor for the casing of the camera module fitting a variety of flow meter types, and differences in their size and form factor being accounted for by manufacturing the adapter components (134) and (135) specific to the form factor and size of a water meter.

[0194] The meter clamp, (135) in FIG. 7. may be made of two components, as shown in FIG. 8b, which allows for tolerating small variations in the circumference of the part of the flow meter to which it is attached. FIG. 9a. and FIG. 9b. illustrate the attachment of the meter clamp (135) to a flow meter. FIG. 9a. shows the process of attaching the two components (142) of the meter clamp

(135) around the meter display, (141), of a water meter, (140), by means of screws, (143). FIG. 9b. shows the attached meter clamp, (144), after fasting the screw connection, (143) in FIG. 9a.

[0195] FIG. 10 shows another example of a design for a camera module (150). The main component of the casing contains an attachment, (151), that contains the electronic components of the controller for the cameras and further sensors; a controller being a functional unit as introduced for FIG. 1. (154) is the lid, protecting a transparent cover, not shown in FIG. 10. (152) is an adapter ring to attach the main component, (150), by means of screws situated in (153).

[0196] FIG. 11. shows a casing of a camera module (such as 129 in FIG. 6), contained in casing (150) in FIG. 10, that provides an attachment for the camera and magnetic sensors, and the electrical components of their associated sensor processor. The rounded component (160) provides an attachment base for the magnetic sensors, (162). Component (161) is an attachment base for a camera, (163). (164) is a micro-board that contains the majority of electronic components of the sensor processor for (162) and (163). The component shown in FIG. 11 is mounted inside the casing of the camera module, (150) in FIG. 10, such that micro-board (164) is contained in casing component (141), and the magnetic sensors (162) are close to the meter display. [0197] The transparent cover situated on top of the casing of the camera module (150) is protected by a lid, (154) in FIG. 10. This is to protect that transparent cover, but equally important, to eliminate variations in light exposure for the meter display. For instance, glare caused by direct sunlight would affect the quality of photographic images of the meter display, taken by the camera, and the image recognition software may not be able to determine a numeric value of the meter display from such image. Lighting for the camera is controlled by eliminating daylight in the casing of the camera module and using a light source. To eliminate glare and reflection, such light source needs to be situated close to the surface of the transparent cover of the display of the flow meter.

[0198] The schematic drawing of FIG. 12. shows a method of illumination of the meter display of a flow meter. (170) depicts the meter display and corresponds for instance to (131) in FIG. 7. (176) depicts the main part of the casing of the camera module. The lower part of (176) is depicted in a semi-transparent way, to show the spatial arrangement of parts situated in its interior. (176) corresponds for instance to (150) in FIG. 10 or (132) in FIG. 7. Other parts of the camera module casing, such as the lid, (133) in FIG. 7, are not shown. (177) depicts a light source and (178) a mean to affix the light source to casing part (176). (179) depicts a camera and (180) a means to affix the camera to (176). For instance, in FIG. 11, part (161) performs the function of (178) and (180), and (163) corresponds to (179) in FIG. 12. A transparent element with light refractive properties, (171), is placed in close proximity of the surface of the meter display, (170), or in direct contact. (171) if made of light refractive material, for instance, glass, acrylic glass, or transparent resin. The function of (171) is to act as light diffuser, to provide even and diffuse illumination of ambient parts, in particular the meter display. A set of lighting elements is placed on the perimeter of (171), one of which is (173). Such lighting elements may for instance be LEDs. The lighting elements are electrically connected and (172) shows a frame that may be used to achieve a spatial arrangement of them at the perimeter of (171). FIG. 12. shows the lighting elements placed on top of transparent element (171). Other arrangements are possible, shown in FIG. 13. The material properties of (171) achieve a refraction of light rays that enter (171). The spatial placement of lighting elements close to the surface of (171) together with the light refractive properties of (171) provides for a reflection of light rays in a diffuse manner, reducing the amount of light that is reflected back towards the camera, reflection that would interfere with capturing a photographic image of the meter display. (181) illustrates the reflection of light rays emitted by lighting elements (174) in (170) and (171).

[0199] The lighting elements may be electrically connected to a controller that is situated in the camera module. For instance, the lighting elements may be connected to the micro-board (164) in FIG. 11. and controlled by the sensor processor of the camera, the sensor controller, before instructing the camera to capture a photographic image or video, switches on the lighting elements. [0200] The electrical circuit that interconnects the lighting elements may be electrically isolated from all other electrical components of the retrofit device, and have an autonomous power source. In FIG. 12, the lighting elements are electrically connected to a photovoltaic element, (175), by means of electrical connector (174). Light source (177) shines light onto (175), and the electrical energy generated by (175) in response to stimulation by light causes an activation of the lighting elements. (177) is controlled by the sensor processor of the camera, enabled for the duration of image capture. Multiple light sources (177) and multiple photovoltaic elements (175) may exist.

[0201] This manner of remote energy transmission, by means of a light source that activates a photovoltaic element, provides a solution to an important challenge in designing a retrofit device that requires illumination, the insulation of electrical components. To avoid glare and reflection, lighting elements frequently need to be placed close to the object they illuminate. For instance, in case of a flow meter display, they need to be close to the transparent cover of the meter display. This requirement for their placement introduces complexity in the design of the retrofit device, or sources of potential errors during installation of the retrofit device and causes for a premature failure of it. The lighting elements are required to be placed close to the surface of the transparent cover of the meter display, and if they are electrically connected to other electrical components of the retrofit device, either a flexible electrical cable is needed or the electrical connection is provided by an element that is closely integrated into the casing of the camera module. A flexible electrical cable is a source of potential errors during installation of the device, it may be inadvertently damaged. A design that has a close integration of the electrical connection with the casing, and thus also requires a close integration of the lighting elements with the casing, may not be achievable in a modular way. Such design may result in a form factor for the casing of the camera module that is not adaptable to a range of flow meters, thus increasing the cost of retrofitting a pipe system that contains flow meters of a variety of types.

[0202] Another concern in the design of a retrofit device that contains an electrical element that is situated close to a component of the legacy device is electrical insulation. For instance, differences in temperature may cause a build-up of condensation moisture, which requires special provisions to be made in the design to achieve insulation, further adding to the cost of the retrofit device and sources of potential errors after installation.

[0203] The presented method of energy transmission to the lighting elements shown in FIG. 12 avoids aforementioned drawbacks of a design that requires an electrical connection between the lighting elements for the meter display and other electrical components of the device. During installation of a retrofit device, the attachment of the transparent element (171) near the surface of display element (170) may be achieved in several ways. For instance, it may be permanently affixed with a transparent glue. The dimensioning of (171) may be such that it does not cover the entire surface of (170), and typically it will fit into the interior of casing component (176).

[0204] FIG. 13 shows possible spatial arrangements of the lighting elements in relation to transparent element (171) of FIG. 12. In FIG. 13, (190) depicts a unit consisting of lighting elements, photovoltaic element (175), and (174), the electrical connection between (175) and the lighting elements. (190) may include a frame, (172) in FIG. 12, that may be used to achieve a spatial arrangement of lighting elements, such as a circle in (190). Unit (190) may be placed in relation to the transparent element, (171) in FIG. 12, in various ways. (190) may be entirely enclosed in the transparent element, shown by (191), and thus the transparent element providing electrical insulation for (190). (192) shows an arrangement where the transparent element is made up of two components and (190) is situated between them. (193) shows a solution where (190) is positioned at the bottom of the transparent element and (194) a solution where it is positioned on the top of it.

[0205] Another way to illuminate the meter display that minimizes reflection is by means of an optical waveguide. An optical waveguide consists of one or more bodies made of light refractive material. A light ray, after having entered such body made of light refractive material will be reflected internally, provided the angle formed between light rays and the surface of the body falls within a certain range. For instance, Fiberglass transmits light by means of its refractive properties and sometimes is used to transport light waves across a distance, for purposes of illumination. The efficiency of an optical waveguide for light transmission depends on the refractive properties of the material it is made of and its geometric shape.

[0206] FIG. 14 shows a schematic drawing that illustrates the illumination of the meter display, (200), using light transmission by means of a waveguide, (203). (201) depicts a transparent element, like (171) in FIG. 12, having the purpose to refract light rays and provide diffuse illumination of the meter display situated below it. (202) is a part of the casing of the camera module. The lower part of (202) is depicted in a semi-transparent way, to show the spatial arrangement of parts situated in its interior. (205) is a light source and (207) a camera. (205) shines light on waveguide (203), and light rays are reflected inside the waveguide, which has surface contact or is in close proximity with (201). The dotted lines, (204), depict light rays being reflected by the interior surface of the optical waveguide, (203), and their propagation being constrained by the geometry of (203). The light rays enter (201), where they are refracted further and illuminate the meter display, (200). The spatial alignment of (201) and (203) is such that a loss of light waves that are guided along (203) and then enter (201) is kept minimal. A design also may combine (201) and (203) into one solid element. [0207] FIG. 15 shows the cross section of a legacy flow meter 220 with attached casing of a retrofit device 222 that uses the method for illumination of the meter display shown in FIG. 12. (210) depicts the part of the flow meter 220 that that is connected to the pipe and (211) is the cross section of the meter display. (212) is the adapter for the attachment of the camera housing, similar to (135) in FIG. 7. (213) is the casing of the camera module, and (214) the casing of the main module. (215) is a transparent surface with light refractive properties, corresponding to element (171) in FIG. 12. A ring of lighting elements, (216), is situated between the refractive surface and the meter display, that are connected to a photovoltaic element, not shown in this cross section. (216) is the holder for the camera. (218) is a translucent display for the retrofit device (222), and (219) the lid.

[0208] A sensor device is capable of participating in a distributed infrastructure, that coordinates the actions of a set of sensor devices and also the further processing of converted signals generated by sensor devices. FIG. 2 shows an example of such distributed infrastructure, and is sometimes called herein the Sensor Device Management Domain. It consists of sensor devices Ml, (62), PI, . . . , P8, (50) depicts sensor device P7, and network devices El, . . . , E3, (51) depicts E2. A network device El, . . . , E3 may be for instance a network gateway, router or switch, or a network edge device. A sensor device also may perform functions of a gateway or edge device and forward network traffic. For instance, sensor device P2 is connected to PI and P3 and may forward traffic from and to them. A sensor device or edge device is connected to a network, possibly by multiple hops, that connects to a Sensor Domain Manager, (53). (52) depicts some network connections of edge devices and sensor devices to a network that connects to (53). The set of network connections between the set made up of devices PI, . . . , P8, edge devices El, . . . , E3 and sensor domain manager (53) may implement one or more protocols or architectures, for instance cellular LTE, ZigBee, USB, Bluetooth, BLE, Ethernet, Wireless 802.11 or RF signaling.

[0209] All or a subset of sensor devices in FIG. 2 may form a peer-to-peer domain. A peer-to-peer domain is an example of a distributed infrastructure that enables for a device that is part of it participating in coordinated actions together with other devices that belong to the peer-to-peer domain. For instance, for sensor devices in a pipe system, such action may be that a device, upon observing a threshold value in a signal generated by one of its sensors communicates with a set of other devices and then the devices perform a coordinated recording of measurement values.

[0210] The Sensor Domain Manager (53) is a software that has several functions. It provides for the administration of sensor devices, and implements services for the administration, processing and storage of data generated by the sensor devices. Its set of processes is active on a set of computers that may include for instance servers, virtual servers, tablets and handheld devices. The Sensor Domain Manager (53) consists of multiple subsystems, including at minimum a Sensor Device Manager, (54), and an Analytics Engine, (55).

[0211] The Sensor Domain Manager (53) performs all actions that require communication with the sensor devices belonging to the Sensor Device Management Domain. These actions include maintaining a database that records the sensor devices that belong to the Sensor Device

Management Domain, and their operational status, perform maintenance actions on then, such as firmware upgrades and collections of diagnostics data. Aforementioned actions may be performed by a component called the Domain Manager (56).

[0212] The Sensor Domain Manager (53) may also contain a Meter Manager (57), a component that provides for the management of measurement data that were generated by the sensor devices and forwarded to the Sensor Domain Manager (53). Such measurement data may include the cumulative and current rate of throughput and further data recorded on a device, for instance intra- pipe pressure, vibration signals, and ambient temperature. The Meter Manager (57) provides for the storage of these data in a database, and functions for their administration. The database that contains data maintained by the Meter Manager (57) may be administered by another subsystem, the Data Store (58). Data maintained by the Meter Manager may be stored in blockchain format, described in the Audit Blockchain application, to implement blockchain based auditing. If the Sensor Device Manager implements block chain based auditing, a separate subsystem, the

Blockchain Manager (59), may exist that implements functions for it, such as storing the data in blockchain format and administrative functions, such to support an audit of the data, as described in the Audit Blockchain application.

[0213] The Sensor Domain Manager (53) also contains the Task Manager (60), a subsystem that manages data collections performed for diagnostic purposes. Such data collection for instance may entail a set of sensor devices recording signals and converting them to measurement values, such as the current rate of throughput from signals generated by magnetic sensors. The Task Manager (60) provides for the administration of such tasks, their scheduling, recording of status, and required communication with sensor devices. The measurement data generated by these data collections are stored in a database that may be maintained by the Data Store (58).

[0214] The Analytics Engine (55) implements all methods for the analysis of data generated by sensor devices. An analysis of data may be performed for diagnostic purposes, including the detection of pipe leaks, pipe blockage, and defects in flow meters. The Analytics Engine may employ several techniques to analyze data, including deterministic computational methods, statistical methods, neuronal networks, and self-learning algorithms. The Analytics Engine instructs the Task Manager to schedule data collections. [0215] The Sensor Domain Manager (53) has an Interface (61), to provide a mean for communication and data exchange with its components. For instance, Interface (61) may provide access to the data stored in the Data Store (58), or provide a mean to update the Analytics Engine (55), such as with a new statistical model used in algorithms for data analysis.

[0216] A workload is a set of one or more jobs to be performed on a sensor device. A job is a request to a controller of the sensor device. Examples of jobs are requests for the recording of signals, sending cached data, or maintenance tasks, such as generating and sending diagnostics data or performing firmware upgrades. For instance, in FIG. 2, assuming that sensor set (25) contains magnetic sensors, a job may be to instruct controller (22) to initiate the recording of signals generated by magnetic sensors in (25), and further process them to obtain converted signals, to be stored by (22). Other example of a job is to request (22) to initiate sending of all stored set of converted signals to the Sensor Domain Manager (53) in FIG. 2, or sending an instruction to component (35), the operating system, to perform a collection of log data. A job that requests for the recording of signals generated by one or more sensors and further processing of them to obtain converted signals may contain a start time and duration for the recording, and in addition a frequency and duration for recording intervals may be given, if the recording of signals is to be performed periodically for the duration of the job. For instance, a workload may entail two jobs, one to record signals by magnetic sensors every 60 seconds, for a duration of ten seconds, and another to record the intra-pipe pressure every five seconds, for a time interval of ten minutes. Jobs that belong to a workload may be performed in any time wise relation to each other, such as concurrently or serially, or a specific start time may be specified for a job. A job may be performed conditionally, for instance depending on the results or exit code of a previous job.

[0217] The sensor device may implement a model to assign a cost to a given workload that is to be performed. The cost of a workload is a numeric value that models the usage of certain hardware resources that the workload requires. Hardware resources considered in the model for cost are those that age with usage, or can be depleted. For instance, a request to perform a recording of signals by a sensor and generating a converted signal requires electrical energy. The model for the cost of a workload may include the predicted charge level of batteries at dates after workload completion. For instance, performing aforementioned workload for a given length of time requires a predictable amount of electrical energy, and the cost of it takes into account how long it will take to restore batteries to a given charge level. Thus, according to this model, the cost of a workload increases with energy usage, and also with the predicted time it takes to restore the charge state of a battery, making for instance a workload that is completed during hours with little or no sunlight more expensive than a workload that is completed at a time when ample daylight exists to provide for the recharging of batteries. A model for the cost of a given workload may also take into account a degradation of lifetime of electronic or other components of the sensor device. For instance, a workload may include a job to generate a converted signal from data recorded by a sensor, and store the converted signal. If storage is performed on a medium that has a maximum number of erase cycles, such as an SSD storage device, the cost of the workload may include the wear incurred on the SSD device by the storage operation. Similarly, for most types of rechargeable batteries, the process of charging and recharging incurs a loss of capacity. Aside the time required to restore a charge level of a battery, a model for the cost of a workload also may consider the battery wear incurred by a recharge of the battery. Battery wear depends on the batter type, and for some types also on the charge level. For instance, a NiCd battery can be subjected to a higher number of recharge cycles before losing capacity than a Li-ion battery, deep discharge cycles accelerate the loss of capacity for Li-ion batteries. A model that considers battery wear in the cost of a workload may differentiate between battery types and for battery types for which a deep discharge should be prevented also the charge level when a workload is started.

[0218] A workload group is a set of workloads, whereby each workload is assigned to be performed by a sensor device. The entirety of sensor devices that have a set of workloads of a workload group assigned is called the domain of a workload group. The workloads of a workload group typically are correlated. For instance, a workload group may instruct a set of sensor devices to record the current rate of throughput during a specified time interval, and the workload group is a sets of identical workloads, each assigned to one device of the domain of the workload group.

[0219] Workloads of a workload group may be performed conditionally. For instance, a workload group may describe the request to record the current rate of flow for a time interval on a subset of sensor devices of its domain, e.g. if 80% of sensor devices of the domain can perform their assigned workload with a cost that is below a maximum threshold, which may be specific to a sensor device. If this condition is met, the workload group is performed, and either all sensor devices may participate in it or a sensor device of the domain participates in it only if it can perform its assigned workload with a cost that is below the specified threshold. Another example is a set of senor devices, one situated at an ingress point and others at egress points, starting to record the current rate of flow for a time interval, if the intra-pipe pressure at the egress point exceeds a threshold.

[0220] The actions performed during a workload belonging to a workload group and the duration of each workload may be determined by means of a voting algorithm. For example, the goal of a workload group may be to perform monitoring of the current rate of flow as long as possible, performed concurrently by a set of sensor devices, depending on the energy reserves of them. The sensor devices that belong to the domain of the workload group may vote to determine the duration for which to run a given workload, based on the available energy reserves of sensor devices. The voting algorithm is performed by a set of devices that includes the sensor devices belonging to the domain of the workload group and possibly the Sensor Device Manager. The voting algorithm entails one or more steps of message exchanges between the devices that participate in it. Steps of the voting algorithm may be for instance multicasts, one device sending a message to a subset of devices of the domain, informing about its state, or a device sending a message to one other device.

[0221] The sensor devices also may perform voting algorithms during the execution of workloads of a workload group, to determine for each sensor device the actions performed during the workload assigned to it. For instance, the sensor devices of the domain may communicate to exchange information about their state to determine which action a device of the domain will perform next. For instance, the devices of the domain may perform a workload for a specified duration of time, and then based on the obtained results, such as measurements calculated from signals recorded by sensors, perform a voting algorithm to decide for each sensor device of the domain, whether it should continue performing its assigned workload, or do so with changed parameters. For instance, the devices of a domain each may have two vibration sensors, VI and V2, the workload assigned to each may entail recording signals generated by one of its vibration sensors, VI or V2, and then possibly continue to do so for the other sensor. The sensor devices collectively may sample for the occurrence of vibration signals in a given frequency range, detected by sensor VI, and if none are detected switch to recording signals generated by sensor V2. After each device has performed the recording of signals generated by VI for a time period, a voting protocol is run, during which the devices inform each other about the vibration signals generated by each of its sensors VI, and depending on the result decide that a subset of sensors devices of the domain or all devices should switch to recording the signals generated by using V2.

[0222] The Sensor Domain Manager (53) may maintain a database, the pipe configuration database, that contains information about the pipe infrastructure, such as about the topology and geometry of the pipe system, its geographic location, and the location of flow meters, valves, and sensor devices. The pipe configuration database may be stored in the Data Store (58). The pipe configuration database may be supplied during initialization and configuration of the Sensor Domain Manager (53). For instance, the Sensor Domain Manager may read a database or a file that contains the information to build the pipe configuration database. Information that is to be added to the pipe configuration database may also be obtained during a discovery process. For instance, a sensor device may transmit information advertising its geographic location, device type, or serial number. The sensor device may for instance broadcast this information, and the Sensor Domain Manager (53) upon receipt adds it to the pipe configuration database.

[0223] The Analytics Engine (55) in FIG. 2, runs threads or processes to obtain information about the state of the pipe infrastructure. For this, the Analytics Engine determines workloads or workload groups to be run by sensor devices, to obtain measurements, for instance of the current rate of flow, intra-pipe pressure and occurrence of vibration signals at a sequence of dates and probe points.

[0224] The Analytics Engine (55) processes the information generated by the sensor devices to obtains data that describe the behavior of the pipe infrastructure and observed measurements, thus creating a history record of measurements. The history record typically is stored in a database, for instance in Data Store (58) in FIG. 2. The history record may include typical rates of throughput, measured at various probe points, associated with a time of day, observed vibration signals associated with flow volumes in a pipe segment, vibration signals occurring at a time of day or in a pipe segment, or recordings of the occurrence of backpressure. Further, the history record may include information about the state of sensor devices, such as information about the capacity of its battery, which deteriorates as the battery ages. The history record may include information that is indicative of a potential failure or defect of a legacy flow meter, supplied with a retrofit device, or the likelihood of such failure occurring in future. For instance, the history record may contain information concerning how often a legacy flow meter has been subjected to back pressure, since backpressure typically increase the risk of a premature failure of a flow meter. If a sensor device is a retrofit device for a legacy flow meter having a gear box, the history record also may include a sampling of vibration signals observed at the gearbox of the legacy device, since defects in a gear box typically can be detected by characteristic vibration signals.

[0225] Based on information in the pipe configuration database, the Analytics Engine (55) of FIG. 2 generates workloads or workload groups to be run on the sensor devices. Such workloads or workload groups may be formulated according to a syntax or metalanguage suited to describe them. The Analytics Engine (55) forwards the workload groups to the Task Manager (60), which manages their execution. The Task Manager forwards to each sensor device belonging to the domain of a given workload group its assigned workload. The Task Manager then monitors the execution of the workload group. For instance, the Task Manager may query a sensor device that belongs to the domain of a workload group for status, and it may participate in voting protocols that are performed in the course of executing the workload in the workload group. In the course of executing a workload and after its completion, the sensor devices may send information to the Sensor Domain Manager (53), such as the return status of commands, and data generated during workload execution, such as measurements. These data are stored in a database, that may be managed by Data Store (58), and the Task Manager (60) may coordinate the forwarding to data from the sensor devices and storing them in a database. The Task Manager (60) informs the Analytics Engine (55) about the completion of a workload or workload group, the return status of commands, and data collections performed for a job of a workload. If a workload group could not be performed and has been rejected, the Task Manager (60) will inform the Analytics Engine (55) about the reason for rejection. For instance, a reason for rejection may be that a workload of the workload group could not be performed within specified limits for cost, set for one or more devices. The Analytics Engine (55) in response may formulate a new set of workloads that can be performed within the set cost limit.

[0226] The Analytics Engine (55) may generate sets of workload group towards several goals. For instance, to increase a data set used for statistical analysis, the Analytics Engine, during daytime, when the cost of a workload is low, since the batteries of a sensor device will recharge quickly during daylight, may generate workload groups for routine collections of signals by sensors, such as vibration sensors of sensor devices.

[0227] The Analytics Engine (55) may generate workload groups to generate a database that contains measurements by sensors that are typically observed.

[0228] The Analytics Engine (55) may generate workload groups to monitor the behavior of the pipe system with the goal to detect abnormalities, such as pipe leaks, or defect flow meters or sensor devices. The Analysis Engine (55) may run such workload groups routinely, taking into account the cost of a workload group. The Analytics Engine (55) may employ various algorithms for diagnostics in the pipe system. It may run for instance deterministic algorithms, statistical algorithms, or self-learning algorithms for the detection of pipe leaks.

[0229] A deterministic algorithm to detect a pipe leak in a given pipe segment for instance may measure the throughput at all ingress points and at all egress points during a time interval, determine the sum of cumulative throughput for that time interval for all ingress points, and the cumulative throughput for that time interval for all egress points, and comparing the two sums. If, up to a tolerance margin, the sum of cumulative throughputs of all ingress point is larger than the respective sum for egress points, it is concluded that a pipe leak exists at a location in that pipe segment.

[0230] A statistical algorithm analyzes data sets recorded during a known state of the pipe system and attempts to establish a correlation between that state and signals observed by sensors of sensor devices during that state. For instance, by means of deterministic methods, a pipe leak has been established to exist in a pipe segment, and the volume of water loss per time unit may be known. Recordings of signals of vibration sensors belonging to sensor devices in that pipe segment have been performed while the leak is present, and as well recordings of signals of these sensors while no pipe leak exists. By means of statistical analysis, data that are characteristic for the presence of a pipe leak are determined. Such data for instance are the presence of signals generated by vibration sensors that correspond to vibrations in a certain spectrum of frequencies and amplitude. The latter also may be dependent on intra-pipe pressure, and the statistical model may include recordings of intra-pipe pressure. Then, from the presence or absence of such data patterns that have been deemed characteristic for whether or not a pipe leak exists, it is concluded if the signals recorded by sensors of a set of sensor devices during a time window are indicative of the presence or absence of a pipe leak.

[0231] A statistical algorithm in its model to establish the state of a given pipe segment also may use data sets that have been generated on other pipe segments, called control pipe segments, that are deemed to be sufficiently similar to former pipe segment. I.e., the signals generated by vibration sensors on the control pipe segments are assumed to have similar characteristics like the ones of the pipe segment that is to be analyzed. For instance, the frequencies calculated from signals of vibration sensors are in ranges that are deemed to be similar with regards to frequency or amplitude. Several factors may be taken into account in determining the characteristics of a pipe segment suited to serve as control pipe segment for another pipe segment, including the material and diameter of the pipe, pipe geometry and length, the consistency of ambient soil, if the pipe is installed below ground level, and vibration signals generated by the ambient environment, for instance streets or buildings that are situated in proximity.

[0232] The Sensor Domain Manager (53) may import data sets recorded by sensor devices installed on another pipe infrastructure into a database, for instance managed by Data Store (58), and use these data for statistical analysis.

[0233] The Analytics Engine (55) may employ a self-learning algorithm to continually improve a model that predicts states of a pipe system based on signals observed by sensors belonging to sensor devices. Self-learning entails that a model is continually adjusted as new data are collected. For instance, a statistical model for the characteristics of vibration signals that are indicative of a pipe leak may be improved by incorporating new data, that extend the set of sample measurements collected so far. A self-learning algorithm also may employ techniques used in neuronal networks or pattern recognition to perform an analysis of the pipe system for leak detection.

[0234] The Analytics Engine (55) may continually schedule workload groups to collect data, to expand the set of sample data of sensor signals recorded in the pipe system, thus improving the quality of data obtained by statistical analysis or self-learning algorithms. In the scheduling of workload groups, the Analytics Engine (55) may employ a model for costs of a workload that, aside the use of hardware resources on the sensor device, also takes into account the priority of a data collection to improve a statistical model and the cost of performing that calculation on a sensor device.

[0235] The Analytics Engine (55) may also receive requests to perform workloads, such as the analysis of a pipe segment to determine if water leaks exist, or defects of sensor devices, or defects of legacy flow meters that are equipped with a retrofit device. The Analytics Engine (55), for instance by means of a set of commands or invoked functions, that are part of an Application Programming Interface (API), may obtain instructions how to generate data that are to be used by an algorithm for analysis, or the Analytics Engine (55) may determine a workload group that is suited to generate data to analyze a specified condition. For instance, the Analytics Engine (55) may be instructed to obtain recordings of the current rate of flow and from signals generated by vibration sensors for a specified set of sensor devices, time interval and sampling frequency. Such detailed instructions, for instance, may be given when the operator of the pipe system plans to control the intra-pipe pressure during the duration of a data collection. Alternatively, the Analytics Engine (55) may just obtain the instruction to perform analysis for pipe leaks for a segment of the pipe system, then construct workload groups and elect a schedule when to run the workload groups. For instance, the Analytics Engine (55) may determine a workload groups to be run and then consult a database of signals or measurements previously recorded by sensor devices and a database containing a history of state information for sensor devices, to determine a time interval during which the sensor devices most likely can perform that workload group, not exceeding a set cost.

[0236] Data generated from signals that are recorded by sensor devices may be used for many purposes. Aside using the recorded data for the detection of water leaks and pipe defects, by the Analytics Engine (55), the recorded data typically contain information about the cumulative throughput of sensor devices, used for auditing purposes and for billing customers of a pipe infrastructure. In addition, workload groups may be scheduled on sensor devices of a pipe system on behalf of other parties. For instance, a sensor device typically will contain sensors to measure vibration signals and the ambient temperature. A pipe system that is a municipal water supply infrastructure, if equipped with sensor devices yields a multitude of measuring points for vibration signals and temperature in a geographic region extending over a part or an entire city. These data may be of interest for other parties, aside the operator of the water supply infrastructure. For instance, they may be of interest for a weather forecast service, construction company or insurance provider. The Sensor Domain Manager (53) may perform the execution of scheduled workload groups for data collections on demand by a third party. For instance, a third party may request to obtain temperature readings performed by all sensor devices at specified time intervals. Another example is a construction company that performs work in proximity to the pipe infrastructure to record signals generated by the vibration sensors of a select set of sensor devices. The Sensor Domain Manager (53) will instruct its Task Manager (60) component, to schedule workload groups to perform such data collection.

[0237] To prioritize the scheduling of workload groups, the Task Manager (60) in its model to schedule workloads does not only consider the cost associated with a workload group, but also the priority of a data collection. For instance, the operator of the pipe infrastructure may be required to determine the location of a water leak and issue a request for analysis of a pipe segment for water leaks during a given time window, assigning it a high priority. The Analytics Engine creates one or more workload groups, each to be performed by a set of sensor devices, and assigns a high maximum cost to each, reflecting the high priority of the data collection. A sensor device belonging to the domain of a workload group may have low energy reserves, but according to the high maximum cost associated with the workload it is requested to perform, will accept the workload, even at the risk of exhausting its battery power, if the maximum cost is sufficiently high, and it will not be able to perform further tasks before the charge levels of its batteries have recovered. Thus, assigning a priority to a data collection is another mean to determine a maximum cost associated with a workload that is assigned to a sensor device.

[0238] The Sensor Device Management Domain also may include portable devices that are used for data collections. In FIG. 2. Ml, (62), may be a portable device. A portable device can be dynamically added to a Sensor Device Management Domain Like a sensor device, a portable device is capable of communicating with the Sensor Domain Manager (55), may be a device that belongs to the domain of a workload group, and may participate in peer-to-peer protocols. A portable device may be equipped with a GPS and capable of transmitting its location to the Sensor Domain Manager (53). One a portable device has registered with the Sensor Domain Manager, the Analytics Engine (55) or Task Manager (60) may include it into the domain of a workload group. A portable device may be equipped with various sensors, including vibration sensors, magnetic sensors, and sensors to measure temperature or humidity.

[0239] A portable device may as well be equipped with components to create sound waves, and may have multiple such components, each capable of creating sound waves in a certain frequency range. Generating sound waves may be a job in a workload that a portable device performs when being part of the domain of a workload group, and participating in the execution of workloads. For instance, while executing a workload group, a portable device may be situated in proximity or close contact with a pipe and generate sound waves, while other devices record vibration signals.

[0240] A Sensor Device Management Domain may implement multi -tenancy. The Audit

Blockchain application describes an implementation for multi-tenancy in a domain of IoT devices. The devices that are part of the Sensor Device Management Domain in FIG. 2, devices PI, . . . , P8, Ml and the Sensor Domain Manager (53) may support access by multiple users and a use of the services provided by components (54), . . . , (61), ensuring access privileges for users.

[0241] While preferred embodiments of the present invention have been shown and described herein, it will be obvious to those skilled in the art that such embodiments are provided by way of example only. Numerous variations, changes, and substitutions will now occur to those skilled in the art without departing from the invention. It should be understood that various alternatives to the embodiments of the invention described herein may be employed in practicing the invention. It is intended that the following claims define the scope of the invention and that methods and structures within the scope of these claims and their equivalents be covered thereby.