# Two-Layer Hierarchy Optimization Model for Communication Protocol in Railway Wireless Monitoring Networks

Authors: Xiaoping Ma; Honghui Dong; Junqing Tang; Limin Jia; Yong Qin; Ruijun Cheng
Journal: Wireless Communications and Mobile Computing
 (2018)

---

## Abstract

The wireless monitoring system is always destroyed by the insufficient energy of the sensors in railway. Hence, how to optimize the communication protocol and extend the system lifetime is crucial to ensure the stability of system. However, the existing studies focused primarily on cluster-based or multihop protocols individually, which are ineffective in coping with the complex communication scenarios in the railway wireless monitoring system (RWMS). This study proposes a hybrid protocol which combines the cluster-based and multihop protocols (CMCP) to minimize and balance the energy consumption in different sections of the RWMS. In the first hierarchy, the total energy consumption is minimized by optimizing the cluster quantities in the cluster-based protocol and the number of hops and the corresponding hop distances in the multihop protocol. In the second hierarchy, the energy consumption is balanced through rotating the cluster head (CH) in the subnetworks and further optimizing the hops and the corresponding hop distances in the backbone network. On this basis, the system lifetime is maximized with the minimum and balance energy consumption among the sensors. Furthermore, the hybrid particle swarm optimization and genetic algorithm (PSO-GA) are adopted to optimize the energy consumption from the two-layer hierarchy. Finally, the effectiveness of the proposed CMCP is verified in the simulation. The performances of the proposed CMCP in system lifetime, residual energy, and the corresponding variance are all superior to the LEACH protocol widely applied in the previous research. The effective protocol proposed in this study can facilitate the application of the wireless monitoring network in the railway system and enhance safety operation of the railway.


---

## Body

## 1. Introduction

The rapid development of the high-speed railway brings great convenience for the travel of passengers. However, the railway infrastructure will wear and tear with the increase of the train operation speed and mileage, which may incur the train derailment or other accidents [1]. Therefore, how to monitor the service condition is crucial to predict and prevent the accident caused by the failure of railway infrastructure [2]. Nowadays, the track inspection vehicles are widely used to detect the infrastructure failure periodically, whereas the real-time information is not available [3], and it is hard to determine its inspection frequency which will impact the detection effectiveness and costs. Higher frequency can provide more information to support the fault diagnosis but incurs more monitoring costs, while the infrastructure failure may be ignored with a lower detection frequency. To address these deficiencies, the wireless monitoring system for the high-speed railway system has become a very effective way to accurately detect and timely transmit the railway infrastructure service condition [4, 5]. The sensors are deployed along the rail to detect the infrastructure condition in the wireless monitoring system, whereas the lifetime of sensors is subject to their limited energy storage, computing ability, and communication bandwidth, which highly impacts the stability of the monitoring system [6]. A few studies have been conducted to make full use of the limited energy of sensors to extend the system lifetime, including the transmission power adjustment to reduce energy consumption [7] and the optimization of sensors deployment to reduce the energy utilization [8]. However, the sensors are installed in advance for particular monitoring tasks in the railway wireless monitoring system, though it is more practical and effective to optimize the communication protocol to prolong the lifetime of the sensors and system.The communication protocol optimization for the wireless monitoring system has been extensively studied in existing research, which can be divided into single-hop [9], multihop [10], and cluster-based [11] strategies according to the communication structure of the monitoring network. The multihop communication protocol is suitable to cope with the linear communication issues. The distances between the sensors and base station are always different in the linear communication system, and the single-hop or cluster-based protocol will cause the unbalance of the energy consumption among all sensors, whereas the multihop protocol shows its superiority in balancing the energy consumption by the adjustment of transmission routes. The cluster-based protocol is always adopted in the tree or net communication system, in which the sensors are always centralized and far away from the base station and it is energy-wasting if all sensors communicate with the base station separately. Hence, the cluster-based protocol is adopted to select one cluster head in each cluster, to collect the information from others and subsequently transmit them to the base station. For the railway wireless monitoring system, the structure of the network can be regarded as a linear system from the overall perspective because the detection and communication units are deployed along the linear rail, while many sensors are installed in one monitoring section, and the monitoring network should be considered as a net or tree structure from the partial view. Therefore, it is hard to reduce the energy consumption of sensors using any single protocol adopted in previous research. In this paper, a hybrid communication protocol (CMCP) is proposed to enhance the energy efficiency and extend the lifetime of the railway wireless monitoring system. The contributions of this paper are summarized as follows:(1)
The two-layer structure of the monitoring system is designed in this paper and the cluster-based protocol and the multihop protocol are adopted in the local monitoring section and the whole network, respectively.(2)
The hierarchy optimization strategy is proposed in the paper. The number of the clusters, the hops, and hop distances are optimized firstly to minimize the total energy consumption. Subsequently, the consumption among the sensors is balanced using the optimization of communication sequences.(3)
The hybrid PSO-GA optimization algorithm is adopted in this paper, which could accelerate the optimization speed and improve the optimization solutions. Additionally, the methodology fills the research gap in providing a comprehensive protocol for the communication network in the railway wireless monitoring system.The remainder of this paper is organized as follows. Section2 is the literature review. Sections 3 and 4 introduce the railway wireless monitoring system and the two-layer optimization model for energy consumption, respectively. The performance evaluation is presented in Section 5. Finally, conclusions are discussed in Section 6.


## 2. Literature Review

The communication protocols employed in existing wireless monitoring system studies can be primarily grouped into three categories: single-hop strategy, multihop strategy, and cluster-based strategy. With respect to the multihop protocols, the system lifetime is extended by making full use of the limited energy of the sensors. On the one hand, some research focused on balancing the traffic load to prolong the system lifetime. Wu et al. introduced a potential model and proposed a routing scheme based on the nodes local topology information to maximize the lifetime of wireless sensor network. In the model, the sinks were adopted to monitor the traffic load and then the parameter was adjusted to balance the traffic load among the nodes [12]. Bhattacharjee and Bandyopadhyay proposed a node cost based energy-efficiency protocol, which considered the remaining energy and energy efficiency to balance the data traffic among the nodes and prolonged the system lifetime [13]. Kacimi et al. proposed some strategies that balanced the energy consumption of the nodes and ensured maximum lifetime by balancing the traffic load as equally as possible [14, 15]. However, owing to the different distances between the sensors and the base station, the balance of the traffic load will also cause the unbalance of the energy consumption among the nodes, which will incur the failure of nodes and shorten the system lifetime. On the other hand, the energy consumption of the system was minimized to prolong the system lifetime in existing studies. For example, Zhuang et al. minimized the energy consumption by analyzing and evaluating the energy consumption models in wireless sensor networks with probabilistic distance distributions [16]. Nguyen built a total energy consumption model based on analyzing the sensor broadcasting radius and then exploited the minimum energy consumption case for the network [17]. Anchora et al. defined a protocol to regard the node’s duty cycle as a function of the transmission times of the neighbor nodes to limit the power consumption [18]. With respect to the railway wireless monitoring system, each sensor is in charge of its own specific monitoring task and hence the system lifetime is determined by the first failure of any sensor owing to energy exhaustion. Further, the minimization of the total energy consumption may also cause the unbalanced energy consumption among the sensors and decline the system lifetime, and hence balancing the energy consumption among all sensors would be conducive to extend the railway wireless monitoring system. Zhang and Shen regarded the energy consumption balancing problem as an optimal transmitting data distribution problem by combining the network division and mixed-routing strategy together with data aggregation [19]. V. Kumar and S. Kumar presented a new position based routing algorithm to fairly use the energy of the sensors to maximize the network lifetime. The residual energy, node degree, distance, and angle of the sensors were all taken into consideration in this model [20]. Rahat et al. proposed a multiobjective evolutionary algorithm to optimize the routing chosen and traffic distribution issues that provided the optimal trade-off between the network lifetime and robustness [21]. Li et al. investigated the energy optimization problem by joint frequency allocation, link scheduling, routing, and transmission power [22]. Minimizing the total energy consumption could save the system energy to the most extent, and balancing the energy consumption could avoid the early failure of nodes. In this paper, the two strategies are combined together to maximize the network lifetime using the multihop protocol to optimize the communication between the sensors and base station from overall view.Additionally, the cluster-based protocols are adopted to address the local communication issues. In the cluster-based protocols, the sensors are divided into several clusters and one sensor in each cluster is selected as cluster head (CH). The CH is in charge of collecting the information from other sensors and then transmitting it to the base station. The total energy consumption could be reduced using the cluster-based protocol to compress the information collected by CHs on one hand, and the energy consumption among the sensors could be balanced by adjusting the cluster scales according to the distance to the base station. With respect to the cluster-based protocol, Heinzelman proposed two clustering strategies, namely, LEACH and LEACH-centralized (LEACH-C) [23, 24], in which all sensors were divided evenly into k-clusters and the CHs rotated according to the selection probability. Younis and Fahmy proposed a Hybrid Energy-Efficiency Distributed (HEED) protocol to select the CHs periodically according to a hybrid of the node residual energy and a secondary parameter [25]. Ren et al. designed an Energy-Balanced Routing Protocol (EBRP) by constructing a mixed virtual potential field in terms of depth, energy density, and residual energy. The goal of this strategy was to force the data packets transmitted through the dense energy area to protect the nodes with lower residual energy [26]. Zhang et al. proposed a FAF-EBRM algorithm for CH selection and rotation scheme using a multihop strategy to balance the energy consumption [27]. The next-hop node was determined by the link weight and forward energy density in this strategy. This method aimed to minimize the wasted energy caused by the backwards transmission of information. However, the number of the CHs in these approaches was all determined in advance and regarded as a constant during the communication, which may lead to the unbalanced energy consumption as the change of the monitoring network structure or the residual energy condition of the sensors.In this study, we use the cluster-based protocol to collect the local information in the subnetworks and then the multihop protocol is adopted in the backbone network which is constituted by the cluster heads (CHs) to transmit information to the base station. On this basis, the system lifetime will be significantly extended by the minimization and balance of energy consumption. These methodologies can fill the gap on the absence of the comprehensive communication protocol optimization in the railway wireless monitoring system. Furthermore, it is conducive to improve stability of the RWMS and enhance the collection of the infrastructure service condition to support for the failure diagnosis and prediction.


