## 2 Related Work  
Many different papers present studies and deployments of WSNs to monitor railways, and other critical infrastructures, for example, bridges. A deployment of a railway bridge is presented in [11]. The WSN has a total of 8 nodes and a base station TmoteSky gathering data on the status of the bridge to detect deformations in the infrastructure when trains cross it. Accelerometer sensors are used to detect trains approaching the bridge and start the process of collecting data that remains active while the train is crossing the bridge. The network is self-organizing according to a protocol based on routing trees to be able to transmit information to the base station. Once the information has been received, the UMTS (Universal Mobile Telecommunications System) technology is used to send data to a remote control center. In [12], another TmoteSky WSN to collect information on the status of a railway bridge is presented. A sensor placed on trains is used as a mobile base that collects data from the sensor network as it travels through the bridge station. A tree-based routing protocol is used to transmit information to a number of leader nodes. They transmit the information collected to mobile nodes located on the train. The sampling frequency in [12] (around 20 Hz) is much lower than the one presented in this paper because the train's speed is assumed to be low. A WSN architecture is presented in [13] for monitoring the state of the railways. The system integrates accelerometers and ultrasonic sensors to detect wear and tear on roads. A hierarchical network topology is used so that there are multiple paths that can be used to reach the base station. This tolerance is achieved against failure nodes. The data collected by the network is merged as it is are sent to the base station through the use of fuzzy logic techniques. Similar to the one presented in the previous paragraph is the system described in [14]. This also makes use of a hierarchical network and ultrasonics to detect possible problems in the railway's sensors. It also introduces the use of image processing and electromagnetic detection of dangerous objects on the railway tracks. Another architecture for the monitoring of railway infrastructure, which includes a WSN as an integral part of it, is given in [15]. The infrastructure, called SENSORAIL, integrates different kinds of sensors (such as temperature sensors and cameras) for the protection of such infrastructures. The framework provides information by means of abstractions of high-level programming. It also incorporates a threat detection system based on the information acquired by the sensors. This paper focuses on the system architecture instead of the hardware details. In [16] the use of WSNs is proposed to control the signaling system and train control on the railway. Currently, wired networks that provide high reliability but at very high costs are used. Using WSNs would reduce costs and decrease maintenance costs. To maximize efficiency and reliability, the network is composed of heterogeneous sensors connected hierarchically. The sensors deployed in the railways make use of the IEEE 802.15.4 [17] protocol to communicate and organize themselves so that there are no redundant paths. The information collected by these nodes is transmitted to access points that use more powerful communication technologies, such as GPRS (General Packet Radio Service) or WiMAX (Worldwide Interoperability for Microwave Access), to transmit the information to the control centers. In [18] installing permanent sensors for monitoring the condition of train bearings and detecting potential problems in them, such as locked brakes and overheating in bearings, is proposed. Two particular aspects are studied: the behavior of the wireless communication system of sensors with respect to where the sensors are installed on the train and energy harvesting techniques to minimize maintenance of the sensors. The results indicate that the radio transmitters perform better when placed above the train than when placed beneath.