KR100252079B1 - Apparatus for detecting position - Google Patents

Apparatus for detecting position Download PDF

Info

Publication number
KR100252079B1
KR100252079B1 KR1019970051668A KR19970051668A KR100252079B1 KR 100252079 B1 KR100252079 B1 KR 100252079B1 KR 1019970051668 A KR1019970051668 A KR 1019970051668A KR 19970051668 A KR19970051668 A KR 19970051668A KR 100252079 B1 KR100252079 B1 KR 100252079B1
Authority
KR
South Korea
Prior art keywords
exclusive
pulse
circuit
encoder
binary code
Prior art date
Application number
KR1019970051668A
Other languages
Korean (ko)
Other versions
KR19990031101A (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 KR1019970051668A priority Critical patent/KR100252079B1/en
Publication of KR19990031101A publication Critical patent/KR19990031101A/en
Application granted granted Critical
Publication of KR100252079B1 publication Critical patent/KR100252079B1/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
    • FMECHANICAL ENGINEERING; LIGHTING; HEATING; WEAPONS; BLASTING
    • F16ENGINEERING ELEMENTS AND UNITS; GENERAL MEASURES FOR PRODUCING AND MAINTAINING EFFECTIVE FUNCTIONING OF MACHINES OR INSTALLATIONS; THERMAL INSULATION IN GENERAL
    • F16CSHAFTS; FLEXIBLE SHAFTS; ELEMENTS OR CRANKSHAFT MECHANISMS; ROTARY BODIES OTHER THAN GEARING ELEMENTS; BEARINGS
    • F16C41/00Other accessories, e.g. devices integrated in the bearing not relating to the bearing function as such
    • F16C41/007Encoders, e.g. parts with a plurality of alternating magnetic poles
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01PMEASURING LINEAR OR ANGULAR SPEED, ACCELERATION, DECELERATION, OR SHOCK; INDICATING PRESENCE, ABSENCE, OR DIRECTION, OF MOVEMENT
    • G01P13/00Indicating or recording presence, absence, or direction, of movement
    • G01P13/02Indicating direction only, e.g. by weather vane
    • G01P13/04Indicating positive or negative direction of a linear movement or clockwise or anti-clockwise direction of a rotational movement
    • G01P13/045Indicating positive or negative direction of a linear movement or clockwise or anti-clockwise direction of a rotational movement with speed indication
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P7/00Arrangements for regulating or controlling the speed or torque of electric DC motors
    • H02P7/06Arrangements for regulating or controlling the speed or torque of electric DC motors for regulating or controlling an individual dc dynamo-electric motor by varying field or armature current
    • H02P7/18Arrangements for regulating or controlling the speed or torque of electric DC motors for regulating or controlling an individual dc dynamo-electric motor by varying field or armature current by master control with auxiliary power
    • H02P7/24Arrangements for regulating or controlling the speed or torque of electric DC motors for regulating or controlling an individual dc dynamo-electric motor by varying field or armature current by master control with auxiliary power using discharge tubes or semiconductor devices
    • H02P7/28Arrangements for regulating or controlling the speed or torque of electric DC motors for regulating or controlling an individual dc dynamo-electric motor by varying field or armature current by master control with auxiliary power using discharge tubes or semiconductor devices using semiconductor devices
    • H02P7/285Arrangements for regulating or controlling the speed or torque of electric DC motors for regulating or controlling an individual dc dynamo-electric motor by varying field or armature current by master control with auxiliary power using discharge tubes or semiconductor devices using semiconductor devices controlling armature supply only
    • H02P7/29Arrangements for regulating or controlling the speed or torque of electric DC motors for regulating or controlling an individual dc dynamo-electric motor by varying field or armature current by master control with auxiliary power using discharge tubes or semiconductor devices using semiconductor devices controlling armature supply only using pulse modulation
    • H02P7/291Arrangements for regulating or controlling the speed or torque of electric DC motors for regulating or controlling an individual dc dynamo-electric motor by varying field or armature current by master control with auxiliary power using discharge tubes or semiconductor devices using semiconductor devices controlling armature supply only using pulse modulation with on-off control between two set points, e.g. controlling by hysteresis

Abstract

PURPOSE: An apparatus for detecting the position of a moving object is provided which detects the moving direction of the moving object only using exclusive-OR gates and obtains position information about the object. CONSTITUTION: An apparatus for detecting the position of a moving object such as a motor using a pulse generated by an encoder includes the first exclusive-OR gate(31) for receiving pulses having two different phases from the encoder to perform exclusive-ORing for the pulses, and the second exclusive-OR gate(32) for receiving the output of the first exclusive-OR gate to create an edge detection pulse whenever the edges of the pulses generated by the encoder are generated. The apparatus further has a calculation unit(33) for receiving one of the two pulses generated by the encoder, a binary code configured of the output value of the first exclusive-OR gate and the edge detection pulse from the second exclusive-OR gate to calculate the pulse, binary code and the output value to obtain position information on the moving object.

Description

운동체의 위치 검출 장치Position detecting device of moving object

본 발명은 전동기 등과 같은 운동체의 위치 검출 장치에 관한 것으로서, 상세하게는 배타적 논리합 회로와 같은 간단한 하드웨어를 사용하면서도 높은 분해능을 가지는 운동체의 위치 감지 장치에 관한 것이다.The present invention relates to an apparatus for detecting a position of a moving object such as an electric motor, and more particularly, to an apparatus for detecting a position of a moving object having high resolution while using simple hardware such as an exclusive OR circuit.

일반적으로, 회전 또는 직선 운동을 하는 운동체, 예컨대 전동기가 포함되어 있는 시스템에는 그 위치나 회전 속도를 제어하여야 하며, 이를 위하여 현재의 위치 정보를 검출하여야 한다. 즉, 현재 위치를 검출하여 피드백(feedback)시키면, 컨트롤러에서는 목표 위치와 현재 위치와의 편차인 오차를 연산하고, 연산된 오차가 보상되도록 위치 또는 회전 속도를 제어함으로써 안정되게 시스템이 운용되도록 한다. 현재, 이를 위하여 엔코더(encoder)나 리졸버(resolver)와 같은 정밀한 위치 센서가 운동체의 위치를 검출하기 위하여 사용되고 있다.In general, a system including a moving body that rotates or moves linearly, for example, an electric motor, needs to control its position or rotational speed, and to detect current position information. That is, when the current position is detected and fed back, the controller calculates an error that is a deviation between the target position and the current position, and controls the position or rotational speed so that the calculated error is compensated so that the system can be stably operated. Currently, precise position sensors such as encoders and resolvers are used to detect the position of the moving object.

도 1에는 이와 같은 엔코더를 이용한 종래의 전동기 위치 검출 장치의 구성이 개략적으로 도시되어 있다. 도시된 바와 같이, 종래의 전동기 위치 검출 장치는, 엔코더, 특히 엔크리멘탈(encremental) 엔코더의 두 상, 예컨대 A 및 B상으로부터 출력되는 펄스를 각각 입력받는 에지 검출부(11) 및 방향 검출부(12)와, 업(up)/다운(down) 카운터(13)와, 연산부(14)를 포함하여 구성되어 있다.FIG. 1 schematically shows a configuration of a conventional motor position detecting apparatus using such an encoder. As shown in the drawing, a conventional electric motor position detection device includes an edge detector 11 and a direction detector 12 that receive pulses output from two phases of an encoder, particularly an incremental encoder, for example, A and B phases, respectively. ), Up / down counters 13 and arithmetic unit 14 are configured.

