KR102097386B1 - Method for synchronizing communication clocks and apparatus thereof - Google Patents

Method for synchronizing communication clocks and apparatus thereof Download PDF

Info

Publication number
KR102097386B1
KR102097386B1 KR1020130145905A KR20130145905A KR102097386B1 KR 102097386 B1 KR102097386 B1 KR 102097386B1 KR 1020130145905 A KR1020130145905 A KR 1020130145905A KR 20130145905 A KR20130145905 A KR 20130145905A KR 102097386 B1 KR102097386 B1 KR 102097386B1
Authority
KR
South Korea
Prior art keywords
correction value
clock
deviation
value
electronic control
Prior art date
Application number
KR1020130145905A
Other languages
Korean (ko)
Other versions
KR20150061779A (en
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 KR1020130145905A priority Critical patent/KR102097386B1/en
Publication of KR20150061779A publication Critical patent/KR20150061779A/en
Application granted granted Critical
Publication of KR102097386B1 publication Critical patent/KR102097386B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/04Generating or distributing clock signals or signals derived directly therefrom
    • G06F1/12Synchronisation of different clock signals provided by a plurality of clock generators
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60WCONJOINT CONTROL OF VEHICLE SUB-UNITS OF DIFFERENT TYPE OR DIFFERENT FUNCTION; CONTROL SYSTEMS SPECIALLY ADAPTED FOR HYBRID VEHICLES; ROAD VEHICLE DRIVE CONTROL SYSTEMS FOR PURPOSES NOT RELATED TO THE CONTROL OF A PARTICULAR SUB-UNIT
    • B60W50/00Details of control systems for road vehicle drive control not related to the control of a particular sub-unit, e.g. process diagnostic or vehicle driver interfaces

Abstract

통신 클럭 동기화 방법 및 그 장치가 개시된다. 본 발명의 일 실시예에 따른 통신 클럭 동기화 방법은 복수의 전자 제어 장치들이 제1 전자 제어 장치(ECU)와 제2 전자 제어 장치로 통합된 시스템에서의 통신 클럭 동기화 방법에 있어서, 상기 제1 전자 제어 장치와 상기 제2 전자 제어 장치간 프레임의 송수신을 통해 관측된 도달 시간과 미리 결정된 도달 시간의 차이를 이용하여 클럭 편차를 측정하고, 동일 프레임에 대해 연속되는 두 사이클 각각에서 측정된 제1 클럭 편차와 제2 클럭 편차의 차이를 이용하여 주파수 편차를 측정하는 단계; 사이클 내의 프레임들 각각에 대한 클럭 편차를 이용하여 오프셋 보정 값을 계산하는 단계; 두 사이클 내의 동일 프레임들 각각에 대한 주파수 편차를 이용하여 속도 보정 값을 계산하는 단계; 및 상기 계산된 상기 오프셋 보정 값과 상기 속도 보정 값을 반영하여 상기 제1 전자 제어 장치와 상기 제2 전자 제어 장치간 클럭 편차와 주파수 편차를 보정하는 단계를 포함한다.Disclosed is a communication clock synchronization method and apparatus. The method for synchronizing communication clocks according to an embodiment of the present invention is a method for synchronizing communication clocks in a system in which a plurality of electronic control devices are integrated into a first electronic control unit (ECU) and a second electronic control device, wherein the first electronic A clock deviation is measured using a difference between an arrival time and a predetermined arrival time observed through transmission and reception of a frame between a control device and the second electronic control device, and the first clock measured in each of two successive cycles for the same frame Measuring a frequency deviation using the difference between the deviation and the second clock deviation; Calculating an offset correction value using a clock deviation for each frame in the cycle; Calculating a speed correction value using frequency deviation for each of the same frames in two cycles; And correcting clock deviation and frequency deviation between the first electronic control device and the second electronic control device by reflecting the calculated offset correction value and the speed correction value.

Description

통신 클럭 동기화 방법 및 그 장치 {Method for synchronizing communication clocks and apparatus thereof}Method and synchronizing communication clocks and apparatus thereof

본 발명은 통신 클럭 동기화에 대한 것으로, 상세하게는 세 개 이상의 복수의 전자 제어 장치(ECU)가 두 개의 ECU로 통합된 통합 전자 제어 시스템에서 클럭 편차와 주파수 편차를 함께 보정하여 각 ECU 통신 클럭의 편차를 줄이고, 이를 통해 통신 클럭을 동기화시킬 수 있는 통신 클럭 동기화 방법 및 그 장치에 대한 것이다.The present invention relates to the synchronization of communication clocks, and more specifically, a clock deviation and a frequency deviation are corrected together in an integrated electronic control system in which three or more plurality of electronic control units (ECUs) are integrated into two ECUs. The present invention relates to a method and apparatus for synchronizing a communication clock capable of reducing variations and synchronizing a communication clock.

차량에 구비된 MDPS(motor driven power steering) 시스템, BBW(Brake By Wire) 시스템, 에어백(Airbag) 시스템, ASB(Active Seatbelt) 시스템은 각각의 전자 제어 장치(ECU)를 가지고 있으며, 각각의 ECU가 각각의 시스템을 제어한다. 그러나 최근 자동차의 전장화로 인해 ECU의 개수가 늘어나고 있으며, 고급차량의 경우 ECU의 개수가 100여 개에 달하고 있는 실정이다. ECU의 개수가 늘어날 경우 차량의 연비가 떨어지게 되고 차량의 ECU 장착 위치도 복잡해지게 된다.The MDPS (motor driven power steering) system, the brake by wire (BBW) system, the airbag system, and the active seatbelt (ASB) system provided in the vehicle have each electronic control unit (ECU), and each ECU Control each system. However, recently, the number of ECUs has increased due to the lengthening of automobiles, and in the case of high-end vehicles, the number of ECUs has reached over 100. When the number of ECUs increases, the fuel efficiency of the vehicle decreases, and the ECU mounting position of the vehicle becomes complicated.

이와 같이 종래에는 각각의 시스템이 분리되어 있어 각 시스템을 제어하는 ECU가 각각 필요한 문제점이 있다.As described above, there is a problem in that the ECUs controlling the respective systems are required because the respective systems are separated.

이런 문제를 해결하기 위해 복수의 전자 제어 장치를 몇 개의 전자 제어 장치로 통합한 통합 전자 제어 시스템이 있으며, 이런 통합 전자 제어 시스템과 같은 임베디드(embedded) 시스템은 오실레이터를 주파수 공급원으로 사용하는데, 통합 ECU 시스템에서는 크리스털 오실레이터를 사용한다. 크리스털 오실레이터의 경우 외부 요인들 예를 들어, 제조 공차, 온도변화, 노후화, 진동 등에 따라 표준화된 주파수에 대해 편차가 생기게 된다.To solve this problem, there is an integrated electronic control system in which a plurality of electronic control devices are integrated into several electronic control devices, and an embedded system such as the integrated electronic control system uses an oscillator as a frequency source. The system uses a crystal oscillator. In the case of a crystal oscillator, deviations may occur with respect to a standardized frequency due to external factors such as manufacturing tolerances, temperature changes, aging, and vibration.

예컨대, 도 1a에 도시된 일 예와 같이, 외부 요인들에 의하여 주파수 편차가 발생하여 주파수가 다른 클럭이 발생할 수도 있고, 도 1b에 도시된 일 예와 같이, 외부 요인들에 의하여 주파수는 같지만 위상이 다른 클럭이 발생할 수도 있다.For example, as in the example illustrated in FIG. 1A, a frequency deviation may occur due to external factors, and a clock having a different frequency may be generated. As in the example illustrated in FIG. 1B, the frequency is the same but the phase is caused by external factors. This other clock may occur.

이와 같은 클럭 내의 편차를 최소화하기 위해 기존의 시스템들은 클럭을 보정할 수 있는 두 가지 방법을 사용한다.In order to minimize such a deviation in the clock, existing systems use two methods for calibrating the clock.

1) 오프셋 보정1) Offset correction

오프셋 보정은 도 2a에 도시된 일 예와 같이, 시간 상의 한 시점에서 보이는 클럭 시간을 변경하는 것으로, 클럭 내의 카운터 값을 변경하는 것이다. 보정을 위해서는 시간 값을 동기화 시킬 외부 클럭이 필요하다.The offset correction is to change the clock time seen at one point in time, as in the example shown in FIG. 2A, and to change the counter value in the clock. For calibration, an external clock to synchronize time values is required.

