Microwave System Development for Wireless Communications Inside Oil and Gas Well Pipelines

The modelling and design of a full wireless microwave communication system is examined, where the signal propagates within an overmoded circular metallic pipeline. Applications include the oil and gas industry. A specific link budget equation was also developed for the S-band transmission system and measured successfully using a 36-meter carbon steel pipeline, which can be easily extended to more than 150 meters. Also, based on the measured system data, the receiver sensitivity was determined to be −77 dBm and 15 dB in terms of the signal-to-noise ratio (SNR). Additionally, some digitized images, sensory information such as temperature and pressure, and live stream videos were successfully transmitted and monitored in real-time, using N210 universal software radio peripheral (USRP) modems by National Instruments and coded in Matlab/Simulink and LabVIEW. To the best knowledge of the authors, no similar microwave communication system has been developed with supporting theory, full wave simulations, and measurements for propagation within for oil and gas industry wells.


I. INTRODUCTION
The history of the oil and gas industry reflects local and global political events, economic constraints, and the personal endeavours of individual petroleum geoscientists, as much as it does the development of technologies and the underlying geology [1]. Because of the importance of the oil and gas industry, many companies and researchers are studying and developing new communication and sensor technologies. The problems which are to be resolved are related to the real-time and continuous monitoring of the pipeline condition, seismic activity, corrosion levels, possible gas leak detection, and other performance issues. The most widespread technologies which are dealing with these issues include the development of wireless sensor networks for the Internet of Things (IoT) to enable monitoring applications [2]. However, there does not exist today a fully demonstrated microwave system, which is able to offer sensory information data exchange within an oil and gas pipeline.
Several attempts have been made to achieve communications within a pipeline for the oil and gas sector at low frequencies; i.e. below 30 Hz and in the low kHz range (see Table 1). In [3], for example, the characteristics for radio wave propagation in a lossy circular waveguide, which can be applied in boreholes, indicating the possible propagating modes and the relevant attenuation constants were presented. The study was focused only on the electromagnetic (EM) propagation inside the waveguides and it managed to define the excited modes and their attenuation constants for the specific scenario but did not establish any communication system whilst observing signal attenuation losses of about  1.2 dB/meter for a pipe length of 5 meters. The goal in [4] was to investigate the application of a gas pipeline, firstly as a waveguide and secondly as a conductor to identify and repair pipeline problems. The results were promising and showed that the signal can be transmitted through the pipe at frequencies of a few GHz. The authors in [5] proposed a system implemented by wireless inertial measurement unit (IMU) modules placed in series along the drilling section downhole, receiving data with a sampling rate of 5 Hz. The presented results for a 30-meter drill pipe test suggested that data transmission was possible. However, in that study [5], the transmission system was not well defined for the EM characteristics of the pipeline arrangement and the experimental testing completed.
In [6] and [7] the authors presented three wireless telemetry methods used within oil and gas wells: EM telemetry (EMT), mud pulse telemetry (MPT), and continuous wave telemetry (CWT). These systems are considered the most used systems for oil-field drilling measurement operations. The techniques operate in a very low frequency (< 100 Hz for EMT and MPT and < 2 kHz for CWT) [6], [7] and they can transmit data for large depth ranges more than 12 km for MPT, 3 km for EMT and 8 km for CWT. The EMT has the advantage of bi-directional communication, and it does not demand the existence of drilling fluid but has a very limited data rate. MPT is reliable as it has been vastly developed throughout the years [7]. However, it has the disadvantage of the attenuation constant being dependent on the varying mud column and drill pipe fluid. The conventional telemetry methods described suffer from high signal attenuation and offer limited data rates [6].
More recent attention has focused on increasing the data communications rate within oil and gas wells [8]. Here the authors used two piezoelectric actuators to double the transmission rate in a 3-meter pipeline. Each of the repeater actuators transmitted from 2 to 6 kHz and the signal transmission was implemented using orthogonal frequency division multiplexing (OFDM). The results showed that the system had a good performance and that use of more actuators can improve data transmission. The research focused more on calculating the signal-to-noise ratio (SNR) and bit error rate (BER) in various scenarios and measuring the actual data rate or the available bandwidth.
The aforementioned studies [3], [4], [5], [6], [7], [8] for establishing communication links for oil and gas wells, have not examined the complete EM and transmission system to determine link budgets. This paper (see Figs. 1 and 2), examines in detail the following: (i) a study of the relevant properties of the pipe which confines the signal, (ii) antenna selection and design to ensure directed propagation whilst integrating a housing for protection from oil and gas product flow, (iii) microwave system simulation, testing and analysis whilst considering commercially sized pipelines, (iv) the adoption of IEEE standard wireless communication protocols, (v) definition of the system limitations in terms of required transmit powers and SNR whilst employing in-house programmed universal software radio peripherals (USRP) modems, and, (vi) in the field experimental testing at the 2.4 GHz ISM band. A complete analytical treatment (vii) is also newly developed defining the power flow in the circular pipe, which to our knowledge, has not been reported previously.
This paper expands the ways in which all these parameters can be studied, designed and finally implemented for a complete microwave system suitable for oil and gas wells. Comparisons are outlined in Table 1 for other subsurface measurement systems. It should also be mentioned that some preliminary lab-based results were presented by the authors in [9], [10] where some basic studies were reported such as the transmission of a digitized image for various propagation scenarios within circular pipelines. Expanding on these initial studies, we contribute further to the development of future digital-based oil fields which can foster real-time crude extraction monitoring as well as field decommissioning monitoring when required [11], [12], [13], [14].
Microwave signal propagation within a circular metallic pipeline is considered (defined as the inner core), which in practice, is enclosed in a coaxial pipeline configuration. This concentric metallic pipe configuration is a typical arrangement for oil and gas wells which thus ensures mechanical compatibility with commercially available and industry standard pipeline diameters. For experimental development and testing, the transmitter and the receiver antennas were initially placed inside the inner core at its edges (Fig. 2), and then, in an enclosed housing for antenna and electronic circuit protection. Therefore the transmission medium can be considered as a metallic circular waveguide with an excitation technique that differs from the typical vertical probe and loop feeds [15]. More specifically, a low-cost PCB-based antenna is employed since a more directive source is required to support microwave propagation throughout the length of the pipeline. Also, an antenna feed helps to keep the pipeline (or waveguide) propagation characteristics stable and controlled. As further discussed in the paper, this is made possible by enforcing only the excitation of the dominant mode in the pipeline. This is difficult to achieve because the 2.4 GHz signal is required to propagate within a multi-moded waveguide since typical industry standard pipeline dimensions are employed. Reduced carrier frequencies are possible, however, larger transducers would be required which is not practical within standard well pipe diameters. The operational challenge is to develop compact, low-profile, and lower-cost equipment. This specific pipeline scenario defines an intricate and challenging EM/microwave engineering problem, requiring clever system design to ensure efficient data transmission within the operational conditions of high pressure and temperature gas flow. This is in contrast to more conventional microwave system design approaches which generally strive for dominant and unimodal excitation within high specification metallic waveguides whilst possibly considering large power scenarios and shorter transmission line lengths. Basically, the primary motivation for the reported microwave system is to efficiently transmit data within an enclosed, overmoded metallic pipeline environment at 2.4 GHz. As further described in the paper, sensory data (such as temperature and pressure) is accurately transmitted and received, as well as tested with digital images and live stream videos.
The paper is divided into three parts. The first part outlines all the important EM characteristics for circular metallic waveguides, which includes some practical factors, such as metallic properties and corrosion effects which can alter the microwave propagation inside the guide. Also, in Section II, the circular waveguide theory as applied to the inner core of the pipeline is discussed. More specifically, all the excited modes are studied, as well as the conductor losses, the EM fields, and the power flow along the pipeline in its most general form. Numerical calculations are verified by full-wave simulations using a commercial EM solver. As will be further described in the paper, no similar analysis and analytical investigation have been reported previously in the open literature.
In the second part of the paper, the microwave system is further defined and studied using an end-fire microstrip-based planar antenna that directs EM waves into the inner core for operation at 2.4 GHz. As outlined in Section III, the propagating mode (Fig. 3), the transmission path loss, the directivity, and the impulse response are also newly defined for this specific oil and gas scenario. In addition, an EM power link budget equation is developed which can be applied to any pipe length. All these details are crucial for proper design and findings are supported by numerical studies, full-wave EM simulations, and measurements. More extensive microwave system testing is presented in the third part of the paper. In particular, the transmission and monitoring in real-time of sensory data such as temperature/pressure, digital images, and videos are outlined in Section IV. This system test arrangement included two N210 USRP modems, defining the transmitter and receiver hardware for data communications. Some commercially available high gain and low noise LNA amplifiers integrated circuits were also employed as well as barometric pressure/temperature sensors. These sensors were connected to an Arduino microcontroller for data transfer to the USRPs. Orthogonal Frequency Division Multiplexing (OFDM) was selected for data communications for its multi-path mitigation properties, resistance to fading over long distance communications, and suppression of inter-symbol interference [16]. Programs such as Matlab/Simulink and LabVIEW were used for developing the coding scheme. Also, in some field trials, additive white Gaussian noise (AWGN) was transmitted with the signal for noise level testing purposes and to ensure reliable communications. This altered the SNR at the pipe receiver which, for development purposes, the level was controlled by the user. Finally, the limitations in terms of minimum received power for successful data communications as well as the controlled SNR of the system are reported.
Some appendices are also included to complement these findings. In Appendix A, numerical results of the conductor losses are included for the excited mode. The reported results are then compared with full-wave simulations for various cases and the values are in agreement. This information is important when defining the aforementioned link budget equation in Section III which use a combination of theory, simulations, and measurements. This Appendix material is also important because there are magnetic properties for carbon steel 1010 (which is a common material for oil and gas pipelines [17]), and as such, a short study of the relationship between the attenuation constant of the dominant mode with the relative permeability was documented. To our best knowledge, no similar study has been examined.
In Appendix B a developed analytical treatment is presented which defines the general power flow equations for all the possible TE and TM modes within the circular waveguide and the results are useful to study the percentage of power in each mode. These details are also important for the systems engineer when defining the link budget equation. In Appendix C a manufactured antenna housing is reported for protection of the antenna elements itself (as well as enclosing the supporting electronic circuits) from oil and gas product flow and the potentially high temperatures and pressures [18]. This antenna housing (or radome) is placed on top of a 2 m long section of the inner core defining a conventional pipe mandrel configuration which is typically employed within oil and gas wells. Some transmission results demonstrating the streaming of live videos including operating with this housing using the USRPs coded with the LabVIEW program are presented.
To the best knowledge of the authors, no similar study on these important system aspects outlining the complete microwave propagation model has been reported previously in the open literature. Also, the proposed experimental setup provides a verification of the microwave system design, and, establishes a basis for communications within industry standard oil and gas well pipeline configurations. In addition, results from this paper are useful for other signal propagation models within enclosed environments which require innovative approaches for data communications. For example, some challenging electromagnetic environments which could adopt the findings from this paper, include wireless propagation within trains [19], [20], tunnels [21], [22], or metallic airducts in buildings and aeroplanes [23].