에지 검출부(11)는 엔코더의 A 및 B상으로부터의 펄스 에지(edge)가 발생될 때마다 그에 대응되는 펄스열(Pulse train)을 발생시키며, 방향 검출부(12)는 전동기의 회전 방향을 검출하여 방향 신호를 출력한다. 그리고, 에지 검출부(11)로부터의 펄스열 및 방향 검출부(12)로부터의 방향 신호를 입력받는 업(up)/다운(down) 카운터(13)에서는 방향 검출부(12)로부터 입력되는 방향 신호에 따라서 에지 검출부(11)로부터의 펄스열을 업 카운팅을 수행하거나, 또는 다운 카운팅을 수행한다. 예를 들면, 전동기의 회전 방향이 정방향이라는 방향 신호가 입력되면 펄스열을 업 카운트하며, 전동기의 회전 방향이 역방향이라는 방향 신호가 입력되면 펄스열을 다운 카운트한다. 이와 같이 카운트된 카운팅값은 연산부(14)에 입력되며, 이 카운팅값을 입력받은 연산부(14)는 내장된 알고리즘에 따른 연산 과정을 수행하여 위치 정보를 연산한다.The edge detector 11 generates a pulse train corresponding to the pulse edges generated from the A and B phases of the encoder, and the direction detector 12 detects the rotational direction of the motor. Output the signal. In the up / down counter 13 which receives the pulse train from the edge detector 11 and the direction signal from the direction detector 12, the edge is in accordance with the direction signal input from the direction detector 12. Up counting or down counting is performed on the pulse train from the detection unit 11. For example, when the direction signal indicating that the rotation direction of the motor is forward is inputted, the pulse train is counted up. When the direction signal indicating that the rotation direction of the motor is reversed is inputted, the pulse train is counted down. The counting value counted in this way is input to the calculation unit 14, and the calculation unit 14 receiving the counting value calculates position information by performing a calculation process according to an embedded algorithm.