이런 오프셋 보정은 클럭의 현재 편차를 바로 잡도록 하지만, 주파수 편차는 그대로 남아 있어 시간이 지나면 다시 편차가 발생하는 문제점이 있다.This offset correction attempts to correct the current deviation of the clock, but the frequency deviation remains, and there is a problem that the deviation occurs again over time.

2) 속도 보정2) Speed correction

오실레이터가 제공하는 주파수는 일반적으로 카운트하기 전에 디바이더에 의해 더 느린 주파수로 나누어서 사용된다. 디바이더를 사용하여 최종 주파수의 변경이 가능하므로 도 2b에 도시된 일 예와 같이 클럭을 가속 또는 감속할 수 있다.The frequency provided by the oscillator is usually divided by the divider into slower frequencies before counting. Since the final frequency can be changed using a divider, the clock can be accelerated or decelerated as shown in the example shown in FIG. 2B.

종래 편차 보정 방법인 오프셋 보정의 경우 주파수 편차는 그대로 남아있기 때문에 시간이 지나면 다시 편차를 가지게 되고, 속도 보정의 경우 오프셋 보정보다는 뛰어난 보정 효과를 가져오지만 여전히 클럭의 편차가 남아있어 완벽한 보정이 되지 않는 문제점이 있다.In the case of offset compensation, which is a conventional deviation compensation method, the frequency deviation remains unchanged over time, so it has a deviation again over time, and in the case of speed compensation, it has a better correction effect than offset compensation, but still there is a deviation in the clock, so it is not perfectly corrected. There is a problem.

본 발명은 상기와 같은 종래 기술의 문제점을 해결하고자 도출된 것으로서, 통합 전자 제어 시스템에서 클럭 편차와 주파수 편차를 함께 보정하여 각 ECU 통신 클럭의 편차를 줄이고, 이를 통해 통신 클럭을 동기화시킬 수 있는 통신 클럭 동기화 방법 및 그 장치를 제공하는데 그 목적이 있다.The present invention has been derived to solve the problems of the prior art as described above, and reduces the deviation of each ECU communication clock by correcting the clock deviation and the frequency deviation together in the integrated electronic control system, thereby enabling communication clock synchronization. It is an object of the present invention to provide a clock synchronization method and apparatus.

상기와 같은 목적을 달성하기 위하여, 본 발명의 일 실시예에 따른 통신 클럭 동기화 방법은 복수의 전자 제어 장치들이 제1 전자 제어 장치(ECU)와 제2 전자 제어 장치로 통합된 시스템에서의 통신 클럭 동기화 방법에 있어서, 상기 제1 전자 제어 장치와 상기 제2 전자 제어 장치간 프레임의 송수신을 통해 관측된 도달 시간과 미리 결정된 도달 시간의 차이를 이용하여 클럭 편차를 측정하고, 동일 프레임에 대해 연속되는 두 사이클 각각에서 측정된 제1 클럭 편차와 제2 클럭 편차의 차이를 이용하여 주파수 편차를 측정하는 단계; 한 사이클 내의 프레임들 각각에 대한 클럭 편차를 이용하여 오프셋 보정 값을 계산하는 단계; 두 사이클 내의 동일 프레임들 각각에 대한 주파수 편차를 이용하여 속도 보정 값을 계산하는 단계; 및 상기 계산된 상기 오프셋 보정 값과 상기 속도 보정 값을 반영하여 상기 제1 전자 제어 장치와 상기 제2 전자 제어 장치간 클럭 편차와 주파수 편차를 보정하는 단계를 포함한다.In order to achieve the above object, a communication clock synchronization method according to an embodiment of the present invention includes a communication clock in a system in which a plurality of electronic control devices are integrated into a first electronic control unit (ECU) and a second electronic control unit. In the synchronization method, a clock deviation is measured using a difference between an arrival time and a predetermined arrival time observed through transmission / reception of a frame between the first electronic control device and the second electronic control device, and continuous for the same frame Measuring a frequency deviation using a difference between a first clock deviation and a second clock deviation measured in each of the two cycles; Calculating an offset correction value using a clock deviation for each frame in one cycle; Calculating a speed correction value using frequency deviation for each of the same frames in two cycles; And correcting clock deviation and frequency deviation between the first electronic control device and the second electronic control device by reflecting the calculated offset correction value and the speed correction value.

상기 오프셋 보정 값을 계산하는 단계는 상기 한 사이클 내의 프레임들 각각에 대해 측정된 클럭 편차들 중 최고 값과 최저 값의 평균 값을 이용하여 상기 오프셋 보정 값을 계산하고, 상기 속도 보정 값을 계산하는 단계는 상기 두 사이클 내의 동일 프레임들 각각에 대해 측정된 주파수 편차들 중 최고 값과 최저 값의 평균 값을 이용하여 상기 주파수 보정 값을 계산할 수 있다.In the calculating of the offset correction value, the offset correction value is calculated using the average value of the highest and lowest values among clock deviations measured for each of the frames within one cycle, and the speed correction value is calculated. The step may calculate the frequency correction value using the average value of the highest and lowest values among frequency deviations measured for each of the same frames in the two cycles.

상기 오프셋 보정 값을 계산하는 단계는 상기 측정된 클럭 편차들의 개수에 따라 미리 설정된 개수의 클럭 편차를 제외한 나머지 클럭 편차들 중 최고 값과 최저 값의 평균 값을 이용하여 상기 오프셋 보정 값을 계산하고, 상기 속도 보정 값을 계산하는 단계는 상기 측정된 주파수 편차들의 개수에 따라 미리 설정된 개수의 주파수 편차를 제외한 나머지 주파수 편차들 중 최고 값과 최저 값의 평균 값을 이용하여 상기 주파수 보정 값을 계산할 수 있다.In the calculating of the offset correction value, the offset correction value is calculated using the average value of the highest value and the lowest value among the remaining clock deviations excluding the preset number of clock deviations according to the number of measured clock deviations, In the calculating of the speed correction value, the frequency correction value may be calculated by using the average value of the highest and lowest values among the remaining frequency deviations except for a preset number of frequency deviations according to the number of the measured frequency deviations. .

상기 오프셋 보정 값을 계산하는 단계와 상기 속도 보정 값을 계산하는 단계는 통신의 홀수 사이클에서 이루어지고, 상기 보정하는 단계는 상기 오프셋 보정 값의 계산이 이루어진 해당 사이클에서 클럭 편차를 보정하고, 상기 속도 보정 값의 계산이 이루어진 그 다음 두 사이클에서 주파수 편차를 보정할 수 있다.The step of calculating the offset correction value and the step of calculating the speed correction value are performed in odd cycles of communication, and the step of correcting corrects the clock deviation in the cycle in which the calculation of the offset correction value is made, and the speed. The frequency deviation can be corrected in the next two cycles when the correction value is calculated.

상기 보정하는 단계는 통신의 홀수 사이클에서 상기 오프셋 보정 값과 상기 속도 보정 값을 모두 적용하여 클럭 편차와 주파수 편차를 보정하고, 통신의 짝수 사이클에서 상기 속도 보정 값을 적용하여 주파수 편차를 보정할 수 있다.In the correcting step, clock offset and frequency deviation may be corrected by applying both the offset correction value and the speed correction value in odd cycles of communication, and frequency deviation may be corrected by applying the speed correction value in even cycles of communication. have.