## 3. Railway Wireless Monitoring System

The railway wireless monitoring system is used to detect the service condition of the infrastructure and then transmit it to the data center for the failure diagnosis and prediction. As shown in Figure1, the railway wireless monitoring system is composed of two hierarchies, and the cluster-based and multihop protocols are applied in the subnetwork and backbone network, respectively. In the hybrid communication protocol, the system lifetime is extended by minimizing the total energy consumption and balancing them among all sensors.Figure 1
Structure of the RWMS network.


### 3.1. Structure of the Railway Wireless Monitoring Network

The railway wireless monitoring network is composed of two layers as shown in Figure1: backbone network layer and subnetwork layer. In the railway communication system, the base station (BS) is always deployed beside the rail sparsely, and it is difficult to transmit the detected information to the base station directly for all the sensors. To address the problem, the wireless monitoring network is divided into several subnetworks. In each subnetwork, many sensors will detect the condition of the infrastructure, and one of them is selected as the cluster head (CH). The information is firstly collected by the CHs from other sensors and then transmitted to the base station. The communication structure between the CHs and the BS is defined as the backbone network in this paper. There are plenty of sensors deployed in a small monitoring region in the subnetwork, and it is energy saving to collect and process the data locally and then transmit them to the BS using the backbone network. Hence, the cluster-based protocol is applied in the subnetwork. Furthermore, the backbone network which is composed of the CHs and the BS could be considered as a linear communication system, and most of the CHs are far away from the BS. The multihop protocol is more suitable in the backbone network communication. Thus, the cluster-based protocol and the multihop protocol are applied in the subnetwork and backbone network, respectively.


### 3.2. Energy Consumption of Railway Wireless Monitoring System

The sensors in the monitoring system are composed of four modules as shown in Figure2: sensing module, processing module, communication module, and the power supply module. The sensing module is used to detect the information about the infrastructure condition; the processing module is in charge of the data storage, processing, and transmitting; the communication module is responsible for the wireless communication with other units including data packets receiving and transmission. The energy consumption of all modules is provided by the power supply module.Figure 2
Structure of the sensors.The energy of the sensors is supplied by the battery installed in advance, and it is limited and hard to be recharged. Hence, how to make full use of the limited energy in an efficiency way becomes a crucial problem. In general, the communication module usually consumes much more energy than other modules [28]; hence the energy consumption for communication and data processing energy is considered in this paper as shown in Figure 1. The energy consumption for the data processing is defined as(1)EDxk=k×EDA,where k is the size of the data packets to be processed and EDA represents the electric energy consumed by the circuit to process 1-bit data.The transmission energy consumption is defined according to the wireless transmitting model in [23]. It is related to the volume of the transmission data packets and the transmission distance as formulated below:(2)ETxa,k,d=a×k×Eele+a×k×ξfs×d2,d<d0a×k×Eele+a×k×ξmp×d4,d≥d0,S.T.0<a≤1,where k is the size of data packets collected by the sensing module; the data is processed before transmitting and a is the compression ratio of the processing module; Eele is the electric energy consumption for the transmission circuit to transmit 1-bit data; ξfs is the electric energy consumption for the transmission amplifier for the free space model; ξmp is the electric energy consumption for the transmission amplifier for the multipath fading model; and d0 is the critical distance for the models switching, and it is defined as(3)d0=ξfsξmp.The receiving energy consumption for the receiving circuit is defined as(4)ERxk=a×k×Eele,where a×k represents the size of the data packets received by the sensor and Eele is the energy consumed by the receiving circuit to receive 1-bit data.


### 3.3. Hybrid Communication Protocol Semantics

In the hybrid communication protocol, the cluster-based and multihop protocols are applied in the subnetwork and backbone network, respectively.In the cluster-based protocol, the sensors are divided into several clusters and one sensor in each cluster is selected as the cluster head (CH). The CHs are in charge of collecting the information from other non-CH sensors and then transmitting it to the base station (BS). For the cluster-based protocol, the energy consumption is relevant to the number of the clusters. Fewer cluster quantities imply the larger scale of each cluster and longer distance between the clusters, which will consume more energy for the CHs and lead to the failure due to the energy exhaustion, whereas more clusters will increase the total energy consumption of all sensors and also result in the reduction of system lifetime. Hence, the number of the clusters should be optimized to pursue the minimum total energy consumption. Moreover, the energy consumption of the CHs is much more than others; rotating the CHs according to the energy condition of the sensors is an effective way to balance the energy among all sensors.In the multihop protocol, the information is transmitted among the CHs and forwarded to the BS. The energy consumption of all sensors is related to the number of hops and hop distances. More hops will increase receiving energy consumption, while decreasing the hop distance and the transmission energy consumption. Hence, the number of the hops and hop distances ought to be optimized to minimize the total energy consumption. However, the constant multihop communication structure will cause the excessive energy consumption of the relay CHs and generate the “energy hole,” though it is necessary to reoptimize the hops and hop distances to balance the energy consumption among all CHs based on the optimum solutions obtained above. The optimal hops and hop distances are dynamic as the change of the residual energy of all CHs, and it is optimized with the aim of balancing the residual energy of all CHs and potentially prolonging the system lifetime.


## 3.1. Structure of the Railway Wireless Monitoring Network

The railway wireless monitoring network is composed of two layers as shown in Figure1: backbone network layer and subnetwork layer. In the railway communication system, the base station (BS) is always deployed beside the rail sparsely, and it is difficult to transmit the detected information to the base station directly for all the sensors. To address the problem, the wireless monitoring network is divided into several subnetworks. In each subnetwork, many sensors will detect the condition of the infrastructure, and one of them is selected as the cluster head (CH). The information is firstly collected by the CHs from other sensors and then transmitted to the base station. The communication structure between the CHs and the BS is defined as the backbone network in this paper. There are plenty of sensors deployed in a small monitoring region in the subnetwork, and it is energy saving to collect and process the data locally and then transmit them to the BS using the backbone network. Hence, the cluster-based protocol is applied in the subnetwork. Furthermore, the backbone network which is composed of the CHs and the BS could be considered as a linear communication system, and most of the CHs are far away from the BS. The multihop protocol is more suitable in the backbone network communication. Thus, the cluster-based protocol and the multihop protocol are applied in the subnetwork and backbone network, respectively.


## 3.2. Energy Consumption of Railway Wireless Monitoring System

The sensors in the monitoring system are composed of four modules as shown in Figure2: sensing module, processing module, communication module, and the power supply module. The sensing module is used to detect the information about the infrastructure condition; the processing module is in charge of the data storage, processing, and transmitting; the communication module is responsible for the wireless communication with other units including data packets receiving and transmission. The energy consumption of all modules is provided by the power supply module.Figure 2
Structure of the sensors.The energy of the sensors is supplied by the battery installed in advance, and it is limited and hard to be recharged. Hence, how to make full use of the limited energy in an efficiency way becomes a crucial problem. In general, the communication module usually consumes much more energy than other modules [28]; hence the energy consumption for communication and data processing energy is considered in this paper as shown in Figure 1. The energy consumption for the data processing is defined as(1)EDxk=k×EDA,where k is the size of the data packets to be processed and EDA represents the electric energy consumed by the circuit to process 1-bit data.The transmission energy consumption is defined according to the wireless transmitting model in [23]. It is related to the volume of the transmission data packets and the transmission distance as formulated below:(2)ETxa,k,d=a×k×Eele+a×k×ξfs×d2,d<d0a×k×Eele+a×k×ξmp×d4,d≥d0,S.T.0<a≤1,where k is the size of data packets collected by the sensing module; the data is processed before transmitting and a is the compression ratio of the processing module; Eele is the electric energy consumption for the transmission circuit to transmit 1-bit data; ξfs is the electric energy consumption for the transmission amplifier for the free space model; ξmp is the electric energy consumption for the transmission amplifier for the multipath fading model; and d0 is the critical distance for the models switching, and it is defined as(3)d0=ξfsξmp.The receiving energy consumption for the receiving circuit is defined as(4)ERxk=a×k×Eele,where a×k represents the size of the data packets received by the sensor and Eele is the energy consumed by the receiving circuit to receive 1-bit data.


