A Microwave Liquid Level Determination Method for Oil and Gas Pipelines

The modeling and design of a complete wireless liquid level determination system within a metallic pipeline is examined. Applications include the oil and gas industry, and propagation within other enclosed environments like tunnels, mines, and airplanes. For the oil and gas well scenario, the liquid level determination is achieved by measuring the delay between the original and the reflected signal by a liquid that could be positioned at the bottom of an oil well. In the design of the proposed system, the propagating mode was selected to be a superposition of the TE21 and the TE31 modes of the overmoded guide as standard pipeline dimensions from the oil and gas industry were employed. The wave velocity for the adopted signal within the guide was also defined and verified by theory, full wave simulations, and measurements. In particular, the excited signals were Gaussian and rectangular pulses. A specific link budget equation was also developed for the 2.4 GHz microwave system and measured successfully using a 2 meter carbon steel pipeline. Based on this link budget equation, which was supported by lab measurements, the maximum depth that can be achieved with the proposed system is 250 meters, and when the stimulated power is 1 kW; this range is mainly defined by the attenuation due to metal along the length of the pipe. Regardless of these factors and to the best knowledge of the authors, no similar microwave liquid level determination system has been developed previously with supporting theory, full-wave simulations, and measurements for propagation within industry standard oil and gas wells.


