The Lightweight Autonomous Vehicle Self-Diagnosis (LAVS) Using Machine Learning Based on Sensors and Multi-Protocol IoT Gateway

This paper proposes the lightweight autonomous vehicle self-diagnosis (LAVS) using machine learning based on sensors and the internet of things (IoT) gateway. It collects sensor data from in-vehicle sensors and changes the sensor data to sensor messages as it passes through protocol buses. The changed messages are divided into header information, sensor messages, and payloads and they are stored in an address table, a message queue, and a data collection table separately. In sequence, the sensor messages are converted to the message type of the other protocol and the payloads are transferred to an in-vehicle diagnosis module (In-VDM). The LAVS informs the diagnosis result of Cloud or road side unit(RSU) by the internet of vehicles (IoV) and of drivers by Bluetooth. To design the LAVS, the following two modules are needed. First, a multi-protocol integrated gateway module (MIGM) converts sensor messages for communication between two different protocols, transfers the extracted payloads to the In-VDM, and performs IoV to transfer the diagnosis result and payloads to the Cloud through wireless access in vehicular environment(WAVE). Second, the In-VDM uses random forest to diagnose parts of the vehicle, and delivers the results of the random forest as an input to the neural network to diagnose the total condition of the vehicle. Since the In-VDM uses them for self-diagnosis, it can diagnose a vehicle with efficiency. In addition, because the LAVS converts payloads to a WAVE message and uses IoV to transfer the WAVE messages to RSU or the Cloud, it prevents accidents in advance by informing the vehicle condition of drivers rapidly.


Introduction
Due to the introduction of the Fourth Industrial Revolution, information and communication technology (ICT) technology has been applied in various industries and is being developed. Among them, the automobile industry is actively utilizing internet of things (IoT) technology for autonomous vehicles. In addition, many automotive companies around the world are busy developing their technology through various competitions and interactions.
Autonomous driving technology is divided into 0-5 levels. Level 0 means no autonomous driving. Level 1 is a state where one autonomous driving technology is applied. In level 2, an advanced driver assistance system (ADAS) on the vehicle can itself actually control both steering and braking/accelerating simultaneously under some circumstances. The human driver must continue to pay full attention at all times and perform the rest of the driving tasks. Level 3 is incomplete but is capable of autonomous driving and requires the driver to be ready to drive in an emergency. Level 4 is the stage in which the automatic driving system (ADS) of a vehicle performs all the driving tasks and monitors the driving environment in specific situations. The driver does not need to pay attention in Maurizio et al. proposed a new combinatorial optimization problem that arises from the framework of rule-based risk mitigation policies for the routing of gateway location problem (GLP) hazardous materials vehicles. GLP consists of locating a fixed number of check points (so called gateways) selected out of a set of candidate sites and routing each vehicle through one assigned gateway in such a way that the sum of the risks of vehicle itineraries is minimized. This paper addresses a GLP preparatory step, that is, how to select candidate sites, and it investigates the impact of different information guided policies for determining such a set. All policies consist of selecting a ground set and sampling it according to a probability distribution law. A few criteria are proposed for generating ground sets as well as a few probability distribution laws. A deterministic variant based on a cardinality constrained covering model is also proposed for generating candidate site sets [9].
Lee et al. proposes a synchronization mechanism for FlexRay and Ethernet audio video bridging (AVB) network that guarantees a high quality-of-service. Moreover, this study uses an in-vehicle network environment that consists of FlexRay and Ethernet AVB networks using an embedded system, which is integrated and synchronized by the gateway. The synchronization mechanism provides the timing guarantees for the FlexRay network that are similar to those of the Ethernet AVB network. Figure 1 shows the use of the Ethernet AVB switch to communicate between the event-based CAN protocol and the timing-based FlexRay protocol [10]. Maurizio et al. proposed a new combinatorial optimization problem that arises from the framework of rule-based risk mitigation policies for the routing of gateway location problem (GLP) hazardous materials vehicles. GLP consists of locating a fixed number of check points (so called gateways) selected out of a set of candidate sites and routing each vehicle through one assigned gateway in such a way that the sum of the risks of vehicle itineraries is minimized. This paper addresses a GLP preparatory step, that is, how to select candidate sites, and it investigates the impact of different information guided policies for determining such a set. All policies consist of selecting a ground set and sampling it according to a probability distribution law. A few criteria are proposed for generating ground sets as well as a few probability distribution laws. A deterministic variant based on a cardinality constrained covering model is also proposed for generating candidate site sets [9].
Lee et al. proposes a synchronization mechanism for FlexRay and Ethernet audio video bridging (AVB) network that guarantees a high quality-of-service. Moreover, this study uses an in-vehicle network environment that consists of FlexRay and Ethernet AVB networks using an embedded system, which is integrated and synchronized by the gateway. The synchronization mechanism provides the timing guarantees for the FlexRay network that are similar to those of the Ethernet AVB network. Figure 1 shows the use of the Ethernet AVB switch to communicate between the eventbased CAN protocol and the timing-based FlexRay protocol [10]. Aljeri et al. proposed a reliable quality of service (QoS) aware and location aided gateway discovery protocol for vehicular networks by the name of fault tolerant location-based gateway advertisement and discovery. One of the features of this protocol is its ability to tolerate gateway routers and/or road vehicle failure. Moreover, this protocol takes into consideration the aspects of the QoS requirements specified by the gateway requesters; furthermore, the protocol insures load balancing on the gateways as well as on the routes between gateways and gateway clients [11].
Duan et al. proposed software defined networking (SDN) enabled 5G VANET. With proposed dual cluster head design and dynamic beamforming coverage, both trunk link communication quality and network robustness of vehicle clusters are significantly enhanced. Furthermore, an adaptive transmission scheme with selective modulation and power control is proposed to improve the capacity of the trunk link between the cluster head and base station. With cooperative communication between the mobile gateway candidates, the latency of traffic aggregation and distribution is also reduced [12].
Ju et al. proposed a novel gateway discovery algorithm for VANETs, providing an efficient and adaptive location-aided and prompt gateway discovery mechanism (LAPGD). Here, all vehicles go across selected mobile gateways to access 3G networks instead of a direct connection. The algorithm aims to ensure every vehicle is capable of finding its optimal gateway, to minimize the total number of gateways selected in VANETs, and to guarantee the average delay of packets within an allowable range [13]. Jeong et al. proposed "An Integrated Self-diagnosis System (ISS) for an Autonomous Vehicle based on an Internet of Things (IoT) Gateway and Deep Learning". The ISS collects data from the Aljeri et al. proposed a reliable quality of service (QoS) aware and location aided gateway discovery protocol for vehicular networks by the name of fault tolerant location-based gateway advertisement and discovery. One of the features of this protocol is its ability to tolerate gateway routers and/or road vehicle failure. Moreover, this protocol takes into consideration the aspects of the QoS requirements specified by the gateway requesters; furthermore, the protocol insures load balancing on the gateways as well as on the routes between gateways and gateway clients [11].
Duan et al. proposed software defined networking (SDN) enabled 5G VANET. With proposed dual cluster head design and dynamic beamforming coverage, both trunk link communication quality and network robustness of vehicle clusters are significantly enhanced. Furthermore, an adaptive transmission scheme with selective modulation and power control is proposed to improve the capacity of the trunk link between the cluster head and base station. With cooperative communication between the mobile gateway candidates, the latency of traffic aggregation and distribution is also reduced [12].
Ju et al. proposed a novel gateway discovery algorithm for VANETs, providing an efficient and adaptive location-aided and prompt gateway discovery mechanism (LAPGD). Here, all vehicles go across selected mobile gateways to access 3G networks instead of a direct connection. The algorithm aims to ensure every vehicle is capable of finding its optimal gateway, to minimize the total number of gateways selected in VANETs, and to guarantee the average delay of packets within an allowable range [13]. Jeong et al. proposed "An Integrated Self-diagnosis System (ISS) for an Autonomous Vehicle based on an Internet of Things (IoT) Gateway and Deep Learning". The ISS collects data from the sensors of a vehicle, diagnoses the collected data, and informs the driver of the result. The ISS considers the influence between its parts by using deep learning when diagnosing the vehicle. By transferring the self-diagnosis information and by managing the time to replace the car parts of an autonomous driving vehicle safely, ISS reduces loss of life and overall cost [14]. They proposed "A Lightweight In-Vehicle Edge Gateway (LI-VEG)" for the self-diagnosis of an autonomous vehicle. LI-VEG supports a rapid and accurate communication between in-vehicle sensors and a self-diagnosis module and between in-vehicle protocols. The LI-VEG has higher compatibility and is more cost effective because it applies a software gateway to the OBD, compared to a hardware gateway. In addition, it can reduce the transmission error and overhead caused by message decomposition because of a lightweight message header [15].