## 3.3. Hybrid Communication Protocol Semantics

In the hybrid communication protocol, the cluster-based and multihop protocols are applied in the subnetwork and backbone network, respectively.In the cluster-based protocol, the sensors are divided into several clusters and one sensor in each cluster is selected as the cluster head (CH). The CHs are in charge of collecting the information from other non-CH sensors and then transmitting it to the base station (BS). For the cluster-based protocol, the energy consumption is relevant to the number of the clusters. Fewer cluster quantities imply the larger scale of each cluster and longer distance between the clusters, which will consume more energy for the CHs and lead to the failure due to the energy exhaustion, whereas more clusters will increase the total energy consumption of all sensors and also result in the reduction of system lifetime. Hence, the number of the clusters should be optimized to pursue the minimum total energy consumption. Moreover, the energy consumption of the CHs is much more than others; rotating the CHs according to the energy condition of the sensors is an effective way to balance the energy among all sensors.In the multihop protocol, the information is transmitted among the CHs and forwarded to the BS. The energy consumption of all sensors is related to the number of hops and hop distances. More hops will increase receiving energy consumption, while decreasing the hop distance and the transmission energy consumption. Hence, the number of the hops and hop distances ought to be optimized to minimize the total energy consumption. However, the constant multihop communication structure will cause the excessive energy consumption of the relay CHs and generate the “energy hole,” though it is necessary to reoptimize the hops and hop distances to balance the energy consumption among all CHs based on the optimum solutions obtained above. The optimal hops and hop distances are dynamic as the change of the residual energy of all CHs, and it is optimized with the aim of balancing the residual energy of all CHs and potentially prolonging the system lifetime.


## 4. Two-Layer Hierarchy Optimization Model for Communication Protocol

The model of the communication protocol is designed and optimized in this section. The cluster-based and multihop communication protocols are applied according to the structure of the railway wireless monitoring system. The system lifetime is maximized from two hierarchies of minimizing the energy consumption and balancing the consumption among all sensors based on the hybrid protocol proposed in this paper. The process of the two-hierarchy optimization model is shown in Figure3, which is detailed in the following section.Figure 3
Two-hierarchy optimization model of the hybrid protocol.As shown in Figure3, the overall structure of the two-hierarchy optimization model of the hybrid protocol is composed of three modules, including hybrid communication protocol modeling module, communication protocol optimization module, and optimal solution output module. In the modeling module, the initial parameters of the system and sensors are used to build the two-layer monitoring network and then the cluster-based and multihop protocols adopted to build the optimization model to maximize the system lifetime. In the optimization module, the hybrid PSO-GA algorithm is applied to optimize the number of hops and hop distances in the multihop protocol. In the output module, the optimal number of clusters, the optimal number of multihops, and the hop distances are all applied in the railway wireless monitoring system to maximize the system lifetime.


### 4.1. Minimizing the Total Energy Consumption in the First Hierarchy

In the hybrid communication protocol, the cluster-based and multihop protocols are both optimized to minimize the energy consumption in this paper.


#### 4.1.1. Optimization for the Cluster-Based Protocol

The number of clusters is optimized to minimize the total energy consumption as described above. The communication scenario is first defined as follows. LetL and N be the length of the monitoring region and the number of the total sensors, respectively. The size of the data packet transmitted in one communication round is k bits. Assume that all sensors are divided into m clusters (subnetworks). The free space communication model is used within the cluster while the multipath model is adopted between the clusters. The energy consumption by the cluster head is calculated as(5)ECH=ECHR+ECHD+ECHT=Nm-1kEele+NmkEDA+bEele+ξfsdCH4,where ECHR represents the energy consumption for the cluster heads to receive the data from other sensors; ECHD represents the energy consumption for CHs to process the received data; ECHT represents the energy consumption for CHs to send the data to other cluster heads or the base station; and dCH is the distance between the cluster head and the destination CHs or BS, which is selected as the average of the hop distances in this paper.The energy consumption of the non-CH sensor is calculated as(6)Enon-CH=k×Eele+k×ξmp×dnon-CH2,where dnon-CH represents the distance from the non-CH sensors to the corresponding CH sensor. Assume that all sensors are deployed evenly in each subnetwork, and the destiny of the sensors in each cluster is calculated as(7)ρ=nr2=N/mL/2×m2,where n is the number of sensors in each cluster and r is the radius of the subnetwork (it is assumed that the sensors in the subnetwork are deployed in a circle region). The expected dnon-CH2 is calculated as(8)Ednon-CH2=∬x2+y2ρx,ydxdy=∬r2ρr,θdrdθ=∫θ=02π∫r=0L/2mρr3drdθ=πNL28m3.The energy consumption in each cluster in one communication round is calculated as(9)Ecluster=ECH+Nm-1Enon-CH=Nm-1kEele+NmkEDA+bkEele+ξfsdCH4+Nm-1kEele+Nm-1kξmpπNL28m3≈2NmkEele+NmkEDA+bkEele+ξfsdCH4+NmkξmpπNL28m3.On this basis, we can obtain the total energy consumption for all clusters as(10)Etotal=mEcluster=2NkEele+NkEDA+mbkEele+ξfsdCH4+kNξmpπN2L28m3.The derivative ofEtotal with respect to m can be calculated as(11)dEtotaldm=bkEele+ξfsdCH4-3kNξmpπN2L28m4.In order to get the minimum value of the function, we set the derivative in (11) to 0. The best number of the clusters can be deduced as(12)mbest=3πN3ξmpL28bEele+ξfsdCH44.The determination for the optimal number of clusters can minimize the total energy consumption using the cluster-based protocol in the railway wireless monitoring system.


#### 4.1.2. Optimization for the Multihop Protocol

The railway monitoring region is large and the CHs are always far away from the base station in the wireless monitoring system, and it is not efficient if all CHs directly communicate with the BS. Hence, the multihop protocol is adopted in the backbone network. The number of the hops for the multihop protocol should be determined to reduce the energy consumption.The data packets collected by theith CH are transmitted forward to the BS using multihop protocol in hi hops. The total energy consumption during the transmission process is calculated as(13)Ei=hiETi+hi-1Eri=hikEele+ξfsdhi4+hi-1kEele=2hi-1kEele+hikξfsdhi4,where hi is the number of the hops for the data collected by the ith CH transmitted to the BS and dhi represents the distance of one hop for ith CH. Assume that the CH is located at the center of each cluster and the distance between the ith CH and the BS is dtoBSi=(mbest-i+1/2)×L/mbest. It is proved that the total energy consumption is minimum when the distance of each hop is equal in the multihop protocol [25]; hence the hop length is selected as(14)dhi=mbest-i+1/2×Lmbest×hi.The derivative ofEi with respect to hi is calculated as(15)dEidhi=2kEele-3kξfsmbest-i+1/2×Lmbest×hi4.In order to get the minimum value of the function, we set the derivative in (13) to 0. The best number of the hops can be deduced as(16)hbseti=mbest-i+1/2×Lmbest×2kEele/3kξfs4.The calculated result may not be an integer, and the selected hops are rounded to the nearest integer. The total energy consumption can be minimized using the best number of hops based on the multihop protocol. The best distance of the hop for theith CH is calculated based on (14) and (16) as(17)dbesthi=mbest-i+1/2×Lmbest×hbesti.


### 4.2. Balancing the Energy Consumption among All Sensors in the Second Hierarchy

The total energy consumption of all sensors is minimized in the first hierarchy; however, the lifetime of the railway wireless monitoring system is defined as the number of the communication rounds of the sensor that failed at first caused by energy exhaustion. Therefore, we have to balance the energy consumption among all sensors to maximize the system lifetime.


#### 4.2.1. CHs Rotation in the Subnetwork

The number of the sun networks is optimized in first hierarchy to minimize the total energy consumption of all the sensors, while the CHs consume much more energy than other sensors. The CHs should be rotated to balance the energy consumption among all sensors. The CHs are rotated according to whether the sensors have been the CH in the latest rounds in previous LEACH [24], while the ignorance of the energy condition of sensors will also result in the energy unbalance. The CHs rotation model proposed in this paper considers the residual energy of the sensors which is designed as(18)pr=EReir-EReminr∑i=1nEReir-EReminr,where ERemin(r) is the minimum residual energy of all sensors in the cluster and ERei(r) represents the residual energy of the ith sensor before the rth round as computed below:(19)EReir=EReir-1-ECoir-1,where ECoi(r-1) is the energy consumed by ith sensor in r-1th round. If the sensor is CH in r-1th round, it is computed according to(20)ECHr-1=ERxr-1+EDxr-1+ETxr-1,ERxr-1=n-1×k×Eele,EDxr-1=n×k×EDA,ETxr-1=a×k×Eele+a×k×ξmp×dCH4r-1.Otherwise, if the sensor is non-CH inr-1th round, which is computed by(21)Enon-CHr-1=k×Eele+k×ξfs×dnon-CH2r,the sensors with more energy will be selected as the CHs in the new communication round, and the energy consumption among the sensors within the subnetwork can be balanced in this way and subsequently prolong the system lifetime.


