KR101135253B1 - Method for sensing motor speed - Google Patents

Method for sensing motor speed Download PDF

Info

Publication number
KR101135253B1
KR101135253B1 KR1020100120444A KR20100120444A KR101135253B1 KR 101135253 B1 KR101135253 B1 KR 101135253B1 KR 1020100120444 A KR1020100120444 A KR 1020100120444A KR 20100120444 A KR20100120444 A KR 20100120444A KR 101135253 B1 KR101135253 B1 KR 101135253B1
Authority
KR
South Korea
Prior art keywords
value
phase signal
speed
motor
encoder
Prior art date
Application number
KR1020100120444A
Other languages
Korean (ko)
Inventor
천광수
Original Assignee
엘에스산전 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 엘에스산전 주식회사 filed Critical 엘에스산전 주식회사
Priority to KR1020100120444A priority Critical patent/KR101135253B1/en
Application granted granted Critical
Publication of KR101135253B1 publication Critical patent/KR101135253B1/en

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01PMEASURING LINEAR OR ANGULAR SPEED, ACCELERATION, DECELERATION, OR SHOCK; INDICATING PRESENCE, ABSENCE, OR DIRECTION, OF MOVEMENT
    • G01P3/00Measuring linear or angular speed; Measuring differences of linear or angular speeds
    • G01P3/42Devices characterised by the use of electric or magnetic means
    • G01P3/44Devices characterised by the use of electric or magnetic means for measuring angular speed
    • G01P3/48Devices characterised by the use of electric or magnetic means for measuring angular speed by measuring frequency of generated current or voltage
    • G01P3/481Devices characterised by the use of electric or magnetic means for measuring angular speed by measuring frequency of generated current or voltage of pulse signals
    • G01P3/489Digital circuits therefor
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01DMEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
    • G01D5/00Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable
    • G01D5/12Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable using electric or magnetic means
    • G01D5/244Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable using electric or magnetic means influencing characteristics of pulses or pulse trains; generating pulses or pulse trains
    • G01D5/24404Interpolation using high frequency signals
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01DMEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
    • G01D5/00Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable
    • G01D5/12Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable using electric or magnetic means
    • G01D5/244Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable using electric or magnetic means influencing characteristics of pulses or pulse trains; generating pulses or pulse trains
    • G01D5/245Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable using electric or magnetic means influencing characteristics of pulses or pulse trains; generating pulses or pulse trains using a variable number of pulses in a train
    • G01D5/2454Encoders incorporating incremental and absolute signals
    • G01D5/2455Encoders incorporating incremental and absolute signals with incremental and absolute tracks on the same encoder
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01DMEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
    • G01D5/00Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable
    • G01D5/12Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable using electric or magnetic means
    • G01D5/244Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable using electric or magnetic means influencing characteristics of pulses or pulse trains; generating pulses or pulse trains
    • G01D5/247Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable using electric or magnetic means influencing characteristics of pulses or pulse trains; generating pulses or pulse trains using time shifts of pulses

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Control Of Electric Motors In General (AREA)

Abstract

PURPOSE: A method for detecting the speed of a motor is provided to measure the speed of the motor without an error even if a new pulse is inputted while measuring the speed of the motor. CONSTITUTION: A first M value corresponding to transition counts of an phase signal and a B phase signal is saved in a first reference transition time which is reference waveform transition timing(S1). A first T value offered from a timer is provided to the first reference transition time(S2). The timer counts corresponding to the transition counts of the phase signal and the B phase signal. A second M value is saved in a second reference transition time(S3). A second T value offered from the timer is provided to the second reference transition time(S4). The speed of a motor is obtained as the first M value and a first T value in case the first M value and the second M value are same. The speed of the motor is obtained as the second M value and the second T value in case the first M value and the second M value are different.

Description

전동기 속도 검출 방법{Method for sensing Motor Speed}Motor speed detection method {Method for sensing Motor Speed}

본 발명은 모터 운전시 엔코더를 이용한 속도 측정 방법에 관한 것이다. 특히 M/T 방식으로 엔코더에서 제공되는 신호를 이용하여 속도를 측정하는 방법에 관한 것이다.
The present invention relates to a speed measuring method using an encoder during motor operation. In particular, the present invention relates to a method of measuring speed by using a signal provided by an encoder in an M / T method.

일반적으로 엔코더를 이용한 모터 운전 시 엔코더 출력 펄스를 가지고 모터의 속도 측정하는 방법은 다음과 같다. 먼저 첫번째로 일정 시간 동안 들어온 펄수 수를 카운팅 하는 방법이 있다. 이를 M방식이라 한다. 또한, 펄스와 펄스 사이의 시간을 측정하는 방법이 있다. 이를 T방식이라 한다. M방식과 T방식을 함께 사용하는 방법을 M/T방식이라 한다. 이중에서 가장 성능이 좋은 방식은 M/T방식을 이용하여 모터 운전에 필요한 모터 속도를 측정하는 것이다. In general, the method of measuring the speed of a motor with an encoder output pulse during motor operation using an encoder is as follows. First, there is a method of counting the number of pearls coming in for a certain time. This is called the M method. There is also a method of measuring the time between pulses. This is called the T method. The method of using the M method and the T method together is called the M / T method. Among them, the best performance method is to measure motor speed required for motor operation using M / T method.

도1에는 각각 M 방식, T 방식, M/T 방식을 나타내는 파형도가 도시되어 있다.FIG. 1 is a waveform diagram showing an M method, a T method, and an M / T method, respectively.

M 방식은 다음의 수식(RPM = (60*m*2π) / (2π*Tc*Ppr),Ppr : 1회전당 엔코더 펄스 수, Tc : 측정 주기, m : Tc동안의 펄스 수)을 이용하여 구하게 된다. 이렇게 일정 시간 동안 카운트된 펄스는 다음 수학식1을 통하여 속도를 얻을 수 있다. 도1a의 POSCNT 번지는 TMS320F2833X 계열의 DSP 칩에 있는 설정된 일정 시간 동안에 카운트 된 수를 저장해두는 저장번지이다.The M method uses the following formula (RPM = (60 * m * 2π) / (2π * Tc * Ppr), Ppr: encoder pulses per revolution, Tc: measurement cycle, m: pulses during Tc) You will get it. The pulse counted for a predetermined time may be obtained through Equation 1 below. The POSCNT address of FIG. 1A is a storage address that stores a counted number of times for a predetermined time set in a TMS320F2833X series DSP chip.

도1b는 T방식을 TMS320F2833X계열의 DSP로 구현 시 그림이다. 도1b에서 QCTMR 번지는 펄스와 펄스 사이의 시간을 카운트하여 저장해주는 저장번지이다. 이렇게 저장 된 시간은 다음 수식(Rpm = 60 / (△T *Ppr), Ppr : 1회전당 엔코더 펄스 수, △T : 펄스와 펄스 사이 시간)를 통하여 속도를 얻을 수 있다. Figure 1b is a diagram when the T method is implemented with a DSP of the TMS320F2833X series. In FIG. 1B, the QCTMR address is a storage address that counts and stores a time between pulses. The stored time can be obtained by the following formula (Rpm = 60 / (△ T * Ppr), Ppr: number of encoder pulses per revolution, ΔT: time between pulse and pulse).

도1c는 M/T방식에 대한 일반적인 그림이다. M/T방식은 일정 시간동안 입력된 엔코더 펄스 수와 그 펄스들의 입력 시간을 이용하여 측정하는 방법이다. 즉, 일정 시간 동안의 펄스 m과 이 펄스 m에 대한 △T를 이용하여 다음 수식3(RPM = 60*m / (Ppr * △T))을 통하여 속도를 구할 수 있다.Figure 1c is a general diagram for the M / T method. The M / T method is a method of measuring by using the number of encoder pulses input for a predetermined time and the input time of the pulses. That is, using the pulse m for a predetermined time and ΔT for this pulse m, the speed can be obtained through the following equation (3) (RPM = 60 * m / (Ppr * ΔT)).

전술한 TMS320F2833X 계열의 DSP 칩은 유저가 사용하기 편리한 엔코더 모듈을 탑재하고 있다. 그러나, 유저가 가변을 할 수 있는 사항이 매우 축소되어있어서, 도1a 와 도2b와 같이 M방식과 T방식 각각의 방식으로만 사용이 가능하였다. The DSP chip of the TMS320F2833X series described above is equipped with an encoder module that is easy to use by a user. However, the matters that can be changed by the user are greatly reduced, and thus, only the M and T methods can be used as shown in FIGS. 1A and 2B.

그러나, M방식의 경우 저속에서 정보가 부족하여 저속에서의 오차라는 단점이 있으며, T방식의 경우 고속에서의 펄스와 펄스 사이의 시간을 정확하게 측정하는 것의 어려움 및 고속에서 빈번한 연산이 필요한 단점이 있다.
However, in the case of the M method, there is a shortcoming in the low speed due to lack of information in the low speed, in the case of the T method, there is a disadvantage in that it is difficult to accurately measure the time between the pulse at high speed and frequent operation at high speed. .

본 발명은 M방식과 T방식의 단점을 보완하고자 M/T 방식을 용이하게 수행할 수 있는 방법을 제공하기 위한 것이다. 또한, 속도 측정 도중 새로운 펄스가 입력되어도 오차 없이 속도 측정을 할 수 있는 M/T 방식을 제공한다.
The present invention is to provide a method that can easily perform the M / T method to compensate for the disadvantages of the M and T method. In addition, it provides a M / T method that can measure the speed without error even if a new pulse is input during the speed measurement.

본 발명은 모터의 속도를 측정하기 위해 캠코더에서 90도 위상을 가지고 제공되는 A상 신호와 B상 신호의 기준 천이시점에 대응하여 천이 타이밍을 가지는 기준파형을 생성하는 단계; 상기 기준파형이 천이되는 타이밍인 제1 기준천이시점에 상기 A상 신호와 B상 신호의 천이 횟수에 대응하는 제1 M 값을 저장하는 단계; 상기 기준천이시점에 상기 A상 신호와 B상 신호의 천이 횟수에 대응하여 카운팅되는 타이머에서 제공되는 제1 T 값을 제공하는 단계; 상기 제1 기준천이 시점보다 예정된 타이밍 후인 제2 기준천이 시점에 상기 A상 신호와 B상 신호의 천이 횟수에 대응하는 제2 M 값을 저장하는 단계; 상기 제2 기준천이 시점에 상기 A상 신호와 B상 신호의 천이 횟수에 대응하여 카운팅되는 타이머에서 제공되는 제2 T 값을 제공하는 단계; 상기 제1 M값과 제2 M값을 비교하여 같으면, 상기 제1 M값과 상기 제1 T값을 이용하여 상기 모터의 속도를 구하는 단계; 및 상기 제1 M값과 제2 M값을 비교하여 같지 않으면, 상기 제2 M값과 상기 제2 T값을 이용하여 상기 모터의 속도를 구하는 단계를 포함하는 속도측정방법을 제공한다.The present invention provides a method of generating a reference waveform having a transition timing corresponding to reference transition time points of an A-phase signal and a B-phase signal provided with a 90-degree phase from a camcorder to measure a speed of a motor; Storing a first M value corresponding to the number of transitions of the A-phase signal and the B-phase signal at a first reference transition time, which is a timing at which the reference waveform transitions; Providing a first T value provided by a timer that is counted corresponding to the number of transitions of the A-phase signal and the B-phase signal at the reference transition time point; Storing a second M value corresponding to the number of transitions of the A-phase signal and the B-phase signal at a second reference transition time point that is after a predetermined timing from the first reference transition time point; Providing a second T value provided by a timer counting corresponding to the number of transitions of the A-phase signal and the B-phase signal at the second reference transition time point; Comparing the first M value with the second M value and obtaining the speed of the motor using the first M value and the first T value; And comparing the first M value with the second M value to obtain the speed of the motor using the second M value and the second T value.

또한, 상기 예정된 타이밍은 상기 기준파형의 1/2 주기보다 작은 것을 특징으로 한다.The predetermined timing may be smaller than a half period of the reference waveform.

또한, 상기 A상 신호와 B상 신호의 기준 천이시점에 대응하여 천이 타이밍을 가지는 기준파형은 상기 A상 신호와 상기 B상 신호를 배타적 논리합 로직을 수행하여 생성하는 것을 특징으로 한다.
The reference waveform having a transition timing corresponding to a reference transition time point of the A-phase signal and the B-phase signal may be generated by performing an exclusive OR logic on the A-phase signal and the B-phase signal.

본 발명에 의해서 M/T 방식으로 용이하게 엔코더의 속도를 측정할 수 있다. 또한 속도를 측정하는 도중에 새로운 펄스가 입력되어도 오차 없이 속도 측정을 할 수 있다.
According to the present invention, the speed of an encoder can be easily measured in an M / T method. In addition, the speed can be measured without error even if a new pulse is input during the speed measurement.

도1은 엔코더를 이용하여 속도를 얻는 다양한 방법을 도시한 파형도.
도2는 광학식 엔코더의 회전원판 및 동작 파형도.
도3은 엔코더의 동작을 나타내는 파형도.
도4는 엔코더 신호의 상태를 나타내는 파형도.
도5는 도4에 도시된 파형에 따라 상태의 변화와 카운터의 증감을 나타내는 도면.
도6은 엔코더 처리 진리표를 나타내는 도면.
도7은 본 발명의 실시예에 따른 엔코더의 속도를 측정하기 위한 제어부의 내부 블럭도.
도8은 도7에 도시된 제어부의 동작을 나타내는 파형도.
도9는 도7에 도시된 제어부와 엔코더의 연결 및 그동작을 나타내는 블럭도.
도10은 캡쳐 레지스터를 나타내는 블럭도.
도11은 본 발명에 의한 엔코더의 속도를 측정하는 방법을 나타내는 파형도.
도12는 본 발명의 M/T 방법을 구현하는데 필요한 하드웨어 및 그 방법을 나타내기 위한 블럭도.
도13은 본 발명에 의한 엔코더의 속도를 측정하는 방법을 나타내는 플로차트.
1 is a waveform diagram showing various methods of obtaining speed using an encoder;
2 is a rotating disc and an operating waveform diagram of an optical encoder.
3 is a waveform diagram showing the operation of an encoder;
4 is a waveform diagram showing a state of an encoder signal;
FIG. 5 is a diagram showing a change in state and a change in a counter according to the waveform shown in FIG. 4; FIG.
Fig. 6 is a diagram showing an encoder processing truth table.
7 is an internal block diagram of a control unit for measuring the speed of an encoder according to an embodiment of the present invention.
FIG. 8 is a waveform diagram showing the operation of the control unit shown in FIG. 7; FIG.
FIG. 9 is a block diagram showing the connection and operation of an encoder and a controller shown in FIG.
Fig. 10 is a block diagram showing a capture register.
Fig. 11 is a waveform diagram showing a method of measuring the speed of an encoder according to the present invention.
Fig. 12 is a block diagram showing hardware required for implementing the M / T method of the present invention and the method.
Fig. 13 is a flowchart showing a method of measuring the speed of an encoder according to the present invention.

이하, 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 본 발명의 기술적 사상을 용이하게 실시할 수 있을 정도로 상세히 설명하기 위하여, 본 발명의 가장 바람직한 실시 예를 첨부된 도면을 참조하여 설명하기로 한다.DETAILED DESCRIPTION Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings so that those skilled in the art may easily implement the technical idea of the present invention. do.

본 발명에서는 TMS320F2833X계열의 TI사의 제공하는 DSP를 사용하여 M/T방식을 구현할 수 있는 방법을 제시하고 있다. M/T방식이 M방식과 T방식에 비해서 모터의 속도를 엔코더 신호를 통해서 계산할 때, 더 정확하고 효율적으로 계산할 수 있다. The present invention proposes a method for implementing an M / T method using a DSP provided by TI of the TMS320F2833X series. Compared to the M and T methods, the M / T method can calculate the motor speed through encoder signals more accurately and efficiently.

그러나 TMS320F2833X는 래치 기능이 없기 때문에 M/T 방식을 기본적으로 제공하고 있지 않는데, TMS320F2833X가 가지고 있는 다른 기능 중에 하나인 캡쳐 (Capture) 기능을 이용하여 M/T방식을 구현할 수 있다. 이렇게 TMS320F2833X 계열의 DSP 칩을 이용하여 M/T방식을 구현하게 되면, FPGA와 같은 추가의 하드웨어를 사용하지 않기 때문에 비용을 줄일 수 있고, PCB의 면적도 줄어들게 된다. 부가의 하드웨어 없이 TMS320F2833X 계열의 칩만을 이용하여 M/T를 구현함으로써 얻게 되는 이득이 본 특허의 핵심중 하나이기는 하나, TMS320F2833X의 DSP 칩이 아닌 캡쳐 기능이 있는 DSP 칩에서도 본 발명을 구현할 수 있다. However, since the TMS320F2833X does not have a latch function, the M / T method is not provided by default. The TMS320F2833X has a capture function, which is one of the other functions of the TMS320F2833X, to implement the M / T method. This M / T implementation using the TMS320F2833X series of DSP chips can reduce costs and reduce PCB area by eliminating additional hardware such as FPGAs. Although the gain from implementing M / T using only the TMS320F2833X family of chips without additional hardware is one of the cores of the patent, the present invention can also be implemented in a DSP chip having a capture function rather than the DSP chip of the TMS320F2833X.

엔코더는 회전형 모터의 축에 부착되어 모터가 회전하면 엔코더의 축도 같이 회전하게 되고, 엔코더에 전원이 제공되면 A, B상으로 불리는 신호를 내보내게 된다. The encoder is attached to the shaft of the rotary motor. When the motor rotates, the encoder shaft rotates together. When the power is supplied to the encoder, it sends out signals called A and B phases.

도2는 광학식 엔코더의 회전원판 및 동작 파형도이다. 도3은 엔코더의 동작을 나타내는 파형도이다. 도4는 엔코더 신호의 상태를 나타내는 파형도이다. 도5는 도4에 도시된 파형에 따라 상태의 변화와 카운터의 증감을 나타내는 도면이다. 도6은 엔코더 처리 진리표를 나타내는 도면이다.2 is a rotating disc and an operating waveform diagram of an optical encoder. 3 is a waveform diagram showing an operation of an encoder. 4 is a waveform diagram showing a state of an encoder signal. FIG. 5 is a diagram illustrating a change of state and a change of a counter according to the waveform shown in FIG. 4. Fig. 6 is a diagram showing an encoder processing truth table.

도2에 도시된 바와 같이, 엔코더에는 회전형의 원판에 슬롯이 뚤려 있고, 원판의 뒤에는 LED 등을 통하여 빛을 투사한다. 원판이 회전하면 빛이 통과할 때와 하지 않는 상태에 따라서 QEPA와 QEPB, QEPI의 신호를 만들어 낼 수 있다. QEPA와 QEPB의 신호를 만들어 내기 위해서 2개의 원판을 이용하여 슬롯이 절반만 겹치도록 배치한다. 그러면 회전방향에 따라서 QEPA와 QEPB 신호의 순서가 바뀌게 된다. 또한 회전 속도에 따라서 QEPA, QEPB의 펄스의 주기가 변하게 된다. 이를 통해서 모터의 회전방향과 회전속도를 모두 검출할 수 있게 된다. 엔코더의 사양에 PPR(Pulse Per Revolution)이라는 것이 있다. 1회전당 몇 개의 펄스를 내보내는지를 나타내 주는 값이다. 이 값이 크면 보다 정밀한 위치 및 속도 계산이 가능하게 된다.As shown in Fig. 2, the encoder has a slotted slot on a rotatable disk, and the back of the disk projects light through an LED or the like. Rotating the disk can produce signals for QEPA, QEPB, and QEPI depending on when light is passing through or not. In order to generate the signals of QEPA and QEPB, two discs are used so that the slots overlap only half. Then, the order of the QEPA and QEPB signals is changed according to the rotation direction. In addition, the period of the pulses of the QEPA and QEPB changes according to the rotation speed. Through this, both the rotation direction and the rotation speed of the motor can be detected. The encoder specification is called PPR (Pulse Per Revolution). This value indicates how many pulses are emitted per revolution. Larger values allow more accurate position and velocity calculations.

eQEP(enhanced Quadrature Encoder Pulse)모듈은 엔코더의 A, B상 신호의 출력을 이용하여 모터의 속도를 계산할 수 있도록 하는 하드웨어 기능을 지칭한다. 계속해서 eQEP 모둘을 통해서 펄스를 세는 원리를 설명한다. 도3에서는 엔코더 신호와 펄스 카운터 및 방향 신호가 어떻게 변하는지를 보여준다. QDIR=1인 경우에는 정방향으로 회전하고, QDIR=0인 경우에는 역방향으로 회전한다. QPOSCNT는 펄스카운터의 변화를 보여준다. +1은 펄스카운터가 1 증가하고 -1은 펄스카운터가 1 감소하였음을 보여준다. The Enhanced Quadrature Encoder Pulse (eQEP) module refers to a hardware function that allows the speed of the motor to be calculated using the output of the encoder's A and B phase signals. Continuing, we explain the principle of counting pulses through the eQEP module. 3 shows how the encoder signal, the pulse counter, and the direction signal change. When QDIR = 1, the motor rotates in the forward direction, and when QDIR = 0, the motor rotates in the reverse direction. QPOSCNT shows the change in pulse counter. +1 indicates that the pulse counter is increased by 1 and -1 is the pulse counter is decreased by 1.

이제 어떻게 QPOSCNT의 증가, 감소를 결정할 수 있는지를 설명한다. 도4에서는 엔코더 출력 신호 QEPA, QEPB가 0, 1의 값을 같게 될 때, 그 상태를 00, 01, 10, 11로 할당한 것을 보여준다. 파형의 상태에 따라 할당되는 것을 나타내는 것이 도4이고, 그에 따라 상태의 변화와 카운터의 증감을 나타내는 것이 도5이다. 도6에는 엔코더 처리 진리표가 도시되어 있다.We will now explain how to determine the increase or decrease of QPOSCNT. In FIG. 4, when the encoder output signals QEPA and QEPB have the same value of 0 and 1, the state is assigned to 00, 01, 10, 11. Fig. 4 shows the allocation according to the state of the waveform, and Fig. 5 shows the change of state and the increase and decrease of the counter. 6 shows an encoder processing truth table.

도7은 본 발명의 실시예에 따른 엔코더의 속도를 측정하기 위한 제어부의 내부 블럭도이다 특히 캡쳐 레지스터를 중심으로 도시한 것이다. 도8은 도7에 도시된 제어부의 동작을 나타내는 파형도이다.7 is an internal block diagram of a controller for measuring the speed of an encoder according to an embodiment of the present invention. FIG. 8 is a waveform diagram illustrating the operation of the controller illustrated in FIG. 7.

도7과 도8을 참조하면, TMS320F2833X 계열의 DPS 칩에서 구비된 eCAP모듈은 이러한 처리를 통하여 엔코더 신호를 입력받아 QPOSCNT라는 레지스터(DSP 칩에서 데이터가 저장되는 일종의 기억장치)에 저장해주게 되고, 이 값을 읽게 되면 모터가 얼마만큼 회전했는지를 알 수 있게 된다.Referring to Figures 7 and 8, the eCAP module provided in the TMS320F2833X series DPS chip receives the encoder signal through this processing and stores it in a register called QPOSCNT (a type of memory device in which data is stored in the DSP chip). Reading the value will tell you how much the motor has rotated.

이제 TMS320F2833X 계열에서 왜 쉽게 M/T를 구현할 수 없는지 설명한다. 일반적으로 M/T를 쉽게 구현하기 위해서는 캡쳐 기능이 있어야 한다. 캡쳐 기능이란 어떤 레지스터의 현재값을 특정 이벤트(어떤 조건이 만족되는 순간)가 발생시에 임시 기억 장소에 저장하는 것을 말한다. This article explains why M / T cannot be easily implemented in the TMS320F2833X series. In general, in order to easily implement M / T, a capture function should be provided. The capture function saves the current value of a register to a temporary memory when a certain event occurs (the moment a condition is met).

M/T 방법에서 특정 이벤트란 펄스 카운터가 변화하는 순간이고, 임시 기억 장소에 옮겨야 할 값은 M값과 T값이다. M값은 QPOSCNT와 같이 펄스 카운터 레지스터를 사용하고, T값은 펄스가 변하는 순간의 타이머 값을 사용한다. 프리 런너 타이머(Free Running Timer)란 일정한 클럭으로 계속 증가하는 타이머를 의미한다. 타이머가 최대값에 도달하면 다시 0으로 초기화된다. 16비트 타이머인 경우에는 65535까지 증가하였다가 다시 0이 되고 증가를 시작한다.In the M / T method, a specific event is the moment when the pulse counter changes, and the values to be moved to the temporary storage place are the M value and the T value. The M value uses a pulse counter register like QPOSCNT and the T value uses the timer value at the moment the pulse changes. A free running timer means a timer that continuously increases with a constant clock. When the timer reaches its maximum value, it is reset to zero. In the case of a 16-bit timer, it increments up to 65535 and then goes back to 0 and starts incrementing.

캡쳐 레지스터가 있으면, POSCNTCAP과 TCAP값을 이용하여 이전에 캡쳐가 된 시점부터 현재 캡쳐가 된 순간까지의 평균적인 속도를 정확히 계산할 수 있다. 캡쳐 레지스터는 2개가 한 세트로 동작해야 한다. POSCNTCAP값만 읽은 상태에서 이벤트가 발생하여 TCAP이 새로운 값으로 바뀌어 버리면 안된다. 이런 오동작을 방지하기 위해서 캡쳐 인에이블 디스에이블(Enable/Disable) 기능이 필요하다. 디스에이블(Disable)되어 있는 동안에는 이벤트가 발생하여도 캡쳐 레지스터의 값은 변하지 않고 그대로 유지된다. With capture registers, the POSCNTCAP and TCAP values can be used to accurately calculate the average speed from the time of the previous capture to the moment of the current capture. Two capture registers must be operated in one set. An event should occur with only the POSCNTCAP value read and the TCAP should not change to the new value. To prevent this malfunction, the capture enable / disable function is required. While disabled, the capture register's value remains unchanged even if an event occurs.

TMS320F2833X 계열의 DSP 칩에서는 캡쳐 이벤트가 발생하면 도8에서 볼 수 있듯이 프리 런너 타이머가 자동으로 리셋된다. 속도측정주기(속도측정인터럽트, 보통 1ms) 안에서 여러 개의 이벤트가 발생할 수 있는데, 이벤트가 발생할 때마다 프리 런너 타이머가 리셋된다고 하면, 마지막 이벤트에서 읽은 타이머 캡쳐값으로부터 시작 이벤트로부터 마지막 이벤트까지의 시간 증가를 알 수가 없게 된다. 그러므로 M/T 방법을 기존의 방식대로 구현하기 어렵다. 이러한 어려움으로 본 실시예에서는 인해서 타이머 캡쳐를 다른 방식으로 구현하기 위해서 TMS320F2833X의 eCAP기능을 사용한다.In the TMS320F2833X series of DSP chips, the free-runner timer is automatically reset when a capture event occurs, as shown in Figure 8. Multiple events can occur within the speed measurement interval (speed measurement interrupt, usually 1ms) .If the free runner timer is reset each time an event occurs, the time from the start event to the last event is increased from the timer capture value read in the last event. You will not know. Therefore, it is difficult to implement M / T method in the existing way. Due to this difficulty, the present embodiment uses the eCAP function of the TMS320F2833X to implement timer capture in another way.

도9는 도7에 도시된 제어부와 엔코더의 연결 및 그 동작을 나타내는 블럭도이다. 도10은 캡쳐 레지스터를 나타내는 블럭도이다. 도11은 본 발명에 의한 엔코더의 속도를 측정하는 방법을 나타내는 파형도이다. 도12는 본 발명에 의한 엔코더의 속도를 측정하는 방법을 나타내는 플로차트이다.FIG. 9 is a block diagram illustrating a connection between a controller and an encoder illustrated in FIG. 7 and an operation thereof. 10 is a block diagram showing a capture register. 11 is a waveform diagram showing a method of measuring the speed of an encoder according to the present invention. 12 is a flowchart showing a method of measuring the speed of an encoder according to the present invention.

계속해서 도9 내지 도12를 참조하여 TMS320F2833X 계열의 eCAP 기능에 대해서 설명한다. eCAP기능은 특정 이벤트가 발생할 때, 특정 레지스터값을 캡쳐하여 또 다른 레지스터(캡쳐 레지스터라고 한다)에 보관하는 기능이다. 여기에서 이벤트는 TMS320F2833X 계열의 DSP 칩에서 핀으로 입력되는 신호의 에지(edge)가 되도록 설정할 수 있다. 이 기능을 사용하기 위해 회로를 도9와 같이 구성한다. eQEP모듈의 A, B 입력에 A상, B상 신호를 연결한다. A상과 B상 신호를 XOR 로직 게이트의 입력에 연결하고 그 출력을 eCAP모듈의 입력에 연결한다. 이렇게 함으로써 eCAP모듈의 입력에는 A펄스와 B펄스의 XOR 게이트의 신호처리 지연에 의해서 TMS320F2833X 계열의 DSP 칩에 구비된 카운터 값과 캡쳐 값이 동시에 변하지 않는 경우가 생길 수 있다. 이러한 경우에 대한 처리방법도 본 특허의 핵심 중에 하나이다. 모터 속도의 최대값에 의해서 펄스가 들어올 수 있는 최대값을 가정한다. 만약 100,000 rpm의 모터에 1024 PPR의 엔코더를 부착한 경우에, 10000/60ⅹ(1024ⅹ4) pulse/sec = 6826667 pulse/sec이고, 역수를 취하면, 0.146 us/pulse 가 된다. Next, the eCAP function of the TMS320F2833X series will be described with reference to FIGS. 9 to 12. The eCAP function captures the value of a specific register when a specific event occurs and stores it in another register (called a capture register). Here, the event can be set to be the edge of the signal input to the pin from the TMS320F2833X series of DSP chips. To use this function, the circuit is constructed as shown in FIG. Connect A, B phase signal to A, B input of eQEP module. Connect A-phase and B-phase signals to the inputs of the XOR logic gates and connect their outputs to the inputs of the eCAP module. By doing so, the counter value and the capture value included in the TMS320F2833X series DSP chips may not change at the input of the eCAP module due to the signal processing delay of the XOR gates of the A pulse and the B pulse. The treatment for such a case is also one of the cores of the patent. The maximum value at which the pulse can enter is assumed by the maximum value of the motor speed. If a 1024 PPR encoder is attached to a 100,000 rpm motor, 10000/60 Hz (1024 ⅹ 4) pulse / sec = 6826667 pulse / sec, and the inverse would be 0.146 us / pulse.

위치정보를 저장하고 있는 카운터(QPOSCNT)를 읽은 후에 시간정보를 저장하고 있는 CAP레지스터를 읽는 도중에 새로운 카운터 펄스가 들어오면 CAP레지스터가 변하게 된다. 이렇게 되면 시간정보가 잘못되어 M/T 계산이 잘못된다. 이러한 현상을 없애기 위해서 카운터 펄스를 다시 한번 읽어서 이값이 이전에 읽은 값과 다르다면, CAP 레지스터가 잘못되었을 가능성이 있으므로 이값을 사용하지 않고 새로 읽은 CAP 레지스터 값을 사용한다.After reading the counter QPOSCNT that stores the location information, if the new counter pulse is received while reading the CAP register that stores the time information, the CAP register changes. In this case, the time information is wrong and the M / T calculation is wrong. To avoid this, if the counter pulse is read again and this value is different from the previously read value, the CAP register may be wrong. Therefore, the newly read CAP register value is used instead of this value.

전동기의 속도 측정을 M/T방식으로 하기 위해서는 TMS320F2833X 계열의 칩 구조상 eQEP 모듈과 eCAP모듈을 사용하게 된다. 그러나, TMS320F2833X 계열의 칩에 있는 eCAP은 랫치 기능이 없기 때문에 엔코더 카운트를 한번 더 읽어야 하는 경우가 발생한다. 속도 제어주기(=측정 주기)에 해당하는 인터럽트가 발생하면, 엔코더 카운트는 Position_Latch(QPOSLAT 레지스터)로 래치되어 저장 되어있다. 그러나 △T는 래치되지 않기 때문에, 인터럽트 발생 직후 바로 eCAP의 캡쳐 값을 차례로 읽어온다. 새로운 펄스가 들어오면, 캡쳐 값이 증가함으로 카운트는 Position_Latch(QPOSLAT레지스터)로 래치된 값이 아닌 Real_position(QPOSCNT레지스터)를 읽어온다.In order to measure the speed of motor by M / T method, eQEP module and eCAP module are used because of chip structure of TMS320F2833X series. However, the eCAP on the TMS320F2833X family of chips does not have a latching function, requiring the encoder count to be read once more. When an interrupt corresponding to the speed control cycle (= measurement cycle) occurs, the encoder count is latched and stored in the Position_Latch (QPOSLAT register). However, since ΔT is not latched, the eCAP capture values are read in sequence immediately after the interrupt occurs. As a new pulse comes in, the capture value is incremented so the count reads Real_position (QPOSCNT register), not the value latched into Position_Latch (QPOSLAT register).

측정 주기 인터럽트가 발생을 하면, 직후 위치_1(QPOSCNT 레지스터)값, CAP_1(CAP1~4까지 4개 레지스터)값, 위치_2 값(QPOSCNT 레지스터), CAP_2(CAP1~4까지 4개 레지스터) 값을 차례로 읽어 두 개의 위치 값이 같으면 CAP_1 값을 취하고, 위치 값이 서로 다르면 CAP_2 값을 취하였다. 이와 같이 동일한 기능의 값을 두 번 씩 취득하는 이유는 앞에서 설명하였듯이 속도 측정을 위해 레지스터를 읽는 도중 새로운 펄스가 들어오는 경우 발생하는 오차를 제거하기 위함이다.When the measurement cycle interrupt occurs, immediately after the value of position_1 (QPOSCNT register), CAP_1 (four registers from CAP1 to 4), position_2 value (QPOSCNT register), and CAP_2 (four registers from CAP1 to 4) In order to read these two values, the CAP_1 value is taken. If the location values are different, the CAP_2 value is taken. The reason for obtaining the same function value twice is to eliminate the error that occurs when a new pulse comes in while reading the register for speed measurement as described above.

즉, 그림 4에서와 같이 측정 주기가 되었을 경우 그림4에서의 (3)과 같이 펄스가 입력이 되면, 펄스가 한 개 증가된 것 처럼 인식하여 실제 속도 보다 높거나(펄스 개수는 증가되나 시간에 대한 정보 갱신이 되지 않는 경우), 낮게(시간 정보는 갱신 되었으나, 펄스가 갱신 되지 않는경우) 측정이 된다.In other words, when the measurement period is reached as shown in Figure 4, when the pulse is input as shown in (3) in Figure 4, it is recognized that one pulse is increased and is higher than the actual speed (the number of pulses is increased but If the information is not updated), the measurement is made low (time information is updated but the pulse is not updated).

따라서, 그림 4에서의 (3)과 같은 펄스가 입력 되어도 오차가 없도록 측정하기 위해서 두 번 씩 측정을 하여, 펄스 수가 변화되었을 경우 앞에서 설명 한것과 같이 2_CAP 값을 취하여 오차를 제거한다.Therefore, in order to measure no error even if the pulse like (3) in Figure 4 is input, measure twice and if the number of pulses is changed, take the 2_CAP value as described above and remove the error.

이렇게 측정 된 위치 값은 기존 위치 카운터와의 차이(△M)를 구한다.The measured position value is calculated as the difference (△ M) from the existing position counter.

펄스 시간(△T)를 구하는 방법은 다음과 같다. The method for obtaining the pulse time DELTA T is as follows.

선정한 CAP값 중 CAP1~4중 가장 큰 값을 취득한다. 이렇게 구해진 CAP값은 새로운 시간이 되며, 기존 시간과의 차이로 펄스 시간을 구한다. 이렇게 구해진 △M과 △T를 이용하여 다음 수식4(RPM = 60*m / (Ppr * △T))와 같이 전동기 속도를 구할 수 있다.Acquire the largest value among CAP1 ~ 4 among the selected CAP values. The CAP value thus obtained becomes a new time, and the pulse time is obtained by a difference from the existing time. Using ΔM and ΔT thus obtained, the motor speed can be obtained as shown in Equation 4 (RPM = 60 * m / (Ppr * ΔT)).

본 발명을 통하여 M/T 방식의 전동기 속도 검출을 TMS320F2833X계열의 DSP기반에서도 가능하게 되었다. 그에 따라, TMS320F2833X계열의 DSP기반에서도 저속에서 고속까지 전 영역에서 전동기 속도 검출이 매우 정확하게 측정할 수 있으며, 측정 도중 새로운 펄스가 입력 되어도 그에 따른 오차가 없도록 속도 연산이 가능하다. 전동기 속도 측정 뿐 만 아니라, MPG(Manual pulse generator)와 같이 펄스를 이용하여 지령을 만들어주는 장치에서도 사용이 가능하다. 또한, 전동기 동기 운전등, 다른 장치에서 만들어진 펄스를 이용하여 제어하고자 하는 전동기의 속도 지령으로 이용 시에도 가능하다.
Through the present invention, it is possible to detect the motor speed of the M / T method even in the DSP base of the TMS320F2833X series. Accordingly, even in the DSP-based TMS320F2833X series, motor speed detection can be measured very accurately in all areas from low speed to high speed, and speed calculation can be performed without any error even if a new pulse is input during measurement. In addition to measuring motor speed, it can be used in devices that generate commands using pulses such as MPG (Manual pulse generator). It is also possible to use it as a speed command of the motor to be controlled by using pulses generated by other devices, such as motor synchronous operation.

도12은 본 발명의 M/T 방법을 구현하는데 필요한 하드웨어 및 그 방법을 나타내기 위한 블럭도이다.Figure 12 is a block diagram showing the hardware required for implementing the M / T method of the present invention and the method.

본 실시예에 따른 M/T 값을 구하기 위해서는 엔코더(60)에 제공되는 A상 신호와 B상 신호를 배타적 논리합하기 위한 로직게이트(62)와, M값 제공부(61), 계산부(64), 카운트(63)를 포함한다.In order to obtain the M / T value according to the present embodiment, a logic gate 62 for exclusively ORing the A-phase signal and the B-phase signal provided to the encoder 60, the M value providing unit 61, and the calculation unit 64. ), A count 63.

카운트는 예정된 값까지 A상 신호와 B상 신호가 출력되는 순간부터 카운팅을 한다. M값 제공부(61)는 A상 신호와 B상 신호를 입력받아 그 천이되는 횟수에 따른 M 값을 저장하고 출력한다. 로직게이트(62)는 A상 신호와 B상 신호의 기준 천이시점에 대응하여 천이되는 기준파형을 출력한다. 도12의 하단에 A상 신호와 B상 신호와 로직게이트(62)의 출력신호의 파형이 도시되어 있다.The count is counted from the moment the A-phase signal and the B-phase signal are output up to a predetermined value. The M value providing unit 61 receives the A-phase signal and the B-phase signal, and stores and outputs the M value according to the number of transitions thereof. The logic gate 62 outputs a reference waveform that transitions in response to the reference transition time of the A-phase signal and the B-phase signal. 12, waveforms of the A-phase signal, the B-phase signal, and the output signal of the logic gate 62 are shown.

계산부(64)는 2개의 레지스터를 구비하여, 속도를 측정할 시점(k1,k2)에 M값 제공부(61)에서 제공되는 제1 M값과, 제2 M값과, 카운트에서 제공되는 제1 카운팅값과 제2 카운팅값을 저장한다. The calculation unit 64 includes two registers, and the first M value provided by the M value providing unit 61, the second M value, and the count are provided at the time points k1 and k2 at which the speed is measured. The first counting value and the second counting value are stored.

계산부(64)에 입력된 2개의 M값은 같은 값인지 비교하여 같은 값이면, 먼저 입력된 제1 카운팅 값과 제1 M값을 이용하여 M/T 방식의 속도를 구한다. 만약 같은 값이 아니면, 제2 카운팅 값과 제2 M 값을 이용하여 M/T 방식의 속도를 구한다.If the two M values input to the calculation unit 64 are equal to each other and are the same value, the speed of the M / T method is obtained using the first counting value and the first M value input first. If it is not the same value, the speed of the M / T method is obtained using the second counting value and the second M value.

이렇게 속도를 측정할 시점에 두번(k1, k2) 연속해서 M값과 T값을 입력받아 서로 비교하는 이유는 속도를 측정할 시점에 기준파형이 천이되면, 새로운 M값과 T값이 제공되고, 그 새롭게 제공된 값을 이용하여 M/T 방식의 속도를 구하게 함으로서 정확한 속도를 측정할 수 있게 된다. The reason why the M and T values are inputted and compared with each other twice (k1, k2) at the time of measuring the speed is that when the reference waveform changes at the time of measuring the speed, new M and T values are provided. By using the newly provided value, the speed of the M / T method can be obtained, so that accurate speed can be measured.

도13은 본 발명에 의한 엔코더의 속도를 측정하는 방법을 나타내는 플로차트이다.Fig. 13 is a flowchart showing a method of measuring the speed of an encoder according to the present invention.

도13을 참조하여 본 실시예에 따른 속도 측정방법을 살펴보면, 모터의 속도를 측정하기 위해 캠코더에서 90도 위상을 가지고 제공되는 A상 신호와 B상 신호의 기준 천이시점에 대응하여 천이 타이밍을 가지는 기준파형을 생성한다.Referring to FIG. 13, a speed measuring method according to the present embodiment has a transition timing corresponding to reference transition time points of the A-phase signal and the B-phase signal provided with a 90-degree phase from a camcorder to measure the motor speed. Generate a reference waveform.

이어서, 상기 기준파형이 천이되는 타이밍인 제1 기준천이시점에 상기 A상 신호와 B상 신호의 천이 횟수에 대응하는 제1 M 값을 저장한다(S1 참조).Subsequently, a first M value corresponding to the number of transitions of the A-phase signal and the B-phase signal is stored at a first reference transition time, which is a timing at which the reference waveform transitions (see S1).

이어서, 상기 기준천이시점에 상기 A상 신호와 B상 신호의 천이 횟수에 대응하여 카운팅되는 타이머에서 제공되는 제1 T 값을 제공한다(S2 참조). 여기서 카운팅 값이 T 값이 된다.Subsequently, a first T value provided by a timer counted corresponding to the number of transitions of the A-phase signal and the B-phase signal is provided at the reference transition point (see S2). Here the counting value is the T value.

이어서, 상기 제1 기준천이 시점보다 예정된 타이밍 후인 제2 기준천이 시점에 상기 A상 신호와 B상 신호의 천이 횟수에 대응하는 제2 M 값을 저장한다(S3 참조).Subsequently, a second M value corresponding to the number of transitions of the A-phase signal and the B-phase signal is stored at a second reference transition time point, which is after a predetermined timing from the first reference transition time point (see S3).

이어서, 상기 제2 기준천이 시점에 상기 A상 신호와 B상 신호의 천이 횟수에 대응하여 카운팅되는 타이머에서 제공되는 제2 T 값을 제공한다(S4 참조).Subsequently, a second T value provided by a timer counted corresponding to the number of transitions of the A-phase signal and the B-phase signal at the second reference transition point is provided (see S4).

이어서, 상기 제1 M값과 제2 M값을 비교하여 같으면(S5 참조), 상기 제1 M값과 상기 제1 T값을 이용하여 선택하여 상기 모터의 속도를 구한다(S6,S8,S9).Subsequently, when the first M value and the second M value are equal to each other (see S5), the first M value and the first T value are selected to determine the speed of the motor (S6, S8, and S9). .

이어서, 상기 제1 M값과 제2 M값을 비교하여 같지 않으면(S5 참조), 상기 제2 M값과 상기 제2 T값을 이용하여 상기 모터의 속도를 구하게 된다(S7,S8,S9).Subsequently, if the first M value and the second M value are not equal to each other (see S5), the speed of the motor is obtained using the second M value and the second T value (S7, S8, and S9). .

또한, 여기서 예정된 타이밍은 상기 기준파형의 1/2 주기보다 작은 것을 특징으로 한다. In addition, the predetermined timing is characterized in that less than one-half period of the reference waveform.

또한, 상기 A상 신호와 B상 신호의 기준 천이시점에 대응하여 천이 타이밍을 가지는 기준파형은 상기 A상 신호와 상기 B상 신호를 배타적 논리합 로직을 수행하여 생성하는 것을 특징으로 한다.The reference waveform having a transition timing corresponding to a reference transition time point of the A-phase signal and the B-phase signal may be generated by performing an exclusive OR logic on the A-phase signal and the B-phase signal.

이상에서 대표적인 실시예를 통하여 본 발명에 대하여 상세하게 설명하였으나, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자는 상술한 실시예에 대하여 본 발명의 범주에서 벗어나지 않는 한도 내에서 다양한 변형이 가능함을 이해할 것이다. 그러므로 본 발명의 권리범위는 설명된 실시예에 국한되어 정해져서는 안되며, 후술하는 특허청구범위뿐만 아니라 이 특허청구범위와 균등한 것들에 의해 정해져야 한다.While the present invention has been particularly shown and described with reference to exemplary embodiments thereof, it is clearly understood that the same is by way of illustration and example only and is not to be construed as limiting the scope of the present invention. I will understand. Therefore, the scope of the present invention should not be limited to the described embodiments, but should be determined by the scope of the appended claims, as well as the appended claims.

Claims (3)

모터의 속도를 측정하기 위해 캠코더에서 90도 위상을 가지고 제공되는 A상 신호와 B상 신호의 기준 천이시점에 대응하여 천이 타이밍을 가지는 기준파형을 생성하는 단계;
상기 기준파형이 천이되는 타이밍인 제1 기준천이시점에 상기 A상 신호와 B상 신호의 천이 횟수에 대응하는 제1 M 값을 저장하는 단계;
상기 기준천이시점에 상기 A상 신호와 B상 신호의 천이 횟수에 대응하여 카운팅되는 타이머에서 제공되는 제1 T 값을 제공하는 단계;
상기 제1 기준천이 시점보다 예정된 타이밍 후인 제2 기준천이 시점에 상기 A상 신호와 B상 신호의 천이 횟수에 대응하는 제2 M 값을 저장하는 단계; 및
상기 제2 기준천이 시점에 상기 A상 신호와 B상 신호의 천이 횟수에 대응하여 카운팅되는 타이머에서 제공되는 제2 T 값을 제공하는 단계;
상기 제1 M값과 제2 M값을 비교하여 같으면, 상기 제1 M값과 상기 제1 T값을 이용하여 상기 모터의 속도를 구하는 단계; 및
상기 제1 M값과 제2 M값을 비교하여 같지 않으면, 상기 제2 M값과 상기 제2 T값을 이용하여 상기 모터의 속도를 구하는 단계를 포함하는 속도측정방법.
Generating a reference waveform having a transition timing corresponding to reference transition time points of the A-phase signal and the B-phase signal provided with a 90-degree phase from the camcorder to measure the speed of the motor;
Storing a first M value corresponding to the number of transitions of the A-phase signal and the B-phase signal at a first reference transition time, which is a timing at which the reference waveform transitions;
Providing a first T value provided by a timer that is counted corresponding to the number of transitions of the A-phase signal and the B-phase signal at the reference transition time point;
Storing a second M value corresponding to the number of transitions of the A-phase signal and the B-phase signal at a second reference transition time point that is after a predetermined timing from the first reference transition time point; And
Providing a second T value provided by a timer counting corresponding to the number of transitions of the A-phase signal and the B-phase signal at the second reference transition time point;
Comparing the first M value with the second M value and obtaining the speed of the motor using the first M value and the first T value; And
And comparing the first M value with the second M value to obtain the speed of the motor using the second M value and the second T value.
제 1 항에 있어서,
상기 예정된 타이밍은 상기 기준파형의 1/2 주기보다 작은 것을 특징으로 하는 속도측정방법.
The method of claim 1,
And said predetermined timing is smaller than one-half period of said reference waveform.
제 1 항에 있어서,
상기 A상 신호와 B상 신호의 기준 천이시점에 대응하여 천이 타이밍을 가지는 기준파형은
상기 A상 신호와 상기 B상 신호를 배타적 논리합 로직을 수행하여 생성하는 것을 특징으로 하는 속도측정방법.
The method of claim 1,
A reference waveform having a transition timing corresponding to the reference transition time point of the A-phase signal and the B-phase signal is
And generating the A-phase signal and the B-phase signal by performing exclusive OR logic.
KR1020100120444A 2010-11-30 2010-11-30 Method for sensing motor speed KR101135253B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020100120444A KR101135253B1 (en) 2010-11-30 2010-11-30 Method for sensing motor speed

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020100120444A KR101135253B1 (en) 2010-11-30 2010-11-30 Method for sensing motor speed

Publications (1)

Publication Number Publication Date
KR101135253B1 true KR101135253B1 (en) 2012-04-12

Family

ID=46143532

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020100120444A KR101135253B1 (en) 2010-11-30 2010-11-30 Method for sensing motor speed

Country Status (1)

Country Link
KR (1) KR101135253B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106645785A (en) * 2016-09-22 2017-05-10 北京京东尚科信息技术有限公司 Device and method for measuring signal frequency of encoder, and operation detection device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07209316A (en) * 1994-01-25 1995-08-11 Matsushita Electric Ind Co Ltd Digital ac servo device
KR19980033797A (en) * 1996-11-01 1998-08-05 추호석 Speed detection device using encoder in motor and its method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07209316A (en) * 1994-01-25 1995-08-11 Matsushita Electric Ind Co Ltd Digital ac servo device
KR19980033797A (en) * 1996-11-01 1998-08-05 추호석 Speed detection device using encoder in motor and its method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106645785A (en) * 2016-09-22 2017-05-10 北京京东尚科信息技术有限公司 Device and method for measuring signal frequency of encoder, and operation detection device

Similar Documents

Publication Publication Date Title
JP6180447B2 (en) Magnetic field sensor for detecting the rotation of an object
Kavanagh Improved digital tachometer with reduced sensitivity to sensor nonideality
US10921767B2 (en) Encoder system
CN103033640B (en) Vehicle speed real-time detection method with field programmable gate array (FPGA)
JP6275051B2 (en) Input capture peripheral with gating logic
KR101135253B1 (en) Method for sensing motor speed
JP6300371B2 (en) Motor drive control device and motor drive control method
JP2007255942A (en) Encoder signal processing device
JP5000325B2 (en) Phase difference detection device and rotational position detection device
JPH061279B2 (en) Digital speed detector
JPH04346069A (en) Speed signal generating circuit
KR0153641B1 (en) Motor rotating position detecting circuit using incremental encoder
Liu et al. Velocity measurement based on alternate M/T method and incremental optical encoder
JPH049266B2 (en)
JPH04355326A (en) Rotary encoder with electrical angle output function
JPH01239463A (en) Rotating speed detecting device
KR19990043005A (en) Motor speed detection device using incremental encoder
KR101121326B1 (en) electronic governer
JP3195801B2 (en) Digital counter device
KR19990001541A (en) Speed detection method and device
RU2171474C1 (en) Gear forming measurement time interval for digital tachometers
JPH05332788A (en) Data processing device for rotary encoder
Mohan et al. Design and characterisation of FPGA based angular accelerometer
JPS59225355A (en) Speed detecting apparatus
JPH0331710A (en) Absolute encoder

Legal Events

Date Code Title Description
A201 Request for examination
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20170403

Year of fee payment: 6

FPAY Annual fee payment

Payment date: 20180403

Year of fee payment: 7

FPAY Annual fee payment

Payment date: 20190401

Year of fee payment: 8