II. CIRCULAR WAVEGUIDE THEORY APPLIED TO THE INNER CORE OF THE PIPELINE
In this section, it is further described how the inner core of an oil and gas well pipeline can be treated as a circular 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 EM field, and the power flow through the waveguides, at the operating frequency which is set to 2.4 GHz. This is adopted as there is an abundance of low-cost commercially available RF devices which operate at 2.4 GHz and this inherently will reduce the system implementation costs. Furthermore, the 2.4 GHz ISM band is typically employed for WiFi communications when

A. INNER CORE CHARACTERISTICS
The selected experimental inner core conforms to the typical pipeline diameters for a commercial downhole well. The radius (r) of the chosen inner core 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) (see inset of Fig. 1), and where λ 0 represents the free space wavelength. The wall material is the AISI 1010 carbon steel, which can be described by its chemical composition (consisting of 99.18% to 99.62% iron, 0.30% to 0.60% manganese, and 0.080% to 0.13% carbon). The electrical conductivity (σ ) and the relative magnetic permeability (μ r ) of carbon steel 1010 is 6.993 × 10 6 S/m and 100, respectively [24].
The challenging environmental conditions, the subsurface geology, and the ageing of the pipeline may cause some corrosion in the interior of the metallic pipe. The main element of carbon steel 1010 is iron (over 99%) and there are scenarios where the iron reacts with oxygen downhole. The most common reaction is 3Fe + 2O 2 → Fe 3 O 4 . The compound, iron (II, III) oxide, also called ferrous ferric oxide, is dark brown/black. The EM properties of ferrous ferric oxide are described in Table 2. More information can be found in [25] and [26]. These layers of rust can be formed in the walls of the inner core and can introduce extra transmission losses. This is further examined in Section II-B.
A dry methane mixture C 2 H 4 (i.e. natural gas) was considered to flow inside the pipeline, thus defining the production fluid coming from inside the well to the surface. Also, in our work, we are assuming the methane mixture to be in a gaseous phase at oil/gas well pressure and temperature conditions which is typical for most practical gas pipelines [27]. This is important as the electrical properties of methane can be approximated as an air medium [10], [27]. However, depending on the temperature and pressure of the gas, values for the relative permittivity (for the filling material within the pipeline) could be in the range between 1, 1.5, and 2 [18]. For this reason, a short numerical study on the excited modes and the related conductor losses is presented in Appendix A. Further analysis of other materials flowing inside the inner core is beyond the scope of the current paper. Therefore for the presented theoretical calculations, full-wave simulations, as well as the measurements in this section, the filling material inside the pipeline, was considered to be air [27], i.e. the relative permittivity ( r ) and permeability (μ r ) was taken equal to 1. A similar approach was taken in [10] where the oil/gas product flow within the pipeline is typically assumed to be a common methane mixture (in its dry gaseous phase) which has the electrical properties of air.