#### 4.2.2. Multihop Transmission Sequences Optimization

The number of hops for each subnetwork and the corresponding hop distance are optimized in the first hierarchy to minimize the total energy consumption using the multihop protocol. However, the unreasonable transmission sequences will increase the burden of sensors near the base station. Even worse, it may result in the generation of the “energy hole” and destroy the connection of the monitoring system. Therefore, the transmission sequences optimization model is designed to balance the energy consumption among the CHs in the backbone network. The optimization model is designed as(22)minFhi,di,r=min∑i=1mEreihi,di,r-E-re2mS.T.1≤hi≤m-i+1,Lm≤di≤m-i+1×Lm,where F(hi,di,r) aims to minimize the variance of the residual energy for all CHs; Erei(hi,di,r) represents the residual energy of the ith CH in the rth communication round using the number of hops hi and the corresponding hop distance di; E-re represents the average of the residual energy for all the CHs; and m is the number of the subnetworks. The first constraint implies that the number of hops should exceed 1 and be less than the number of CHs between the ith CH and BS. The second constraint ensures that the hop distance should be longer than the minimum distance among CHs and shorter than the distance between the ith CH to the base station. The residual energy for the ith CH Ei(hi,di,r) is calculated as(23)Ereihi,di,r=Ereihi,di,r-1-Ecoihi,di,r-1,where Ecoi(hi,di,r-1) is the energy consumed by ith sensor in r-1th round, which is computed according to (13) as(24)Ecoihi,di,r-1=hi-1ERxhi,di,r-1+hiETxhi,di,r-1=hikEele+ξfsdi4+hi-1kEele=2hi-1kEele+hikξfsdi4.We aim to balance the energy consumption among all the CHs by optimizing the transmission sequences for the backbone network according to the residual energy of each CH, including the number of the hops and the hop distance. The optimization model designed in this paper is a nonlinear function, and the solution of this issue is a NP-hard problem. Exact analytical methods make it difficult to obtain the optimal solutions when the scale of the problem is large, while heuristic methods such as particle swarm optimization (PSO) and genetic algorithm (GA) are effective in solving such optimization problems [29]. In addition, the optimum solutions obtained in Section 4.1.2 will accelerate the convergence speed in the optimization.


### 4.3. Transmission Sequences Optimization Using Hybrid PSO-GA

The particle swarm optimization is proposed by Eberhart and Kennedy [30], who are inspired by the feeding behavior of birds. The PSO is a computational method that optimizes a problem by iteratively trying to improve a candidate solution with regard to a given measure of quality. The POS is applied widely in the optimization field for the fast convergence speed and briefness; however sometimes the algorithm just gets local optimum solution. The GA is another excellent optimization algorithm, which could get the global optimum solutions by the selection, crossover, mutation, and the overall search, whereas the complex structure and premature convergence limit the application of the GA. In this paper, the hybrid PSO-GA is used to simplify the optimization process and obtain the global optimum solution easily. The integer coding method is adopted in the hybrid PSO-GA, and then the crossover and mutation methods are used to update and reserve the optimal for the particle and the population, so as to get the optimal solutions.The proposed hybrid PSO-GA is introduced in Algorithm1. The algorithm parameters are initialized and then the parent population are generated accordingly. The number of hops and the hop distances are optimized using the hybrid PSO-GA, and the energy consumption among all CHs is balanced based on the optimal solutions. In this paper, the two-point crossover method and shift mutation are used to generate the offspring. As for the two-point crossover, two points are randomly chosen in a chromosome pair, and the parts between the two points are exchanged. In the shift mutation, two genes are selected randomly, and the rear gene is inserted ahead of the front gene. The genes behind the front gene are shifted backwards. The mutation could ensure the genetic diversity to avoid getting trapped in the local optimum [31].Algorithm 1:Hybrid PSO-GA for the transmission sequences optimization.
Input:   The sensors deployed in the monitoring region Output:The optimal number of hops and the corresponding hops distances Step  1(initializing the parameters of algorithm) Initializing the parameters for the energy consumption model; initializing the parameters for the sensors and the structure of the monitoring network: including the number of sensors N, the distance between two sensors d, the initial energy of the sensors Ein, the number of the subnetworks m, the number of the hops for each CH hi(i=1,2,…,m), the hop-distance for each sub-network di(i=1,2,…,m), and communication round r=1, etc.; initializing the parameters for the Hybrid PSO-GA algorithm including the scale of the population n, iteration times T, crossover probability pc, and mutation probability pm, etc. The parent population are generated according to these parameters. Step  2(calculating the fitness value of the particle) for  j = 1 → length n for  i = 1 → sensors number N E r e i j h i j , d i j , r = E r e i j h i j , d i j , r - 1 - E c o i j h i j , d i j , r - 1 ,   E r e i j ( h i j , d i j , 0 ) = E i n v a r h i j , d i j , r = ∑ i = 1 m E r e i j h i j , d i j , r - E - r e j 2 m end for F ( h j , d j , r ) = m i n ( v a r ( h : j , d : j , r ) ) end for For the initial population, the position and fitness of each particle are considered as the individual optimum (Pbesti(hi,di),Fbesti(hi,di)(i=1,2,…,m)), and the best position and fitness for the population are selected as (GPbesthi,di,GFbesthi,di=min⁡Pbestihi,di,Fbestihi,di(i=1,2,…,m)). Step  3(generation of the new off-springs using crossover and mutation) repeat The two-point crossover method is used to generate the new offspring; Apply the shift-mutation to offspring with mutation probability pm=0.02; Calculate the fitness of the new offspring FNew(hi,di,r); if (Fnew(hi,di,r)>Fbest(hi,di,r)) P b e s t ( h i , d i , r ) = P n e w ( h i , d i , r ); F b e s t ( h i , d i , r ) = F n e w ( h i , d i , r ); end if G P b e s t ( h i , d i ) , G F b e s t ( h i , d i ) = m i n ( P b e s t i ( h i , d i ) , F b e s t i ( h i , d i ) )   ( i = 1,2 , …  ,  m ). end The offspring is generated to improve the fitness value. Step  4(output the optimal solutions) if  Iteration=T output the optimal number of hops hopti(i=1,2,…,m) and optimal hop-distances dopti(i=1,2,…,m) else back to Step 3. end if


## 4.1. Minimizing the Total Energy Consumption in the First Hierarchy

In the hybrid communication protocol, the cluster-based and multihop protocols are both optimized to minimize the energy consumption in this paper.


### 4.1.1. Optimization for the Cluster-Based Protocol

The number of clusters is optimized to minimize the total energy consumption as described above. The communication scenario is first defined as follows. LetL and N be the length of the monitoring region and the number of the total sensors, respectively. The size of the data packet transmitted in one communication round is k bits. Assume that all sensors are divided into m clusters (subnetworks). The free space communication model is used within the cluster while the multipath model is adopted between the clusters. The energy consumption by the cluster head is calculated as(5)ECH=ECHR+ECHD+ECHT=Nm-1kEele+NmkEDA+bEele+ξfsdCH4,where ECHR represents the energy consumption for the cluster heads to receive the data from other sensors; ECHD represents the energy consumption for CHs to process the received data; ECHT represents the energy consumption for CHs to send the data to other cluster heads or the base station; and dCH is the distance between the cluster head and the destination CHs or BS, which is selected as the average of the hop distances in this paper.The energy consumption of the non-CH sensor is calculated as(6)Enon-CH=k×Eele+k×ξmp×dnon-CH2,where dnon-CH represents the distance from the non-CH sensors to the corresponding CH sensor. Assume that all sensors are deployed evenly in each subnetwork, and the destiny of the sensors in each cluster is calculated as(7)ρ=nr2=N/mL/2×m2,where n is the number of sensors in each cluster and r is the radius of the subnetwork (it is assumed that the sensors in the subnetwork are deployed in a circle region). The expected dnon-CH2 is calculated as(8)Ednon-CH2=∬x2+y2ρx,ydxdy=∬r2ρr,θdrdθ=∫θ=02π∫r=0L/2mρr3drdθ=πNL28m3.The energy consumption in each cluster in one communication round is calculated as(9)Ecluster=ECH+Nm-1Enon-CH=Nm-1kEele+NmkEDA+bkEele+ξfsdCH4+Nm-1kEele+Nm-1kξmpπNL28m3≈2NmkEele+NmkEDA+bkEele+ξfsdCH4+NmkξmpπNL28m3.On this basis, we can obtain the total energy consumption for all clusters as(10)Etotal=mEcluster=2NkEele+NkEDA+mbkEele+ξfsdCH4+kNξmpπN2L28m3.The derivative ofEtotal with respect to m can be calculated as(11)dEtotaldm=bkEele+ξfsdCH4-3kNξmpπN2L28m4.In order to get the minimum value of the function, we set the derivative in (11) to 0. The best number of the clusters can be deduced as(12)mbest=3πN3ξmpL28bEele+ξfsdCH44.The determination for the optimal number of clusters can minimize the total energy consumption using the cluster-based protocol in the railway wireless monitoring system.


### 4.1.2. Optimization for the Multihop Protocol

