You are on page 1of 10

An ns3 based Simulation Testbed for In-Vehicle Communication Networks

Shane Tuohy1, Martin Glavin1,Ciarn Hughes2, Edward Jones1, Liam Kilmartin1.

Electronic and Electrical Engineering, National University of Ireland Galway, Ireland {shane.tuohy, martin.glavin, edward.jones, liam.kilmartin} 2 Valeo Vision Systems, Tuam, Ireland

Abstract. Automotive electronics is a rapidly expanding area with an increasing number of driver assist and infotainment devices becoming standard in new vehicles. A review of the current landscape of networking standards within vehicles reveals a fragmented and proprietary state of affairs with several standards dominating the sphere including MOST, CAN and LVDS all of which are in current use by various vehicle manufacturers. Due to the costly nature of equipment and testing apparatus for these standards, there is a general desire within the automotive industry to use the 802.3 Ethernet standards for all in-vehicle communication between devices. This paper presents an overview of an ns-3 based simulation environment which is the initial step in an ongoing research effort to design cost effective, flexible and deterministic in-vehicle networks suitable for use in the next generation of vehicles, particularly for use by driver assist applications. Keywords: automotive Ethernet, CAN, LVDS, MOST, 802.3, driver assist


Modern vehicles are increasingly being equipped with advanced driver assist and infotainment subsystems. Multiple cameras are becoming a standard part of todays in-vehicle safety systems while screens and consoles are increasingly common components of infotainment systems integrating GPS receivers, video players and other entertainment devices. Currently there are several different technologies used to interconnect these devices, which are detailed below. CAN (Controller Area Network) CAN [1] is an automotive specific bus standard developed by Robert Bosch GmbH and released in 1986. Due to its low maximum bandwidth, it cannot be used to transmit audio and video streams. It is useful however and is typically used to

transmit control messages between Electronic Control Units (ECU) within the vehicle. MOST (Media Oriented Systems Transport) As the acronym suggests, the MOST [2] protocol was developed to primarily support multimedia data. Its maximum bandwidth as defined by the MOST150 standard is 150 Mbps which makes it much more suitable for multimedia data transmission. While the MOST Cooperation does publish the MOST specification, it lacks details on the Data Link Layer (OSI Layer 2), making these details available only on a royalty basis. FlexRay FlexRay [3] is an automotive networking standard that was developed by the FlexRay consortium which disbanded in 2009. The main advantages of FlexRay are its higher maximum data rate (20Mbps) and its deterministic behaviour. However, FlexRay nodes are more expensive than CAN nodes[4] which is unappealing to high volume manufacturers such as those found in the automotive domain. LVDS (Low Voltage Differential Signalling) While not explicitly developed for automotive applications, the high bandwidth made possible by LVDS [5] over twisted pair copper cabling (655 Mbps) has made LVDS an attractive option for automotive manufacturers. Often, several of these communication technologies will be used in a single vehicle. As noted in Table 1, there is significant diversity in the capabilities of these technologies and this itself is a significant driver of interest in the use of a common communication standard in the next generation of in-vehicle networks. Protocol LIN CAN FlexRay MOST LVDS Ethernet Bitrate 19.2 Kbps 1 Mbps 20 Mbps 150 Mbps (MOST150) 655 Mbps 100 Gbps Transmission Medium Single Wire Twisted Pair Twisted Pair/Optical Fibre Optical Fibre Twisted Pair Twisted Pair/Optical Fibre

Table 1. Comparison of current and proposed automotive bus technologies

Section 2 of this paper details the benefits of choosing Ethernet as the backbone of a next generation in-vehicle network; section 3 explores related work in this field; section 4 describes the choice of a network simulation platform for use in this research and section 5 outlines the creation of a simulation testbed to model a next generation Ethernet based in-vehicle network and also summarises results of some preliminary tests carried out on this network.


Ethernet [6] as detailed by the IEEE 802.3 standard has been the dominant networking standard for almost 30 years. Its combination of high speed, low cost and flexibility has made it the obvious choice for local area networks. Table 1 shows the potential bandwidth advantages of deploying an Ethernet based in-vehicle network. In addition, full duplex Ethernet offers several other advantages including: Cost: The high demand and popularity of Ethernet ensures that it is an extremely cost effective solution. The automotive industry is extremely sensitive to cost considerations and the potential benefits of using standard widely available components and hardware is a significant advantage. Continued Development: The 802.3 working group has the responsibility for continually improving the performance of the Ethernet standard. From the inception of Ethernet in 1973, the technology has been iterated several times, with the latest iteration providing 100 Gbps over optical fibre or twisted pair copper cables. Flexibility: As mentioned previously, several different network buses may be in use concurrently in a single in-vehicle network. Ethernet can alleviate much of this complexity due to its universality and flexibility.

Related Work

The goal of this research is to build upon existing research in this field, primarily work by Rahmani et al. [7] and Sommer et al. [8], in order to realise an efficient cost effective implementation of an in-vehicle automotive network with a focus on topology optimisations and traffic management. The 802.3 Ethernet standard does provide a robust and cost effective solution for most networking requirements but there are specific criteria that must be met for Ethernet to be considered as a feasible replacement for legacy technology in the automotive environment. 3.1 Traffic Classification, Traffic Shaping and Quality of Service (QoS)