B. MODE ANALYSIS AND CONDUCTOR LOSSES
The operational frequency has already been identified at 2.4 GHz, so every mode which has its cut-off frequency over this threshold does not propagate. Furthermore, based on [28], the cut-off frequencies for the propagating TE and TM modes are respectively, and calculations for the defined circular waveguide pipe are outlined in Table 7. Here m ∈ N 0 describes the azimuthal index, and n ∈ N the radial index of the wave, for both the TE and TM mode types. Also, μ 0 and 0 are the magnetic permeability and the electric permittivity of the free space, respectively. The terms χ mn and χ mn for each pair of mn are the roots of the Bessel function and its derivative, respectively. The walls of the waveguides are magnetic, as already discussed. That means they are imperfect conductors and thus there is power loss during signal propagation along the pipe. Conductor losses can be computed by the attenuation constant, α c . This constant is the ratio of power loss per unit length by considering the power flow and its units are in Np/m [15]. For the considered circular waveguide, each mode has its attenuation constant and they are given by [28]: for TE modes and for TM modes. Here R s is the characteristic resistance of the metallic walls and it is defined by [15], R s = ωμ 2σ where ω is the angular frequency. Also, ζ is defined as the intrinsic impedance of the medium and it is equal to μ .
As described previously the medium considered within the pipe has the EM properties of vacuum (or air), the metallic walls are made from carbon steel, and the metal structure can experience corrosion, forming rust (also known as ferrous ferric oxide). Given these conditions, the attenuation constants for all the possible modes at 2.4 GHz; i.e. the TE 11 , TM 01 and the TE 21 modes are reported in Table 3. The investigated pipeline dimensions under test are typically employed in the oil and gas industry. However, there are also a variety of other pipes with different radii used in practice and with different material properties. Appendix A reports on some numerical calculations for the cut-off frequencies and the conductor losses for a carbon steel 1010 pipe with a radius of 57.15 mm as well as comparison purposes for aluminium pipes having a radius of 57.15 mm and 69.85 mm. All of these are typical of pipes employed within the petrochemical industry. Also, more results are reported for situations when the filling material is not similar to air, but contains a crude methane vaporous mixture [27]. Results are verified with full-wave simulations.

