Submitted:
01 October 2025
Posted:
02 October 2025
You are already at the latest version
Abstract
Keywords:
1. Introduction
- The measuring system, together with pressure and temperature transmitters to convert the gas volume to reference conditions. All measured variables are communicated to the Central Processing Unit (CPU) via a digital signal.
- A Central Processing Unit (CPU), that processes, records, and prepares the data for transmission to the Central Data Acquisition System via a dedicated communication protocol.
- A communication device, required to transmit the measured parameters to the Central Data Acquisition System.
- Remote-controlled valve, required to remotely shut off the gas supply in the event of anomalous data (possible leaks) in residential applications.
- Power supply, since electronic components are used. For safety reasons, battery power should be used.
- the absence of moving parts that makes this kind of device not subject to wear and tear, allowing it to operate in a wide variety of environmental conditions with minimal maintenance;
- the compact size, making them suitable for installation in confined spaces;
- a direct electrical output that does not require special devices for remote readings, significantly reducing data collection times;
- good accuracy;
- capability of detecting reverse flow;
- independence from the physical properties of the fluid (provided it is homogeneous),
2. Materials and Methods
2.1. Flow Measurement Validation
2.2. LoRa-NB IoT Structure
2.3. Data Security and Transparency
2.3.1. The Proposed Infrastructure
- Authority nodes, responsible for system validation and supervision;
- Aggregating nodes, for acquisition, processing and transmission of data originating from edge nodes;
- Edge/gas meter nodes, corresponding to the in situ devices, operating local measurements.
- Only consumer: the domestic gas meters in basic configuration;
- Only producer: for meters installed at production sites;
- Prosumer: domestic sites having hybrid characteristics (local production and use of energy).
2.3.2. Simulation of the Infrastructure
- 64 GB di RAM
- 2 CPU and 12 core, with nested virtualization enabled
- many Ethernet interfaces for configuration and simulation flexibility purposes
2.3.3. Data Management
-
Metering package (gas meter):
- a.
- Data concerning the measuring sensor
- b.
- ID Sensor (microcontroller)
- c.
- ID measurement device (and reference to the calibration)
- d.
- Serial number of metering device
- e.
- Calibration data
-
Data of the Meter:
- a.
- ID Meter (serial number)
- b.
- Pool/Set data for meter configuration
- c.
- Timestamp
-
Data of the Firmware Measurement block:
- a.
- Pool/Set of progressive pre-charged serial numbers
- b.
- Sensor Status
- c.
- Measurement value
- d.
- Algorithm parameters concerning acknowledgement serial reception
-
Energy data:
- a.
- ID production Plant
- b.
- production certificate
- c.
- site of production
- d.
- Energy source type (Solar, hydroelectric…)
- e.
- Energy measurement data
- f.
- Measurement unit (kWh, m3, …)
- Preamble: a fixed value representing the beginning of the string, without an associate value
- Corp: the data to be sent in this string
- CRC: standard control for data integrity check
- Termination characters: characters indicating the end of the segment
| Segment | Data Type | Identifier | Bytes |
|---|---|---|---|
| 1 - Data concerning the measuring sensor | Preamble | AA01 | 4 |
| 1 - Data concerning the measuring sensor | ID Sensor | IDM01 | 10 |
| … | … | … | … |
| 1 - Data concerning the measuring sensor | CRC | CRC | 4 |
| 1 - Data concerning the measuring sensor | Escape Sequence | \n \r | 2 |
| 2 – Data of the Meter | Preamble | AA02 | 4 |
| 2 – Data of the Meter | ID Meter | IDM02 | 10 |
| … | … | … | … |
| 2 – Data of the Meter | Escape Sequence | \n \r | 2 |
| 3 – Data of the Firmware Measurement block | Preamble | AA03 | 4 |
| … | … | … | … |
| 3 – Data of the Firmware Measurement block | Escape Sequence | \n \r | 2 |
| 4 – Energy Data | Preamble | AA04 | 4 |
| … | … | … | … |
| 4 – Energy Data | Escape Sequence | \n \r | 2 |
| //END | //END | //END | //END |
2.3.4. Blockchain System Authentication
- the company, which is a sensor producer, ask to be qualified, based on an audit of the Certification Authority;
- after qualification, the company obtains a set of cryptographic keys and proprietary algorithms (for each sensor and/or measurement system) to generate and a pool of serial codes to be pre-charged into the firmware;
- the algorithm of generation will block the serial codes during the installation phase into the firmware; they will be needed for authentication of each measurement datum to be transmitted: in fact, their function is to univocally individuate the authorized single device; furthermore, these codes will be used to preserve the sequence of transactions; this way each transaction could be recovered also in case of transmission problems;
- Network validation during each communication; in fact, the message payload includes also one pre-charged code, to be validated by challenge–response techniques and cryptographic ones based on public/private keys; only after this step the blockchain will consider this communication, being authenticated.
2.2.5. Communication Protocol
-
Communication between nodes:
- a.
- Authority ↔ Data logger: MQTT with dedicated topic for sending batch and reception block confirmation
- b.
- Data logger ↔ Data logger: MQTT publish-subscribe for synchronization of the local status
- c.
- Authority ↔ Authority: MQTT with private topic for consensus communications
-
Communication Gas meter - Server:
- a.
- Protocol: MQTT over TLS to improve the energy efficiency at the edge devices
- b.
- Topic Structure: Different Topic between transactions and heartbeat
- c.
- Local buffer: Transaction queue in case of temporary disconnection with automatic retry
-
Communication Distributor - Server:
- a.
- Protocol: MQTT for architectural compliance
- b.
- Batch Processing: Topic for sending aggregate
- c.
- Real-time Alerts: MQTT retain messages for immediate notification of critical events
3. Results
3.1. Metering Validation
- as for the fluidynamic aspects, validation of the pressure behavior throughout the gas loop, upstream and downstream the meter;
- as for the gas metering, validation of the flowrate, cumulative volume, and environmental quantities measurement (temperature, pressure).
- Conditions (a): atmospheric pressure: 884 mbar; temperature: 27.0°C
- Conditions (b): atmospheric pressure: 889 mbar; temperature: 25.5°C.
3.2. Communication and Blockchain Architecture
3.2.1. The Energy Market
- Cash flow and liquidity pool: all the available energy tokens are recorded in the ledger
- Deposit: All the producers deposit energy tokens
- Withdrawals: All the consumers withdraw tokens according to the energy use
- Arbitration: The distributor acquires tokens from a prosumer selling it to a final consumer
- Immediate settlement: all transactions are irreversible and immediately recorded
3.2.2. The Mechanism of Distributed Validation
- Authority minimum number: 3 nodes (to avoid single failure points)
- Consensus threshold: ⅔ +0.01 (almost the 67% of the Authorities approve)
- Blockage time: 30 s, (trade-off between reaction time and stability)
-
Anti-Double Spending:
- a.
- Univocal cryptographic UUID for each token
- b.
- A distributed database tracks the status of each token (created/consumed/transferred)
- c.
- Atomic lock during concurrent transactions
-
Validation of Production
- a.
- Digital certification of the production plant
- b.
- Compliance with the allowed ranges
- c.
- Optional integration of other monitoring systems
3.2.3. Transactions and token flow
- Token creation
- Token consumption (Final consumer/Prosumer)
- Token transfer (between actors)
3.2.4. Token Life Cycle
3.2.5. Management of the Distributed Ledger
- created: Token generated and available for use;
- transferred: Token transferred between actors (it is available)
- consumed: Token used to assess consumption (final status)
4. Conclusions
Author Contributions
Funding
Conflicts of Interest
Appendix A