Random-Forest
Mu used a random forest algorithm to increase customer loyalty through investigations of customer statistics, and dynamic and enterprise service attributes. As a result, we have taken appropriate steps to improve the accuracy of our forecasts of customer loyalty and to prevent customer losses [16]. Figure 2 shows high level architecture of the proposed system. Though identifying eating-related gestures using wrist-worn devices is a viable application of the watch, the focus of our work is to explore the idea of using audio to detect eating behavior based on bites, rather than swallows as other works have done. sensors of a vehicle, diagnoses the collected data, and informs the driver of the result. The ISS considers the influence between its parts by using deep learning when diagnosing the vehicle. By transferring the self-diagnosis information and by managing the time to replace the car parts of an autonomous driving vehicle safely, ISS reduces loss of life and overall cost [14]. They proposed "A Lightweight In-Vehicle Edge Gateway (LI-VEG)" for the self-diagnosis of an autonomous vehicle. LI-VEG supports a rapid and accurate communication between in-vehicle sensors and a self-diagnosis module and between in-vehicle protocols. The LI-VEG has higher compatibility and is more cost effective because it applies a software gateway to the OBD, compared to a hardware gateway. In addition, it can reduce the transmission error and overhead caused by message decomposition because of a lightweight message header [15].

Random-Forest
Mu used a random forest algorithm to increase customer loyalty through investigations of customer statistics, and dynamic and enterprise service attributes. As a result, we have taken appropriate steps to improve the accuracy of our forecasts of customer loyalty and to prevent customer losses [16]. Figure 2 shows high level architecture of the proposed system. Though identifying eating-related gestures using wrist-worn devices is a viable application of the watch, the focus of our work is to explore the idea of using audio to detect eating behavior based on bites, rather than swallows as other works have done. Kalantarian et al. described signal-processing techniques for identification of chews and swallows using smart watch devices built-in microphone. In addition, the goal is to evaluate the potential of smartwatches as a platform for nutrition monitoring. Thus, signal processing technology uses random forest classifiers to classify sounds in a given environment. Random forests classify sounds based on a certain number of samples [17].
Huang et al. proposed a classification algorithm based on local cluster centers (CLCC) for data sets with a few labeled training data. The experimental results on uci data sets show that CLCC achieves competitive classification accuracy as compared to other traditional and state-of-the-art algorithms, such as sequential minimal optimization (SMO), adaptive boosting (AdaBoost), random tree, random forest, and co-forest [18].
Kalantarian et al. proposed a probabilistic algorithm for segmenting time-series signals, in which window boundaries are dynamically adjusted when the probability of the correct classification is low. Time-series segmentation refers to the challenge of subdividing a continuous stream of data into Kalantarian et al. described signal-processing techniques for identification of chews and swallows using smart watch devices built-in microphone. In addition, the goal is to evaluate the potential of smartwatches as a platform for nutrition monitoring. Thus, signal processing technology uses random forest classifiers to classify sounds in a given environment. Random forests classify sounds based on a certain number of samples [17].
Huang et al. proposed a classification algorithm based on local cluster centers (CLCC) for data sets with a few labeled training data. The experimental results on uci data sets show that CLCC achieves competitive classification accuracy as compared to other traditional and state-of-the-art algorithms, such as sequential minimal optimization (SMO), adaptive boosting (AdaBoost), random tree, random forest, and co-forest [18].
Kalantarian et al. proposed a probabilistic algorithm for segmenting time-series signals, in which window boundaries are dynamically adjusted when the probability of the correct classification is low. Time-series segmentation refers to the challenge of subdividing a continuous stream of data into discrete windows, which are individually processed using statistical classifiers to recognize various activities or events. The algorithm improves the number of correctly classified instances from a baseline of 75%-94% using the random forest classifier [19].
Tahani et al. proposed the three data mining algorithms, namely the self-organizing map (SOM), C4.5, and random forest. They are applied on adult population data from the Ministry of National Guard Health Affairs (MNGHA), Saudi Arabia to predict diabetic patients using 18 risk factors. Health care data is often huge, complex, and heterogeneous because it contains different variable types and missing values as well. Therefore, data extraction using data mining was applied. Random forest achieved the best performance compared to other data mining classifiers [20].
AI-Jarrah et al. proposes a semi-supervised multi-layered clustering model (SMLC) for network intrusion detection and prevention tasks. SMLC has the capability to learn from partially labeled data while achieving a detection performance comparable to that of the supervised Machine Learning (ML)-based intrusion detection and prevention system (IDPS). The performance of the SMLC is compared with a well-known semi-supervised model (i.e., tri-training) and supervised ensemble ML models, namely, random forest, bagging, and AdaboostM1 on two benchmark network intrusion datasets, the NSL and Kyoto 2006+. In addition, SMLC demonstrates detection accuracy comparable to that of the supervised ensemble models [21].
Meeragandhi et al. evaluates the performance of a set of classifier algorithms of rules (JRIP, decision table, PART, and OneR) and trees (J48, random forest, REP Tree, and NB Tree). Based on the evaluation results, the best algorithms for each attack category are chosen and two classifier algorithm selection models are proposed. The classification models used the data collected from knowledge discovery databases (KDD) for intrusion detection. The trained models were then used for predicting the risk of the attacks in a web server environment or by any network administrator or any security experts [22]. Huang et al. proposes an approach to diagnose broken rotor bar failure in a line start-permanent magnet synchronous motor (LS-PMSM) using random forests. The transient current signal during the motor startup was acquired from a healthy motor and a faulty motor with a broken rotor bar fault. He extracted 13 statistical time domain features from the startup transient current signal, and used these features to train and test a random forest to determine whether the motor was operating under normal or faulty conditions. For feature selection, the feature importances from the random forest were used to reduce the number of features to two features. The results showed that the random forest classifies the motor condition as healthy or faulty with an accuracy of 98.8% using all features and with an accuracy of 98.4% using only the mean-index and impulsion features. This approach can be used in the industry for online monitoring and fault diagnostic of LS-PMSM motors and the results can be helpful for the establishment of preventive maintenance plans in factories [23].

