Network design and planning of wireless embedded systems for industrial automation

The widespread adoption of wireless systems for industrial automation calls for the development of efficient tools for virtual planning of network deployments similarly as done for conventional Fieldbus and wired systems. In industrial sites the radio signal propagation is subject to blockage due to highly dense metallic structures. Network planning should therefore account for the number and the density of the 3D obstructions surrounding each link. In this paper we address the problem of wireless node deployment in wireless industrial networks, with special focus on WirelessHART IEC 62591 and ISA SP100 IEC 62734 standards. The goal is to optimize the network connectivity and develop an effective tool that can work in complex industrial sites characterized by severe obstructions. The proposed node deployment approach is validated through a case study in an oil refinery environment. It includes an ad-hoc simulation environment (RFSim tool) that implements the proposed network planning approach using 2D models of the plant, providing connectivity information based on user-defined deployment configurations. Simulation results obtained using the proposed simulation environment were validated by on-site measurements.

technologies calls for the development of virtual network planning software tools for accurate system deployment. Network planning is performed before on-site network installation and should be accurate enough to limit the need to oversize the design of the overall system, which is obviously an extra cost for the contractor. Making use of the 3D model of the industrial site (if available) during the design phase is of utmost importance to achieve this result.
Although many technological solutions and standards (e.g., WiFi/LTE, IEC standards WirelessHART, ISA100.11a) have been investigated for application-specific contexts [1], they are not yet ready for industrial applications with high safety, security, and real-time requirements. The existing network design procedures are often not suitable to address network optimization in complex and harsh environments. In addition, industrial layouts are characterized in many cases by multiple coexisting heterogeneous networks. Industrystandard design procedures for wireless network optimization must be able to certify the reliability and safety of radio links under harsh conditions. Moreover, they must be supported by various industrial planning systems (CAD, CAE, CAM) in order to achieve a seamless planning, design and operation environment, regardless of the wireless/wired communication technology employed.
This work presents a software toolkit to support wireless industrial network planning, which helps designers tackling both node deployment and RF connectivity estimation. It adopts the propagation model proposed in [2], which suggests using the 3D model of the plant to classify the links based on the number and the density of the surrounding obstructions. The paper also discusses how the coexistence of different wireless networks might affect this model. Besides, the proposed toolkit includes a graph-theoretic approach to optimal relay deployment based on a spectral graph partitioning technique The accuracy of the proposed tool is validated by experimental measurements using industry standard devices operating at 2.4 GHz based on the IEEE 802.15.4 physical layer (PHY)-the physical layer simulation, and then signal propagation, which is the focus of the tool, and not the protocols per say. The standard defines the physical layer (PHY) specifications for most of the available commercial products [1], such as IEC 62591 (WirelessHART) and IEC 62734 (ISA SP100). The measurement campaigns have been carried out in three sites located in a large-size oil refinery plant. The main results are further discussed in the paper.

Related works
Different simulator/emulator systems have been considered in previous literature to model the radio propagation in complex environments (e.g. mixed Line-of-Sight LOS and non-LOS). However, most of those systems rely on simple deterministic channel models where geometric distance (i.e. path-loss) is the only input to inspect the link characteristics. RF ray tracing software has been instead adopted in several previous works to model site-specific real-world environments. Many RF models and software tools exist to predict wireless propagation with varying degree of accuracy. These tools provide indeed a very high realism but they often incur in significant (an in some cases prohibitive) computational costs. Despite many successful case studies that motivated the use of these tools for indoor and urban areas [3], also tailored to cellular networks [4] and mobile ad-hoc and mesh networks (MANET) [5], in many cases the deployment layout is described by small-size CAD files characterized by a simplified data-base. Instead, the use of ray tracing based tools could not be considered as a practically viable solution when applied to highly complex industrial environments characterized by dense obstacles with complex configurations (e.g., dense pipe racks, instrument cabling, valve access platform, vessel/tank systems etc.). In addition, these environments are often modeled by complex CAD data of large size (e.g., in the order of several hundreds of Mbytes and up to few Tbytes). The use of simplified (but still site-specific) simulator tools making use of the 3D CAD of the environment is therefore mandatory to effectively address the problem of connectivity prediction of mesh networks in complex industrial plants.
Looking at the dual problem of optimal wireless node deployment, different strategies have been considered in the literature for targeting connectivity, coverage, node lifetime, and/or QoS [2]. However, the majority of published work on sensor network deployment limits its focus on simplified and analytically tractable 1D and 2D environments where connectivity can be considered as a primary/secondary objective or as a constraint in the deployment problem [6]. In addition, the network connectivity problem is mostly considered under the assumption of simple binary communication disk model without looking at site-specific environmental constraints (see also [7,8]). Those approaches are indeed very prone to failure in practical large-scale industrial applications. Deployment strategies these can be classified into static and dynamic [6], depending on whether the optimization is performed during network set-up or during network operation (for node repositioning). In static environments, as those considered in this paper, data is periodically collected over preset routes. In such cases the problem of optimal node placement for connectivity maximization has been proven to be NP-hard for most of the formulations [9]. Several heuristics and rules have been therefore proposed to find suboptimal solutions based on graph theory [10]. In [11], a nonlinear programming formulation to the deployment problem is proposed to determine the locations of the sensor nodes to maximize the network lifetime, with guaranteed coverage and connectivity requirements. A deployment strategy for sensor networks is introduced in [12] to balance the network lifetime and connectivity goals for single and two-hop networks. The problem of relay placement in two-hop networks is analyzed in [13]: the goal is to optimize the number of relay nodes so that each sensor node can communicate with at least one relay node and the network of relay nodes is connected. This is to guarantee a reliable communication between each pair of sensor nodes. More recent literature considers the problem of connectivity in massively dense [10] and cloud-based sensor networks [14]. In particular in [15] the effect of node density and small-world effects on connectivity and deployment optimization is analyzed for ISA SP100 industrial networks. A deployment case study in industrial environments characterized by dense obstructions is also considered and analyzed by Monte Carlo simulations. The problem of connectivity in wireless multihop networks can be also reduced to the problem of investigating how broadcast transmissions can "percolate" in random networks [16]. Graph theory is the natural framework for the exact mathematical modeling of complex network structures characterized by dense interconnected objects.

