**1. Introduction**

Industrial wireless sensor networks (IWSNs) play a key role in smart manufacturing by enabling a wide range of monitoring, control and optimization processes. In a typical IWSN, the operating parameters of a machine in the factory, e.g., the vibration frequency, pressure, flow rate, coolant level, and so on, are measured by one or more sensors and the sensor signals are then transmitted wirelessly to a gateway, from which they are passed to a remote server via a wired or wireless network for further processing and/or storage. Typically, the server performs online calculations on the sensed data using domain knowledge and transmits appropriate control commands back to the factory to control the corresponding actuators, provided that the calculation results satisfy certain predefined conditions. For example, the server may instruct the machine to close a valve or reduce the conveyor speed. The remote server may also analyze the sensed data offline, e.g., by inputting the manufacturing parameters and product yield data into a Deep Neural Network (DNN) in order to derive the optimal manufacturing parameters, for example.

There are two international standards for the IWSN protocol stack in industry at present, namely WirelessHART [1], established by the HART Communication Foundation (HCF), and ISA 100.11a [2], developed by the International Society of Automation (ISA). In both standards, the data transmissions in the physical layer are performed using IEEE 802.15.4-2006 [3], while media access is achieved using Time Division Multiple Access (TDMA), and routing at the network layer is conducted using Graph Routing. Academic researchers and industrial organizations, such as IEEE and IETF, have proposed many communication protocols and standards for IWSNs. Many of these protocols are

implemented in OpenWSN [4], an open-source project using IEEE 802.15.4-2006 in the hardware layer (like WirelessHART and ISA 100.11a) and Time-Slotted Channel Hopping (TSCH) technology in IEEE 802.15.4e [5] in the lower part of the Media Access Control (MAC) layer. In addition, the higher part of the MAC layer adopts the Internet Protocol version 6 (IPv6) over the Time Slotted Channel Hopping mode of IEEE 802.15.4e (6TiSCH) Minimal Scheduling Function (MSF) and the 6TiSCH Operation Sublayer (6top) Protocol (6P) formulated by the 6TiSCH working group of the IETF. The network layer adopts protocols such as IPv6, Internet Control Message Protocol version 6 (ICMPv6), IPv6 over Low-Power Wireless Personal Area Networks (6LowPAN) and Routing Protocol for Low-Power and Lossy Networks (RPL) formulated by the IETF, while the transport layer uses User Datagram Protocol (UDP) and Constrained Application Protocol (CoAP), also formulated by the IETF. The application layer is left to the user for customization.

The transmission reliability, delay and lifetime of an IWSN are all critically dependent on its design. However, an IWSN is often composed of hundreds or even thousands of sensing nodes. Thus, optimizing the IWSN design in-situ using experimental methods is extremely challenging, if not impossible. Accordingly, before the actual deployment of the IWSN, it is desirable to evaluate the function and effectiveness of the network through systematic simulations using a simulator model as close as possible to that of the environment in which the network will be deployed. Among all the measures of the IWSN performance, the transmission reliability is one of the most important, and is defined as the probability of successful delivery of the sensed data from the sensing nodes to the gateway used to route the data to the remote server. In real-world environments, the transmission of frames via the wireless medium may fail for various reasons, including noise interference, low signal energy due to multipath attenuation, and so on. To simulate such transmission failures, it is necessary to employ an error model which accurately characterizes the errors associated with the real wireless environments. In particular, simulations on the cases with lots of transmission failures are important for applications requiring dependable operations, e.g., gas metering applications. The OpenSim simulator [6] in OpenWSN uses an independent error model (also known as the Bernoulli error model), which assumes that the frame transmission success has a fixed probability (generally referred to as the Frame Delivery Ratio (FDR)). However, the transmission quality of wireless links is affected by many factors in the field environment and frequently changes over time. Consequently, the simple Bernoulli error model limits the ability of the OpenWSN simulator to accurately evaluate the transmission performance of an IWSN.

To address this problem, the present study derives a frame error model which more accurately represents the wireless conditions in a real-world factory environment by measuring the transmissions in a machine-intensive factory over a period of almost 24 h and then using the measurement records to construct a frame-level second-order Markov model as an error model. Note that the proposed error model is mainly suitable for the industrial environments where there are only IEEE 802.15.4 devices operating in 2.4 GHz Industrial, Scientific and Medical (ISM) band (that is, it will be inappropriate to apply our model in the factory environment with devices supporting IEEE 802.11.). It is shown that the Cumulative Distribution Functions (CDFs) of the number of consecutively received correct frames (i.e., the correct-frame burst length) and the number of consecutively received error frames (i.e., the error-frame burst length) synthesized by the proposed model are very close to those of the original records. Moreover, the simulation results show that the proposed model improves the estimation accuracy of the transmission reliability by up to 12% compared to that achieved using the original independent error model in OpenWSN.