Overview
In this section, Figure 3 shows the structure of the LAVS, which has two key modules in this paper: Multi-protocol integrated gateway module (MIGM) and in-vehicle diagnosis module (In-VDM). First, the MIGM supports communication between the internal protocols of a vehicle and transmits the payloads of sensor messages collected from the vehicle to the In-VDM. To improve the accuracy and processing speed of vehicle diagnosis, the In-VDM applies the random forest to the part self-diagnosis and the neutral network to the total self-diagnosis. It performs the part diagnosis of the vehicle itself independently of the Cloud and uses the results of this part diagnosis as an input for the total diagnosis of the vehicle.

The Multi-Protocol Integrated Gateway Module (MIGM)
Since the MIGM supports the in-vehicle communication between two protocols, transfers the payloads to the In-VDM rapidly, and works in the OBD-II in software, not in hardware, it improves the speed of the self-diagnosis. Figure 4 shows the structure and functions of the MIGM, which consists of four sub-modules. The first message interface sub-module (MIS) acts as an interface between the sensors and the MSS. The second message storage sub-module (MSS) manages the message transferred from the MIS and the message converted in the MCS. The third message conversion sub-module (MCS) converts the message transferred from the MSS to a destination protocol message. The fourth WAVE message generation sub-module (WMGS) makes the vehicle condition diagnosed in the In-VDM and the payloads used for the diagnosis a WAVE message and transfers the WAVE message to RSU or the Cloud through the internet of vehicles (IoV). If the MIGM receives a sensor message from electronic control unit (ECU), the message works as follows. First, the ECU transmits the sensor messages to hardware devices (transceiver and controller) through FlexRay, CAN, and media oriented systems transport (MOST) Bus. Second, the MIS transfers the sensor messages to the MSS. Third, the MSS divides the received sensor messages into header

The Multi-Protocol Integrated Gateway Module (MIGM)
Since the MIGM supports the in-vehicle communication between two protocols, transfers the payloads to the In-VDM rapidly, and works in the OBD-II in software, not in hardware, it improves the speed of the self-diagnosis. Figure 4 shows the structure and functions of the MIGM, which consists of four sub-modules. The first message interface sub-module (MIS) acts as an interface between the sensors and the MSS. The second message storage sub-module (MSS) manages the message transferred from the MIS and the message converted in the MCS. The third message conversion sub-module (MCS) converts the message transferred from the MSS to a destination protocol message. The fourth WAVE message generation sub-module (WMGS) makes the vehicle condition diagnosed in the In-VDM and the payloads used for the diagnosis a WAVE message and transfers the WAVE message to RSU or the Cloud through the internet of vehicles (IoV). If the MIGM receives a sensor message from electronic control unit (ECU), the message works as follows.

The Multi-Protocol Integrated Gateway Module (MIGM)
Since the MIGM supports the in-vehicle communication between two protocols, transfers the payloads to the In-VDM rapidly, and works in the OBD-II in software, not in hardware, it improves the speed of the self-diagnosis. Figure 4 shows the structure and functions of the MIGM, which consists of four sub-modules. The first message interface sub-module (MIS) acts as an interface between the sensors and the MSS. The second message storage sub-module (MSS) manages the message transferred from the MIS and the message converted in the MCS. The third message conversion sub-module (MCS) converts the message transferred from the MSS to a destination protocol message. The fourth WAVE message generation sub-module (WMGS) makes the vehicle condition diagnosed in the In-VDM and the payloads used for the diagnosis a WAVE message and transfers the WAVE message to RSU or the Cloud through the internet of vehicles (IoV). If the MIGM receives a sensor message from electronic control unit (ECU), the message works as follows. First, the ECU transmits the sensor messages to hardware devices (transceiver and controller) through FlexRay, CAN, and media oriented systems transport (MOST) Bus. Second, the MIS transfers the sensor messages to the MSS. Third, the MSS divides the received sensor messages into header the sensor messages to the MSS. Third, the MSS divides the received sensor messages into header information, sensor messages, and payloads. The received header information is stored in an address table (1), the sensor messages are stored in a message queue (2), and the payloads are stored in a data collection table (3). The MSS transfers the header information of the address table and the sensor messages to the MCS (4,5), and the payloads measured in the data collection table in the same time to the In-VDM (6). Fourth, the MCS converts the sensor message transferred from the MSS to a destination protocol message and transmits the transformed message to the MSS (7) and, the process of the message reception is vice versa. Fifth, if the MSS of the MIGM receives the diagnosis result from the In-VDM, the received result is stored in the data collection table (8). The self-diagnosis data stored in it is transferred to the WMGS with the payloads used for self-diagnosis (9). The WMGS converts the received data collection table information to WAVE messages and performs IoV to transfer the WAVE messages to the neighboring RSU and Cloud (10).