Modeling of short-range propagation
Industry standard applications demand for accurate prediction of the network connectivity among different machines and instruments. Therefore connectivity models should be robust enough to address imperfect or inaccurate descriptions of the 3D layout (e.g., accounting for mismatches between the simulated 3D model and the actual size, position and configuration of the field equipment). Similarly, small positioning errors of wireless instruments with respect to the simulated deployment should be also accounted for during network performance validation and stress-testing. This motivates the adoption of a stochastic model for the description of the LQI g (d) (1) as being instrumental to link quality certification and virtual deployment. This section introduces the modeling of the short-range channel, being the first step towards the prediction of the wireless machine-type connectivity and coverage. Although several models have been proposed in the literature, e.g., see [17] for reviewing, these cannot fully capture the unique propagation characteristics of industrial environments. In addition, most of conventional ray-tracing tools turn out not to be practical to process the high number of structures and their complexity in large industrial sites [2]. This motivates the development of accurate site-specific channel models based on a set of measurements taken in typical industrial sites. The wireless propagation model [2] herein reviewed describes the correlation between the size and the locations of the objects obstructing the line-of-sight (LOS) path (or Fresnel volumes) and the reliability of the wireless link in terms of received signal strength (RSS). For any link connecting a pair of field devices (FDs) at distance d, the RSS γ is modeled as It combines three terms: (i) a static component E[γ ] = g (d) characterized by a distance dependent (d) LOS term g 0 (d) and a link-specific excess attenuation σ due to propagating wavefronts diffracting around the building blockage; (ii) a dynamic random component s due to moving people [18] or field equipment, typically modeled by Rician distribution [17] with E[s ] = 1; (iii) random disturbance n due to noise and co-channel interference with power E[n ] = μ . In what follows, we focus on modeling of the static component g (d) being a practical indicator of link quality, also referred to as LQI [19]. The impact of dynamic component s and disturbance n in heterogeneous network scenarios are assessed in Sect. 6 according to experiments in real environments. As typically assumed in recent standardization bodies such as ITU [17], the distancedependent static component g 0 (d) provides a description of the radio signals reflecting from the (flat) terrain, while in short-range propagation, 1 the obstruction σ caused by building blockage acts as an additive and independent term. This term quantifies the worst-case obstruction of the Fresnel volume and does not depend on the number of surrounding obstacles. The term g 0 (d) can be described in terms of the Fresnel distance d F : the component is modeled as a function of the path-loss exponents α 0 , α F (see [17]) for d ≤ d F and d > d F , respectively, while g 0 (d 0 ) is the free space channel gain measured at a reference distance (here d 0 = 2 m). The Fresnel distance d F = 2h R h T /λ depends on the wavelength λ and on the antennas height from the ground of the transmitter h T and the receiver h R . The path loss exponent can be reasonably set to α 0 = 2 for d ≤ d F in short range environments where ground reflections can be neglected. Larger exponents α F > α 0 (with typically 2 ≤ α F ≤ 3) are caused by reflections from the ground and are observed over longer range for d > d F .

