# A Design of a Lightweight In-Vehicle Edge Gateway for the Self-Diagnosis of an Autonomous Vehicle
## 1 Introduction  
In the future, more than 200 billion devices will be connected to the cloud and each other in what is commonly called the Internet of Things (IoT) [1]. Therefore, An IoT gateway that is a physical device or software program as the connection point between the cloud and controllers, sensors and intelligent devices plays important role. IoT gateway provides a place to preprocess the data located at the edge before sending it on to the cloud and supports communication between heterogeneous devices.  
The gateways of connected cars, which are currently being developed, are similar to IoT gateways. As shown in Figure 1, the connected car's ECUs and Gateway need to handle many requirements, such as enhancing engine control and transmission control performance; securing stability through ABS, LDW, and FCW; and increasing convenience through camera and body control. To address these needs, the number of ECUs used in vehicles has increased dramatically and ECUs are connected to various protocols depending on their characteristics [2].  
To process such a large amount of data, various communication protocols such as FlexRay, MOST, CAN and Ethernet are used inside the vehicle. CAN, a low-speed (1 Mbps) communication protocol used in conventional in-vehicle communications, is used to process relatively less important vehicle control sensor data. FlexRay, a high-speed (10 Mbps) communication protocol, is mainly used to process control data of major parts of a vehicle. MOST and Ethernet have speeds up to 150 Mbps. MOST is a ring type network that processes multimedia data such as voice and video inside the vehicle, and Ethernet can be used as a backbone of in-vehicle network or as a V2X communication protocol.  
To support these protocols, there have been various studies on the gateway inside the vehicle. However, gateways with minimum transmission delay only support some protocols such as CAN to FlexRay and MOST to CAN, and gateways that support communication for all protocols had increased transmission delay.  
To support the four major protocols (i.e., CAN, FlexRay, MOST, and Ethernet) used for in-vehicle communications and to minimize the transmission delay of gateways, this paper proposes a Lightweight In-Vehicle Edge Gateway (LI-VEG) for the self-diagnosis of an autonomous vehicle. The LI-VEG receives the messages from the source sensor or actuator, translates the received messages into the format of a destination protocol, and transfers the translated messages to the destination ECU, sensor, or actuator, and the messages received from a source to the self-diagnosis module. Because the LI-VEG supports four major protocols, contrary to the existing vehicle gateway, it has good scalability and compatibility. In addition, The LI-VEG is indispensable to self-diagnosis module of an autonomous vehicle due to its rapidity and accuracy. A paper on the self-diagnosis module has already been published [3], thus this paper only covers the LI-VEG, not the self-diagnosis.  
The remainder of the paper is organized as follows. In Section 2, related works are introduced. In Section 3, the configuration and operation of LI-VEG are described. In Section 4, the performance evaluation focuses in particular on the transmission delay and error rate for message transmission. Finally, Section 5 presents the conclusions of the paper.