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

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 andmultihop protocols (CMCP) tominimize 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 clusterbased 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 swarmoptimization and genetic algorithm (PSOGA) are adopted to optimize the energy consumption from the two-layer hierarchy. Finally, the effectiveness of the proposedCMCP 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.


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 2 Wireless Communications and Mobile Computing 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.Section 2 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.

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 clusterbased 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 -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.

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 Figure 1, 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.

Structure of the Railway Wireless Monitoring Network.
The railway wireless monitoring network is composed of two layers as shown in Figure 1: 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 clusterbased 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.

Energy Consumption of Railway Wireless Monitoring System.
The sensors in the monitoring system are composed of four modules as shown in Figure 2: 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.
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 where  is the size of the data packets to be processed and  DA 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: where  is the size of data packets collected by the sensing module; the data is processed before transmitting and  is the compression ratio of the processing module;  ele 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  0 is the critical distance for the models switching, and it is defined as The receiving energy consumption for the receiving circuit is defined as where  ×  represents the size of the data packets received by the sensor and  ele is the energy consumed by the receiving circuit to receive 1-bit data.

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.

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 Figure 3, which is detailed in the following section.
As shown in Figure 3, the overall structure of the twohierarchy 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.

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.

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.Let  and  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  bits.Assume that all sensors are divided into  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

Optimal multihop number
Optimal distance between the clusters

Output of the CMCP and application
where   CH represents the energy consumption for the cluster heads to receive the data from other sensors;   CH represents the energy consumption for CHs to process the received data;   CH represents the energy consumption for CHs to send the data to other cluster heads or the base station; and  CH 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 where  non-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 where  is the number of sensors in each cluster and  is the radius of the subnetwork (it is assumed that the sensors in the subnetwork are deployed in a circle region).The expected  2 non-CH is calculated as Wireless Communications and Mobile Computing 7 The energy consumption in each cluster in one communication round is calculated as The derivative of  total with respect to  can be calculated as 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 The determination for the optimal number of clusters can minimize the total energy consumption using the clusterbased protocol in the railway wireless monitoring system.

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 the th CH are transmitted forward to the BS using multihop protocol in ℎ  hops.The total energy consumption during the transmission process is calculated as where ℎ  is the number of the hops for the data collected by the th CH transmitted to the BS and  ℎ represents the distance of one hop for th CH.Assume that the CH is located at the center of each cluster and the distance between the th CH and the BS is   toBS = ( best −  + 1/2) × / best .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 The derivative of   with respect to ℎ  is calculated as 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 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 the th CH is calculated based on ( 14) and ( 16) as

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.

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 where  min Re () is the minimum residual energy of all sensors in the cluster and   Re () represents the residual energy of the th sensor before the th round as computed below: where   Co ( − 1) is the energy consumed by th sensor in  − 1th round.If the sensor is CH in  − 1th round, it is computed according to Otherwise, if the sensor is non-CH in −1th round, which is computed by 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.

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 where (ℎ  ,   , ) aims to minimize the variance of the residual energy for all CHs;  re (ℎ  ,   , ) represents the residual energy of the th CH in the th communication round using the number of hops ℎ  and the corresponding hop distance   ;  re represents the average of the residual energy for all the CHs; and  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 th 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 th CH to the base station.The residual energy for the th CH   (ℎ  ,   , ) is calculated as where  co (ℎ  ,   ,  − 1) is the energy consumed by th sensor in  − 1th round, which is computed according to (13) as 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.2will accelerate the convergence speed in the optimization.

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 Algorithm 1.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].

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.

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 the -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.

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.

Optimization of the Clusters' Number.
In this simulation, the length of the monitoring region is increased from  = 300 m to  = 3000 m, and the number of the sensors is selected as  = 50, 100, 150, 200.The simulation results are shown in Table 2 and Figure 4.
Table 2 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.

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 as  = 1000 m; the sensors' number is  = 50, 100, 150, 200.The energy consumption is studied as the number of clusters increases from  = 5 to  = 30.The simulation results are shown in Table 3 and Figure 5.
It is found that in Table 3 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  = 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.

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 as  = 1000 m, and  = 100, respectively.The clusterbased protocol is adopted in the subnetwork, and the optimal number of the clusters for CMCP and LEACH-11 is set as  best = 11, while we set  = 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 ℎ  ( = 1, 2, . . ., ) and hop distance   ( = 1, 2, . . ., ) 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.
It can be indicated from Figures 6, 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 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 , the distance between two sensors , the initial energy of the sensors  in , the number of the subnetworks , the number of the hops for each CH ℎ  ( = 1, 2, . . ., ), the hop-distance for each sub-network   ( = 1, 2, . . ., ), and communication round  = 1, etc.; initializing the parameters for the Hybrid PSO-GA algorithm including the scale of the population , iteration times , crossover probability   , and mutation probability   , etc.The parent population are generated according to these parameters.shown in Figure 8, revealing that CMCP maintains the most balanced energy consumption of all sensors.

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.The communication round.

Figure 1 :
Figure 1: Structure of the RWMS network.

Figure 2 :
Figure 2: Structure of the sensors.

Figure 4 :
Figure 4: Relationship between optimal clusters' number, network length, and sensors' number.

Figure 5 :Figure 6 :
Figure 5: Relationship between the clusters' number and network energy consumption.

Table 2 :
The relationship between optimal cluster number, network length, and sensors' number.