C. POWER FLOW
The Poynting vector [15], S = E × H , is used for the calculation of the power flow along the z-direction for the circular waveguide and it can be expressed as [15], for each propagating mode. This parameter is important to characterize the relative powers accepted by the pipeline at 2.4 GHz for the TE 11 , TM 01 , and TE 21 modes. This approach is general and applicable to all possible modes. It should be mentioned that previous studies only considered the dominant TE 11 mode (see [28]). In particular, in the following, the power flow for all TE modes is given herein by The power flow for all TM modes is also given by The derivations for (6) and (7) Table 4. Also, in Fig. 4, the analytically determined percentage power flow for each mode is reported with respect to  frequency. It can be observed that the TE 11 mode, which is the dominant mode, has the majority of the power across the spectrum. Furthermore, the TE modes have much greater power flow than the TM modes. This occurs because of the dependence of the TE and TM modes on the magnetic permeability and the electric permittivity, respectively, mainly because for the TE case, the value for the magnetic permeability is much lower than that of the electric permittivity.
Considering that the operational frequency for the proposed system is 2.4 GHz and that only three modes can be excited, percentage power flow ratios can be calculated as follows: where further details on these analytical calculations are given in Appendix B.

III. PLANAR ANTENNA DESIGN, PROPAGATION MODELLING, & EXPERIMENTAL TESTING
In this section, the pipeline is studied when a directive end-fire antenna is employed as the transceiver. The parameters which are analyzed here are the propagating mode, the power flow, and the transmission path loss (TPL) inside the inner core. Also, the performance of the antenna in this enclosed environment is examined. At the end of the section, a link budget equation is developed with respect to the signal transmission pipe length.

A. TRANSCEIVER SELECTION
The selection of the practical antenna for directive field propagation inside the pipeline is important for the reliable operation of the microwave transmission system. Most importantly, the antenna must fit inside the concentric metallic waveguide arrangement and at the same time, operate effectively at 2.4 GHz. For the aforesaid reasons, a compact planar Yagi-Uda printed circuit board (PCB) based antenna was designed and optimized using a commercial full-wave simulation tool.
This antenna (Fig. 6) is well-known and uses microstrip technology and it consists of the feed line, the driven element, the director and the ground plane [29]. The 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. This PCB substrate material is typically employed for space applications, such as CubeSats as in [30], [31], [32], and also, is suitably rated for the temperature range expected within oil and gas well pipelines.
It should be mentioned that the antenna can maintain a gain higher than 6 dBi in a free-space environment and the front-to-back ratio is close to 19 dB. The advantages of using an end-fire antenna for the excitation of the waveguide (inner core) rather than more conventional excitation techniques are that fields generated are matched to the dominant mode of the pipe and with power flow in the desired forward direction. This is important as the antenna could be positioned in practice (within a real oil and gas well) at different pipeline depths for gathering sensory information collection and considering a repeater system implementation. So if a non-directive antenna was employed, or a more conventional waveguide feed, signal power could be inadvertently directed to the pipeline edge (upwards: +y direction) and down the pipeline (towards the bottom: −y direction), which might not be desired. Table 5 defines the different pipeline sections that were chosen for the experimental testing. All the circular pipes were manufactured using carbon steel 1010 and had a radius α = 69.85 mm. Also, a corrosion layer of rust (Ferrous Ferric Oxide) covers the interior walls of the pipeline sections.

B. POWER FLOW, PATH LOSS, & TESTING
The microstrip-based end-fire Yagi-Uda antennas have been centred and placed at the edges of each pipeline section (see Figs. 2 and 6), defining the transceiver system. Also, absorbing boundary conditions are employed using practical microwave absorber material such that no power was diverted outside the pipes (Fig. 6). When simulating the aforementioned system, and when considering the pipe to be air-filled, the extracted electric field is the same as the electric field of the TE 11 mode as reported in Fig. 3 (all results not reported for brevity). The power flow was extracted showing that the propagation is mainly routed in the +z-direction (Fig. 5) whilst maintaining a maximum amplitude along the centre of the pipe. These simulation results are important and identify that directive TE 11 mode propagation is achieved for the practical setup (as outlined in Fig. 14 and Table 5), and given that the aforementioned Yagi-Uda planar antennas were employed.
A transmission path loss (TPL) model can also be defined for the pipeline system as described next. For each pipe section, the S-Parameters were measured (Fig. 7) using an S5048 2-Port vector network analyzer (VNA) by Copper Mountain Technologies. The reflection coefficients of the antennas (| S 11 |) and (| S 22 |) in dB for the frequency range from 2.2 to 2.6 GHz, demonstrate good performance, (with values below −10 dB) inside each pipe section and the transmission coefficients (| S 21 |) and (| S 12 |) are relatively low as well (Fig. 7). However the transmission coefficients (| S 21 |) and  (| S 12 |) for Pipe B are lower ( −10 dB) due to the corrosion layer and some drilling mud (on the interior of the pipe) which could not be removed practically during the measurement campaign.
The pipe sections were also coupled together in that pipe sections A & B, for example, were combined for a total pipeline length of around 25 m (see Table 5). Although the transmission coefficients for the joined pipe sections A & B are approximately −12.2 dB and −15 dB for the joined pipe sections A & B & C, these values demonstrate the experimental system is suitable for experimental testing and evaluation. It should also be mentioned that due to the feeder cable length requirements, the transmission loss for the jointed pipe sections, A & B & C, was measured using a 2024 Marconi RF Signal Generator and an HP Agilent 8594E Spectrum Analyzer by measuring the received signal power. The transmission loss, in that case, was measured at −14.98 dB (Fig. 8).
By studying all these transmission coefficients we were able to develop a specific TPL model for the microwave system as reported in Fig. 8. A similar, yet also different, model has been developed by the authors in [10] considering simple dipoles where the radiating near-fields are still dominant and alter the classic definition of the free space path loss. This TPL model is related to the ITU model [33], in that a near-field correction factor is introduced into the propagation loss factor determination. Regardless, these findings are still related to the directive transceiver case (outlined in this paper) and the reported TPL model developed herein for the proposed microwave system, and can be described as follows The system loss (SL) accounts for standard power losses, which are independent of the pipeline length. In particular, this SL defines the power that is not received at the receiver antenna and any possible power that propagates in the reverse direction concerning the transmitting antenna. The variables α c , α r , and α s symbolize the attenuation constants for the power due to the conductor losses, the corrosion layers, and the pipe surface roughness. Concerning the TPL equation which includes the effective gains of the Yagi-Uda antennas within the pipeline; i.e. G e f f t and G e f f r , these values do not represent the conventional far-field antenna gain, but rather, are a metric which can be used to quantify the signal directivity within in the pipe due to the presence of the transceivers. A similar assessment was reported in [10], and can be defined as the near-field-like effective gain. It is also interesting to note that the sum of the variables SL, G e f f t , and G e f f r is −2 dB when inspecting Fig. 8, and this suggests that the effective gains for the transmit and receive antennas are of suitably high value (see Figs. 9 and 10) to overcome any power losses whilst ensuring directive microwave propagation as required. These parameters are further studied and calculated in Section III-C.
Results for the TPL are plotted in Fig. 8 for the numerical linear curve and a good agreement can be observed with the measurements. The sum of the attenuation constants is defined  by a slope of about 0.4 dB, referring to the blue line in Fig. 8. Also, the numerically calculated attenuation constants for carbon steel 1010 (α c ), and for the ferrous ferric oxide (rust) (α r ) are given by Table 3. The simulated sum up of α c and α r for this system considering a rust layer with a thickness of 0.3 mm was extracted at 0.25 dB/m, which agrees with the numerical calculations. Also, the total measured loss factor (0.4 dB/m) may be attributed to surface roughness in the pipe wall. The difference of 0.15 dB/m between the measured and numerically modeled system is most likely related to pipeline irregularities, comprising, surface roughness, and the presence of drilling mud which cannot be easily modeled.