Within the automotive domain, commonly there may be several different types of traffic co-existing on a single network. These were categorised into the following 4 different classes by Rahmani et al [9], namely: Hard Real Time Characteristics Small packet size High QoS requirements Soft Real Time Characteristics

Small packet size Less strict QoS requirements Multimedia Characteristics Large packet size and bandwidth Strict delay and jitter requirements Best Effort Characteristics No QoS requirements Given the safety critical nature of information that is often carried by in vehicle networks between safety systems, deterministic behaviour is desirable for these networks. Traffic shaping has been investigated as a means to reduce the required resources in the network. Several shapers have been investigated, including the Leaky Bucket [10], Token Bucket [11] and a newly proposed Simple Traffic Smoother [12]. 802.1p is a technique used to provide basic static priority tagging of packets by adding a 3 bit field to the Ethernet frame header. Rahmani et al. [13] used this technique to provide simple QoS tagging of packets by statically assigning the 4 traffic types referenced above different priority levels. It was found that using priority tagging of packets can fulfil hard real time requirements for networks of up to 7 interconnected switches.

Network Simulation Environment

The immediate concern of the work reported in this paper was the selection of a simulation environment in which to develop a model of an Ethernet based in-vehicle network. To this end, a number of commonly used simulation tools were evaluated. The tools evaluated were, Opnet Modeler [14], OMNeT++ [15], ns-2 [16] and ns-3 [17]. Opnet Modeler is a commercial network simulation platform which contains a broad suite of technologies and protocols. It is not freely available and must be licensed. OMNeT++ is an open source, component-based, modular and discrete event network simulation framework based on the Eclipse IDE. As it is released under a free academic license, it is quite popular amongst the researcher community. Historically, ns-2 has been the standard network simulation tool [18], its large community of users, extensive documentation and open source model have all contributed to its popularity. However, its successor ns-3 has recently begun to grow in popularity ns-3 is a discrete event network simulator which is the evolution of the ns-2 simulator. Despite its name, ns-3 is not an iterative improvement to ns-2, rather it is a completely new simulation tool.

After completing a review of the capabilities of the various simulation tools, it was decided to select ns-3 as the primary simulation tool for our testbed for a number of reasons, as detailed in the following sections. 4.1 Focus on testbed model of network simulation

With current PC hardware, it is possible to not only simulate nodes within a network but to create entire networks of virtual machines within a single host machine. ns-3 can interconnect these virtual machines to create a realistic implementation of prototype networks within a single machine. Coupled with the ns-3 project goal of model realism this makes ns-3 a powerful tool to rapidly develop and change testbed networks, and produce meaningful results. This style of network simulation development is illustrated in Fig. 1.

Fig. 1. ns-3 used to interconnect virtual machines

Also in ns-3 it is possible to have emulation of network hardware within a live network (i.e. in the loop testing). Machines running ns-3 can be used to emulate network nodes thus allowing the creation of cheap and flexible prototype networks which use ns-3 emulation nodes as substitutes for expensive hardware. A conceptual diagram of this method is shown in Fig. 2.

Fig.2. ns-3 used to emulate network components

The practical nature of this research results in the need to use real video streams to investigate the effects of compression, error rate and delay on driver assist image processing algorithms. ns-3s emulation and virtual machine capabilities greatly increase the level of control and testing which is possible on such algorithms. 4.2 Community and documentation

ns-3 is an open source project, meaning that both the product and the underlying code are freely available. This is particularly useful in research as underlying models may need to be inspected or modified. The tool is under active development with a global community of contributors. As a result of the popularity of its predecessor and its own increasing popularity, documentation is widely available through mailing lists and web resources.

Simulation Testbed

To date this research has focused on the development of an ns-3 based testbed simulation network that takes advantage of the ns-3 features mentioned above. The testbed models a typical next generation in-vehicle network, containing several video sources coupled with CAN and LIN [19] gateways allowing for compatibility with current generation networks. The network is illustrated in Fig. 3.

Fig.3. Network Architecture


Initial Results

As previously mentioned, much of the work carried out to date has been in the formation of the network testbed. However, some preliminary testing has been carried out to verify the correct operation of the model which has been created. Video trace files generated by Fitzek et al. [20] were used to test the operation of the testbed. These variable bit rate video streams were transmitted using the UDP protocol. Maximum bandwidth values of the model channels were varied and the resultant end to end delay was measured between video nodes and a UDP server application attached to the switch. These results are illustrated in the box plot in Fig.4. Also measured was the standard deviation of delay values, which is a measure of the jitter of the packet stream. These results can be seen in Table 2.

Fig. 4. Box plot of delay values

These tests were not intended to be exhaustive and are simply a verification of the validity of the testbed. A summary of average end to end delay values for packets up to an MTU of 1460 bytes can be seen in Table 2 below. As can be seen from Fig. 4, delay values decline sharply when the bandwidth of the channel increases above 1Mbps. This is because the video trace files used in testing are MPEG-4 encoded video with a maximum bandwidth of ~3 Mbps. The video stream tested consists of 25 frames per second video meaning that a frame is required every 40ms. As expected, the 10, 100 and 1Gbps channels can easily support the video stream, even taking into consideration packet delay variation. These levels of delay and jitter are acceptable in an infotainment situation where video is simply being displayed. However, the additional of processing time required for driver assist applications may mean that more processing may need to be carried out on the stream at its source and\or at the router in order to ensure its timely arrival. Bitrate (Mbps) 1 10 100 1000 Mean End to End Delay+/- Standard Deviation (ms) 29.8614.71 6.113.19 3.732.08 3.491.96
Table 2. Mean end to end delay values

Conclusions and Future Work

A basic yet flexible testbed network has been developed using the ns-3 simulation tool to model an in-vehicle Ethernet network. Initial basic validation tests have also been carried out. The success of this initial phase of the research confirms the

viability of using ns-3 to conduct research on in-vehicle Ethernet applications. However, this is only the first step towards the simulation and implementation of a scalable, deterministic and cost effective in-vehicle Ethernet based network. Clearly much more complete and thorough testing of the simulated network must be carried out. Concurrently, we intend to enhance the testbed to include the following features; Scheduling based on dynamic priority allocation, extending the static priority scheduling model first proposed in [13]. Accurate modelling of the impact of EMI on the Ethernet communication channels when deployed in a vehicular environment and an investigation of its impact on driver assist application performance. Investigation of the suitability of the new 802.11 AVB standard [21] for the provision of QoS in such networks. Rigorous testing of suitability of the developed models using comparisons with the performance of real prototype networks. These features will form the basis for a robust testbed representing the next generation of in-vehicle Ethernet networks. The real world implementation of this network has massive potential benefits to both manufacturers and consumers in providing higher bandwidth, reliable and cost effective in-vehicle networks to accommodate more advanced driver assist and infotainment applications. The utilisation of standardised Ethernet technology ensures that such networks will remain at the cutting edge of network performance well into the future.

1. 2. 3. 4. Bosch: CAN Specification version 2.0. Bosch (1991). MOST Cooperation: MOST Specification. Package, L.I.N.S.: Revision 2.0. LIN consortium. (2003). In-vehicle Networking reaching the next stage: On-chip FlexRayTM available on Infineons new microcontroller family Infineon Technologies, Huq, S., Goldie, J.: An overview of LVDS technology. National Semiconductor Application Note. 971, 16 (1998). Metcalfe, R.M., Boggs, D.R.: Ethernet: distributed packet switching for local computer networks. Commun. ACM. 19, 395 404 (1976). Rahmani, M., Steinbach, E., Hintermaier, W., Laika, A., Endt, H.: A novel network design for future IP-based driver assistance camera systems. Networking, Sensing and Control, 2009. ICNSC09. International Conference on. pp. 457462. Sommer, J., Doumith, E.A., Reifert, A.: Cost-based Topology Optimization of Embedded Ethernet Networks. International Journal of Embedded and Real-Time Communication Systems (IJERTCS). 2, 122 (2011). Rahmani, M., Hillebrand, J., Hintermaier, W., Bogenberger, R., Steinbach, E.: A novel network architecture for in-vehicle audio and video communication.

5. 6. 7.



Broadband Convergence Networks, 2007. BcN07. 2nd IEEE/IFIP International Workshop on. pp. 112 (2007). 10. Scalable architectures for integrated traffic shaping and linkscheduling in highspeed ATM switches. Selected Areas in Communications, IEEE Journal on. 15, 938-950 (1997). 11. Sahu, S., Nain, P., Diot, C., Firoiu, V., Towsley, D.: On achievable service differentiation with token bucket marking for TCP. SIGMETRICS Perform. Eval. Rev. 28, 2333 (2000). 12. Rahmani, M., Tappayuthpijarn, K., Krebs, B., Steinbach, E., Bogenberger, R.: Traffic Shaping for Resource-Efficient In-Vehicle Communication. Industrial Informatics, IEEE Transactions on. 5, 414428 (2009). 13. Rahmani, M., Hillebrand, J., Hintermaier, W., Bogenberger, R., Steinbach, E.: A Novel Network Architecture for In-Vehicle Audio and Video Communication. 2007 2nd IEEE/IFIP International Workshop on Broadband Convergence Networks. pp. 1-12. , Munich, Germany (2007). 14. Omnet Modeler, 15. OMNeT++ Network Simulation Framework, 16. The Network Simulator - ns-2, 17. The ns-3 network simulator, 18. A Performance Comparison of Recent Network Simulators. 1-5 (2009). 19. Package, L.I.N.S.: Revision 2.0. LIN consortium. (2003). 20. MPEG-4 and H.263 video traces for network performance evaluation. Network, IEEE. 15, 40-54 (2001). 21. IEEE 802.1 AV Bridging Task Group,