KR20190074026A - Synchronization method and system among multiple MCUs in EtherCAT-based slave system - Google Patents

Synchronization method and system among multiple MCUs in EtherCAT-based slave system Download PDF

Info

Publication number
KR20190074026A
KR20190074026A KR1020170175363A KR20170175363A KR20190074026A KR 20190074026 A KR20190074026 A KR 20190074026A KR 1020170175363 A KR1020170175363 A KR 1020170175363A KR 20170175363 A KR20170175363 A KR 20170175363A KR 20190074026 A KR20190074026 A KR 20190074026A
Authority
KR
South Korea
Prior art keywords
time
mcu
network
origin
control mcu
Prior art date
Application number
KR1020170175363A
Other languages
Korean (ko)
Other versions
KR102291573B1 (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 KR1020170175363A priority Critical patent/KR102291573B1/en
Publication of KR20190074026A publication Critical patent/KR20190074026A/en
Application granted granted Critical
Publication of KR102291573B1 publication Critical patent/KR102291573B1/en

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • G05B19/0421Multiprocessor system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/16Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs
    • G06F15/163Interprocessor communication
    • G06F15/173Interprocessor communication using an interconnection network, e.g. matrix, shuffle, pyramid, star, snowflake
    • G06F15/17306Intercommunication techniques
    • G06F15/17325Synchronisation; Hardware support therefor
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/25Pc structure of the system
    • G05B2219/25126Synchronize communication based on internal clock of microprocessor
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/25Pc structure of the system
    • G05B2219/25474Synchronize microprocessor with process or I-O

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Theoretical Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

Disclosed in the present invention are a synchronization method among multiple micro-processors included in an EtherCAT-based slave system, and a system thereof. According to the present invention, for synchronization between a network MCU and a control MCU included in an EtherCAT-based slave system, the control MCU calculates a clock error rate between the network MCU and the control MCU, and, by using the error rate, estimates a current time of the network MCU, before transmitting the current time estimation value of the network MCU to the network MCU. Then, the network MCU calculates the difference between the estimation value received by the control MCU and an actual current time of the network MCU to transmit a result to the control MCU, whereupon the control MCU performs synchronization with the network MCU by adjusting a clock speed of the control MCU to be faster or slower corresponding to the difference between the current time estimation value of the network MCU and the actual current time thereof. Therefore, by performing synchronization among a plurality of MCUs in the EtherCAT-based slave system, delay in processing time can be prevented, thereby enabling effective system management.

Description

이더캣 기반의 슬레이브 시스템에 포함된 복수의 마이크로 프로세서간 동기화 방법 및 시스템{Synchronization method and system among multiple MCUs in EtherCAT-based slave system}[0001] The present invention relates to a synchronization method and system for a plurality of microprocessors included in an Ethernet-based slave system,

본 발명은 마이크로 프로세서 간의 동기화 방법 및 시스템에 관한 것으로서, 보다 구체적으로는 이더캣 기반의 AC 서보 모터와 같은, 이더캣 기반의 슬레이브 시스템에 포함된 복수의 마이크로 프로세서간 동기화 방법 및 시스템에 관한 것이다.The present invention relates to a method and system for synchronizing microprocessors, and more particularly, to a method and system for synchronizing a plurality of microprocessors included in an Ethercat-based slave system, such as an Ethernet-based AC servo motor.

고속 다축 가공기와 같이 정밀 고속 제어를 목적으로 하는 시스템에서는 다수의 AC 서보 모터와 스핀들 모터 등의 고속 엑추에이터를 연결하기 위하여 ethernet을 기반으로 하는 산업용 네트워크의 적용이 늘어나고 있다. 특히, EtherCAT은 고속 산업용 응용을 위하여 개발된 ethernet 기반 산업용 네트워크 중 하나로 높은 수준의 동기화 성능을 보유하고 있다. In a system aiming at high-speed and high-speed control such as a high-speed multi-axis processing machine, the application of an ethernet-based industrial network is increasing in order to connect high-speed actuators such as a plurality of AC servomotors and spindle motors. In particular, EtherCAT is one of the ethernet-based industrial networks developed for high-speed industrial applications and has a high level of synchronization performance.

하지만, 고속 정밀 제어를 목표로 설계된 AC 서보 모터 드라이버는 매우 짧은 주기로 제어 명령을 수행하는데, 네트워크의 처리를 위한 지연 시간이 제어 성능에 영향을 미칠 수 있다. 이러한 문제를 예방하기 위하여, 최근에는 네트워크를 처리하기 위한 MCU와 서보 모터 제어를 수행하기 위한 MCU를 하나의 제어 시스템에 통합하여 설계하는 multi processor 구조가 하나의 대안으로 이용된다. However, the AC servomotor driver designed for high-speed precise control performs control commands in a very short period, and the delay time for the processing of the network may affect the control performance. In order to prevent such a problem, a multi-processor architecture that integrates an MCU for processing a network and an MCU for controlling a servo motor into a single control system is used as an alternative.

이러한 종래 기술에 따른 고속 서보 모터 제어기의 경우, 네트워크 성능을 향상시키기 위한 네트워크 MCU와 모터 제어를 담당하는 MCU 사이를 공유 메모리 등으로 연결하여 구성하는데, 네트워크 MCU는 네트워크를 통해 기준 시간과 동기화를 수행하는 경우가 많지만 모터를 제어하는 MCU는 이러한 동기화 기능이 제공되지 않았다.In the high-speed servo motor controller according to the related art, a network MCU for improving network performance and an MCU for controlling the motor are connected by a shared memory or the like. The network MCU synchronizes with the reference time through the network MCUs that control motors have not been provided with this synchronization function.

그러나, 이러한 multi processor 구조에서는 각각의 MCU가 주기 제어를 수행하면서 서로의 연산에 대한 지연으로 인하여 메시지의 처리에 지연이 발생할 수 있으며, 이로 인하여 고속으로 동기화되는 네트워크의 장점을 활용하기 어려운 문제가 발생한다. However, in such a multi-processor architecture, each MCU performs periodic control, and delays in the processing of the messages may occur due to delays in the operations of the respective MCUs. As a result, it is difficult to utilize the advantages of the network synchronized at high speed do.

따라서, EtherCAT 네트워크에 연결된 서보 모터의 성능을 향상시키기 위해서, 서보 모터에 포함된 네트워크 MCU와 모터 제어용 MCU 사이의 동기화 방법이 요구되는 실정이다.Therefore, in order to improve the performance of the servo motor connected to the EtherCAT network, a synchronization method between the network MCU included in the servo motor and the MCU for motor control is required.

본 발명이 해결하고자 하는 과제는 이더캣 기반의 슬레이브 시스템에 포함된 복수의 마이크로 프로세서간 동기화 방법 및 시스템을 제공하는 것이다.SUMMARY OF THE INVENTION It is an object of the present invention to provide a method and system for synchronizing a plurality of microprocessors included in an EtherCAT-based slave system.

상술한 과제를 해결하기 위한 본 발명의 바람직한 실시예에 따른 동기화 방법은, 이더캣 기반의 슬레이브 시스템에 포함된 네트워크 MCU와 콘트롤 MCU간 동기화 방법으로서, (a) 상기 콘트롤 MCU가 상기 네트워크 MCU의 두 시점간의 시간차와, 상기 콘트롤 MCU의 두 시점간의 시간차를 이용하여, 상기 콘트롤 MCU와 상기 네트워크 MCU의 클록간 오차율을 계산하는 초기화 단계; (b) 상기 콘트롤 MCU가 일정한 시간 주기로, 상기 오차율을 이용하여 상기 네트워크 MCU의 현재 시간을 예측한 현재 시간 예측치(

Figure pat00001
)를 상기 네트워크 MCU로 전송하는 단계; (c) 상기 네트워크 MCU가 상기 현재 시간 예측치(
Figure pat00002
)와 자신의 실제 현재 시간(
Figure pat00003
)간의 시간차(
Figure pat00004
)를 계산하여 상기 콘트롤 MCU로 전송하는 단계; 및 (d) 상기 콘트롤 MCU가 상기 시간차(
Figure pat00005
)를 수신하고, 수신된 시간차(
Figure pat00006
)에 따라서 상기 콘트롤 MCU 내부의 클록 속도를 조절하여 동기화를 수행하는 단계를 포함한다.According to another aspect of the present invention, there is provided a synchronization method between a network MCU and a control MCU included in an Ethernet-based slave system, the method comprising the steps of: (a) An initialization step of calculating an error rate between clocks of the control MCU and the network MCU by using a time difference between time points and a time difference between two points of time of the control MCU; (b) a current time predicted value obtained by predicting the current time of the network MCU using the error rate at a predetermined time period by the control MCU
Figure pat00001
) To the network MCU; (c) if the network MCU receives the current time estimate
Figure pat00002
) And their actual current time (
Figure pat00003
)
Figure pat00004
) To the control MCU; And (d)
Figure pat00005
), And receives the received time difference (
Figure pat00006
And adjusting the clock speed in the control MCU according to the control signal.

또한, 상기 (a) 단계는, 상기 네트워크 MCU가 자신의 초기 시간(torigin) 및 시작 시간(tstart)을 각각 상기 콘트롤 MCU로 전송하면, 상기 콘트롤 MCU가 상기 초기 시간(torigin) 및 상기 시작 시간(tstart)간의 시간차와, 상기 네트워크 MCU로부터 상기 초기 시간(torigin)을 수신한 시간(Torigin)과 상기 시작 시간(tstart)을 수신한 시간(Tstart)간의 시간차를 이용하여 상기 오차율을 계산할 수 있다.Further, the step (a), the network MCU is Casting their initial time (t origin) and starting time (t start) to each of the control MCU, the control MCU is the initial time (t origin) and the A time difference between a start time t start and a time difference between a time T origin of receiving the initial origin t origin from the network MCU and a time T start of receiving the start time t start The error rate can be calculated.

또한, 상기 (a) 단계는, (a1) 상기 슬레이브 시스템이 초기 기동되면, 상기 네트워크 MCU가 상기 초기 시간(torigin)을 상기 콘트롤 MCU로 전송하는 단계; (a2) 상기 콘트롤 MCU가 상기 초기 시간(torigin)을 저장하고, 상기 초기 시간(torigin)을 수신한 시간을 자신의 초기 시간(Torigin)으로 설정하는 단계; (a3) 사전에 정의된 시간이 경과한 후, 상기 네트워크 MCU가 상기 시작 시간(tstart)을 상기 콘트롤 MCU로 전송하는 단계; (a4) 상기 콘트롤 MCU가 상기 시작 시간(tstart)을 수신하여 저장하고, 상기 시작 시간(tstart)을 수신한 시간을 자신의 시작 시간(Tstart)으로 설정하는 단계; 및 (a5) 상기 콘트롤 MCU가, 상기 네트워크 MCU의 상기 초기 시간(torigin)과 상기 시작 시간(tstart)간의 시간차와, 상기 콘트롤 MCU의 상기 초기 시간(Torigin)과 상기 시작 시간(Tstart)간의 시간차를 이용하여, 상기 콘트롤 MCU와 상기 네트워크 MCU의 클록간 상기 오차율(error rate)을 계산하는 단계;를 포함할 수 있다.The step (a) may further include: (a1) when the slave system is initially activated, the network MCU transmits the initial time t origin to the control MCU; (a2) step in which the control MCU stores the initial time (t origin), and set the received time to the initial time (t origin) to their initial time (T origin); (a3) after the predetermined time has elapsed, the network MCU transmits the start time (t start ) to the control MCU; (a4) step in which the control MCU receives and stores the starting time (t start), set the received time to the start time (t start) to their start time (T start); And (a5) is the control MCU, the time difference between the network MCU the initial time (t origin) and the starting time (t start) and the initial time of the control MCU (T origin) and the start time (T start Calculating an error rate between a clock of the control MCU and a clock of the network MCU using a time difference between the control MCU and the network MCU.

또한, 상기 네트워크 MCU는 주기적으로 네트워크 프로세스(ECAT Process)를 수행하고, 상기 (a3) 단계에서, 상기 네트워크 MCU는 네트워크 프로세스가 종료된 시점부터, 다음 네트워크 프로세스가 시작되는 시점까지의 중간 시점(tinit_delay)에 상기 시작 시간(tstart)을 상기 콘트롤 MCU로 전송할 수 있다.The network MCU periodically performs an ECAT process. In step (a3), the network MCU calculates an intermediate time t (t) from the end of the network process to the start of the next network process the starting time (t start) to init_delay) can be transmitted to the control MCU.

또한, 상기 오차율(error rate)은, 상기 콘트롤 MCU의 상기 초기 시간(Torigin)과 상기 시작 시간(Tstart)간의 시간차에 대한 상기 네트워크 MCU의 상기 초기 시간(torigin) 및 상기 시작 시간(tstart)간의 시간차의 비율로서 계산될 수 있다.Also, the error rate may be calculated by multiplying the initial time t origin of the network MCU with the time difference between the initial time T origin of the control MCU and the start time T start and the start time t start ).