A Design of a Message Interface Sub-Module (MIS)
The MIS acts as an interface between hardware and the MSS. The hardware means the transceiver and controller sending messages to and receiving them from each protocol bus. If the transceiver receives messages from each protocol bus or an actuator and transfers the received messages to a controller, the controller stores the serial bits of messages in the MCU. The MIS transfers the messages of a controller to the MSS. Figure 5 shows the hardware structure of a transceiver and controller. information, sensor messages, and payloads. The received header information is stored in an address table (1), the sensor messages are stored in a message queue (2), and the payloads are stored in a data collection table (3). The MSS transfers the header information of the address table and the sensor messages to the MCS (4,5), and the payloads measured in the data collection table in the same time to the In-VDM (6). Fourth, the MCS converts the sensor message transferred from the MSS to a destination protocol message and transmits the transformed message to the MSS (7) and, the process of the message reception is vice versa. Fifth, if the MSS of the MIGM receives the diagnosis result from the In-VDM, the received result is stored in the data collection table (8). The self-diagnosis data stored in it is transferred to the WMGS with the payloads used for self-diagnosis (9). The WMGS converts the received data collection table information to WAVE messages and performs IoV to transfer the WAVE messages to the neighboring RSU and Cloud (10).

A Design of a Message Interface Sub-Module (MIS)
The MIS acts as an interface between hardware and the MSS. The hardware means the transceiver and controller sending messages to and receiving them from each protocol bus. If the transceiver receives messages from each protocol bus or an actuator and transfers the received messages to a controller, the controller stores the serial bits of messages in the MCU. The MIS transfers the messages of a controller to the MSS. Figure 5 shows the hardware structure of a transceiver and controller. If the message translation is completed, the message has to be transferred to a destination bus. At this time, the MIS receives the messages translated in the MSS and transfers them to the controller. The controller delivers the messages to a protocol bus or an actuator through the transceiver.

A Design of a Message Storage Sub-Module (MSS)
The MSS manages the messages received from the MIS. Figure 4 shows three functions (address table, message queue, and data collection table) in which the MSS manages messages as follows.
First, the header information (destination address, source address, etc.) is stored in the address table. When sensor messages are converted in the MCS, the address table helps them be converted rapidly and is used to detect errors. Figure 6 shows the address table in detail.
Second, the message queue consists of an input message queue and an output message queue. The input message queue is one that stores the messages transferred from the MIS. The MSS transfers the messages to the MCS according to message order within the queue. The order of messages within the input message queue is decided by the priority of messages. The output message queue is one storing the messages transferred from the MCS and the MSS transfers the messages of the output message queue to the MIS according to priority.
Third, the payloads of the received sensor messages are stored in the data collection table and then they are transferred to the IN-VDM. If the IN-VDM completes the self-diagnosis of an autonomous vehicle, the MSS stores the diagnosed result in the data collection table. The payloads If the message translation is completed, the message has to be transferred to a destination bus. At this time, the MIS receives the messages translated in the MSS and transfers them to the controller. The controller delivers the messages to a protocol bus or an actuator through the transceiver.

A Design of a Message Storage Sub-Module (MSS)
The MSS manages the messages received from the MIS. Figure 4 shows three functions (address table, message queue, and data collection table) in which the MSS manages messages as follows.
First, the header information (destination address, source address, etc.) is stored in the address table. When sensor messages are converted in the MCS, the address table helps them be converted rapidly and is used to detect errors. Figure 6 shows the address table in detail. When MOST messages are converted to CAN messages, the attributes of the address table are not changed, but their values are changed according to the message state. Figure 6 shows the conversion of a MOST message to CAN messages by using the address table of Table 2. In Figure 6, the field of Destination Addr(address) in a MOST message is mapped to the destination node IDs of CAN messages through the field of destination address in the Address Table  and the field of Source Addr(address) in a MOST message is mapped to the source node IDs of CAN messages through the field of source address in the Address Table. Since the Fblock/Inst/Fkt ID and OP Type field of a MOST message are not used in CAN messages, they are not stored in the address table. The Tel(telephone) ID field of a MOST message is mapped to the service type IDs of CAN messages through the current message number and message ID field of the address table. The Synchronous and Asynchronous field of a MOST message is used for MOST and they are converted to the data field of CAN messages without using the address table. Since the Control and Trailer field of a MOST message is not used for CAN messages, they are not converted. The CAN messages generate the cyclic redundancy check(CRC) and acknowledgement(ACK) field of CAN messages for themselves.

A Design of a WAVE Message Generation Sub-Module (WMGS)
The WMGS generates a WAVE message after receiving information from the data collection table in the MSS.   Table 1 shows the example of the data collection table. The payloads (or data) of Table 1  The MCS converts sensor messages to the message type of the other protocol by receiving the messages of the input message queue and the address information of the address table in the MSS. When the messages are converted, the MCS uses the address information of the address table. The MIGM maps rapidly to the message fields of the other protocol the values of the address table, which is generated by each protocol. For example, the address tables used between protocols such as FlexRay to CAN, MOST to FlexRay, etc. are generated separately. The field values of the address table are generated newly whenever messages are converted. Table 2 shows the example of the address table used when MOST to CAN conversion is done. When MOST messages are converted to CAN messages, the attributes of the address table are not changed, but their values are changed according to the message state. Figure 6 shows the conversion of a MOST message to CAN messages by using the address table of Table 2.
In Figure 6, the field of Destination Addr(address) in a MOST message is mapped to the destination node IDs of CAN messages through the field of destination address in the Address Table and the field of Source Addr(address) in a MOST message is mapped to the source node IDs of CAN messages through the field of source address in the Address Table. Since the Fblock/Inst/Fkt ID and OP Type field of a MOST message are not used in CAN messages, they are not stored in the address table. The Tel(telephone) ID field of a MOST message is mapped to the service type IDs of CAN messages through the current message number and message ID field of the address table. The Synchronous and Asynchronous field of a MOST message is used for MOST and they are converted to the data field of CAN messages without using the address table. Since the Control and Trailer field of a MOST message is not used for CAN messages, they are not converted. The CAN messages generate the cyclic redundancy check(CRC) and acknowledgement(ACK) field of CAN messages for themselves.

