## 3 System Architecture and Design
### Telematics Sensor Network  
The most essential component of the PES is the TSN. The TSN is comprised of T-Sensor nodes, T-Sink nodes, and a T-BS-com node. In this sub-section, we describe the network architecture of the PES first, and the design of each kind of node follows. The network architecture (Figure 2) of the PES is based on that of S3 [29], a two-tiered architecture targeting simple and stable operation. However, it is enhanced to meet the new requirements of the PES such as 1-hop broadcast packet support, event packet retransmission, and time synchronization. The lower tier network is used for communication between T-Sensor nodes and the T-Sink node. It is time-critical and easily interfered by the vehicles. To avoid packet collision between different lanes, T-Sensor nodes in each lane are assigned a unique frequency channel. The Physical (PHY) layer of TSN is compatible with IEEE 802.15.4-2003 (2.4 GHz). Normal packets are delivered to the T-Sink node through Lightweight MAC (LW-MAC) based on a simple CSMA/CA algorithm similar to the unslotted CSMA/CA of IEEE 802.15.4 [30]. If the MAC-level ACK frame is not received from the receiver for the ACK wait duration, the sender identifies the packet lost and retransmit the lost packet in the MAC-level. However, LW-MAC treats the event packets differently, and the event packets are transmitted to the T-Sink node without Clear Channel Assessment (CCA), random back-off, and MAC-level retransmission. If an event packet from a T-Sensor node fails to be delivered to the T-Sink node (_i.e._, the MAC-level ACK frame for the packet is not received from the T-Sink node to the T-Sensor node for the ACK wait duration), now the application layer of the T-Sensor node (instead of the MAC layer) tries to retransmit the failed event packet after updating the delay field of the original packet to accommodate the retransmission latency. Another function of LW-MAC is to take the received time stamp and add it to the header of a buffer retaining the received packet. The time stamp is used to measure the traverse time of a vehicle between two consecutive T-Sensor nodes in the same lane. By measuring the traverse time in the T-Sink node, time synchronization between the T-Sensor nodes is not required. All packets are routed to their destination using the Level-based Static Routing (LSR) protocol, which is based on level-based static addressing, for fast and robust routing. The level-based static addressing scheme allocates a 16-bit address to each node so as to assign each level to each nibble of the 16 bit address as described in Figure 3. By sacrificing 6% of the address space, the LSR protocol gains the advantages of simplicity, speed, and table-less routing. The upper tier network is used for data exchange between the T-Sink nodes and the T-BS-com node. The network uses a common frequency channel different from the channels used by the T-Sensor nodes. Every packet exchanged between them is delivered over IEEE802.15.4-2003 PHY,  
Figure 3: Addressing Scheme for Level-based Static Routing. Figure 2: Network architecture of TSN. LW-MAC, and LSR. The packets over the upper tier network are not time-critical, so the LW-MAC in the tier is configured to use normal CSMA/CA and multiple retransmissions. In the case of T-Mon Host failure, T-BS-com saves every traffic information packet in its local storage. The saved information can be retrieved to evaluate the VDS after the recovery of the T-Mon Host. In addition, in the case of T-Sink node failure, every event generated by a T-Sensor node is saved in its local Secure Digital (SD) card. Any undelivered traffic information of the T-Sensor node can be restored during post-processing of the locally-saved events. To do that, time synchronization between two T-Sensor nodes in the same lane is required.