The railway monitoring region is large and the CHs are always far away from the base station in the wireless monitoring system, and it is not efficient if all CHs directly communicate with the BS. Hence, the multihop protocol is adopted in the backbone network. The number of the hops for the multihop protocol should be determined to reduce the energy consumption.The data packets collected by theith CH are transmitted forward to the BS using multihop protocol in hi hops. The total energy consumption during the transmission process is calculated as(13)Ei=hiETi+hi-1Eri=hikEele+ξfsdhi4+hi-1kEele=2hi-1kEele+hikξfsdhi4,where hi is the number of the hops for the data collected by the ith CH transmitted to the BS and dhi represents the distance of one hop for ith CH. Assume that the CH is located at the center of each cluster and the distance between the ith CH and the BS is dtoBSi=(mbest-i+1/2)×L/mbest. It is proved that the total energy consumption is minimum when the distance of each hop is equal in the multihop protocol [25]; hence the hop length is selected as(14)dhi=mbest-i+1/2×Lmbest×hi.The derivative ofEi with respect to hi is calculated as(15)dEidhi=2kEele-3kξfsmbest-i+1/2×Lmbest×hi4.In order to get the minimum value of the function, we set the derivative in (13) to 0. The best number of the hops can be deduced as(16)hbseti=mbest-i+1/2×Lmbest×2kEele/3kξfs4.The calculated result may not be an integer, and the selected hops are rounded to the nearest integer. The total energy consumption can be minimized using the best number of hops based on the multihop protocol. The best distance of the hop for theith CH is calculated based on (14) and (16) as(17)dbesthi=mbest-i+1/2×Lmbest×hbesti.


## 4.1.1. Optimization for the Cluster-Based Protocol

The number of clusters is optimized to minimize the total energy consumption as described above. The communication scenario is first defined as follows. LetL and N be the length of the monitoring region and the number of the total sensors, respectively. The size of the data packet transmitted in one communication round is k bits. Assume that all sensors are divided into m clusters (subnetworks). The free space communication model is used within the cluster while the multipath model is adopted between the clusters. The energy consumption by the cluster head is calculated as(5)ECH=ECHR+ECHD+ECHT=Nm-1kEele+NmkEDA+bEele+ξfsdCH4,where ECHR represents the energy consumption for the cluster heads to receive the data from other sensors; ECHD represents the energy consumption for CHs to process the received data; ECHT represents the energy consumption for CHs to send the data to other cluster heads or the base station; and dCH is the distance between the cluster head and the destination CHs or BS, which is selected as the average of the hop distances in this paper.The energy consumption of the non-CH sensor is calculated as(6)Enon-CH=k×Eele+k×ξmp×dnon-CH2,where dnon-CH represents the distance from the non-CH sensors to the corresponding CH sensor. Assume that all sensors are deployed evenly in each subnetwork, and the destiny of the sensors in each cluster is calculated as(7)ρ=nr2=N/mL/2×m2,where n is the number of sensors in each cluster and r is the radius of the subnetwork (it is assumed that the sensors in the subnetwork are deployed in a circle region). The expected dnon-CH2 is calculated as(8)Ednon-CH2=∬x2+y2ρx,ydxdy=∬r2ρr,θdrdθ=∫θ=02π∫r=0L/2mρr3drdθ=πNL28m3.The energy consumption in each cluster in one communication round is calculated as(9)Ecluster=ECH+Nm-1Enon-CH=Nm-1kEele+NmkEDA+bkEele+ξfsdCH4+Nm-1kEele+Nm-1kξmpπNL28m3≈2NmkEele+NmkEDA+bkEele+ξfsdCH4+NmkξmpπNL28m3.On this basis, we can obtain the total energy consumption for all clusters as(10)Etotal=mEcluster=2NkEele+NkEDA+mbkEele+ξfsdCH4+kNξmpπN2L28m3.The derivative ofEtotal with respect to m can be calculated as(11)dEtotaldm=bkEele+ξfsdCH4-3kNξmpπN2L28m4.In order to get the minimum value of the function, we set the derivative in (11) to 0. The best number of the clusters can be deduced as(12)mbest=3πN3ξmpL28bEele+ξfsdCH44.The determination for the optimal number of clusters can minimize the total energy consumption using the cluster-based protocol in the railway wireless monitoring system.


## 4.1.2. Optimization for the Multihop Protocol

The railway monitoring region is large and the CHs are always far away from the base station in the wireless monitoring system, and it is not efficient if all CHs directly communicate with the BS. Hence, the multihop protocol is adopted in the backbone network. The number of the hops for the multihop protocol should be determined to reduce the energy consumption.The data packets collected by theith CH are transmitted forward to the BS using multihop protocol in hi hops. The total energy consumption during the transmission process is calculated as(13)Ei=hiETi+hi-1Eri=hikEele+ξfsdhi4+hi-1kEele=2hi-1kEele+hikξfsdhi4,where hi is the number of the hops for the data collected by the ith CH transmitted to the BS and dhi represents the distance of one hop for ith CH. Assume that the CH is located at the center of each cluster and the distance between the ith CH and the BS is dtoBSi=(mbest-i+1/2)×L/mbest. It is proved that the total energy consumption is minimum when the distance of each hop is equal in the multihop protocol [25]; hence the hop length is selected as(14)dhi=mbest-i+1/2×Lmbest×hi.The derivative ofEi with respect to hi is calculated as(15)dEidhi=2kEele-3kξfsmbest-i+1/2×Lmbest×hi4.In order to get the minimum value of the function, we set the derivative in (13) to 0. The best number of the hops can be deduced as(16)hbseti=mbest-i+1/2×Lmbest×2kEele/3kξfs4.The calculated result may not be an integer, and the selected hops are rounded to the nearest integer. The total energy consumption can be minimized using the best number of hops based on the multihop protocol. The best distance of the hop for theith CH is calculated based on (14) and (16) as(17)dbesthi=mbest-i+1/2×Lmbest×hbesti.


## 4.2. Balancing the Energy Consumption among All Sensors in the Second Hierarchy

The total energy consumption of all sensors is minimized in the first hierarchy; however, the lifetime of the railway wireless monitoring system is defined as the number of the communication rounds of the sensor that failed at first caused by energy exhaustion. Therefore, we have to balance the energy consumption among all sensors to maximize the system lifetime.


### 4.2.1. CHs Rotation in the Subnetwork

The number of the sun networks is optimized in first hierarchy to minimize the total energy consumption of all the sensors, while the CHs consume much more energy than other sensors. The CHs should be rotated to balance the energy consumption among all sensors. The CHs are rotated according to whether the sensors have been the CH in the latest rounds in previous LEACH [24], while the ignorance of the energy condition of sensors will also result in the energy unbalance. The CHs rotation model proposed in this paper considers the residual energy of the sensors which is designed as(18)pr=EReir-EReminr∑i=1nEReir-EReminr,where ERemin(r) is the minimum residual energy of all sensors in the cluster and ERei(r) represents the residual energy of the ith sensor before the rth round as computed below:(19)EReir=EReir-1-ECoir-1,where ECoi(r-1) is the energy consumed by ith sensor in r-1th round. If the sensor is CH in r-1th round, it is computed according to(20)ECHr-1=ERxr-1+EDxr-1+ETxr-1,ERxr-1=n-1×k×Eele,EDxr-1=n×k×EDA,ETxr-1=a×k×Eele+a×k×ξmp×dCH4r-1.Otherwise, if the sensor is non-CH inr-1th round, which is computed by(21)Enon-CHr-1=k×Eele+k×ξfs×dnon-CH2r,the sensors with more energy will be selected as the CHs in the new communication round, and the energy consumption among the sensors within the subnetwork can be balanced in this way and subsequently prolong the system lifetime.


### 4.2.2. Multihop Transmission Sequences Optimization

The number of hops for each subnetwork and the corresponding hop distance are optimized in the first hierarchy to minimize the total energy consumption using the multihop protocol. However, the unreasonable transmission sequences will increase the burden of sensors near the base station. Even worse, it may result in the generation of the “energy hole” and destroy the connection of the monitoring system. Therefore, the transmission sequences optimization model is designed to balance the energy consumption among the CHs in the backbone network. The optimization model is designed as(22)minFhi,di,r=min∑i=1mEreihi,di,r-E-re2mS.T.1≤hi≤m-i+1,Lm≤di≤m-i+1×Lm,where F(hi,di,r) aims to minimize the variance of the residual energy for all CHs; Erei(hi,di,r) represents the residual energy of the ith CH in the rth communication round using the number of hops hi and the corresponding hop distance di; E-re represents the average of the residual energy for all the CHs; and m is the number of the subnetworks. The first constraint implies that the number of hops should exceed 1 and be less than the number of CHs between the ith CH and BS. The second constraint ensures that the hop distance should be longer than the minimum distance among CHs and shorter than the distance between the ith CH to the base station. The residual energy for the ith CH Ei(hi,di,r) is calculated as(23)Ereihi,di,r=Ereihi,di,r-1-Ecoihi,di,r-1,where Ecoi(hi,di,r-1) is the energy consumed by ith sensor in r-1th round, which is computed according to (13) as(24)Ecoihi,di,r-1=hi-1ERxhi,di,r-1+hiETxhi,di,r-1=hikEele+ξfsdi4+hi-1kEele=2hi-1kEele+hikξfsdi4.We aim to balance the energy consumption among all the CHs by optimizing the transmission sequences for the backbone network according to the residual energy of each CH, including the number of the hops and the hop distance. The optimization model designed in this paper is a nonlinear function, and the solution of this issue is a NP-hard problem. Exact analytical methods make it difficult to obtain the optimal solutions when the scale of the problem is large, while heuristic methods such as particle swarm optimization (PSO) and genetic algorithm (GA) are effective in solving such optimization problems [29]. In addition, the optimum solutions obtained in Section 4.1.2 will accelerate the convergence speed in the optimization.