A Design of a WAVE Message Generation Sub-Module (WMGS)
The WMGS generates a WAVE message after receiving information from the data collection table in the MSS. Figure 7 shows the structure of a generated WAVE message. Since the WAVE message is not converted to a message type of other protocols, it has to set message values newly. The physical layer convergence protocol (PLCP) preamble of the WAVE message consists of the same 10 short training symbols and two long training symbols. The PLCP preamble uses the same bits as that of the Ethernet. Since the WAVE message uses an orthogonal frequency division multiplexing (OFDM), it needs a OFDM signal field whose RATE means a frequency division rate. The frequency division rate is decided according to the size of a message. The reserved of the OFDM signal field represents an address that receives messages. The LENGTH of the OFDM signal field represents the length of a message. The Parity of the OFDM signal field is used to examine errors and the Tail of the OFDM Signal field means the end of the OFDM signal field. The DATA field consists of a service field, a PLCP service data unit(PSDU) field meaning data, a tail field meaning message end, and pad bits examining the error of the DATA field [24]. After the payloads and diagnosed result measured in the same time are converted to the PSDU of the WAVE message, the WMGS transfers the converted message to the neighboring RSU or the Cloud. and the field of Source Addr(address) in a MOST message is mapped to the source node IDs of CAN messages through the field of source address in the Address Table. Since the Fblock/Inst/Fkt ID and OP Type field of a MOST message are not used in CAN messages, they are not stored in the address table. The Tel(telephone) ID field of a MOST message is mapped to the service type IDs of CAN messages through the current message number and message ID field of the address table. The Synchronous and Asynchronous field of a MOST message is used for MOST and they are converted to the data field of CAN messages without using the address table. Since the Control and Trailer field of a MOST message is not used for CAN messages, they are not converted. The CAN messages generate the cyclic redundancy check(CRC) and acknowledgement(ACK) field of CAN messages for themselves.

A Design of a WAVE Message Generation Sub-Module (WMGS)
The WMGS generates a WAVE message after receiving information from the data collection table in the MSS.   Figure 8 shows the structure of the In-VDM, which consists of two sub-modules. The first random-forest part-diagnosis sub-module (RPS) generates a random-forest model for each part of a vehicle and diagnoses the parts of a vehicle by using the generated random-forest model. The second neural network vehicle-diagnosis sub-module (NNVS) generates a neural network model and diagnoses the total condition of the vehicle by using the results of the RPS as input.  Figure 7 shows the structure of a generated WAVE message. Since the WAVE message is not converted to a message type of other protocols, it has to set message values newly. The physical layer convergence protocol (PLCP) preamble of the WAVE message consists of the same 10 short training symbols and two long training symbols. The PLCP preamble uses the same bits as that of the Ethernet. Since the WAVE message uses an orthogonal frequency division multiplexing (OFDM), it needs a OFDM signal field whose RATE means a frequency division rate. The frequency division rate is decided according to the size of a message. The reserved of the OFDM signal field represents an address that receives messages. The LENGTH of the OFDM signal field represents the length of a message. The Parity of the OFDM signal field is used to examine errors and the Tail of the OFDM Signal field means the end of the OFDM signal field. The DATA field consists of a service field, a PLCP service data unit(PSDU) field meaning data, a tail field meaning message end, and pad bits examining the error of the DATA field [24]. After the payloads and diagnosed result measured in the same time are converted to the PSDU of the WAVE message, the WMGS transfers the converted message to the neighboring RSU or the Cloud. Figure 8 shows the structure of the In-VDM, which consists of two sub-modules. The first random-forest part-diagnosis sub-module (RPS) generates a random-forest model for each part of a vehicle and diagnoses the parts of a vehicle by using the generated random-forest model. The second neural network vehicle-diagnosis sub-module (NNVS) generates a neural network model and diagnoses the total condition of the vehicle by using the results of the RPS as input. The RPS learns a random-forest model using training data and outputs conditions by part. Algorithm 1 shows the process by which the RPS generates a random-forest model.

