Virtual fieldbus – Applicability, technologies and evaluation
Niemistö, Lassi (2013)
Niemistö, Lassi
2013
Automaatiotekniikan koulutusohjelma
Teknisten tieteiden tiedekunta - Faculty of Engineering Sciences
This publication is copyrighted. You may download, display and print it for Your own personal use. Commercial use is prohibited.
Hyväksymispäivämäärä
2013-06-05
Julkaisun pysyvä osoite on
https://urn.fi/URN:NBN:fi:tty-201306081185
https://urn.fi/URN:NBN:fi:tty-201306081185
Tiivistelmä
In the present-day software and automation development, different methods of virtualization have become popular, as the final hardware is then not required for software development. This allows earlier and faster software process, reduced time to market and more fluent workflow. As distributed automation systems generally rely on fieldbuses of various types, implementing a virtual and fully operational fieldbus is a necessity for efficient utilization of the virtualized system.
In this thesis, we take a comprehensive approach to virtual fieldbuses, from concept definition to experimental performance characteristics. We discuss the common behavior of different fieldbuses, list applications for virtual buses and compare possible implementation technologies such as TCP/IP and shared memory. Virtualization tools VirtualBox and QEMU are closely studied, as they bring additional challenges to data transfer.
From the practical point of view, the study presents our experiences on implementing a virtual CAN bus for embedded development. With an extensive set of features and platform support in our design, it demonstrates the utilization of multiple technologies. Using the virtual CAN implementation, we then show the measured performance characteristics and evaluate the solution against actual hardware.
Potential of virtual bus technology was proven by the performance measurements. Shared memory implementation provided extremely good performance, sufficient for implementing any virtual fieldbus system. It was also found to be efficient in respect to CPU load. Unfortunately, shared memory usually cannot cross virtualization boundaries. TCP was found as the best option for the rest of the use cases. In restricted local Ethernet or between VirtualBox and host OS, it is able to provide latencies under 700µs, similar to hardware performance. Observed bottlenecks were the use of the QEMU emulation tool without optimizations, and slow USB fieldbus adapters.
We recommend using virtual fieldbuses in virtualized development and debugging of distributed systems and for automatic system level testing, if timing requirements are not extremely strict. Remote virtual connection to a hardware fieldbus is also seen as a valid application. The technologies and adapters must still be carefully selected for best results.
In this thesis, we take a comprehensive approach to virtual fieldbuses, from concept definition to experimental performance characteristics. We discuss the common behavior of different fieldbuses, list applications for virtual buses and compare possible implementation technologies such as TCP/IP and shared memory. Virtualization tools VirtualBox and QEMU are closely studied, as they bring additional challenges to data transfer.
From the practical point of view, the study presents our experiences on implementing a virtual CAN bus for embedded development. With an extensive set of features and platform support in our design, it demonstrates the utilization of multiple technologies. Using the virtual CAN implementation, we then show the measured performance characteristics and evaluate the solution against actual hardware.
Potential of virtual bus technology was proven by the performance measurements. Shared memory implementation provided extremely good performance, sufficient for implementing any virtual fieldbus system. It was also found to be efficient in respect to CPU load. Unfortunately, shared memory usually cannot cross virtualization boundaries. TCP was found as the best option for the rest of the use cases. In restricted local Ethernet or between VirtualBox and host OS, it is able to provide latencies under 700µs, similar to hardware performance. Observed bottlenecks were the use of the QEMU emulation tool without optimizations, and slow USB fieldbus adapters.
We recommend using virtual fieldbuses in virtualized development and debugging of distributed systems and for automatic system level testing, if timing requirements are not extremely strict. Remote virtual connection to a hardware fieldbus is also seen as a valid application. The technologies and adapters must still be carefully selected for best results.