본 발명의 일 실시예에 따른 통신 클럭 동기화 장치는 복수의 전자 제어 장치들이 제1 전자 제어 장치(ECU)와 제2 전자 제어 장치로 통합된 시스템에서의 통신 클럭 동기화 장치에 있어서, 상기 제1 전자 제어 장치와 상기 제2 전자 제어 장치간 프레임의 송수신을 통해 관측된 도달 시간과 미리 결정된 도달 시간의 차이를 이용하여 클럭 편차를 측정하고, 동일 프레임에 대해 연속되는 두 사이클 각각에서 측정된 제1 클럭 편차와 제2 클럭 편차의 차이를 이용하여 주파수 편차를 측정하는 편차 측정부; 한 사이클 내의 프레임들 각각에 대한 클럭 편차를 이용하여 오프셋 보정 값을 계산하고, 두 사이클 내의 동일 프레임들 각각에 대한 주파수 편차를 이용하여 속도 보정 값을 계산하는 보정 값 계산부; 및 상기 계산된 상기 오프셋 보정 값과 상기 속도 보정 값을 반영하여 상기 제1 전자 제어 장치와 상기 제2 전자 제어 장치간 클럭 편차와 주파수 편차를 보정하는 편차 보정부를 포함한다.A communication clock synchronization device according to an embodiment of the present invention is a communication clock synchronization device in a system in which a plurality of electronic control devices are integrated into a first electronic control device (ECU) and a second electronic control device, wherein the first electronic A clock deviation is measured using a difference between an arrival time and a predetermined arrival time observed through transmission and reception of a frame between a control device and the second electronic control device, and the first clock measured in each of two successive cycles for the same frame Deviation measurement unit for measuring the frequency deviation using the difference between the deviation and the second clock deviation; A correction value calculation unit calculating an offset correction value using a clock deviation for each frame in one cycle, and a speed correction value using a frequency deviation for each of the same frames in two cycles; And a deviation correction unit that corrects clock deviation and frequency deviation between the first electronic control device and the second electronic control device by reflecting the calculated offset correction value and the speed correction value.

본 발명에 따르면, 통합 전자 제어 시스템에서 클럭 편차와 주파수 편차를 함께 보정하여 각 ECU 통신 클럭의 편차를 줄이고, 이를 통해 통신 클럭을 동기화시킴으로써, 통신 동기화를 통한 실시간성 확보할 수 있다.According to the present invention, in the integrated electronic control system, the clock deviation and the frequency deviation are corrected together to reduce the deviation of each ECU communication clock, thereby synchronizing the communication clock to ensure real-time performance through communication synchronization.

또한, 본 발명에 따르면 통합 전자 제어 시스템에서의 통신 클럭 동기화를 시킴으로써, 통합 전자 제어 시스템의 신뢰성을 향상시키고, 이를 통해 운전자 편의성을 향상시킬 수 있다.Further, according to the present invention, by synchronizing the communication clock in the integrated electronic control system, it is possible to improve the reliability of the integrated electronic control system, thereby improving driver convenience.

도 1은 외부 요인들에 의해 발생될 수 있는 클럭 편차에 대한 일 예들을 나타낸 것이다.
도 2는 오프셋 보정 방법(a)과 속도 보정 방법(b)에 대한 일 예시도를 나타낸 것이다.
도 3은 통합 전자 제어 시스템에 대한 일 실시예의 구성을 나타낸 것이다.
도 4는 통합 전자 제어 시스템 각각의 전자 제어 장치에 할당된 태스크의 일 예를 나타난 것이다.
도 5는 본 발명의 통신 클럭 동기화 방법에 대한 개념의 예시도를 나타낸 것이다.
도 6은 본 발명의 일 실시예에 따른 통신 클럭 동기화 방법에 대한 동작 흐름도를 나타낸 것이다.
도 7은 클럭 편차를 측정하는 방법에 대한 일 예시도를 나타낸 것이다.
도 8은 주파수 편차를 측정하는 방법에 대한 일 예시도를 나타낸 것이다.
도 9는 오프셋 보정 값과 속도 보정 값을 계산하는 과정에 대한 일 실시예의 동작 흐름도를 나타낸 것이다.
도 10은 오프셋 보정 값과 속도 보정 값을 적용한 일 예시도를 나타낸 것이다.
도 11은 본 발명의 일 실시예에 따른 통신 클럭 동기화 장치에 대한 구성을 나타낸 것이다.
1 shows examples of clock deviations that may be caused by external factors.
2 shows an exemplary diagram for the offset correction method (a) and the speed correction method (b).
3 shows the configuration of an embodiment of an integrated electronic control system.
4 shows an example of a task assigned to each electronic control device of the integrated electronic control system.
5 shows an exemplary diagram of a concept for a communication clock synchronization method of the present invention.
6 is a flowchart illustrating an operation of a method for synchronizing a communication clock according to an embodiment of the present invention.
7 shows an exemplary diagram for a method for measuring clock deviation.
8 shows an exemplary diagram for a method of measuring frequency deviation.
9 shows an operation flowchart of an embodiment of a process of calculating an offset correction value and a speed correction value.
10 shows an exemplary diagram to which an offset correction value and a speed correction value are applied.
11 illustrates a configuration of a communication clock synchronization device according to an embodiment of the present invention.

상기 목적 외에 본 발명의 다른 목적 및 특징들은 첨부 도면을 참조한 실시 예에 대한 설명을 통하여 명백히 드러나게 될 것이다.Other objects and features of the present invention in addition to the above object will be apparent through the description of the embodiment with reference to the accompanying drawings.

본 발명의 바람직한 실시예를 첨부된 도면들을 참조하여 상세히 설명한다. 본 발명을 설명함에 있어, 관련된 공지 구성 또는 기능에 대한 구체적인 설명이 본 발명의 요지를 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명은 생략한다.Preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. In describing the present invention, when it is determined that detailed descriptions of related known configurations or functions may obscure the subject matter of the present invention, detailed descriptions thereof will be omitted.

그러나, 본 발명이 실시예들에 의해 제한되거나 한정되는 것은 아니다. 각 도면에 제시된 동일한 참조 부호는 동일한 부재를 나타낸다.However, the present invention is not limited or limited by the embodiments. The same reference numerals in each drawing denote the same members.

이하에서는, 본 발명의 일 실시 예에 따른 통신 클럭 동기화 방법 및 그 장치를 첨부된 도 3 내지 도 11을 참조하여 상세히 설명한다.Hereinafter, a method and apparatus for synchronizing a communication clock according to an embodiment of the present invention will be described in detail with reference to FIGS. 3 to 11.

본 발명은 도 3에 도시된 통합 전자 제어 시스템에서의 통신 클럭 동기화에 대한 것으로, 통합 전자 제어 시스템(통합 ECU 시스템)은 기본적으로 BBW(Brake By Wire) 시스템, MDPS(motor driven power steering) 시스템, 에어백(Airbag) 시스템, ASB(Active Seatbelt) 시스템의 물리적인 통합과 소프트웨어 통합을 목표로 하는 시스템이다.The present invention relates to communication clock synchronization in the integrated electronic control system shown in FIG. 3, the integrated electronic control system (integrated ECU system) is basically a BBW (Brake By Wire) system, a motor driven power steering (MDPS) system, It is a system aimed at physical integration and software integration of the airbag system and the active seatbelt (ASB) system.

이 때, BBW 시스템은 브레이크 페달 입력 처리 Task, 제동력 산출 Task, 브레이크 작동 명령 Task를 수행하고, MDPS 시스템은 토크/조향각 센서 입력 처리 Task, 조향각 산출 Task, 조향모터구동 Task를 수행하고, 에어백 시스템은 외부 충돌 센서 입력 처리 Task, 에어백 전개 Task를 수행하고, ASB 시스템은 YAW 센서, G 센서 입력 처리 Task, 에어백 DC 모터 구동 Task를 수행할 수 있다.At this time, the BBW system performs the brake pedal input processing task, the braking force calculation task, and the brake operation command task, and the MDPS system performs the torque / steering angle sensor input processing task, the steering angle calculation task, and the steering motor driving task, and the airbag system The external collision sensor input processing task and the airbag deployment task are performed, and the ASB system can perform the YAW sensor, G sensor input processing task, and airbag DC motor driving task.

이런 통합 ECU 시스템은 도 3에 도시된 바와 같이, 4개의 ECU들은 통합 제1 ECU와 통합 제2 ECU의 2개의 ECU로 합치고, 통합 제1 ECU는 센서처리 및 연산을 담당하는 연산 ECU가 되며, 통합 제2 ECU는 구동을 담당하는 구동 ECU가 될 수 있다.As shown in FIG. 3, the integrated ECU system combines four ECUs into two ECUs, an integrated first ECU and an integrated second ECU, and the integrated first ECU becomes an operational ECU responsible for sensor processing and calculation, The integrated second ECU may be a driving ECU in charge of driving.