A Design of the Random-Forest Part-Diagnosis Sub-Module (RPS)
The RPS learns a random-forest model using training data and outputs conditions by part. Algorithm 1 shows the process by which the RPS generates a random-forest model. Algorithm 1. The process generating a random-forest model. Input: Training data X, Y, W X = set of payloads Y = set of results of training data W = set of weights initialize weight W : w i (1) = 1/N for(int j = 1; j <= T; j++) make subset S t from Training data. ∆Gmax = -∞ sample feature f from sensors randomly for(int k = 1; k <= K; k++) S n = a current node split S n into S l or S r by f k compute information gain ∆G: end for if(∆Gmax = 0 or maximum depth) store the probability distribution P(c|l) in a leaf node. else generate a split node recursively. end if if(finish training of decision tree) estimate class label :ŷ î y i = arg max Pt(c|l).
compute an error rate of a decision tree : t = N i:y i ŷ i w compute a weight of a decision tree : α t = 1 2 log 1− t t if(α t > 0 then) update a weight of training data The training data composed of X, Y, and W. X is the set of payloads and is represented in the following formula (1).
In Formula (1), X means sensor data configured for each part. For example, X Engine is a set of payloads that can represent the engine condition. Y means the result value judging whether a part condition is normal or not. Y consists of parts, as in X. It has one between a normal value and an abnormal value in the following formula (2). Y = y 1 , y 2 , y 3 , y 4 , . . . , y N . (2) W means the weight of each training data and is represented in the following formula (3).
All w i is initialized as 1/N at the beginning. Here, N represents the number of training data. The RPS generates a decision-making tree by extracting the variables according to weight and composes a random-forest model by modifying each variable and the tree weight. The RPS generates decision-making trees composing a random-forest model. The decision-making tree is made by using the information gain function, ∆G computed by using Genie function. The RPS repeats itself until the decision-making tree reaches a fixed depth or until the ∆G becomes 0. The decision-making trees are generated as follows.
First, ∆G max is set as −∞ for the decision-making tree generation and the decision-making tree generation sub-module generates subset, S t from the training data.
Second, it selects one of all sensors randomly. Third, it classifies the training data S n of a current node into S l and S r and computes the ∆G in formula (4).
where, S l is the value of a left child node in the S n and S r is the value of a right child node in the S n . G(s) as the Genie index is computed in formula (5).
In formula (5), the probability, P c j of the node c j is computed in formula (6).
In formula (6), w means a weight of each variable. Figure 9 shows that a decision-making tree was generated by using three variables as follows.
In formula (6), w means a weight of each variable. Figure 9. The decision-making tree generated based on temperature, voltage, and fuel spray. Figure 9 shows that a decision-making tree was generated by using three variables as follows. First, 50 payloads of a normal vehicle and 50 payloads of an abnormal vehicle as training data was used for the RPS and temperature, fuel spray, and voltage were selected as a variable.
Second, the RPS computes the Genie index with total training data, each variable, and information gain ΔG. The computation is done as follows.
At the beginning, the Genie index of training data without classification criteria has to be measured only once. The actual value of the Genie index is obtained as follows. First, 50 payloads of a normal vehicle and 50 payloads of an abnormal vehicle as training data was used for the RPS and temperature, fuel spray, and voltage were selected as a variable.
Second, the RPS computes the Genie index with total training data, each variable, and information gain ∆G. The computation is done as follows.
At the beginning, the Genie index of training data without classification criteria has to be measured only once. The actual value of the Genie index is obtained as follows.
If the Genie index of the training data is obtained without the classification criteria, the Genie index of each variable is obtained with the classification criteria. The following formulas are used to measure the Genie index when the condition of a vehicle is classified according to temperature classification criteria.
Here, the number 60 used as the denominator in the G S temp l formula means the 60 of 100 vehicles whose temperature numeric is normal. The 48 used as the numerator in the G S temp l formula means the 48 of 60 vehicles whose total condition is normal and the 12 means the 12 of 60 vehicles whose total condition is abnormal. The 40 used as denominator in the G S temp r formula means the 40 of 100 vehicles whose temperature numeric is abnormal. The seven used as the numerator in the G S temp r formula means the seven of 40 vehicles whose total condition is normal and the 33 means the 33 of 40 vehicles whose total condition is abnormal. In the same way, the RPS computes the Genie index of the fuel spray and voltage as follows. Here, since the information gain about the temperature is the biggest value, the 1st classification node is decided as the temperature. Once the 1st classification node is decided, the RPS computes the Genie indices of the other variables again. The following formulas show that the Genie index of the fuel spray is computed after the vehicles were classified with the temperature. The computed Genie index of the fuel spray has to be compared with the Genie index of the voltage under the same condition. The following formulas show that the Genie index of the voltage is computed after vehicles were classified with the temperature.
If the Genie index of the fuel spray and voltage is computed, the RPS computes the information gain on them. The following formulae are used to compute the information gain on them.
Here, because the ∆G V is the biggest value, the 2nd classification node is decided as the starting voltage. In this way, if the information gain is 0 or a decision-making tree reaches fixed depth, the decision-making tree is generated.
Since the RPS extracts properties randomly whenever each decision-making tree is generated, all the different decision-making trees are generated. Figure 10 shows that the decision-making tree was generated with the variables different from Figure 9. The RPS computes a weight by using an error rate of a decision-making tree and generates a random-forest model based on boosting. First of all, in formula (7), the RPS computes the error rate ( t ) of the decision-making tree by comparing a diagnosed condition with the result of training data (i : y i ŷ i ).
where,ŷ i is the result of a random-forest model when training data is entered into the random-forest model. y i represents the vehicle condition stored in the training data. That is, t is to divide the sum of weights in case of (ŷ i y i ) by total sum of weights. From now on, the RPS computes a weight change rate α t by using formula (8). Figure 10. The decision-making tree generated based on the engine temperature, driving time, and air pressure.
Since the RPS extracts properties randomly whenever each decision-making tree is generated, all the different decision-making trees are generated. Figure 10 shows that the decision-making tree was generated with the variables different from Figure 9. The RPS computes a weight by using an error rate of a decision-making tree and generates a random-forest model based on boosting. First of all, in formula (7), the RPS computes the error rate (ϵ ) of the decision-making tree by comparing a diagnosed condition with the result of training data ( : ≠ ).
where, is the result of a random-forest model when training data is entered into the random-forest model.
represents the vehicle condition stored in the training data. That is, ϵ is to divide the sum of weights in case of ( ≠ ) by total sum of weights. From now on, the RPS computes a weight change rate α by using formula (8).
If the weight change rate was computed, the weight is modified in formula (9).
In Figure 11, if this process is repeated T times and T decision-making trees are generated, the RPS computes the variance of each tree and selects only p trees in ascending order of the variance value. The RPS generates the random-forest model with the selected p trees. Figure 10 shows how to compose T trees by using the weight of a decision-making tree. The former in Figure 10 generates a decision-making tree by sampling training data as a subset and the latter in Figure 10 modifies the weight by using an error rate ϵ and weight change rate α. If the weight change rate was computed, the weight is modified in formula (9).
In Figure 11, if this process is repeated T times and T decision-making trees are generated, the RPS computes the variance of each tree and selects only p trees in ascending order of the variance value. The RPS generates the random-forest model with the selected p trees. Figure 10 shows how to compose T trees by using the weight of a decision-making tree. The former in Figure 10 generates a decision-making tree by sampling training data as a subset and the latter in Figure 10 modifies the weight by using an error rate and weight change rate α. For example, to compute the weight the RPS computes an error rate of a tree through six terminal nodes in Figure 10.  For example, to compute the weight the RPS computes an error rate of a tree through six terminal nodes in Figure 10.
Here, the denominator represents the number of total vehicles in a terminal node and the numerator is decided according to the result of a terminal node. If the result of the terminal node is "GOOD", the numerator represents the number of abnormal vehicles in the terminal node. If the result of the terminal node is "BAD", the numerator represents the number of normal vehicles in the terminal node. For example, the 2 14 represents an error rate of the leftmost terminal node in Figure 9. The denominator 14 represents the number of the total vehicles in the terminal node. Since the result of the terminal node is "GOOD", the numerator 2 represents the number of abnormal vehicles and then the RPS computes a weight change rate α.
The RPS modifies weight w with formula (9). Since the decision-making tree of Figure 9 was generated with 100 vehicles, the weight of 100 vehicles is set as 1/100 each. Therefore, the weight of 100 vehicles is modified according to the result of each terminal node and a weight change rate α.
If T trees are generated by repeating the processes, the RPS composes a random-forest model of only fixed trees by computing the variance value of trees.
The RPS generates the final random-forest model and computes the part condition by multiplying the probability, P t (c x) of each decision-making tree by the decision-making tree weight, α t . Formula (10) is used to compute the vehicle condition,ŷ i , in each decision-making tree.
If the probability of each decision-making tree is computed, the RPS selects the highest probability as the final probability,ŷ.ŷ = argmax(ŷ t ).
After the RPS diagnosed this part, it informs drivers of a vehicle's part condition and transfers the diagnosis result to the NNVS.

A Design of a Neural Network Vehicle-Diagnosis Sub-Module (NNVS)
After the RPS diagnoses parts of a vehicle, the NNVS learns a neural network model using the result of the RPS and diagnoses the total condition of the vehicle by using the learned neural network model. Figure 12 shows an example of the input and output of the NNVS.
When the NNVS completes its neural network model learning, it diagnoses the total condition of the vehicle by using the neural network model. The NNVS result of between 1 and 0.4 indicates that the vehicle is in good condition, that between 0.4 and -0.4 indicates that the vehicle is in a bad condition but capable of driving, and that between -0.4 and -1 indicates that the vehicle is in a dangerous condition. The NNVS delivers the results of the neural network model learning to the driver so that the driver can accurately understand the total condition of the vehicle.

