## 1 Introduction  
Comprehensive knowledge about railway transportation needs, such as urban, suburban and intercity rail, provides the possibility of developing railway system. During two last decades, by increasing the demand for using railway services, general railway infrastructure, particularly communication system, are quickly developing. In the past wired communication systems were used for signaling and data communication in the railway industry but recently wireless communication systems have emerged as alternatives to supplant wired systems. Railway communication and signaling systems are used to monitor the condition of trains in order to maintain reliable, safe and secure operations [1]. Different nations are highly focused on the importance of developing the rail transportation network together with providing the measures for replacing road transportation due to its advantages for reducing the fuel consumption, increasing safety and convenience, as well as lower environmental pollution and higher employment. In recent years, with the sharp increase in the need for transportation, better and smarter monitoring mechanisms, with monitoring in real time and early warning at times when there are dangerous conditions in the way of railway transportation, is needed to safeguard railway transportation safety. Wireless sensor networks, with advantages such as strong compatibility, easier establishment and lower costs, are considered as a choice for designing a system by creating better and more secure mechanisms in time to warn of the risks in rail systems [2]. The mechanism for presenting the sign and indicator is called the \"signal\" or \"signal device\". Railway signals are a means of communication beyond the range of the voice. Current methods of signaling and train control systems are: communications-based train control (CBTC) systems; advanced train control systems (ATCS); and command, control and communications systems (CCCS). Incremental train control systems (ITCS), positive train control (PTC), positive train separation (PTS), and the European train control system (ETCS) are the new systems developed to enhance the safety and security of train operations [1]. General methods used for signaling and monitoring in the railways are shown in Figure 1.  
In the late nineteenth century, a railway signaling and monitoring system was developed to create a more secure, quicker system and generally promote the quality and quantity of this complex. Ongoing inventions in railway technology came with continuing increases in the level of creation of new infrastructure in the field of communication and signaling (C & S) in railways. Since 1840, semaphore signals technologies were created in the UK, gradually developed, and were replaced by wireless communication technology in the modern era. Since that time, most companies have continuously tried to improve and promote C & S technology [1]. Due to their high usage of the rail transportation system for increasing the security, efficiency and speed of railways, nations such as the USA, China and India have simply used the wireless sensor network and presented different plans as well. Initially, it was vital to develop and manage railway infrastructure systems; thus, they turned to intelligent systems in a short time for better management. One of the key sections of this management was situation management. Situation monitoring in wireless sensor networks deals with diagnosing and detecting the defects in the existing system in railway infrastructure before the occurrence of any error, fault or defect [3]. The wireless receiver network collects information about safety of railway infrastructure when the train is moving along rail lines and then transmits it to the base station [4]. Figure 2 indicates the situation monitoring by a wireless sensor network [5].