The remainder of this paper is organized as follows. Section 2 briefly reviews the related work in the literature. Section 3 describes the data collection methods employed in the present study and gives the preliminary analysis results. Section 4 describes the proposed error model and verifies its correctness. Section 5 analyzes and explains the overestimation errors of the independent error model in OpenWSN for the transmission reliability. Section 6 presents and discusses the simulation results obtained using the proposed error model. Finally, Section 7 provides some brief concluding remarks.

#### **2. Related Work**

In general, error models for IWSNs can be categorized into two main types, namely bit-level error models and frame-level error models. Models of the former type consider each bit of a frame to be either erroneous or correct, and assume that a frame is transmitted successfully if no bit is wrong. By contrast, models of the latter type judge the entire frame directly as either erroneous or correct. Generally speaking, bit-level error models provide subtler channel-state information than frame-level models, whereas the frame-level models offer better scalability due to their greater simplicity.

Nobre et al. [7–9] developed a WirelessHART communication module for Network Simulator 3 (NS-3) [10] based on a bit-level two-state Markov chain error model designated as the Gilbert/Elliot model. Remke et al. [11] modeled WirelessHART networks with bit failures using a Binary Symmetric Channel (BSC) model [12] and link failures using a two-state Markov chain. Barac et al. [13] analyzed the bit- and symbol-error nature of IEEE 802.15.4 transmissions in actual industrial sites and then employed the collected error traces to evaluate the performance of a lightweight Reed-Solomon (15, *k*) block code.

Gao et al. [14] adopted a frame-level two-state Markov error model to evaluate the Quality-of-Service (QoS) performance of IEEE 802.15.4 MAC under bursty channel errors. Petrova et al. [15] analyzed the performance of IEEE 802.15.4 based on Received Signal Strength Indicator (RSSI), Frame Error Rate (FER) and run length distribution measurements obtained in indoor and outdoor environments. It was shown that the independent and two-state Markov error models both provided an adequate modeling performance for short transmission distances, but the two-state Markov model slightly outperformed the independent model over longer distances. Wijetunge et al. [16] used a three-dimensional discrete-time Markov chain model to analyze the IEEE 802.15.4 MAC protocol with Acknowledgement (ACK) frame transmission.

Iqbal and Khayam [17] conducted transmission experiments in a two-story building for transmission distances of 5 to 12 m, a frame size of 20 bytes and a transmission rate of 10 frames per second. The transmission records were then used to construct a two-level error model consisting of a two-state Markov model in the first level for predicting the error probability of the frames, and a third-order Markov model in the second level for-predicting the error probability of each bit in any frames flagged in the first level. However, since the transmission records were not collected in factories, there is no guarantee that the two-level error model can be applied in IWSN environments. Ilyas and Radha [18] measured the transmission quality in office, home and outdoor environments over channel 26 (2479–2481 MHz) for a transmission power of 0 dBm and a transmitted frame size of 41 bytes. The measurement results obtained for partially lost frames and frames that failed the Cyclic Redundancy Check (CRC) test were then used to construct a a discretized exponential Probability Density Function (PDF) error model. However, as for the study of Iqbal and Khayam [17], the model is not directly applicable to factory environments. Moreover, the experimental measurements did not consider the case where the frames were not received at all.

Striccoli et al. [19] proposed a Markov error model with *K* states to account for the various conditions a lossy wireless channel may undergo. Each state contained two substates, ON and OFF, modeled with probability distributions of Error Free Bursts (EFBs) and Error Bursts (EBs) respectively, where an EFB represents a sequence of consecutive correct frames, while an EB represents a sequence of consecutive erroneous frames. The state of the error model was switched among the substates to generate EFB/EB from the probability distributions of the selected substate. However, the model was trained using data traces collected in laboratories rather than industrial environments. Furthermore, a frame was marked as correct only when the transmitter received acknowledgment of the frame's correct receipt. Hence, although the traces reflect the characteristics of bi-directional transmissions, they may not be suitable for unidirectional transmissions, such as beacon frame broadcasting.

Guntupalli et al. [20,21] proposed a frame-level error model for error-prone channels with one state in the loss macro-state and three states in the non-loss macro-state. However, the error model was configured according to field measurements [22] collected in an 802.11 Wireless Local Area Network (WLAN) rather than IEEE 802.15.4 WLAN. Valle et al. [23,24] proposed a retransmission scheme for WSNs based on cooperative relays and network coding and evaluated its effectiveness using Objective Modular Network Testbed in C++ (OMNeT++) [25] with a semi-Markov error model [26].