또한, 상기 (b) 단계는 아래의 수학식에 따라서 상기 네트워크 MCU의 현재 시간을 예측하고,

Figure pat00007
,
Figure pat00008
은 상기 네트워크 MCU의 현재 시간 추정치를 나타내고, Tlocal은 상기 콘트롤 MCU의 현재 시간을 나타낸다.The step (b) may predict the current time of the network MCU according to the following equation,
Figure pat00007
,
Figure pat00008
Represents the current time estimate of the network MCU, and T local represents the current time of the control MCU.

한편, 상술한 과제를 해결하기 위한 본 발명의 바람직한 실시예에 따른 동기화 시스템은, 이더캣 기반의 슬레이브 시스템에 포함된 복수의 마이크로 프로세서간 동기화 시스템으로서, 상기 동기화 시스템이 기동되면, 서로 다른 시점의 자신의 초기 시간(torigin)과 시작 시간(tstart)을 콘트롤 MCU로 전송하고, 상기 콘트롤 MCU로부터 일정한 시간 주기로 자신의 현재 시간 예측치(

Figure pat00009
)를 수신하면 자신의 실제 시간(
Figure pat00010
)과의 시간차(
Figure pat00011
)를 계산하여 상기 콘트롤 MCU로 전송하는 네트워크 MCU; 및 상기 네트워크 MCU의 초기 시간(torigin)과 시작 시간(tstart)을 수신하고, 상기 초기 시간(torigin)과 상기 시작 시간(tstart)간의 시간차와, 상기 초기 시간(torigin)과 상기 시작 시간(tstart)을 각각 수신한 시간간의 시간차를 이용하여 상기 네트워크 MCU 와의 클록간 오차율을 계산하고, 일정한 시간 주기로, 상기 오차율을 이용하여 상기 네트워크 MCU의 현재 시간을 예측한 현재 시간 예측치(
Figure pat00012
)를 상기 네트워크 MCU로 전송하고, 상기 네트워크 MCU로부터 상기 시간차(
Figure pat00013
)를 수신하고, 수신된 시간차에 따라서 내부의 클록 속도를 조절하여 동기화를 수행하는 상기 콘트롤 MCU를 포함한다.According to another aspect of the present invention, there is provided a synchronization system including a plurality of microprocessor synchronization systems included in an EtherCAT-based slave system, wherein when the synchronization system is activated, And transmits its own initial time t origin and start time t start to the control MCU and outputs its current time prediction value
Figure pat00009
), The user's own actual time (
Figure pat00010
) ≪ / RTI >
Figure pat00011
) To the control MCU; And receiving an initial time (t origin) and starting time (t start) of the network, MCU, and the initial time (t origin) and the time difference between the starting time (t start), the initial time (t origin) and the And a start time (t start ) of the network MCU, and calculates a current time prediction value by predicting a current time of the network MCU using the error rate at a constant time period
Figure pat00012
) From the network MCU to the network MCU,
Figure pat00013
), And controls the internal clock speed according to the received time difference to perform synchronization.