이와 같은 구성을 갖는 종래의 전동기 위치 검출 장치의 각 구성 요소들의 출력 파형이 도 2에 도시되어 있다. 도 2에 도시된 바와 같이, 엔코더의 A상으로부터 출력되는 펄스와 엔코더의 B상으로부터 출력되는 펄스는 90°의 위상차가 있다. 이와 같은 위상차를 갖고 출력되는 두 상의 펄스를 입력받은 에지 검출부(11)에서는 에지가 발생될 때마다 펄스열을 출력한다. 그리고, 방향 검출부(12)에서는 전동기의 회전 방향이 정방향인 경우에는 하이 레벨의 방향 신호를 출력하며, 역방향인 경우에는 로우 레벨의 방향 신호를 출력한다.The output waveforms of the respective components of the conventional electric motor position detection device having such a configuration are shown in FIG. As shown in FIG. 2, the pulse output from the A phase of the encoder and the pulse output from the B phase of the encoder have a phase difference of 90 °. The edge detector 11 receiving the two phase pulses having the phase difference as described above outputs a pulse string whenever an edge is generated. The direction detector 12 outputs a high level direction signal when the motor rotates in the forward direction, and outputs a low level direction signal in the reverse direction.

그런데, 이상의 설명에서와 같은 종래 전동기 위치 검출 장치는, 엔코더와 같은 위치 센서로부터 발생된 신호를 처리하기 위한 고가의 인터페이스부가 필수적이며, 노이즈 제거를 위한 디지털 필터 등의 부가적인 장치들이 요구된다. 따라서, 고성능 및 고가의 FA 제어기 등에만 사용되며, 고성능 제어를 필요로 하면서도 저 가격을 요구하는 분야에 적용하기가 용이하지 않은 문제점이 있다.By the way, the conventional electric motor position detection device as described above, an expensive interface unit for processing a signal generated from a position sensor such as an encoder is essential, and additional devices such as a digital filter for noise removal are required. Therefore, it is used only for high performance and expensive FA controllers and the like, and there is a problem in that it is not easy to apply to a field requiring high performance and low cost.

본 발명은 상기와 같은 문제점을 개선하기 위하여 창출된 것으로서, 배타적 논리합 회로와 같은 간단한 하드웨어를 사용하면서도 높은 분해능을 가지는 운동체의 위치 감지 장치를 제공하는데 그 목적이 있다.The present invention has been made to solve the above problems, and an object thereof is to provide an apparatus for detecting a position of a moving object having high resolution while using simple hardware such as an exclusive OR circuit.

도 1은 종래 운동체의 위치 검출 장치를 개략적으로 나타내 보인 블록도.1 is a block diagram schematically showing a conventional position detection apparatus of a moving object.

도 2는 도 1의 위치 검출 장치의 각 구성 요소들의 출력 파형을 나타내 보인 파형도.FIG. 2 is a waveform diagram illustrating output waveforms of respective components of the position detection apparatus of FIG. 1. FIG.

도 3은 본 발명에 따른 운동체의 위치 검출 장치를 개략적으로 나타내 보인 블록도.Figure 3 is a block diagram schematically showing an apparatus for detecting the position of the moving body according to the present invention.

도 4는 도 3의 위치 검출 장치의 각 구성 요소들의 출력 파형을 나타내 보인 파형도.FIG. 4 is a waveform diagram illustrating an output waveform of each component of the position detection device of FIG. 3. FIG.

도 5는 도 3의 위치 검출 장치의 연산부의 동작을 설명하기 위한 플로우 챠트.FIG. 5 is a flowchart for explaining an operation of a calculation unit of the position detection device of FIG. 3.

<도면의 주요 부분에 대한 부호의 설명><Explanation of symbols for the main parts of the drawings>

11...에지 검출부 12...방향 검출부11 ... edge detector 12 ... direction detector

13...업/다운 카운터 14, 33...연산부13 Up / down counter 14, 33 ...

31...제1 배타적 논리합 회로 32...제2 배타적 논리합 회로31 ... first exclusive AND circuit 32 ... second exclusive OR circuit