그리고, 연산 ECU와 구동 ECU는 4개의 시스템에서 담당하는 task를 나눠서 수행하게 되는데, 도 4에 도시된 바와 같이, 연산 ECU는 브레이크 페달 입력처리 task, 제동력 산출 task, 토크/조향각 센서 입력처리 task, 충돌센서 입력처리 task, YAW 센서 입력처리 task, G 센서 입력처리 task를 담당할 수 있고, 구동 ECU는 브레이크 작동 명령 task, 조향모터 구동 task, 에어백 전개 task, ASB DC모터 구동 task를 담당할 수 있다.And, the computational ECU and the driving ECU divide and perform tasks in charge of four systems. As shown in FIG. 4, the computational ECU has a brake pedal input processing task, a braking force calculation task, a torque / steering angle sensor input processing task, It can handle the collision sensor input processing task, YAW sensor input processing task, and G sensor input processing task, and the driving ECU can handle the brake operation command task, steering motor driving task, airbag deployment task, and ASB DC motor driving task. .

통합 ECU 구조의 특성 상, 연산 ECU에서 외부 입력 값 및 센서 처리와 연산을 담당하고 연산된 결과를 통신을 통해 구동 ECU에 전달하는 구조가 된다. 이 구조에서 중요한 것은 정확한 타이밍에 데이터 전송이 이루어지는 것으로, 데이터가 늦게 전달되는 경우, 구동 ECU에서 의도치 않은 동작이 발생할 수 있고, 브레이크와 조향, 에어백 등 안전과 긴밀한 관계를 가지는 시스템을 가진 통합 ECU 특성 상 큰 위험을 초래 할 수 있다.Due to the characteristics of the integrated ECU structure, it is in charge of processing and calculating external input values and sensors in the computational ECU, and delivers the calculated results to the driving ECU through communication. What is important in this structure is that the data is transmitted at the correct timing, and if the data is transmitted late, unintended operation may occur in the driving ECU, and the integrated ECU with a system that has a close relationship with safety such as brake, steering, and airbag Due to its characteristics, it can cause great danger.

본 발명은 이와 같은 문제점을 방지하기 위해 외부 요인들에 의해 발생할 수 있는 두 ECU 클럭을 보정하여 각 ECU 클럭의 편차를 줄일 수 있는 방안을 제안한다.The present invention proposes a method for reducing the deviation of each ECU clock by correcting two ECU clocks that may be caused by external factors to prevent such a problem.

통합 ECU에서 사용되는 통신은 TDMA 방식으로서 각 노드가 하나 이상의 타임 슬롯을 소유하게 되고 이 타임슬롯마다 할당된 일정한 데이터가 송신 또는 수신되는 통신 형태를 지닌다. 또한, 여러 개의 타임 슬롯이 모여 하나의 사이클을 이루며, 각 사이클은 동일한 타임 스롯을 반복한다. 즉, 각 사이클마다 일정한 시간에 동일한 데이터를 송신 또는 수신하게 된다.The communication used in the integrated ECU is a TDMA method, in which each node owns one or more time slots, and a constant data allocated for each time slot is transmitted or received. Also, several time slots are gathered to form one cycle, and each cycle repeats the same time slot. That is, the same data is transmitted or received at a constant time for each cycle.

본 발명은 통합 ECU 설계 컨셉에 따라 유선 통신에 적용될 수 있지만, 상황에 따라 무선 통신에 적용될 수도 있다.The present invention may be applied to wired communication according to the integrated ECU design concept, but may also be applied to wireless communication depending on the situation.

본 발명에 다른 통신 클럭 동기화 방안은 도 5에 도시된 일 예와 같이, 오프셋 보정법과 속도 보정법을 함께 적용하여 새로운 클럭 동기화 방법을 적용하는 것으로, 오프셋 보정법과 속도 보정법을 함께 적용하게 되면 시간이 지남에 따라(통신 사이클이 진행됨에 따라) 통신 클럭의 편차가 줄어들게 되어 기존의 방법들보다 두 ECU 통신 클럭의 동기화가 효율적으로 일어난다.Another communication clock synchronization method according to the present invention is to apply a new clock synchronization method by applying the offset correction method and the speed correction method together, as shown in the example shown in FIG. 5, when the offset correction method and the speed correction method are applied together, time Over this time (as the communication cycle progresses), the deviation of the communication clock is reduced, so that the synchronization of the two ECU communication clocks occurs more efficiently than the existing methods.

이런 본 발명에 대한 방안에 대해 도 6 내지 도 도 10을 참조하여 설명하면 다음과 같다.The method for the present invention will be described with reference to FIGS. 6 to 10 as follows.

도 6은 본 발명의 일 실시예에 따른 통신 클럭 동기화 방법에 대한 동작 흐름도를 나타낸 것으로, 통합 제1 ECU와 통합 제2 ECU의 통합 전자 제어 시스템에서의 통신 클럭 동기화 방법에 대한 것이다.6 is a flowchart illustrating an operation flowchart of a method for synchronizing communication clocks according to an embodiment of the present invention, and is a method for synchronizing communication clocks in an integrated electronic control system of an integrated first ECU and an integrated second ECU.

도 6을 참조하면, 본 발명에 따른 통신 클럭 동기화 방법은 통합 제1 ECU와 통합 제2 ECU의 클럭 편차와 주파수 편차를 측정한다(S610).Referring to Figure 6, the communication clock synchronization method according to the present invention measures the clock deviation and frequency deviation of the integrated first ECU and the integrated second ECU (S610).

통합 제1 ECU와 통합 제2 ECU의 클럭 편차는 프레임의 송수신을 통해 관측된 도달 시간과 미리 결정된 도달 시간(예를 들어, 예상 도달 시간)의 차이를 이용하여 측정될 수 있다.The clock deviation of the integrated first ECU and the integrated second ECU may be measured using a difference between an arrival time observed through transmission / reception of a frame and a predetermined arrival time (eg, an expected arrival time).

여기서, 프레임(Frame)은 주소와 필수적인 프로토콜 제어정보가 포함된 완전한 하나의 단위로서 네트워크 지점간에 전송되는 데이터를 의미한다.Here, the frame is a complete unit including an address and essential protocol control information, and means data transmitted between network points.

예컨대, 도 7에 도시된 바와 같이, 송신부(예를 들어, 제1 통합 ECU와 제2 통합 ECU 중 어느 하나)와 수신부(예를 들어, 제1 통합 ECU와 제2 통합 ECU 중 다른 하나)의 액션포인트(Action Point)는 고정된(또는 정해진) 스케줄링을 따름으로써, 각 ECU는 프레임이 액션포인트에서 정확하게 시작해야 한다는 것을 알고 있고, 실제 관측된 프레임의 시작 시점과 액션 포인트와의 편차를 측정함으로써, 클럭 편차를 측정할 수 있게 된다.For example, as shown in FIG. 7, the transmitting unit (for example, one of the first integrated ECU and the second integrated ECU) and the receiving unit (for example, the other of the first integrated ECU and the second integrated ECU) Action Point follows a fixed (or fixed) scheduling, each ECU knows that the frame should start exactly at the Action Point, and by measuring the deviation of the actual observed frame start time from the Action Point. , It is possible to measure the clock deviation.

이 때, 클럭 편차는 한 사이클 내의 프레임들 각각에 대해 측정될 수 있다.At this time, the clock deviation can be measured for each of the frames in one cycle.

그리고, 통합 제1 ECU와 통합 제2 ECU의 주파수 편차는 동일 프레임에 대해 연속되는 두 사이클 각각에서 측정된 제1 클럭 편차와 제2 클럭 편차의 차이를 이용하여 측정될 수 있다.And, the frequency deviation of the integrated first ECU and the integrated second ECU may be measured using the difference between the first clock deviation and the second clock deviation measured in each of two consecutive cycles for the same frame.

예컨대, 도 8에 도시된 바와 같이, 주파수 편차를 측정하기 위해서 2번의 측정이 필요하고, 연산 ECU에서 구동 ECU로 전송되는 동일한 프레임의 클럭 편차를 두 사이클(cycle n, cycle n+1) 각각에서 측정하며, cycle n에서 측정된 클럭 편차와 cycle n+1에서 측정된 클럭 편차 간의 편차 변화가 주파수 편차가 된다.For example, as shown in FIG. 8, two measurements are required to measure the frequency deviation, and the clock deviation of the same frame transmitted from the computation ECU to the driving ECU is performed in each of two cycles (cycle n, cycle n + 1). The frequency deviation is the variation in the deviation between the clock deviation measured in cycle n and the clock deviation measured in cycle n + 1.