또한, 상기 네트워크 MCU는, 상기 슬레이브 시스템이 초기 기동되면, 상기 초기 시간(torigin)을 상기 콘트롤 MCU로 전송하고, 사전에 정의된 시간이 경과한 후, 상기 시작 시간(tstart)을 상기 콘트롤 MCU로 전송하며, 상기 콘트롤 MCU는, 상기 초기 시간(torigin)을 저장하고 상기 초기 시간(torigin)을 수신한 시간을 자신의 초기 시간(Torigin)으로 설정하며, 상기 시작 시간(tstart)을 수신하여 저장하고 상기 시작 시간(tstart)을 수신한 시간을 자신의 시작 시간(Tstart)으로 설정하며, 상기 초기 시간(torigin)과 상기 시작 시간(tstart)의 시간차와, 자신의 초기 시간(Torigin)과 시작 시간(Tstart)간의 시간차를 이용하여, 상기 네트워크 MCU와의 클록간 상기 오차율(error rate)을 계산할 수 있다.Also, the network MCU may transmit the initial time t origin to the control MCU when the slave system is initially activated, and may transmit the start time t start to the control MCU after the predetermined time elapses. Wherein the control MCU stores the initial time t origin and sets the time at which the t origin is received as its initial time t origin and the start time t start And sets a time at which the start time t start is received as its start time T start so that the time difference between the start time t origin and the start time t start The error rate between the clock and the network MCU can be calculated using the time difference between the initial time T origin and the start time T start of the network MCU.

또한, 상기 네트워크 MCU는 주기적으로 네트워크 프로세스(ECAT Process)를 수행하고, 네트워크 프로세스가 종료된 시점부터, 다음 네트워크 프로세스가 시작되는 시점까지의 중간 시점(tinit_delay)에 상기 시작 시간(tstart)을 상기 콘트롤 MCU로 전송할 수 있다.In addition, the network MCU periodically performs an ECAT process, and the start time t start is set at an intermediate time t init_delay from the end of the network process to the start of the next network process To the control MCU.

또한, 상기 오차율(error rate)은, 상기 콘트롤 MCU의 상기 초기 시간(Torigin)과 상기 시작 시간(tstart)간의 시간차에 대한 상기 네트워크 MCU의 상기 초기 시간(torigin) 및 상기 시작 시간(tstart)간의 시간차의 비율로서 계산될 수 있다.In addition, the error rate is calculated by multiplying the initial time t origin of the network MCU with the time difference between the initial time T origin of the control MCU and the start time t start and the start time t start ).

또한, 상기 콘트롤 MCU는, 아래의 수학식에 따라서 상기 네트워크 MCU의 현재 시간을 예측하고,

Figure pat00014
,
Figure pat00015
은 상기 네트워크 MCU의 현재 시간 추정치를 나타내고, Tlocal은 상기 콘트롤 MCU의 현재 시간을 나타낸다.Further, the control MCU may predict the current time of the network MCU according to the following equation,
Figure pat00014
,
Figure pat00015
Represents the current time estimate of the network MCU, and T local represents the current time of the control MCU.

본 발명은 이더캣 기반의 슬레이브 시스템에 포함된 네트워크 MCU와 콘트롤 MCU 간의 동기화를 위해서, 콘트롤 MCU가 네트워크 MCU와 콘트롤 MCU간의 클록 오차율을 계산하고, 오차율을 이용하여 네트워크 MCU의 현재 시간을 예측하여 네트워크 MCU의 현재시간 예측치를 네트워크 MCU로 전송한다. 그러면, 네트워크 MCU에서, 콘트롤 MCU로부터 수신된 예측치와 실제 자신의 현재 시간간의 차이를 계산하여 콘트롤 MCU로 전송하고, 콘트롤 MCU는 네트워크 MCU의 현재 시간 예측치와 실제 현재 시간의 차이에 따라서 자신의 클록 속도를 빠르게 또는 느리게 조정함으로써 네트워크 MCU와 동기화를 수행한다. 이렇게, 이더캣 기반의 슬레이브 시스템 내부의 다수의 MCU간의 동기화를 수행함으로써, 처리 시간 지연을 방지할 수 있어 효율적인 시스템 운영이 가능하다.In order to synchronize a network MCU and a control MCU included in an Ethernet-based slave system, a control MCU calculates a clock error rate between a network MCU and a control MCU, predicts a current time of the network MCU using an error rate, The current time predicted value of the MCU is transmitted to the network MCU. Then, in the network MCU, the difference between the predicted value received from the control MCU and the actual current time is calculated and transmitted to the control MCU. The control MCU calculates the difference between the current clock time To synchronize with the network MCU. In this way, by performing synchronization among a plurality of MCUs in the EtherCAT-based slave system, processing time delay can be prevented and efficient system operation is possible.

도 1은 본 발명의 바람직한 실시예에 따른 전체 구성을 도시하는 도면이다.
도 2는 본 발명의 바람직한 실시예에 따른 동기화 방법 중 초기화 과정을 설명하는 타밍도이다.
도 3은 본 발명의 바람직한 실시예에 따른 동기화 방법 중 주기적 동기화 과정을 설명하는 타이밍도이다.
1 is a diagram showing an overall configuration according to a preferred embodiment of the present invention.
FIG. 2 is a timing diagram illustrating an initialization process of a synchronization method according to a preferred embodiment of the present invention.
3 is a timing diagram illustrating a cyclic synchronization process among the synchronization methods according to a preferred embodiment of the present invention.