I. INTRODUCTION
T HE importance of technology development and the need for continuous advances within the oil and gas industry has been explored by engineers around the world [1], [2]. The work described here is focused on a novel method of applying microwave technology to monitor and determine the condition of fluids found in subsurface oil and gas wells.
The proposed fluid level determination measurement can assist in the productivity of well operations and the identification of the well flow rate capacity, for example. Furthermore this solution can offer identification of any faulty flow valve positions for gas-lift operations, as well as, the optimization for the speed, size, and location of submersible pumps for fluid extraction [3]. Moreover, it would help to understand the hydraulic horsepower required to lift fluid, the efficacy of packer placement (an isolation device placed into the wellbore), and, provide monitoring of the overall change in reservoir conditions. This then offers a better understanding of the pressure flow relations over the production life-cycle of the well [1], [3].
The first attempts to measure the subsurface conditions of oil and gas wells were conducted around the early 1920s. This was followed by advances which lead to evaluations of the hydrocarbon fluid composition and liquid levels, and some of these studies included wired pressure gauges which ran to the bottom of oil wells [1], [4]. It should be mentioned that these electrically connected methods for acquiring well data and installing the pressure control safety equipment are historically expensive and operationally time consuming [1], [4].
In order to overcome these challenges, oilfield operators have further developed many different types of measure-FIGURE 1: System schematic (a) and experimental test setup (b) for proof-of-concept of the proposed microwave ranging system. ment tools and techniques to obtain specific well production data. This has, also, allowed for gathering more accurate measurements for liquid level determinations. Some of the these early advancements led to the development of acoustic sensor measurements and echo-meters [1] which record the liquid level by using pressure waves which are generated by a compressed gas source and operate in the acoustic frequency range. These acoustic based methods provide the basis for calculating the liquid level, inferred from the travel time of the returning sound waves transmitted from the wellhead to the liquid interface. These measurement approaches therefore make use of the acoustic-wave velocities [1], [5] and the time of flight within such systems.
Liquid level determination approaches further developed into sonic metering systems and these also relied on acoustic waves. In general, the application of acoustical methods at the kHz range of frequencies to determine the liquid levels in oil and gas wells have been the most widely deployed techniques [6]- [8]. The disadvantage of these systems is that they can be bulky to deploy and generally require operators to be on-site to install the temporary equipment and manage the safety of the pressure controls at the wellhead.
Some other issues that can occur when completing such acoustic signal analysis are related to the possible measurement errors in practice. This is due to the mechanical noise inside the annulus region and the variations in signal velocity. Parameters such as the vibrations of the tubing, acoustic noise interference of the pump, and disturbances in the an- Acoustic [6] - [15] kHz Medium High High Acoustical Proposed 2.4 GHz High Medium Medium/High ISM nular casing structure can also cause unwanted noise at the receiver [9]. For these reasons, these acoustic methods, have continuously evolved and generally require advanced signal processing procedures for reliable data interpretation [6]- [15]. To overcome these issues the authors in [10] managed to improve the signal to noise ratio (SNR) by using some signal processing algorithms which included high-pass filtering and short-Fourier transforms applied to the reflected acoustic signals. However, when implementing these fiber-optics based sensor systems [14], [15], expensive cabling was required to be installed downhole which can further complicate the essential production measurements in practice.
To overcome these challenges, this paper reports on an alternative wireless-based method for liquid depth determination using microwave and antenna engineering principles as well as the supporting signal processing methodologies. Briefly the proposed system operates as follows. A signal is excited by an antenna which is installed in a mechanical housing and placed adjacent to a rectangular slot at the exterior face of the outer pipeline core (see Fig. 1). The signal is reflected from the liquid at a depth, d and returns to the antenna where the distance to the fluid level can then be calculated. For the experimental laboratory setup, the top face of the water level is about 5.5 cm above the bottom of the pipeline. The proposed technique can reduce some of the operational safety hazards by eliminating the need for compressed gases as typically required with acoustic depth level measurements in wells. Furthermore, the proposed technique offers a compact, low-cost, and continuous or routine method for monitoring the wells liquid depth and thus assisting with hydrocarbon extraction productivity.
Basically the proposed microwave approach examined in this paper reports on a proof-of-concept demonstrator for such depth ranging. Fundamentally the system offers instantaneous liquid level determination, using an electromagnetic wave which is transmitted from the surface of the wellhead, and then, the reflected signal returned from the liquidlevel interface (within the well) is measured. The signal is transmitted into the well bore via microwave circuits and an antenna, and these components are placed into a covered compartment at the inlet flange of the wellhead, similar to an antenna radome allowing for the propagation of electromagnetic waves. This mechanical housing enclosing the circuit and antenna is of key importance to protect the hardware from pipeline gas flow erosion. Also, this radome protection housing makes the microwave system more universally adaptable for utilization in standard pipeline dimensions and in other industry related configurations.
In the proposed method the electromagnetic propagation within a conventional oilfield pipeline is evaluated. More specifically, in the annulus (or outer pipe wall) of a concentric metallic pipeline configuration. This is basically a coaxial waveguide structure and is used to guide the signal. This mechanical pipe configuration is typical in oil and gas industry wells and consists of an inner circular pipe and an outer pipe which are installed concentrically. This arrangement provides an outer casing to resist mechanical collapse and protection from the surrounding rock layers. Also, it creates an annulus between the pipes to protect the structures from corrosion whilst supporting the integrity of the inner production tubing. This leads to a coaxial arrangement of the pipes. This same method also has been successfully applied and functionally tested over a single layer of standard cylindrical tubing [16].
For these reasons, the pipe dimensions selected for the studies herein were chosen from commercially available pipeline tubing sizes. This also ensures the mechanical compatibility with industry standard pipelines. Also, given the large diameter of the pipeline (i.e. industry standard) and the adopted feeding technique (of placing the 2.4 GHz compact antenna into the external housing, see Fig. 1a), several challenging electromagnetic engineering problems arise as higher order modes are excited, which is not conventional for microwave waveguides. Also, more standard (and nondirective) guide excitation techniques such as a vertical probe or loop feed [17], [18] are not practical for the intended oil and gas system, as they can perturb or interfere with the gas flow which is generally unwanted. For all these reasons, a directive and low-profile antenna configuration (within a radome housing) was adopted and experimentally tested defining the novel feeding arrangement.
In Table 1 the widely used liquid level determination methods are compared with the proposed system in terms of some qualitative characteristics such as the performance, the complexity and the safety. As it was already mentioned, the performance and reliability of previous acoustic methods (and without the use of the applied signal processing techniques) is low as there is a significant level of mechanical noise in the annulus region and the range depth error can be high [9]. On the other hand, the estimated error for our proposed microwave ranging approach is around 0.5% for certain system settings and transmit signals (see Subsection V-B). Moreover, the proposed system allows for a more simplified wellhead installation, by implementation of the proposed mechanical antenna housing. This is because this housing can eliminate the complexity and cost of more conventional cable-based and acoustical systems which can be time and labor intensive requiring additional personnel to be on-site during the installation and operation [6]- [8].
In terms of safety, both the acoustic approach and the proposed microwave method need to closely consider the associated operational risk and exposure to its operators. For example, the acoustic-based ranging methods generally use compressed gas cylinders as a pressure source, while the pro-posed microwave system uses an RF power source. Therefore due consideration and safety measures must be adopted, and with the specific safety procedures and protocols in mind, when operating within such oil and gas scenarios [19].
The paper is divided into four parts. The first part defines the coaxial waveguide characteristics such as the relevant dimensions, the filling material, the material defining the guide, and an overview of the relevant microwave theory as applied to the pipeline. Parameters such as the excited modes, the conductor losses, and the group velocity are examined in Section II by numerical calculations and verified using full-wave simulations employing a commercial electromagnetic (EM) software solver. In the second part of the paper liquid level determination for three different liquids (water, sea water and oil) is presented in Section III, at 400 MHz. In this initial unimodal propagation study, parameters such as the travelling time, distance and power loss are better understood. Mainly, in an effort to exclude the more complicated scenario of multi-mode propagation. Finally, a basic link budget equation is presented based on the reflection coefficient of the waveguide source. The operation of the system is further studied in the third part of the paper, when an end-fire microstrip-based planar antenna is positioned into the radome housing acting as the source for the system. Also, the excited EM field, and the signal velocity are defined in Section IV by studying the impulse response.
In the final part of the paper, the proof-of-concept system demonstrator to determine liquid levels is presented. In particular, the reflectometry (instrumentation and microwave circuit) system as well as the results from two different kinds of excited pulses are explored in Section V. Finally, a link budget equation is developed for the calculation of the maximum depth that can be achieved for the system. A short discussion and conclusion follows as well as an appendix section which provides a theoretical foundation for the power flow within the pipeline which is needed to characterize the losses for each mode. To the best knowledge of the authors, no similar liquid level determination system using microwaves has been reported previously in the open literature as well as the supporting theoretical treatment. All these findings are also supported by full-wave EM simulations and laboratory measurements.