C. DIRECTIVITY, GAIN, & IMPULSE RESPONSE
The effective gains for the two Yagi-Uda PCB-based antennas which are placed inside the pipe differ from the free space gains. This is because the radiating near-fields are dominant when they are placed in the guided circular metallic environment, in that the near-fields generated by the antennas do not reach the far-field zone. In particular, the near-fields generated are confined within the waveguide and are field matched to the dominant TE 11 mode for power-routed propagation within the pipeline (see Fig. 5). This scenario defines an alternative definition for the antenna gains within the pipe [10] when compared to more conventional free-space propagation.
Following this, the directivity (D) was studied and simulated for the employed Yagi-Uda PCB-based antenna when placed into the circular metallic environment whilst considering various waveguide radii (r) and results are presented in Fig. 9. For every change in the radius, the directivity was recorded in the z-direction, which is defined as the forward path for signal propagation. Then the radius of the pipe was gradually increased until it reached the far-field zone. As observed in Fig. 9, the free-space value for the directivity (6.14 dB) was eventually achieved as the radius of the pipe became larger.
When considering the antenna gain (G 0 ) its value is related to the maximum directivity (D 0 ) multiplied by the radiated efficiency; i.e. G 0 = ε R D 0 , where ε R is the total radiation efficiency of the antenna. Moreover, simulations suggest that the radiated efficiency of the Yagi-Uda PCB-based antenna (ε R ) was around 97% for all the simulated pipe radii. Furthermore, it was observed that the maximum directivity (D 0 ) of the antenna when the pipe radius was r ≈ 70 mm (such as the studied case) is 9.765 dB. Hence, the effective gain of the antenna (which does not include mismatches) is given by [34] G e f f = ε R D 0 ≈ 9.5 dBi.
An alternative way to characterize the effective gain of an antenna is through the impulse response h(t ) [35]. The Fourier transform of the normalised impulse response (H N (ω)) is given as: whilst considering the group velocity, v g , of the propagating mode inside the waveguide which is not typical; i.e. most commonly the free-space wave velocity c is adopted when characterizing antennas. Here d is the distance between the transceiver and receiver. Specifically, υ g is the group velocity for the TE 11 mode, 2.55 × 10 8 m/s. For the calculation of (10), the transmission coefficients S 21 (ω) and S 12 (ω) are required. Also, the relation between the gain of the transmitter and the impulse response [36] of an antenna is given by where λ g is the wavelength of the TE 11 mode, in this case, 0.1388 m (usually the free-space wavelength λ 0 is used). Also, the gain of the receiver G r (ω) is given by the use of S 12 (ω) instead of S 21 (ω). Therefore, by placing the two identical Yagi-Uda PCB antennas within the pipeline and separated by a distance d apart, the impulse response was measured (see Fig. 10, inset) whilst using pipe section C. Using these results, the measured transmitter and receiver antenna gains are reported in Fig. 10, by (11) from 2.2 to 2.6 GHz. At 2.4 GHz, the value of the measured transmit and receive gains inside the circular waveguide was calculated to be 9.1 dBi and 9.09 dBi, respectively. These gains are very close to the simulated effective gain of 9.5 dBi (see Fig. 9).

D. GAP BETWEEN THE PIPE SECTIONS
During the pipeline measurements in the field, it was observed that some unwanted gaps could exist between two sections of pipe. For example between pipes A and B (see Table 6). The pipe joints could not be perfectly mated with the available pipe couplers. This was related to the practical positioning of the pipe sections and limited access to the mechanical forklift. Therefore, with each pipeline section having a mass in excess of 200 kg, the actual mechanical structure of the

