KR102241999B1 - Gateway for automotive Ethernet application and System and Method for synchronizing sensor and node using the same - Google Patents

Gateway for automotive Ethernet application and System and Method for synchronizing sensor and node using the same Download PDF

Info

Publication number
KR102241999B1
KR102241999B1 KR1020200023815A KR20200023815A KR102241999B1 KR 102241999 B1 KR102241999 B1 KR 102241999B1 KR 1020200023815 A KR1020200023815 A KR 1020200023815A KR 20200023815 A KR20200023815 A KR 20200023815A KR 102241999 B1 KR102241999 B1 KR 102241999B1
Authority
KR
South Korea
Prior art keywords
message
ethernet
time
node
gateway
Prior art date
Application number
KR1020200023815A
Other languages
Korean (ko)
Inventor
이석
이유리
김형준
한준영
권지훈
김영진
전영후
이민우
Original Assignee
부산대학교 산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 부산대학교 산학협력단 filed Critical 부산대학교 산학협력단
Priority to KR1020200023815A priority Critical patent/KR102241999B1/en
Application granted granted Critical
Publication of KR102241999B1 publication Critical patent/KR102241999B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40143Bus networks involving priority mechanisms
    • H04L12/4015Bus networks involving priority mechanisms by scheduling the transmission of messages at the communication node
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0658Clock or time synchronisation among packet nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40052High-speed IEEE 1394 serial bus
    • H04L12/40071Packet processing; Packet format
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40052High-speed IEEE 1394 serial bus
    • H04L12/40091Bus bridging
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40169Flexible bus arrangements
    • H04L12/40176Flexible bus arrangements involving redundancy
    • H04L12/40195Flexible bus arrangements involving redundancy by using a plurality of nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/35Switches specially adapted for specific applications
    • H04L49/351Switches specially adapted for specific applications for local area network [LAN], e.g. Ethernet switches
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40267Bus for use in transportation systems
    • H04L2012/40273Bus for use in transportation systems the transportation system being a vehicle

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Small-Scale Networks (AREA)

Abstract

The present invention relates to a gateway for vehicle ethernet application, which can be more stable and secure real-time performance by time synchronization of a sensor and a node based on a CAN (FD) and the ethernet using a gateway, and to a device and a method for synchronizing a sensor and a node using the same. The device of the present invention comprises: CAN (FD) nodes having a bus type topology, and connected to a gateway through a bus line; ethernet nodes connected to an ethernet switch to transmit and receive data in a peer-to-peer communication scheme; and a gateway connected to the bus line including the CAN (FD) nodes and the ethernet switch, and performing a role of exchanging data of two networks by implementing time synchronization between the CAN (FD) nodes and the ethernet nodes.

Description

차량용 이더넷 적용을 위한 게이트웨이와 이를 이용한 센서 및 노드의 동기화를 위한 장치 및 방법{Gateway for automotive Ethernet application and System and Method for synchronizing sensor and node using the same}A gateway for automotive Ethernet application and a device and method for synchronizing sensors and nodes using the same {Gateway for automotive Ethernet application and System and Method for synchronizing sensor and node using the same}

본 발명은 차량용 네트워크 기술에 관한 것으로, 구체적으로 게이트웨이를 이용하여 CAN(FD)과 Ethernet 기반의 센서 및 노드의 시간동기화를 하여 더 안정적이고 실시간성을 보장할 수 있도록 한 차량용 이더넷 적용을 위한 게이트웨이와 이를 이용한 센서 및 노드의 동기화를 위한 장치 및 방법에 관한 것이다.The present invention relates to a vehicle network technology, and specifically, a gateway for application of Ethernet for a vehicle to ensure more stable and real-time by synchronizing time of a sensor and node based on CAN (FD) and Ethernet using a gateway and It relates to an apparatus and method for synchronizing sensors and nodes using the same.

최근 자율주행 자동차는 실시간으로 도로 상황을 인지하고 제어하기 위해 Camera, LIDAR, RADAR와 같은 센서와 ECU(Electronic Control Unit)가 기존 차량보다 많이 설치되었으며 차량 내에서 교환되는 데이터의 양은 기하급수적으로 늘어났다.In order to recognize and control road conditions in real time in recent years, more sensors such as Camera, LIDAR, and RADAR and Electronic Control Units (ECUs) have been installed than existing vehicles, and the amount of data exchanged within the vehicle has increased exponentially.

차량용 네트워크 기술은 차량 ECU 사이에서 교환되는 데이터 증가로 인하여 CAN(Controller Area Network), LIN(Local Interconnect Network), FlexRay와 같은 protocol들이 적용되고 있다.In the vehicle network technology, protocols such as CAN (Controller Area Network), LIN (Local Interconnect Network), and FlexRay are applied due to the increase in data exchanged between vehicle ECUs.

하지만, 최근 자율 주행 및 ADAS 기술과 V2X 등의 정보 통신 기술의 급격한 발전으로 인하여 기존의 IVN은 기술적 변화를 피할 수 없게 되었다. 특히 자율 주행을 위한 외부 환경 정보를 인식용 센서인 Lidar, Radar, Camera 등을 사용하기 위해서는 매우 높은 대역폭을 보장하는 통신 기술이 필수적이다.However, due to the recent rapid development of autonomous driving and information communication technologies such as ADAS technology and V2X, the existing IVN cannot avoid technological changes. In particular, in order to use sensors for recognizing external environment information for autonomous driving, such as Lidar, Radar, and Camera, a communication technology that guarantees a very high bandwidth is essential.

Ethernet은 이러한 문제를 해결하기 적합한 통신 기술 중 하나로 현재 차량에 적용하기 위한 많은 연구가 진행되고 있다. 하지만 종래의 차량용 네트워크와의 통신을 위해서는 서로간의 프로토콜을 맞춰주는 게이트웨이가 필수적이다.Ethernet is one of the communication technologies suitable for solving this problem, and many studies are currently being conducted to apply it to vehicles. However, in order to communicate with a conventional vehicle network, a gateway that matches each other's protocol is essential.

다양한 센서 정보들을 통합하고 처리하여 차량의 제어 로직을 수행하는 자율주행 제어기는 센서들이 외부 정보를 측정한 시점의 시간 정보의 유무에 따라 제어 성능의 차이를 발생한다.In an autonomous driving controller that integrates and processes various sensor information to perform the control logic of the vehicle, a difference in control performance occurs according to the presence or absence of time information at the time when the sensors measure external information.

비동기화 된 네트워크의 센서들은 서로 다른 시점에 계측한 정보를 제어기에 전달하기 때문이다. 그러므로 ADAS 및 자율주행 기술이 연구되고 적용되는 이 시점에는 차량의 센서 및 제어기의 시간 동기화의 중요성이 더욱 강조되고 있다.This is because the sensors of the unsynchronized network transmit information measured at different times to the controller. Therefore, at this time when ADAS and autonomous driving technologies are studied and applied, the importance of time synchronization of sensors and controllers of vehicles is more emphasized.

종래 기술의 CAN 네트워크의 동기화 방법에서 마스터 노드는 시간 클럭을 슬레이브 노드에 전송한다. 슬레이브 노드에서는 수신된 마스터의 시간 클럭을 자신의 클럭으로 대체하고, 일정한 주기로 반복 수행한다.In the conventional CAN network synchronization method, the master node transmits a time clock to the slave node. The slave node replaces the received master's time clock with its own clock and repeats it at a certain period.

하지만, 이 방법은 마스터 노드에서 슬레이브 노드까지 전송되는데 걸리는 지연에 대해 고려하지 않으므로 시간동기화의 오차가 발생하게 된다. However, this method does not take into account the delay required for transmission from the master node to the slave node, resulting in an error in time synchronization.

한편, 자율주행 기술의 발전으로 인하여 차량에 장착되는 센서의 수가 획기적으로 증가하고 있는 추세이며, 센서에서 측정된 외부 정보를 처리하고 차량을 안정적으로 제어하고 실시간성을 보장하기 위한 통합 제어기 개발과 적용이 활발히 진행되고 있다.Meanwhile, due to the development of autonomous driving technology, the number of sensors installed in the vehicle is increasing dramatically, and the development and application of an integrated controller to process external information measured by the sensor, control the vehicle stably, and ensure real-time performance. This is actively going on.

하지만, 종래 기술의 차량 네트워크인 CAN 기반의 센서 및 제어기와 Ethernet 기반의 센서 및 제어기 간의 시간동기화에 대한 기술은 전무한 실정이다.However, there is no technology for time synchronization between a conventional vehicle network, CAN-based sensor and controller, and Ethernet-based sensor and controller.

특히, 네트워크의 시간동기화를 위한 대표적인 표준으로 IEEE 1588이 있으나, IEEE 1588은 Ethernet 네트워크의 시간동기화에 대해 지원하기 때문에 CAN 또는 CAN FD을 주로 사용하는 차량용 네트워크에 대한 별도의 시간동기화 기술의 개발이 요구되고 있다.In particular, IEEE 1588 is a representative standard for network time synchronization, but since IEEE 1588 supports time synchronization of Ethernet networks, it is required to develop a separate time synchronization technology for vehicle networks that mainly use CAN or CAN FD. Has become.

대한민국 등록특허 제10-2048685호Korean Patent Registration No. 10-2048685 대한민국 등록특허 제10-1596759호Korean Patent Registration No. 10-1596759 대한민국 공개특허 제10-2019-0002906호Republic of Korea Patent Publication No. 10-2019-0002906

본 발명은 종래 기술의 차량용 네트워크 기술의 문제점을 해결하기 위한 것으로, 게이트웨이를 이용하여 CAN(FD)과 Ethernet 기반의 센서 및 노드의 시간동기화를 하여 더 안정적이고 실시간성을 보장할 수 있도록 한 차량용 이더넷 적용을 위한 게이트웨이와 이를 이용한 센서 및 노드의 동기화를 위한 장치 및 방법을 제공하는데 그 목적이 있다.The present invention is to solve the problem of the vehicle network technology of the prior art, by using a gateway to synchronize the time of CAN (FD) and Ethernet-based sensors and nodes to ensure more stable and real-time Ethernet for vehicles. An object of the present invention is to provide a gateway for application and an apparatus and method for synchronizing sensors and nodes using the same.

본 발명은 차량 네트워크에서 CAN(FD)와 Ethernet을 연결하는 게이트웨이를 이용하여 IEEE 1588 기반의 시간동기화 기술을 구현하고 게이트웨이에서 발생하는 프로토콜 변환 시간을 보상할 수 있도록 한 차량용 이더넷 적용을 위한 게이트웨이와 이를 이용한 센서 및 노드의 동기화를 위한 장치 및 방법을 제공하는데 그 목적이 있다.The present invention implements IEEE 1588-based time synchronization technology using a gateway connecting CAN (FD) and Ethernet in a vehicle network, and provides a gateway for applying Ethernet for a vehicle to compensate for the protocol conversion time occurring in the gateway. An object of the present invention is to provide an apparatus and method for synchronizing a sensor and a node used.

본 발명은 Ethernet 기반의 네트워크에서 시간동기화를 위한 IEEE 1588 표준의 PTP 절차를 도입하여 PTP 메커니즘을 CAN(FD) 네트워크에서 구현하여 노드 간의 시간동기화를 수행하는 것에 의해 시간동기화 오차를 최소화할 수 있도록 한 차량용 이더넷 적용을 위한 게이트웨이와 이를 이용한 센서 및 노드의 동기화를 위한 장치 및 방법을 제공하는데 그 목적이 있다.The present invention introduces the IEEE 1588 standard PTP procedure for time synchronization in an Ethernet-based network and implements a PTP mechanism in a CAN (FD) network to minimize time synchronization errors by performing time synchronization between nodes. An object of the present invention is to provide a gateway for vehicle Ethernet application, and an apparatus and method for synchronizing sensors and nodes using the same.

본 발명은 서로 다른 네트워크인 CAN(FD)과 Ethernet 노드 간의 시간동기화를 위해 메시지를 변환하여 통신을 가능하게 하는 게이트웨이를 이용하고, 처리 지연(processing delay)을 보상할 수 있도록 하여 정밀한 시간동기화가 가능하도록 한 차량용 이더넷 적용을 위한 게이트웨이와 이를 이용한 센서 및 노드의 동기화를 위한 장치 및 방법을 제공하는데 그 목적이 있다.The present invention uses a gateway that enables communication by converting messages for time synchronization between CAN (FD) and Ethernet nodes, which are different networks, and enables precise time synchronization by compensating for processing delay. An object of the present invention is to provide a gateway for applying Ethernet for vehicles and an apparatus and method for synchronizing sensors and nodes using the same.

본 발명은 이기종 네트워크 간의 시간동기화가 가능하도록 하여 자율주행 차량의 통합 제어기와 센서 및 ECU 사이 시간동기화를 수행하는 것에 의해 차량 제어기가 센서 데이터의 측정 시각을 알고 제어 로직에 반영함으로써 자율주행에서 요구하는 실시간성 및 안정성 향상에 큰 기여를 할 수 있도록 한 차량용 이더넷 적용을 위한 게이트웨이와 이를 이용한 센서 및 노드의 동기화를 위한 장치 및 방법을 제공하는데 그 목적이 있다.The present invention enables time synchronization between heterogeneous networks and performs time synchronization between an integrated controller of an autonomous vehicle, a sensor, and an ECU, so that the vehicle controller knows the measurement time of sensor data and reflects it in the control logic. An object of the present invention is to provide a gateway for application of Ethernet for vehicles, which can make a great contribution to improving real-time performance and stability, and an apparatus and method for synchronizing sensors and nodes using the same.

본 발명은 이기종 네트워크 간의 시간동기화가 가능하도록 하여 자율주행 차량의 통합 제어기와 센서 및 ECU 사이 시간동기화를 수행하는 것에 의해 차량의 고장진단 및 사고 원인 분석을 위한 저장 매체의 데이터 로깅 시 필수적인 역할을 수행하는 차량용 이더넷 적용을 위한 게이트웨이와 이를 이용한 센서 및 노드의 동기화를 위한 장치 및 방법을 제공하는데 그 목적이 있다.The present invention enables time synchronization between heterogeneous networks, thereby performing time synchronization between an integrated controller of an autonomous vehicle, a sensor, and an ECU, thereby performing an essential role in data logging of a storage medium for vehicle failure diagnosis and analysis of the cause of an accident. An object of the present invention is to provide a gateway for applying Ethernet for vehicles, and an apparatus and method for synchronizing sensors and nodes using the same.

본 발명의 다른 목적들은 이상에서 언급한 목적으로 제한되지 않으며, 언급되지 않은 또 다른 목적들은 아래의 기재로부터 당업자에게 명확하게 이해될 수 있을 것이다.Other objects of the present invention are not limited to the above-mentioned objects, and other objects not mentioned will be clearly understood by those skilled in the art from the following description.

상기와 같은 목적을 달성하기 위한 본 발명에 따른 차량용 이더넷 적용을 위한 게이트웨이는 마스터 노드에서 전송한 Sync 메시지의 수신 여부를 확인하는 제 1 메시지 수신 확인부;Sync 메시지가 수신되었다면 이를 CAN 메시지로 변환하는 CAN 메시지 변환부;CAN 메시지 변환시에 소요된 residence delay α를 계산하는 제 1 레지던스 지연 계산부;CAN 메시지로 변환된 CAN_Sync_message에 α를 저장한 후 목적지로 전송하는 제 1 메시지 전송부;슬레이브 노드에서 전송한 CAN_Delay_request 메시지를 수신하였는지 확인하는 제 2 메시지 수신 확인부;CAN_Delay_request 메시지를 Ethernet 메시지로 변환하는 Ethernet 메시지 변환부;Ethernet 메시지 변환시에 소요된 residence delay β를 계산하는 제 2 레지던스 지연 계산부;Ethernet 메시지로 변환된 Delay_request 메시지에 β를 저장하고 목적지로 전송하는 제 2 메시지 전송부;를 포함하는 것을 특징으로 한다.A gateway for applying Ethernet for a vehicle according to the present invention to achieve the above object includes a first message reception confirmation unit that checks whether a Sync message transmitted from a master node is received; If a Sync message is received, it converts it into a CAN message. CAN message conversion unit; A first residence delay calculation unit that calculates the residence delay α consumed when converting the CAN message; a first message transmission unit that stores α in the CAN_Sync_message converted into a CAN message and transmits it to the destination; transmission from the slave node A second message reception confirmation unit that checks whether a CAN_Delay_request message has been received; an Ethernet message conversion unit that converts the CAN_Delay_request message into an Ethernet message; a second residence delay calculation unit that calculates the residence delay β required when converting an Ethernet message; and an Ethernet message. And a second message transmission unit that stores β in the converted Delay_request message and transmits it to a destination.

여기서, 마스터 노드에서 전송한 Follow_up 또는 Delay_response 메시지를 수신하였을 경우 이를 CAN 메시지로 변환하고 목적지로 전송하고, Ethernet to CAN 메시지 변환 시간인 α를 계산하였기 때문에 Follow_up와 Delay_response 메시지의 경우 별도의 변환 시간을 계산하지 않는 것을 특징으로 한다.Here, when a Follow_up or Delay_response message transmitted from the master node is received, it is converted into a CAN message, transmitted to the destination, and the Ethernet to CAN message conversion time α is calculated. Therefore, in the case of Follow_up and Delay_response messages, separate conversion time is calculated. It is characterized by not doing.

그리고 게이트웨이는, CAN(FD) 노드들로 구성된 버스 라인과 Ethernet 스위치에 연결되고 CAN(FD) 노드와 Ethernet 노드 간의 시간동기화를 구현하여 두 가지 네트워크의 데이터를 교환하는 역할을 수행하는 것을 특징으로 한다.In addition, the gateway is connected to a bus line composed of CAN (FD) nodes and an Ethernet switch, and performs a role of exchanging data of two networks by implementing time synchronization between the CAN (FD) node and the Ethernet node. .

다른 목적을 달성하기 위한 본 발명에 따른 차량용 이더넷 적용을 위한 게이트웨이를 이용한 센서 및 노드의 동기화를 위한 장치는 버스 방식의 토폴로지를 갖고 버스라인을 통하여 게이트웨이에 연결되는 CAN(FD) 노드들;Ethernet 스위치에 연결되어 peer to peer 방식의 통신 방식으로 데이터를 송수신하는 Ethernet 노드들;CAN(FD) 노드들로 구성된 버스 라인과 Ethernet 스위치에 연결되고 CAN(FD) 노드와 Ethernet 노드 간의 시간동기화를 구현하여 두 가지 네트워크의 데이터를 교환하는 역할을 수행하는 게이트웨이;를 포함하는 것을 특징으로 한다.The device for synchronizing a sensor and a node using a gateway for application of Ethernet for a vehicle according to the present invention for achieving another object has a bus topology and is connected to the gateway through a bus line CAN (FD) nodes; Ethernet switch Ethernet nodes that are connected to and transmit and receive data in a peer-to-peer communication method; a bus line composed of CAN(FD) nodes and an Ethernet switch are connected, and time synchronization between the CAN(FD) node and the Ethernet node is implemented. It characterized in that it includes; a gateway that performs a role of exchanging data of the branch network.

여기서, 게이트웨이에서 발생하는 처리 지연(processing delay)에 대한 보정을 위하여, 처리 지연은 Ethernet 메시지를 CAN 메시지로 변환하는데 소요되는 시간 α와 CAN 메시지를 Ethernet 메시지로 변환하는데 소요되는 시간 β로 정의하고, α와 β는 PTP 메시지가 게이트웨이에서 수신이 완료된 시점에서 변환 후 목적지로 전송되기 직전까지의 시간으로 정의하고, 게이트웨이는 마스터와 슬레이브가 전송한 PTP 메시지의 timestamp 값에 측정된 α와 β를 보정하는 작업을 수행하며, 이를 통해 시간동기화 오차를 줄이는 것을 특징으로 한다.Here, in order to compensate for the processing delay occurring in the gateway, the processing delay is defined as a time α for converting an Ethernet message to a CAN message and a time β for converting a CAN message to an Ethernet message, α and β are defined as the time from when the PTP message is received from the gateway to just before it is transmitted to the destination after conversion, and the gateway corrects α and β measured in the timestamp value of the PTP message transmitted by the master and slave. It performs a task, and through this, it is characterized by reducing time synchronization errors.

그리고 시간동기화 오차를 줄이기 위하여, IEEE 1588의 PTP 프로토콜을 통하여 Ethernet 네트워크 상에서 시간동기화를 수행하는 방법을 최대 8byte의 데이터를 전송할 수 있는 CAN 네트워크에 적용하기 위해서는 PTP 메시지의 timestamp 필드 값을 축소하고, 초 단위를 표시하는 6byte와 나노 초 단위를 표시하는 4byte로 총 10byte로 구성되는 PTP 메시지의 timestamp 필드 값을 시스템 제어에 영향을 미치지 않는 초단위의 상위 2byte를 삭제하여 CAN 메시지 포맷에 적용하는 것을 특징으로 한다.In addition, in order to reduce the time synchronization error, in order to apply the time synchronization method on the Ethernet network through the PTP protocol of IEEE 1588 to the CAN network that can transmit up to 8 bytes of data, reduce the timestamp field value of the PTP message and reduce the number of seconds. The timestamp field value of the PTP message consisting of 10 bytes, consisting of 6 bytes indicating the unit and 4 bytes indicating the nanosecond unit, is applied to the CAN message format by deleting the upper 2 bytes of the second unit that do not affect the system control. do.

또 다른 목적을 달성하기 위한 본 발명에 따른 차량용 이더넷 적용을 위한 게이트웨이를 이용한 센서 및 노드의 동기화를 위한 방법은 CAN(FD) 노드들로 구성된 버스 라인과 Ethernet 스위치에 연결되고 CAN(FD) 노드와 Ethernet 노드 간의 시간동기화를 구현하여 두 가지 네트워크의 데이터를 교환하는 역할을 수행하는 게이트웨이를 포함하는 차량 네트워크에서의 시간동기화를 위하여, 시간동기화의 마스터로 선정된 Ethernet 노드가 시간 T1에 sync 메시지를 슬레이브 노드로 전송하고 슬레이브는 이를 시간 T2에 수신하는 단계;마스터 노드는 follow up 메시지에 시간 T1을 담아 다시 슬레이브 노드로 전송하고, 이를 수신한 시점에 슬레이브 노드가 시간 T1과 T2를 확인하는 단계;슬레이브 노드는 시간 T3에 delay request 메시지를 마스터로 전송하고 마스터는 시간 T4에 이를 수신하는 단계;마스터 노드는 시간 T4를 delay response 메시지에 담아 슬레이브로 보내고, 최종적으로 슬레이브 노드는 시간 T1, T2, T3, T4를 확인하고, propagation delay를 계산하는 단계;를 포함하는 것을 특징으로 한다.A method for synchronizing a sensor and a node using a gateway for application of Ethernet for a vehicle according to the present invention to achieve another object is connected to a bus line composed of CAN (FD) nodes and an Ethernet switch, and is connected to a CAN (FD) node. The Ethernet node selected as the master of time synchronization slaves the sync message at time T1 for time synchronization in the vehicle network including the gateway that performs the role of exchanging data between the two networks by implementing time synchronization between Ethernet nodes. Transmitting to the node and receiving the time T2 by the slave; The master node sends the follow up message with time T1 back to the slave node, and the slave node checks the time T1 and T2 at the time of receiving the follow up message; The node sends a delay request message to the master at time T3 and the master receives it at time T4; the master node sends the time T4 to the slave by putting the delay response message in, and finally the slave node sends the time T1, T2, T3, And determining T4 and calculating propagation delay.

여기서, propagation delay를 계산하는 단계에서,Here, in the step of calculating the propagation delay,

Figure 112020020483081-pat00001
으로 계산하고, α는 Ethernet 프레임이 CAN 메시지로 변환하는데 소요되는 시간으로, 게이트웨이가 Ethernet 프레임을 수신 완료한 시점에서 변환된 CAN 메시지가 전송되기 직전의 시간으로 정의되고, 게이트웨이는 α를 측정하고 마스터 노드에서 전송되는 sync 메시지에 저장하고, β는 CAN 메시지가 Ethernet 프레임으로 변환되는데 소요되는 시간으로, CAN 메시지 수신이 완료된 시점에서 변환된 Ethernet 프레임이 전송되기 직전의 시간으로 정의되고, 게이트웨이는 delay request 메시지에 β를 저장하는 것을 특징으로 한다.
Figure 112020020483081-pat00001
And α is the time it takes for the Ethernet frame to be converted into a CAN message, and is defined as the time just before the converted CAN message is transmitted at the time when the gateway completes receiving the Ethernet frame, and the gateway measures α and the master It is stored in the sync message transmitted from the node, and β is the time it takes for the CAN message to be converted into an Ethernet frame, defined as the time just before the converted Ethernet frame is transmitted when the CAN message is received, and the gateway is a delay request. It is characterized by storing β in the message.

또 다른 목적을 달성하기 위한 본 발명에 따른 차량용 이더넷 적용을 위한 게이트웨이를 이용한 센서 및 노드의 동기화를 위한 방법은 CAN(FD) 노드들로 구성된 버스 라인과 Ethernet 스위치에 연결되고 CAN(FD) 노드와 Ethernet 노드 간의 시간동기화를 구현하여 두 가지 네트워크의 데이터를 교환하는 역할을 수행하는 게이트웨이를 포함하는 차량 네트워크에서의 Ethernet 기반의 마스터 노드의 시간동기화를 위하여, Ethernet 마스터 노드에서 Sync 메시지를 슬레이브 노드에 전송하고 그 시각인 t1을 메모리 버퍼에 저장하는 단계;슬레이브 노드에 Sync 메시지의 전송 시각인 t1을 알리기 위해 Follow_up 메시지에 t1을 저장한 후 슬레이브 노드에 전송하는 단계;슬레이브 노드에서 전송하는 Delay_request 메시지가 있다면 메시지의 수신 시각 t4와 Delay_request 메시지에 포함된, 게이트웨이에서 CAN 메시지를 Ethernet 메시지로 변환하는데 소요되는 residence time β를 저장하는 단계;Delay_response 메시지에 t4와 β를 삽입한 후 슬레이브로 전송하는 단계;를 포함하는 것을 특징으로 한다.A method for synchronizing a sensor and a node using a gateway for application of Ethernet for a vehicle according to the present invention to achieve another object is connected to a bus line composed of CAN (FD) nodes and an Ethernet switch, and is connected to a CAN (FD) node. In order to synchronize the time of the Ethernet-based master node in the vehicle network including the gateway that performs the role of exchanging data between the two networks by implementing time synchronization between Ethernet nodes, the Ethernet master node transmits a Sync message to the slave node. And storing the time t1 in the memory buffer; storing t1 in the Follow_up message to inform the slave node of the transmission time t1 of the Sync message and transmitting it to the slave node; If there is a Delay_request message transmitted from the slave node Including: storing the message reception time t4 and the residence time β included in the Delay_request message, which is required for converting the CAN message into the Ethernet message at the gateway; inserting t4 and β in the Delay_response message and transmitting it to the slave; including Characterized in that.

또 다른 목적을 달성하기 위한 본 발명에 따른 차량용 이더넷 적용을 위한 게이트웨이를 이용한 센서 및 노드의 동기화를 위한 방법은 CAN(FD) 노드들로 구성된 버스 라인과 Ethernet 스위치에 연결되고 CAN(FD) 노드와 Ethernet 노드 간의 시간동기화를 구현하여 두 가지 네트워크의 데이터를 교환하는 역할을 수행하는 게이트웨이를 포함하는 차량 네트워크에서의 CAN 기반의 슬레이브 노드의 시간동기화를 위하여, 마스터 노드에서 전송하는 Sync 메시지를 수신하는 단계;슬레이브 노드는 Sync 메시지가 수신된 시각인 t2와 α를 메모리 버퍼에 저장하고, CAN_Follow_up 메시지를 수신할 때까지 대기하는 단계;CAN_Follow_up 메시지를 수신하였다면 메시지에 저장된 Sync 메시지의 전송 시각 t1을 메모리 버퍼에 저장하는 단계;시각 t3에 CAN_Delay_request 메시지를 전송하고, CAN_Delay_response 메시지를 수신할 때까지 대기하는 단계;CAN_Delay_response 메시지를 수신하면 메시지에 포함된 수신 시각 t4와 β를 메모리 버퍼에 저장하는 단계;획득한 시간 요소(t1, t2, t3, t4, α, β)를 이용하여 지연 시간을 계산하고, 이를 이용하여 offset clock을 보정하는 단계;를 포함하는 것을 특징으로 한다.A method for synchronizing a sensor and a node using a gateway for application of Ethernet for a vehicle according to the present invention to achieve another object is connected to a bus line composed of CAN (FD) nodes and an Ethernet switch, and is connected to a CAN (FD) node. Receiving a Sync message transmitted from a master node for time synchronization of a CAN-based slave node in a vehicle network including a gateway that implements time synchronization between Ethernet nodes and exchanges data of two networks. ;The slave node stores the sync message received times t2 and α in the memory buffer, and waits until the CAN_Follow_up message is received; If a CAN_Follow_up message is received, the transmission time t1 of the Sync message stored in the message is stored in the memory buffer. Storing; Transmitting a CAN_Delay_request message at time t3 and waiting for a CAN_Delay_response message to be received; When receiving a CAN_Delay_response message, storing reception times t4 and β included in the message in a memory buffer; Acquired time factor and calculating a delay time using (t1, t2, t3, t4, α, β) and correcting an offset clock using the delay time.

여기서, α는 게이트웨이에서 Ethernet 메시지가 CAN 메시지로 변환되는데 소요되는 residence delay를 의미하고, CAN_Follow_up, CAN_Delay_response 메시지는 CAN 네트워크에서 시간동기화 메시지를 의미하는 것을 특징으로 한다.Here, α denotes a residence delay required to convert an Ethernet message into a CAN message in the gateway, and the CAN_Follow_up and CAN_Delay_response messages denote a time synchronization message in the CAN network.

또 다른 목적을 달성하기 위한 본 발명에 따른 차량용 이더넷 적용을 위한 게이트웨이를 이용한 센서 및 노드의 동기화를 위한 방법은 CAN(FD) 노드들로 구성된 버스 라인과 Ethernet 스위치에 연결되고 CAN(FD) 노드와 Ethernet 노드 간의 시간동기화를 구현하여 두 가지 네트워크의 데이터를 교환하는 역할을 수행하는 게이트웨이의 시간동기화를 위하여, 마스터 노드에서 전송한 Sync 메시지의 수신 여부를 확인하는 단계;Sync 메시지가 수신되었다면 이를 CAN 메시지로 변환하고, 소요된 residence delay α를 계산하는 단계;CAN 메시지로 변환된 CAN_Sync_message에 α를 저장한 후 목적지로 전송하는 단계;마스터 노드에서 전송한 Follow_up 또는 Delay_response 메시지를 수신하였을 경우 이를 CAN 메시지로 변환하고 목적지로 전송하는 단계;슬레이브 노드에서 전송한 CAN_Delay_request 메시지를 수신하였을 경우 이를 Ethernet 메시지로 변환하고 소요된 residence delay β를 계산하는 단계;Ethernet 메시지로 변환된 Delay_request 메시지에 β를 저장하고 목적지로 전송하는 단계;를 포함하는 것을 특징으로 한다.A method for synchronizing a sensor and a node using a gateway for application of Ethernet for a vehicle according to the present invention to achieve another object is connected to a bus line composed of CAN (FD) nodes and an Ethernet switch, and is connected to a CAN (FD) node. For time synchronization of the gateway, which is responsible for exchanging data between two networks by implementing time synchronization between Ethernet nodes, confirming whether a Sync message transmitted from the master node is received; If a Sync message is received, it is a CAN message. Converting to and calculating the required residence delay α; Storing α in CAN_Sync_message converted into CAN message and transmitting it to the destination; When a Follow_up or Delay_response message transmitted from the master node is received, it is converted into a CAN message. And transmitting to the destination; converting the CAN_Delay_request message transmitted from the slave node into an Ethernet message and calculating the required residence delay β; storing β in the Delay_request message converted to the Ethernet message and transmitting it to the destination. It characterized in that it includes;

이상에서 설명한 바와 같은 본 발명에 따른 차량용 이더넷 적용을 위한 게이트웨이와 이를 이용한 센서 및 노드의 동기화를 위한 장치 및 방법은 다음과 같은 효과가 있다.The gateway for applying Ethernet for a vehicle according to the present invention as described above, and an apparatus and method for synchronizing sensors and nodes using the same have the following effects.

첫째, 게이트웨이를 이용하여 CAN(FD)과 Ethernet 기반의 센서 및 노드의 시간동기화를 하여 더 안정적이고 실시간성을 보장할 수 있도록 한다.First, time synchronization between CAN (FD) and Ethernet-based sensors and nodes is performed using a gateway to ensure more stable and real-time performance.

둘째, 차량 네트워크에서 CAN(FD)와 Ethernet을 연결하는 게이트웨이를 이용하여 IEEE 1588 기반의 시간동기화 기술을 구현하고 게이트웨이에서 발생하는 프로토콜 변환 시간을 효율적으로 보상할 수 있도록 한다.Second, it implements IEEE 1588-based time synchronization technology by using a gateway connecting CAN (FD) and Ethernet in the vehicle network, and efficiently compensates for the protocol conversion time occurring in the gateway.

셋째, Ethernet 기반의 네트워크에서 시간동기화를 위한 IEEE 1588 표준의 PTP 절차를 도입하여 PTP 메커니즘을 CAN(FD) 네트워크에서 구현하여 노드 간의 시간동기화를 수행하는 것에 의해 시간동기화 오차를 최소화할 수 있도록 한다.Third, by introducing the IEEE 1588 standard PTP procedure for time synchronization in an Ethernet-based network, the PTP mechanism is implemented in a CAN (FD) network, and time synchronization errors can be minimized by performing time synchronization between nodes.

넷째, 서로 다른 네트워크인 CAN(FD)과 Ethernet 노드 간의 시간동기화를 위해 메시지를 변환하여 통신을 가능하게 하는 게이트웨이를 이용하고, 처리 지연(processing delay)을 보상할 수 있도록 하여 정밀한 시간동기화가 가능하도록 한다.Fourth, for time synchronization between CAN (FD) and Ethernet nodes, which are different networks, a gateway that enables communication by converting messages is used, and processing delay can be compensated for precise time synchronization. do.

다섯째, 이기종 네트워크 간의 시간동기화가 가능하도록 하여 자율주행 차량의 통합 제어기와 센서 및 ECU 사이 시간동기화를 수행하는 것에 의해 차량 제어기가 센서 데이터의 측정 시각을 알고 제어 로직에 반영함으로써 자율주행에서 요구하는 실시간성 및 안정성 향상에 큰 기여를 할 수 있도록 한다.Fifth, by enabling time synchronization between heterogeneous networks, the vehicle controller knows the measurement time of the sensor data and reflects it in the control logic by performing time synchronization between the integrated controller of the autonomous vehicle, the sensor, and the ECU. It can make a big contribution to improving the performance and stability.

여섯째, 이기종 네트워크 간의 시간동기화가 가능하도록 하여 자율주행 차량의 통합 제어기와 센서 및 ECU 사이 시간동기화를 수행하는 것에 의해 차량의 고장진단 및 사고 원인 분석을 위한 저장 매체의 데이터 로깅 시 필수적인 역할을 수행할 수 있도록 한다.Sixth, by enabling time synchronization between heterogeneous networks and performing time synchronization between the integrated controller of the autonomous vehicle, the sensor, and the ECU, it can play an essential role in data logging of the storage medium for vehicle failure diagnosis and accident cause analysis. To be able to.

도 1은 본 발명에 따른 차량용 이더넷 적용을 위한 게이트웨이와 이를 이용한 센서 및 노드의 동기화를 위한 장치의 구성도
도 2는 본 발명에 따른 차량용 이더넷 적용을 위한 게이트웨이의 상세 구성도
도 3은 게이트웨이가 적용된 차량 네트워크의 시간동기화 절차를 나타낸 흐름도
도 4는 CAN 네트워크 기반 PTP 메시지 구조를 나타낸 구성도
도 5는 Ethernet 기반의 마스터 노드의 시간동기화 과정을 나타낸 플로우 차트
도 6은 CAN 기반의 슬레이브 노드의 시간동기화 과정을 나타낸 플로우 차트
도 7은 게이트웨이의 시간동기화 과정을 나타낸 플로우 차트
도 8은 본 발명에 따른 게이트웨이를 이용한 차량 네트워크의 시간동기화 결과를 나타낸 그래프
1 is a configuration diagram of a gateway for applying Ethernet for a vehicle according to the present invention and an apparatus for synchronizing sensors and nodes using the same
2 is a detailed configuration diagram of a gateway for applying Ethernet for a vehicle according to the present invention
3 is a flowchart showing a time synchronization procedure of a vehicle network to which a gateway is applied
4 is a block diagram showing the structure of a PTP message based on a CAN network
5 is a flow chart showing a time synchronization process of an Ethernet-based master node
6 is a flow chart showing a time synchronization process of a CAN-based slave node
7 is a flow chart showing a time synchronization process of a gateway
8 is a graph showing a result of time synchronization of a vehicle network using a gateway according to the present invention

이하, 본 발명에 따른 차량용 이더넷 적용을 위한 게이트웨이와 이를 이용한 센서 및 노드의 동기화를 위한 장치 및 방법의 바람직한 실시 예에 관하여 상세히 설명하면 다음과 같다.Hereinafter, a preferred embodiment of a gateway for applying Ethernet for a vehicle according to the present invention and an apparatus and method for synchronizing sensors and nodes using the same will be described in detail as follows.

본 발명에 따른 차량용 이더넷 적용을 위한 게이트웨이와 이를 이용한 센서 및 노드의 동기화를 위한 장치 및 방법의 특징 및 이점들은 이하에서의 각 실시 예에 대한 상세한 설명을 통해 명백해질 것이다.Features and advantages of a gateway for application of a vehicle Ethernet according to the present invention and an apparatus and method for synchronizing sensors and nodes using the same will become apparent through detailed description of each embodiment below.

도 1은 본 발명에 따른 차량용 이더넷 적용을 위한 게이트웨이와 이를 이용한 센서 및 노드의 동기화를 위한 장치의 구성도이다.1 is a configuration diagram of a gateway for applying Ethernet for a vehicle according to the present invention and an apparatus for synchronizing sensors and nodes using the same.

본 발명에 따른 차량용 이더넷 적용을 위한 게이트웨이와 이를 이용한 센서 및 노드의 동기화를 위한 장치 및 방법은 게이트웨이를 이용하여 이기종 네트워크 간의 동기화를 가능하게 하며, 게이트웨이에서 발생하는 처리 지연을 보정하여 시간동기화에 대한 오차를 최소화하는 것으로 IEEE 국제 표준을 기반으로 하는 시간동기화 절차를 적용하여 높은 호환성과 기술 구현이 용이하도록 한 것이다.A gateway for applying Ethernet for a vehicle according to the present invention and an apparatus and method for synchronizing sensors and nodes using the same enable synchronization between heterogeneous networks using a gateway, and compensate for processing delays occurring in the gateway for time synchronization. It minimizes errors and applies a time synchronization procedure based on IEEE international standards to facilitate high compatibility and technology implementation.

이를 위하여 본 발명은 Ethernet 기반의 네트워크에서 시간동기화를 위한 IEEE 1588 표준의 PTP 절차를 도입하여 PTP 메커니즘을 CAN(FD) 네트워크에서 구현하여 노드 간의 시간동기화를 수행하는 것에 의해 시간동기화 오차를 최소화할 수 있도록 하는 구성을 포함할 수 있다.To this end, the present invention introduces a PTP procedure of the IEEE 1588 standard for time synchronization in an Ethernet-based network, implements a PTP mechanism in a CAN (FD) network, and performs time synchronization between nodes, thereby minimizing time synchronization errors. It may include a configuration that allows.

본 발명은 서로 다른 네트워크인 CAN(FD)과 Ethernet 노드 간의 시간동기화를 위해 메시지를 변환하여 통신을 가능하게 하는 게이트웨이를 이용하고, 처리 지연(processing delay)을 보상할 수 있도록 하여 정밀한 시간동기화가 가능하도록 하는 구성을 포함할 수 있다.The present invention uses a gateway that enables communication by converting messages for time synchronization between CAN (FD) and Ethernet nodes, which are different networks, and enables precise time synchronization by compensating for processing delay. It may include a configuration that allows you to

본 발명은 이기종 네트워크 간의 시간동기화가 가능하도록 하여 자율주행 차량의 통합 제어기와 센서 및 ECU 사이 시간동기화를 수행하는 것에 의해 차량 제어기가 센서 데이터의 측정 시각을 알고 제어 로직에 반영하도록 하는 구성을 포함할 수 있다.The present invention includes a configuration in which the vehicle controller knows the measurement time of sensor data and reflects it in the control logic by performing time synchronization between the integrated controller of the autonomous vehicle, the sensor and the ECU by enabling time synchronization between heterogeneous networks. I can.

본 발명에서는 CAN(FD)로 통신하는 도메인과 Ethernet으로 통신하는 도메인, 그리고 게이트웨이로 구성되며, 각 도메인을 구성하는 네트워크 노드는 PTP 모듈을 포함한다. In the present invention, a domain communicating via CAN (FD), a domain communicating via Ethernet, and a gateway are configured, and a network node constituting each domain includes a PTP module.

여기서, PTP는 IEEE 1588 표준에서 Ethernet 네트워크의 시간동기화에 관한 기술로 각 노드들은 마스터/슬레이브로 구성된다.Here, PTP is a technology related to time synchronization of an Ethernet network in the IEEE 1588 standard, and each node is composed of a master/slave.

시간동기화를 위해 마스터 노드와 슬레이브 노드는 PTP 프로토콜에 따라 특정 메시지를 송수신하고 메시지가 전송될 때 시간을 이용하여 전파 지연(propagation delay)를 계산한다. 슬레이브는 계산된 전파 지연과 마스터에서 보낸 시간을 이용하여 자신의 클럭을 마스터와 동일하게 변경한다.For time synchronization, the master node and the slave node transmit and receive a specific message according to the PTP protocol, and use the time to calculate a propagation delay when the message is transmitted. The slave uses the calculated propagation delay and the time sent from the master to change its own clock to the same as the master.

게이트웨이가 포함된 차량 네트워크 환경에서는 게이트웨이에서 발생하는 처리 지연(processing delay)에 대한 보정이 필요하다.In a vehicle network environment including a gateway, it is necessary to compensate for the processing delay occurring in the gateway.

처리 지연은 Ethernet 메시지를 CAN 메시지로 변환하는데 소요되는 시간 α와 CAN 메시지를 Ethernet 메시지로 변환하는데 소요되는 시간 β로 표현한다.The processing delay is expressed as the time α for converting an Ethernet message to a CAN message and β for converting a CAN message to an Ethernet message.

이 때 α와 β는 PTP 메시지가 게이트웨이에서 수신이 완료된 시점에서 변환 후 목적지로 전송되기 직전까지의 시간으로 정의한다.At this time, α and β are defined as the time from the point when the PTP message is completely received by the gateway until immediately before it is transmitted to the destination after conversion.

게이트웨이는 마스터와 슬레이브가 전송한 PTP 메시지의 timestamp 값에 측정된 α와 β를 보정하는 작업을 수행하며, 이를 통해 시간동기화 오차를 줄일 수 있다.The gateway corrects the measured α and β in the timestamp value of the PTP message transmitted by the master and the slave, thereby reducing the time synchronization error.

이와 같은 구성을 갖는 본 발명에 따른 차량용 이더넷 적용을 위한 게이트웨이와 이를 이용한 센서 및 노드의 동기화를 위한 장치 및 방법은 차량 네트워크인 CAN(FD)과 Ethernet 간 데이터 교환을 가능하게 하는 게이트웨이와 이를 통해 CAN(FD) 노드와 Ethernet 노드 간의 시간동기화를 구현하기 위한 기술이다.A gateway for applying Ethernet for a vehicle according to the present invention having such a configuration, and an apparatus and method for synchronizing sensors and nodes using the same, are a gateway that enables data exchange between CAN (FD) and Ethernet, which is a vehicle network, and CAN through the gateway. This is a technology for realizing time synchronization between (FD) nodes and Ethernet nodes.

도 1은 차량 네트워크인 CAN(FD)과 Ethernet 간 데이터 교환을 가능하게 하는 게이트웨이(200)와, 시간동기화가 진행된 CAN(FD) 노드(100), Ethernet 노드(400), Ethernet 스위치(300)를 나타낸 것이다.1 shows a gateway 200 that enables data exchange between CAN (FD) and Ethernet, which is a vehicle network, and a CAN (FD) node 100, an Ethernet node 400, and an Ethernet switch 300 with time synchronization. Is shown.

본 발명은 버스 방식의 토폴로지를 갖고 버스라인을 통하여 게이트웨이(200)에 연결되는 CAN(FD) 노드(100)와, Ethernet 스위치(300)에 연결되어 peer to peer 방식의 통신 방식으로 데이터를 송수신하는 Ethernet 노드(400)와, CAN(FD) 노드(100)들로 구성된 버스 라인과 Ethernet 스위치(300)에 연결되고 CAN(FD) 노드와 Ethernet 노드 간의 시간동기화를 구현하여 두 가지 네트워크의 데이터를 교환하는 역할을 수행하는 게이트웨이(200)를 포함한다.The present invention has a bus topology and is connected to a CAN (FD) node 100 connected to the gateway 200 through a bus line, and the Ethernet switch 300 to transmit and receive data in a peer-to-peer communication method. It is connected to the bus line consisting of the Ethernet node 400 and the CAN (FD) node 100 and the Ethernet switch 300, and exchanges data of two networks by realizing time synchronization between the CAN (FD) node and the Ethernet node. It includes a gateway 200 that performs a role of.

차량용 네트워크 중 하나인 CAN(FD)의 경우 버스 방식의 토폴로지를 가지며, 차량용 Ethernet의 경우 peer to peer 방식의 통신 방식으로 스위치와 연결되어 서로 간의 데이터를 송수신한다.CAN (FD), one of the vehicle networks, has a bus-type topology, and in the case of vehicle Ethernet, it is connected to a switch through a peer-to-peer communication method to transmit and receive data between each other.

게이트웨이는 CAN(FD) 노드들로 구성된 버스 라인과 Ethernet 스위치에 연결되어 두 가지 네트워크의 데이터를 교환하는 역할을 수행한다.The gateway is connected to a bus line composed of CAN (FD) nodes and an Ethernet switch to exchange data between two networks.

본 발명에 따른 차량용 이더넷 적용을 위한 게이트웨이의 상세 구성은 다음과 같다.A detailed configuration of a gateway for applying Ethernet for a vehicle according to the present invention is as follows.

도 2는 본 발명에 따른 차량용 이더넷 적용을 위한 게이트웨이의 상세 구성도이다.2 is a detailed configuration diagram of a gateway for applying Ethernet for a vehicle according to the present invention.

본 발명에 따른 차량용 이더넷 적용을 위한 게이트웨이는 도 2에서와 같이, 마스터 노드에서 전송한 Sync 메시지의 수신 여부를 확인하는 제 1 메시지 수신 확인부(21)와, Sync 메시지가 수신되었다면 이를 CAN 메시지로 변환하는 CAN 메시지 변환부(22)와, CAN 메시지 변환시에 소요된 residence delay α를 계산하는 제 1 레지던스 지연 계산부(23)와, CAN 메시지로 변환된 CAN_Sync_message에 α를 저장한 후 목적지로 전송하는 제 1 메시지 전송부(24)와, 슬레이브 노드에서 전송한 CAN_Delay_request 메시지를 수신하였는지 확인하는 제 2 메시지 수신 확인부(25)와, CAN_Delay_request 메시지를 Ethernet 메시지로 변환하는 Ethernet 메시지 변환부(26)와, Ethernet 메시지 변환시에 소요된 residence delay β를 계산하는 제 2 레지던스 지연 계산부(27)와, Ethernet 메시지로 변환된 Delay_request 메시지에 β를 저장하고 목적지로 전송하는 제 2 메시지 전송부(28)를 포함한다.As shown in FIG. 2, the gateway for applying Ethernet for a vehicle according to the present invention includes a first message reception confirmation unit 21 that checks whether a Sync message transmitted from a master node is received, and if a Sync message is received, it is converted into a CAN message. A CAN message conversion unit 22 that converts, a first residence delay calculation unit 23 that calculates residence delay α consumed when converting a CAN message, and stores α in the CAN_Sync_message converted into a CAN message and then transmits it to the destination. A first message transmission unit 24, a second message reception confirmation unit 25 for checking whether a CAN_Delay_request message transmitted from the slave node has been received, an Ethernet message conversion unit 26 for converting a CAN_Delay_request message into an Ethernet message, and And a second residence delay calculation unit 27 that calculates the residence delay β required when converting the Ethernet message, and a second message transmission unit 28 that stores β in the Delay_request message converted into an Ethernet message and transmits it to a destination. .

여기서, 마스터 노드에서 전송한 Follow_up 또는 Delay_response 메시지를 수신하였을 경우 이를 CAN 메시지로 변환하고 목적지로 전송한다.Here, when a Follow_up or Delay_response message transmitted from the master node is received, it is converted into a CAN message and transmitted to the destination.

앞서 Ethernet to CAN 메시지 변환 시간인 α를 계산하였기 때문에 Follow_up와 Delay_response 메시지의 경우 별도의 변환 시간을 계산하지 않는다.Since the Ethernet to CAN message conversion time α was calculated earlier, separate conversion time is not calculated for Follow_up and Delay_response messages.

본 발명에 따른 게이트웨이가 적용된 차량 네트워크의 시간동기화 절차를 설명하면 다음과 같다.The time synchronization procedure of the vehicle network to which the gateway according to the present invention is applied will be described as follows.

도 3은 게이트웨이가 적용된 차량 네트워크의 시간동기화 절차를 나타낸 흐름도이다.3 is a flowchart showing a time synchronization procedure of a vehicle network to which a gateway is applied.

도 3은 CAN(FD)와 Ethernet 노드로 구성된 차량 네트워크에서 게이트웨이가 적용되었을 때 시간동기화 절차와 게이트웨이 내부에서 발생하는 처리 지연에 대해 나타낸 것이다.3 shows a time synchronization procedure and a processing delay occurring inside the gateway when a gateway is applied in a vehicle network composed of CAN (FD) and Ethernet nodes.

차량 네트워크에서의 시간동기화 절차는 다음과 같다. The time synchronization procedure in the vehicle network is as follows.

먼저, 도 3에서와 같이, 시간동기화의 마스터로 선정된 Ethernet 노드는 시간 T1에 sync 메시지를 슬레이브 노드로 전송하고 슬레이브는 이를 시간 T2에 수신한다.(S301)First, as shown in FIG. 3, the Ethernet node selected as the master for time synchronization transmits a sync message to the slave node at time T1, and the slave receives it at time T2. (S301)

다음으로 마스터 노드는 follow up 메시지에 시간 T1을 담아 다시 슬레이브 노드로 전송하고, 이를 수신한 시점에 슬레이브 노드는 시간 T1과 T2를 알 수 있게 된다.(S302)Next, the master node sends the follow up message with the time T1 back to the slave node, and at the time of receiving it, the slave node can know the times T1 and T2 (S302).

슬레이브 노드는 시간 T3에 delay request 메시지를 마스터로 전송하고 마스터는 시간 T4에 이를 수신한다.(S303)The slave node transmits a delay request message to the master at time T3, and the master receives it at time T4 (S303).

마지막으로 마스터는 시간 T4를 delay response 메시지에 담아 슬레이브로 보내고, 최종적으로 슬레이브는 시간 T1, T2, T3, T4를 알 수 있으며, 수학식 1을 통해 propagation delay를 계산한다.(S304)Finally, the master puts the time T4 in the delay response message and sends it to the slave, and finally the slave can know the times T1, T2, T3, and T4, and calculate the propagation delay through Equation 1. (S304)

Figure 112020020483081-pat00002
Figure 112020020483081-pat00002

하지만, 수학식 1은 마스터 노드에서 슬레이브 노드로 전송할 때 발생하는 전파 지연과 슬레이브에서 마스터로 전송할 때 발생하는 전파 지연이 동일한 환경에서 적용할 수 있다.However, Equation 1 can be applied in an environment where the propagation delay generated when transmitting from the master node to the slave node and the propagation delay generated when transmitting from the slave to the master are the same.

게이트웨이가 포함된 차랑 네트워크의 경우 CAN을 Ethernet으로 변환하는 시간과 Ethernet을 CAN으로 변환하는 시간이 다르기 때문에 게이트웨이에서 발생하는 처리 지연을 보정해야할 필요가 있다.In the case of a vehicle network including a gateway, the time to convert CAN to Ethernet and the time to convert Ethernet to CAN is different, so it is necessary to correct the processing delay that occurs in the gateway.

도 3에서 표현한 α는 Ethernet 프레임이 CAN 메시지로 변환하는데 소요되는 시간으로, 게이트웨이가 Ethernet 프레임을 수신 완료한 시점에서 변환된 CAN 메시지가 전송되기 직전의 시간으로 정의하였다.The α expressed in FIG. 3 is the time taken for the Ethernet frame to be converted into a CAN message, and is defined as the time immediately before the converted CAN message is transmitted at the time when the gateway completes receiving the Ethernet frame.

게이트웨이는 α를 측정하고 마스터 노드에서 전송되는 sync 메시지에 저장한다. The gateway measures α and stores it in the sync message transmitted from the master node.

반대로 CAN 메시지가 Ethernet 프레임으로 변환되는데 소요되는 시간인 β는 CAN 메시지 수신이 완료된 시점에서 변환된 Ethernet 프레임이 전송되기 직전의 시간으로 게이트웨이는 delay request 메시지에 β를 저장한다.On the contrary, β, which is the time it takes for CAN message to be converted into Ethernet frame, is the time just before the converted Ethernet frame is transmitted at the time when CAN message reception is completed, and the gateway stores β in the delay request message.

게이트웨이가 포함된 차량 네트워크에서 시간동기화를 위한 처리 지연 계산식은 수학식 2에서와 같다.The processing delay calculation equation for time synchronization in the vehicle network including the gateway is as in Equation 2.

Figure 112020020483081-pat00003
Figure 112020020483081-pat00003

CAN 네트워크 기반 PTP 메시지 구조를 설명하면 다음과 같다.The structure of the CAN network-based PTP message is as follows.

도 4는 CAN 네트워크 기반 PTP 메시지 구조를 나타낸 구성도이다.4 is a block diagram showing the structure of a PTP message based on a CAN network.

IEEE 1588의 PTP 프로토콜은 Ethernet 네트워크 상에서 시간동기화를 수행하는 방법으로 이를 최대 8byte의 데이터를 전송할 수 있는 CAN 네트워크에 적용하기 위해서는 PTP 메시지의 timestamp 필드 값을 축소해야 한다.The IEEE 1588 PTP protocol is a method of performing time synchronization on an Ethernet network. In order to apply it to a CAN network that can transmit up to 8 bytes of data, the timestamp field value of the PTP message must be reduced.

PTP 메시지의 timestamp는 총 10byte로 시스템 제어에 영향을 미치지 않는 초단위의 상위 2byte를 삭제하여 CAN 메시지 포맷에 적용한다.The timestamp of the PTP message is 10 bytes in total, and the upper 2 bytes of the second unit that do not affect the system control are deleted and applied to the CAN message format.

도 4는 Ethernet 기반의 PTP 메시지가 CAN 메시지의 포맷으로 변환된 구조를 나타낸 것이다.4 shows a structure in which an Ethernet-based PTP message is converted into a CAN message format.

Ethernet 기반의 PTP 메시지에서 timestamp 필드는 초 단위를 표시하는 6byte와 나노 초 단위를 표시하는 4byte로 총 10byte로 구성된다.In the Ethernet-based PTP message, the timestamp field is composed of 6 bytes indicating the unit of seconds and 4 bytes indicating the unit of nanoseconds, and a total of 10 bytes.

반면에 CAN에서 timestamp를 저장하기 위한 데이터 필드는 최대 8byte로 모든 시간을 담을 수 없는 문제가 있다.On the other hand, there is a problem that the data field for storing the timestamp in CAN is up to 8 bytes and cannot contain all the time.

따라서 본 발명에서는 Ethernet 기반의 PTP 메시지를 CAN 네트워크로 변환하기 위해 timestamp 필드에서 초 단위를 4byte로 축소한다.Therefore, in the present invention, in order to convert an Ethernet-based PTP message into a CAN network, the unit of a second in the timestamp field is reduced to 4 bytes.

초 단위를 4byte로 축소하였을 경우 연 단위의 시간 표기가 불가능하나 이는 시스템 내부 저장장치 또는 별도의 통신 프로토콜을 통하여 보정이 가능하다.When the second unit is reduced to 4 bytes, it is impossible to display the time in annual units, but this can be corrected through the system internal storage device or a separate communication protocol.

Ethernet 기반의 마스터 노드의 시간동기화 과정을 설명하면 다음과 같다.The time synchronization process of the Ethernet-based master node is as follows.

도 5는 Ethernet 기반의 마스터 노드의 시간동기화 과정을 나타낸 플로우 차트이다.5 is a flow chart showing a time synchronization process of an Ethernet-based master node.

첫 번째로 Ethernet 마스터 노드에서 Sync 메시지를 슬레이브 노드에 전송하고 그 시각인 t1을 메모리 버퍼에 저장한다.(S501)First, the Ethernet master node transmits the Sync message to the slave node and stores the time t1 in the memory buffer (S501).

두 번째로 슬레이브 노드에 Sync 메시지의 전송 시각인 t1을 알리기 위해 Follow_up 메시지에 t1을 저장한 후 슬레이브 노드에 전송한다.(S502)Second, to inform the slave node of the transmission time t1 of the Sync message, t1 is stored in the Follow_up message and then transmitted to the slave node (S502).

다음으로 슬레이브 노드에서 전송하는 Delay_request 메시지가 있다면(S503) 메시지의 수신 시각 t4와 Delay_request 메시지에 포함된 β를 저장한다.(S504)Next, if there is a Delay_request message transmitted from the slave node (S503), the reception time t4 of the message and β included in the Delay_request message are stored (S504).

여기서 β는 게이트웨이에서 CAN 메시지를 Ethernet 메시지로 변환하는데 소요되는 residence time을 의미한다.Here, β denotes the residence time required to convert CAN messages into Ethernet messages in the gateway.

마지막으로 Delay_response 메시지에 t4와 β를 삽입한 후 슬레이브로 전송한다.(S505)Finally, after inserting t4 and β in the Delay_response message, it is transmitted to the slave (S505).

CAN 기반의 슬레이브 노드의 시간동기화 과정을 설명하면 다음과 같다.The time synchronization process of the CAN-based slave node is as follows.

도 6은 CAN 기반의 슬레이브 노드의 시간동기화 과정을 나타낸 플로우 차트이다.6 is a flow chart showing a time synchronization process of a CAN-based slave node.

먼저, 슬레이브 노드의 시간동기화는 마스터 노드에서 전송하는 Sync 메시지를 수신하는 것으로 시작된다.(S601)First, time synchronization of the slave node starts with receiving a Sync message transmitted from the master node (S601).

슬레이브 노드는 Sync 메시지가 수신된 시각인 t2와 α를 메모리 버퍼에 저장하고(S602), CAN_Follow_up 메시지를 수신할 때까지 대기한다.(S603)The slave node stores t2 and α, which are the times the Sync message was received, in the memory buffer (S602), and waits until the CAN_Follow_up message is received (S603).

여기서, α는 게이트웨이에서 Ethernet 메시지가 CAN 메시지로 변환되는데 소요되는 residence delay를 의미하고, CAN_Follow_up 메시지는 CAN 네트워크에서 시간동기화 메시지를 의미한다.Here, α means the residence delay required to convert the Ethernet message into a CAN message in the gateway, and the CAN_Follow_up message means a time synchronization message in the CAN network.

만약, CAN_Follow_up 메시지를 수신하였다면 메시지에 저장된 Sync 메시지의 전송 시각 t1을 메모리 버퍼에 저장한다.(S604)If the CAN_Follow_up message is received, the transmission time t1 of the Sync message stored in the message is stored in the memory buffer (S604).

다음으로 시각 t3에 CAN_Delay_request 메시지를 전송하고(S605), CAN_Delay_response 메시지를 수신할 때까지 대기한다.(S606)Next, a CAN_Delay_request message is transmitted at time t3 (S605), and waits until a CAN_Delay_response message is received (S606).

여기서, CAN_Follow_up, CAN_Delay_response 메시지는 CAN 네트워크에서 시간동기화 메시지를 의미한다.Here, the CAN_Follow_up and CAN_Delay_response messages mean time synchronization messages in the CAN network.

CAN_Delay_response 메시지를 수신하면 메시지에 포함된 수신 시각 t4와 β를 메모리 버퍼에 저장한다.(S607)When the CAN_Delay_response message is received, the reception times t4 and β included in the message are stored in the memory buffer (S607).

마지막으로 획득한 시간 요소(t1, t2, t3, t4, α, β)를 이용하여 수학식 2를 통해 지연 시간을 계산하고, 이를 이용하여 offset clock을 보정한다.(S608)The delay time is calculated through Equation 2 using the last acquired time elements (t1, t2, t3, t4, α, β), and the offset clock is corrected using this (S608).

게이트웨이의 시간동기화 과정을 설명하면 다음과 같다.The time synchronization process of the gateway is as follows.

도 7은 게이트웨이의 시간동기화 과정을 나타낸 플로우 차트이다.7 is a flow chart showing a time synchronization process of a gateway.

먼저, 마스터 노드에서 전송한 Sync 메시지의 수신 여부를 확인한다.(S701)First, it is checked whether or not the Sync message transmitted from the master node has been received (S701).

만약, Sync 메시지가 수신되었다면 이를 CAN 메시지로 변환하고(S702) 이 때 소요된 residence delay α를 계산한다.(S703)If a Sync message is received, it is converted into a CAN message (S702), and the residence delay α consumed at this time is calculated (S703).

그리고 CAN 메시지로 변환된 CAN_Sync_message에 α를 저장한 후 목적지로 전송한다.(S704)Then, after storing α in CAN_Sync_message converted to CAN message, it is transmitted to the destination (S704).

다음으로 마스터 노드에서 전송한 Follow_up 또는 Delay_response 메시지를 수신하였을 경우(S705) 이를 CAN 메시지로 변환하고(S706) 목적지로 전송한다.(S707)Next, when the Follow_up or Delay_response message transmitted from the master node is received (S705), it is converted into a CAN message (S706) and transmitted to the destination (S707).

앞서 Ethernet to CAN 메시지 변환 시간인 α를 계산하였기 때문에 Follow_up와 Delay_response 메시지의 경우 별도의 변환 시간을 계산하지 않는다. Since the Ethernet to CAN message conversion time α was calculated earlier, separate conversion time is not calculated for Follow_up and Delay_response messages.

마지막으로 슬레이브 노드에서 전송한 CAN_Delay_request 메시지를 수신하였을 경우(S708) 이를 Ethernet 메시지로 변환하고(S709) 이 때 소요된 residence delay β를 계산한다.(S710)Finally, when the CAN_Delay_request message transmitted from the slave node is received (S708), it is converted into an Ethernet message (S709), and the residence delay β required at this time is calculated (S710).

그리고 Ethernet 메시지로 변환된 Delay_request 메시지에 β를 저장하고 목적지로 전송한다.(S711)Then, β is stored in the Delay_request message converted to an Ethernet message and transmitted to the destination (S711).

도 8은 본 발명에 따른 게이트웨이를 이용한 차량 네트워크의 시간동기화 결과를 나타낸 그래프이다.8 is a graph showing a time synchronization result of a vehicle network using a gateway according to the present invention.

도 8은 마스터로 선정된 Ethernet 노드와 슬레이브로 선정된 CAN 노드를 게이트웨이를 이용하여 1:1로 연결한 토폴로지에서 시간동기화를 적용하였을 때 시간 오차를 나타낸 것이다.8 shows a time error when time synchronization is applied in a topology in which an Ethernet node selected as a master and a CAN node selected as a slave are connected 1:1 using a gateway.

본 발명에 따른 차량용 이더넷 적용을 위한 게이트웨이와 이를 이용한 센서 및 노드의 동기화를 위한 장치 및 방법의 성능을 평가하기 위해 CAN 노드 1개, Ethernet 노드 1개, 그리고 게이트웨이로 구성된 토폴로지를 구성하였다.In order to evaluate the performance of the gateway for application of the vehicle Ethernet according to the present invention and the device and method for synchronizing sensors and nodes using the same, a topology consisting of one CAN node, one Ethernet node, and a gateway was constructed.

각 노드는 시간동기화를 수행한 후 두 노드는 동일한 시간을 공유하게 되며, 동일한 시각에 I/O핀을 통해 트리거 신호를 발생하고 오실로스코프를 이용하여 두 트리거 신호의 시간 편차를 측정하였다.After each node performs time synchronization, the two nodes share the same time, generate a trigger signal through the I/O pin at the same time, and measure the time deviation of the two trigger signals using an oscilloscope.

이 두 신호의 시간 편차를 7회 반복 측정한 결과 약 5.5us의 시간 오차가 발생하는 것을 확인하였다.As a result of repeatedly measuring the time deviation of these two signals seven times, it was confirmed that a time error of about 5.5us occurred.

이는 게이트웨이에서 발생하는 처리 지연을 보상하여 시간동기화에 대한 오차를 최소화할 수 있음을 의미한다.This means that the error in time synchronization can be minimized by compensating for the processing delay occurring in the gateway.

이상에서 설명한 본 발명에 따른 차량용 이더넷 적용을 위한 게이트웨이와 이를 이용한 센서 및 노드의 동기화를 위한 장치 및 방법은 Ethernet 기반의 네트워크에서 시간동기화를 위한 IEEE 1588 표준의 PTP 절차를 도입하여 PTP 메커니즘을 CAN(FD) 네트워크에서 구현하여 노드 간의 시간동기화를 수행하는 것에 의해 시간동기화 오차를 최소화할 수 있도록 한 것이다.The gateway for applying Ethernet for a vehicle according to the present invention described above, and an apparatus and method for synchronizing sensors and nodes using the same, introduce a PTP procedure of the IEEE 1588 standard for time synchronization in an Ethernet-based network, and change the PTP mechanism to CAN ( FD) It is implemented in a network to minimize time synchronization errors by performing time synchronization between nodes.

이상에서의 설명에서와 같이 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 변형된 형태로 본 발명이 구현되어 있음을 이해할 수 있을 것이다.As described above, it will be understood that the present invention is implemented in a modified form without departing from the essential characteristics of the present invention.

그러므로 명시된 실시 예들은 한정적인 관점이 아니라 설명적인 관점에서 고려되어야 하고, 본 발명의 범위는 전술한 설명이 아니라 특허청구 범위에 나타나 있으며, 그와 동등한 범위 내에 있는 모든 차이점은 본 발명에 포함된 것으로 해석되어야 할 것이다.Therefore, the specified embodiments should be considered from a descriptive point of view rather than a limiting point of view, and the scope of the present invention is shown in the claims rather than the above description, and all differences within the scope equivalent thereto are included in the present invention. It will have to be interpreted.

100. CAN(FD) 노드
200. 게이트웨이
300. Ethernet 스위치
400. Ethernet 노드
100. CAN(FD) Node
200. Gateway
300. Ethernet switch
400. Ethernet node

Claims (12)

마스터 노드에서 전송한 Sync 메시지의 수신 여부를 확인하는 제 1 메시지 수신 확인부;
Sync 메시지가 수신되었다면 이를 CAN 메시지로 변환하는 CAN 메시지 변환부;
CAN 메시지 변환시에 소요된 residence delay α를 계산하는 제 1 레지던스 지연 계산부;
CAN 메시지로 변환된 CAN_Sync_message에 α를 저장한 후 목적지로 전송하는 제 1 메시지 전송부;
슬레이브 노드에서 전송한 CAN_Delay_request 메시지를 수신하였는지 확인하는 제 2 메시지 수신 확인부;
CAN_Delay_request 메시지를 Ethernet 메시지로 변환하는 Ethernet 메시지 변환부;
Ethernet 메시지 변환시에 소요된 residence delay β를 계산하는 제 2 레지던스 지연 계산부;
Ethernet 메시지로 변환된 Delay_request 메시지에 β를 저장하고 목적지로 전송하는 제 2 메시지 전송부;를 포함하는 것을 특징으로 하는 차량용 이더넷 적용을 위한 게이트웨이.
A first message reception confirmation unit that checks whether or not a Sync message transmitted from the master node is received;
A CAN message conversion unit for converting the Sync message into a CAN message if it is received;
A first residence delay calculation unit that calculates residence delay α required when converting a CAN message;
A first message transmission unit for storing α in CAN_Sync_message converted into a CAN message and then transmitting it to a destination;
A second message reception confirmation unit that checks whether a CAN_Delay_request message transmitted from the slave node has been received;
An Ethernet message conversion unit converting a CAN_Delay_request message into an Ethernet message;
A second residence delay calculation unit that calculates a residence delay β required when converting an Ethernet message;
And a second message transmission unit that stores β in the Delay_request message converted into an Ethernet message and transmits it to a destination.
제 1 항에 있어서, 마스터 노드에서 전송한 Follow_up 또는 Delay_response 메시지를 수신하였을 경우 이를 CAN 메시지로 변환하고 목적지로 전송하고,
Ethernet to CAN 메시지 변환 시간인 α를 계산하였기 때문에 Follow_up와 Delay_response 메시지의 경우 별도의 변환 시간을 계산하지 않는 것을 특징으로 하는 차량용 이더넷 적용을 위한 게이트웨이.
The method of claim 1, wherein when a Follow_up or Delay_response message transmitted from a master node is received, it is converted into a CAN message and transmitted to a destination,
Gateway for automotive Ethernet application, characterized in that separate conversion times are not calculated for Follow_up and Delay_response messages because α, which is the Ethernet to CAN message conversion time, is calculated.
제 1 항에 있어서, 게이트웨이는,
CAN(FD) 노드들로 구성된 버스 라인과 Ethernet 스위치에 연결되고 CAN(FD) 노드와 Ethernet 노드 간의 시간동기화를 구현하여 두 가지 네트워크의 데이터를 교환하는 역할을 수행하는 것을 특징으로 하는 차량용 이더넷 적용을 위한 게이트웨이.
The method of claim 1, wherein the gateway,
It is connected to a bus line composed of CAN (FD) nodes and an Ethernet switch, and implements time synchronization between the CAN (FD) node and the Ethernet node to exchange data between two networks. Gateway for.
버스 방식의 토폴로지를 갖고 버스라인을 통하여 게이트웨이에 연결되는 CAN(FD) 노드들;
Ethernet 스위치에 연결되어 peer to peer 방식의 통신 방식으로 데이터를 송수신하는 Ethernet 노드들;
CAN(FD) 노드들로 구성된 버스 라인과 Ethernet 스위치에 연결되고 CAN(FD) 노드와 Ethernet 노드 간의 시간동기화를 구현하여 두 가지 네트워크의 데이터를 교환하는 역할을 수행하는 게이트웨이;를 포함하고,
게이트웨이에서 발생하는 처리 지연(processing delay)에 대한 보정을 위하여, 처리 지연은 Ethernet 메시지를 CAN 메시지로 변환하는데 소요되는 시간 α와 CAN 메시지를 Ethernet 메시지로 변환하는데 소요되는 시간 β로 정의하고, α와 β는 PTP 메시지가 게이트웨이에서 수신이 완료된 시점에서 변환 후 목적지로 전송되기 직전까지의 시간으로 정의하고, 게이트웨이는 마스터와 슬레이브가 전송한 PTP 메시지의 timestamp 값에 측정된 α와 β를 보정하는 작업을 수행하며, 이를 통해 시간동기화 오차를 줄이는 것을 특징으로 하는 차량용 이더넷 적용을 위한 게이트웨이를 이용한 센서 및 노드의 동기화를 위한 장치.
CAN (FD) nodes having a bus topology and connected to a gateway through a bus line;
Ethernet nodes connected to an Ethernet switch to transmit and receive data in a peer-to-peer communication method;
Including; a bus line composed of CAN (FD) nodes and a gateway that is connected to an Ethernet switch and performs a role of exchanging data of two networks by implementing time synchronization between the CAN (FD) node and the Ethernet node,
In order to compensate for the processing delay occurring in the gateway, the processing delay is defined as the time α for converting an Ethernet message to a CAN message and a time β for converting a CAN message to an Ethernet message, and α and β is defined as the time from when the PTP message is received from the gateway to just before it is transmitted to the destination after conversion, and the gateway corrects the measured α and β in the timestamp value of the PTP message transmitted by the master and slave. A device for synchronizing a sensor and a node using a gateway for applying Ethernet for a vehicle, characterized in that the time synchronization error is reduced through this.
삭제delete 제 4 항에 있어서, 시간동기화 오차를 줄이기 위하여,
IEEE 1588의 PTP 프로토콜을 통하여 Ethernet 네트워크 상에서 시간동기화를 수행하는 방법을 최대 8byte의 데이터를 전송할 수 있는 CAN 네트워크에 적용하기 위해서는 PTP 메시지의 timestamp 필드 값을 축소하고,
초 단위를 표시하는 6byte와 나노 초 단위를 표시하는 4byte로 총 10byte로 구성되는 PTP 메시지의 timestamp 필드 값을 시스템 제어에 영향을 미치지 않는 초단위의 상위 2byte를 삭제하여 CAN 메시지 포맷에 적용하는 것을 특징으로 하는 차량용 이더넷 적용을 위한 게이트웨이를 이용한 센서 및 노드의 동기화를 위한 장치.
The method of claim 4, wherein in order to reduce a time synchronization error,
In order to apply the method of time synchronization on the Ethernet network through the PTP protocol of IEEE 1588 to the CAN network that can transmit up to 8 bytes of data, reduce the timestamp field value of the PTP message
The timestamp field value of the PTP message consisting of 10 bytes, consisting of 6 bytes indicating the second unit and 4 bytes indicating the nanosecond unit, is applied to the CAN message format by deleting the upper 2 bytes of the second unit that do not affect the system control. A device for synchronizing sensors and nodes using a gateway for automotive Ethernet application.
CAN(FD) 노드들로 구성된 버스 라인과 Ethernet 스위치에 연결되고 CAN(FD) 노드와 Ethernet 노드 간의 시간동기화를 구현하여 두 가지 네트워크의 데이터를 교환하는 역할을 수행하는 게이트웨이를 포함하는 차량 네트워크에서의 시간동기화를 위하여,
시간동기화의 마스터로 선정된 Ethernet 노드가 시간 T1에 sync 메시지를 슬레이브 노드로 전송하고 슬레이브는 이를 시간 T2에 수신하는 단계;
마스터 노드는 follow up 메시지에 시간 T1을 담아 다시 슬레이브 노드로 전송하고, 이를 수신한 시점에 슬레이브 노드가 시간 T1과 T2를 확인하는 단계;
슬레이브 노드는 시간 T3에 delay request 메시지를 마스터로 전송하고 마스터는 시간 T4에 이를 수신하는 단계;
마스터 노드는 시간 T4를 delay response 메시지에 담아 슬레이브로 보내고, 최종적으로 슬레이브 노드는 시간 T1, T2, T3, T4를 확인하고, propagation delay를 계산하는 단계;를 포함하는 것을 특징으로 하는 차량용 이더넷 적용을 위한 게이트웨이를 이용한 센서 및 노드의 동기화를 위한 방법.
In a vehicle network including a bus line composed of CAN (FD) nodes and a gateway that is connected to an Ethernet switch and performs time synchronization between the CAN (FD) node and the Ethernet node to exchange data between the two networks. For time synchronization,
The Ethernet node selected as the master of time synchronization transmits a sync message to the slave node at time T1 and the slave receives it at time T2;
The master node sends the follow-up message to the slave node again with the time T1, and the slave node checks the times T1 and T2 at the time of receiving the follow-up message;
The slave node transmits a delay request message to the master at time T3 and the master receives it at time T4;
The master node puts the time T4 in the delay response message and sends it to the slave, and finally the slave node checks the times T1, T2, T3, and T4, and calculates the propagation delay. Method for synchronizing sensors and nodes using a gateway for
제 7 항에 있어서, propagation delay를 계산하는 단계에서,
Figure 112020020483081-pat00004
으로 계산하고,
α는 Ethernet 프레임이 CAN 메시지로 변환하는데 소요되는 시간으로, 게이트웨이가 Ethernet 프레임을 수신 완료한 시점에서 변환된 CAN 메시지가 전송되기 직전의 시간으로 정의되고, 게이트웨이는 α를 측정하고 마스터 노드에서 전송되는 sync 메시지에 저장하고,
β는 CAN 메시지가 Ethernet 프레임으로 변환되는데 소요되는 시간으로, CAN 메시지 수신이 완료된 시점에서 변환된 Ethernet 프레임이 전송되기 직전의 시간으로 정의되고, 게이트웨이는 delay request 메시지에 β를 저장하는 것을 특징으로 하는 차량용 이더넷 적용을 위한 게이트웨이를 이용한 센서 및 노드의 동기화를 위한 방법.
The method of claim 7, wherein in the step of calculating propagation delay,
Figure 112020020483081-pat00004
Is calculated as,
α is the time it takes for the Ethernet frame to be converted into a CAN message, defined as the time immediately before the converted CAN message is transmitted at the time when the gateway completes receiving the Ethernet frame, and the gateway measures α and transmits it from the master node. save it in the sync message,
β is the time it takes for the CAN message to be converted into an Ethernet frame, defined as the time immediately before the converted Ethernet frame is transmitted at the time when CAN message reception is completed, and the gateway stores β in the delay request message. A method for synchronizing sensors and nodes using a gateway for automotive Ethernet application.
CAN(FD) 노드들로 구성된 버스 라인과 Ethernet 스위치에 연결되고 CAN(FD) 노드와 Ethernet 노드 간의 시간동기화를 구현하여 두 가지 네트워크의 데이터를 교환하는 역할을 수행하는 게이트웨이를 포함하는 차량 네트워크에서의 Ethernet 기반의 마스터 노드의 시간동기화를 위하여,
Ethernet 마스터 노드에서 Sync 메시지를 슬레이브 노드에 전송하고 그 시각인 t1을 메모리 버퍼에 저장하는 단계;
슬레이브 노드에 Sync 메시지의 전송 시각인 t1을 알리기 위해 Follow_up 메시지에 t1을 저장한 후 슬레이브 노드에 전송하는 단계;
슬레이브 노드에서 전송하는 Delay_request 메시지가 있다면 메시지의 수신 시각 t4와 Delay_request 메시지에 포함된, 게이트웨이에서 CAN 메시지를 Ethernet 메시지로 변환하는데 소요되는 residence time β를 저장하는 단계;
Delay_response 메시지에 t4와 β를 삽입한 후 슬레이브로 전송하는 단계;를 포함하는 것을 특징으로 하는 차량용 이더넷 적용을 위한 게이트웨이를 이용한 센서 및 노드의 동기화를 위한 방법.
In a vehicle network including a bus line composed of CAN (FD) nodes and a gateway that is connected to an Ethernet switch and performs time synchronization between the CAN (FD) node and the Ethernet node to exchange data between the two networks. For time synchronization of the Ethernet-based master node,
Transmitting a Sync message from the Ethernet master node to a slave node and storing the time t1 in a memory buffer;
Storing t1 in the Follow_up message and transmitting it to the slave node in order to inform the slave node of the transmission time t1 of the Sync message;
If there is a Delay_request message transmitted from the slave node, storing a reception time t4 of the message and a residence time β required to convert the CAN message into an Ethernet message at the gateway, which is included in the Delay_request message;
Inserting t4 and β in the Delay_response message and then transmitting it to the slave; method for synchronizing a sensor and a node using a gateway for applying Ethernet for a vehicle.
CAN(FD) 노드들로 구성된 버스 라인과 Ethernet 스위치에 연결되고 CAN(FD) 노드와 Ethernet 노드 간의 시간동기화를 구현하여 두 가지 네트워크의 데이터를 교환하는 역할을 수행하는 게이트웨이를 포함하는 차량 네트워크에서의 CAN 기반의 슬레이브 노드의 시간동기화를 위하여,
마스터 노드에서 전송하는 Sync 메시지를 수신하는 단계;
슬레이브 노드는 Sync 메시지가 수신된 시각인 t2와 α를 메모리 버퍼에 저장하고, CAN_Follow_up 메시지를 수신할 때까지 대기하는 단계;
CAN_Follow_up 메시지를 수신하였다면 메시지에 저장된 Sync 메시지의 전송 시각 t1을 메모리 버퍼에 저장하는 단계;
시각 t3에 CAN_Delay_request 메시지를 전송하고, CAN_Delay_response 메시지를 수신할 때까지 대기하는 단계;
CAN_Delay_response 메시지를 수신하면 메시지에 포함된 수신 시각 t4와 β를 메모리 버퍼에 저장하는 단계;
획득한 시간 요소(t1, t2, t3, t4, α, β)를 이용하여 지연 시간을 계산하고, 이를 이용하여 offset clock을 보정하는 단계;를 포함하는 것을 특징으로 하는 차량용 이더넷 적용을 위한 게이트웨이를 이용한 센서 및 노드의 동기화를 위한 방법.
In a vehicle network including a bus line composed of CAN (FD) nodes and a gateway that is connected to an Ethernet switch and performs time synchronization between the CAN (FD) node and the Ethernet node to exchange data between the two networks. For time synchronization of CAN-based slave nodes,
Receiving a Sync message transmitted from the master node;
The slave node stores t2 and α, which are times when the Sync message is received, in a memory buffer, and waits until a CAN_Follow_up message is received;
If the CAN_Follow_up message is received, storing the transmission time t1 of the Sync message stored in the message in a memory buffer;
Transmitting a CAN_Delay_request message at time t3 and waiting until a CAN_Delay_response message is received;
Storing the reception times t4 and β included in the message in a memory buffer when a CAN_Delay_response message is received;
Computing the delay time using the acquired time elements (t1, t2, t3, t4, α, β) and correcting the offset clock using the calculated delay time; Method for synchronizing sensors and nodes using.
제 10 항에 있어서, α는 게이트웨이에서 Ethernet 메시지가 CAN 메시지로 변환되는데 소요되는 residence delay를 의미하고,
CAN_Follow_up, CAN_Delay_response 메시지는 CAN 네트워크에서 시간동기화 메시지를 의미하는 것을 특징으로 하는 차량용 이더넷 적용을 위한 게이트웨이를 이용한 센서 및 노드의 동기화를 위한 방법.
The method of claim 10, wherein α means a residence delay required for converting an Ethernet message into a CAN message in the gateway,
The CAN_Follow_up, CAN_Delay_response message means a time synchronization message in a CAN network. A method for synchronizing a sensor and a node using a gateway for applying Ethernet for a vehicle.
CAN(FD) 노드들로 구성된 버스 라인과 Ethernet 스위치에 연결되고 CAN(FD) 노드와 Ethernet 노드 간의 시간동기화를 구현하여 두 가지 네트워크의 데이터를 교환하는 역할을 수행하는 게이트웨이의 시간동기화를 위하여,
마스터 노드에서 전송한 Sync 메시지의 수신 여부를 확인하는 단계;
Sync 메시지가 수신되었다면 이를 CAN 메시지로 변환하고, 소요된 residence delay α를 계산하는 단계;
CAN 메시지로 변환된 CAN_Sync_message에 α를 저장한 후 목적지로 전송하는 단계;
마스터 노드에서 전송한 Follow_up 또는 Delay_response 메시지를 수신하였을 경우 이를 CAN 메시지로 변환하고 목적지로 전송하는 단계;
슬레이브 노드에서 전송한 CAN_Delay_request 메시지를 수신하였을 경우 이를 Ethernet 메시지로 변환하고 소요된 residence delay β를 계산하는 단계;
Ethernet 메시지로 변환된 Delay_request 메시지에 β를 저장하고 목적지로 전송하는 단계;를 포함하는 것을 특징으로 하는 차량용 이더넷 적용을 위한 게이트웨이를 이용한 센서 및 노드의 동기화를 위한 방법.
For time synchronization of the gateway, which is connected to a bus line composed of CAN(FD) nodes and an Ethernet switch, and performs time synchronization between the CAN(FD) node and the Ethernet node, exchanging data from two networks,
Checking whether a Sync message transmitted from the master node is received;
Converting the Sync message into a CAN message if it is received, and calculating the required residence delay α;
Storing α in CAN_Sync_message converted into a CAN message and transmitting it to a destination;
When a Follow_up or Delay_response message transmitted from a master node is received, converting it into a CAN message and transmitting it to a destination;
Converting the CAN_Delay_request message transmitted from the slave node into an Ethernet message and calculating the required residence delay β when receiving the CAN_Delay_request message;
Storing β in the Delay_request message converted into an Ethernet message and transmitting it to a destination; method for synchronizing a sensor and a node using a gateway for applying Ethernet for a vehicle.
KR1020200023815A 2020-02-26 2020-02-26 Gateway for automotive Ethernet application and System and Method for synchronizing sensor and node using the same KR102241999B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020200023815A KR102241999B1 (en) 2020-02-26 2020-02-26 Gateway for automotive Ethernet application and System and Method for synchronizing sensor and node using the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020200023815A KR102241999B1 (en) 2020-02-26 2020-02-26 Gateway for automotive Ethernet application and System and Method for synchronizing sensor and node using the same

Publications (1)

Publication Number Publication Date
KR102241999B1 true KR102241999B1 (en) 2021-04-19

Family

ID=75718648

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020200023815A KR102241999B1 (en) 2020-02-26 2020-02-26 Gateway for automotive Ethernet application and System and Method for synchronizing sensor and node using the same

Country Status (1)

Country Link
KR (1) KR102241999B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114919599A (en) * 2022-05-17 2022-08-19 厦门金龙联合汽车工业有限公司 Device for realizing vehicle formation on automatic driving vehicle

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101243434B1 (en) * 2011-10-20 2013-03-13 성균관대학교산학협력단 Synchronization method for fieldbus using gateway and synchronization system for fieldbus using gateway
KR20150003543A (en) * 2013-07-01 2015-01-09 한국전자통신연구원 Apparatus and method for forwarding can frame
KR101596759B1 (en) 2014-11-26 2016-03-07 현대자동차주식회사 Method and apparatus for providing time synchronization in in-vehicle Ethernet communication
KR20190002906A (en) 2017-06-30 2019-01-09 명지대학교 산학협력단 Clocks timing fault recovery method and apparatus in precision time protocol system
KR102048685B1 (en) 2018-06-15 2019-11-26 주식회사 다산네트웍스 Method for judging the time synchronization of a media transmission device in a vehicle avb network

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101243434B1 (en) * 2011-10-20 2013-03-13 성균관대학교산학협력단 Synchronization method for fieldbus using gateway and synchronization system for fieldbus using gateway
KR20150003543A (en) * 2013-07-01 2015-01-09 한국전자통신연구원 Apparatus and method for forwarding can frame
KR101596759B1 (en) 2014-11-26 2016-03-07 현대자동차주식회사 Method and apparatus for providing time synchronization in in-vehicle Ethernet communication
KR20190002906A (en) 2017-06-30 2019-01-09 명지대학교 산학협력단 Clocks timing fault recovery method and apparatus in precision time protocol system
KR102048685B1 (en) 2018-06-15 2019-11-26 주식회사 다산네트웍스 Method for judging the time synchronization of a media transmission device in a vehicle avb network

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114919599A (en) * 2022-05-17 2022-08-19 厦门金龙联合汽车工业有限公司 Device for realizing vehicle formation on automatic driving vehicle
CN114919599B (en) * 2022-05-17 2023-08-29 厦门金龙联合汽车工业有限公司 Device for realizing vehicle formation on automatic driving vehicle

Similar Documents

Publication Publication Date Title
US11218238B2 (en) Method, computer-readable medium, system, and vehicle comprising the system for validating a time function of a master and the clients in a network of a vehicle
US11575495B2 (en) One-step timestamping in network devices
US6959017B2 (en) Synchronizing system using IEEE 1394 serial bus standard
US11251891B2 (en) Method for identifying an incorrect time stamp of an ethernet message and control unit for a motor vehicle
JP5518191B2 (en) Method and system for optical transmission network carrying time synchronization protocol
CN110943795B (en) Time synchronization method suitable for bus communication system
JP6227888B2 (en) Communication system, synchronization system, and communication method
KR102241999B1 (en) Gateway for automotive Ethernet application and System and Method for synchronizing sensor and node using the same
KR20100062786A (en) Time synchronized system and time synchronization method in the next generation convergence network
CN115865246A (en) Time synchronization device, system and method
US20230103012A1 (en) Method for optimising the time synchronisation between network devices connected via a communications network
KR102662604B1 (en) Real-time time synchronization method between EtherCAT communication nodes
Oh et al. The Time Synchronization of CAN-FD and Ethernet for Zonal E/E Architecture
WO2016002367A1 (en) Communication system, communication method, and communication program
KR20190071465A (en) Evaluation method of vehicle network time synchronization
Do et al. Time synchronization method between CAN-FD nodes
CN112636861A (en) Clock synchronization method, device, equipment and storage medium
JP2009128174A (en) Time synchronization system
JP6572136B2 (en) COMMUNICATION SYSTEM, COMMUNICATION DEVICE, SECOND DEVICE, COMMUNICATION METHOD, AND COMPUTER PROGRAM
EP4142190A1 (en) Method and device for monitoring a time synchronization distributed via a network switch to be used in a communication network of an automated vehicle
CN109379252B (en) Network delay measurement method and device based on programmable logic device
WO2023233588A1 (en) Time synchronization device, time synchronization method, and time synchronization program
CN117546439A (en) Vehicle-mounted device, vehicle-mounted communication system and time synchronization method
Isac et al. An AUTOSAR Based Approach to Time Synchronize In-Vehicle ECUs in Mixed Network Architecture
US20240171295A1 (en) Communication apparatus, control method for communication apparatus, and storage medium

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right
GRNT Written decision to grant