Connectivity modeling by link classification
Diffraction theory provides an effective tool for modeling the signal power excess attenuation σ as due to objects obstructing the Fresnel zones [2] and absorbing fractions of the propagating energy of the wavefield. This section focuses on the diffraction loss σ and on its sensitivity to varying configurations of the obstructions. The impact on loss g 0 of imperfect positioning is less relevant as confirmed by experiments.
The proposed approach is based on the classification of the propagation into a set of C mutually exclusive link types {C 1 , C 2 , . . . , C C } where each category describes a specific configuration of the building blockage and maps to a " type-specific" probability loss function Pr(σ | ∈ C j ). Any link ∈ C j classified as type j is characterized by an excess attenuation where the operator [·] dB = 10 log 10 (·) indicates dB scale conversion. The excess attenuation is modeled as a log-normal random variable withσ j being a constant term measuring the reference loss (in dB scale) for type C j and w j ∼ N (0, σ 2 j ) acting as superimposed zeromean random fluctuations with standard deviation σ j = std[σ | ∈ C j ]. Disturbance w j models the type-specific variations of the diffraction loss accounting for imperfect layout and positioning [15].
According to the measurements presented in [2], C = 5 mutually exclusive link types have been identified as the ones that provide the best characterization of the wireless propagation in oil refineries. These are summarized in Table 1 and visually illustrated in Fig. 1. The nominal supported range r j for each link class j is computed such that g (r j )| dB = β with β = −85 dBm being the minimum RSS for reliable connectivity such that the probability of packet drop is below 10 −3 . Any link with g (d)| dB < β is assumed as disconnected.
Type I LOS link type is characterized by the absence of obstacles (with dimensions larger than the signal wavelength λ) within the 1st and 2nd Fresnel volumes. Obstacles outside those regions cause a maximum excess attenuation of 1 dB. Type II near-LOS link type is observed in environments where a 'forbidden' sub-region of the 1st Fresnel volume around the LOS path is kept clear from obstacles. Obstacles outside the forbidden region cause an excess attenuation of 4 dB. Type III obstructed-LOS link type is characterized by obstacles inside the forbidden region, while the direct path connecting the transmitter and the receiver is unobstructed. Type IV NLOS link-type is characterized by objects obstructing the 1st Fresnel region, but leaving the remaining higher-order Fresnel regions free from obstacles. Type V severe-NLOS link type refers to a severe NLOS environment where the first/second Fresnel regions are completely obstructed by one or more obstacles with significant size.
The link classification method is applied during the design phase of the plant, while experimental measurements are collected during post-deployment to validate the model. CAD based link classification is based on inspection of the 3D environment (typically provided by the contractor). The obstruction area is identified by analyzing 3D clash point reports (using automatic ray generation to detect the obstruction size) while the link type is chosen from the 5 classes as the one that best matches the observed obstruction area. The chosen link Direct path free from obstacles Fig. 1 Connectivity model calibration based on measurements in oil refinery sites. The predicted RSS values and the corresponding measurements are illustrated for each link type. Measurements (samples) are obtained from different areas of the same refinery site and correspond to links characterized by different obstruction configurations and distances. Classification of links is based on inspection of the 3D model of the plant type is then used as input data for the simulation tool. Notice that for LOS or severe-NLOS configurations, the inspection of the CAD file can be trivially reduced to visual analysis, thus simplifying the overall procedure.
The present approach for the evaluation of the pairwise link channel qualities was validated by a database of radio measurements taken in different refinery sites to cover the most representative scenarios and link types. In Fig. 1 the available measurements (circle markers) are partitioned by classifying the corresponding radio links through an inspection of the 3D model of the site. For each link type we compare the RSS observations with the predicted values (solid lines) based on the proposed model. The measurements analyzed highlight the accuracy of the proposed channel characterization and modeling approach. Prediction of link quality is reasonably tight for LOS types (with errors below 2 dB) while smaller accuracy is observed for NLOS types due to imperfect 3D layout descriptions (and larger fluctuations σ j ).