이하, 첨부된 도면을 참조하여 본 발명의 바람직한 실시예들을 설명한다.Hereinafter, preferred embodiments of the present invention will be described with reference to the accompanying drawings.

도 1은 본 발명의 바람직한 실시예에 따른 전체 구성을 도시하는 도면이다.1 is a diagram showing an overall configuration according to a preferred embodiment of the present invention.

도 1을 참조하면, 이더캣(EtherCAT) 네트워크는 하나의 마스터 시스템(100)과 복수의 슬레이브 시스템들(200-1~200-N)이 네트워크를 통해서 서로 연결되어 구성되고, 본 발명의 슬레이브 시스템은 서보 모터 시스템으로 구현된다.Referring to FIG. 1, an EtherCAT network includes a master system 100 and a plurality of slave systems 200-1 through 200-N connected to each other through a network, Is implemented as a servo motor system.

또한, 본 발명이 적용되는 슬레이브 시스템은 네트워크 기능을 제어하는 네트워크 MCU(Micro Controller Unit)(210)와 서보 모터 등의 제어를 담당하는 콘트롤 MCU(220)를 포함하여 구성되고, 네트워크 MCU(210)와 콘트롤 MCU(220)는 공유 메모리(230)를 통해서 서로 데이터를 교환할 수 있다.In addition, the slave system to which the present invention is applied includes a network MCU (Micro Controller Unit) 210 for controlling network functions and a control MCU 220 for controlling a servo motor, And the control MCU 220 can exchange data with each other through the shared memory 230. [

본 발명의 바람직한 실시예에서, 이더캣 네트워크 MCU(EtherCAT Network MCU)(210)는 마스터 시스템(100)과 통신을 통해서, 이더캣 네트워크의 마스터 시스템(100) 및 다른 슬레이브 시스템들과 동기화되고, 네트워크 통신과 관련된 기능을 제어한다. The EtherCAT Network MCU 210 is synchronized with the master system 100 and other slave systems of the EtherCAT network via communication with the master system 100 and the EtherCAT network MCU 210 is synchronized with the master system 100. In the preferred embodiment of the present invention, Controls communication related functions.

콘트롤 MCU(220)는 기본적으로는 콘트롤 MCU(220)가 설치된 슬레이브 시스템의 동작을 제어하고(즉, 본 발명의 슬레이브 시스템이 서보 모터 시스템으로 구현되는 경우에는 서보 모터의 동작을 제어하고), 본 발명과 관련해서는 이더캣 네트워크 MCU(210)와 동기화를 수행한다. The control MCU 220 basically controls the operation of the slave system in which the control MCU 220 is installed (that is, when the slave system of the present invention is implemented as a servo motor system, it controls the operation of the servo motor) In connection with the invention, synchronization with the EtherCAT network MCU 210 is performed.

참고로, 이더캣(EtherCAT) 네트워크를 구성하는 마스터 시스템(100)과 복수의 슬레이브 시스템간의 동기화 방법에 대해서는, 분산 클록(distributed-clock) 기능을 이용하는 다수의 방법이 이미 공지되어 있을 뿐만 아니라, 본 출원인의 한국특허 제 10-1771612 호(발명의 명칭: 이더캣 기반의 동기화 오차 보상 시스템 및 그 방법)에도 자세하게 기술되어 있으므로, 구체적인 설명은 생략하고, 본 발명의 이더캣 네트워크 MCU(210)(이하 "네트워크 MCU(210)"라 약칭함)는 마스터 시스템(100) 및 다른 슬레이브 시스템들과 높은 수준으로 동기화되고 있다고 가정한다. For reference, a number of methods of using a distributed-clock function are already known for the synchronization method between the master system 100 constituting the EtherCAT network and a plurality of slave systems, The present invention is not limited to the ethercat network MCU 210 (hereinafter referred to as " synchronous error compensation system ") of the present invention because it is described in detail in Korean Patent No. 10-1771612 Network MCU 210 ") is assumed to be synchronized with the master system 100 and other slave systems at a high level.

이 때, 네트워크 MCU(210)와 독립적으로 동작하는 서보 모터 제어용 콘트롤 MCU(220)가 네트워크 MCU(210)에 동기화하기 위해서는 내부 클럭의 offset, 클럭 속도 차이, 그리고 drift 오차를 보정할 필요가 있다. 따라서, 본 발명의 바람직한 실시예는 초기화 과정과 주기적 동기화 과정을 통하여 이를 보정한다. In this case, in order for the control MCU 220 for controlling the servo motor, which operates independently of the network MCU 210, to synchronize with the network MCU 210, it is necessary to correct the offset of the internal clock, the clock speed difference, and the drift error. Accordingly, the preferred embodiment of the present invention corrects this through initialization and periodic synchronization.

본 발명은 이더캣 네트워크 MCU(210)와 콘트롤 MCU(220) 간의 동기화 방법에 관한 것이므로, 이하에서는 이더캣 네트워크 MCU(210)와 콘트롤 MCU(220)의 일반적인 기능 설명은 생략하고, 도 2 및 도 3을 더 참조하여, 이들 간의 동기화 방법을 상세하게 설명한다. Since the present invention relates to a synchronization method between the Ethernet network MCU 210 and the control MCU 220, description of general functions of the Ethernet network MCU 210 and the control MCU 220 will be omitted below, 3, and a synchronization method between them will be described in detail.

참고로, 본 발명에서, 네트워크 MCU(210)의 시간을 't', 콘트롤 MCU(220)의 시간을 'T'로 나타낸다.In the present invention, the time of the network MCU 210 is denoted by 't', and the time of the control MCU 220 is denoted by 'T'.

도 2는 본 발명의 바람직한 실시예에 따른 동기화 방법 중 초기화 과정을 설명하는 타밍도이고, 도 3은 주기적 동기화 과정을 설명하는 타이밍도이다. FIG. 2 is a timing diagram illustrating an initialization process of a synchronization method according to a preferred embodiment of the present invention, and FIG. 3 is a timing diagram illustrating a periodic synchronization process.

먼저, 도 2를 더 참조하면, 네트워크 MCU(210) 및 콘트롤 MCU(220)가 설치된 슬레이브 시스템(서보 모터 시스템)이 초기 기동되면(Boot Up), 네트워크 MCU(210) 및 콘트롤 MCU(220)가 각각 주기적으로 수행하는 제어 사이클 시간을 결정하고, 이들 주기의 최소 공배수를 동기화 주기로 설정하여, 이 동기화 주기마다 네트워크 MCU(210) 및 콘트롤 MCU(220) 간의 동기화를 수행한다. 예컨대, 네트워크 MCU(210)의 프로세싱 주기가 4msec이고, 콘트롤 MCU(220)의 프로세싱 주기가 3msec 인 경우에, 매 12msec마다 네트워크 MCU(210) 및 콘트롤 MCU(220) 간의 동기화가 수행된다.2, when the slave system (servo motor system) including the network MCU 210 and the control MCU 220 is initially booted up, the network MCU 210 and the control MCU 220 Determines the control cycle time to be periodically performed, sets the minimum common multiple of these cycles to a synchronization period, and performs synchronization between the network MCU 210 and the control MCU 220 every synchronization period. For example, when the processing cycle of the network MCU 210 is 4 msec and the processing cycle of the control MCU 220 is 3 msec, synchronization between the network MCU 210 and the control MCU 220 is performed every 12 msec.

먼저, 초기화 과정에서, 네트워크 MCU(210)의 네트워크 초기화가 완료되면, 네트워크 MCU(210)는 초기 시간(torigin)을 콘트롤 MCU(220)로 전송하고, 콘트롤 MCU(220)는 네트워크 MCU(210)로부터 수신된 초기 시간(torigin)을 저장하는 한편, 네트워크 MCU(210)의 초기 시간(torigin)을 수신한 시간을 자신의 초기 시간(Torigin)으로 설정한다.First, in the initialization process, when the network initialization of the network MCU 210 is completed, the network MCU 210 transmits the initial time t origin to the control MCU 220, and the control MCU 220 transmits the initial time t origin to the network MCU 210 ) is set to be the initial time (t origin), the initial time (t origin) their initial time (T origin) the received time of storing the other hand, the network MCU (210) received from.