## 4.2.1. CHs Rotation in the Subnetwork

The number of the sun networks is optimized in first hierarchy to minimize the total energy consumption of all the sensors, while the CHs consume much more energy than other sensors. The CHs should be rotated to balance the energy consumption among all sensors. The CHs are rotated according to whether the sensors have been the CH in the latest rounds in previous LEACH [24], while the ignorance of the energy condition of sensors will also result in the energy unbalance. The CHs rotation model proposed in this paper considers the residual energy of the sensors which is designed as(18)pr=EReir-EReminr∑i=1nEReir-EReminr,where ERemin(r) is the minimum residual energy of all sensors in the cluster and ERei(r) represents the residual energy of the ith sensor before the rth round as computed below:(19)EReir=EReir-1-ECoir-1,where ECoi(r-1) is the energy consumed by ith sensor in r-1th round. If the sensor is CH in r-1th round, it is computed according to(20)ECHr-1=ERxr-1+EDxr-1+ETxr-1,ERxr-1=n-1×k×Eele,EDxr-1=n×k×EDA,ETxr-1=a×k×Eele+a×k×ξmp×dCH4r-1.Otherwise, if the sensor is non-CH inr-1th round, which is computed by(21)Enon-CHr-1=k×Eele+k×ξfs×dnon-CH2r,the sensors with more energy will be selected as the CHs in the new communication round, and the energy consumption among the sensors within the subnetwork can be balanced in this way and subsequently prolong the system lifetime.


## 4.2.2. Multihop Transmission Sequences Optimization

The number of hops for each subnetwork and the corresponding hop distance are optimized in the first hierarchy to minimize the total energy consumption using the multihop protocol. However, the unreasonable transmission sequences will increase the burden of sensors near the base station. Even worse, it may result in the generation of the “energy hole” and destroy the connection of the monitoring system. Therefore, the transmission sequences optimization model is designed to balance the energy consumption among the CHs in the backbone network. The optimization model is designed as(22)minFhi,di,r=min∑i=1mEreihi,di,r-E-re2mS.T.1≤hi≤m-i+1,Lm≤di≤m-i+1×Lm,where F(hi,di,r) aims to minimize the variance of the residual energy for all CHs; Erei(hi,di,r) represents the residual energy of the ith CH in the rth communication round using the number of hops hi and the corresponding hop distance di; E-re represents the average of the residual energy for all the CHs; and m is the number of the subnetworks. The first constraint implies that the number of hops should exceed 1 and be less than the number of CHs between the ith CH and BS. The second constraint ensures that the hop distance should be longer than the minimum distance among CHs and shorter than the distance between the ith CH to the base station. The residual energy for the ith CH Ei(hi,di,r) is calculated as(23)Ereihi,di,r=Ereihi,di,r-1-Ecoihi,di,r-1,where Ecoi(hi,di,r-1) is the energy consumed by ith sensor in r-1th round, which is computed according to (13) as(24)Ecoihi,di,r-1=hi-1ERxhi,di,r-1+hiETxhi,di,r-1=hikEele+ξfsdi4+hi-1kEele=2hi-1kEele+hikξfsdi4.We aim to balance the energy consumption among all the CHs by optimizing the transmission sequences for the backbone network according to the residual energy of each CH, including the number of the hops and the hop distance. The optimization model designed in this paper is a nonlinear function, and the solution of this issue is a NP-hard problem. Exact analytical methods make it difficult to obtain the optimal solutions when the scale of the problem is large, while heuristic methods such as particle swarm optimization (PSO) and genetic algorithm (GA) are effective in solving such optimization problems [29]. In addition, the optimum solutions obtained in Section 4.1.2 will accelerate the convergence speed in the optimization.


## 4.3. Transmission Sequences Optimization Using Hybrid PSO-GA

The particle swarm optimization is proposed by Eberhart and Kennedy [30], who are inspired by the feeding behavior of birds. The PSO is a computational method that optimizes a problem by iteratively trying to improve a candidate solution with regard to a given measure of quality. The POS is applied widely in the optimization field for the fast convergence speed and briefness; however sometimes the algorithm just gets local optimum solution. The GA is another excellent optimization algorithm, which could get the global optimum solutions by the selection, crossover, mutation, and the overall search, whereas the complex structure and premature convergence limit the application of the GA. In this paper, the hybrid PSO-GA is used to simplify the optimization process and obtain the global optimum solution easily. The integer coding method is adopted in the hybrid PSO-GA, and then the crossover and mutation methods are used to update and reserve the optimal for the particle and the population, so as to get the optimal solutions.The proposed hybrid PSO-GA is introduced in Algorithm1. The algorithm parameters are initialized and then the parent population are generated accordingly. The number of hops and the hop distances are optimized using the hybrid PSO-GA, and the energy consumption among all CHs is balanced based on the optimal solutions. In this paper, the two-point crossover method and shift mutation are used to generate the offspring. As for the two-point crossover, two points are randomly chosen in a chromosome pair, and the parts between the two points are exchanged. In the shift mutation, two genes are selected randomly, and the rear gene is inserted ahead of the front gene. The genes behind the front gene are shifted backwards. The mutation could ensure the genetic diversity to avoid getting trapped in the local optimum [31].Algorithm 1:Hybrid PSO-GA for the transmission sequences optimization.
Input:   The sensors deployed in the monitoring region Output:The optimal number of hops and the corresponding hops distances Step  1(initializing the parameters of algorithm) Initializing the parameters for the energy consumption model; initializing the parameters for the sensors and the structure of the monitoring network: including the number of sensors N, the distance between two sensors d, the initial energy of the sensors Ein, the number of the subnetworks m, the number of the hops for each CH hi(i=1,2,…,m), the hop-distance for each sub-network di(i=1,2,…,m), and communication round r=1, etc.; initializing the parameters for the Hybrid PSO-GA algorithm including the scale of the population n, iteration times T, crossover probability pc, and mutation probability pm, etc. The parent population are generated according to these parameters. Step  2(calculating the fitness value of the particle) for  j = 1 → length n for  i = 1 → sensors number N E r e i j h i j , d i j , r = E r e i j h i j , d i j , r - 1 - E c o i j h i j , d i j , r - 1 ,   E r e i j ( h i j , d i j , 0 ) = E i n v a r h i j , d i j , r = ∑ i = 1 m E r e i j h i j , d i j , r - E - r e j 2 m end for F ( h j , d j , r ) = m i n ( v a r ( h : j , d : j , r ) ) end for For the initial population, the position and fitness of each particle are considered as the individual optimum (Pbesti(hi,di),Fbesti(hi,di)(i=1,2,…,m)), and the best position and fitness for the population are selected as (GPbesthi,di,GFbesthi,di=min⁡Pbestihi,di,Fbestihi,di(i=1,2,…,m)). Step  3(generation of the new off-springs using crossover and mutation) repeat The two-point crossover method is used to generate the new offspring; Apply the shift-mutation to offspring with mutation probability pm=0.02; Calculate the fitness of the new offspring FNew(hi,di,r); if (Fnew(hi,di,r)>Fbest(hi,di,r)) P b e s t ( h i , d i , r ) = P n e w ( h i , d i , r ); F b e s t ( h i , d i , r ) = F n e w ( h i , d i , r ); end if G P b e s t ( h i , d i ) , G F b e s t ( h i , d i ) = m i n ( P b e s t i ( h i , d i ) , F b e s t i ( h i , d i ) )   ( i = 1,2 , …  ,  m ). end The offspring is generated to improve the fitness value. Step  4(output the optimal solutions) if  Iteration=T output the optimal number of hops hopti(i=1,2,…,m) and optimal hop-distances dopti(i=1,2,…,m) else back to Step 3. end if


## 5. Simulation Validation and Analysis

The performance of the proposed hybrid protocol integrating the cluster-based and multihop protocols (CMCP) is verified in this section, including the variation of system lifetime as the change of the number of clusters, the number of hops, and the hop distances. In addition, the superiority of the hybrid protocol is demonstrated in comparison with LEACH and the multihop protocols.


### 5.1. Simulation Parameters Configuration

