Full text
Citation: García Oya, J.R.; Sainz Rojas, A.; Narbona Miguel, D.; González Carvajal, R.; Muñoz Chavero, F. Low-Power Transit Time-Based Gas Flow Sensor with Accuracy Optimization. Sensors 2022, 22, 9912. https://doi.org/ 10.3390/s22249912 Academic Editor: Manuel Aleixandre Received: 4 November 2022 Accepted: 12 December 2022 Published: 16 December 2022 Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. Copyright: © 2022 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 (https:// creativecommons.org/licenses/by/ 4.0/). sensors Article Low-Power Transit Time-Based Gas Flow Sensor with Accuracy Optimization JoséR. García Oya * , Alejandro Sainz Rojas , Daniel Narbona Miguel, Ramón González Carvajal and Fernando Muñoz Chavero Electronic Engineering Department, University of Seville, E-41092 Seville, Spain *Correspondence: jgar[email protected] Abstract: In this paper, a fully designed ultrasonic transit time-based gas flow sensor is presented. The proposed sensor has been optimized in terms of accuracy, sensitivity, and power consumption at different design stages: mechanical design of the sensor pipe, piezoelectric transducer configuration and validation over temperature, time of flight detection algorithm, and electronics design. From the optimization and integration of each design part, the final designed gas flow sensor is based on the employment of 200 kHz-piezoelectric transducers mounted in a V-configuration and on the implementation of a cross-correlation algorithm based on the Hilbert Transform for time-of-flight detection purposes. The proposed sensor has been experimentally validated at different flow rates and temperatures, and it fully complies with the accuracy specifications required by the European standard EN14236, placing the proposed design into the state of the art of ultrasonic gas flow sensors regarding cost, accuracy, and power consumption, the latter of which is crucial for implementing smart gas meters that are able to autonomously operate as IoT devices by extending their battery life. Keywords: cross-correlation; IoT sensors networks; piezoelectric transducers; transit time measurement; ultrasonic gas flow sensors 1. Introduction Typically, mechanical sensors have been the usual choice for implementing gas meters. However, due to the current low cost, high-energy efficiency, and interoperability requirements in facilities, more suitable technologies to be integrated into smart meters have been explored, such as those based on ultrasonic transmission, which has been widely studied in recent years [1–3]. Ultrasonic gas flow sensors allow for longer maintenance periods, because they are less affected by wear, and they can maintain higher accuracy throughout their useful life. Moreover, the flow meter does not have direct contact with the gas, thus preventing corrosion or deterioration of the sensor. Additionally, they are non-invasive sensors (avoiding a pressure drop due to their own installation or obstruction in the flow), the composition of the gas inside of the meter could be unknown (because the measurement is independent of the theoretical speed of sound), and additional information of gas properties (such as sound velocity profile) can be used for density and calorific value determination. Moreover, the use of a filter is not required to protect the sensor (leading to a lower cost in the installation), and they have capabilities of self-diagnosis to validate their correct operation [4]. In addition, ultrasonic sensors are implemented with almost purely electronic elements, so this technology can exploit the benefits from the advances in ultra-low consumption that are available today, with the aim of extending the battery life in the same order of time (more than 10 years), and then the accuracy specifications of the ultrasonic sensor can be maintained. Likewise, ultrasonic sensors based on electronic designs facilitate the management of different operation modes in order to optimize their energy consumption and operating times. Therefore, smart meters based on this technology will allow connectivity Sensors 2022,22, 9912. https://doi.org/10.3390/s22249912 https://www.mdpi.com/journal/sensors
Sensors 2022,22, 9912 2 of 23 from remote stations to the central server, facilitating correct billing and the implementation of a sensor network under the Internet of Things (IoT) paradigm for domestic and remote sensing applications [ 5 – 11 ]. This will not only help to reduce the time spent collecting data, but it will also improve resource allocation, eliminating erroneous readings and the need for manual monitoring, generating added value for utility companies and facilitating a broader spectrum of data to better serve customers. This automatic data collection includes those data related to consumption and also those related to the self-diagnosis of the sensor, which are transferred to the central system for billing, troubleshooting, and analysis. Of course, ultrasonic gas flow sensors have some limitations, which can affect the accuracy measurement, such as a susceptibility to the interferences of bubbles, uncertainty in the installation process, or dependency of the piezoelectric transducers on temperature variations. Although several ICs (integrated circuits) have recently emerged in the market, which provide integrated ultrasonic front ends and cost-effective solutions, it is necessary to determine several design parameters at the mechanical, electronic, and signal-processing level, in order to optimize the ultrasonic flow sensors. Therefore, this paper presents a complete set of ultrasonic flow sensor guidelines in order to experimentally select each appropriate component, such as the employed IC, the detection algorithm, the piezoelectric transducer frequency, the transducer placement on the pipe, and the sensor’s mechanical dimensions, with each decision oriented towards enhancing accuracy and power consumption. This work is mainly motivated by the different technical challenges to be addressed in order to fully design an ultrasonic gas flow sensor, as the previously published works have usually focused on accuracy optimization at only one design level. In this way, in [ 2 ], accuracy is optimized from a novel hybrid mechanical configuration, increasing the cost per unit with the employment of four piezoelectric transducers, and implemented using a highcost high-energy device, such as a Field Programmable Gate Array (FPGA). In [ 3 ], accuracy is enhanced by the implementation of a novel least-squares (LS)-based time-of-flight (ToF) detection algorithm focused on low SNR environments, but at the expense of increasing its computational burden, requiring it to be implemented by an external computer and so preventing its use in domestic applications. On the other hand, there are previously published works based on low-cost electronics, such as [ 1 ], which achieves adequate accuracy as well, although it only provides measurements at an ambient temperature, without the ability to compensate for thermal drift, as well as without providing power consumption results. These publications are compared with the present work in terms of accuracy in Section 3. Thus, the sensor presented in this paper is focused on the optimization of accuracy by the appropriate analysis, selection, and integration of each design part of the sensor. It still reduces the hardware cost and power consumption, which are usually not described in the previously published works. As such, we provide an integrated solution that encompasses all of these design requirements to be employed in domestic applications. The emergence of new commercial off-the-shelf (COTS) ultrasonic front ends requires a thorough design procedure that simultaneously considers accuracy, power consumption, and cost. As mentioned, so far, the previous literature has been focused on improving specific aspects of the design. However, the purpose of this paper is to address the design of an ultrasonic gas flow sensor from scratch by successively considering all aspects of the design: 1. Detection algorithm and selection of its parameters based on accuracy and power consumption criteria. 2. Selection and design of required hardware. 3. Mechanical design optimization in terms of accuracy. 4. Transducer selection and characterization. In summary, this paper provides that which is lacking in previously published works, i.e., detailed information on all aspects necessary to reproduce the design of a fully operational ultrasonic gas flow sensor, starting from a commercial front-end.
Sensors 2022,22, 9912 3 of 23 As result of the present research, this paper proposes a high-accuracy ultrasonic gas flow sensor for energy-efficient applications in gas distribution networks, reducing the power consumption and cost per unit, which is crucial for the idea of massive distribution networks. The proposed gas flow sensor is based on a V-configuration pipe (with an ultrasonic length of 61.1 mm, section of 194.75 mm 2 , and incidence angle of 65 ◦ ), using 200 kHz-piezoelectric transducers and a cross-correlation method based on the Hilbert Transform. The paper is organized as follows. Section 2describes the fundamental principles of the selected technology and the different stages of the complete design of the sensor. In Section 3, with the integration of the previously described design parts, the final experimental accuracy and power consumption results are discussed and compared with several related works. Finally, the main conclusions are detailed in Section 4. 2. Materials and Methods 2.1. Fundamentals Principles The measurement principle of ultrasonic flow sensors is based on the transmission and reception of an acoustic wave through the medium, employing two piezoelectric transducers installed on the pipe. They can be classified into transit-time or Doppler effect sensors [4]. Transit-time sensors measure the difference in propagation times of ultrasonic pulses upstream and downstream, as illustrated in Figure 1. Absolute ToF are given by Equations (1) and (2), where Lis the distance of the ultrasonic path, cis velocity of the sound in the medium, vis the flow velocity, and α is the incidence angle [ 12 ]. From Equation (3), it can be observed how it is possible to measure v without dependency with the medium, so it will be possible to measure the flow rate Q(by using Equation (4)) from the average of v and the pipe cross section S. In addition, from Equation (5), it is possible to measure c without dependency with the flow velocity [ 12 ]. This property can be employed as a basis to compensate for the flow measurement errors due to temperature variations, from an accurate measurement of t ab and t ba , i.e., c. The dependency of cwith the temperature Tis given by Equation (6), where γ is the adiabatic index, Mis the molar mass of gas, and Ris the universal gas constant [13]. tab =L c+v·cos(α), (1) tba =L c−v·cos(α), (2) v=L 2·cos(α)·1 tab −1 tba , (3) Q=v·S, (4) c=L 2·1 tab +1 tba , (5) c=f(T) = rγ·R·T M(6) Sensors 2022, 22, x FOR PEER REVIEW 3 of 32 3. Mechanical design optimization in terms of accuracy. 4. Transducer selection and characterization. In summary, this paper provides that which is lacking in previously published works, i.e., detailed information on all aspects necessary to reproduce the design of a fully operational ultrasonic gas flow sensor, starting from a commercial front-end. As result of the present research, this paper proposes a high-accuracy ultrasonic gas flow sensor for energy-efficient applications in gas distribution networks, reducing the power consumption and cost per unit, which is crucial for the idea of massive distribution networks. The proposed gas flow sensor is based on a V-configuration pipe (with an ultrasonic length of 61.1 mm, section of 194.75 mm2, and incidence angle of 65°), using 200 kHz-piezoelectric transducers and a cross-correlation method based on the Hilbert Transform. The paper is organized as follows. Section 2 describes the fundamental principles of the selected technology and the different stages of the complete design of the sensor. In Section 3, with the integration of the previously described design parts, the final experimental accuracy and power consumption results are discussed and compared with several related works. Finally, the main conclusions are detailed in Section 4. 2. Materials and Methods 2.1. Fundamentals Principles The measurement principle of ultrasonic flow sensors is based on the transmission and reception of an acoustic wave through the medium, employing two piezoelectric transducers installed on the pipe. They can be classified into transit-time or Doppler effect sensors [4]. Transit-time sensors measure the difference in propagation times of ultrasonic pulses upstream and downstream, as illustrated in Figure 1. Absolute ToF are given by Equations (1) and (2), where L is the distance of the ultrasonic path, c is velocity of the sound in the medium, v is the flow velocity, and α is the incidence angle [12]. From Equation (3), it can be observed how it is possible to measure v without dependency with the medium, so it will be possible to measure the flow rate Q (by using Equation (4)) from the average of v and the pipe cross section S. In addition, from Equation (5), it is possible to measure c without dependency with the flow velocity [12]. This property can be employed as a basis to compensate for the flow measurement errors due to temperature variations, from an accurate measurement of tab and tba, i.e., c. The dependency of c with the temperature T is given by Equation (6), where γ is the adiabatic index, M is the molar mass of gas, and R is the universal gas constant [13]. α C t ab /2 t ba /2 cv L/2 Figure 1. Measurement principle. , )cos( α ⋅+ =vc L tab (1) , )cos( α ⋅− =vc L tba (2) Figure 1. Measurement principle.
Sensors 2022,22, 9912 4 of 23 Additionally, from Equation (3), the theoretical differential ToF (DToF) can be extracted as: ∆=Q·tab ·tba ·2·cos(α) S·L. (7) From Equation (7), it is possible to define the flow rate as: Q=kg·∆ tab ·tba, (8) where kg=S·L/2·cos(α). Alternatively, another common flow measurement method using ultrasonic technology is based on the measurement of the phase shift between the transmitted and the received signals. However, this method can only be used for distances up to the ultrasonic wavelength, in order to avoid measurements ambiguities [ 14 ]. For example, for gas applications, working in a common frequency of 200 kHz, this distance between transducers should be around 2–3 mm, which is insufficient, as described in Section 2.2.2. Thus, for distances longer than the wavelength, the usual method is based on the measurement of DToF. On the other hand, Doppler effect sensors are based on the measurement of the difference between the frequencies of both transmitted acoustic signals. The interpretation of this measurement is similar to that of transit-time sensors, with the variation in the wavelength proportional to the flow velocity in this case. In order for Doppler-based flow sensors to work properly, there must be a concentration of solid particles or air bubbles flowing in the medium, because the movement of the particles changes the frequency of the ultrasonic signal, so the flow sensor can measure this frequency shift, which is linearly proportional to the flow rate. Therefore, Doppler-based sensors are more suitable for measuring flows of dirty or aerated liquids, such as sewage and sludge, whereas transit time-based sensors (selected in this work) are more appropriate for gases and clean liquids, such as drinkable water or oil. 2.2. Ultrasonic Flow Sensor Design The design methodology of the selected transit time-based sensor has been deduced from the five design stages described in this section, in order to optimize ToF measurement accuracy and power consumption. These design stages are the following: 1. Selection of the ToF detection algorithm and the low-cost hardware in which it will be implemented. 2. Design of the different sensor pipes, with different materials, dimensions, and transducer configurations, which are compared in terms of accuracy. 3. Selection and validation of piezoelectric transducers at different nominal frequencies, which are experimentally tested at different temperatures and flow conditions. 4. Sensor configuration, i.e., selection of the different parameters for transmission and reception of the ultrasonic signal. 5. Design of the electronic circuitry to properly generate, receive, filter, and amplify the ultrasonic signals. Note that uncertainty results revealed in this section are given by: U=σQ Qav ·100%, (9) where σQ is the standard deviation, and Q av is the average flow rate by performing one measurement each 500 ms for a set measurement duration of 3 min. For this purpose, the tests described in this paper are performed using an experimental setup, based on a compressor and three different high-accuracy flow meters as benchmark measurements for three different flow ranges (models MC-10SLPM-D-DB9M/CM, MCP-100SLPM-D- DB9M/CM, MCR-250SLPM-D/CM from the Alicat manufacturer), as illustrated in Figure 2.
Sensors 2022,22, 9912 5 of 23 This experimental setup was implemented at room temperature (23 ◦ C) and also at all the temperature ranges ( − 10 ◦ C to 40 ◦ C) by using a climatic chamber, for the specific tests described in Section 2.2.3. Additionally, in Figure 2, pressure at different points of the setup is illustrated as well, where P1 = 3 bars, P3 = 1 bar, and P2 depends on the flow, resulting at around 1.3 bars at 2000 L/h. Finally, Figure 2also includes the serial communication to collect the measurement data and the Bluetooth communication, with the flow meter used as reference. Sensors 2022, 22, x FOR PEER REVIEW 5 of 32 5. Design of the electronic circuitry to properly generate, receive, filter, and amplify the ultrasonic signals. Note that uncertainty results revealed in this section are given by: %,100⋅= av Q Q U σ (9) where σQ is the standard deviation, and Qav is the average flow rate by performing one measurement each 500 ms for a set measurement duration of 3 min. For this purpose, the tests described in this paper are performed using an experimental setup, based on a compressor and three different high-accuracy flow meters as benchmark measurements for three different flow ranges (models MC-10SLPM-D-DB9M/CM, MCP-100SLPM-D-DB9M/CM, MCR-250SLPM-D/CM from the Alicat manufacturer), as illustrated in Figure 2. This experimental setup was implemented at room temperature (23 °C) and also at all the temperature ranges (−10° to 40 °C) by using a climatic chamber, for the specific tests described in Section 2.2.3. Additionally, in Figure 2, pressure at different points of the setup is illustrated as well, where P1 = 3 bars, P3 = 1 bar, and P2 depends on the flow, resulting at around 1.3 bars at 2000 L/h. Finally, Figure 2 also includes the serial communication to collect the measurement data and the Bluetooth communication, with the flow meter used as reference. Figure 2. Experimental setup. 2.2.1. ToF Detection Algorithm and Hardware Selection The main methods to implement transit time-based gas flow sensors are based on: (1) time-to-digital (TDC), based on the detection of the zero crossings of the received signal; and (2) analog-to-digital (ADC), based on the capture of the whole received waveform. In other words, for delay estimation purposes, TDC solutions are based on the use of local properties of the received signals, whereas ADC solutions are based on the use of global properties. The ADC-based solution provides a better accuracy than TDC-based methods, because it is possible to implement the cross-correlation between both received signals, performing a noise digital filter and enhancing the zero-flow drift performance. Finally, the ADC-based solution is more robust regarding signal amplitude variations in cases of high flow rates, transducer-to-transducer deviation, and temperature variations, providing additional information regarding the degradation of the sensor, which is crucial for this long-life sensor application. Of course, this ADC-based option, selected for this application, implies a higher power consumption in terms of signal processing time. Otherwise, a TDC-based option implies a higher power consumption in terms of excitation voltage, because this solution needs a higher amplitude at the pulse generator output. In any case, the enhanced accuracy achieved with the proposed Figure 2. Experimental setup. 2.2.1. ToF Detection Algorithm and Hardware Selection The main methods to implement transit time-based gas flow sensors are based on: (1) time-to-digital (TDC), based on the detection of the zero crossings of the received signal; and (2) analog-to-digital (ADC), based on the capture of the whole received waveform. In other words, for delay estimation purposes, TDC solutions are based on the use of local properties of the received signals, whereas ADC solutions are based on the use of global properties. The ADC-based solution provides a better accuracy than TDC-based methods, because it is possible to implement the cross-correlation between both received signals, performing a noise digital filter and enhancing the zero-flow drift performance. Finally, the ADC-based solution is more robust regarding signal amplitude variations in cases of high flow rates, transducer-to-transducer deviation, and temperature variations, providing additional information regarding the degradation of the sensor, which is crucial for this long-life sensor application. Of course, this ADC-based option, selected for this application, implies a higher power consumption in terms of signal processing time. Otherwise, a TDC-based option implies a higher power consumption in terms of excitation voltage, because this solution needs a higher amplitude at the pulse generator output. In any case, the enhanced accuracy achieved with the proposed ADC-based solution will allow for a lower number of ToF measurements, each at 2 s, which is the flow measurement time specified by the standard EN14236. Note that the ADC-based approach could be also implemented as a first approximation by a conventional threshold method, which is based on the detection of a received amplitude higher than this threshold level in order to estimate ToF. However, this simpler method usually presents errors that cannot be compensated for when the amplitude of the received signal is not constant with distance [ 15 ]. Thus, a ToF estimation based on correlation leads to a more suitable option, consisting of the time detection at this correlation reaching its maximum, and presenting a better accuracy performance than the threshold technique, especially for low signal-to-noise (SNR) scenarios [16–20]. Moreover, for this implementation, the implementation of the Hilbert Transform (HT) over the original received signal has been selected as the method to obtain the envelope of
Sensors 2022,22, 9912 6 of 23 the received signals and also to improve the accuracy for ToF estimation. The HT of a real signal is given by Equation (10) [21]: e x(t) = H[x(t)] = 1 πZ∞ −∞ x(u) (t−u)du. (10) Thus, the HT of a real signal x(t) is the convolution x(t) * (1/ π t). This transform returns an imaginary part which, combined with the real part, can be used to obtain an analytic signal such as: xa(t) = x(t) + jH[x(t)] = x(t) + je x(t). (11) Finally, the envelope of the signal x(t) can be obtained from the modulus of this analytic signal: |xa(t)|=qx2(t) + e x2(t). (12) Once both envelopes have been obtained (for the received signals x(t) and y(t)), crosscorrelation is implemented with the objective of estimating the ToFs from the detection of its peak position [ 22 , 23 ]. Additionally, the HT of the signal y(t) can be employed for the implementation of a cross-correlation algorithm instead of using the signal y(t) itself (CCF). The cross-correlation function obtained with the Hilbert Transform (CCFHT) is equal to: Rxe y(τ) = CCF[x(t)e y(t+τ)]. (13) Then, a zero-crossing detection is used to correct the peak position in order to obtain a subsampled delay time τ (i.e., DToF for this application) estimation. This method also leads to a simpler implementation, by computing a linear interpolation [ 24 ] instead of the parabolic or Gaussian interpolations generally used for the CCF case [ 21 ], and so allowing for a lower energy implementation. In any case, since it is only possible to achieve an accuracy limited by the sampling rate f s [ 25 ] (since ToF = n/f s , where nis the sample where the maximum or zero is detected) when using a coarse ToF estimation from the cross-correlation, a subsample accuracy stage has to be performed, such as the linear interpolation over the CCFHT implemented for this approach. Finally, Figure 3illustrates both received signals’ waveforms. Sensors 2022, 22, x FOR PEER REVIEW 7 of 32 Figure 3. Received signal waveforms. Finally, once an ADC correlation-based method using the HT for ToF estimation has been selected, the core of the electronic circuitry for its implementation will be based on COTS, in order to perform a compact, robust, integrated, and cost-effective solution. Specifically, it is based on the TI MSP430FR6043 component. This device has been selected because it provides a complete analog front-end for the ultrasonic link, based on a pulse generator in transmission and a Programmable Gain Amplifier (PGA) and an ADC in reception, by using an internal 16-bit RISC microprocessor with capabilities to implement the selected cross-correlation based algorithm. Additionally, the selected integrated circuit will reduce the cost per sensor unit and will also provide a communication interface with the customer board, i.e., the gas flow metering unit. 2.2.2. Mechanical Design At the mechanical level, the sensor has been optimized in terms of the phase difference between ultrasonic links, sensitivity, and flow stabilization. As a first general design consideration, a pipe with a rectangular cross-section was selected, because with a rectangular shape, it can be demonstrated how the phase difference between ultrasonic paths is reduced [26], leading to a flow measurement under more similar conditions for upstream and downstream ultrasonic wave propagation paths. Regarding the material employed for the pipes, different compositions were preliminary manufactured (using 3D printers) and tested, because the imperfections of the pipe, such as internal wall roughness or inhomogeneity in materials, can affect the flow measurement accuracy [27,28], which can also be affected by the capacity of the material to clamp the transducers. Thus, it will be necessary to avoid their misplacement, which could lead to possible uncertainties, as modeled in [29,30]. After this preliminary analysis, a photopolymer resin was selected, because its features of homogeneity, rigidity, and stability regarding climatic changes provided better accuracy results than other tested materials such as PLA (poly-lactic acid), SLA (stereo-lithographic), or ABS (acrylonitrile butadiene styrene). Finally, for flow stabilization purposes, metallic planar separation plates have been installed into the flow path pipe in order to make the flow velocity distribution profile more uniform. Specifically, three equally spaced metallic plates, with a thickness of 0.5 mm, have been installed in the pipe, as illustrated in Figure 4, where it is possible to appreciate the 6 rails where the plates are fixed. Figure 3. Received signal waveforms. Finally, once an ADC correlation-based method using the HT for ToF estimation has been selected, the core of the electronic circuitry for its implementation will be based on COTS, in order to perform a compact, robust, integrated, and cost-effective solution. Specifically, it is based on the TI MSP430FR6043 component. This device has been selected because it provides a complete analog front-end for the ultrasonic link, based on a pulse generator in transmission and a Programmable Gain Amplifier (PGA) and an ADC in
Sensors 2022,22, 9912 7 of 23 reception, by using an internal 16-bit RISC microprocessor with capabilities to implement the selected cross-correlation based algorithm. Additionally, the selected integrated circuit will reduce the cost per sensor unit and will also provide a communication interface with the customer board, i.e., the gas flow metering unit. 2.2.2. Mechanical Design At the mechanical level, the sensor has been optimized in terms of the phase difference between ultrasonic links, sensitivity, and flow stabilization. As a first general design consideration, a pipe with a rectangular cross-section was selected, because with a rectangular shape, it can be demonstrated how the phase difference between ultrasonic paths is reduced [ 26 ], leading to a flow measurement under more similar conditions for upstream and downstream ultrasonic wave propagation paths. Regarding the material employed for the pipes, different compositions were preliminary manufactured (using 3D printers) and tested, because the imperfections of the pipe, such as internal wall roughness or inhomogeneity in materials, can affect the flow measurement accuracy [ 27 , 28 ], which can also be affected by the capacity of the material to clamp the transducers. Thus, it will be necessary to avoid their misplacement, which could lead to possible uncertainties, as modeled in [ 29 , 30 ]. After this preliminary analysis, a photopolymer resin was selected, because its features of homogeneity, rigidity, and stability regarding climatic changes provided better accuracy results than other tested materials such as PLA (poly-lactic acid), SLA (stereo-lithographic), or ABS (acrylonitrile butadiene styrene). Finally, for flow stabilization purposes, metallic planar separation plates have been installed into the flow path pipe in order to make the flow velocity distribution profile more uniform. Specifically, three equally spaced metallic plates, with a thickness of 0.5 mm, have been installed in the pipe, as illustrated in Figure 4, where it is possible to appreciate the 6 rails where the plates are fixed. Sensors 2022, 22, x FOR PEER REVIEW 8 of 32 Figure 4. Installation of the metallic plates. From these preliminary considerations, the configurations of two ultrasonic paths were tested: a Z-configuration (based on a direct route between the transducers) and a V-configuration (based on one reflection of the ultrasonic wave over the pipe floor). For each configuration, different form-factor alternatives have been analyzed, i.e., different incidence angles, cross-sections, and ultrasonic path lengths. For this mechanical analysis based on geometric variations, the starting point is based on the known values of the velocity of the sound c (435 m/s, calculated from the measurement of absolute ToF at zero-flow conditions), and the flow rate range is given by the standard (40–7200 L/h). The target parameters will be the flow velocity v and the DToF ranges. From Equation (4), modifying the cross-section S, it is possible to obtain different ranges for v. Its maximum should be limited, because higher values of v will provoke a higher deviation of the ultrasonic beam, as shown in Figure 5, causing different ADC signal levels in the upstream and downstream direction for high flow rates [31]. Note that although an along-beam configuration (based on a direct route between the transducers in parallel with the flow direction) is less affected by the beam deviation and non-reciprocity than the Z and V configurations [32], these effects have been considered by the appropriate selection of the values of L, α, and S, in the function of the transducer’s diameter and the beam’s deviation at the maximum flow rate (7200 L/h), as described below. Figure 4. Installation of the metallic plates. From these preliminary considerations, the configurations of two ultrasonic paths were tested: a Z-configuration (based on a direct route between the transducers) and a V- configuration (based on one reflection of the ultrasonic wave over the pipe floor). For each configuration, different form-factor alternatives have been analyzed, i.e., different incidence angles, cross-sections, and ultrasonic path lengths. For this mechanical analysis based on geometric variations, the starting point is based on the known values of the velocity of the sound c(435 m/s, calculated from the measurement of absolute ToF at zero-flow conditions), and the flow rate range is given by the standard (40–7200 L/h). The target parameters will be the flow velocity vand the DToF ranges. From Equation (4), modifying the cross-section S, it is possible to obtain different ranges for v. Its maximum should be limited, because higher values of vwill provoke a higher deviation of the ultrasonic beam, as shown in Figure 5, causing different ADC signal levels in the upstream and downstream direction for high flow rates [ 31 ]. Note that although an along-beam configuration (based on a direct route between the transducers in parallel with the flow direction) is less affected
Sensors 2022,22, 9912 8 of 23 by the beam deviation and non-reciprocity than the Z and V configurations [ 32 ], these effects have been considered by the appropriate selection of the values of L, α ,and S, in the function of the transducer’s diameter and the beam’s deviation at the maximum flow rate (7200 L/h), as described below. Sensors 2022, 22, x FOR PEER REVIEW 9 of 32 α C c v φ ΔL ΔL L’ 1 Figure 5. Ultrasonic beam deviation. On the other hand, a higher value of the minimum DToF will improve accuracy at low flow rates, because SNR would be increased. However, lower values of v imply lower values of DToF, so this means a design trade-off: reducing S improves accuracy at low flow ranges, but it increases the sonic beam deviation caused by a higher v. Thus, knowing these target parameters, the main steps followed by the design are: 1. The ultrasonic path length is modified assuming this trade-off: a longer length leads to a higher interaction between the ultrasonic signal and the flow gas, increasing accuracy; however, the signal attenuation will be increased as well. 2. The incidence angle α is modified as well, implying different path lengths. 3. The cross-section S = W·H is modified, with the width W and the height H, where H = L1′·sin(α) (for a Z-scheme), H = L1′·sin(α)/2 (for a V-scheme), and H = L1′·sin(α)/4, with L1′ = L1–2·ΔL, where L1′ is the path length inside the pipe, and ΔL the distance between the pipe and the transducer (Figure 5). For each trio of values (L1-α-S), the v range is calculated from Equation (4), the absolute ToF ranges from Equations (1) and (2), and the DToF from Equation (7). In order to analyze different alternatives for the minimum DToF (at 40 L/h) and the maximum v (at 7200 L/h), a set of mechanical designs was performed. A list with the main manufactured and tested designs is shown in Table 1. As an example, Figure 6 illustrates the designed and manufactured V2 pipe. Table 1. Manufactured and tested mechanical designs. Design Length (mm) Width (mm) High (mm) Section (mm2) Angle (°) Minimum DToF (ns) Maximum v (m/s) V1 73.8 9.9 19.2 190.55 45 51.71 10.50 V2 61.1 8.3 23.6 194.75 65 25.04 10.27 V3 58.8 8.5 22.3 189.49 67 22.90 10.55 V4 54.7 10.2 19.1 195.30 63 24.00 10.24 V5 63.4 8.1 23.7 191.13 65 26.48 10.46 V6 58.6 9.1 22.5 203.39 65 23.00 9.83 V7 56.6 8.1 20.7 166.32 65 27.17 12.02 Z1 54.8 5.0 36.0 180.21 60 28.72 11.10 Z2 50.1 6.3 30.6 192.98 58 25.96 10.36 Figure 5. Ultrasonic beam deviation. On the other hand, a higher value of the minimum DToF will improve accuracy at low flow rates, because SNR would be increased. However, lower values of vimply lower values of DToF, so this means a design trade-off: reducing Simproves accuracy at low flow ranges, but it increases the sonic beam deviation caused by a higher v. Thus, knowing these target parameters, the main steps followed by the design are: 1. The ultrasonic path length is modified assuming this trade-off: a longer length leads to a higher interaction between the ultrasonic signal and the flow gas, increasing accuracy; however, the signal attenuation will be increased as well. 2. The incidence angle αis modified as well, implying different path lengths. 3. The cross-section S=W · His modified, with the width Wand the height H, where H=L1 0· sin( α ) (for a Z-scheme), H=L1 0· sin( α )/2 (for a V-scheme), and H=L1 0· sin( α )/4, with L1 0 = L1 − 2 ·∆ L, where L1 0 is the path length inside the pipe, and ∆ Lthe distance between the pipe and the transducer (Figure 5). For each trio of values (L1- α -S), the vrange is calculated from Equation (4), the absolute ToF ranges from Equations (1) and (2), and the DToF from Equation (7). In order to analyze different alternatives for the minimum DToF (at 40 L/h) and the maximum v(at 7200 L/h), a set of mechanical designs was performed. A list with the main manufactured and tested designs is shown in Table 1. As an example, Figure 6illustrates the designed and manufactured V2 pipe. Table 1. Manufactured and tested mechanical designs. Design Length (mm) Width (mm) High (mm) Section (mm2) Angle (◦) Minimum DToF (ns) Maximum v(m/s) V1 73.8 9.9 19.2 190.55 45 51.71 10.50 V2 61.1 8.3 23.6 194.75 65 25.04 10.27 V3 58.8 8.5 22.3 189.49 67 22.90 10.55 V4 54.7 10.2 19.1 195.30 63 24.00 10.24 V5 63.4 8.1 23.7 191.13 65 26.48 10.46 V6 58.6 9.1 22.5 203.39 65 23.00 9.83 V7 56.6 8.1 20.7 166.32 65 27.17 12.02 Z1 54.8 5.0 36.0 180.21 60 28.72 11.10 Z2 50.1 6.3 30.6 192.98 58 25.96 10.36
Sensors 2022,22, 9912 9 of 23 Sensors 2022, 22, x FOR PEER REVIEW 10 of 32 Figure 6. Designed and manufactured V2 pipe. The first step to size these designs consisted of performing a sweep of α in order to obtain its value, which provokes a minimum deviation of the ultrasonic beam for the worst case (at 7200 L/h), by using trigonometric calculations from Figure 5. Minimum Δx deviation values were achieved with α ≈ 65°, resulting in Δx ≈ 0.6mm, which seems small enough compared with the selected transducer diameter of 14.1 mm (described in Section 2.2.3). The mechanical designs listed in Table 1, for the case of a V-configuration, consist of a preliminary design (V1), with α = 45° (in order to test the effect of a higher Δx) and several designs in the range of α = 63–67°. Note that most of designs were manufactured with α = 65°, because it presented a better accuracy of results than the cases of α = 63° (V3) and α = 67° (V4). Designs with α = 65° (V2, V5–V7) were manufactured with slightly combined variations of L, H, and W in order to test their influence on signal attenuation, interaction of the ultrasonic wave with the gas, and ultrasonic beam deviation effects. Alternatively, several Z-designs were performed for different values of L1-α-S in the range of V-designs. The results with the best accuracy were achieved for Z1 and Z2, included in Table 1 as the most representative cases. However, the accuracy of these results is still lower than all the V-designs, so a Z-configuration was finally discarded. In addition, a V-configuration will allow for compensating for possible flow disturbances by the ultrasonic wave propagation along the reciprocate paths [2]. Finally, a V-configuration allows for a simpler assembly, because both transducers are placed at the same side of the pipe. Figure 7 illustrates how Z-designs present a higher uncertainty, especially at high flow rates, because of a higher maximum v and/or a lower incidence angle. Figure 6. Designed and manufactured V2 pipe. The first step to size these designs consisted of performing a sweep of α in order to obtain its value, which provokes a minimum deviation of the ultrasonic beam for the worst case (at 7200 L/h), by using trigonometric calculations from Figure 5. Minimum ∆ xdeviation values were achieved with α≈ 65 ◦ , resulting in ∆ x ≈ 0.6 mm, which seems small enough compared with the selected transducer diameter of 14.1 mm (described in Section 2.2.3). The mechanical designs listed in Table 1, for the case of a V-configuration, consist of a preliminary design (V1), with α = 45 ◦ (in order to test the effect of a higher ∆ x) and several designs in the range of α = 63–67 ◦ . Note that most of designs were manufactured with α = 65 ◦ , because it presented a better accuracy of results than the cases of α = 63 ◦ (V3) and α = 67 ◦ (V4). Designs with α = 65 ◦ (V2, V5–V7) were manufactured with slightly combined variations of L,H, and Win order to test their influence on signal attenuation, interaction of the ultrasonic wave with the gas, and ultrasonic beam deviation effects. Alternatively, several Z-designs were performed for different values of L1- α -S in the range of V-designs. The results with the best accuracy were achieved for Z1 and Z2, included in Table 1as the most representative cases. However, the accuracy of these results is still lower than all the V-designs, so a Z-configuration was finally discarded. In addition, a V-configuration will allow for compensating for possible flow disturbances by the ultrasonic wave propagation along the reciprocate paths [ 2 ]. Finally, a V-configuration allows for a simpler assembly, because both transducers are placed at the same side of the pipe. Figure 7illustrates how Z-designs present a higher uncertainty, especially at high flow rates, because of a higher maximum vand/or a lower incidence angle. Sensors 2022, 22, x FOR PEER REVIEW 11 of 32 Figure 7. Uncertainty of different mechanical designs. For V-designs, V1 presents the higher uncertainty at high flow rates, which is also due to its higher v range, as well as because its lower incidence angle provokes a higher beam deviation of Δx ≈ 0.8mm. For the cases of V-designs with α = 63–67° (Figures 8 and 9), a similar uncertainty was obtained for all of them, achieving the best results with V2, which has an intermediate value of the maximum v and the minimum DToF, as well as the optimal value of α = 65°. Uncertainly (%) Figure 7. Uncertainty of different mechanical designs. For V-designs, V1 presents the higher uncertainty at high flow rates, which is also due to its higher vrange, as well as because its lower incidence angle provokes a higher beam deviation of ∆ x ≈ 0.8 mm. For the cases of V-designs with α = 63–67 ◦
Sensors 2022,22, 9912 16 of 23 Sensors 2022, 22, x FOR PEER REVIEW 23 of 32 Figure 19. Uncertainty achieved for single-tone and multi-tone modes. (b) Time between the pulse is transmitted, and the ADC starts to capture the signal In order to reduce power consumption, this time must be minimized, being limited by the minimum ToF, which is (from Equation (1)) 139.1 μs at the maximum flow rate (7200 L/h), with c = 435m/s and v = 10.27 m/s. From Equation (6), this minimum ToF will be reduced more at higher temperatures, resulting in μs 134.8 at 40 °C. Since, according to the manufacturer’s recommendation, the ADC needs a time of 50–60 μs before the signal is captured, this time was experimentally adjusted to 65 μs. (c) Number of pulses The number of transmitted pulses has to be enough to build the whole envelope of the received signal. For the V2 design, this minimum experimentally results in 8 pulses. The experimental variance obtained for a higher number of pulses is shown in Table 4 for a flow rate of 40 L/h, which is the most critical point to comply with the standard requirements. It is possible to observe how, by using more than 8 pulses, the accuracy is slightly improved. However, a value of 8 pulses was preliminarily selected in order to reduce the charge consumption, which is increased 0.0115 μA·s per each transmitted pulse. Table 4. Comparison of pattern options for a flow rate of 40 L/h. Number of Pulses Number of Stop Pulses Variance FoM 8 2 3.78 × 10−19 2.30 × 1019 8 1 6.46 × 10−19 1.49 × 1019 8 0 5.80 × 10−19 1.87 × 1019 10 0 5.11 × 10−19 1.70 × 1019 12 0 3.52 × 10−19 2.06 × 1019 14 0 3.40 × 10−19 1.83 × 1019 Moreover, it is possible to add additional pulses to the transmitted pattern at the end of the frame with a phase shift of 180°. The function of this self-interference method (also called stop pulses) is to increase the ring down at the end of the ADC capture, by reducing the oscillations that the transducer maintains by inertia after receiving the pulses, which is a performance that will depend on the selected transducer [40]. This method to damp the ringing leads to a simpler implementation than those based on wideband transducers [41]. Thus, the use of these stop pulses improves the variance, as shown in Table 4, so a pattern based on 8 pulses and 2 stop pulses was finally selected, presenting the best results regarding the figure of merit (FoM) given by: 0 1000 2000 3000 4000 5000 6000 7000 8000 Flow rate (l/h) 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 single-tone multi-tone Figure 19. Uncertainty achieved for single-tone and multi-tone modes. (c) Number of pulses The number of transmitted pulses has to be enough to build the whole envelope of the received signal. For the V2 design, this minimum experimentally results in 8 pulses. The experimental variance obtained for a higher number of pulses is shown in Table 4 for a flow rate of 40 L/h, which is the most critical point to comply with the standard requirements. It is possible to observe how, by using more than 8 pulses, the accuracy is slightly improved. However, a value of 8 pulses was preliminarily selected in order to reduce the charge consumption, which is increased 0.0115 µ A · s per each transmitted pulse. Table 4. Comparison of pattern options for a flow rate of 40 L/h. Number of Pulses Number of Stop Pulses Variance FoM 8 2 3.78 ×10−19 2.30 ×1019 8 1 6.46 ×10−19 1.49 ×1019 8 0 5.80 ×10−19 1.87 ×1019 10 0 5.11 ×10−19 1.70 ×1019 12 0 3.52 ×10−19 2.06 ×1019 14 0 3.40 ×10−19 1.83 ×1019 Moreover, it is possible to add additional pulses to the transmitted pattern at the end of the frame with a phase shift of 180 ◦ . The function of this self-interference method (also called stop pulses) is to increase the ring down at the end of the ADC capture, by reducing the oscillations that the transducer maintains by inertia after receiving the pulses, which is a performance that will depend on the selected transducer [ 40 ]. This method to damp the ringing leads to a simpler implementation than those based on wideband transducers [ 41 ]. Thus, the use of these stop pulses improves the variance, as shown in Table 4, so a pattern based on 8 pulses and 2 stop pulses was finally selected, presenting the best results regarding the figure of merit (FoM) given by: FoM =1 σ·N·Q1p , (14) where σ is the obtained variance, Nis the total number of pulses, and Q 1p is the charge consumption required per pulse (0.0115 µ A · s). Similar conclusions were obtained for higher flows, so the minimum flow rate has been used as a reference, because is the most restricted case in terms of accuracy. (d) Upstream-to-downstream time The time between the transmissions of both transducers has been minimized in order to perform a complete flow measurement as fast as possible, with the objective of turning off the ultrasonic front-end after each measurement, in order to reduce the power consumption.
Sensors 2022,22, 9912 17 of 23 For the V2 design, from Equations (2) and (6), the maximum ToF is 149.6 µ s (at 7200 L/h and − 10 ◦ C), and the minimum ADC time capture recommended by the manufacturer is 250 µ s (enough to convert a 10-pulse signal), so upstream-to-downstream time is set to 400 µs. (e) Gain The PGA gain ranges between − 6 dB and 30 dB. For the V2 design, in gas at an ambient temperature, this gain was set at 15 dB (14 dB higher than the air case), which has to be increased up to 24.5 dB in the worst case ( − 10 ◦ C), so it is dynamically adjusted in the function of the received amplitude. Figure 20 shows the amplitude at ambient and extreme temperatures in a gas medium using a PGA gain of 15 dB. Sensors 2022, 22, x FOR PEER REVIEW 24 of 32 , 1 1p QN FoM ⋅⋅ = σ (14) where σ is the obtained variance, N is the total number of pulses, and Q1p is the charge consumption required per pulse (0.0115 μA·s). Similar conclusions were obtained for higher flows, so the minimum flow rate has been used as a reference, because is the most restricted case in terms of accuracy. (d) Upstream-to-downstream time The time between the transmissions of both transducers has been minimized in order to perform a complete flow measurement as fast as possible, with the objective of turning off the ultrasonic front-end after each measurement, in order to reduce the power consumption. For the V2 design, from Equations (2) and (6), the maximum ToF is 149.6 μs (at 7200 L/h and −10 °C), and the minimum ADC time capture recommended by the manufacturer is 250 μs (enough to convert a 10-pulse signal), so upstream-to-downstream time is set to 400 μs. (e) Gain The PGA gain ranges between −6 dB and 30 dB. For the V2 design, in gas at an ambient temperature, this gain was set at 15 dB (14 dB higher than the air case), which has to be increased up to 24.5 dB in the worst case (−10 °C), so it is dynamically adjusted in the function of the received amplitude. Figure 20 shows the amplitude at ambient and extreme temperatures in a gas medium using a PGA gain of 15 dB. Figure 20. Amplitude received at different temperatures. (f) ADC sampling frequency The ADC sampling frequency (fs) can be programmed in the range of 1–2 MHz. Using the minimum value of 1 MHz, it is possible to convert 5 samples per received pulse, which is enough to build the envelope signal and to estimate the ToF properly, without a difference regarding accuracy compared with sampling at 2 MHz. Thus, a fs of 1 MHz was selected, because higher sampling frequencies would lead to higher power consumption, as the ToF detection algorithm time would be increased as well. 2.2.5. Hardware Design The electronic circuitry integrated into the sensor is based on COTS, specifically on the components illustrated in Figure 21 and described below: • MSP430FR6043 (Texas Instruments, Dallas, TX, USA) ultrasonic front-end with an integrated microprocessor (uP), programmable pulse generator (PPG), and PGA. Figure 20. Amplitude received at different temperatures. (f) ADC sampling frequency The ADC sampling frequency (f s ) can be programmed in the range of 1–2 MHz. Using the minimum value of 1 MHz, it is possible to convert 5 samples per received pulse, which is enough to build the envelope signal and to estimate the ToF properly, without a difference regarding accuracy compared with sampling at 2 MHz. Thus, a f s of 1 MHz was selected, because higher sampling frequencies would lead to higher power consumption, as the ToF detection algorithm time would be increased as well. 2.2.5. Hardware Design The electronic circuitry integrated into the sensor is based on COTS, specifically on the components illustrated in Figure 21 and described below: • MSP430FR6043 (Texas Instruments, Dallas, TX, USA) ultrasonic front-end with an integrated microprocessor (uP), programmable pulse generator (PPG), and PGA. • TPS22860 (Texas Instruments, Dallas, TX, USA) analog switches with time domain multiplexing to provide the supply voltage at the appropriate times. • TS5A9411 (Texas Instruments, Dallas, TX, USA) multiplexers to connect the signals to their correct transmission or reception chains at the appropriate times. • Pre-amplification stage based on the low-power operational amplifier OPA836 (Texas Instruments, Dallas, TX, USA) (Figure 22). Therefore, the excitation signal (at 3.3 V and 200 kHz) is generated by the PPG, with a low-impedance output driver (4 Ω ), in order to not significantly affect to the impedance transducer, with a measured value of 449.3 Ω . In addition, the multiplexer manufacturer specifies a very low on-state resistance match between channels of 0.05 Ω , which should not affect reciprocity terms, according to the criteria regarding the matching of electronic components for reciprocal operation described in [ 36 ]. Finally, note that the employed
Sensors 2022,22, 9912 18 of 23 multiplexer was also selected because of its ultra-low leakage current specification of 400 pA. Sensors 2022, 22, x FOR PEER REVIEW 25 of 32 • TPS22860 (Texas Instruments, Dallas, TX, USA) analog switches with time domain multiplexing to provide the supply voltage at the appropriate times. • TS5A9411 (Texas Instruments, Dallas, TX, USA) multiplexers to connect the signals to their correct transmission or reception chains at the appropriate times. • Pre-amplification stage based on the low-power operational amplifier OPA836 (Texas Instruments, Dallas, TX, USA) (Figure 22). Swith TX Transducers Demux TX Pulse Generator PGA uP Swith RX Mux RX Pre-amplifier Transmitted Signal Received Signal Supply Voltage Supply Voltage Transmission Control Signal Reception Control Signal Figure 21. Hardware block diagram. Figure 21. Hardware block diagram. Sensors 2022, 22, x FOR PEER REVIEW 26 of 32 Input VCC Output VCC C1 = 33 pF C2 = 1 uF C3 = 1 uF C4 = 2.2 uF C5 = 680 pF C5 = 1nF R1 = 1.82k R2 = 10 R3 = 2M R4 = 2M R5 = 24.9k R6 = 400 Figure 22. Pre-amplification schematic. Therefore, the excitation signal (at 3.3V and 200 kHz) is generated by the PPG, with a low-impedance output driver (4 Ω), in order to not significantly affect to the impedance transducer, with a measured value of 449.3 Ω. In addition, the multiplexer manufacturer specifies a very low on-state resistance match between channels of 0.05 Ω, which should not affect reciprocity terms, according to the criteria regarding the matching of electronic components for reciprocal operation described in [36]. Finally, note that the employed multiplexer was also selected because of its ultra-low leakage current specification of 400 pA. On the other hand, the pre-amplification circuit implements a gain of 45.2 dB, which is enough for accurate measurements for the case of higher attenuation (at −10 °C), where the PGA gain (with a maximum of 30 dB) has to be set at 24.5 dB, as previously described. Thus, the total gain is 45.2 dB + 24.5 dB = 69.7 dB in this case. In addition, several filtering options implemented in this stage were tested by modifying the capacitances C1 and C2. The objective of this analysis was to optimize the filter bandwidth in order to increase the available gain room, which is restricted by the G·BW product of 110 MHz specified by the pre-amplifier manufacturer and also by the minimum necessary gain at the pre-amplifier stage in the case of higher attenuation (69.7 dB − 30 dB = 39.7 dB). Note that for this application, bandwidth is not limited by the slew rate (SR) of the amplifier, because the maximum amplified voltage slope results in the order of 3–4 V/μs, much lower than the specified SR (560 V/μs). On the other hand, for the presented analysis, there is a trade-off between noise at the ADC input and distortion. Therefore, this study was focused on minimizing this noise without provoking distortion at the output. The results derived from this analysis are illustrated in Figure 23. Four different filter bandwidth options were evaluated: 15.7–584 kHz (C1 = 33 pF and C2 = 1 μF), 15.7– 212.4 kHz (C1 = 120 pF and C2 = 1 μF), 47.6–584 kHz (C1 = 33 pF and C2 = 330 nF), and 47.6–212.4 kHz (C1 = 120 pF and C2 = 330 nF). It is possible to observe how higher bandwidths benefit ToF detection, mainly at low flow rates. Therefore, a bandwidth of 568.3 kHz was selected, obtaining a G·BW = 103.4 MHz, close to the maximum of 110 MHz, so still with room to increase the pre-amplification gain, although this should not be necessary with a room of 30 dB − 24.5 dB = 5.5 dB with the PGA. Figure 22. Pre-amplification schematic. On the other hand, the pre-amplification circuit implements a gain of 45.2 dB, which is enough for accurate measurements for the case of higher attenuation (at − 10 ◦ C), where the PGA gain (with a maximum of 30 dB) has to be set at 24.5 dB, as previously described. Thus, the total gain is 45.2 dB + 24.5 dB = 69.7 dB in this case. In addition, several filtering options implemented in this stage were tested by modifying the capacitances C1 and C2. The objective of this analysis was to optimize the filter bandwidth in order to increase the available gain room, which is restricted by the G · BW product of 110 MHz specified by the pre-amplifier manufacturer and also by the minimum necessary gain at the pre-amplifier stage in the case of higher attenuation (69.7 dB − 30 dB = 39.7 dB). Note that for this application, bandwidth is not limited by the slew rate (SR) of the amplifier, because the maximum amplified voltage slope results in the order of 3–4 V/ µ s, much lower than the specified SR (560 V/ µ s). On the other hand, for the presented analysis, there is a trade-off between noise at the ADC input and distortion. Therefore, this study was focused on minimizing this noise without provoking distortion at the output. The results derived from this analysis are illustrated in Figure 23. Four different filter bandwidth options were evaluated: 15.7–584 kHz (C1 = 33 pF and C2=1 µ F), 15.7–212.4 kHz (C1 = 120 pF and C2=1 µ F), 47.6–584 kHz (C1 = 33 pF and C2 = 330 nF), and 47.6–212.4 kHz (C1 = 120 pF and C2 = 330 nF). It is possible to observe how higher bandwidths benefit ToF detection, mainly at low flow rates. Therefore, a bandwidth of 568.3 kHz was selected, obtaining a G · BW = 103.4 MHz, close to the maximum of 110 MHz, so still with room to increase the pre-amplification gain, although this should not be necessary with a room of 30 dB −24.5 dB = 5.5 dB with the PGA.
Sensors 2022,22, 9912 19 of 23 Sensors 2022, 22, x FOR PEER REVIEW 27 of 32 Figure 23. Uncertainty achieved with different filtering options. Finally, the manufactured and experimentally characterized printed circuit board (PCB) is illustrated in Figure 24. 0 1000 2000 3000 4000 5000 6000 7000 8000 Flow rate (l/h) 0 1 2 3 4 5 6 7 8 9 10 Uncertainly (%) 15.7−584 KHz (C = 33 pF and C = 1 μF) 47.6−584 KHz (C = 33 pF and C = 330 nF) 15.7−212.4 KHz (C = 120 pF and C = 1 μF) 47.6−212.4 KHz (C = 120 pF and C = 330 nF) Figure 23. Uncertainty achieved with different filtering options. Finally, the manufactured and experimentally characterized printed circuit board (PCB) is illustrated in Figure 24. Sensors 2022, 22, x FOR PEER REVIEW 28 of 32 Figure 24. Designed and manufactured PCB. 3. Results and Discussion The final design was tested after the integration of all the previously design parts, achieving the accuracy results presented in Figure 25. It is possible to appreciate how the standard EN14236 specifications are taken fully into account. These require an error (averaging six measurements) < 3% in the range of 40–600 L/h and <1.5% in the range of 600–7200 L/h. Specifically, the designed sensor presents a maximum error of 2.04% at 40 L/h. In Figure 25, the dash line corresponds to the admitted error, and the solid lines correspond to the achieved error after averaging six samples (as required by the standard), for the cases of one and four measurements of DToF per flow measurement. Figure 24. Designed and manufactured PCB. 3. Results and Discussion The final design was tested after the integration of all the previously design parts, achieving the accuracy results presented in Figure 25. It is possible to appreciate how the standard EN14236 specifications are taken fully into account. These require an error (averaging six measurements) < 3% in the range of 40–600 L/h and <1.5% in the range of 600–7200 L/h. Specifically, the designed sensor presents a maximum error of 2.04% at 40 L/h. In Figure 25, the dash line corresponds to the admitted error, and the solid lines correspond to the achieved error after averaging six samples (as required by the standard), for the cases of one and four measurements of DToF per flow measurement. Sensors 2022, 22, x FOR PEER REVIEW 29 of 32 Figure 25. Achieved uncertainty. Moreover, the measured power consumption resulted in 21.6 μA per flow measurement, lower than other commercial ultrasonic flow sensors, such as the Panasonic F9CM62A and the Maxim MAX35104, which report 25.7 μA and 31 μA, respectively. This minimized power consumption has been achieved from the sensor’s optimization, previously described in Section 2, which is realized at different levels, i.e., ultrasonic sensitivity optimization, sensor configuration, hardware design optimization, and also exploiting the accuracy provided by the correlation algorithm based on HT. Note that this total power consumption was measured for the proposed CCFHT-based method, with a data processing time of 16.1 ms. By performing a CCF-based algorithm, the measured total power consumption resulted in 19.6 μA, which provides a higher computing efficiency with a lower data-processing time per flow measurement (14.1 ms), because an additional processing time is necessary to previously implement the HT of the signals. However, regarding accuracy, by using a CCFHT-based implementation, the achieved uncertainty had a better result than the CCF case for the same mechanical design, as illustrated in Figure 26. It is possible to appreciate how the achieved uncertainty is up to 1.4% (at 40 L/h) enhanced for CCFHT case, improving the results especially at low flow rates. Figure 25. Achieved uncertainty.
Sensors 2022,22, 9912 20 of 23 Moreover, the measured power consumption resulted in 21.6 µ A per flow measurement, lower than other commercial ultrasonic flow sensors, such as the Panasonic F9CM62A and the Maxim MAX35104, which report 25.7 µ A and 31 µ A, respectively. This minimized power consumption has been achieved from the sensor’s optimization, previously described in Section 2, which is realized at different levels, i.e., ultrasonic sensitivity optimization, sensor configuration, hardware design optimization, and also exploiting the accuracy provided by the correlation algorithm based on HT. Note that this total power consumption was measured for the proposed CCFHT-based method, with a data processing time of 16.1 ms. By performing a CCF-based algorithm, the measured total power consumption resulted in 19.6 µ A, which provides a higher computing efficiency with a lower dataprocessing time per flow measurement (14.1 ms), because an additional processing time is necessary to previously implement the HT of the signals. However, regarding accuracy, by using a CCFHT-based implementation, the achieved uncertainty had a better result than the CCF case for the same mechanical design, as illustrated in Figure 26. It is possible to appreciate how the achieved uncertainty is up to 1.4% (at 40 L/h) enhanced for CCFHT case, improving the results especially at low flow rates. Sensors 2022, 22, x FOR PEER REVIEW 30 of 32 Figure 26. Uncertainty achieved for CCF and CCFHT cases. Therefore, these results imply that it would be possible to perform a lower number of ToF detections per flow measurement in the CCFHT case in order to obtain the same accuracy results. For example, in the most critical case (at 40 L/h), an uncertainty of 5.0% is achieved for the CCFHT case and 6.4% for the CCF case. Assuming 5.02 = 6.40/√x, where x is the number of CCF-based ToF measurements, these accuracy results lead to the need to perform x = 1.6 measurements for each measurement using CCFHT, so it would lead to an effective power consumption of 1.6·19.6 μA = 31.4 μA, quite higher than the 21.6 μA achieved using the proposed CCFHT method. As such, it is possible to conclude that the proposed CCFHT-based method is more efficient taking both terms into account, i.e., accuracy and computational burden. In terms of accuracy, the proposed sensor presents similar results compared with other previously published works, such as [2,3]. Although these ultrasonic gas flow sensors are focused on higher flow rate applications, they can be compared in the cases of their minimum flow rate, i.e., 10,000 L/h in [2] and 5000 L/h in [3]. Thereby, at ambient temperatures and using the six-measurement average required by the standard, [2] achieves an accuracy of 0.48% at 10,000 L/h, whereas the proposed sensor achieves 0.49% at 7200 L/h. Similarly, [3] presents an accuracy of 0.81% at 5000 L/h, and the proposed sensor achieves 0.41% at the same flow rate. Additionally, the proposed sensor is implemented using a cost-effective and high-energy efficiency solution compared with other works, which are implemented using power-hungry devices, as a FPGA in [2] or an external computer in [3]. Finally, a comparison in terms of accuracy with an ultrasonic gas flow sensor in a similar flow range [1] is presented in Table 5, showing the accuracy results for the flow rates given by [1]. In general, [1] achieves a better accuracy at low flow rates and a worse accuracy at high flow rates, although both sensors fully comply with the standard requirements. However, note that [1] does not provide results in terms of flow measurement drift for different temperatures or in terms of energy consumption. Additionally, regarding zero-flow drift, [1] presents an error of ±5 ns, which is higher than the ±0.7 ns achieved in this work and reported in Section 2.2.3. Table 5. Accuracy results comparison. 40 L/h 1440–1600 L/h 4000 L/h Proposed work 2.04% 0.33 0.41% [1] 1.67% 1.09% 0.74% 4. Conclusions 0 1000 2000 3000 4000 5000 6000 7000 8000 Flow rate (l/h) 0 1 2 3 4 5 6 7 Uncertainly (%) CCFHT CCF Figure 26. Uncertainty achieved for CCF and CCFHT cases. Therefore, these results imply that it would be possible to perform a lower number of ToF detections per flow measurement in the CCFHT case in order to obtain the same accuracy results. For example, in the most critical case (at 40 L/h), an uncertainty of 5.0% is achieved for the CCFHT case and 6.4% for the CCF case. Assuming 5.02 = 6.40/ √ x, where xis the number of CCF-based ToF measurements, these accuracy results lead to the need to perform x= 1.6 measurements for each measurement using CCFHT, so it would lead to an effective power consumption of 1.6 · 19.6 µ A = 31.4 µ A, quite higher than the 21.6 µ A achieved using the proposed CCFHT method. As such, it is possible to conclude that the proposed CCFHT-based method is more efficient taking both terms into account, i.e., accuracy and computational burden. In terms of accuracy, the proposed sensor presents similar results compared with other previously published works, such as [ 2 , 3 ]. Although these ultrasonic gas flow sensors are focused on higher flow rate applications, they can be compared in the cases of their minimum flow rate, i.e., 10,000 L/h in [ 2 ] and 5000 L/h in [ 3 ]. Thereby, at ambient temperatures and using the six-measurement average required by the standard, [ 2 ] achieves an accuracy of 0.48% at 10,000 L/h, whereas the proposed sensor achieves 0.49% at 7200 L/h. Similarly, [ 3 ] presents an accuracy of 0.81% at 5000 L/h, and the proposed sensor achieves 0.41% at the same flow rate. Additionally, the proposed sensor is implemented using a cost-effective and high-energy efficiency solution compared with other works, which are implemented using power-hungry devices, as a FPGA in [ 2 ] or an external computer in [ 3 ]. Finally, a comparison in terms of accuracy with an ultrasonic gas flow sensor in a similar flow range [ 1 ] is presented in Table 5, showing the accuracy results for the flow rates given by [ 1 ]. In general, [ 1 ] achieves a better accuracy at low flow rates and a worse accuracy
Sensors 2022,22, 9912 21 of 23 at high flow rates, although both sensors fully comply with the standard requirements. However, note that [ 1 ] does not provide results in terms of flow measurement drift for different temperatures or in terms of energy consumption. Additionally, regarding zeroflow drift, [ 1 ] presents an error of ± 5 ns, which is higher than the ± 0.7 ns achieved in this work and reported in Section 2.2.3. Table 5. Accuracy results comparison. 40 L/h 1440–1600 L/h 4000 L/h Proposed work 2.04% 0.33 0.41% [1] 1.67% 1.09% 0.74% 4. Conclusions A fully designed ultrasonic cross-correlation based gas flow sensor has been presented in this paper. All the sensor design stages (at the mechanical, electronic, and signal-processing levels) have been developed and experimentally validated, obtaining an accuracy performance that completely fulfills the standard requirements. The proposed sensor has been optimized in terms of accuracy and power consumption by the analysis, validation, and integration of each design part. This optimization has been performed with regard to the selection of the mechanical dimensions and materials of the pipe, the piezoelectric transducers and their configuration, the electronics hardware, and the ToF detection algorithm based on the implementation of the cross-correlation of the received signals using the Hilbert Transform. As a result, the proposed sensor is placed into the state of the art of ultrasonic gas flow sensors in terms of accuracy, and it provides additional features when compared with most of the previously published works, such as lower power consumption and hardware complexity minimization. Additionally, by exploiting this enhanced accuracy, the measurement of the absolute ToFs can be used to compensate for the errors caused by temperature variations in a future implementation. The presented enhancement in terms of accuracy and energy consumption, with its low-cost and lowmaintenance features, lead the proposed sensor to be considered as a competitive solution to be integrated into smart IoT sensor networks. Author Contributions: Conceptualization, R.G.C. and J.R.G.O.; methodology, J.R.G.O. and F.M.C.; software, A.S.R. and D.N.M.; validation, A.S.R. and D.N.M.; formal analysis, J.R.G.O. and F.M.C.; investigation, J.R.G.O., A.S.R. and D.N.M.; resources, R.G.C. and J.R.G.O.; data curation, A.S.R. and D.N.M.; writing—original draft preparation, J.R.G.O.; writing—review and editing, J.R.G.O. and F.M.C.; visualization, R.G.C., A.S.R. and D.N.M.; supervision, R.G.C.; project administration, J.R.G.O.; funding acquisition, J.R.G.O. and R.G.C. All authors have read and agreed to the published version of the manuscript. Funding: This research and the APC were funded by the Andalusian Regional Government and the European Commission, grant number PY20 RE 012 AICIA. Institutional Review Board Statement: Not applicable. Informed Consent Statement: Not applicable. Data Availability Statement: Not applicable. Conflicts of Interest: The authors declare no conflict of interest. References 1. Chen, J.; Zhang, K.; Wang, L.; Yang, M. Design of a High Precision Ultrasonic Gas Flowmeter. Sensors 2020,20, 4804. [CrossRef] 2. Jiang, Y.; Wang, B.; Li, X.; Liu, D.; Wang, Y.; Huang, Z. A Model-Based Hybrid Ultrasonic Gas Flowmeter. IEEE Sens. J. 2018 ,18, 4443–4452. [CrossRef] 3. Jiang, Y.; Wang, B.; Huang, Z.; Ji, H.; Li, H.; Li, X. A Model-Based Transit-Time Ultrasonic Gas Flowrate Measurement Method. IEEE Trans. Instrum. Meas. 2017,66, 879–887. [CrossRef]
Sensors 2022,22, 9912 22 of 23 4. Baker, R.C. Flow Measurement Handbook: Industrial Designs, Operating Principles, Performance, and Applications, 2nd ed.; Cambridge University Press: New York, NY, USA, 2016; pp. 419–483. 5. Ahmed, A.; Kleiner, M.; Rocoules. Model-Based Interoperability IoT Hub for the Supervision of Smart Gas Distribution Networks. IEEE Syst. J. 2019,13, 1526–1533. [CrossRef] 6. Elsisi, M.; Mahmoud, K.; Lehtonen, M.; Darwish, M.M.F. Reliable Industry 4.0 Based on Machine Learning and IoT for Analyzing, Monitoring, and Securing Smart Meters. Sensors 2021,21, 487. [CrossRef] 7. Wanasinghe, T.R.; Gosine, R.G.; James, L.A.; Mann, G.K.I.; Silva, O.; Warrian, P.J. The Internet of Things in the Oil and Gas Industry: A Systematic Review. IEEE Internet Things J. 2020,7, 8654–8663. [CrossRef] 8. Saavedra, E.; Mascaraque, L.; Calderon, G.; Campo, G.; Santamaria, A. The Smart Meter Challenge: Feasibility of Autonomous Indoor IoT Devices Depending on Its Energy Harvesting Source and IoT Wireless Technology. Sensors 2021 ,21, 7433. [CrossRef] 9. Yu, Y.; Hao, Z.; Li, G.; Liu, Y.; Yang, R.; Liu, H. Optimal search mapping among sensors in heterogeneous smart homes. Math. Biosci. Eng. 2023,20, 1960–1980. [CrossRef] 10. Chen, H.; Miao, F.; Chen, Y.; Xiong, Y.; Chen, T. A Hyperspectral Image Classification Method Using Multifeature Vectors and Optimized KELM. IEEE J. Sel. Top. Appl. Earth Observ. 2021,14, 2781–2795. [CrossRef] 11. Zhao, H.; Liu, J.; Chen, H.; Chen, J.; Li, Y.; Xu, J.; Deng, W. Intelligent Diagnosis Using Continuous Wavelet Transform and Gauss Convolutional Deep Belief Network. IEEE Trans. Reliab. 2022,1, 1–11. [CrossRef] 12. Li, L.; Hu, Y.; Dong, J.; Wu, Q.; Hu, T.; Zhu, F. A novel differential time-of-flight algorithm for high-precision ultrasonic gas flow measurement. J. Instrum. 2022,17, P05019. [CrossRef] 13. Blackstock, D.T. Fundamentals of Physical Acoustics, 1st ed.; Wiley-Interscience: New York, NY, USA, 2000; pp. 32–35. 14. Saad, M.M.; Bleakley, C.J.; Dobson, S. Robust High-Accuracy Ultrasonic Range Measurement System. IEEE Trans. Instrum. Meas. 2011,60, 3334–3341. [CrossRef] 15. Queiros, R.; Girao, P.S.; Cruz Serra, A. Cross-Correlation and Sine-Fitting Techniques for High-Resolution Ultrasonic Ranging. IEEE Trans. Instrum. Meas. 2010,59, 3227–3236. [CrossRef] 16. Mandard, E.; Kouame, D.; Battault, R.; Remenieras, J.P.; Patat, F. Methodology for Developing a High-Precision Ultrasound Flowmeter and Fluid Velocity Profile Reconstruction. IEEE Trans. Ultrason. Ferroelectr. Freq. Control 2008 ,55, 161–172. [CrossRef] 17. Ofuchi, C.Y.; Coutinho, F.R.; Neves, F.; Ramos de Arruda, L.V.; Morales, R.E.M. Evaluation of an Extended Autocorrelation Phase Estimator for Ultrasonic Velocity Profiles Using Nondestructive Testing Systems. Sensors 2016,16, 1250. [CrossRef] 18. Khyam, M.O.; Ge, S.S.; Li, X.; Pickering, M.R. Highly Accurate Time-of-Flight Measurement Technique Based on Phase-Correlation for Ultrasonic Ranging. IEEE Sens. J. 2017,17, 434–443. [CrossRef] 19. Jin, N.; Zhou, Y.; Liang, X.; Wang, D.; Zhai, L.; Wei, J. Flow Measurement of Oil-Water Two-Phase Flow at Low Flow Rate Using the Plug-in Conductance Sensor Array. Sensors 2019,19, 4649. [CrossRef] 20. Ren, R.; Wang, H.; Sun, X.; Quan, H. Design and Implementation of an Ultrasonic Flowmeter Based on the Cross-Correlation Method. Sensors 2022,22, 7470. [CrossRef] 21. Hanus, R. Application of the Hilbert Transform to Measurements of Liquid–Gas Flow Using Gamma Ray Densitometry. Int. J. Multiph. Flow 2015,72, 210–217. [CrossRef] 22. Marple, S.L. Estimating group delay and phase delay via discrete-time “analytic” cross-correlation. IEEE Trans. Signal Process. 1999,47, 2604–2607. [CrossRef] 23. Svilainis, L. Review on Time Delay Estimate Subsample Interpolation in Frequency Domain. IEEE Trans. Ultrason. Ferroelectr. Freq. Control 2019,66, 1691–1698. [CrossRef] [PubMed] 24. Nguyen, T.H.L.; Park, S. Multi-Angle Liquid Flow Measurement Using Ultrasonic Linear Array Transducer. Sensors 2020 ,20, 388. [CrossRef] 25. Fang, Z.; Hu, L.; Mao, K.; Chen, W.; Fu, X. Similarity Judgment-Based Double-Threshold Method for Time-of-Flight Determination in an Ultrasonic Gas Flowmeter. IEEE Trans. Instrum. Meas. 2018,67, 24–32. [CrossRef] 26. Iwanaga, S.; Umekage, Y. Ultrasonic Flowmeter. U.S. Patent 6748811, 15 June 2004. 27. Gu, X.; Cegla, F. The Effect of Internal Pipe Wall Roughness on the Accuracy of Clamp-on Ultrasonic Flowmeters. IEEE Trans. Instrum. Meas. 2019,68, 65–72. [CrossRef] 28. Millán-Blasco, O.; Salazar, J.; Chávez, J.A.; Turó-Peroy, A.; García-Hernández, M.J. Zero-Flow Offset Variation in Ultrasonic Clamp-On Flowmeters Due to Inhomogeneity and Nonlinearity of Pipe Materials. IEEE Trans. Instrum. Meas. 2017 ,66, 2845–2851. [CrossRef] 29. Mahadeva, D.V.; Baker, R.C.; Woodhouse, J. Further Studies of the Accuracy of Clamp-on Transit-Time Ultrasonic Flowmeters for Liquids. IEEE Trans. Instrum. Meas. 2009,58, 1602–1609. [CrossRef] 30. Shi, H.; Kang, X.; He, S.; Meng, T. Study on the Influences of Multiple Parameters with Uncertainty in the Clamp-On Ultrasonic Flowmeter. IEEE Access 2020,8, 183787–183798. [CrossRef] 31. Jager, A.; Unger, A.; Wang, H.; Arnaudov, Y.; Kang, L.; Su, R.; Lines, D.; Ramadas, N.S.; Dixon, S.; Kupnik, M. Ultrasonic Phased Array for sound Drift Compensation in Gas Flow Metering. In Proceedings of the IEEE Ultrasonics Symposium (IUS), Washington, DC, USA, 6–9 September 2017. 32. Bo, Y.; Cao, L.; Yupin, L. Forced oscillation to reduce zero flow error and thermal drift for non-reciprocal operating liquid ultrasonic flow meters. Flow Meas. Instrum. 2011,22, 257–264. [CrossRef]
Sensors 2022,22, 9912 23 of 23 33. Van Deventer, J.; Delsing, J. Apparent transducer non-reciprocity in an ultrasonic flow meter. Ultrasonics 2002 ,40, 403–405. [CrossRef] 34. Zheng, D.; Fu, X.; Yang, Z. Research and realisation of reciprocal electronic circuits for gas ultrasonic flow meter. IET Sci. Meas. Technol. 2017,11, 666–672. [CrossRef] 35. Borg, J.; Johansson, J.; Van Deventer, J.; Delsing, J. Reciprocal Operation of Ultrasonic Transducers: Experimental Results. In Proceedings of the IEEE Ultrasonics Symposium, Vancouver, BC, Canada, 2–6 October 2006. 36. Lunde, P.; Vestrheim, M.; Bø, R.; Smørgrav, S.; Abrahamsen, A.K. Reciprocal operation of ultrasonic flow meters: Criteria and applications. In Proceedings of the IEEE Ultrasonics Symposium, New York, NY, USA, 28–31 October 2007. 37. Suñol, F.; Ochoa, D.A.; Garcia, J.E. High-Precision Time-of-Flight Determination Algorithm for Ultrasonic Flow Measurement. IEEE Trans. Instrum. Meas. 2019,68, 2724–2732. [CrossRef] 38. Zhu, W.J.; Xu, K.J.; Fang, M.; Wang, W.; Shen, Z.W. Mathematical Modeling of Ultrasonic Gas Flow Meter Based on Experimental Data in Three Steps. IEEE Trans. Instrum. Meas. 2016,65, 1726–1738. [CrossRef] 39. Estevez, L.; Hao, C. Ultrasonic sensing of gas flow. Tex. Instrum. White Pap. 2019,1, 1–9. 40. Huang, J.D.; Lee, C.K.; Yeh, C.S.; Wu, W.J.; Lin, C.T. High-Precision Ultrasonic Ranging System Platform Based on Peak-Detected Self-Interference Technique. IEEE Trans. Instrum. Meas. 2011,60, 3775–3780. [CrossRef] 41. Raine, A.B.; Aslam, N.; Underwood, C.P.; Danaher, S. Development of an Ultrasonic Airflow Measurement Device for Ducted Air. Sensors 2015,15, 10705–10722. [CrossRef]