상기 목적을 달성하기 위하여, 본 발명에 따른 운동체의 위치 검출 장치는, 엔코더로부터 발생되는 펄스를 이용하여 전동기 등과 같은 운동체의 위치를 검출하는 위치 검출 장치에 있어서, 상기 엔코더로부터 서로 다른 두 상의 펄스를 입력받아 배타적 논리 연산을 수행하는 제1 배타적 논리합 회로와, 상기 제1 배타적 논리합 회로로부터의 출력을 입력받아 상기 엔코더로부터 출력되는 서로 다른 두 상의 펄스의 에지가 발생될 때마다 그에 대응되는 에지 감지 펄스를 발생시키는 제2 배타적 논리합 회로와, 상기 엔코더로부터 발생되는 서로 다른 두 상의 펄스중 일측 펄스값과 상기 제1 배타적 논리합 회로로부터의 출력값으로 이루어진 이진 부호, 및 상기 제2 배타적 논리합 회로로부터의 에지 감지 펄스를 입력받아 연산 처리하여 상기 운동체의 위치 정보를 구하는 연산부를 포함하는 점에 그 특징이 있다.In order to achieve the above object, the position detecting device of the moving object according to the present invention, in the position detecting device for detecting the position of the moving object, such as an electric motor by using a pulse generated from the encoder, the pulse of two different phases from the encoder An edge detection pulse corresponding to a first exclusive OR circuit that receives an input and performs an exclusive logic operation, and an edge of two different phase pulses output from the encoder by receiving an output from the first exclusive OR circuit. A second exclusive OR circuit for generating a binary signal, a binary code consisting of a pulse value of one of two phase pulses generated from the encoder and an output value from the first exclusive OR circuit, and edge detection from the second exclusive OR circuit. The pulse is input and processed to In that it includes an operation unit to obtain the information has its features.

여기서, 바람직하게는 상기 연산부는, 상기 제2 배타적 논리합 회로로부터의 에지 감지 펄스가 입력될 때마다 최종 위치 정보를 구하기 위한 소정의 인터럽트 루틴(interrupt routine)을 수행하도록 구성된다. 또한, 입력되는 현재의 이진 부호값과 이전 상태의 이진 부호값의 차를 연산하여 상기 운동체의 운동 방향을 검출하고, 검출된 운동 방향에 따라 업/다운 카운팅을 수행하도록 구성된다. 특히, 입력되는 현재의 이진 부호값과 이전 상태의 이진 부호값의 차를 연산한 결과가 -1이나 3인 경우에는 업 카운팅을 수행하고, 그 결과가 1이나 -3인 경우에는 다운 카운팅을 수행하도록 구성된다.Here, preferably, the computing unit is configured to perform a predetermined interrupt routine for obtaining final position information each time an edge sense pulse from the second exclusive OR circuit is input. In addition, by calculating the difference between the current binary code value input and the binary code value of the previous state to detect the movement direction of the moving object, it is configured to perform up / down counting according to the detected movement direction. In particular, if the difference between the current binary code value being input and the binary code value of the previous state is -1 or 3, up counting is performed. If the result is 1 or -3, down counting is performed. It is configured to.

이하, 첨부된 도면을 참조하면서 본 발명에 따른 운동체의 위치 검출 장치의 바람직한 실시예를 상세히 설명한다.Hereinafter, with reference to the accompanying drawings will be described in detail a preferred embodiment of the position detection device of the moving body according to the present invention.

도 3은 본 발명에 따른 위치 검출 장치의 구성 요소들을 개략적으로 나타내 보인 블록도이다. 도 3을 참조하면, 본 발명에 따른 위치 검출 장치는, 엔코더로부터 발생되는 두 상(A상 및 B상)의 펄스를 이용하여 운동체, 예컨대 전동기의 위치를 검출하기 위한 것으로서, 엔코더 A상 및 B상의 펄스를 각각 입력받아 배타적 논리 연산을 수행하는 제1 배타적 논리합 회로(exclusive OR)(31)와, 이 제1 배타적 논리합 회로(31)로부터의 출력을 입력받아 엔코더로부터 출력되는 두 상의 펄스의 에지가 발생될 때마다 그에 대응되는 에지 감지 펄스를 발생시키는 제2 배타적 논리합 회로(32)와, 엔코더의 A상으로부터 발생되는 펄스값과 제1 배타적 논리합 회로(31)로부터의 출력값으로 이루어진 이진 부호(D1D0), 및 제2 배타적 논리합 회로(32)로부터의 에지 감지 펄스를 입력받아 연산 처리하여 전동기의 위치 정보를 구하는 연산부(33)를 포함하여 구성된다.3 is a block diagram schematically showing the components of the position detection apparatus according to the present invention. Referring to FIG. 3, the position detecting apparatus according to the present invention is for detecting the position of a moving object, for example, an electric motor using pulses of two phases (A phase and B phase) generated from an encoder. Edges of the pulses of the two phases output from the encoder by receiving an output from the first exclusive OR circuit 31 and an output from the first exclusive OR circuit 31 which respectively receive the pulses of the phases and perform an exclusive logic operation; A binary exclusive circuit consisting of a second exclusive OR circuit 32 which generates an edge sense pulse corresponding to each occurrence of A, and a pulse value generated from the A phase of the encoder and an output value from the first exclusive OR circuit 31. D 1 D 0 ), and an arithmetic unit 33 which receives an edge sensing pulse from the second exclusive OR circuit 32 and performs arithmetic processing to obtain position information of the motor.

