## 2 WSN-Based ITS Applications
### Traffic Control Applications  
Traffic control involves applications directing vehicles within a road network. These applications consider a road network as a graph composed of intersections (vertices) and road segments (edges), with sensor nodes deployed at and along both of them. Sensor nodes along segments are used to measure the traffic flow in roads, obtaining information such as vehicle density, speed, formation of platoons or distribution of vehicles according to different categories. Sensor nodes at intersections, in turn, are responsible for making the appropriate decisions on how to direct traffic based on the information provided by the sensor nodes along the road. It is also possible to make these decisions in TMCs; however this is a less often explored possibility which implies the transmission of information to a centralized TMC through an external network. Two different groups of traffic control can be identified. The first group includes traffic guidance applications such as path planning [18] which, due to the size a static road deployment may cover (at low cost), are best suited for urban scenarios. In them WSNs can be used to monitor small to medium size road networks, estimating the time cost of each road segment in order to obtain the optimum path for a specific destination. The second group comprises applications which manage traffic at intersections by means of traffic lights, governing the scheduling of traffic phases (group of directions which are allowed to enter the intersection at a given time). They are based on placing nodes before the traffic lights, possibly one per lane, to find out the number of arrivals at the intersection from each segment [19]. In addition, sensor nodes can also be placed after the traffic lights to obtain the number of departures and, combining both data, infer the queue length at each traffic light [20, 21]. These systems require a very small number of deployed nodes, therefore providing very cost-effective solutions. Only if scheduling algorithms relying on the number of vehicles driving towards the intersection (rather than on the number of those waiting) are used, a higher number of sensors are required to forward vehicle detections from distant parts of the road segment. Traffic control applications need an estimation of the state of the different road segments. Most basic schemes consist of forwarding raw data detected by the sensor nodes towards an intersection or TMC where these data is processed. However, collaborative processing may be applied in order to reduce the amount of information delivered, detecting situations which require traffic diversion in a distributed manner. One such situation is congestion. In [22] a mechanism is used that, on the one hand, reduces the frequency of transmissions by segmenting data into time series of variable length. This length is established by the similarity of sensed data in such a way that only when the traffic state presents significant variations a message is sent. On the other hand, the mechanism reduces the number of transmissions by means of data fusion, making the number of messages delivered increase with the number of nodes of a segment according to a linear progression. This is possible thanks to the use of the Discrete Fourier Transform (DFT) for compression and its property of linearity, which allows a simple and distributed synthesis of the road state from the individual state of every single sensor. Another situation requiring traffic diversion is the occurrence of accidents. Several methods have been proposed for their detection. A simple scheme is to check if a vehicle did not transmit its condition over a certain period of time. However, in a distributed network, this may imply the interchange of an excessive number of messages between static nodes. Acoustic detectors based on neural networks [23] and vibration sensors in vehicles [24] are more feasible options which provide high accuracy.