For the simulation parameters and environment, Matlab is selected as the modeling and simulation in this research. In the simulation, the rail with 500 m long is selected as the monitoring object, and several sensors are deployed in the monitoring field to monitor the railway infrastructure condition. The short rail section could be considered as a nearly straight line and the monitoring field could be considered as a rectangular region. To reduce the energy consumption and guarantee that the information can be transmitted successfully, the rectangular region is divided into 10 small subnetworks and one sensor in each subnetwork is selected as the CH. Subsequently, the information is transmitted to the base station which is located at one end of the monitoring region via the relay CHs.With respect to the simulation scenario, the rail is considered as thex-axis and the end far away from the base station is selected as the origin. Assume that there are several sensors deployed in the square region and the base station is located at one end of the monitoring region. The simulation scenario in this paper is defined as follows. The simulation parameters will change for different demands. The general parameters of the simulation are shown in Table 1, and others will be introduced before the corresponding simulation.Table 1
Parameters of the optimization model.
Number Parameter Description Value (1) E e l e Electronic energy 5 0  n J / b i t (2) ξ f s Amplifier energy (d2) 1 0  p J / b i t / m 2 (3) ξ m p Amplifier energy (d4) 0.001 3  p J / b i t / m 4 (4) E i n Initial energy 0.0 2  J (5) l (bit) Data packets size 150 (6) m Population size 100 (7) p m Mutation rate 0.02 (8) p c Crossover rate 0.85 (9) t Termination conditions 400


### 5.2. Energy Consumption Related to Clusters’ Number

The total energy consumption is related to the number of the subnetworks as mentioned before. The optimal number of clusters is pursued in simulation to minimize the total energy consumption and prolong the system lifetime.


#### 5.2.1. Optimization of the Clusters’ Number

In this simulation, the length of the monitoring region is increased fromL=300 m to L=3000 m, and the number of the sensors is selected as N=50,100,150,200. The simulation results are shown in Table 2 and Figure 4.Table 2
The relationship between optimal cluster number, network length, and sensors’ number.
Sensors’ number Network length/m 300 500 1000 1500 2000 2500 3000 50 4.40 5.68 8.03 9.83 11.36 12.7 13.91 100 6.22 8.03 11.36 13.91 16.06 17.96 19.67 150 7.62 9.83 13.91 17.04 19.67 22.00 24.10 200 8.80 11.36 16.06 19.67 22.72 25.40 27.83Figure 4
Relationship between optimal clusters’ number, network length, and sensors’ number.Table2 and Figure 4 indicate that the optimal number of the subnetworks is added as the length of the monitoring region and the sensors’ number increases, and it is consistent with the energy consumption model applied in this paper. The distances between the CHs and the corresponding sensors are increased when the sensors’ number is constant. It is necessary to increase the number of the clusters to decline the energy consumption of the CHs and the non-CH sensors. Additionally, the number of the non-CH sensors will be added as the total sensors increase when the length of the monitoring region is constant, which will increase the transmission burden and the energy consumption of the CHs, whereas the increase of cluster quantity will decline the consumption of the CHs significantly.


#### 5.2.2. Relationship between the Clusters’ Number and System Energy Consumption

The optimization of the clusters’ number aims to minimize the total energy consumption of system, and their relationship is simulated in this section. In this simulation, the length of the monitoring region is set asL=1000 m; the sensors’ number is N=50,100,150,200. The energy consumption is studied as the number of clusters increases from m=5 to m=30. The simulation results are shown in Table 3 and Figure 5.Table 3
The relationship between network energy consumption and clusters’ number.
Clusters’ numberm 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 -- N=50 0.1454 0.1234 0.1156 0.1142 0.1220 0.1328 0.1457 0.1602 0.1761 0.1934 0.2119 0.2316 0.2524 0.2744 0.2976 0.3219 0.3473 0.3738 0.4014 0.4301 0.4600 0.4910 0.5231 0.5563 0.5907 0.6262 -- N=100 0.3932 0.2850 0.2333 0.2072 0.1942 0.1884 0.1867 0.1949 0.2072 0.2221 0.2391 0.2580 0.2786 0.3007 0.3244 0.3496 0.3763 0.4044 0.4339 0.4648 0.4971 0.5309 0.5660 0.6026 0.6405 0.6799 -- N=150 0.7776 0.5255 0.4007 0.3336 0.2958 0.2741 0.2618 0.2554 0.2527 0.2526 0.2711 0.2913 0.3129 0.3358 0.3599 0.3852 0.4117 0.4392 0.4678 0.4974 0.5280 0.5596 0.5922 0.6258 0.6603 0.6958 -- N=200 1.2984 0.8451 0.6179 0.4933 0.4208 0.3768 0.3497 0.3330 0.3229 0.3174 0.3149 0.3146 0.3369 0.3608 0.3860 0.4125 0.4402 0.4691 0.4991 0.5301 0.5623 0.5955 0.6297 0.6649 0.7011 0.7383 --Figure 5
Relationship between the clusters’ number and network energy consumption.It is found that in Table3 and Figure 5 the relationship between the network energy consumption and clusters’ number is a set of upward parabolas, and the energy consumption is least with the clusters’ number of m=8,11,14,16, respectively, which is similar to the optimal number of clusters obtained from Figure 4. The sensors will be divided into the optimal number of clusters to minimize the energy consumption and prolong the system lifetime.


### 5.3. Balancing the Energy Consumption Using the Proposed Protocol

The performances of the proposed CMCP are compared with other protocols (LEACH-5 and LEACH-11) in the variance of the residual energy consumption, total residual energy, and the number of alive sensors. In the simulation, the length of the monitoring region and the number of sensors are set asL=1000m, and N=100, respectively. The cluster-based protocol is adopted in the subnetwork, and the optimal number of the clusters for CMCP and LEACH-11 is set as mbest=11, while we set m=5 (5% of all sensors) in LEACH-5. In the backbone network, the data packets are transmitted to the BS based on the multihop protocol. The number of the hops hi(i=1,2,…,m) and hop distance di(i=1,2,…,m) for each subnetwork in the CMCP are varying during the communication. In LEACH-5 and LEACH-11, the optimal number of hops and hop distance are used according to (16) and (17). The simulation results are shown in Figures 6, 7, and 8.Figure 6
The number of alive sensors.Figure 7
Residual energy of all sensors.Figure 8
Residual energy of all sensors.It can be indicated from Figures6, 7, and 8 that the system lifetime based on the CMCP is much longer than that of LEACH-5 and LEACH-11. Figure 6 shows that the first sensor fails from 55th communication round in LEACH-5 and the 75th in LEACH-11, while failing from the 150th in CMCP. It is because the energy consumption in CMCP is more balanced than the other two methods. In terms of the total residual energy as shown in Figure 7, the performance of the CMCP is superior to the other two protocols. Further, the variance of the residual energy in CMCP is smaller than others as shown in Figure 8, revealing that CMCP maintains the most balanced energy consumption of all sensors.


## 5.1. Simulation Parameters Configuration

For the simulation parameters and environment, Matlab is selected as the modeling and simulation in this research. In the simulation, the rail with 500 m long is selected as the monitoring object, and several sensors are deployed in the monitoring field to monitor the railway infrastructure condition. The short rail section could be considered as a nearly straight line and the monitoring field could be considered as a rectangular region. To reduce the energy consumption and guarantee that the information can be transmitted successfully, the rectangular region is divided into 10 small subnetworks and one sensor in each subnetwork is selected as the CH. Subsequently, the information is transmitted to the base station which is located at one end of the monitoring region via the relay CHs.With respect to the simulation scenario, the rail is considered as thex-axis and the end far away from the base station is selected as the origin. Assume that there are several sensors deployed in the square region and the base station is located at one end of the monitoring region. The simulation scenario in this paper is defined as follows. The simulation parameters will change for different demands. The general parameters of the simulation are shown in Table 1, and others will be introduced before the corresponding simulation.Table 1
Parameters of the optimization model.
Number Parameter Description Value (1) E e l e Electronic energy 5 0  n J / b i t (2) ξ f s Amplifier energy (d2) 1 0  p J / b i t / m 2 (3) ξ m p Amplifier energy (d4) 0.001 3  p J / b i t / m 4 (4) E i n Initial energy 0.0 2  J (5) l (bit) Data packets size 150 (6) m Population size 100 (7) p m Mutation rate 0.02 (8) p c Crossover rate 0.85 (9) t Termination conditions 400


## 5.2. Energy Consumption Related to Clusters’ Number

The total energy consumption is related to the number of the subnetworks as mentioned before. The optimal number of clusters is pursued in simulation to minimize the total energy consumption and prolong the system lifetime.


### 5.2.1. Optimization of the Clusters’ Number

In this simulation, the length of the monitoring region is increased fromL=300 m to L=3000 m, and the number of the sensors is selected as N=50,100,150,200. The simulation results are shown in Table 2 and Figure 4.Table 2
The relationship between optimal cluster number, network length, and sensors’ number.
Sensors’ number Network length/m 300 500 1000 1500 2000 2500 3000 50 4.40 5.68 8.03 9.83 11.36 12.7 13.91 100 6.22 8.03 11.36 13.91 16.06 17.96 19.67 150 7.62 9.83 13.91 17.04 19.67 22.00 24.10 200 8.80 11.36 16.06 19.67 22.72 25.40 27.83Figure 4
Relationship between optimal clusters’ number, network length, and sensors’ number.Table2 and Figure 4 indicate that the optimal number of the subnetworks is added as the length of the monitoring region and the sensors’ number increases, and it is consistent with the energy consumption model applied in this paper. The distances between the CHs and the corresponding sensors are increased when the sensors’ number is constant. It is necessary to increase the number of the clusters to decline the energy consumption of the CHs and the non-CH sensors. Additionally, the number of the non-CH sensors will be added as the total sensors increase when the length of the monitoring region is constant, which will increase the transmission burden and the energy consumption of the CHs, whereas the increase of cluster quantity will decline the consumption of the CHs significantly.