II. PIPELINE SYSTEM AND MODELING
The proposed system can be further described as follows. The EM wave is transmitted and propagates into the annular waveguide space formed by the well conduit. When the signal reaches the reflection boundary at the segregated liquid interface (representing an equivalent electrical short circuit), the wave is then reflected from the boundary and received back at the surface of the well (using the same antenna as for signal transmission). The propagation time of flight for the signal is then processed and analyzed to determine the liquid level depth (i.e. the physical distance from the wellhead antenna to the liquid interface depth). For the paper, the fluid interface shall be assumed to be water or an under-saturated VOLUME 4, 2016 hydrocarbon liquid phase mixture which is representative of most oil and gas wells [13]. Also, in the design and test of such a microwave system, a link budget equation and a reflectometry analysis of the time-domain signals are needed to define the propagation characteristics of the microwave signal, and thus, are fully defined in the following.
To start the modeling of the system, the oil and gas pipeline can be treated as a coaxial metallic waveguide. The propagating environment is defined by the dimensions, the structure, the materials and the conditions under which the waveguide operates. Thus, it is analyzed by the possible modes, the conductor losses, the group velocity, the electromagnetic field and the power flow through the waveguide, at the operational frequency which was selected to be 2.4 GHz for the system demonstrator. This is because there is an abundance of lowcost commercially available RF devices which operate at 2.4 GHz (ISM band) and this inherently will reduce the system implementation costs and the complexity of any licensing requirements when deploying the system for any practical oil and gas pipelines.

A. SELECTED PIPELINE CHARACTERISTICS AND FILLING MATERIAL
The selected coaxial waveguide size used as a basis for this study was defined by the available downhole well geometry, in particular, these are typical dimensions for oil and gas pipeline tubing. The inner radius (r 2 ) of the chosen pipeline is 69.85 mm (or 0.525λ 0 at 2.4 GHz) and wall thickness t = 10 mm (or 0.08λ 0 at 2.4 GHz), and where λ 0 represents the free-space wavelength. The external radius (r 1 ) is 136.525 mm (or 1.0925λ 0 at 2.4 GHz) and the wall thickness is the same as the inner pipe (10 mm). The wall material is AISI 1010 carbon steel, and its chemical composition can be found in [18]. Considering the electrical properties, the conductivity (σ) and the relative magnetic permeability (µ r ) of carbon steel 1010 is 6.993 × 10 6 S/m and 100, respectively [21], [22].
During oil and gas production periods, essentially when the well is operating under hydrocarbon flowing conditions, the pipeline contains a multi-phase mixture (defined by combinations of gas, oil and water [23]). This allows for a full range of possible chemical compositions making it too broad to describe for all gas flow production situations in this paper. Therefore a representative and simplified model for the gas flow was adopted herin. Actually, methane (i.e. C 2 H 4 , natural gas) is considered to flow inside most pipelines (and in the coaxial, annulus region), and thus can define the production fluid inside the well bore. Also, in our work, we are assuming the methane mixture to be in a gaseous phase at the oil/gas well pressure and temperature conditions which is typical. Therefore for the presented theoretical calculations, full-wave simulations as well as the measurements, in this section, the representative filling material inside the pipeline was considered to be air [3], i.e. the relative permittivity ( r ) and permeability (µ r ) was taken equal to 1.

B. MODAL ANALYSIS
The coaxial waveguide can support TE and TM waveguide modes in addition to the TEM mode. This transverse electromagnetic or TEM-mode is the dominant mode in a coaxial guide (here λ g = λ 0 is defined as the guide wavelength for the dominant TEM mode). The operational frequency for the demonstrator has already been identified at 2.4 GHz, so every mode which has its cutoff frequency over this threshold does not propagate. In general, the cutoff frequency for the higher order modes are as follows from [18]: for TE m1 modes, when m > 0 for TE mn modes, when n > 1 and for TM mn modes. Here m ∈ N 0 , and n ∈ N , for both types of modes and µ 0 and 0 are the magnetic permeability and the electric permittivity of the free space, respectively. As χ mn is symbolized by the n st non-vanishing root of the m thorder Bessel-Neumann Combination Function, Z m α b χ mn , and as χ mn for the n st non-vanishing root of the derivative of the m th -order Bessel-Neumann Combination Function, Z m α b χ mn . The walls of the waveguides are metallic, that means they are imperfect conductors and thus there is power loss during signal propagation down the pipe. The conductor losses can be computed by the attenuation constant, α c . This constant is the ratio of power loss per unit length (P ) by considering the power flow (P 0 ) and its units are in Np/m [17]. Results for the determination of α c are outlined below: (4), (5), (6) and our findings are consistent with [18]. The analytical expressions of P and P 0 for each mode (TEM, TE and TM) are required in this α c calculation and are further defined in the Appendix. Also, the analytical expressions for the attenuation constants (4), (5), (6) for the TEM, TE, and TM modes are outlined respectively, below considering coaxial waveguide as they are given by [18]: The R s1 and R s2 terms are the characteristic resistance of the outer and inner conductors respectively, which are defined by ωµc 2σ [17] where ω is the angular frequency and here µ c is referred to the permeability of the conductor. Also, ζ is defined as the intrinsic impedance of the medium and it is equal to µ .
In a waveguide each propagating mode also has its own group velocity which is given by υ g = cβ k , where c is the speed of light (2.998 × 10 8 m/sec) and β is defined as the phase constant which is given by β = k 2 − k 2 c . Here k c is the cutoff wavenumber and k = ω √ µ , for all modes [15]. The cutoff wavenumber, in a coaxial waveguide is given by for the TE mn modes, when n > 1, and, k c = for the TM mn modes [17], [18]. Following these definitions, the group velocities can be defined as follows: for TE m1 modes, when m > 0, and for TE mn modes, when n > 1, and for TM mn modes. The group velocity of the TEM mode is equal to the speed of light, i.e. 2.998 × 10 8 m/sec [17].