이 때, 주파수 편차는 두 사이클 내의 동일 프레임들 각각에 대해 측정될 수 있다.At this time, the frequency deviation can be measured for each of the same frames in two cycles.

단계 S610에 의해 클럭 편차와 주파수 편차가 측정되면, 측정된 복수의 클럭 편차들과 복수의 주파수 편차들을 이용하여 오프셋 보정 값과 속도 보정 값을 계산한다(S620).When the clock deviation and the frequency deviation are measured by step S610, the offset correction value and the speed correction value are calculated using the measured plurality of clock deviations and the plurality of frequency deviations (S620).

단계 S620의 오프셋 보정 값과 속도 보정 값을 계산하는 과정에 대해 도 9를 참조하여 설명하면 다음과 같다.The process of calculating the offset correction value and the speed correction value in step S620 will be described with reference to FIG. 9 as follows.

단계 S610에 의해 측정된 측정값(X)을 크기 순으로 배열하고, 임의의 측정값이 가장 큰 값인지 판단한다(S910, S920).The measurement values X measured in step S610 are arranged in order of magnitude, and it is determined whether any measurement value is the largest value (S910, S920).

여기서, 오프셋 보정 값을 계산하기 위한 측정값들은 한 사이클 내에서 측정된 여러 프레임들의 수신값의 클럭 편차를 측정한 값을 의미하고, 속도 보정 값을 계산하기 위한 측정값들은 두 사이클에서 동일한 프레임의 주파수 편차를 여러 개의 프레임에 대해 측정한 값을 의미한다.Here, the measurement values for calculating the offset correction value refer to a value obtained by measuring the clock deviation of the received values of several frames measured within one cycle, and the measurement values for calculating the speed correction value of the same frame in two cycles It means the value of frequency deviation measured over several frames.

단계 S920 판단 결과, 임의의 측정값이 가장 큰 값일 경우 가장 큰 값 즉, 측정 값들 중 최대 값을 삭제하고, 나머지 측정값들 중 임의의 측정값이 가장 작은 값인지 판단한다(S930, S940).As a result of the determination of step S920, when an arbitrary measured value is the largest value, the largest value, that is, the maximum value among the measured values is deleted, and it is determined whether any of the remaining measured values is the smallest value (S930, S940).

여기서, 측정 값들의 개수에 따라 삭제되는 측정값의 개수가 상이할 수 있으며, 측정값들의 개수에 따른 삭제해야할 값의 개수는 아래 <표 1>과 같을 수 있다.Here, the number of measurement values to be deleted may be different according to the number of measurement values, and the number of values to be deleted according to the number of measurement values may be as shown in <Table 1> below.

Figure 112013108715796-pat00001
Figure 112013108715796-pat00001

단계 S940 판단 결과, 임의의 측정값이 가장 작은 값일 경우 가장 작은 값 즉, 측정값들 중 최소 값을 삭제한다(S950).As a result of the determination in step S940, if any measurement value is the smallest value, the smallest value, that is, the minimum value among the measurement values is deleted (S950).

단계 S910 내지 S950에 의해 측정 값들(클럭 편차들, 주파수 편차들) 중 최대값과 최소값이 삭제되면, 나머지 측정값들 중 최대값을 X1, 최소값을 X2로 결정하고, 최대값 X1과 최소값 X2의 평균값(Y)을 계산한다(S960, S970).When the maximum and minimum values of the measured values (clock deviations, frequency deviations) are deleted by steps S910 to S950, the maximum value X1 and the minimum value X2 among the remaining measurement values are determined, and the maximum value X1 and the minimum value X2 are The average value Y is calculated (S960, S970).

그리고, 계산된 평균값(Y)이 양수인지 음수인지 판단하고, 평균값(Y)이 양수인 경우에는 소수점 아래 값은 버리고 평균값(Y)이 음수인 경우에는 소수점 아래 값을 올림한다(S980 내지 S1000).Then, it is determined whether the calculated average value Y is positive or negative, and if the average value Y is positive, the value below the decimal point is discarded, and when the average value Y is negative, the value below the decimal point is raised (S980 to S1000).

단계 S990 또는 S1000에 의한 결과 값을 클럭 편차를 보정하기 위한 오프셋 보정 값과 주파수 편차를 보정하기 위한 속도 보정 값으로 계산한다(S1110).The result value obtained in step S990 or S1000 is calculated as an offset correction value for correcting clock deviation and a speed correction value for correcting frequency deviation (S1110).

즉, 클럭 편차들에 대한 도 9의 과정을 통해 계산된 보정 값을 오프셋 보정 값으로 계산하고, 주파수 편차?에 대한 도 9의 과정을 통해 계산된 보정 값을 속도 보정 값으로 계산한다.That is, a correction value calculated through the process of FIG. 9 for clock deviations is calculated as an offset correction value, and a correction value calculated through the process of FIG. 9 for frequency deviation? Is calculated as a speed correction value.

비록, 도 9에서 측정 값들 중 최대값과 최대값을 삭제하는 것으로 설명하였지만, 측정값들의 개수에 따라 최대값과 최소값을 삭제하지 않을 수도 있고, 최대값과 최소값 중 어느 하나만을 삭제할 수도 있다는 것을 인지하여야 한다.Although it has been described in FIG. 9 as deleting the maximum and maximum values among the measured values, it is recognized that the maximum and minimum values may not be deleted or only one of the maximum and minimum values may be deleted depending on the number of measured values. shall.

다시 도 6을 참조하여, 단계 S620에 의해 오프셋 보정 값과 속도 보정 값이 계산되면, 계산된 오프셋 보정 값과 속도 보정 값을 반영하여 클럭 편차와 주파수 편차를 보정한다(S630).Referring back to FIG. 6, when the offset correction value and the speed correction value are calculated by step S620, clock deviation and frequency deviation are corrected by reflecting the calculated offset correction value and speed correction value (S630).

이와 같은 과정에 의해 본 발명에 따른 통신 클럭 동기화 방법이 수행되는데, 본 발명에서 오프셋 보정 값의 계산은 통신의 홀수 사이클에서 이루어지게 되고 오프셋 보정 값은 계산된 홀수 사이클에서 바로 적용된다.The communication clock synchronization method according to the present invention is performed by such a process. In the present invention, the calculation of the offset correction value is performed in an odd cycle of communication, and the offset correction value is directly applied in the calculated odd cycle.

속도 보정 값의 계산은 두 사이클의 주파수 편차를 각 홀수 사이클마다 이루어지고, 속도 보정 값은 계산이 이루어진 홀수 사이클 다음부터 두 사이클 동안 적용된다.The calculation of the speed correction value is made for the frequency deviation of two cycles for each odd cycle, and the speed correction value is applied for two cycles from the odd cycle after the calculation is made.

짝수 사이클에서는 한 사이클을 이루는 클럭의 시간을 계산된 속도 보정 값에 따라 보정하게 되는데, 이 때, 한 사이클내의 일정 부분에서만 속도 보정을 실행하는 것이 아니라 속도 보정 값을 분산하여 적용한다.In even cycles, the time of the clock forming one cycle is corrected according to the calculated speed correction value. At this time, the speed correction value is distributed and applied instead of performing speed correction only in a certain portion within one cycle.

이 때, 한 사이클을 이루는 시간(TimePerCycle)은 속도 보정 값을 이용하여 다음과 같이 설정될 수 있다.At this time, the time to form one cycle (TimePerCycle) may be set as follows using the speed correction value.

TimePerCycle = 기존TimePerCycle + 속도보정시간TimePerCycle = Existing TimePerCycle + Speed Correction Time

즉, 새로운 사이클 타임은 기존 시간에 속도 보정 값을 더한 값이 된다.That is, the new cycle time becomes the value obtained by adding the speed correction value to the existing time.

홀수 사이클에서 마지막 일정 시간 동안 속도 보정과 오프셋 보정을 동시에 적용하게 되는데, 이러한 보정이 일어나기 전까지 홀수 사이클은 짝수 사이클과 동일하게 속도 보정만을 실행하게 된다.In the odd cycle, the speed correction and the offset correction are applied at the same time for the last fixed time. Until this correction occurs, the odd cycle performs only the speed correction as the even cycle.

홀수 사이클 중 속도 보정과 오프셋 보정이 동시에 일어나는 곳에서의 사이클 타임은 다음과 같이 변경될 수 있다.The cycle time at which the speed correction and the offset correction simultaneously occur during odd cycles can be changed as follows.