상기 제1 배타적 논리합 회로(31)는 두 입력 펄스가 다른 레벨일 경우에만 하이(high) 레벨의 신호를 출력하며, 두 입력 펄스가 서로 같은 레벨인 경우에는 로우(low) 레벨의 신호를 출력하는 논리 게이트로 이루어져 있으며, 이 제1 배타적 논리합 회로(31)의 출력 신호는 제2 배타적 논리합 회로(32)로 입력된다.The first exclusive OR circuit 31 outputs a high level signal only when the two input pulses have different levels, and outputs a low level signal when the two input pulses have the same level. It consists of a logic gate, and the output signal of the first exclusive OR circuit 31 is input to the second exclusive OR circuit 32.

상기 제2 배타적 논리합 회로(32)의 입력 단자 중, 하나는 제1 배타적 논리합 회로(31)로부터의 출력 신호를 입력받을 수 있도록 되어 있으며, 다른 하나는 그 입력 단자에 연결되어 있는 저항기(R) 및 커패시터(C) 사이의 분기 선에 연결되어 있다. 따라서, 제2 배타적 논리합 회로(32)로 입력되는 신호는 제1 배타적 논리합 회로(31)의 출력 신호와, 이 제1 배타적 논리합 회로(32)의 출력 신호가 소정 시간동안 지연된 신호가 입력된다. 이때, 지연 시간은 저항기(R)와 커패시터(C)의 시정수에 의해 결정된다. 따라서, 적당한 저항기(R)의 저항값과 커패시터(C)의 커패시턴스를 삽입함으로써 엔코더로부터 발생되는 두 상의 펄스의 각 에지가 발생될 때마다 그에 대응되는 에지 감지 펄스를 출력시킬 수 있다.One of the input terminals of the second exclusive OR circuit 32 is configured to receive an output signal from the first exclusive OR circuit 31, and the other resistor R is connected to the input terminal. And a branch line between the capacitor C. Therefore, the signal input to the second exclusive OR circuit 32 is inputted with the output signal of the first exclusive OR circuit 31 and the signal whose output signal of the first exclusive OR circuit 32 is delayed for a predetermined time. At this time, the delay time is determined by the time constant of the resistor (R) and the capacitor (C). Therefore, by inserting the resistance value of the appropriate resistor (R) and the capacitance of the capacitor (C) it is possible to output the edge detection pulse corresponding to each edge of the two-phase pulse generated from the encoder.

도 4에는 전기한 바와 같이, 엔코더 A상 및 B상의 출력 펄스 파형과, 제1 및 제2 배타적 논리합 회로(31)(32)의 출력 파형이 도시되어 있다. 도시된 바와 같이, 엔코더 A상 및 B상으로부터 출력되는 펄스는 90°의 위상차를 갖고 출력되며, 제1 배타적 논리합 회로(31)에서는 하이 레벨의 신호와 로우 레벨의 신호가 반복적으로 출력된다. 그리고, 제2 배타적 논리합 회로(32)에서는 엔코더 A상 및 B상의 펄스 에지가 발생될 때마다 에지 감지 펄스가 출력된다.As shown in Fig. 4, the output pulse waveforms of the encoders A and B phases and the output waveforms of the first and second exclusive OR circuits 31 and 32 are shown. As shown, pulses output from the encoders A and B phases are output with a phase difference of 90 degrees, and the first exclusive OR circuit 31 repeatedly outputs a high level signal and a low level signal. In the second exclusive OR circuit 32, an edge sense pulse is output whenever a pulse edge of the encoder A phase and B phase is generated.