### 5.2.2. Relationship between the Clusters’ Number and System Energy Consumption

The optimization of the clusters’ number aims to minimize the total energy consumption of system, and their relationship is simulated in this section. In this simulation, the length of the monitoring region is set asL=1000 m; the sensors’ number is N=50,100,150,200. The energy consumption is studied as the number of clusters increases from m=5 to m=30. The simulation results are shown in Table 3 and Figure 5.Table 3
The relationship between network energy consumption and clusters’ number.
Clusters’ numberm 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 -- N=50 0.1454 0.1234 0.1156 0.1142 0.1220 0.1328 0.1457 0.1602 0.1761 0.1934 0.2119 0.2316 0.2524 0.2744 0.2976 0.3219 0.3473 0.3738 0.4014 0.4301 0.4600 0.4910 0.5231 0.5563 0.5907 0.6262 -- N=100 0.3932 0.2850 0.2333 0.2072 0.1942 0.1884 0.1867 0.1949 0.2072 0.2221 0.2391 0.2580 0.2786 0.3007 0.3244 0.3496 0.3763 0.4044 0.4339 0.4648 0.4971 0.5309 0.5660 0.6026 0.6405 0.6799 -- N=150 0.7776 0.5255 0.4007 0.3336 0.2958 0.2741 0.2618 0.2554 0.2527 0.2526 0.2711 0.2913 0.3129 0.3358 0.3599 0.3852 0.4117 0.4392 0.4678 0.4974 0.5280 0.5596 0.5922 0.6258 0.6603 0.6958 -- N=200 1.2984 0.8451 0.6179 0.4933 0.4208 0.3768 0.3497 0.3330 0.3229 0.3174 0.3149 0.3146 0.3369 0.3608 0.3860 0.4125 0.4402 0.4691 0.4991 0.5301 0.5623 0.5955 0.6297 0.6649 0.7011 0.7383 --Figure 5
Relationship between the clusters’ number and network energy consumption.It is found that in Table3 and Figure 5 the relationship between the network energy consumption and clusters’ number is a set of upward parabolas, and the energy consumption is least with the clusters’ number of m=8,11,14,16, respectively, which is similar to the optimal number of clusters obtained from Figure 4. The sensors will be divided into the optimal number of clusters to minimize the energy consumption and prolong the system lifetime.


## 5.2.1. Optimization of the Clusters’ Number

In this simulation, the length of the monitoring region is increased fromL=300 m to L=3000 m, and the number of the sensors is selected as N=50,100,150,200. The simulation results are shown in Table 2 and Figure 4.Table 2
The relationship between optimal cluster number, network length, and sensors’ number.
Sensors’ number Network length/m 300 500 1000 1500 2000 2500 3000 50 4.40 5.68 8.03 9.83 11.36 12.7 13.91 100 6.22 8.03 11.36 13.91 16.06 17.96 19.67 150 7.62 9.83 13.91 17.04 19.67 22.00 24.10 200 8.80 11.36 16.06 19.67 22.72 25.40 27.83Figure 4
Relationship between optimal clusters’ number, network length, and sensors’ number.Table2 and Figure 4 indicate that the optimal number of the subnetworks is added as the length of the monitoring region and the sensors’ number increases, and it is consistent with the energy consumption model applied in this paper. The distances between the CHs and the corresponding sensors are increased when the sensors’ number is constant. It is necessary to increase the number of the clusters to decline the energy consumption of the CHs and the non-CH sensors. Additionally, the number of the non-CH sensors will be added as the total sensors increase when the length of the monitoring region is constant, which will increase the transmission burden and the energy consumption of the CHs, whereas the increase of cluster quantity will decline the consumption of the CHs significantly.


## 5.2.2. Relationship between the Clusters’ Number and System Energy Consumption

The optimization of the clusters’ number aims to minimize the total energy consumption of system, and their relationship is simulated in this section. In this simulation, the length of the monitoring region is set asL=1000 m; the sensors’ number is N=50,100,150,200. The energy consumption is studied as the number of clusters increases from m=5 to m=30. The simulation results are shown in Table 3 and Figure 5.Table 3
The relationship between network energy consumption and clusters’ number.
Clusters’ numberm 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 -- N=50 0.1454 0.1234 0.1156 0.1142 0.1220 0.1328 0.1457 0.1602 0.1761 0.1934 0.2119 0.2316 0.2524 0.2744 0.2976 0.3219 0.3473 0.3738 0.4014 0.4301 0.4600 0.4910 0.5231 0.5563 0.5907 0.6262 -- N=100 0.3932 0.2850 0.2333 0.2072 0.1942 0.1884 0.1867 0.1949 0.2072 0.2221 0.2391 0.2580 0.2786 0.3007 0.3244 0.3496 0.3763 0.4044 0.4339 0.4648 0.4971 0.5309 0.5660 0.6026 0.6405 0.6799 -- N=150 0.7776 0.5255 0.4007 0.3336 0.2958 0.2741 0.2618 0.2554 0.2527 0.2526 0.2711 0.2913 0.3129 0.3358 0.3599 0.3852 0.4117 0.4392 0.4678 0.4974 0.5280 0.5596 0.5922 0.6258 0.6603 0.6958 -- N=200 1.2984 0.8451 0.6179 0.4933 0.4208 0.3768 0.3497 0.3330 0.3229 0.3174 0.3149 0.3146 0.3369 0.3608 0.3860 0.4125 0.4402 0.4691 0.4991 0.5301 0.5623 0.5955 0.6297 0.6649 0.7011 0.7383 --Figure 5
Relationship between the clusters’ number and network energy consumption.It is found that in Table3 and Figure 5 the relationship between the network energy consumption and clusters’ number is a set of upward parabolas, and the energy consumption is least with the clusters’ number of m=8,11,14,16, respectively, which is similar to the optimal number of clusters obtained from Figure 4. The sensors will be divided into the optimal number of clusters to minimize the energy consumption and prolong the system lifetime.


## 5.3. Balancing the Energy Consumption Using the Proposed Protocol

The performances of the proposed CMCP are compared with other protocols (LEACH-5 and LEACH-11) in the variance of the residual energy consumption, total residual energy, and the number of alive sensors. In the simulation, the length of the monitoring region and the number of sensors are set asL=1000m, and N=100, respectively. The cluster-based protocol is adopted in the subnetwork, and the optimal number of the clusters for CMCP and LEACH-11 is set as mbest=11, while we set m=5 (5% of all sensors) in LEACH-5. In the backbone network, the data packets are transmitted to the BS based on the multihop protocol. The number of the hops hi(i=1,2,…,m) and hop distance di(i=1,2,…,m) for each subnetwork in the CMCP are varying during the communication. In LEACH-5 and LEACH-11, the optimal number of hops and hop distance are used according to (16) and (17). The simulation results are shown in Figures 6, 7, and 8.Figure 6
The number of alive sensors.Figure 7
Residual energy of all sensors.Figure 8
Residual energy of all sensors.It can be indicated from Figures6, 7, and 8 that the system lifetime based on the CMCP is much longer than that of LEACH-5 and LEACH-11. Figure 6 shows that the first sensor fails from 55th communication round in LEACH-5 and the 75th in LEACH-11, while failing from the 150th in CMCP. It is because the energy consumption in CMCP is more balanced than the other two methods. In terms of the total residual energy as shown in Figure 7, the performance of the CMCP is superior to the other two protocols. Further, the variance of the residual energy in CMCP is smaller than others as shown in Figure 8, revealing that CMCP maintains the most balanced energy consumption of all sensors.


## 6. Conclusions

A novel CMCP for the communication of the railway wireless monitoring system is proposed to maximize the system lifetime from two hierarchies of energy consumption minimization and balance. In this paper, the monitoring region with sensor deployment is divided into several subnetworks and one backbone network constituted by the CHs in all subnetworks, with the application of cluster-based protocol and multihop protocol, respectively. First, the number of hops and the corresponding hop distances for the subnetworks are optimized to minimize the total energy consumption, and subsequently they are optimized using the hybrid PSO-GA to balance the energy consumption among all CHs.The simulation results demonstrate the superiority of the proposed CMCP along the following fronts. (1) The total energy consumption is reduced based on the optimal number of the clusters. (2) The performances in total residual energy of all sensors and the corresponding variance are all superior to the LEACH. (3) The system lifetime is prolonged by adjusting the number of hops and the corresponding hop distances. To summarize, the proposed scheme simultaneously minimizes the total energy consumption and balances the consumption among all sensors compared with existing communication protocols. This methodology can support the monitoring system to diagnose and predict the infrastructure failure within longer system lifetime and ensure the safety operation of the high-speed railway system.Besides the energy consumption of the wireless network, the bandwidth and other resources are all very important to improve the efficiency of the Internet of things [32, 33]. We will use all pieces of information together in future research.



---

*Source: 9516342-2018-03-29.xml*