그 후, 네트워크 MCU(210)는 주기적으로 네트워크 제어 프로세스(ECAT Process)를 수행하고, 첫 번째 네트워크 제어 프로세스가 종료된 시점부터, 사전에 정의된 시간(t_init_delay)이 경과하면, 시작 시간(tstart)을 콘트롤 MCU(220)로 전송한다. 이 때, 네트워크 MCU(210)는 네트워크 프로세스가 종료된 시점부터, 다음 네트워크 프로세스가 시작되는 시점까지의 중간 시점(tinit_delay)에 시작 시간(tstart)을 콘트롤 MCU(220)로 전송한다. Thereafter, the network MCU 210 periodically performs the network control process (ECAT process), and when the predefined time (t_init_delay) elapses from the time of the end of the first network control process, the start time (t start To the control MCU 220. At this time, the network MCU 210 transmits the start time (t start ) to the control MCU 220 at the middle point (t init_delay ) from the end of the network process to the start of the next network process.

본 발명의 바람직한 실시예에서, 네트워크 MCU(210)가 시작 시간(tstart)을 콘트롤 MCU(220)로 전송하는 중간 시간(tinit_delay)은, 네트워크 프로세스(ECAT Process)가 종료된 시점과 다음 네트워크 프로세스(ECAT Process)가 시작되는 시점간의 정확한 중간 시점으로 설정하였고, 다음과 같은 수학식 1로 표현된다.In the preferred embodiment of the present invention, the intermediate time (t init_delay ) at which the network MCU 210 transmits the start time (t start ) to the control MCU 220 is the time when the network process (ECAT Process) (ECAT Process) is started and is expressed by Equation (1) as follows.

[수학식 1][Equation 1]

Figure pat00016
Figure pat00016

상기 수학식 1에서 tcycle 은 네트워크 MCU(210)가 네트워크 프로세스를 수행하는 주기를 나타내고, tprocess는 네트워크 MCU(210)가 네트워크 프로세스를 수행하는 동안의 시간 기간을 나타낸다.In Equation (1), t cycle denotes a period in which the network MCU 210 performs a network process, and t process denotes a time period during which the network MCU 210 performs a network process.

한편, 콘트롤 MCU(220)는 시작 시간(tstart)을 수신하면, 수신된 시작 시간(tstart)을 저장하고, 시작 시간(tstart)을 수신한 자신의 시작 시간(Tstart)를 설정한다. On the other hand, sets the control MCU (220) is a start time (t start) a, stores the received starting time (t start), start time (t start) their start time (T start) receiving the Upon receiving .

그 후, 콘트롤 MCU(220)는 아래의 수학식 2에 따라서 네트워크 MCU(210)와 콘트롤 MCU(220) 클록간의 오차율(error rate)을 계산하고, 콘트롤 MCU(220)의 주기적 제어 프로세스(Control Process)를 시작한다.Thereafter, the control MCU 220 calculates an error rate between the clocks of the network MCU 210 and the control MCU 220 according to the following equation (2) ).

[수학식 2]&Quot; (2) "

Figure pat00017
Figure pat00017

상기와 같은 과정을 통해서 초기화 과정이 종료되면, 주기적인 동기화 절차를 진행한다.When the initialization process is completed through the above process, a periodic synchronization procedure is performed.

도 3은 본 발명의 바람직한 실시예에 따른 동기화 방법 중 주기적 동기화 과정을 설명하는 타이밍도이다.3 is a timing diagram illustrating a cyclic synchronization process among the synchronization methods according to a preferred embodiment of the present invention.

도 3을 참조하여 주기적인 동기화 절차를 설명하면, 상술한 바와 같이, 네트워크 MCU(210)와 콘트롤 MCU(220)의 제어 주기가 다른 경우, 두 MCU 제어 주기의 최소 공배수에 해당하는 시간 마다 주기적 동기화 절차를 수행한다. 3, when the control cycles of the network MCU 210 and the control MCU 220 are different from each other, periodic synchronization is performed every period corresponding to the least common multiple of the two MCU control cycles, Perform the procedure.

주기적 동기화가 시작되면, 먼저 콘트롤 MCU(220)에서는 현재 시간(Tlocal) 및 수학식 2에 따라서 계산된 오차율을 이용하여 네트워크 MCU(210)의 현재 시간을 예측하여 현재 시간 예측치(

Figure pat00018
)를 생성하고, 현재 시간 예측치를 Ack request와 함께 네트워크 MCU(210)로 전송한다. 본 발명의 바람직한 실시예는 아래의 수학식 3에 따라서 네트워크 MCU(210)의 현재 시간을 예측하였다.When the periodic synchronization starts, the control MCU 220 first predicts the current time of the network MCU 210 using the error rate calculated according to the current time (T local ) and the equation (2)
Figure pat00018
), And transmits the current time predicted value to the network MCU 210 together with the Ack request. The preferred embodiment of the present invention predicts the current time of the network MCU 210 according to Equation (3) below.

[수학식 3]&Quot; (3) "

Figure pat00019
Figure pat00019

네트워크 MCU(210)는 콘트롤 MCU(220)로부터 수신된 현재 시간 예측치(

Figure pat00020
)와 자신의 클록에 따른 실제 현재 시간(
Figure pat00021
)간의 차이(
Figure pat00022
)를 계산하여 Ack Response와 함께 콘트롤 MCU(220)로 전송한다.The network MCU 210 receives the current time estimate (< RTI ID = 0.0 >
Figure pat00020
) And the actual current time according to its clock (
Figure pat00021
)
Figure pat00022
And sends it to the control MCU 220 together with the Ack Response.

콘트롤 MCU(220)는

Figure pat00023
를 수신하고, 이를 이용하여 내부 클록을 빠르게 조절하거나 느리게 조절하는 방법으로 보정을 수행함으로써, 네트워크 MCU(210)와의 동기화를 수행한다.The control MCU 220
Figure pat00023
And synchronizes with the network MCU 210 by performing correction using a method of rapidly adjusting or slowing down the internal clock using the received clock.

그 후, 콘트롤 MCU(220)는 다음 동기화 주기가 도래하면, 다시 네트워크 MCU(210)의 현재 시간을 예측하여 현재 시간 예측치(

Figure pat00024
)를 생성하여 Ack request와 함께 네트워크 MCU(210)로 전송함으로써 동기화를 다시 수행한다.Then, when the next synchronization period comes, the control MCU 220 again predicts the current time of the network MCU 210 and obtains the current time predicted value (
Figure pat00024
) And sends it to the network MCU 210 together with the Ack request to perform synchronization again.

본 발명은 또한 컴퓨터로 읽을 수 있는 기록매체에 컴퓨터가 읽을 수 있는 코드로서 구현하는 것이 가능하다. 컴퓨터가 읽을 수 있는 기록매체는 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록장치를 포함한다. 컴퓨터가 읽을 수 있는 기록매체의 예로는 ROM, RAM, CD-ROM, 자기 테이프, 플로피디스크, 광데이터 저장장치 등이 있다. 또한 컴퓨터가 읽을 수 있는 기록매체는 네트워크로 연결된 컴퓨터 시스템에 분산되어, 분산방식으로 컴퓨터가 읽을 수 있는 코드가 저장되고 실행될 수 있다.The present invention can also be embodied as computer-readable codes on a computer-readable recording medium. A computer-readable recording medium includes all kinds of recording apparatuses in which data that can be read by a computer system is stored. Examples of the computer-readable recording medium include ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage, and the like. The computer readable recording medium may also be distributed over a networked computer system so that computer readable code can be stored and executed in a distributed manner.

이제까지 본 발명에 대하여 그 바람직한 실시예들을 중심으로 살펴보았다. 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자는 본 발명이 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 변형된 형태로 구현될 수 있음을 이해할 수 있을 것이다. 그러므로 개시된 실시예들은 한정적인 관점이 아니라 설명적인 관점에서 고려되어야 한다. 본 발명의 범위는 전술한 설명이 아니라 특허청구범위에 나타나 있으며, 그와 동등한 범위 내에 있는 모든 차이점은 본 발명에 포함된 것으로 해석되어야 할 것이다.The present invention has been described with reference to the preferred embodiments. It will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. Therefore, the disclosed embodiments should be considered in an illustrative rather than a restrictive sense. The scope of the present invention is defined by the appended claims rather than by the foregoing description, and all differences within the scope of equivalents thereof should be construed as being included in the present invention.

100 : 마스터 시스템
200-1~200-N : 슬레이브 시스템 1 ~ 슬레이브 시스템 N
210 : 이더캣 MCU
220 : 콘트롤 MCU
230 : 공유 메모리
100: Master system
200-1 to 200-N: Slave system 1 to slave system N
210: EtherCAT MCU
220: Control MCU
230: Shared memory

Claims (11)

이더캣 기반의 슬레이브 시스템에 포함된 네트워크 MCU와 콘트롤 MCU간 동기화 방법으로서,
(a) 상기 콘트롤 MCU가 상기 네트워크 MCU의 두 시점간의 시간차와, 상기 콘트롤 MCU의 두 시점간의 시간차를 이용하여, 상기 콘트롤 MCU와 상기 네트워크 MCU의 클록간 오차율을 계산하는 초기화 단계;
(b) 상기 콘트롤 MCU가 일정한 시간 주기로, 상기 오차율을 이용하여 상기 네트워크 MCU의 현재 시간을 예측한 현재 시간 예측치(
Figure pat00025
)를 상기 네트워크 MCU로 전송하는 단계;
(c) 상기 네트워크 MCU가 상기 현재 시간 예측치(
Figure pat00026
)와 자신의 실제 현재 시간(
Figure pat00027
)간의 시간차(
Figure pat00028
)를 계산하여 상기 콘트롤 MCU로 전송하는 단계; 및
(d) 상기 콘트롤 MCU가 상기 시간차(
Figure pat00029
)를 수신하고, 수신된 시간차(
Figure pat00030
)에 따라서 상기 콘트롤 MCU 내부의 클록 속도를 조절하여 동기화를 수행하는 단계를 포함하는 것을 특징으로 하는 동기화 방법.
As a synchronization method between a network MCU and a control MCU included in an Ethernet-based slave system,
(a) an initialization step of calculating the error rate between clocks of the control MCU and the network MCU using the time difference between the two points of time of the control MCU and the two points of time of the control MCU;
(b) a current time predicted value obtained by predicting the current time of the network MCU using the error rate at a predetermined time period by the control MCU
Figure pat00025
) To the network MCU;
(c) if the network MCU receives the current time estimate
Figure pat00026
) And their actual current time (
Figure pat00027
)
Figure pat00028
) To the control MCU; And
(d) when the control MCU detects that the time difference
Figure pat00029
), And receives the received time difference (
Figure pat00030
And adjusting the clock speed in the control MCU according to the control clock to perform synchronization.
제 1 항에 있어서, 상기 (a) 단계는
상기 네트워크 MCU가 자신의 초기 시간(torigin) 및 시작 시간(tstart)을 각각 상기 콘트롤 MCU로 전송하면, 상기 콘트롤 MCU가 상기 초기 시간(torigin) 및 상기 시작 시간(tstart)간의 시간차와, 상기 네트워크 MCU로부터 상기 초기 시간(torigin)을 수신한 시간(Torigin)과 상기 시작 시간(tstart)을 수신한 시간(Tstart)간의 시간차를 이용하여 상기 오차율을 계산하는 것을 특징으로 하는 동기화 방법.
The method of claim 1, wherein step (a)
When the network MCU transmits its initial time t origin and start time t start to the control MCU respectively, the control MCU calculates a time difference between the initial time t origin and the start time t start , by using the time difference between the from the network MCU the initial time (t origin) the received time (T origin) and the starting time (t start) the received time (T start), characterized in that calculating the error rate How to synchronize.
제 2 항에 있어서, 상기 (a) 단계는
(a1) 상기 슬레이브 시스템이 초기 기동되면, 상기 네트워크 MCU가 상기 초기 시간(torigin)을 상기 콘트롤 MCU로 전송하는 단계;
(a2) 상기 콘트롤 MCU가 상기 초기 시간(torigin)을 저장하고, 상기 초기 시간(torigin)을 수신한 시간을 자신의 초기 시간(Torigin)으로 설정하는 단계;
(a3) 사전에 정의된 시간이 경과한 후, 상기 네트워크 MCU가 상기 시작 시간(tstart)을 상기 콘트롤 MCU로 전송하는 단계;
(a4) 상기 콘트롤 MCU가 상기 시작 시간(tstart)을 수신하여 저장하고, 상기 시작 시간(tstart)을 수신한 시간을 자신의 시작 시간(Tstart)으로 설정하는 단계; 및
(a5) 상기 콘트롤 MCU가, 상기 네트워크 MCU의 상기 초기 시간(torigin)과 상기 시작 시간(tstart)간의 시간차와, 상기 콘트롤 MCU의 상기 초기 시간(Torigin)과 상기 시작 시간(Tstart)간의 시간차를 이용하여, 상기 콘트롤 MCU와 상기 네트워크 MCU의 클록간 상기 오차율(error rate)을 계산하는 단계;를 포함하는 것을 특징으로 하는 동기화 방법.
3. The method of claim 2, wherein step (a)
(a1) when the slave system is initially activated, the network MCU transmits the initial time t origin to the control MCU;
(a2) step in which the control MCU stores the initial time (t origin), and set the received time to the initial time (t origin) to their initial time (T origin);
(a3) after the predetermined time has elapsed, the network MCU transmits the start time (t start ) to the control MCU;
(a4) step in which the control MCU receives and stores the starting time (t start), set the received time to the start time (t start) to their start time (T start); And
(a5) The control MCU monitors the time difference between the initial time t origin of the network MCU and the start time t start , the initial time T origin of the control MCU and the start time T start , And calculating the error rate between the clocks of the control MCU and the network MCU using the time difference between the control MCU and the network MCU.
제 3 항에 있어서,
상기 네트워크 MCU는 주기적으로 네트워크 프로세스(ECAT Process)를 수행하고,
상기 (a3) 단계에서, 상기 네트워크 MCU는 네트워크 프로세스가 종료된 시점부터, 다음 네트워크 프로세스가 시작되는 시점까지의 중간 시점(tinit_delay)에 상기 시작 시간(tstart)을 상기 콘트롤 MCU로 전송하는 것을 특징으로 하는 동기화 방법.
The method of claim 3,
The network MCU periodically performs a network process (ECAT process)
In step (a3), the network MCU transmits the start time t start to the control MCU at an intermediate time t init_delay from the end of the network process to the start of the next network process Characterized by a synchronization method.
제 2 항에 있어서, 상기 오차율(error rate)은
상기 콘트롤 MCU의 상기 초기 시간(Torigin)과 상기 시작 시간(Tstart)간의 시간차에 대한 상기 네트워크 MCU의 상기 초기 시간(torigin) 및 상기 시작 시간(tstart)간의 시간차의 비율로서 계산되는 것을 특징으로 하는 동기화 방법.
3. The method of claim 2, wherein the error rate is
Is calculated as a ratio of the time difference between the initial time t origin of the network MCU and the start time t start with respect to the time difference between the initial time T origin of the control MCU and the start time T start Characterized by a synchronization method.
제 5 항에 있어서,
상기 (b) 단계는 아래의 수학식에 따라서 상기 네트워크 MCU의 현재 시간을 예측하고,
Figure pat00031

Figure pat00032
은 상기 네트워크 MCU의 현재 시간 추정치를 나타내고, Tlocal은 상기 콘트롤 MCU의 현재 시간을 나타내는 것을 특징으로 하는 동기화 방법.
6. The method of claim 5,
The step (b) estimates the current time of the network MCU according to the following equation,
Figure pat00031

Figure pat00032
And T local represents the current time of the control MCU. ≪ RTI ID = 0.0 > 11. < / RTI >
이더캣 기반의 슬레이브 시스템에 포함된 복수의 마이크로 프로세서간 동기화 시스템으로서,
상기 동기화 시스템이 기동되면, 서로 다른 시점의 자신의 초기 시간(torigin)과 시작 시간(tstart)을 콘트롤 MCU로 전송하고, 상기 콘트롤 MCU로부터 일정한 시간 주기로 자신의 현재 시간 예측치(
Figure pat00033
)를 수신하면 자신의 실제 시간(
Figure pat00034
)과의 시간차(
Figure pat00035
)를 계산하여 상기 콘트롤 MCU로 전송하는 네트워크 MCU; 및
상기 네트워크 MCU의 초기 시간(torigin)과 시작 시간(tstart)을 수신하고, 상기 초기 시간(torigin)과 상기 시작 시간(tstart)간의 시간차와, 상기 초기 시간(torigin)과 상기 시작 시간(tstart)을 각각 수신한 시간간의 시간차를 이용하여 상기 네트워크 MCU 와의 클록간 오차율을 계산하고, 일정한 시간 주기로, 상기 오차율을 이용하여 상기 네트워크 MCU의 현재 시간을 예측한 현재 시간 예측치(
Figure pat00036
)를 상기 네트워크 MCU로 전송하고, 상기 네트워크 MCU로부터 상기 시간차(
Figure pat00037
)를 수신하고, 수신된 시간차에 따라서 내부의 클록 속도를 조절하여 동기화를 수행하는 상기 콘트롤 MCU를 포함하는 것을 특징으로 하는 동기화 시스템.
A plurality of inter-microprocessor synchronization systems included in an EtherCAT-based slave system,
When the synchronization system is activated, it transmits its initial time t origin and start time t start at different points of time to the control MCU, and outputs its current time prediction value
Figure pat00033
), The user's own actual time (
Figure pat00034
) ≪ / RTI >
Figure pat00035
) To the control MCU; And
And the time difference between the initial time of the network MCU (t origin) and starting time (t start) to receive, wherein the initial time (t origin) and the starting time (t start), and the starting the initial time (t origin) (T start ) of the network MCU by using the time difference between the clocks of the network MCU and the network MCU, and estimates the current time by using the error rate in a predetermined time period
Figure pat00036
) From the network MCU to the network MCU,
Figure pat00037
), And controls the internal clock speed according to the received time difference to perform synchronization.
제 7 항에 있어서,
상기 네트워크 MCU는, 상기 슬레이브 시스템이 초기 기동되면, 상기 초기 시간(torigin)을 상기 콘트롤 MCU로 전송하고, 사전에 정의된 시간이 경과한 후, 상기 시작 시간(tstart)을 상기 콘트롤 MCU로 전송하며,
상기 콘트롤 MCU는, 상기 초기 시간(torigin)을 저장하고 상기 초기 시간(torigin)을 수신한 시간을 자신의 초기 시간(Torigin)으로 설정하며, 상기 시작 시간(tstart)을 수신하여 저장하고 상기 시작 시간(tstart)을 수신한 시간을 자신의 시작 시간(Tstart)으로 설정하며, 상기 초기 시간(torigin)과 상기 시작 시간(tstart)의 시간차와, 자신의 초기 시간(Torigin)과 시작 시간(Tstart)간의 시간차를 이용하여, 상기 네트워크 MCU와의 클록간 상기 오차율(error rate)을 계산하는 것을 특징으로 하는 동기화 시스템.
8. The method of claim 7,
The network MCU transmits the initial time t origin to the control MCU when the slave system is initially activated and transmits the start time t start to the control MCU after a predetermined time elapses ≪ / RTI &
The control MCU stores the initial time t origin and sets the time at which the origin t origin is received as its initial time T origin and receives the start time t start And sets a time at which the start time t start is received as its start time T start so that the time difference between the start time t origin and the start time t start and the initial time T origin) and the start time (T start) by using the time difference between, synchronization system, characterized in that calculating the error rate (error rate) between the network clock with the MCU.
제 8 항에 있어서,
상기 네트워크 MCU는 주기적으로 네트워크 프로세스(ECAT Process)를 수행하고, 네트워크 프로세스가 종료된 시점부터, 다음 네트워크 프로세스가 시작되는 시점까지의 중간 시점(tinit_delay)에 상기 시작 시간(tstart)을 상기 콘트롤 MCU로 전송하는 것을 특징으로 하는 동기화 시스템.
9. The method of claim 8,
The network MCU periodically performs an ECAT process and transmits the start time t start to the control unit at an intermediate time t init_delay from the end of the network process to the start of the next network process. To the MCU.
제 8 항에 있어서, 상기 오차율(error rate)은
상기 콘트롤 MCU의 상기 초기 시간(Torigin)과 상기 시작 시간(tstart)간의 시간차에 대한 상기 네트워크 MCU의 상기 초기 시간(torigin) 및 상기 시작 시간(tstart)간의 시간차의 비율로서 계산되는 것을 특징으로 하는 동기화 시스템.
9. The method of claim 8, wherein the error rate is
Is calculated as a ratio of the time difference between the initial time t origin of the network MCU and the start time t start with respect to the time difference between the initial time T origin of the control MCU and the start time t start Characterized by a synchronization system.
제 10 항에 있어서, 상기 콘트롤 MCU는
아래의 수학식에 따라서 상기 네트워크 MCU의 현재 시간을 예측하고,
Figure pat00038

Figure pat00039
은 상기 네트워크 MCU의 현재 시간 추정치를 나타내고, Tlocal은 상기 콘트롤 MCU의 현재 시간을 나타내는 것을 특징으로 하는 동기화 시스템.
11. The apparatus of claim 10, wherein the control MCU
Estimates the current time of the network MCU according to the following equation,
Figure pat00038

Figure pat00039
And T local represents the current time of the control MCU. ≪ RTI ID = 0.0 > 11. < / RTI >
KR1020170175363A 2017-12-19 2017-12-19 Synchronization method and system among multiple MCUs in EtherCAT-based slave system KR102291573B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020170175363A KR102291573B1 (en) 2017-12-19 2017-12-19 Synchronization method and system among multiple MCUs in EtherCAT-based slave system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020170175363A KR102291573B1 (en) 2017-12-19 2017-12-19 Synchronization method and system among multiple MCUs in EtherCAT-based slave system

Publications (2)

Publication Number Publication Date
KR20190074026A true KR20190074026A (en) 2019-06-27
KR102291573B1 KR102291573B1 (en) 2021-08-18

Family

ID=67057395

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020170175363A KR102291573B1 (en) 2017-12-19 2017-12-19 Synchronization method and system among multiple MCUs in EtherCAT-based slave system

Country Status (1)

Country Link
KR (1) KR102291573B1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111181681A (en) * 2020-01-07 2020-05-19 成都卡诺普自动化控制技术有限公司 Master-slave station clock synchronization method based on EtherCAT real-time Ethernet
CN111738407A (en) * 2020-05-13 2020-10-02 北京无线电计量测试研究所 Clock error prediction method, device, medium and terminal based on deep learning
CN112910593A (en) * 2021-03-09 2021-06-04 华南理工大学 Synchronous control system and method applied to servo motor driver
WO2023085465A1 (en) * 2021-11-11 2023-05-19 한국전기연구원 High-speed-communication-based control device for power conversion apparatus
CN116560291A (en) * 2023-07-06 2023-08-08 深圳艾为电气技术有限公司 Dual MCU architecture high-voltage controller and speed detection error adjustment method thereof

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090038709A (en) * 2007-10-16 2009-04-21 주식회사 터보테크 Apparatus for interface of high-speed digital network for nano controlling
KR101771612B1 (en) * 2016-07-12 2017-08-25 한국전기연구원 Synchronization error compensating system and method for EtherCAT

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090038709A (en) * 2007-10-16 2009-04-21 주식회사 터보테크 Apparatus for interface of high-speed digital network for nano controlling
KR101771612B1 (en) * 2016-07-12 2017-08-25 한국전기연구원 Synchronization error compensating system and method for EtherCAT

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111181681A (en) * 2020-01-07 2020-05-19 成都卡诺普自动化控制技术有限公司 Master-slave station clock synchronization method based on EtherCAT real-time Ethernet
CN111738407A (en) * 2020-05-13 2020-10-02 北京无线电计量测试研究所 Clock error prediction method, device, medium and terminal based on deep learning
CN111738407B (en) * 2020-05-13 2020-11-27 北京无线电计量测试研究所 Clock error prediction method, device, medium and terminal based on deep learning
CN112910593A (en) * 2021-03-09 2021-06-04 华南理工大学 Synchronous control system and method applied to servo motor driver
CN112910593B (en) * 2021-03-09 2022-06-14 华南理工大学 Synchronous control system and method applied to servo motor driver
WO2023085465A1 (en) * 2021-11-11 2023-05-19 한국전기연구원 High-speed-communication-based control device for power conversion apparatus
CN116560291A (en) * 2023-07-06 2023-08-08 深圳艾为电气技术有限公司 Dual MCU architecture high-voltage controller and speed detection error adjustment method thereof
CN116560291B (en) * 2023-07-06 2023-09-29 深圳艾为电气技术有限公司 Dual MCU architecture high-voltage controller and speed detection error adjustment method thereof

Also Published As

Publication number Publication date
KR102291573B1 (en) 2021-08-18

Similar Documents

Publication Publication Date Title
KR20190074026A (en) Synchronization method and system among multiple MCUs in EtherCAT-based slave system
US7898987B2 (en) Method and device for the exchange of data between at least two users connected to a bus system
US8913514B2 (en) Communication control unit and communication control system
JP3748204B2 (en) Periodic control synchronization system
EP3240244B1 (en) Controller area network synchronization
US20030131171A1 (en) Method and device for exchange of data between at least two users linked by means of a bus system
EP3026515A1 (en) Programmable controller system and controller therefor
JP6404975B2 (en) Slave, serial communication system, and communication method of serial communication system
US20010018720A1 (en) Method and device for the exchange of data between at least two users connected to a bus system
CN103988453A (en) Method for synchronizing clocks in nodes of a vehicle network and node designed to perform the method
KR101636496B1 (en) Signal synchronization system, node synchronization system, signal synchronization method, and node synchronization method
WO2018104237A1 (en) Method, device, and computer program for improving synchronization of clocks in devices linked according to a daisy-chain topology
EP2675224A1 (en) System and method for synchronizing wireless devices without sending timestamp data
US20220128977A1 (en) Industrial Device Supporting Multiple Time Synchronization Protocols
KR20030084984A (en) Method and device for synchronizing at least one node of a bus system and a corresponding bus system
JP6614403B1 (en) COMMUNICATION DEVICE, COMMUNICATION SYSTEM, AND SYNCHRONIZATION CONTROL METHOD
US10855490B2 (en) Transmission duration report and transmission target time allocation for controller area network synchronization
JP4961589B2 (en) Network system and slave synchronization method
JP5372699B2 (en) In-vehicle network device
US10222786B2 (en) Numerical control system having synchronous control function between units
CN117639991A (en) Time synchronization method and device for vehicle
KR101498561B1 (en) System and method for can communication based tdma digital technology for global synchronization
US20230163871A1 (en) Network interface card structure and clock synchronization method to precisely acquire heterogeneous ptp synchronization information for ptp synchronization network extension
WO2006129269A2 (en) Method to synchronize locally provided clocks of different communication nodes of a time-triggered communication system
KR102064575B1 (en) Method, apparatus, system and computer program for enhancing the accuracy of Time Synchronization between devices

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