상기 연산부(33)는 제2 배타적 논리합 회로(32)로부터의 에지 감지 펄스를 입력받는 한편, 엔코더 A상 펄스와 제1 배타적 논리합 회로(31)의 출력 신호로 이루어진 이진 부호(D1D0)를 입력받는다. 즉, 도 4를 참조하면, 시간 t1동안에는 엔코더 A상의 펄스가 로우 레벨이고, 제1 배타적 논리합 회로(31)의 출력이 로우 레벨이므로 연산부(33)에 입력되는 이진 부호(D1D0)는 (00)이 입력된다. 그리고, 그 다음 시간 t2동안에는 엔코더 A상의 펄스가 하이 레벨이고, 제1 배타적 논리합 회로(31)의 출력이 하이 레벨이므로 연산부(33)에 입력되는 이진 부호(D1D0)는 (11)이 입력된다. 이와 같이, 전동기의 회전 방향이 정방향인 경우, 엔코더 A상 펄스와 제1 배타적 논리합 회로(31)의 출력 펄스에 의해 이루어지는 이진 부호(D1D0)는 아래의 표 1과 같다.The calculation unit 33 receives an edge sense pulse from the second exclusive OR circuit 32, while a binary code D 1 D 0 including an A-phase pulse of the encoder and an output signal of the first exclusive OR circuit 31. Get input. That is, referring to FIG. 4, since the pulse on the encoder A is at the low level and the output of the first exclusive OR circuit is at the low level during the time t 1 , the binary code (D 1 D 0 ) input to the operation unit 33. (00) is input. During the next time t 2 , since the pulse on the encoder A is at the high level and the output of the first exclusive OR circuit is at the high level, the binary code D 1 D 0 input to the calculation unit 33 is (11). Is input. As described above, when the rotation direction of the motor is in the forward direction, the binary code D 1 D 0 formed by the encoder A-phase pulse and the output pulse of the first exclusive logical sum circuit 31 is shown in Table 1 below.

t1 t 1 t2 t 2 t3 t 3 t4 t 4 t5 t 5 t6 t 6 t7 t 7 t8 t 8 00 1111 1010 1One 00 1111 1010 1One

위 표 1에서와 같이, 전동기의 회전 방향이 정방향인 경우에 연산부(33)에 입력되는 이진 부호(D1D0)는 00, 11, 10 및 01이 반복되어 입력되며, 현재 상태와 이전 상태와의 차는 항상 -1 또는 3이 됨을 알 수 있다.As shown in Table 1, when the rotation direction of the motor is in the forward direction, the binary sign (D 1 D 0 ) input to the calculation unit 33 is repeatedly input 00, 11, 10 and 01, the current state and the previous state It can be seen that the difference between and is always -1 or 3.

한편, 회전 방향이 반대 방향(역방향)인 주기동안에 연산부(33)에 입력되는 이진 부호(D1D0)는 아래의 표 2와 같다.On the other hand, the binary code (D 1 D 0 ) input to the calculation unit 33 during the period in which the rotation direction is the opposite direction (reverse direction) is shown in Table 2 below.

t1´t 1 ´ t2´t 2 ´ t3´t 3 ´ t4´t 4 ´ t5´t 5 ´ t6´t 6 ´ t7´t 7 ´ t8´t 8 ´ 1111 00 1One 1010 1111 00 1One 1010

위 표 2에서와 같이, 전동기의 회전 방향이 역방향인 경우에 연산부(33)에 입력되는 이진 부호(D1D0)는 11, 00, 01 및 10이 반복되어 입력되며, 현재 상태와 이전 상태와의 차는 항상 1 또는 -3이 됨을 알 수 있다.As shown in Table 2 above, when the rotation direction of the motor is reverse, the binary code (D 1 D 0 ) input to the calculation unit 33 is 11, 00, 01 and 10 are repeatedly input, the current state and the previous state It can be seen that the difference between is always 1 or -3.

연산부(33)에서는 이와 같은 일정한 규칙을 이용하여 전동기 회전 방향 및 정확한 위치 정보를 연산한다.The calculating unit 33 calculates the motor rotation direction and accurate position information by using such a predetermined rule.

그러면, 도 5에 도시된 플로우 챠트를 참조하면서 연산부(33)의 동작을 보다 상세히 설명한다.Next, the operation of the calculation unit 33 will be described in more detail with reference to the flowchart shown in FIG. 5.

제2 배타적 논리합 회로(32)로부터 에지 감지 펄스가 출력되어 연산부(33)로 입력되면, 연산부(33)는 위치 정보를 구하기 위한 인터럽트 루틴을 수행한다(단계 51, 52). 그리고, 입력된 현재 상태의 이진 부호(D1D0)와 이전 상태의 이진 부호와의 차를 연산한다(단계 53). 이 연산의 목적은 전동기의 회전 방향을 검출하기 위한 것으로서, 전기한 바와 같이 전동기의 회전 방향이 정방향인 경우에는 연산값이 -1 또는 3이 되며, 전동기의 회전 방향이 역방향인 경우에는 연산값이 1 또는 -3이 되는 규칙을 이용하기 위한 것이다. 따라서, 먼저 수행되는 인터럽트 루틴이 에지 감지 펄스의 입력에 의한 것이 아니라 노이즈 신호의 입력에 의한 것의 여부를 확인한다. 즉, 먼저 연산값이 0인지를 판별한다(단계 54). 이 판별 결과, 연산값이 0인 경우에는 이전 상태의 이진 부호와 현재 상태의 이진 부호가 같은 경우이다. 따라서, 이 경우에는 에지가 발생되지 않은 경우이므로, 노이즈 신호에 의한 인터럽트로 인정하여 인터럽트 루틴을 종료한다(단계 57). 한편, 판별 단계 54에서의 판별 결과, 연산값이 0이 아닌 경우에는, 수행되는 인터럽트 루틴이 에지 감지 펄스의 입력에 의한 것이므로, 연산된 결과값에 따라 업 카운팅 또는 다운 카운팅을 수행한다. 즉, 연산된 결과값이 -1 또는 3인 경우에는, 회전 방향이 정방향이므로 카운터값에 1을 가산하여 주며(단계 55), 연산된 결과값이 1 또는 -3인 경우에는 회전 방향이 역방향이므로 카운터값에 1을 감산하여 준다(단계 56). 이와 같이, 전동기의 회전 방향을 검출한 후, 검출된 회전 방향에 따라서 업 카운팅 또는 다운 카운팅을 수행함으로써 위치 정보를 구하고 나면 인터럽트 루틴이 종료된다(단계 57).When the edge sense pulse is output from the second exclusive OR circuit 32 and input to the calculator 33, the calculator 33 performs an interrupt routine for obtaining position information (steps 51 and 52). Then, the difference between the input binary code D 1 D 0 of the current state and the binary code of the previous state is calculated (step 53). The purpose of this calculation is to detect the rotational direction of the motor. As described above, the calculated value is -1 or 3 when the rotational direction of the motor is in the forward direction, and the calculated value when the rotational direction of the motor is in the reverse direction. To use a rule of 1 or -3. Therefore, the interrupt routine performed first confirms whether or not the input of the edge detection pulse is caused by the input of the noise signal. That is, it is first determined whether the operation value is 0 (step 54). As a result of this determination, when the operation value is 0, the binary code of the previous state and the binary code of the current state are the same. Therefore, in this case, since the edge has not been generated, the interrupt routine is recognized as an interrupt by the noise signal (step 57). On the other hand, if the result of the determination in the determination step 54, the operation value is not 0, since the interrupt routine to be performed is due to the input of the edge detection pulse, up counting or down counting is performed according to the calculated result value. That is, when the calculated result value is -1 or 3, since the rotation direction is the forward direction, 1 is added to the counter value (step 55). When the calculated result value is 1 or -3, the rotation direction is the reverse direction. Subtract 1 by the counter value (step 56). In this way, after detecting the rotation direction of the motor, the interrupt routine is terminated after obtaining the position information by performing up counting or down counting according to the detected rotation direction (step 57).

상기 과정에 의해 구해진 위치 정보들은 사용자에 의해 전동기 속도 제어 등에 이용된다.The positional information obtained by the above process is used by the user to control the motor speed.

이상의 설명에서와 같이, 본 발명에 따른 운동체의 위치 검출 장치에 의하면, 배타적 논리합 회로만을 사용하여 운동체의 운동 방향을 검출하는 한편, 위치 정보를 구할 수 있으므로, 그 구현이 간단하며 비용이 저렴하다는 이점이 있다.As described above, according to the apparatus for detecting the position of the moving object according to the present invention, since the direction of movement of the moving object can be detected using only an exclusive OR circuit, and the position information can be obtained, the implementation is simple and inexpensive. There is this.

Claims (5)