References
- Montuori, L.; Alcázar-Ortega, M.; Vargas-Salgado, C.; Mansó-Borràs, I. Enabling the Natural Gas System as Smart Infrastructure: Metering Technologies for Customer Applications. In Proceedings of the 2020 Global Congress on Electrical Engineering (GC-ElecEng); 2020; pp. 96–100.
- D’Emilia, G.; Gaspari, A.; Natale, E.; Adduce, G.; Vecchiarelli, S. All-Around Approach for Reliability of Measurement Data in the Industry 4.0. IEEE Instrum Meas Mag 2021, 24, 30–37. [CrossRef]
- Cascetta, F.; Rotondo, G.; Piccato, A.; Spazzini, P.G. Calibration Procedures and Uncertainty Analysis for a Thermal Mass Gas Flowmeter of a New Generation. Measurement 2016, 89, 280–287. [CrossRef]
- Celenza, L.; Dell’Isola, M.; Ficco, G.; Vigo, P.; Bertoli, E.; Incerti, L.; Zocchi, T. Critical Aspects of New Domestic Static Gas Meter. In Proceedings of the 2015 XVIII AISEM Annual Conference; 2015; pp. 1–4.
- Ficco, G.; Dell’Isola, M.; Graditi, G.; Monteleone, G.; Gislon, P.; Kulaga, P.; Jaworski, J. Reliability of Domestic Gas Flow Sensors with Hydrogen Admixtures. Sensors 2024, 24. [CrossRef]
- Zhou, J.; Wang, P.; Wang, R.; Niu, Z.; Zhang, K. Signal Processing Method of Ultrasonic Gas Flowmeter Based on Transit-Time Mathematical Characteristics. Measurement 2025, 239, 115485. [CrossRef]
- Yang, Z.; Gan, Q.; He, M.; Huang, Y.; Zhang, L. Research on the Influence of Sensor Installation Arrangement on Online Measurement of External Clamp-on Ultrasonic Flowmeter. In Proceedings of the 2024 IEEE 6th Advanced Information Management, Communicates, Electronic and Automation Control Conference (IMCEC); 2024; Vol. 6, pp. 1547–1551.
- Bekraoui, A.; Hadjadj, A. Thermal Flow Sensor Used for Thermal Mass Flowmeter. Microelectronics J 2020, 103, 104871. [CrossRef]
- Jaworski, J.; Dudek, A. Study of the Effects of Changes in Gas Composition as Well as Ambient and Gas Temperature on Errors of Indications of Thermal Gas Meters. Energies (Basel) 2020, 13. [CrossRef]
- Ficco, G.; Frattolillo, A.; Malengo, A.; Puglisi, G.; Saba, F.; Zuena, F. Field Verification of Thermal Energy Meters through Ultrasonic Clamp-on Master Meters. Measurement 2020, 151, 107152. [CrossRef]
- Esposito, P., Spinozzi, P., Natale, E., D’Emilia, G., Ferri, G., & Stornelli, V. (2024). A LoRa-based Smart Gas Meter for Civil and Industrial Applications, In SIE 2024, LV Annual Meeting of the Italian Society of Electronics, 26-28 June, 2024, Genoa, Italy.
- Divya, G.; Supraja, P. Bids and Asks: Blockchain-Based Peer-to-Peer Trading Platform. Computers and Electrical Engineering 2024, 119, 109516. [CrossRef]
- Groza, J.M.; Sadat, S.A.; Hayibo, K.S.; Pearce, J.M. Using a Ledger to Facilitate Autonomous Peer-to-Peer Virtual Net Metering of Solar Photovoltaic Distributed Generation. Solar Energy Advances 2024, 4, 100064. [CrossRef]
- Mitrea, D.; Toderean, L.; Cioara, T.; Anghel, I.; Antal, M. Smart Contracts and Homomorphic Encryption for Private P2P Energy Trading and Demand Response on Blockchain. Heliyon 2023, 9, e22357. [CrossRef]
- Eickhoff, M.; Exner, A.; Busboom, A. Energy Consumption Tokens for Blockchain-Based End-to-End Trading of Green Energy Certificates. In Proceedings of the 2023 IEEE PES GTD International Conference and Exposition (GTD); 2023; pp. 1–5.
- Merrad, Y.; Habaebi, M.H.; Islam, Md.R.; Gunawan, T.S.; Elsheikh, E.A.A.; Suliman, F.M.; Mesri, M. Machine Learning-Blockchain Based Autonomic Peer-to-Peer Energy Trading System. Applied Sciences 2022, 12. [CrossRef]
- Ultrasonic Domestic Gas Meters. CEN EN 14236:2018 2018.
- 2014/32/EU - Directive 2014/32/EU of the European Parliament and of the Council of 26 February 2014 on the Harmonisation of the Laws of the Member States Relating to the Making Available on the Market of Measuring Instruments 2016.









| Step N# | Action | Description |
|---|---|---|
| STEP 1 | Token generation | All authorized actors (distributor, prosumer domestic user) assess energy production and require the token creation |
| STEP 2 | Validation and registration | A consensus is issued as the validation by the network, registering the relevant tokens in the ledger |
| STEP 3 | Trading/allocation | Tokens are exchanged between actors or allocated as a direct consumption |
| STEP 4 | Consumption and extinction | The final users “fire” token after their use |
| N# | Role | Action |
|---|---|---|
| 1 | Distributor (photovoltaic plant) | Deposits 10,000 tokens |
| 2 | Industrial User | Buys 3,000 tokens from the Distributor |
| 3 | Domestic customer | Buy 5,000 tokens from Distributor |
| 4 | Distributor | Keeps 2,000 tokens in the ledger |
| N# | Role | Action |
|---|---|---|
| 1 | Domestic producer “DP” (with some solar panels) |
Deposits 100 tokens |
| 2 | Distributor | Buys 100 from “DP” |
| 3 | A group of consumers | Buys 80 tokens from Distributor as a unique consumer |
| 4 | Distributor | Keeps 20 tokens in the ledger |
| N# | Role | Action |
|---|---|---|
| 1 | Edge Node | Sends transaction to an Aggregator |
| 2 | Aggregator | Pre-validates and aggregates in batch |
| 3 | Aggregator | Sends batch to 3+ nodes Authority |
| 4 | Authority 1/5 | Validates independently the batch given its outcome |
| 5 | Authority 2/5 | Validates independently the batch given its outcome |
| 6 | Authority 4/5 | Validates independently the batch given its outcome |
| 7 | Authority | If 67%+ Authority outcome is positive, creates and shares the batch |
| 8 | All nodes | Update their local site |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