Connection probability in interference limited environments
It is envisioned that most of wireless technologies operating inside the factory will adopt the 2.4 GHz bands and coexist by sharing the same spectrum with other devices employing different radio protocols [20]. In particular, this is true for the popular WiFi and IEEE 802.15.4 based standards operating in the same unlicensed 2400-2490 MHz ISM band. The possibility to exploit multiple and heterogeneous network technologies deployed in close proximity (i.e., for monitoring/controlling the same industrial process) provides an attractive opportunity for efficient resource sharing and traffic off-loading.
So far we illustrated a model for prediction of LQI g . However, LQI metric is not enough to estimate the successful connection probability P S in the presence of interference [21]. The signal to interference ratio SIR = g /μ is thus the metric to assess probability P S for any link ∈ C j where model for LQI g is based on (1) with σ in (3), while and erf [·] is the error function. The term β/β I indicates the critical value of co-channel disturbance μ captured by the receiver above which interference (and SIR) has a relevant impact on connectivity [22]. The RSS threshold β = −85 dBm [2] depends on receiver sensitivity and limits the performance in interference-free scenarios. As experimentally verified (see Sect. 4.1), the threshold β I = β I (η) critically depends on the degree of spectrum overlapping η ∈ [0, 1] between the useful signal and the co-channel disturbance. Overlapping is defined as the amount of interference power η × μ lying over the considered IEEE 802.15.4 channels [21]. Threshold β I (η) is evaluated experimentally for the relevant case (in the industrial context) of IEEE 802.15.4 devices acting as victims of WiFi IEEE 802.11g interference and subject to full (η ≥ 0.5) or partial (η < 0.5) spectrum overlapping. Although threshold β I depends in general on overlapping factor η, we propose to use a simplified model where β I is described by two states reflecting a critical interference condition (full overlapping η ≥ 0.5) and a less-critical situation (partial overlapping η < 0.5).