TimePerCycle = 기존 TimePerCycle + 속도보정시간 + 오프셋보정시간 - 오프셋 보정전까지 시간TimePerCycle = Existing TimePerCycle + Speed correction time + Offset correction time-Time before offset correction

즉, 새로운 TimePerCycle은 기존 시간에 속도보정시간, 오프셋보정시간을 더하고 하나의 사이클에서 오프셋 보정이 일어나기 전까지의 시간을 뺀 시간이 된다.That is, the new TimePerCycle is the time of adding the speed correction time and the offset correction time to the existing time and subtracting the time until offset correction occurs in one cycle.

모든 사이클에서 보정은 계산된 TimePerCycle을 분산해서 적용하게 되고 도 10에 도시된 바와 같이, 짝수 사이클(cycle 0, cycle 2, cycle 4 등)에서는 속도 보정만이 이루어지고, 홀수 사이클(cycle 1, cycle 3 등)에서는 속도 보정과 오프셋 보정이 모두 이루어진다.In all cycles, the correction is applied by distributing the calculated TimePerCycle. As shown in FIG. 10, only the speed correction is performed in even cycles (cycle 0, cycle 2, cycle 4, etc.), and odd cycles (cycle 1, cycle) 3, etc.), both speed correction and offset correction are performed.

예를 들어, 한 사이클의 총 시간이 1000[us]이고, 속도 보정 값이 10[us], 오프셋 보정 값이 -3[us]라고 가정하면, 속도 보정 값을 분산해서 적용한 짝수 사이클의 시간은 1010[us]가 되고, 속도 보정 값과 오프셋 보정 값을 분산해서 적용한 홀수 사이클의 시간은 1007[us]가 된다.For example, assuming that the total time of one cycle is 1000 [us], the speed correction value is 10 [us], and the offset correction value is -3 [us], the time of the even cycle applied by distributing the speed correction value is It becomes 1010 [us], and the time of the odd cycle applied by dispersing the speed correction value and the offset correction value becomes 1007 [us].

이와 같이, 본 발명에 따른 통신 클럭 동기화 방법은 클럭 동기화를 이루어 주는 기능을 소프트웨어적으로나 하드웨어적으로 구현하여 통합 ECU의 연산/구동 ECU간 통신에 적용하게 되면, 연산 ECU에서 센서값을 읽고 연산된 결과값들을 구동 ECU에 실시간으로 적용하여 통신 지연에 의한 오동작을 막고 안전한 조향/제동/에어백/시트벨트 성능을 얻을 수 있다.As described above, in the communication clock synchronization method according to the present invention, when a function for performing clock synchronization is implemented in software or hardware to be applied to the communication between the calculation / driving ECUs of the integrated ECU, the sensor value is read and calculated by the calculation ECU. By applying the results to the driving ECU in real time, it is possible to prevent malfunction due to communication delay and to obtain safe steering / braking / airbag / seat belt performance.

또한, 본 발명은 각 시스템이 두 개의 ECU로 나누어져 동작하게 되는 통합 ECU에서 클럭 동기화의 효율을 높여주기 때문에 제품 기능을 향상시킬 수 있으며, 따라서, 제품에 대한 신뢰성을 향상시킬 수 있다.In addition, the present invention can improve the function of the product because it improves the efficiency of clock synchronization in an integrated ECU in which each system is divided into two ECUs and operates, and thus, reliability of the product can be improved.

도 11은 본 발명의 일 실시예에 따른 통신 클럭 동기화 장치에 대한 구성을 나타낸 것으로, 통합 제1 ECU와 통합 제2 ECU의 통합 전자 제어 시스템에서의 통신 클럭 동기화 장치에 대한 것이며, 도 6 내지 도 10에서 설명한 통신 클럭 동기화 방법의 내용을 모두 포함할 수 있다.11 shows a configuration of a communication clock synchronization device according to an embodiment of the present invention, and relates to a communication clock synchronization device in an integrated electronic control system of an integrated first ECU and an integrated second ECU, FIGS. All the contents of the communication clock synchronization method described in 10 may be included.

도 11을 참조하면, 본 발명에 따른 통신 클럭 동기화 장치(1100)는 편차 측정부(1110), 보정 값 계산부(1120) 및 편차 보정부(1130)를 포함한다.Referring to FIG. 11, the communication clock synchronization device 1100 according to the present invention includes a deviation measurement unit 1110, a correction value calculation unit 1120, and a deviation correction unit 1130.

편차 측정부(1110)는 통합 제1 ECU와 통합 제2 ECU의 클럭 편차와 주파수 편차를 측정한다.The deviation measuring unit 1110 measures clock deviation and frequency deviation of the integrated first ECU and the integrated second ECU.

이 때, 편차 측정부(1110)는 프레임의 송수신을 통해 관측된 도달 시간과 미리 결정된 도달 시간(예를 들어, 예상 도달 시간)의 차이를 이용하여 통합 제1 ECU와 통합 제2 ECU의 클럭 편차를 측정할 수 있고, 동일 프레임에 대해 연속되는 두 사이클 각각에서 측정된 제1 클럭 편차와 제2 클럭 편차의 차이를 이용하여 통합 제1 ECU와 통합 제2 ECU의 주파수 편차를 측정할 수 있다.At this time, the deviation measurement unit 1110 uses the difference between the arrival time observed through the transmission and reception of a frame and a predetermined arrival time (for example, an expected arrival time) to determine the clock deviation of the integrated first ECU and the integrated second ECU. Can measure the frequency deviation of the integrated first ECU and the integrated second ECU using the difference between the first clock deviation and the second clock deviation measured in each of two consecutive cycles for the same frame.

편차 측정부(1110)는 한 사이클 내의 프레임들 각각에 대해 클럭 편차를 측정하고, 두 사이클 내의 동일 프레임들 각각에 대해 주파수 편차를 측정한다.The deviation measurement unit 1110 measures clock deviation for each frame in one cycle, and frequency deviation for each of the same frames in two cycles.

보정 값 계산부(1120)는 측정된 클럭 편차들을 이용하여 오프셋 보정 값을 계산하고, 주파수 편차들을 이용하여 속도 보정 값을 계산한다.The correction value calculating unit 1120 calculates an offset correction value using the measured clock deviations, and a speed correction value using the frequency deviations.

이 때, 보정 값 계산부(1120)는 측정값들 중 최대값과 최소값을 삭제하고, 나머지 측정값들 중 최대값과 최소값의 평균값을 이용하여 오프셋 보정 값과 속도 보정 값을 계산할 수 있는데, 평균값이 양수인 경우에는 소수점 아래 값은 버리고 평균값이 음수인 경우에는 소수점 아래 값을 올림으로써, 오프셋 보정 값과 속도 보정 값을 계산할 수 있다.At this time, the correction value calculating unit 1120 may delete the maximum value and the minimum value among the measured values, and calculate the offset correction value and the speed correction value using the average value of the maximum value and the minimum value among the remaining measured values. In the case of this positive number, the offset correction value and the speed correction value can be calculated by discarding the value under the decimal point and increasing the value under the decimal point when the average value is negative.

그리고, 보정 값 계산부(1120)는 측정값들의 개수에 따라 미리 결정된 삭제해야할 값의 개수를 반영함으로써, 최고값 또는 최소값을 삭제하거나 삭제하지 않을 수도 있다.In addition, the correction value calculator 1120 may or may not delete or delete the highest or minimum value by reflecting a predetermined number of values to be deleted according to the number of measured values.

보정 값 계산부(1120)는 통신의 홀수 사이클에서 오프셋 보정 값과 속도 보정 값을 계산할 수 있다.The correction value calculator 1120 may calculate an offset correction value and a speed correction value in odd cycles of communication.

편차 보정부(1130)는 계산된 오프셋 보정 값과 속도 보정 값을 반영하여 통합 제1 ECU와 통합 제2 ECU간 클럭 편차와 주파수 편차를 보정한다.The deviation correction unit 1130 corrects the clock deviation and frequency deviation between the integrated first ECU and the integrated second ECU by reflecting the calculated offset correction value and speed correction value.