The Performance Analysis
This section shows the performance analysis of the MIGM and the In-VDM. To analyze the performance of the MIGM, it was compared with an existing in-vehicle gateway to measure conversion time and an error rate when 4000 messages are converted to other messages and to analyze the performance of the IN-VDM, it was compared with a multi-layer perceptron (MLP) and The RPS result represents a probability value. However, it exists between −1 and 1 because the probability value is multiplied by −1 when the RPS determines that the part is abnormal. For example, in Table 3, the value of the engine condition for the RPS is 0.251, and because the engine has been diagnosed as faulty, −0.251 is delivered to the NNVP. Table 3 is used as an input to the NNVP in Figure 12. Algorithm 2 represents the process by which the NNVS learns neural networks. The NNVS uses the results of the RPS as an input, which indicates the condition of vehicle parts. That is, the number of the NNVS input nodes is equal to the number of the RPS outputs. The number of The NNVS output nodes is 1. Formula (12) represents the set of inputs in the NNVS, I.
Here, n is the number of parts diagnosed by the RPS. The NNVS generates a neural network model consisting of three hidden layers. Formula (13) represents the nodes of the hidden layers and Formula (14) represents a weight that connects the adjacent node.
The weights are initialized using the Xavier initialization [25]. Formula (15) represents the weights that are initialized using the Xavier initialization.
Here, p in represents the number of nodes in the input layer connected to Z and p out the number of nodes in the output layer connected to Z. The NNVS uses tanh as an activation function for accurate and quick computation, and the mean squared error as a loss function. Formula (16) represents tanh and (17) mean squared error.
In Formula (17), d means the training data, and y means the result of a neural network model. The NNVS is learned based on back-propagation and uses gradient descent to change the weight.
When the NNVS completes its neural network model learning, it diagnoses the total condition of the vehicle by using the neural network model. The NNVS result of between 1 and 0.4 indicates that the vehicle is in good condition, that between 0.4 and −0.4 indicates that the vehicle is in a bad condition but capable of driving, and that between −0.4 and −1 indicates that the vehicle is in a dangerous condition. The NNVS delivers the results of the neural network model learning to the driver so that the driver can accurately understand the total condition of the vehicle.

The Performance Analysis
This section shows the performance analysis of the MIGM and the In-VDM. To analyze the performance of the MIGM, it was compared with an existing in-vehicle gateway to measure conversion time and an error rate when 4000 messages are converted to other messages and to analyze the performance of the IN-VDM, it was compared with a multi-layer perceptron (MLP) and a long short-term memory (LSTM) to measure the computation time and accuracy when the number of test data sets is changed.

The MIGM Performance Analysis
To compare the performance of the MIGM with an existing vehicle gateway, conversion time and an error rate are measured when 4000 messages are converted to other messages. The experiment was conducted when a CAN message was converted to a FlexRay or a MOST message and vice-versa. The existing in-vehicle gateway and the MIGM were implemented in the C language and the experiment was conducted in a Host PC. Figure 13a shows that in the CAN-To-FlexRay conversion, the MIGM was improved by 33.3% in conversion time more than the existing in-vehicle gateway, in the CAN-To-MOST conversion, the MIGM was improved by 20.9% more than the existing in-vehicle gateway, in FlexRay-To-CAN conversion, the MIGM was improved by 29.2% more than the existing in-vehicle gateway, and in the MOST-To-CAN conversion, the MIGM was improved by 31.3% more than the existing in-vehicle gateway. Therefore, the conversion time of the MIGM was improved more than that of the existing in-vehicle gateway by about average 28.67%.

The MIGM Performance Analysis
To compare the performance of the MIGM with an existing vehicle gateway, conversion time and an error rate are measured when 4000 messages are converted to other messages. The experiment was conducted when a CAN message was converted to a FlexRay or a MOST message and vice-versa. The existing in-vehicle gateway and the MIGM were implemented in the C language and the experiment was conducted in a Host PC. Figure 13a shows that in the CAN-To-FlexRay conversion, the MIGM was improved by 33.3% in conversion time more than the existing in-vehicle gateway, in the CAN-To-MOST conversion, the MIGM was improved by 20.9% more than the existing in-vehicle gateway, in FlexRay-To-CAN conversion, the MIGM was improved by 29.2% more than the existing in-vehicle gateway, and in the MOST-To-CAN conversion, the MIGM was improved by 31.3% more than the existing in-vehicle gateway. Therefore, the conversion time of the MIGM was improved more than that of the existing in-vehicle gateway by about average 28.67%.   Figure 13b shows that in the CAN-To-FlexRay conversion, the existing in-vehicle gateway causes an error rate, 1.55% and the MIGM an error rate, 1.55%, in the CAN-To-MOST conversion, the existing in-vehicle gateway causes an error rate, 1.66% and the MIGM an error rate, 0.45%, in FlexRay-To-CAN conversion, the existing in-vehicle gateway causes an error rate, 1.94% and the MIGM an error rate, 1.59%, and in the MOST-To-CAN conversion, the existing in-vehicle gateway causes an error rate, 2.59%, and the MIGM an error rate, 2.53%. Therefore, the error rate of the MIGM was lower than that of the existing in-vehicle gateway by about 0.5%. When a CAN message was converted to another protocol message, it had higher performance than other cases by 1%.

The In-VDM Performance Analysis
To analyze the performance of In-VDM, three experiments were conducted. In two experiments, NNVP was compared with multi-layer perceptron (MLP) and long short-term memory (LSTM) in computation time and accuracy, while in the other experiment, RPS was compared with a support vector machine (SVM) and fuzzy in test loss. According to the experimental environment, the number of test data sets was 100, 150, 200, 300, 400, and 500 sets, the computation speed was 3.20 GHz, and the RAM memory size was 16 GB. Figure 14a shows that the computation time of the NNVP was improved by 44.894% and 62.719% more than that of the MPL and the LSTM separately as the number of test data sets increased from 100 to 500 sets. Figure14b shows that the accuracy of the NNVP was higher by about 1% than that of the MLP but similar to that of the LSTM on average. Since there was little difference between  Figure 13b shows that in the CAN-To-FlexRay conversion, the existing in-vehicle gateway causes an error rate, 1.55% and the MIGM an error rate, 1.55%, in the CAN-To-MOST conversion, the existing in-vehicle gateway causes an error rate, 1.66% and the MIGM an error rate, 0.45%, in FlexRay-To-CAN conversion, the existing in-vehicle gateway causes an error rate, 1.94% and the MIGM an error rate, 1.59%, and in the MOST-To-CAN conversion, the existing in-vehicle gateway causes an error rate, 2.59%, and the MIGM an error rate, 2.53%. Therefore, the error rate of the MIGM was lower than that of the existing in-vehicle gateway by about 0.5%. When a CAN message was converted to another protocol message, it had higher performance than other cases by 1%.