Liquid
Liquid FIGURE 2: Illustration of the simulation setup for initial liquid level determination for single mode operation within the pipe.
As described previously the medium within the pipe has the electromagnetic properties of vacuum (or air), and the metallic walls are made from carbon steel 1010. Given these conditions, calculated cutoff frequencies, the attenuation constants, and the group velocities considering the defined coaxial waveguide are outlined in Table 2. Also, all the numerical findings in Table 2 are verified by full-wave simulations and results are in agreement. The simulated setup is illustrated in Fig. 2. In the settings of the waveguide port within CST, selective or all possible modes can be excited and monitored. Basically, parameters such as the cutoff frequencies and the attenuation constants can be simulated and then examined for the desired mode.

III. LIQUID LEVEL DETERMINATION CONSIDERING THE DOMINANT TEM MODE
As an initial study of the proposed liquid level system, a simulation model was developed considering a coaxial carbon steel 1010 waveguide with radii 69.85 mm and 136.525 mm for unimodal propagation. Mainly, in an effort to better understand this basic situation and to simply the more complicated scenario of multi-mode propagation.
Basically, this study helps to provide a better understanding of the reflections of the stimulated signal related to the various liquid types, and also, the velocity of the propagating signal throughout its traveling time whilst providing comparisons to the group velocity for the TEM mode. In this study the signal was excited by a waveguide port as illustrated in Fig. 2. More specifically, a Gaussian pulse was excited by a waveguide port for propagation within the coaxial waveguide (outer pipe region, see Fig. 1). The signal was reflected from the liquid boundary layer and the waveguide port captured the returning signal. Additionally, the results from these findings are developed into an initial link budget equation which was the basis for the final link budget equation for the proposed system explained later on in the paper.
To verify the methodology, whilst considering single mode operation for the pipe, the excited and the reflected signals for three different liquids were studied: water, sea water, and a hydrocarbon lubricating oil (see Table 3 [25], [26]

A. TRAVELING TIME OF THE SIGNAL
The excited signal is a Gaussian pulse which can be described [27], where σ is the standard deviation with a value of 0.8518 and µ is the mean of the distribution with a value with 4.4324, in this case (see Fig. 3). In particular, the chosen bandwidth to be simulated was from 0 to 400 MHz. Also the time domain signal was defined from 0 to 9 ns.
The excited Gaussian pulse and the reflected pulses by the water, the sea water, and the liquid oil samples are reported in Fig. 3. Also, in this figure, the power of the pulse was normalized. The reflected power has negative power values because it is accepted by the waveguide port and magnitude values are both about 0.8 for the water and 0.9 for the sea water case as it has greater conductivity (see Table 3). This suggests a modest absorption of power into liquid. On the other hand, oil appears to have more adsorbing properties. Regardless, the time difference (∆t) between the excited pulse and the reflected pulse is 6.69 ns and represents the total travel time of the signal; i.e. the forward and backward paths.
Based on the group velocity (υ g ) of the TEM mode (2.998 × 10 8 m/sec) and the traveling time (∆t), the total distance traveled can be calculated. In this basic simulation study, it is known to be 2 m (since the length of the physical pipe is 1 m). Hence, the distance between the excitation and the liquid level was 1 m as the velocity of the signal is constant within the unimodal pipeline as the TEM mode is dominant. Also it is important to note that the traveling time of the signal is independent from the liquid type contained at the bottom of the pipeline. This is because the traveling time is dependent on the group velocity of the dominant propagating mode (TEM here) and therefore defined by the environmental conditions of the pipeline (air-filled in this study case).

B. LINK BUDGET EQUATION OF THE SYSTEM
Following the findings in the previous sub-section whilst considering unimodal operation, a link budget equation can be defined for the proposed microwave system. Firstly, the attenuation constant of the TEM mode is 0.056 dB/m at 400 MHz considering the parameters of the pipe. Also, the volume loss in the liquid (L Liquid ) due to the incident and reflection waves onto it, can be calculated as a percentage with respect to the stimulated power at transmit which was set at 0.5 W. The percentage values of L Liquid at 400 MHz, for each liquid are presented in Table 3. Moreover, the reflection coefficient (| S 11 |) of the applied waveguide port in each case is presented in Table 3. The waveguide port in this simulated system acts as transceiver and therefore the reflection coefficient is described by the metallic losses (2 × α c × d), the volume losses from the liquid (L Liquid ), the outgoing power from the system minus the stimulated power (P stim ) and the reflected power by the system, which includes the reflection of the liquid. Without loss of generality, the link budget equation for this system can be given by where P Rx is the received power by the waveguide port. From Table 3, it can be observed that the volume loss in sea water is greater than the loss in water. Nevertheless, the reflection coefficient of the waveguide port when the sea water is considered is lower in absolute value. This is because the electrical conductivity of sea water is greater than that of water, thus the reflected power is greater (see Fig. 3). On the other hand, the electrical conductivity of the hydrocarbon lubricating oil is zero, therefore the reflected signal back to the waveguide port is quite low, i.e., the reflection coefficient value is below -10 dB (see Fig. 4) suggesting that the majority of the power was absorbed.

IV. PLANAR ANTENNA DESIGN & PROPAGATION MODELING
In this section the pipeline is studied when an end-fire antenna is employed as its waveguide source. Also, a mechanical housing mandrel which protects the antenna and any electronic components from the well environment and gas flow is presented. The parameters which are analyzed here are the propagating mode, and the power flow inside the annulus. Moreover, the impulse response of this enclosed environment is examined when an identical mandrel is included in the system defining the receiver.

A. ANTENNA SELECTION AND RADOME HOUSING
The selection of the optimal antenna design for directive field propagation inside the pipeline is important for operation of the proposed microwave reflection system. Most importantly, the antenna must fit inside the constraints imposed by the built-in housing and operate effectively at 2.4 GHz. For the aforesaid reasons a compact planar Yagi-Uda printed circuit board (PCB) antenna was designed and optimized using the commercial full-wave simulation tool CST. This antenna (Fig. 5) uses microstrip technology and consists of the feed line, the driven element, the director and the ground plane as in [28]. The selected substrate is Rogers RT6010 with a relative dielectric constant of r = 10.2, a loss tangent of tanδ = 0.0023, its thickness is 1.27 mm, and the major PCB dimensions are 75 mm × 60 mm. It should also be mentioned that the antenna displayed good operational characteristics in a free-space environment as the reflection coefficient is below -13 dB at 2.4 GHz, maintaining a gain higher than 6 dBi. Also, the front to back ratio is close to 19 dB (all results not reported for brevity). The advantage of using an end-fire antenna rather than a more conventional waveguide excitation technique is that the majority of the power flows in the desired forward direction with higher intensity due the element directivity. This is important as the antenna could be positioned in practice (within a real oil and gas pipeline and possibly positioned at a certain depth below the surface) to monitor the reflected signal from a liquid interface, and as such, it is desired to ensure uni-directional propagation down the pipe.
In an operational oil and gas flow system, the antenna and the electronic components can be exposed to high temperatures and pressures, and may be damaged, due to the surrounding pipeline contents and the erosion from production fluid flow [3]. For this reason the creation of a sealed antenna housing; i.e. an effective radome cover will be required to provide a suitable protective environmental enclosure. Figures 5 and 6 show the concept of the mechanical housing mandrel (see also Fig. 1) which has been constructed from aluminum and employs a feed through at its edge so that the antenna can be connected with a coaxial cable for experimental testing of the prototype.
This housing contains a 1.2 meters long ramp, its maximum height is 0.05 meters and its width is 0.068 meters. Also, the housing is placed on the top of a 2 m piece of the outer pipe and between them there is an acrylic sheet (see Fig.  5). The electromagnetic wave propagates through the acrylic sheet and the filling gas material in the pipeline can flow normally whilst the antenna is protected. The relative dielectric constant ( r ) of the acrylic sheet being used is 3. Also, the antenna is polarised horizontally (as it is end-fire) and its position within the housing has been optimized for minimal reflections and maximum coupling into the pipeline. More specifically, the antenna is placed parallel to the acrylic sheet. This allows the applied power to couple into the pipeline structure with gradual injection occurring due to the long ramp inside the housing which leads to signal propagation into the outer pipe.

B. FIELD ROUTING WITHIN THE PIPE
At this initial stage in the system development, it is also important to understand how the EM fields propagate when the directive antenna is mated within its mechanical housing and the pipeline structure itself. This was accomplished by studying the field lines and the power flow along the pipeline by the simulations as described in this section. In CST the PCB end-fire Yagi-Uda antenna was placed into the mechanical housing which was then placed on the top of the outer pipeline section (see Fig. 5), defining the excitation source for the system. At the other edge of the coax pipe a waveguide port was placed. The waveguide port was setup to excite all the possible modes and monitoring of the S-parameters for each mode was completed separately. This full-wave simulation was able to ascertain which modes where mainly excited, and this was studied by investigating the relative powers for each mode.
The results comparing the relative powers for each mode can be observed in Table 4. Here the transmission coefficient (| S 21 |) represents the coupling into each mode from the driven antenna. Based on these results the dominant modes are the TE 21 and TE 31 modes as insertion loss values are minimum. This implies that the majority of power from the antenna housing excitation is coupled into the TE 21 and TE 31 modes of the coaxial pipeline. This is because | S 21 | values are about -8 dB, while all the other powers diverted into the other modes are about -12 dB or below. Also, as reported in Fig. 6, the electric field distribution generated by the antenna (in the housing) diverts into different modes within the coaxial waveguide region. More specifically, as it can be observed in Fig. 7, the electric field in the pipeline is mainly a superposition of the TE 21 and TE 31 modes. For comparison also, the ideal electric field lines of the TE 21 and TE 31 modes can be found in [18] (see page 79) which are consistent with the simulations as shown in Fig. 7. The values of the electric fields in the Figs. 6 and 7 range from 4.43265 × 10 7 V/m (blue colour) to 321.222 V/m (red colour).

C. IMPULSE RESPONSE AND SYSTEM S-PARAMETERS
The calculation of the impulse response requires a bidirectional communications system using a second mandrel (see Fig. 8). This investigation is important as it can characterize the group velocity of the propagating fields within the pipeline, and this can also provide indication of the fields and modes within the waveguide. Basically, in this study, two identical coaxial carbon steel 1010 pipes with the antenna housings installed on the pipe outer walls define the bidirectional transceiver system under test. Also, two identical Yagi-Uda based PCB antennas were placed into the housings and separated, by a distance d = 3.8 m apart. To avoid power radiation leakage outside of the test bed, absorbers were placed at the ends of the pipes during lab measurements. This emulated a more representative oil and gas scenario where the enclosed pipeline boundary is a longer overall length. The S-Parameters of the system were then measured using a S5048 2-Port vector network analyzer (VNA) by Copper Mountain Technologies (see Fig. 9). The reflection coefficients of the antennas (| S 11 |) and (| S 22 |) in dB for the frequency range from 2.35 to 2.45 GHz, demonstrate good matching (with values below -10 dB) and agreement is observed with the full-wave simulations. It should be mentioned that, since the use of the mechanical antenna housings form a boundary with the coaxial pipeline, the reflection coefficients at the antenna ports are not adversely affected by the pipeline length, and maintain a good performance at 2.4 GHz. Also,    the transmission coefficients values, (| S 21 |) and (| S 12 |) were observed to be around -12.5 dB. It should be mentioned that the reflection coefficient of the antenna (| S 11 |) when only one of the pipe sections is simulated is presented in Fig. 9 and results show good agreement with the measured reflection coefficient. Due to the large EM simulation model required, the complete two-port system could not be simulated in full.
Additionally, the normalised impulse response (h(t)) of the system was measured (see Fig. 10). The time difference between the transmitted signal and the impulse response is 14.59 ns. The distance (d) between the transmitter and the receiver antenna is 3.8 m. Therefore the velocity (υ) of the signal can be calculated, based on the expression υ = d ∆t = 2.605 × 10 8 m/sec. It can observed that the velocity of the system is between the group velocities of the TE 21 and TE 31 modes, based on Table 2. These results provide further justification that the dominant modes were indeed the TE 21 and TE 31 modes as previously mentioned.

V. LIQUID LEVEL DETERMINATION TESTING
In this section the experimental testing of the proposed system (see Fig. 1) is presented. Firstly, the reflectometry system is defined (see Figs. 11 and 12) as well as the excited Gaussian and rectangular pulse signals (see Figs. 13 and 14). Secondly, a manual calibration is also described where the delay due to the electronics circuits between the original and the reflected signals is determined and thus subtracted from the measurements (see Fig. 15). Also, experimental results for the proof-of-concept system are presented, in particular, the reflected signal in comparison to the transmitted (see Figs. 16 and 17). Both pulse types are examined and the distance between the source and the liquid level is calculated. Following this, the measured reflection coefficient is reported and this is helpful for understanding the signal response and for the development of a link budget for longer pipeline scenarios.

A. EXCITED SIGNALS, CALIBRATIONS, & THE REFLECTOMETRY SYSTEM
The signals that are excited in this experiment are Gaussian and a rectangular pulse (see Figs. 13 and 14). The Gaussian pulse was described in Section III, however, for this experimental case, the standard deviation (σ) was set to 0.3 and the mean of the distribution (µ) is 2. This ensured a centre frequency of about 2.4 GHz. The pulses were excited by a Keysight MXG N5183B Signal Generator with a stimulated power of 15 dBm and 19 dBm for the Gaussian and the rectangular pulses, respectively. It should also be mentioned that these signals were generated for the developed microwave reflectometry system and then displayed on a Rohde & Schwarz RTO2064 oscilloscope in the time domain and on a Keysight PXA Signal Analyzer (N9030B) in the frequency domain.
It was shown that the PCB Yagi-Uda antenna is narrowband when it was placed inside the mechanical housing (see Fig. 9) However, its performance from 2.35 GHz to 2.45 GHz is as required, especially at about 2.4 GHz (i.e. | S 11 |< −20 dB). Furthermore, the selected pulses are generally narrowband as well. In Figs. 13 and 14 the transmitted Gaussian and the rectangular pulses are reported for various frequency spans. These plots show that the frequency bandwidth occupied by the Gaussian pulse is mainly from 2.3998 to 2.4002 GHz (see Fig. 13b), therefore, the total bandwidth of the signal can be estimated to be 400 kHz centred around 2.4 GHz. In addition, the rectangular pulse has visible harmonics from 2.36 to 2.44 GHz (see Fig. 14a). Also, the bandwidth of the main harmonic at 2.4 GHz is about 200 kHz (see Fig.  14b). As it can been observed the reflected rectangular pulse  is more likely to lead to an error in detection because of the number and amplitude of all the harmonics which occur in a greater bandwidth from about 2.35 GHz to 2.45 GHz whilst having peak amplitudes of about -50 dBm or more. An error estimate study to access these parameters is further described in Subsection V-B.
For the data recording on the oscilloscope the sampling rate was 100 MSa/sec. The reason this high sampling rate was chosen is that a high level of accuracy is required for capturing the time delay which is of order of ns. In a more realistic scenario, where the traveling time and the distance between the antenna and water level are greater, then a reduced sampling rate value would be sufficient. Also, an internal low pass (LP) digital signal processor (DSP) filter was used with a cutoff frequency at 100 kHz. This filter helped to extract the signals to a higher resolution whilst suppressing higher frequency noise. It should also be mentioned that our reflectometer apparatus is similar to the system described in [29] and [30], where it was used for heartbeat detection and respiration for humans.
As for the findings herein reported for the proposed liquid level ranging system, the source signal was excited by the aforementioned signal generator, then connected to a power divider (see Figs. 11 and 12). One output of the divider leads to a power detector and then to a load resistor of 10 kΩ and finally to the oscilloscope. This signal is the original reference signal. The other output of the power divider leads to the second power divider, which at its input receives the reflected signal. Then, through the other output, the signal is led to a power detector and then eventually to the oscilloscope. This is the reflected measurement signal.
The difference in time for these two signals (as they are displayed on the oscilloscope) is related to the relevant time delay for the signal to reach the liquid level and return back to the antenna. From this, the distance traveled by the signal can be calculated. The 87304C Hybrid Power Divider by Hewlett Packard was used. Also, the power detector was a 423A Coaxial Crystal Detector also by Hewlett Packard (see Fig. 11).
It should be mentioned that the reflectometry system is defined by many electronic sub-components and cables. These elements can cause internal reflections and undesired delays. For this reason a manual calibration was performed. For this calibration the antenna was replaced by a short circuit component supplied by Keysight and the delay between the original signal and the reflected signal was measured (see Fig. 15). The absolute values of the reflected signal was plotted to provide a better characterization of the delay from the original signal. From this calibration setup, the delay due to the electronics was observed to be about 0.975 µs and 0.996 µs for the Gaussian and rectangular pulses, respectively.

B. EXPERIMENTAL RESULTS FOR LIQUID LEVEL DETERMINATION
The following results describe the liquid level determination using the developed system demonstrator whilst considering the two different excited signals; i.e. the Gaussian and the rectangular pulses. As mentioned previously, a photograph of the experimental setup is shown in Fig. 1b. It also should be identified that the antenna in Fig. 5 leads to the reflectometry system as shown in Fig. 12.
In this setup the antenna receives the reflected signals due to the combined effects from the electronic components, the metallic parts of the pipeline assembly, the mandrel, and the water interface positioned at the end of the pipe. The reflections from the metallic parts of the antenna and the mandrel are very low power (| S 11 |≈ −10 dB at 2.4 GHz) as Fig. 16a demonstrates. On the other hand, when the water is added at the bottom of the pipe, the reflection coefficient increases (-5.66 dB at 2.4 GHz) as in Fig. 16b. This increased value implies high signal reflection.
The reflected signals and their propagation delays from the original reference singals are demonstrated in Fig. 17, when water is considered at the bottom of the pipe. As discussed previously, these results need to be corrected for the electronic delays recorded from the aforementioned calibration step and thus subtracted from the measurements. Also, for improved comparison of the time delays (corrected and calibrated) for the transmitted and received signals, absolute values are plotted in Fig. 17. Therefore actual measurements suggest that the true delay of the reflected signal (forward and backward path) when water was positioned at the boundary of the pipe is approximately 14.2 ns for the Gaussian pulse and 14.0 ns for the rectangular pulse.
As it is described in Subsection IV-C, the extracted group velocity which was based on the experimental impulse response of the end-to-end system (see Fig. 8) was about 2.605 × 10 8 m/s. Therefore the depth is calculated to be 1.84955 m and 1.8235 m based on the expression d = υ×∆t 2 , for the Gaussian pulse and the rectangular pulse, respectively. However, the actual depth is 1.845 m, i.e. the physical distance from the antenna to the water level. This means that the measured depth range error is 0.455 % and 2.55 % for the Gaussian pulse and the rectangular pulse, respectively. This depth range error is found to be less when the Gaussian pulse is considered, with this measurement being more accurate due to the delayed time comparison as measured from peak to peak. On the other hand, when the rectangular pulse is applied the measured result is less accurate as it is

C. LINK BUDGET ANALYSIS
A link budget, like in common telecommunication systems, can now be developed. Also, all the relevant parameters have been defined and evaluated for the microwave liquid level determination system. The procedure can be described as follows.
The losses in the reflectometer were firstly calculated. Considering that the internal impedance of all the devices and the cables is 50 Ω, the peak voltage of the reflected Gaussian pulse is 0.0613 V. This make the total power of the signal to be given by P = V 2 Z0 = 0.0613 2 50 = 0.075 mW or -11.25 dBm. Additionally, the stimulated power was set to 15 dBm therefore the loss due to the reflectometer and the propagation (forward and back) into the pipe was 26.25 dB. The power loss due to the reflectometer is given when the reflection coefficient of the antenna (i.e. -5.66 dB at 2.4 GHz) is subtracted by the total system loss (26.25 dB). Thus the loss due to the reflectometer (L ref ) is 21.25 dB. As shown previously, the propagating signal is defined by a superposition of the TE 21 and TE 31 modes, therefore the attenuation constant of the system can be assumed to be around 0.15 dB/m based on Table 2. Following this analysis and the parameters defined, a general link budget equation can now be further developed as follows: Also, for the 2 × (d − 1.845) × α c term, the value of 1.845 m is required to be subtracted as it is already included in the | S 11 | parameter. The minimum required stimulating power is -13 dBm. This is because the sensitivity of the oscilloscope was measured to be around -40 dBm. The depth of interest required for liquid level determination is dependent on the prevailing subsurface pressure gradient, for example on lower pressure wells, lift pumps are required to provide artificial assistance to produce the fluids, in which case the hydrostatic liquid level will be found relatively shallow in these scenarios and a depth measurement range of 250 meters can provide useful monitoring data [3]. The proposed application is also very relevant for monitoring the integrity of abandoned wells, where any abnormal rise of hydrostatic pressure may be measured above the cemented isolation barrier plugs, which are set relatively close to the surface. This is particularly relevant for the safe decommissioning of wells. Therefore, the useful depth range can be much shallower than 250 meters which was considered to be a maximum for the above mentioned practical scenarios [3].
Based on (11) estimations can now be completed for real pipelines whilst considering the attenuation constants as in Table 2. For example, for a stimulated power of 60 dBm (or 1 kW), theoretical depths for liquid level determinations are about 250 meters. This considers the minimum received signal level to be -40 dBm which again is defined by the R&S RTO2064 oscilloscope. Should it be required to reduce this source power, a receiver with improved sensitivity is needed; i.e. less than -40 dBm.
Future work can also further assess the impulse source power requirements whilst increasing the receiver range sensitivity. This can improve the practically of a low-cost monitoring system, utilizing less transmit power whist achieving the same range while at the same time employing instrumentation units with higher sensitivity levels; i.e. less than -40 dBm. Reduced losses for a more dedicated reflectometer can also be future design work, mainly in an effort to reduce the 21 dB of insertion losses for the connectorized circuit system (see Fig. 11). The conductor losses are also an important metric which requires significant transmit power levels, however, this practically is defined by the metallic properties of the pipeline itself and cannot be easily adjusted whilst designing for conventional oil and gas scenarios. Regardless, all these considerations and features for possible system improvements can aim to significantly decrease the required instantaneous source power whilst aiming to provide maximum liquid level determination depths of 250 meters.

VI. CONCLUSION
As outlined in the paper, there has not been any previous studies to investigate the feasibility of liquid level determination within oil and gas pipelines whilst considering the use of microwave carrier frequencies. In particular, the current research work, in this paper, targeted the modeling and design of a microwave liquid level determination system, where the transceiver was placed into a metallic pipe used for oil and gas well production, to achieve liquid depth determination in real time. The paper examined the entire microwave measurement system which included the background electromagnetic theory, the antenna design and its effective protective mechanism (i.e. radome), together with the analysis to assess commercially available pipeline geometries. The numerical, simulation, and experimental results demonstrated that the proof-of-concept system can work efficiently at 2.4 GHz (for a multi-mode scenario). Further supporting simulations were also investigated at 400 MHz (considering unimodal operation).
Both scenarios are important to demonstrate alternate system feasibility. For the multi-mode scenario, the dominant propagating mode is a superposition of the TE 21 and the TE 31 modes and this helped when developing the proposed link budget equation. These findings can be applied to similar pipeline systems and help to define the maximum liquid level depth that can be detected. As outlined in the paper, the max-imum depth ranges are limited by the attenuation constant of the metal casings, the transmit powers, the sensitivity of the receiver system, as well as, the type of liquid mixtures contained within the pipe. Final experimental verification was made in the lab using a 4 meter long carbon steel coaxial pipeline, and the propagation characteristics inside this test bed arrangement were experimentally measured. The results were consistent with the numerical calculations and the supporting electromagnetic theory.
In the modeling, simulations, and measurements, the employed signals were Gaussian and rectangular pulses while the following liquid types were considered: water, sea water, and oil. Also, commercially available RF components and simple microwave circuits were used to implement the reflectometry system. It should also be mentioned that future work can entail extending the pipeline length as well as studying different liquid mixtures and composition types while also reducing the required transmit powers and considering different transmit signal types. However, as fully reported in the paper, initial findings of the finite length pipe measurement setup (as developed for the noted lab setting) fully demonstrated the feasibility and accuracy of the proposed microwave approach. Also, to the best knowledge of the authors, no similar liquid level determination system has been reported previously with application to oil and gas well pipelines as well as other similar enclosed environments such as tunnels and mines.

APPENDIX
This Appendix provides a derivation for the TEM, TE and TM power flow equations of a coaxial waveguide and these equations are useful when calculating the attenuation constants, see (4), (5), and (6).
General modal equations are initially defined and expanded upon herein for the coaxial waveguide starting from the preliminary analytical expressions for the possible electromagnetic field components by introducing the complete and full sinusoidal equations and this leads to an analysis of the power flow and attenuation within the coaxial metallic pipeline. More specifically, while (12) and (13) were originally defined in [17] and in [31], respectively, we needed to further develop (14) based on the initial findings from [17], [18], and [31]. As a first step, this is achieved by considering all constants A, B, C and D, thus providing an advancement from [17], [18], and [31].
To start the derivation, the power loss per unit length along the line can be defined by [31] Here, J s is the surface current for the interior surfaces of the coaxial pipe. The derivation of the power loss equations for the coaxial waveguide follows next and when cylindrical coordinates are adopted. For the TEM modes the power loss is given by (15). Moreover for the TE mn mode the power loss is given by (16). Also, when applying boundary conditions a relation between C and D can be derived and is given by CJ m (k c r 1 ) + DY m (k c r 1 ) = 0 CJ m (k c r 2 ) + DY m (k c r 2 ) = 0 ⇒ (22) where, Also, (16) can be written as in (17). Following the same procedure, the power loss for the TM mn modes is given by (18), but here, because of the boundaries conditions, The power flow is defined as function of the Poynting vector (S) by the general expression P 0 = S S · ds = S E × H · ds. Therefore the power flow for the TEM modes is given by (19). The integrals for the calculation of the power flow of the TE mn and TM mn modes are quite complicated, hence the following property is used for the calculation as well as the attenuation constant: α c = P 2P0 which lead to (4), (5), and (6) as described further next.
Combining (5), (6), (17), and (18) the power flow and the attenuation constant can be determined in general form whilst considering important variables for this paper such as the finite conductivity of pipeline materials as well as the relative power loss for each mode. Expression (20) describes the power flow for the TE mn modes and (21) describes the power flow for the TM mn modes while attenuation constants are outlined in (4), (5), and (6) in the main body of the paper, see Section II-B. To the best knowledge of the authors, never before has such a power flow analysis, which is now linked to the calculation of the attenuation constants as well as the different TE and TM modes, been reported previously in the open literature in this most general form.