엔코더로부터 발생되는 펄스를 이용하여 전동기 등과 같은 운동체의 위치를 검출하는 위치 검출 장치에 있어서,In the position detection device for detecting the position of a moving object such as an electric motor using a pulse generated from the encoder, 상기 엔코더로부터 서로 다른 두 상의 펄스를 입력받아 배타적 논리 연산을 수행하는 제1 배타적 논리합 회로;A first exclusive logical sum circuit configured to receive an exclusive two-phase pulse from the encoder and perform an exclusive logical operation; 상기 제1 배타적 논리합 회로로부터의 출력을 입력받아 상기 엔코더로부터 출력되는 서로 다른 두 상의 펄스의 에지가 발생될 때마다 에지 감지 펄스를 발생시키는 제2 배타적 논리합 회로; 및A second exclusive OR circuit that receives an output from the first exclusive OR circuit and generates an edge sensing pulse whenever an edge of two different phase pulses output from the encoder is generated; And 상기 엔코더로부터 발생되는 서로 다른 두 상의 펄스 중 일측 펄스값과 상기 제1 배타적 논리합 회로로부터의 출력값으로 이루어진 이진 부호, 및 상기 제2 배타적 논리합 회로로부터의 에지 감지 펄스를 입력받아 연산 처리하여 상기 운동체의 위치 정보를 구하는 연산부를 포함하는 것을 특징으로 하는 위치 검출 장치.A binary code consisting of one pulse value among two different phase pulses generated from the encoder and an output value from the first exclusive OR circuit, and an edge sensing pulse from the second exclusive OR circuit, and are processed to be processed. And a calculating unit for obtaining position information. 제1항에 있어서,The method of claim 1, 상기 연산부는, 상기 제2 배타적 논리합 회로로부터의 에지 감지 펄스가 입력될 때마다 최종 위치 정보를 구하기 위한 소정의 인터럽트 루틴을 수행하도록 구성된 것을 특징으로 하는 위치 검출 장치.And the computing unit is configured to perform a predetermined interrupt routine for obtaining final position information each time an edge sense pulse from the second exclusive OR circuit is input. 제1항 또는 제2항에 있어서,The method according to claim 1 or 2, 상기 연산부는, 입력되는 현재의 이진 부호값과 이전 상태의 이진 부호값의 차를 연산하여 상기 운동체의 운동 방향을 검출하고, 검출된 운동 방향에 따라 업/다운 카운팅을 수행하도록 구성된 것을 특징으로 하는 위치 검출 장치.The operation unit may be configured to calculate a difference between an input current binary code value and a binary code value of a previous state, detect a movement direction of the moving object, and perform up / down counting according to the detected movement direction. Position detection device. 제3항에 있어서,The method of claim 3, 상기 연산부는, 입력되는 현재 이진 부호값과 이전 상태의 이진 부호값의 차를 연산한 결과가 -1이나 3인 경우에는 업 카운팅을 수행하고, 그 결과가 1이나 -3인 경우에는 다운 카운팅을 수행하도록 구성된 것을 특징으로 하는 위치 검출 장치.The operation unit performs up counting when a result of calculating a difference between an input current binary code value and a binary code value of a previous state is -1 or 3, and performs down counting when the result is 1 or -3. Position detection device, characterized in that configured to perform. 제3항에 있어서,The method of claim 3, 상기 연산부는, 입력되는 현재 이진 부호값과 이전 상태의 이전 부호값의 차를 연산한 결과가 영인 경우에는 상기 인터럽트 루틴을 종료하는 것을 특징으로 하는 위치 검출 장치.And the calculating unit terminates the interrupt routine when a result of calculating a difference between an input current binary code value and a previous code value of a previous state is zero.
KR1019970051668A 1997-10-08 1997-10-08 Apparatus for detecting position KR100252079B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019970051668A KR100252079B1 (en) 1997-10-08 1997-10-08 Apparatus for detecting position

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019970051668A KR100252079B1 (en) 1997-10-08 1997-10-08 Apparatus for detecting position

Publications (2)

Publication Number Publication Date
KR19990031101A KR19990031101A (en) 1999-05-06
KR100252079B1 true KR100252079B1 (en) 2000-04-15

Family

ID=19522411

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019970051668A KR100252079B1 (en) 1997-10-08 1997-10-08 Apparatus for detecting position

Country Status (1)

Country Link
KR (1) KR100252079B1 (en)

Also Published As

Publication number Publication date
KR19990031101A (en) 1999-05-06

Similar Documents

Publication Publication Date Title
US4358723A (en) Method and apparatus for measuring the rotation of a work table
US6914543B2 (en) Method for initializing position with an encoder
CN105978570B (en) High-precision signal processing system of sine and cosine encoder
JP2720642B2 (en) Multi-turn absolute value encoder
CN106301105A (en) Based on incremental optical-electricity encoder multipolar dynamo method for detecting magnetic pole position
KR100252079B1 (en) Apparatus for detecting position
CN107643091A (en) The method for determining the direction of rotation of orthogonal pulses and effectively changing
JP3596942B2 (en) Speed detector
CN113008117B (en) Linear magnetic grid system
EP0200791A1 (en) Method and apparatus for detecting position
US6310458B1 (en) Blended velocity estimation
JPH04285815A (en) Position counter circuit of rotary encoder
JP3349575B2 (en) Displacement speed detection method and device
JPH0529045B2 (en)
JP2562436Y2 (en) Detector
JP3448664B2 (en) Multi-turn absolute encoder
JP4140417B2 (en) Noise amount measuring method and motor driving apparatus using the same
KR20020058908A (en) Apparatus and method for high resolution processing of encoder signal for a motor control
JP3302864B2 (en) Motor rotation speed detection circuit
KR19990043005A (en) Motor speed detection device using incremental encoder
JP3070109B2 (en) Absolute position detection method and device
JP2000337926A (en) Initial position-detecting device for encoder
KR900005919B1 (en) Position feedback control apparatus and method for industrial machine
JPH077985A (en) Digital type speed detector and speed controller of electric motor using the same
JP3310716B2 (en) Encoder moving speed detector

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: 20090112

Year of fee payment: 10

LAPS Lapse due to unpaid annual fee