GHz. The Simulation Setup Includes a 2 m Carbon Steel Circular Waveguide Pipe With the Antenna Positioned Within the Mechanical Housing Which Was Placed on Top of the Waveguide. An Ideal Waveguide Port Was Positioned on the Other Side of the Guide
pipeline during the field tests was not homogeneous along its total length. The pipe coupling gaps can introduce additional signal losses. To further assess these losses, measurements considered the possible gaps between the jointed pipe sections A and B. Findings are outlined in Table 6, which are a function λ 0 at 2.4 GHz.

E. LINK BUDGET ANALYSIS ANALYSIS WHEN PIPES A, B, & C ARE COMBINED
A more complete power link budget, as required for conventional telecommunication systems, can now be further developed. This is because all the system parameters have been defined and evaluated. Based on (8) each propagating mode has its power flow. Also, we defined the propagated mode inside the pipelines as the TE 11 mode which has a percentage power flow of 89.35 %. Given this value, the rest of the power flow is considered lost. Numerically, this loss is translated to | 10log 10 (0.8935) | ≈ 0.5 dB. Also, from the TPL the total attenuation constant (α) is the sum of the attenuation constants due to the conductor losses which is calculated to be 0.4 dB. As described previously, the effective gain of each antenna was measured and calculated to be about 9.1 dBi and these values are included in the TPL model. By (9), the SL can be valued to be around 20 dB. Also, λ 0 /4 was chosen as the distance for each gap between the pipe sections because this separation appeared to be the norm when mating the different pipe sections. Therefore the extra losses due to the gaps between the pipe sections were estimated as 1 dB. Given these parameters, the total link budget equation for the microwave transmission system can now be stated as follows: where P R and P T are the received and transmitted powers, respectively, and their units are dBm.

IV. COMMUNICATION TESTING
The pipeline system was studied in the previous sections from an EM/microwave engineering point-of-view, and the setup as outlined in Fig. 2 was used for the pipeline data communications. The system includes two N210 universal software radio peripheral (USRP) modems by National Instruments, defining the transmitter and receiver communications hardware. Also, some commercially available high gain and low noise amplifiers (with a maximum gain and noise figure of 21 dB and 1 dB, respectively) were employed as well as barometric pressure and temperature sensor by Bosch (BMP180) for sensor information data collection and exchange. This sensor was managed by an Arduino (ATmega328P) microcontroller. The basic sensory data that was tested for transmission along the pipeline arrangement (see Fig. 1) was the ambient environmental temperature and pressure. This was managed by an in-house code and graphical user interface (developed in MATLAB/Simulink and LabVIEW) which was also designed to send communication text messages and digitized images. Both could be defined by the user and uploaded in real-time, respectfully.
The modulation scheme adopted was orthogonal frequency-division multiplexing (OFDM). Using OFDM helps to mitigate any multipath effects in the pipeline (and in general) when transmitting over long distances [16]. In addition, for some trials, the signal was transmitted with additive white Gaussian noise (AWGN), so the SNR at the pipe antenna input was controlled during the experimental testing. The default transmitted power of the USRP was −25 dBm which can be re-programmed to have a maximum total output power of about 5 dBm. For control of these parameters, the graphical user interface (GUI), as shown in Fig. 12, also controlled these transmission metrics. For example, the user can select the gains of the USRPs, the SNR values, and also, the type of transmitting data (text, image, or pressure and temperature data). This GUI was made available on a laptop positioned at the transmitter side of the pipeline. The system was also programmed in such a way that the data was re-sent repeatedly until the user decides to stop the transmission. This assisted with the real-time monitoring of the system with the user also able to choose when to receive the transmitted data at the receiver laptop.
During the field trials the antennas were placed at the ends of the jointed pipe sections; i.e. the A, B, and C pipeline sections. The purpose of this field testing was to investigate the data transmission performance through the individual pipes and assess any limitations for the microwave transmission system. The system parameters were as follows: (i) the TPL for the A & B & C configuration was 15 dB from Table 5, (ii) the USRP transmitted power was −25 dBm and neither additional gain nor the external amplifiers were initially applied on the transceivers. Also, after significant efforts to improve the field measurement setup, at this stage, there were not any significant gaps between the different pipe sections. Therefore, based on (12) the received power was approximately −40 dBm and this was verified experimentally. The digitized image was also successfully transmitted and received ( Fig. 11(a)) in all attempts, without any deformation. Furthermore, the sensory data was transmitted, received, and monitored in real-time accurately. The temperature that appeared on the display was 8.06 • C and the pressure was 102.2 kPa. Slight changes in the ambient temperature and pressure near these initial values were successfully monitored in real time during the measurements.

A. MINIMUM POWER LEVEL STUDIES FOR MAXIMUM RANGE ESTIMATION
The next set of measurements was carried out to understand and identify when the communications link within the pipeline failed or was close to dropping out. This was defined when the image or sensory data was unable to be successfully recovered at the receiver. To achieve the low signal power levels required, two 30 dB attenuators were placed at the receiver side of the pipeline. This emulated a total pipeline length equivalent to 150 m. Also, an amplifier with a gain of 20 dB was positioned on the transmitter side and the internal gain of the USRP transmitter modem was set to 3 dB. No amplification gain was defined at the receiver, hence, the approximate received power was −77 dBm which is about the minimum power level required for USRP operation (this was characterized to be at −80 dBm where short cables were used to define a low noise setup). After repeated measurements, which were consistent, the JPEG image was received and monitored, however, note there was some partial distortion of the image quality (see Fig. 11(b)). With reduced power levels, the USRP could not successfully recover the image or demodulate sensory data accurately. Following an increase in transmit power levels and/or receiver gains, successful and accurate communications were resumed.