IEEE 802.15.4 and WiFi coexistence
The set-up depicted in Fig. 2a [23] 2420 MHz. The considered interference scenarios are characterized by varying powers μ and spectrum overlapping η, both measured by a 2.4 GHz spectrum analyzer.
In Fig. 2b we analyze the successful connection probability P S (i.e., counting the number of successfully acknowledged data frames) for varying SIR (4) assuming full overlapping η ≥ 0.5 (channels [11][12][13][14] and bursty WiFi traffic. The optimal threshold β I for model (4) to hold can be reasonably set to β I = 15 dB. As confirmed from (6), the use of channels experiencing η ≥ 0.5 must be avoided by blacklisting (when possible) for SIR < 15 dB. In Fig. 2c probability P S is now evaluated over 7 consecutive channels to highlight the impact of full/partial spectrum overlapping and interference traffic loads (during P2P group formation [23] and bursty traffic). The use of partially overlapped 2 channels (15-17) with η < 0.5 might be tolerated without significant penalties even at low SIR regime (when SIR > −6 dB).

Connectivity optimization for virtual network deployment
The multihop paradigm supported by industrial standards WirelessHART and ISA SP100 has the merit of enabling extremely low power consumption and long battery lifetime, however it creates a network topology with characteristics that are quite different from those typically observed in cellular networks. This is more evident if we look to the device connectivity. While a mobile device in a cellular system is "connected" if it has a wireless link to at least one base station, in multihop topologies each device contributes to the connectivity of the entire network. The quality of device connectivity depends critically on the node spatial density and the complexity of the environment.
In what follows, the industrial network is modeled by an undirected geometrical graph The proposed network layout optimization consists of three phases: Network structure identification The modular structure of the network is analyzed to identify potential weaknesses of the layout. A spectral graph partitioning method [24] is used to identify possibly disconnected or weakly connected network structures over the deployment G. Weakly connected networks are defined in general as groups (or clusters) of wireless devices such that there is a higher density of links within groups than between them. A cluster of G is thus a subset of N that is richly intra-connected (cohesive group) but sparsely connected with the remaining vertices of the graph. Weakly connected groups can be considered as the bottleneck of the wireless system and potentially critical in case of layout inaccuracies or interference. The cohesive groups can be identified by analyzing the eigenvalues and eigenvector pairs (λ i , v i ) of the Laplacian matrix [25] L(G) = K(G) − C(G) of graph G where K(G) = diag(k 1 , . . . , k a , . . . , k N ) and is the degree of the device a. Being for Laplacian matrices λ 1 = 0, the N length eigenvector components v 2 , . . . , v Q+1 corresponding to the Q consecutive Laplacian eigenvalues λ 2 , . . . , λ Q+1 lying in a small gap away from zero provide a virtual representation of Q + 1 weakly connected FDs sub-networks characterized by dense connectivity within each group [25]. Graph partitioning can be improved using several refinement techniques [26]. An effective method is to look for the links in the network that are responsible for connecting many pairs of devices (e.g., by shortest path) and assigning them an high cost metric ("betweenness" [27]). Network components emerge by removing progressively the links with the largest betweenness: these links are thus critical for relay deployment.
Relay and node deployment for topology control The physical structure of the network in terms of node adjacencies is designed for connectivity and topology control. The proposed deployment algorithm iteratively adds new relay nodes among M candidate positions (namely identified during pre-commissioning of the plant) to guarantee robust connectivity, therefore by increasing the number of edges running between weakly connected clusters (namely the cut size). The method can be configured to implement several metrics for optimal relay placement (see [6] for a survey). Based on the model of Sect. 3, a reasonable strategy adopted here is to deploy new relays (i) to strengthen connectivity of weakly connected groups using the algebraic connectivity [28] as performance metric (see the following section) and (ii) to minimize the use of critical NLOS type links (Type 2), being highly sensitive to 3D model inaccuracies and interference. When R ≤ M relay nodes are added, they form a new " augmented" graph G (R) while the relay placement stops when the algebraic connectivity, corresponding to graph G (R) satisfies a target value ξ .
Relay configuration Relay configuration algorithm takes as input the node deployment results (the positions of additional relays) and optimizes the network configuration and routing paths. The algorithm described in Sect. 5.3 assigns the (single or two hop) routing paths between the FDs and the GW in such a way to guarantee the minimal use of Relays and to minimize the number of links subject to severe NLOS. During this last stage the optimization approach is now based on the selection of the smallest subset of devices that need to be configured as Relays to guarantee single/two-hop reliable connectivity towards the GW.
Interference stress-testing Connectivity performance is tested under a simulated WiFi shared access scenario. Stress-testing of connectivity is thus implemented to determine the safe usage limits of the chosen layout in interference-limited environments characterized by the tuple (μ , η) according to (4).

Performance metrics
Different approaches to relay deployment for topology control will produce different network designs: it is therefore useful to provide key metrics to assess the usefulness of a network structure as the output of the chosen optimization parameters.
Algebraic connectivity Algebraic connectivity [28] provides a powerful metric to assess the quality of information flow inside the network and the connectivity robustness. The algebraic connectivity λ 2 is defined as the second smallest eigenvalue of the Laplacian (7) L(G) of graph G. On every new deployed relay, the algebraic connectivity of the relay-augmented graph G (R) is computed as λ 2 [G (R) ] while the relay placement stops when λ 2 > ξ, with ξ indicating a critical convergence time of the information flow inside the network. The above condition also ensures that the network connectivity can tolerate up to a maximum of ξ random node (or link) failures due to model layout or machine positioning inaccuracies (and interference).
Energy efficiency For a variety of wireless embedded devices, minimizing the energy to be spent for communication purposes is a primary constraint [29]. It is therefore mandatory to develop solutions to optimize energy usage (even at the expenses of performance loss). Given that in recent radio transceiver designs the energy spent for transmission is comparable to the cost for receiving [30], then the node degree k a (8) provides a reasonable indicator of node lifetime by counting the number of links monitored by the device a ∈ N (for transmission/reception) during each network activity cycle. 3 The electric charge subtracted by node a to the battery (energy cost) during one activity cycle is approximated as where Q T −R accounts for the electric charge spent by the transceiver in active state while Q S is the cost of active internal oscillator and RAM (e.g., sleep mode). Node lifetime can be modeled as T li f e = T cycle × C/Q a where T cycle measure the duration of one cloud activity cycle and C is the battery capacity.

Network structure identification and node deployment
The deployment optimization can be in general applied to random networks modeled as graphs where connectivity depends on the complexity of the industrial site. In what follows we propose an algorithm for relay placement that identifies the weaknesses of the network structure and in turn select the best position of relays such that reliable connectivity is observed (with some degree of robustness). The approach is thus intended for monitoring and control systems operating in time (and safety) critical conditions. The proposed relay placement algorithm takes as input any network corresponding to a deployment of an arbitrary number N of FDs (comprising of the Gateway) in a random industrial field characterized by an arbitrary number of link types with connectivity modeled as in (1). Relay placement algorithm first identifies disconnected (or weakly connected) network structures of graph G and then iteratively choose the best R ≤ M relays among M > N candidate relay positions 4 to connect those components with the GW node.
The example of Fig. 3 is highlighted to illustrate the iterative relay node deployment approach using a reference layout. In what follows, the effect of severe NLOS propagation is considered by simulating a simplified industrial environment characterized by C = 2 mutually exclusive link types modeling severe NLOS (now indicated by j = 1) and near LOS ( j = 2) propagation, respectively. The corresponding attenuation parameters are those presented in Table 1 [v 2 ] i∈N 3 0. At first iteration, the relay is chosen among M = 10 candidate set points in such a way to connect node 7 with the Gateway community N 1 . The new graph G (1) of N + 1 devices is now weakly connected as a(G (1) ) = 0.65. At second step a new relay is chosen to connect community N 1 and N 2 : nodes 2 and 8 can exploit a secondary path connecting with the GW node. In the final step a third relay provides a(G (3) ) = 1.23 while an alternative path is established for FD 7. To conclude, for the considered topology the additional deployment of R = 3 relay nodes guarantees reliable connectivity as a(G (3) ) > ξ, with ξ = 1.

Relay configuration
In this section the network configuration is optimized by assigning a subset of the PHY links to reliably connect FDs with the GW. The algorithm assigns the (single or two hop) routing paths from the FDs to the GW in such a way to guarantee the minimal use of relays. To address practical delay (and real-time) constraints typical for industry standard applications, the maximum number of hops connecting each FDs with the Gateway is here limited to 2. The optimization approach minimizes the number of FDs connected with the Gateway throughout the relays. Position of relays is identified in Sect. 5.2. The algorithm assigns the (single or two hop) primary routing paths between the FDs and the GW in such a way to minimize the number of deployed Relays and to avoid the use of links with low quality of service (e.g., subject to NLOS type propagation).
Let the wireless network be represented by a set S of N nodes located at known positions within a specific area of the plant. A sequence of messages is continuously transmitted by the FDs toward a common Gateway node labeled as 0 possibly with the help of one intermediate node serving as Relay. Any wireless FD a ∈ S is said to be connected with reasonable quality to the Gateway node 0 iff i a,0 > 0 where the indicator i a,0 for an arbitrary link := (a, 0) measure the link quality and assigns a reward to the link based on its specific type i a,0 = 0 iff g ≤ β disconnected case (10) i a,0 = 1 iff g > β and link ∈ Type V (11) i a,0 = 2 iff g > β and link ∈ Type IV (12) i a,0 = 3 iff g > β and link ∈ Type III (13) i a,0 = 4 iff g > β and link ∈ Type II (14) i a,0 = 5 iff g > β and link ∈ Type I The sensitivity threshold β = −85 dBm accounts for the random fluctuations of the static RSS component g . The link indicator i a,0 assigns the largest reward to links classified as Type I. Unreliable Type V links have the lowest reward and should be chosen only to guarantee connectivity. Deployment optimization consists of three phases:

Selection of candidate relays
First, it is defined the subset S q ⊂ S of N q nodes with either no direct connection to the Gateway or experiencing insufficient link quality i a,0 ≤ q, with q > 0 being the assigned link quality target the same nodes a ∈ S q are pre-configured as FDs and they should not provide relaying functionalities. The remaining subset Sq := S\S q of Nq = N − N q devices observing a reliable connection with the Gateway contains either as Relays or FDs. As an example for q = 1 the links in subset Sq with corresponding Types I, II, III and IV are assigned as reliable, Type V links are assigned as unreliable. The optimal configuration of devices in subset Sq is carried out in the following steps.

Feasibility region for the connectivity problem
Assuming all nodes b ∈ Sq be initially configured as Relays, a solution to the connectivity problem for the FDs a ∈ S q without a reliable direct connection with the Gateway exists if such that all the FDs a ∈ S q can exploit an alternative two-hop link through one Relay b ∈ Sq serving as range extender. In case the condition is not satisfied the number of candidate points is not sufficient for a feasible solution to the coverage problem (as the corresponding graph is disconnected). Primary links Secondary (redundant) links

Routing graph assignment and link configuration (IEC 62591)
Available PHY links Field Device Relay (decode and forward) Gateway

Relay selection and configuration
Among the K =

Nq n=1
Nq n potential subsets R k ⊆ Sq of devices configured as Relays, with k = 1, . . . , K , the optimal subset is defined as the one satisfying the feasibility region (18) and with the smallest cardinality. By letting |R k | be the cardinality of the kth subset R k , the algorithm identifies the optimalkth subset of devices Rk ⊆ Sq such that The devices b ∈ Rk are thus configured as Relays while the other devices a ∈ S\Rk take the role of FDs. Notice that S q ⊆ S\Rk . The iterative algorithm described as follows is used to find a solution to problem (19). Let the ordering of Relay subsets be such that ∀k |R k | ≥ |R k+1 |, the algorithm starts by picking the largest feasible set of Relays, so that R 1 ≡ Sq and iteratively identifies new feasible subsets R k ⊂ Sq with smaller cardinality (k > 1) by randomly removing nodes from Sq . The optimal sub-set Rk solution to (19) is such that any smaller sub-set of Relays R h with h >k is not feasible as min or, equivalently, for any subset R h with smaller cardinality R h ⊂ Rk some of the links might experience unreliable service (compared to link quality target q).
Based on the example of Sect. 5.2, the relay configuration results for the same setting are illustrated in Fig. 4: primary routing paths are highlighted in solid lines while secondary (alternative) links for FDs connecting to relays are in dashed lines.

Network design and planning toolkit
This section describes the software tool named RF Propagation Simulator (RFSim) that was developed to support virtual network design and planning. As detailed in the incoming sections, the aim of the tool is to allow designers to rapidly assess different wireless network configurations before on-site installation is performed, and also supporting operators during post-layout verification. In order to validate the proposed tool, the results from a real deployment case study are compared with those obtained by the simulator.

Tool description
RFSim is designed to make simulations of the RF signal propagation using the model described in Sect. 3. The tool is also adapted to allow the optimization of the connectivity for virtual network deployment, following the optimization procedure presented in Sect. 5. RFSim is intended to be used at the design phase of the plant, before any real equipment is physically deployed.
The first step for performing a simulation is to import the 2D CAD file of the industrial facility into RFSim. It currently works with a proper XML file format that contains information about the wireless nodes position and characteristics, the obstacles within the plant (which are of basic geometrical format), and an optional background image of the plant. Editing the plant can be performed using the RFSim graphical front-end, with the single restriction that wireless nodes can be positioned anywhere but inside the obstacles. Given that the tool currently does not have zooming facility, the user should avoid using more than 10 nodes within the same visible screen area. However, considering that the user can slide the window, in terms of editing capacity there are no limits in respect to the number of devices that can be added into the plant.
The network devices that can be added into the plant are the following: (i) the Field Devices (FD) are the input/output field wireless instruments configured to support message relaying of adjacent FDs by decode and forward; (ii) the Relays Nodes (RN) are special FDs serving as network infrastructure to improve connectivity by relaying data to/from the FDs and the Gateway (GW); (iii) the GW acts as access point and network manager, collecting the measurements acquired by the field devices.
Link classification is carried out during the design phase of the plant (see Sect. 3.1) and it is based on automatic inspection of the 3D CAD of the environment. For link classification, it is necessary to identify the structure of available data, in addition data-base simplification might be also applied to remove objects with marginal size (2D objects and 3D polygons with size smaller than the wavelength).
Both devices and their respective links should be properly characterized before making the simulation. Each deployed node should include a given protocol standard (WirelessHART or ISA SP-100), its operation frequency, height from the ground, antenna type, and gain. Table 2 summarizes the node characterization options. In addition, every link related to a given node should be characterized according to the link types presented in Sect. 3 (from Type I to Type V).
As the user finishes editing the model it is possible to perform the RF propagation simulation. This is done by running an algorithm that calculates the signal propagation (see Sect 3) for every link i, j (from device i to device j) using the characteristics defined for device i and the link classification. The algorithm calculation procedure is pretty fast, as it has Θ(n 2 ) complexity in the worst case (when all nodes have different parameters). Deployments with  up to 25 FDs were tested and took around 30 seconds to complete the simulation using an AMD Phenom N970 Quad-Core with 4 GB Ram. RFSim can also be used to perform a deployment optimization procedure. Therefore, the user should first select the performance metric of interest (algebraic connectivity or energy efficiency-see Sect. 5.1). As result of this optimization, candidate relay nodes are automatically inserted in suggested positions of the plant. After that, the plant designer must double-check the feasibility of placing the relay in the suggested location, configure the link types, and perform again the RF simulation.   Figure 6 shows the same plant configuration, now by highlighting some important aspects. In this figure the position of the network manager NM was selected by the user. When a single node is selected, the RFSim tool automatically draws the five zones corresponding to the link types and highlights the nodes that can reliably communicate (according to the propagation models for each link type). The inner zone corresponds to link Type V while the outer zone is for link Type I. Additionally, the tool characterizes the links with information about the distance to the target node (upper part of the line) and the calculated signal power (bottom part of the line), as also illustrated in Fig. 6. Links not related with the selected node are put in background.
In this example, although some FDs have connectivity among each other, none of them has reliable connectivity with the NM. This in turn highlights a typical case in oil refineries where metallic obstacles (two large tanks in this case) cause the network to be separated into disconnected (or "weakly" connected) clusters of FDs. For all cases, the FDs are deployed at ground level. In particular, the simulation results show that the field devices FD1-FD2-FD3 and FD4-FD5, respectively constitute two isolated communities that are both out of range of the NM. Therefore it was necessary to find appropriate positions for the relay nodes.
The RFSim can be used to perform the deployment optimization procedure while the user should select the performance metrics (algebraic connectivity or energy efficiency-see Sect. 5.1). Thereby, candidate relay nodes are automatically positioned in the plant, avoiding other nodes and also obstacles. After that, the plant designer must double-check the feasibility of the node location and properly configure the link types (post-layout verification). In the current example, it was selected the energy efficiency metric, so two relay nodes were selected (RN1 and RN2), as depicted in Fig. 7. The positions of the two relays (RN1 and RN2) are optimized to connect both clusters with the NM. As these nodes where positioned by the simulation tool, their links had to be classified by the user according to the inspection of the 3D plant, following the procedure explained in the previous section. The links from the relay nodes to the NM were classified as of Type III. Such deployment guaranteed that the network topology is fully-connected and that redundant paths are available. More specifically, relay RN1 is deployed to connect cluster 2 (FD1-FD3) with the NM, while relay RN2 provides two alternative routing paths for cluster 1 (FD4-FD5) by relaying data either directly to the NM or to cluster 2.

Deployment case study and validation with on-site measurements
As shown in Fig. 8 before the tests we used a 2.4 GHz spectrum analyzer to detect possible co-channel interferers in the band 2.400-2495 GHz. Although no RF activity was detected, the band 2.485-2495 GHz is subject to a 5 dB higher interference power and might cause disturbance over the IEEE 802.15.4 channel 26. The Gateway node (i.e., the network manager NM) was thus configured to operate over the channel 23 (not subject to interference), while blacklisting of channel 26 is recommended.
The case study of Fig. 9 shows a practical example of layout design for industrial sensor network where post-layout verification is also carried out to verify the predicted model. The wireless instruments (gauge pressure sensors) are now deployed in different site of the same oil refinery (of size 120 m × 45 m) where a cooling tower unit causes the network to be partitioned into two clusters (the FDs are deployed at ground level). A single network manager NM with one Gateway GW is deployed to collect data from FDs and re-route them over a Fieldbus network. The deployed wireless instruments conform to ISA IEC62734. The Fig. 9 shows the optimal position of the GW to guarantee connectivity with all the FDs: this is located on the staircase behind the cooling structure (6m from ground level). Connectivity structure and link classification have been obtained by analysis of the 3D CAD model of the plant and validated by measurements carried out in the corresponding site (see floor map plant in Fig. 9). Although connectivity is observed, additional relay devices are deployed to limit the use of unreliable NLOS links (of Types IV and V) that would penalize the QoS in case of model inaccuracies or co-channel interference.
The corresponding virtual simulated environment is illustrated at the bottom of Fig. 9. Here we tackled the problem of reinforcing connectivity focusing on the weakly connected sub-graph G s ⊂ G of FDs (1)(2)(3)(4). Remaining nodes are not considered as critical being connected to the GW by LOS type links (of Types I, II and III) with predicted LQI (1) larger than −58 dBm for all cases and P S ∼ 0.99. The additional deployment of R = 2 relay nodes connected with the GW by Type 1 guarantees λ 2 > 1 and P S ∼ 0.99 for the two-hop relayed paths, providing a suitable network configuration.
Focusing on node lifetime, the relay R2 monitors k R2 = 6 links and is the most critical instrument as max a∈N k a = k R2 . Electric charge is modeled as in (9) [1] composed by 127 bytes, and reception (or transmission) of the corresponding ACK frame of 1 ms [1]. Therefore Q T −R 19 mA×4 ms+19 mA×1 ms= 95 µC (micro-Coulombs). The additional cost of memoryhold sleep-state is Q S = 25 µC [30]. Using (9), the electric charge subtracted to battery by relay R2 on every activity cycle is thus Q R2 = k R2 Q T −R + Q S = 595 µC. For a battery with capacity C =8500 mAh (typical for C-cell lithium battery), the lifetime of relay R2 is predicted as T li f e 1. 6 year, for T cycle = 1 s of activity cycle.
A stress-testing of relay deployment for graph G s is performed by simulating a fully overlapping (η = 1) WiFi interferer acting as bursty disturbance with power μ = −98 dBm. Since μ ≥ β/β I = −100 dBm with threshold β I modeled as in (6), then connection probability is ruled by SIR according to (4). While LOS Type I, II, III links are marginally influenced Stress-testing of deployment is simulated by a WiFi interference with power μ = −98 dBm. R = 2 relays are deployed to reinforce connectivity by the additional interference, for NLOS Type IV, V links unreliable connectivity is observed with P S ∼ 0.47. This is due to WiFi disturbance, combined with possible inaccuracies of 3D layouts and positioning. The deployment of the relay nodes guarantees connectivity even in the presence of overlapping interference: the network structure highlighted at bottom of Fig.  9 can be considered as "interference-immune" after stress-testing.

Concluding remarks and open issues
The paper presented a new approach for supporting the deployment of industrial networks, looking at oil refineries as relevant case study. An ad-hoc simulation tool named RFSim has been developed to allow the prediction of the link quality information before any real deployment is conducted. It uses as input the 2D model of the industrial site under analysis and computes the link quality according to site-specific link types that characterize the density and the size of obstructions limiting the radio propagation. Besides, the proposed approach also provides a solution to support network optimization in terms of relay nodes positioning.
Modeling inaccuracies in RFSim could potentially mask the simulation results. However, the adopted RF propagation model already addresses this fact, as it was designed to tolerate imperfections layout and positioning. The obtained simulation results were compared with on-site measurements and seem very close. Based on the developed connectivity modeling, we also proposed a network optimization strategy, which has been successfully tested by simulations and in the oil refinery area. The next steps of this work will be to fully automate the link classification process within RFSim tool and to extend it to support post-layout verification, allowing to collect and process on-site measurements and compare them with the simulation results.