The In-VDM Performance Analysis
To analyze the performance of In-VDM, three experiments were conducted. In two experiments, NNVP was compared with multi-layer perceptron (MLP) and long short-term memory (LSTM) in computation time and accuracy, while in the other experiment, RPS was compared with a support vector machine (SVM) and fuzzy in test loss. According to the experimental environment, the number of test data sets was 100, 150, 200, 300, 400, and 500 sets, the computation speed was 3.20 GHz, and the RAM memory size was 16 GB. Figure 14a shows that the computation time of the NNVP was improved by 44.894% and 62.719% more than that of the MPL and the LSTM separately as the number of test data sets increased from 100 to 500 sets. Figure 14b shows that the accuracy of the NNVP was higher by about 1% than that of the MLP but similar to that of the LSTM on average. Since there was little difference between them in accuracy but the NNVP was more efficient in computation time, NNVP was more suitable than the MPL and LSTM in vehicle self-diagnosis by using payloads. them in accuracy but the NNVP was more efficient in computation time, NNVP was more suitable than the MPL and LSTM in vehicle self-diagnosis by using payloads.   Figure 15 shows a test data loss and over-fitting when RPS, SVM, and fuzzy were used to diagnose parts of a vehicle. The RPS had a loss similar to the SVM and about 0.2 less than the fuzzy. However, since the SVM had over-fitting, RPS was most suitable for part diagnosis of vehicles.

Conclusion
The LAVS for autonomous vehicle self-diagnosis proposed in this paper consists of the MIGM for communication not only between in-vehicle protocols but also between diagnostic results and the server and the In-VDM for part self-diagnosis and total vehicle self-diagnosis. Here, the In-VDM consists of the RPS for part diagnosis and the NNVS for total vehicle diagnosis. The LAVS guarantees the compatibility of in-vehicle protocols by using the MIGM and the self-diagnosis of a vehicle by using the In-VDM.
The conversion time of the MIGM was improved more than that of the existing in-vehicle gateway by about an average of 28.67%, the error rate of the MIGM was lower than that of the existing in-vehicle gateway by about 0.5%, the computation time of the NNVP was improved by 44.894% and 62.719% more than that of the MPL and the LSTM separately, and the accuracy of the NNVP was higher by about 1% than that of the MLP but similar to that of the LSTM on average. The RPS had a test loss similar to the SVM and about 0.2 less than the fuzzy and the SVM had over-fitting. Therefore, the LAVS was most suitable for not only in-vehicle communication but also part diagnosis and total diagnosis of vehicles.
In addition, this paper would contribute to the following. First, the safety problem will be a major obstacle to supply autonomous vehicles. If the self-diagnosis of autonomous vehicles solves this problem, it will greatly contribute to the supply of autonomous vehicles by changing the perception of customers. Second, an autonomous vehicle executes its self-diagnosis independently,  Figure 15 shows a test data loss and over-fitting when RPS, SVM, and fuzzy were used to diagnose parts of a vehicle. The RPS had a loss similar to the SVM and about 0.2 less than the fuzzy. However, since the SVM had over-fitting, RPS was most suitable for part diagnosis of vehicles. them in accuracy but the NNVP was more efficient in computation time, NNVP was more suitable than the MPL and LSTM in vehicle self-diagnosis by using payloads.   Figure 15 shows a test data loss and over-fitting when RPS, SVM, and fuzzy were used to diagnose parts of a vehicle. The RPS had a loss similar to the SVM and about 0.2 less than the fuzzy. However, since the SVM had over-fitting, RPS was most suitable for part diagnosis of vehicles.

Conclusion
The LAVS for autonomous vehicle self-diagnosis proposed in this paper consists of the MIGM for communication not only between in-vehicle protocols but also between diagnostic results and the server and the In-VDM for part self-diagnosis and total vehicle self-diagnosis. Here, the In-VDM consists of the RPS for part diagnosis and the NNVS for total vehicle diagnosis. The LAVS guarantees the compatibility of in-vehicle protocols by using the MIGM and the self-diagnosis of a vehicle by using the In-VDM.
The conversion time of the MIGM was improved more than that of the existing in-vehicle gateway by about an average of 28.67%, the error rate of the MIGM was lower than that of the existing in-vehicle gateway by about 0.5%, the computation time of the NNVP was improved by 44.894% and 62.719% more than that of the MPL and the LSTM separately, and the accuracy of the NNVP was higher by about 1% than that of the MLP but similar to that of the LSTM on average. The RPS had a test loss similar to the SVM and about 0.2 less than the fuzzy and the SVM had over-fitting. Therefore, the LAVS was most suitable for not only in-vehicle communication but also part diagnosis and total diagnosis of vehicles.
In addition, this paper would contribute to the following. First, the safety problem will be a major obstacle to supply autonomous vehicles. If the self-diagnosis of autonomous vehicles solves this problem, it will greatly contribute to the supply of autonomous vehicles by changing the perception of customers. Second, an autonomous vehicle executes its self-diagnosis independently,

Conclusions
The LAVS for autonomous vehicle self-diagnosis proposed in this paper consists of the MIGM for communication not only between in-vehicle protocols but also between diagnostic results and the server and the In-VDM for part self-diagnosis and total vehicle self-diagnosis. Here, the In-VDM consists of the RPS for part diagnosis and the NNVS for total vehicle diagnosis. The LAVS guarantees the compatibility of in-vehicle protocols by using the MIGM and the self-diagnosis of a vehicle by using the In-VDM.
The conversion time of the MIGM was improved more than that of the existing in-vehicle gateway by about an average of 28.67%, the error rate of the MIGM was lower than that of the existing in-vehicle gateway by about 0.5%, the computation time of the NNVP was improved by 44.894% and 62.719% more than that of the MPL and the LSTM separately, and the accuracy of the NNVP was higher by about 1% than that of the MLP but similar to that of the LSTM on average. The RPS had a test loss similar to the SVM and about 0.2 less than the fuzzy and the SVM had over-fitting. Therefore, the LAVS was most suitable for not only in-vehicle communication but also part diagnosis and total diagnosis of vehicles.
In addition, this paper would contribute to the following. First, the safety problem will be a major obstacle to supply autonomous vehicles. If the self-diagnosis of autonomous vehicles solves this problem, it will greatly contribute to the supply of autonomous vehicles by changing the perception of customers. Second, an autonomous vehicle executes its self-diagnosis independently, not dependent