B. EXPERIMENTS WITH ADDITIVE WHITE NOISE
While maintaining the system setup as described above (by keeping all the same values for the components), however now, a controlled level of AWGN was introduced into the system for further testing. Adding noise has the benefit of effectively controlling the noise floor of the system setup over a broad frequency range across where the system operates. This allowed experimental testing of the data link connectivity in a controlled way. Initially, the SNR was set to be 15 dB. Again the image was received and monitored but with some partial distortion (see Fig. 11(c)). For lower values of the controlled SNR at the transmitter, the image or sensory data could not be received with any accuracy. With increased SNR values, considering the noted experimental setup, data transmission became successful as expected. It should also be mentioned that similar data link communication failure results were observed in the our lab as further reported in [9]. This suggests consistency of the transceiver system albeit in a lab setting or the field over an extensive pipe length of 35 m. Moreover, the data rate in the aforementioned experiments was estimated at 50 kbits/s using a manual stopwatch and this maximum value was consistent for the different trials. This value could be improved in future testing, but some redundancy was adopted into the developed OFDM code to ensure successful data links for the field trials.

V. CONCLUSION
As documented in the literature there has been a limited number of studies relating to the use of electromagnetic propagation within oil and gas wells [3]- [8]. Despite these important contributions, there have not been any published experiments or extensive studies which investigate the feasibility of communications within long pipelines by employing microwave carrier frequencies. In particular, the current research work targets the modelling and design of a microwave communication system, where the antenna receiver and the transmitter modules are placed into a metallic pipe for oil and gas well sensory measurements, mainly, to address the realtime and continuous performance monitoring of the pipeline condition, and other problems such as the corrosion levels, possible gas leak detection, and other similar pipe integrity issues. The paper also examined the entire transmission system which includes the complete EM study, antenna integration, microwave analysis based on typical pipelines, the application of suitable wireless communication protocols, and the limitations of the system in terms of power and SNR.
During the design of the proposed microwave transmission system, it was decided that the pipeline configurations used for the oil and gas well environment would be treated as a waveguide for the chosen industry standard radius (69.85 mm) and operational frequency (2.4 GHz). Since the pipeline characteristics, the dimensions, the metallic walls, and the filling material were known, the modal analysis was therefore based on applied theory, and the power analysis and the conductor losses that exist because of the metallic walls were also developed. A compact Yagi-Uda antenna was chosen and designed using microstrip technology for the transceiver. The antennas were placed inside the pipes and were examined within different pipeline configurations, by simulations and field measurements. The results showed that the test setup can work efficiently at 2.4 GHz.
The selected propagating mode is the TE 11 mode and the transmission path loss has been well defined in the paper, as well as the effective gains of the antennas. In addition, a link budget equation was developed which can be applied to similar pipeline systems. Overall, a 36.03 m carbon steel circular pipe was set up for field testing and the propagation path inside was experimentally validated. Using OFDM as the communication protocol and standard RF/microwave components, the results showed that the transmission of about 150 m is possible (shown experimentally when using attenuators). Also, the receiving capability of the system was measured at −77 dBm in terms of power level and 15 dB in terms of the SNR during the demonstration of successful data communications.

APPENDIX A
Equations (1) to (4) presented the cut-off frequencies and the attenuation constants due to the conductivity of the metal pipeline structure used for the circular metallic waveguide. In this Appendix, numerical calculations using these developed equations are compared with full-wave simulations for some relevant cases. These cases are as follows: (i) the type of metal for the circular waveguide (aluminium or carbon steel 1010), (ii) the radius of the circular waveguide (57.15 mm and 69.85 mm), and, (iii) relative permittivity of the filling material ( r = 1, 1.5, 2) for the waveguide.
As described earlier in Section II-A, the pipeline waveguide could be filled in practice with produced fluids (such as natural gas) at different temperatures and pressures making its electrical properties slightly different from air [18], [27]. These studies are important for the EM/microwave engineer to understand the possible losses and changes in electrical properties whilst considering the different practical cases for  natural gas and other produced fluids flowing in the industry standard pipelines. The electrical conductivity for aluminium is 3.56 × 10 7 S/m [15] and 6.993 × 10 6 S/m for carbon steel 1010 [24]. Also, carbon steel 1010 has magnetic properties with its relative magnetic permeability (μ r ) equal to 100 [24]. Due to these magnetic characteristics, a short study is presented next where the relationship between the attenuation constant of the TE 11 mode for the circular waveguide defined by carbon steel 1010 and having a radius, r, of 69.85 mm.
Numerical results are compared with the corresponding full-wave simulations (see Fig. 13 and Tables 8 to 13). As can be observed a good agreement is achieved between the calculations and the simulations. These characteristics studied, which include the type of metallic pipe walls and their radius as well as the relative permittivity and permeability, are typical of possible values that could be observed in practical oil and gas well systems [18].

APPENDIX B
This Appendix provides a derivation for the TE and TM power flow equations, see (5), (6) and (7), in Section II. II-C. This approach is general, complete, and applicable to all possible modes. It should be mentioned that all other previous works (such as in [15], [28], [37], [38], [39], and [40]) mainly focused on the dominant TE 11 mode and with limited analytical derivations and results provided. Recently, a similar theoretical treatment was documented in [41], concerning coaxial waveguide configurations, but for all the possible modes as well (TEM, TE, TM) and where analytical expressions for the power flow and losses were reported.
Following these developments and building off our findings in [41], general modal equations are defined for the pipeline starting from the analytical expressions for the possible electric field components developed within a circular metallic waveguide. In particular, we further develop the earlier findings in [15] and [28] by introducing the complete sinusoidal components by the introduction of both boundary condition constants A and B. This treatment provides a complete analytical study for the power flow equations defining microwave propagation within circular metallic pipes. In particular, for the TE mn modes On the other hand, the EM field components for the TM mn modes are defined as, where β is the phase propagation constant for the relevant mode. The term J m is the mth-order Bessel function and J m is the derivative of it.
The power flow is defined as a function of the Poynting vector (S) by the general expression P 0 = S S · ds = S E × H · ds. For the circular waveguide, cylindrical coordinates are adopted and the power flow along the pipeline (z-direction) is given by (5). As already mentioned the analytic expressions of the power flow for the TE and TM modes are given in (6) and in (7). The full derivation of these equations follows.
Using the electromagnetic field expressions, (13) and (14), for the TE modes, and (15) and (16), for the TM modes, the power flow integrals for each case can be derived. The development of the power flow starts with the integral in (20) considering TE modes, and after some simplifications (21) is the result. In the derivation, the following trigonometric properties are employed: when, m ∈ N * making the integral in (21) simplifying to (22). Then for solving the integral in (22), the following Bessel function integral property was used [15]: finally ending with the power flow expression in (23) for each TE mode. On the other hand, the development of (24) for the TM modes, uses the same procedure as outlined for the TE modes and concludes with (25). Also, for the solution of the integral in (25) the following Bessel function integral property was employed [15]: finally arriving at the power flow expression in (26) for each TM mode. The calculations of the power flow percentages, as presented in (8) for each of the three excited modes (TE 11 being dominant as well as TM 01 and TE 21 ), are further described in (27) through (29).

APPENDIX C
The antenna and the electronic components when they are being placed inside the pipelines, as it was described in the above sections, can be damaged due to the filling material products and the gaseous flow. For this reason, the mechanical design of an antenna and RF/microwave circuit housing or radome, should be carefully considered in practice. Fig. 14 shows the structure of the experimental housing which has been constructed from aluminium with an aperture at its edge so that the antenna can be connected with the feeder cable. The housing is placed on the top of a 2 m piece of the inner core pipe section and between them, there is an acrylic sheet (see Fig. 14). This complete mechanical housing assembly is called a pipe mandrel and this unit can be positioned at both the transmitter and receiver sides of the pipeline, or at a midpoint position of the pipeline for a repeater-based system to obtain a longer transmission range. This experimental mandrel setup allows for mechanical mating onto the standard industrial oil and gas pipe configurations. The EM wave propagates through the acrylic sheet and the inner core is fed normally, the antenna being protected from production fluid flow with an arrangement similar to a radome. The relative dielectric constant ( r ) of the acrylic (see (20)- (29) in next page), sheet that is being used is 3. Also, the antenna is positioned horizontally as it is an end-fire design and its position has been optimized for the best performance of the transmission system (Fig. 14).
For the detailed system development, it is also essential to understand how the EM fields propagate when the directive antenna is mated with its mechanical housing and the circular pipeline structure itself. In full-wave simulation software, the PCB end-fire Yagi-Uda antenna was placed into the mechanical housing, which was then placed on the top of the inner core section (see Fig. 14), defining the excitation source for the system. At the other edge of the mandrel, a standard waveguide port was placed. The waveguide port can excite all the desired modes (TE 11 , TM 01 , TE 21 ) and monitor the results of S-parameters for each mode separately. This fullwave simulation software was able to ascertain which mode was dominantly 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 13. Here the transmission coefficient (| S 21 |) represents the coupling into each mode from the driven antenna. Based on these results, the dominant mode is TE 11 as the insertion loss value is minimum. This implies that the majority of power from the antenna excitation, and its protective housing arrangement, is coupled into the dominant TE 11 mode of the circular pipeline. This is because | S 21 | values are about −2.4 dB, while all the other powers diverted into the different modes are about −11.5 dB or below.
The transmission coefficients of each pipe section that were used in the experimental testing, which were previously described in Section III-B, but now also using the pipe mandrel housings, were measured and recorded. It can be observed (see Fig. 15) that this system, when the mandrels are included, is lossier than the case where the antennas are placed into the inner core directly. This is because the sum of the attenuation constants are about 0.85 dB/m, as can be extracted from the slope of the plot in Fig. 15. This higher value, which is about doubled when compared to the same setup without the mandrels; i.e. 0.4 dB/m (see Fig. 8), is due the fields bouncing in the main circular waveguide when exiting from the mandrel.
P TE 11 % = P TE 11 P TE 11 + P TM 01 + P TE 21 100% This effect has been observed in the full system simulations, but is not further reported herein due to brevity. Also, this effect is not observed when the antennas are fitted inside the guide (see Fig. 6). Regardless, because of this known issue, the authors are actively working on a new mandrel system to minimize these additional losses. Given these constraints and motivations for remote oil well monitoring, decommissioning, etc. as mentioned in the paper as well as the ambitions for future improvements, the proposed microwave approach has been demonstrated and can be made practical. Also, the addition of the mandrels has been shown to be feasible in this Appendix, and such radome structures may be required for the deployment within oil and gas arrangements. These findings are generally useful in the modelling and development of said oil and gas systems in shallow, sub-surface gas-filled well environments, which have a depth of a few hundred meters [27].
In summary of the data capture, a live video was successfully transmitted when the pipe mandrels were used in the lab. During this stage of testing, a live-streamed video was recorded by transmitting and receiving data in real-time through the short pipe section. During the test, the transmitter mandrel and the receiver mandrel were coupled directly together. In contrast with the transmission of the digitized images and the sensory data used for field trials, for the transmission of the live stream video, LabVIEW was used as an interface for the USRP stations. The reason that LabVIEW was preferred in this case rather than the Matlab and Simulink model is that this offered more efficient system communications for the transmission of the video packages. This video can be found in the supplementary information for this paper.