이 때, 편차 보정부(1130)는 오프셋 보정 값을 계산된 홀수 사이클에서 바로 적용함으로써, 클럭 편차를 보정할 수 있고, 계산이 이루어진 홀수 사이클 다음부터 두 사이클 동안 속도 보정 값을 적용함으로써, 주파수 편차를 보정할 수 있다.At this time, the deviation correction unit 1130 can correct the clock deviation by applying the offset correction value directly in the calculated odd cycle, and by applying the speed correction value for two cycles after the calculated odd cycle, frequency deviation Can be corrected.

즉, 편차 보정부(1130)는 통신의 홀수 사이클에서 계산된 오프셋 보정 값과 속도 보정 값을 모두 적용하여 클럭 편차와 주파수 편차를 보정하고, 통신의 짝수 사이클에서 속도 보정 값만을 적용하여 주파수 편차를 보정한다.That is, the deviation correction unit 1130 corrects the clock deviation and the frequency deviation by applying both the offset correction value and the speed correction value calculated in the odd cycle of communication, and applies the speed correction value only in the even cycle of communication to adjust the frequency deviation. Correct.

이상과 같이 본 발명에서는 구체적인 구성 요소 등과 같은 특정 사항들과 한정된 실시예 및 도면에 의해 설명되었으나 이는 본 발명의 보다 전반적인 이해를 돕기 위해서 제공된 것일 뿐, 본 발명은 상기의 실시예에 한정되는 것은 아니며, 본 발명이 속하는 분야에서 통상적인 지식을 가진 자라면 이러한 기재로부터 다양한 수정 및 변형이 가능하다.As described above, the present invention has been described by specific matters such as specific components and limited embodiments and drawings, but is provided to help a more comprehensive understanding of the present invention, and the present invention is not limited to the above embodiments , Anyone having ordinary knowledge in the field to which the present invention pertains can make various modifications and variations from these descriptions.

따라서, 본 발명의 사상은 설명된 실시예에 국한되어 정해져서는 아니 되며, 후술하는 특허청구범위뿐 아니라 이 특허청구범위와 균등하거나 등가적 변형이 있는 모든 것들은 본 발명 사상의 범주에 속한다고 할 것이다.Therefore, the spirit of the present invention should not be limited to the described embodiments, and should not be determined, and all claims that are equivalent to or equivalent to the scope of the claims as well as the claims described below belong to the scope of the spirit of the present invention. .

Claims (9)

복수의 전자 제어 장치들이 제1 전자 제어 장치(ECU)와 제2 전자 제어 장치로 통합된 시스템에서의 통신 클럭 동기화 방법에 있어서,
상기 제1 전자 제어 장치와 상기 제2 전자 제어 장치간 프레임의 송수신을 통해 관측된 도달 시간과 미리 결정된 도달 시간의 차이를 이용하여 클럭 편차를 측정하고, 동일 프레임에 대해 연속되는 두 사이클 각각에서 측정된 제1 클럭 편차와 제2 클럭 편차의 차이를 이용하여 주파수 편차를 측정하는 단계;
한 사이클 내의 프레임들 각각에 대한 클럭 편차를 이용하여 오프셋 보정 값을 계산하는 단계;
두 사이클 내의 동일 프레임들 각각에 대한 주파수 편차를 이용하여 속도 보정 값을 계산하는 단계; 및
상기 계산된 상기 오프셋 보정 값과 상기 속도 보정 값을 반영하여 상기 제1 전자 제어 장치와 상기 제2 전자 제어 장치간 클럭 편차와 주파수 편차를 보정하는 단계를 포함하며,
상기 오프셋 보정 값을 계산하는 단계와 상기 속도 보정 값을 계산하는 단계는,
통신의 홀수 사이클에서 이루어지고,
상기 보정하는 단계는,
상기 오프셋 보정 값의 계산이 이루어진 해당 사이클에서 클럭 편차를 보정하고, 상기 속도 보정 값의 계산이 이루어진 그 다음 두 사이클에서 주파수 편차를 보정하는 것을 특징으로 하는 통신 클럭 동기화 방법.
A method for synchronizing communication clocks in a system in which a plurality of electronic control devices are integrated into a first electronic control device (ECU) and a second electronic control device,
Clock deviation is measured using a difference between an arrival time and a predetermined arrival time observed through transmission and reception of a frame between the first electronic control device and the second electronic control device, and is measured in each of two successive cycles for the same frame. Measuring a frequency deviation using the difference between the first clock deviation and the second clock deviation;
Calculating an offset correction value using a clock deviation for each frame in one cycle;
Calculating a speed correction value using frequency deviation for each of the same frames in two cycles; And
Comprising the step of correcting the clock deviation and the frequency deviation between the first electronic control device and the second electronic control device by reflecting the calculated offset correction value and the speed correction value,
The step of calculating the offset correction value and the step of calculating the speed correction value include:
In an odd cycle of communication,
The correction step,
A communication clock synchronization method comprising correcting a clock deviation in a cycle in which the offset correction value is calculated and correcting a frequency deviation in the next two cycles in which the speed correction value is calculated.
제1항에 있어서,
상기 오프셋 보정 값을 계산하는 단계는
상기 한 사이클 내의 프레임들 각각에 대해 측정된 클럭 편차들 중 최고 값과 최저 값의 평균 값을 이용하여 상기 오프셋 보정 값을 계산하고,
상기 속도 보정 값을 계산하는 단계는
상기 두 사이클 내의 동일 프레임들 각각에 대해 측정된 주파수 편차들 중 최고 값과 최저 값의 평균 값을 이용하여 상기 속도 보정 값을 계산하는 것을 특징으로 하는 통신 클럭 동기화 방법.
According to claim 1,
The step of calculating the offset correction value
The offset correction value is calculated by using the average value of the highest value and the lowest value among clock deviations measured for each of the frames within one cycle,
The step of calculating the speed correction value is
And calculating the speed correction value using an average value of a highest value and a lowest value among frequency deviations measured for each of the same frames in the two cycles.
제2항에 있어서,
상기 오프셋 보정 값을 계산하는 단계는
상기 측정된 클럭 편차들의 개수에 따라 미리 설정된 개수의 클럭 편차를 제외한 나머지 클럭 편차들 중 최고 값과 최저 값의 평균 값을 이용하여 상기 오프셋 보정 값을 계산하고,
상기 속도 보정 값을 계산하는 단계는
상기 측정된 주파수 편차들의 개수에 따라 미리 설정된 개수의 주파수 편차를 제외한 나머지 주파수 편차들 중 최고 값과 최저 값의 평균 값을 이용하여 상기 속도 보정 값을 계산하는 것을 특징으로 하는 통신 클럭 동기화 방법.
According to claim 2,
The step of calculating the offset correction value
The offset correction value is calculated using the average value of the highest value and the lowest value among the remaining clock deviations excluding the preset number of clock deviations according to the measured number of clock deviations,
The step of calculating the speed correction value is
A communication clock synchronization method characterized in that the speed correction value is calculated using the average value of the highest and lowest values among the remaining frequency deviations except for the preset number of frequency deviations according to the measured number of frequency deviations.
삭제delete 제1항에 있어서,
상기 보정하는 단계는
통신의 홀수 사이클에서 상기 오프셋 보정 값과 상기 속도 보정 값을 모두 적용하여 클럭 편차와 주파수 편차를 보정하고, 통신의 짝수 사이클에서 상기 속도 보정 값을 적용하여 주파수 편차를 보정하는 것을 특징으로 하는 통신 클럭 동기화 방법.
According to claim 1,
The correction step
A communication clock characterized in that clock offset and frequency deviation are corrected by applying both the offset correction value and the speed correction value in odd cycles of communication, and frequency deviation is corrected by applying the speed correction value in even cycles of communication. Synchronization method.
복수의 전자 제어 장치들이 제1 전자 제어 장치(ECU)와 제2 전자 제어 장치로 통합된 시스템에서의 통신 클럭 동기화 장치에 있어서,
상기 제1 전자 제어 장치와 상기 제2 전자 제어 장치간 프레임의 송수신을 통해 관측된 도달 시간과 미리 결정된 도달 시간의 차이를 이용하여 클럭 편차를 측정하고, 동일 프레임에 대해 연속되는 두 사이클 각각에서 측정된 제1 클럭 편차와 제2 클럭 편차의 차이를 이용하여 주파수 편차를 측정하는 편차 측정부;
한 사이클 내의 프레임들 각각에 대한 클럭 편차를 이용하여 오프셋 보정 값을 계산하고, 두 사이클 내의 동일 프레임들 각각에 대한 주파수 편차를 이용하여 속도 보정 값을 계산하는 보정 값 계산부; 및
상기 계산된 상기 오프셋 보정 값과 상기 속도 보정 값을 반영하여 상기 제1 전자 제어 장치와 상기 제2 전자 제어 장치간 클럭 편차와 주파수 편차를 보정하는 편차 보정부를 포함하며,
상기 보정 값 계산부는,
상기 오프셋 보정 값과 상기 속도 보정 값을 통신의 홀수 사이클에서 계산하고,
상기 편차 보정부는,
상기 오프셋 보정 값의 계산이 이루어진 해당 사이클에서 클럭 편차를 보정하고, 상기 속도 보정 값의 계산이 이루어진 그 다음 두 사이클에서 주파수 편차를 보정하는 것을 특징으로 하는 통신 클럭 동기화 장치.
A communication clock synchronization device in a system in which a plurality of electronic control devices are integrated into a first electronic control device (ECU) and a second electronic control device,
Clock deviation is measured using a difference between an arrival time and a predetermined arrival time observed through transmission and reception of a frame between the first electronic control device and the second electronic control device, and is measured in each of two successive cycles for the same frame. A deviation measuring unit measuring a frequency deviation using the difference between the first clock deviation and the second clock deviation;
A correction value calculation unit calculating an offset correction value using a clock deviation for each frame in one cycle, and a speed correction value using a frequency deviation for each of the same frames in two cycles; And
And a deviation correction unit for correcting clock deviation and frequency deviation between the first electronic control device and the second electronic control device by reflecting the calculated offset correction value and the speed correction value,
The correction value calculation unit,
The offset correction value and the speed correction value are calculated in an odd cycle of communication,
The deviation correction unit,
Communication clock synchronization device, characterized in that for correcting the clock deviation in the cycle in which the calculation of the offset correction value, and the frequency deviation in the next two cycles in which the calculation of the speed correction value is made.
제6항에 있어서,
상기 보정 값 계산부는
상기 한 사이클 내의 프레임들 각각에 대해 측정된 클럭 편차들 중 최고 값과 최저 값의 평균 값을 이용하여 상기 오프셋 보정 값을 계산하고, 상기 두 사이클 내의 동일 프레임들 각각에 대해 측정된 주파수 편차들 중 최고 값과 최저 값의 평균 값을 이용하여 상기 속도 보정 값을 계산하는 것을 특징으로 하는 통신 클럭 동기화 장치.
The method of claim 6,
The correction value calculation unit
Of the clock deviations measured for each of the frames in the cycle, the offset correction value is calculated using the average value of the highest and lowest values, and among the frequency deviations measured for each of the same frames in the two cycles Communication clock synchronization device, characterized in that for calculating the speed correction value using the average value of the highest and lowest values.
제7항에 있어서,
상기 보정 값 계산부는
상기 측정된 클럭 편차들의 개수에 따라 미리 설정된 개수의 클럭 편차를 제외한 나머지 클럭 편차들 중 최고 값과 최저 값의 평균 값을 이용하여 상기 오프셋 보정 값을 계산하고, 상기 측정된 주파수 편차들의 개수에 따라 미리 설정된 개수의 주파수 편차를 제외한 나머지 주파수 편차들 중 최고 값과 최저 값의 평균 값을 이용하여 상기 속도 보정 값을 계산하는 것을 특징으로 하는 통신 클럭 동기화 장치.
The method of claim 7,
The correction value calculation unit
The offset correction value is calculated using the average value of the highest value and the lowest value among the remaining clock deviations excluding the preset number of clock deviations according to the number of measured clock deviations, and according to the number of the measured frequency deviations. Communication clock synchronization device, characterized in that for calculating the speed correction value using the average value of the highest value and the lowest value among the remaining frequency deviations except for a preset number of frequency deviations.
제6항에 있어서,
상기 편차 보정부는
통신의 홀수 사이클에서 상기 오프셋 보정 값과 상기 속도 보정 값을 모두 적용하여 클럭 편차와 주파수 편차를 보정하고, 통신의 짝수 사이클에서 상기 속도 보정 값을 적용하여 주파수 편차를 보정하는 것을 특징으로 하는 통신 클럭 동기화 장치.
The method of claim 6,
The deviation correction unit
A communication clock characterized in that clock offset and frequency deviation are corrected by applying both the offset correction value and the speed correction value in odd cycles of communication, and frequency deviation is corrected by applying the speed correction value in even cycles of communication. Synchronization device.
KR1020130145905A 2013-11-28 2013-11-28 Method for synchronizing communication clocks and apparatus thereof KR102097386B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020130145905A KR102097386B1 (en) 2013-11-28 2013-11-28 Method for synchronizing communication clocks and apparatus thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020130145905A KR102097386B1 (en) 2013-11-28 2013-11-28 Method for synchronizing communication clocks and apparatus thereof

