## 2 Related Work  
We can find many proposals that make use of WSNs for railway infrastructure protection in the literature. Topics addressed in these proposals include monitoring the state of the rail infrastructure and trains, detecting obstacles or signaling. Some of these proposals are detailed below. The details of a real deployment of a WSN on a railway bridge are presented in [10]. The WSN has a total of eight nodes and a TmoteSky base station 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 is active while the train is crossing the bridge. The network is automatically organized 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 technology is used to send data to a remote control center. In [11], another TmoteSky WSN formed 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 [11] (around 20 Hz) is much lower than the one presented in this paper because the train speed is assumed to be low. A WSN architecture is presented in [12] for monitoring the state of the railways. The sensors make use of 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 are merged as they 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 [13]. 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 the use of 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 [14]. The infrastructure, called SENSORAIL, integrates different kinds of sensors (such as temperature sensors, cameras, _etc._) 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 work focuses on the system architecture instead of the hardware details. In [15] the installation of permanent sensors for monitoring the condition of train bearings and detecting potential problems in them, such as locked brakes, overheating in bearings, _etc._ 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. It also identifies obtaining energy through vibrations as most promising for such applications. The integration of sensors in the wheels makes the energy harvesting easier. In our proposal, vibrations are attenuated due to the integration of nodes inside the slab track. In [16] WSN technology is used to monitor the integrity of freight trains. Specifically, sensors are used to detect situations in which wagons become separated from the locomotive for unjustified reasons. Accelerometer and vibration sensors are able to detect whether the train is moving. They propose mechanisms for energy harvesting.