Publications (2)

Publication Number Publication Date
KR20150061779A KR20150061779A (en) 2015-06-05
KR102097386B1 true KR102097386B1 (en) 2020-04-06

Family

ID=53499737

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020130145905A KR102097386B1 (en) 2013-11-28 2013-11-28 Method for synchronizing communication clocks and apparatus thereof

Country Status (1)

Country Link
KR (1) KR102097386B1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102016219663B4 (en) 2016-10-11 2018-08-02 Conti Temic Microelectronic Gmbh Method for monitoring a network for anomalies
US10802037B2 (en) * 2018-12-14 2020-10-13 Semiconductor Components Industries, Llc Methods and systems for motor control

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1355459A2 (en) 2002-04-16 2003-10-22 ROBERT BOSCH GmbH Method for synchronizing clocks in a distributed communication system
JP2004536538A (en) * 2001-07-26 2004-12-02 モトローラ・インコーポレイテッド Clock synchronization for distributed systems
JP2010074211A (en) * 2008-09-16 2010-04-02 Nec Commun Syst Ltd Clock synchronization circuit, electronic control unit, onboard network system and clock synchronization method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3428191B2 (en) * 1994-12-26 2003-07-22 株式会社デンソー Data communication method, transmitting device, and receiving device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004536538A (en) * 2001-07-26 2004-12-02 モトローラ・インコーポレイテッド Clock synchronization for distributed systems
EP1355459A2 (en) 2002-04-16 2003-10-22 ROBERT BOSCH GmbH Method for synchronizing clocks in a distributed communication system
JP2010074211A (en) * 2008-09-16 2010-04-02 Nec Commun Syst Ltd Clock synchronization circuit, electronic control unit, onboard network system and clock synchronization method

Also Published As

Publication number Publication date
KR20150061779A (en) 2015-06-05

Similar Documents

Publication Publication Date Title
US9331838B2 (en) Method for synchronizing clocks in nodes of a vehicle network and node designed to perform the method
KR102181029B1 (en) Synchronization mechanism for high speed sensor interface
JP4261500B2 (en) Control system
US10491530B2 (en) Communication system and communication device
US9167545B2 (en) Receiver, method of calculating time difference, and program
JP2007060400A (en) Method and system for controlling communication timing
CN110050419B (en) System and method for synchronizing processor operations across a communication network
JP2011109452A (en) In-vehicle communication system
KR101636496B1 (en) Signal synchronization system, node synchronization system, signal synchronization method, and node synchronization method
KR102097386B1 (en) Method for synchronizing communication clocks and apparatus thereof
US20200382233A1 (en) Information processing apparatus and time synchronization method
JP6614403B1 (en) COMMUNICATION DEVICE, COMMUNICATION SYSTEM, AND SYNCHRONIZATION CONTROL METHOD
JP2007050812A (en) Load control system, communication control unit and load control method
JP4487522B2 (en) Motor drive device
US10142934B2 (en) Wireless communication apparatus and communication system
KR101669397B1 (en) Distance measurement device and distance measurement method
JP5423573B2 (en) Signal processing device
CN107229543B (en) Semiconductor device with a plurality of semiconductor chips
JP2007243747A (en) Transmission timing setting method of on-vehicle lan and electronic control unit
JP5594416B1 (en) Electronic control unit
EP3814868B1 (en) Precision timing between systems
JP2011234212A (en) Task control device
JP2023110410A (en) Communication system, communication method, and program
JP2009541889A (en) How data is processed
CN116938374A (en) Time synchronization method, device, equipment, storage medium and vehicle

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant