[go: up one dir, main page]

KR101806843B1 - Method for calculating arctangent, recording medium and device for performing the method - Google Patents

Method for calculating arctangent, recording medium and device for performing the method Download PDF

Info

Publication number
KR101806843B1
KR101806843B1 KR1020160151671A KR20160151671A KR101806843B1 KR 101806843 B1 KR101806843 B1 KR 101806843B1 KR 1020160151671 A KR1020160151671 A KR 1020160151671A KR 20160151671 A KR20160151671 A KR 20160151671A KR 101806843 B1 KR101806843 B1 KR 101806843B1
Authority
KR
South Korea
Prior art keywords
value
axis
lut
look
angle
Prior art date
Legal status (The legal status 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 status listed.)
Expired - Fee Related
Application number
KR1020160151671A
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 KR1020160151671A priority Critical patent/KR101806843B1/en
Application granted granted Critical
Publication of KR101806843B1 publication Critical patent/KR101806843B1/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Computational Mathematics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Algebra (AREA)
  • Transmission And Conversion Of Sensor Element Output (AREA)

Abstract

본 발명에 따른 아크탄젠트 계산 방법은, 2축 홀센서로부터 생성되는 x축 전압값 및 y축 전압값을 수신하는 단계; 상기 x축 전압값 및 상기 y축 전압값을 아날로그-디지털 변환기(Analog-Digital Converter; ADC)를 통해 x축 값 및 y축 값의 디지털 데이터로 변환하는 단계; 상기 디지털 데이터로 변환된 x축 값을 기초로 룩-업 테이블(Look-Up Table; LUT)의 주소값을 간소화하는 단계; 0도 내지 90도를 표현하는 룩-업 테이블로부터 상기 주소값에 매핑되는 각도를 도출하는 단계; 및 상기 x축 값 및 상기 y축 값의 부호를 기초로, 제1 사분면 내지 제4 사분면 중 어느 사분면인지 결정하는 단계를 포함한다. 이에 따라, 미리 정의된 구간에 대해 복잡한 계산 과정 없이 LUT에서 아크탄젠트를 매핑함으로써, 매우 작은 사이즈의 LUT로도 0 내지 360도의 아크탄젠트 계산을 할 수 있다.The arc tangent calculation method according to the present invention includes: receiving an x-axis voltage value and a y-axis voltage value generated from a biaxial hall sensor; Converting the x-axis voltage value and the y-axis voltage value into digital data of an x-axis value and a y-axis value through an analog-to-digital converter (ADC); Simplifying an address value of a look-up table (LUT) based on an x-axis value converted into the digital data; Deriving an angle mapped to the address value from a look-up table representing 0 degrees to 90 degrees; And determining the quadrant of the first to fourth quadrants based on the sign of the x-axis value and the y-axis value. Thus, by mapping the arc tangent in the LUT without complicated calculation for a predefined section, arctangent calculations of 0 to 360 degrees can be performed with a very small-sized LUT.

Description

아크탄젠트 계산 방법, 이를 수행하기 위한 기록 매체 및 장치{METHOD FOR CALCULATING ARCTANGENT, RECORDING MEDIUM AND DEVICE FOR PERFORMING THE METHOD}BACKGROUND OF THE INVENTION 1. Field of the Invention [0001] The present invention relates to an arc tangent calculation method, a recording medium and a device for performing the arc tangent calculation method,

본 발명은 아크탄젠트 계산 방법, 이를 수행하기 위한 기록 매체 및 장치에 관한 것으로서, 더욱 상세하게는 차량, 핸드폰 등에서 사용되는 홀 센서의 위치 정보를 이용하여 각도를 측정하는 기술에 관한 것이다.BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an arc tangent calculation method, a recording medium and an apparatus for performing the arc tangent calculation method, and more particularly, to a technique for measuring an angle using position information of a hall sensor used in a vehicle,

차량, 핸드폰 등에서 사용되는 홀 센서는 위치 정보를 이용하여 각도를 측정한다. 이러한 시스템 상에서 거리를 각도로 변환하기 위해서는 아크탄젠트를 계산해야만 한다. Hall sensors used in vehicles, mobile phones, etc. measure angles using position information. To convert the distance to an angle on such a system, the arc tangent must be calculated.

홀 센서는 홀 효과를 이용하여 자기장을 전압 차이로 변환하는 센서 소자이다. 이러한 홀 센서는 자기장을 발생시키는 자석과 함께 조이스틱, 카메라 렌즈, 자동차의 모터 등과 같이 다양한 응용 분야에서 각도, 위치, 속도 등을 측정한다. The Hall sensor is a sensor element that converts a magnetic field to a voltage difference using a Hall effect. These hall sensors measure angles, positions, speeds, etc. in various applications such as joysticks, camera lenses, automobile motors, etc., together with magnets that generate a magnetic field.

각도를 측정하기 위해서는 3축 홀센서의 출력을 MCU(Micro Controller Unit)가 내장된 IC(Integrated Circuit)를 이용하여 직각 좌표계에서 X, Y, Z 축의 거리를 측정하고, 각도를 계산해야 한다. 각도 계산을 하기 위해서는 아크탄제트(ATAN) 함수를 사용해야 한다. To measure the angle, the output of the 3-axis Hall sensor should be measured by measuring the distance between the X, Y, and Z axes in a rectangular coordinate system using an integrated circuit (IC) with an MCU (Micro Controller Unit). To calculate the angle, you must use the arc tan (ATAN) function.

하지만, 저가의 초소형 MCU 구조에서는 나눗셈기나 FMU(Floating-point Multiplier Unit)가 없기 때문에, 이 함수를 사용하기 위해서는 복잡한 하드웨어를 추가하거나 많은 연산 사이클을 소비하여 계산해야 한다. However, since there is no divider or Floating-Point Multiplier Unit (FMU) in a low-cost microcontroller architecture, it is necessary to add complex hardware or consume a lot of computation cycles to use this function.

구체적으로, KR 10-0912509 B1는 역탄젠트 계산 방법 및 장치를 제시하고 있으나, LUT간소화를 위해 유효비트수를 이용하여 계산 후에 LUT에서 아크탄젠트를 매핑하므로, 복잡한 연산 알고리즘이 필요하며 연산 시간이 소요된다.Specifically, KR 10-0912509 B1 proposes an inverse tangent calculation method and apparatus, but since arctangent is mapped in the LUT after calculation using the number of significant bits to simplify the LUT, complex arithmetic algorithms are required and calculation time is long do.

KR 10-1114785 B1역시 아크탄젠트 연산 장치 및 컴퓨터 판독 가능한 기록 매체를 제시하고 있으나, LUT간소화를 위해 22.5도 이상의 각도에 대해 45도의 벡터 회전 이후에 LUT에서 아크탄젠트를 매핑하므로 하드웨어의 추가가 필요하다.KR 10-1114785 B1 also presents an arctangent calculator and a computer-readable recording medium, but since arctangent mapping is performed in the LUT after a vector rotation of 45 degrees to an angle of 22.5 degrees or more in order to simplify the LUT, addition of hardware is required .

또한, "F. Dinechin and M. Istoan, "Hardware Implementations of Fixed-Point Atan2", in Proc. of IEEE Symposium on Computer Arithmetic, 2015, pp. 34-41."는 LUT 기반의 아크탄젠트 계산하고, LUT를 줄이면서 출력에 대해 선형 보간(Linear Interpolation)을 통해 오차(Error)를 감소화 시킨다(도 1 참조). 그러나, 이 경우 각도 오차를 줄이기 위해서 큰 LUT 크기를 필요로 한다.In addition, "F. Dinechin and M. Istoan," Hardware Implementations of Fixed-Point Atan2 ", in Proc. Of IEEE Symposium on Computer Arithmetic, 2015, pp. 34-41. And the error is reduced by linear interpolation of the output (see FIG. 1). However, in this case, a large LUT size is required to reduce the angular error.

KR 10-0912509 B1KR 10-0912509 B1 KR 10-1114785 B1KR 10-1114785 B1

F. Dinechin and M. Istoan, "Hardware Implementations of Fixed-Point Atan2", in Proc. of IEEE Symposium on Computer Arithmetic, 2015, pp. 34-41. F. Dinechin and M. Istoan, "Hardware Implementations of Fixed-Point Atan2 ", in Proc. of IEEE Symposium on Computer Arithmetic, 2015, pp. 34-41.

이에, 본 발명의 기술적 과제는 이러한 점에서 착안된 것으로 본 발명의 목적은 하드웨어의 복잡성을 줄인 아크탄젠트 계산 방법을 제공하는 것이다.Accordingly, it is an object of the present invention to provide an arc tangent calculation method that reduces hardware complexity.

본 발명의 다른 목적은 상기 하드웨어의 복잡성을 줄인 아크탄젠트 계산 방법을 수행하기 위한 컴퓨터 프로그램이 기록된 기록 매체를 제공하는 것이다.It is another object of the present invention to provide a recording medium on which a computer program for performing an arc tangent calculation method that reduces the complexity of the hardware is recorded.

본 발명의 또 다른 목적은 상기 하드웨어의 복잡성을 줄인 아크탄젠트 계산 방법을 수행하기 위한 장치를 제공하는 것이다.It is still another object of the present invention to provide an apparatus for performing an arc tangent calculation method that reduces the complexity of the hardware.

상기한 본 발명의 목적을 실현하기 위한 일 실시예에 따른 아크탄젠트 계산 방법은, 2축 홀센서로부터 생성되는 x축 전압값 및 y축 전압값을 수신하는 단계; 상기 x축 전압값 및 상기 y축 전압값을 아날로그-디지털 변환기(Analog-Digital Converter; ADC)를 통해 x축 값 및 y축 값의 디지털 데이터로 변환하는 단계; 상기 디지털 데이터로 변환된 x축 값을 기초로 룩-업 테이블(Look-Up Table; LUT)의 주소값을 간소화하는 단계; 0도 내지 90도를 표현하는 룩-업 테이블로부터 상기 주소값에 매핑되는 각도를 도출하는 단계; 및 상기 x축 값 및 상기 y축 값의 부호를 기초로, 제1 사분면 내지 제4 사분면 중 어느 사분면인지 결정하는 단계를 포함한다.According to another aspect of the present invention, there is provided an arc tangent calculation method comprising: receiving an x-axis voltage value and a y-axis voltage value generated from a biaxial hall sensor; Converting the x-axis voltage value and the y-axis voltage value into digital data of an x-axis value and a y-axis value through an analog-to-digital converter (ADC); Simplifying an address value of a look-up table (LUT) based on an x-axis value converted into the digital data; Deriving an angle mapped to the address value from a look-up table representing 0 degrees to 90 degrees; And determining the quadrant of the first to fourth quadrants based on the sign of the x-axis value and the y-axis value.

본 발명의 실시예에서, 상기 디지털 데이터로 변환된 x축 값을 기초로 룩-업 테이블(Look-Up Table; LUT)의 주소값을 간소화하는 단계는, 상기 x축 값이 임계값 미만인 경우, 근사화된 주소값을 룩-업 테이블(Look-Up Table; LUT)의 주소값으로 사용할 수 있다.In an embodiment of the present invention, the step of simplifying an address value of a look-up table (LUT) based on an x-axis value converted into the digital data may include the steps of: The approximated address value can be used as the address value of a look-up table (LUT).

본 발명의 실시예에서, 상기 디지털 데이터로 변환된 x축 값을 기초로 룩-업 테이블(Look-Up Table; LUT)의 주소값을 간소화하는 단계는, 상기 x축 값이 임계값 이상인 경우, 상기 x축 값을 룩-업 테이블(Look-Up Table; LUT)의 주소값으로 사용할 수 있다.In the embodiment of the present invention, the step of simplifying the address value of the look-up table (LUT) based on the x-axis value converted into the digital data may include the steps of: The x-axis value may be used as an address value of a look-up table (LUT).

본 발명의 실시예에서, 상기 임계값은 아크탄젠트 계산 오차가 일정 범위 내에 포함되도록 정의할 수 있다.In an embodiment of the present invention, the threshold may be defined such that an arc tangent calculation error is included within a certain range.

본 발명의 실시예에서, 상기 계산 오차는 1이고, 상기 x축 값의 임계값은 852일 수 있다.In an embodiment of the present invention, the calculation error may be 1 and the threshold value of the x-axis value may be 852. [

본 발명의 실시예에서, 상기 x축 값은 0 내지 1023의 값을 갖고, 상기 룩-업 테이블(Look-Up Table; LUT)은 279개의 x축 값에 대응하는 각도 데이터를 저장할 수 있다.In the embodiment of the present invention, the x-axis value has a value from 0 to 1023, and the look-up table (LUT) can store angle data corresponding to 279 x-axis values.

상기한 본 발명의 다른 목적을 실현하기 위한 일 실시예에 따른 컴퓨터로 판독 가능한 저장 매체에는, 상기 아크탄젠트 계산 방법을 수행하기 위한 컴퓨터 프로그램이 기록되어 있다. According to another embodiment of the present invention, a computer program for performing the arctangent calculation method is recorded in a computer-readable storage medium.

상기한 본 발명의 또 다른 목적을 실현하기 위한 일 실시예에 따른 아크탄젠트 계산 장치는, 2축 홀센서로부터 생성되는 x축 및 y축 전압값을 수신하는 수신부; 상기 x축 및 y축 전압값을 아날로그-디지털 변환기(Analog-Digital Converter; ADC)를 통해 x축 값 및 y축 값의 디지털 데이터로 변환하는 변환부; 상기 디지털 데이터로 변환된 x축 값을 기초로 룩-업 테이블(Look-Up Table; LUT)의 주소값을 간소화 하고, 상기 x축 값 및 상기 y축 값의 부호를 기초로, 상기 주소값에 매핑되는 각도에 대응하는 사분면을 결정하는 각도 계산부; 및 상기 x축 값에 대응하는 0도 내지 90도를 표현하고, 상기 주소값에 대응하는 각도를 상기 각도 계산부에 반환하는 룩-업 테이블을 포함한다.According to another aspect of the present invention, there is provided an arctangent calculation apparatus comprising: a receiver for receiving x and y axis voltage values generated from a biaxial Hall sensor; A conversion unit for converting the x-axis and y-axis voltage values into digital data of an x-axis value and a y-axis value through an analog-digital converter (ADC); Based on the x-axis value converted into the digital data, simplifies an address value of a look-up table (LUT), and based on the x-axis value and the sign of the y- An angle calculation unit for determining a quadrant corresponding to an angle to be mapped; And a look-up table representing 0 to 90 degrees corresponding to the x-axis value and returning an angle corresponding to the address value to the angle calculation unit.

본 발명의 실시예에서, 상기 각도 계산부는, 각도가 큰 경우에는 상기 x축 값을 근사화하여 룩-업 테이블(Look-Up Table; LUT)의 주소값으로 사용하고, 각도가 작은 경우에는 상기 x축 값을 룩-업 테이블(Look-Up Table; LUT)의 주소값으로 사용할 수 있다.In an embodiment of the present invention, when the angle is large, the angle calculator approximates the x-axis value to use as an address value of a look-up table (LUT) The axis value can be used as the address value of the look-up table (LUT).

본 발명의 실시예에서, 상기 아날로그-디지털 변환기는 11 비트(bit)의 디지털 데이터로 변환하고, 상기 룩-업 테이블(Look-Up Table; LUT)은 10 비트 값을 구현할 수 있다.In the embodiment of the present invention, the analog-to-digital converter converts the data into 11-bit digital data, and the look-up table (LUT) may implement a 10-bit value.

이와 같은 아크탄젠트 계산 방법에 따르면, 복잡한 하드웨어 추가나 긴 연산시간 없이 각도를 추정하기 위하여 Look-Up Table(LUT)을 이용한 ATAN 함수를 구현한다. 또한, LUT의 최소화를 위해 알고리즘 상에서 주소값을 근사화하여, 하드웨어 복잡성을 줄이면서도 빠른 연산 시간을 갖는 각도 측정 시스템을 구현할 수 있다. 본 발명에 따라 구현된 시스템은 0도에서 360도 사이의 각도를 측정할 수 있으며, 모의 시뮬레이션을 결과 1도 미만의 오차를 갖는다.According to the arc tangent calculation method, an ATAN function using a look-up table (LUT) is implemented to estimate angles without complicated hardware addition or long computation time. Also, to minimize the LUT, it is possible to approximate the address value in the algorithm and implement an angle measurement system with a fast computation time while reducing hardware complexity. The system implemented in accordance with the present invention can measure angles between 0 and 360 degrees and has simulated simulations with less than 1 degree error.

도 1은 종래 아크탄젠트 계산 과정을 보여주는 개념도이다.
도 2는 본 발명의 일 실시예에 따른 아크탄젠트 계산 장치의 블록도이다.
도 3은 본 발명에 따른 각도 추정 시스템의 개념도이다.
도 4는 도 3의 MCU에서 각도를 추정하기 위해 수행되는 알고리즘의 예이다.
도 5는 도 3의 LUT의 구현 예이다.
도 6은 각도 측정에 대한 시뮬레이션 결과를 나타낸 그래프이다.
도 7은 도 6의 일부를 확대한 그래프이다.
도 8은 실제 각도와 측정한 각도 간의 에러 값을 나타낸 그래프이다.
도 9는 아크탄젠트의 특성을 보여주는 그래프이다.
도 10은 본 발명의 일 실시예에 따른 아크탄젠트 계산 방법의 흐름도이다.
FIG. 1 is a conceptual diagram showing a conventional arc tangent calculation process.
2 is a block diagram of an arctangent calculation apparatus according to an embodiment of the present invention.
3 is a conceptual diagram of an angle estimation system according to the present invention.
4 is an example of an algorithm performed to estimate an angle in the MCU of FIG.
5 is an implementation example of the LUT of FIG.
6 is a graph showing simulation results for angle measurement.
7 is an enlarged view of a part of FIG.
8 is a graph showing the error value between the actual angle and the measured angle.
9 is a graph showing the characteristics of the arc tangent.
10 is a flowchart of an arc tangent calculation method according to an embodiment of the present invention.

후술하는 본 발명에 대한 상세한 설명은, 본 발명이 실시될 수 있는 특정 실시예를 예시로서 도시하는 첨부 도면을 참조한다. 이들 실시예는 당업자가 본 발명을 실시할 수 있기에 충분하도록 상세히 설명된다. 본 발명의 다양한 실시예는 서로 다르지만 상호 배타적일 필요는 없음이 이해되어야 한다. 예를 들어, 여기에 기재되어 있는 특정 형상, 구조 및 특성은 일 실시예에 관련하여 본 발명의 정신 및 범위를 벗어나지 않으면서 다른 실시예로 구현될 수 있다. 또한, 각각의 개시된 실시예 내의 개별 구성요소의 위치 또는 배치는 본 발명의 정신 및 범위를 벗어나지 않으면서 변경될 수 있음이 이해되어야 한다. 따라서, 후술하는 상세한 설명은 한정적인 의미로서 취하려는 것이 아니며, 본 발명의 범위는, 적절하게 설명된다면, 그 청구항들이 주장하는 것과 균등한 모든 범위와 더불어 첨부된 청구항에 의해서만 한정된다. 도면에서 유사한 참조부호는 여러 측면에 걸쳐서 동일하거나 유사한 기능을 지칭한다.The following detailed description of the invention refers to the accompanying drawings, which illustrate, by way of illustration, specific embodiments in which the invention may be practiced. These embodiments are described in sufficient detail to enable those skilled in the art to practice the invention. It should be understood that the various embodiments of the present invention are different, but need not be mutually exclusive. For example, certain features, structures, and characteristics described herein may be implemented in other embodiments without departing from the spirit and scope of the invention in connection with an embodiment. It is also to be understood that the position or arrangement of the individual components within each disclosed embodiment may be varied without departing from the spirit and scope of the invention. The following detailed description is, therefore, not to be taken in a limiting sense, and the scope of the present invention is to be limited only by the appended claims, along with the full scope of equivalents to which such claims are entitled, if properly explained. In the drawings, like reference numerals refer to the same or similar functions throughout the several views.

이하, 도면들을 참조하여 본 발명의 바람직한 실시예들을 보다 상세하게 설명하기로 한다. Hereinafter, preferred embodiments of the present invention will be described in more detail with reference to the drawings.

도 2는 본 발명의 일 실시예에 따른 아크탄젠트 계산 장치의 블록도이다. 도 3은 본 발명에 따른 각도 추정 시스템의 개념도이다.2 is a block diagram of an arctangent calculation apparatus according to an embodiment of the present invention. 3 is a conceptual diagram of an angle estimation system according to the present invention.

본 발명에 따른 아크탄젠트 계산 장치(10, 이하 장치)는, 룩-업 테이블(Look-Up Table, 이하 LUT)의 사이즈를 최소화를 위해 에러 분석을 통해 LUT 구간을 미리 정의하고 이를 알고리즘 상에서 주소값을 근사화한다. The arctangent calculation apparatus 10 (hereinafter, referred to as a device) according to the present invention predefines an LUT interval through error analysis to minimize the size of a look-up table (LUT) .

이러한 방법을 통해 하드웨어 복잡성을 줄인 각도 측정 시스템(1)을 구현하며, 본 발명의 시스템(1)은 0도에서 360도 사이의 각도를 1도 미만의 오차로 아크탄젠트를 계산할 수 있다.This method implements an angle measuring system 1 that reduces hardware complexity, and the system 1 of the present invention can calculate an arc tangent with an error of less than one degree from an angle between 0 and 360 degrees.

아크탄젠트(arctangent)는 탄젠트함수의 역함수이고, 역탄젠트 함수라고 하기도 하며, arctan 또는 tan- 1 로 나타낸다.The arctangent is the inverse of the tangent function, sometimes referred to as the inverse tangent function, and is represented by arctan or tan - 1 .

도 2 및 도 3을 참조하면, 본 발명에 따른 장치(10)는 홀 센서(110), 변환부(130), 각도 계산부(150) 및 LUT(170)를 포함한다.2 and 3, the apparatus 10 according to the present invention includes a hall sensor 110, a conversion unit 130, an angle calculation unit 150, and an LUT 170. [

본 발명의 상기 장치(10)는 아크탄젠트 계산을 수행하기 위한 소프트웨어(애플리케이션)가 설치되어 실행될 수 있으며, 상기 홀 센서(110), 상기 변환부(130), 상기 각도 계산부(150) 및 상기 LUT(170)의 구성은 상기 장치(10)에서 실행되는 상기 아크탄젠트 계산을 수행하기 위한 소프트웨어에 의해 제어될 수 있다. The apparatus 10 of the present invention may be implemented with software (application) for performing arc tangent calculation and the Hall sensor 110, the conversion unit 130, the angle calculation unit 150, The configuration of the LUT 170 may be controlled by software for performing the arc tangent computation performed in the apparatus 10. [

상기 장치(10)는 별도의 단말이거나 또는 단말의 일부 모듈일 수 있다. 또한, 상기 홀 센서(110), 상기 변환부(130), 상기 각도 계산부(150) 및 상기 LUT(170)의 구성은 통합 모듈로 형성되거나, 하나 이상의 모듈로 이루어 질 수 있다. 그러나, 이와 반대로 각 구성은 별도의 모듈로 이루어질 수도 있다.The device 10 may be a separate terminal or some module of the terminal. The configuration of the hall sensor 110, the conversion unit 130, the angle calculation unit 150, and the LUT 170 may be an integrated module or may be composed of one or more modules. However, conversely, each configuration may be a separate module.

상기 장치(10)는 이동성을 갖거나 고정될 수 있다. 상기 장치(10)는, 서버(server) 또는 엔진(engine) 형태일 수 있으며, 디바이스(device), 기구(apparatus), 단말(terminal), UE(user equipment), MS(mobile station), 무선기기(wireless device), 휴대기기(handheld device) 등 다른 용어로 불릴 수 있다. The device 10 may be mobile or stationary. The device 10 may be in the form of a server or an engine and may be a device, an apparatus, a terminal, a user equipment (UE), a mobile station (MS) a wireless device, a handheld device, and the like.

상기 장치(10)는 운영체제(Operation System; OS), 즉 시스템을 기반으로 다양한 소프트웨어를 실행하거나 제작할 수 있다. 상기 운영체제는 소프트웨어가 장치의 하드웨어를 사용할 수 있도록 하기 위한 시스템 프로그램으로서, 안드로이드 OS, iOS, 윈도우 모바일 OS, 바다 OS, 심비안 OS, 블랙베리 OS 등 모바일 컴퓨터 운영체제 및 윈도우 계열, 리눅스 계열, 유닉스 계열, MAC, AIX, HP-UX 등 컴퓨터 운영체제를 모두 포함할 수 있다.The device 10 may execute or produce various software based on an operating system (OS), i.e., a system. The operating system is a system program for allowing software to use the hardware of a device. The operating system includes a mobile computer operating system such as Android OS, iOS, Windows Mobile OS, Sea OS, Symbian OS, Blackberry OS, MAC, AIX, and HP-UX.

상기 홀 센서(110)는 전류가 흐르는 도체에 자기장을 걸어 주면 전류와 자기장에 수직 방향으로 전압이 발생하는 홀 효과(Hall effect)를 이용하여 자기장의 방향과 크기를 알아낸다. 이때, 발생된 전압은 전류와 자장의 세기에 비례하며, 전류가 일정할 경우 자장의 세기에 비례하는 출력을 발생한다.The hall sensor 110 detects a direction and a size of a magnetic field by using a Hall effect in which a voltage is generated in a direction perpendicular to a current and a magnetic field when a magnetic field is applied to a conductor through which current flows. At this time, the generated voltage is proportional to the intensity of the current and the magnetic field, and when the current is constant, an output proportional to the intensity of the magnetic field is generated.

본 발명의 일 실시예에 따른 상기 홀 센서(110)는 x축 및 y축의 값을 갖는 2축 홀센서일 수 있다. 상기 홀 센서(110)는 x축 전압값 및 y축 전압값을 상기 변환부(130)로 출력한다.The Hall sensor 110 according to an embodiment of the present invention may be a two-axis Hall sensor having values of x axis and y axis. The hall sensor 110 outputs the x-axis voltage value and the y-axis voltage value to the conversion unit 130.

상기 변환부(130)는 상기 홀 센서(110)로부터 수신한 x축 전압값 및 상기 y축 전압값을 아날로그-디지털 변환기(Analog-Digital Converter; ADC)를 통해 x축 값 및 y축 값의 디지털 데이터로 변환한다.The conversion unit 130 converts the x-axis voltage value and the y-axis voltage value received from the hall sensor 110 into an x-axis value and a y-axis value through an analog-to-digital converter (ADC) Data.

일 실시예에서, 상기 변환부(130)는 11 비트(bit) 아날로그-디지털 변환기(Analog-Digital Converter; ADC)를 통해 x축 전압값 및 상기 y축 전압값을 디지털 데이터로 변환하여 상기 각도 계산부(150)에 전달한다. In one embodiment, the conversion unit 130 converts the x-axis voltage value and the y-axis voltage value into digital data through an 11-bit analog-to-digital converter (ADC) And transmits it to the unit 150.

아래의 수학식 1 및 수학식 2와 같이, 홀 센서와 자석에서 발생하는 자기장의 중심축이 일치해 있고, 홀 센서의 오프셋 전압 및 감도가 보정된 환경에서는, x축 값의 제곱과 y축 값 제곱이 일정한 값을 가진다. 따라서, x축 값을 통해 LUT에서 해당 각도를 알아 낼 수 있다.In the environment where the center axes of the magnetic fields generated by the hall sensor and the magnet coincide with each other and the offset voltage and sensitivity of the hall sensor are corrected as shown in the following equations (1) and (2), the square of the x- The square has a constant value. Therefore, the angle can be found in the LUT through the x-axis value.

[수학식 1][Equation 1]

Figure 112016111265704-pat00001
Figure 112016111265704-pat00001

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

Figure 112016111265704-pat00002
Figure 112016111265704-pat00002

상기 각도 계산부(150)는 상기 디지털 데이터로 변환된 x축 값을 기초로 룩-업 테이블(Look-Up Table; LUT)의 주소값을 간소화하고, 상기 주소값에 매핑되는 각도를 도출한다. 또한, 상기 x축 값 및 상기 y축 값의 부호를 기초로, 상기 각도에 대응하는 사분면을 결정하여 최종 아크탄젠트를 계산한다.The angle calculator 150 simplifies an address value of a look-up table (LUT) based on the x-axis value converted into the digital data, and derives an angle mapped to the address value. Further, based on the sign of the x-axis value and the y-axis value, a quadrant corresponding to the angle is determined to calculate the final arc tangent.

상기 각도 계산부(150)는 선형적인 x축 값에 대해 아크탄젠트 값은 비선형 적이기 때문에, 각도가 큰 경우에는 x축 값을 근사화하여 LUT의 주소값으로 사용하고, 각도가 작은 경우에는 x축 값을 그대로 주소값으로 사용할 수 있다.Since the arctangent value is nonlinear with respect to the linear x-axis value, when the angle is large, the x-axis value is approximated to be used as an address value of the LUT. When the angle is small, Can be used as an address value.

상기 각도 계산부(150)는 차량, 핸드폰 등의 MCU(Micro Controller Unit)에 구현될 수 있으며, 상기 LUT(170)는 내부 메모리 또는 별도 메모리에 구현될 수 있다.The angle calculation unit 150 may be implemented in an MCU (Micro Controller Unit) such as a vehicle or a mobile phone, and the LUT 170 may be implemented in an internal memory or a separate memory.

도 4를 참조하면, MCU에서 구현되는 각도를 추정하기 위해 수행되는 알고리즘의 예를 나타내었다. 본 발명에서는 미리 정의된 구간에 대해 복잡한 계산 과정 없이 상기 LUT(170)에서 아크탄젠트를 맵핑한다. Referring to FIG. 4, an example of an algorithm performed to estimate an angle implemented in the MCU is shown. In the present invention, arctangent is mapped in the LUT 170 without a complicated calculation process for a predefined section.

이를 위해, 에러 분석을 통해 LUT 구간을 미리 정의하고, 이를 알고리즘 상에서 주소값을 근사화한다. 상기 정의된 구간은 아크탄젠트 계산 오차가 일정 범위 안에 들어오도록 정의하는 구간으로 설정할 수 있다.To do this, we predefine the LUT interval through error analysis and approximate the address value in the algorithm. The defined interval may be defined as a section defining an arc tangent calculation error within a certain range.

예를 들어, 상기 x축 값이 임계값 미만인 경우, 근사화된 주소값을 사용하고, 상기 x축 값이 임계값 이상인 경우, 상기 x축 값을 주소값으로 사용할 수 있다. 상기 임계값은 852의 x축 값일 수 있다.For example, when the x-axis value is less than the threshold value, the approximated address value is used, and when the x-axis value is equal to or greater than the threshold value, the x-axis value can be used as the address value. The threshold may be an x-axis value of 852.

도 6은 각도 측정에 대한 시뮬레이션 결과를 나타낸 그래프이고, 도 7은 도 6의 일부를 확대한 그래프이다. 도 8은 실제 각도와 측정한 각도 간의 에러 값을 나타낸 그래프이다.FIG. 6 is a graph showing simulation results for angle measurement, and FIG. 7 is an enlarged view of part of FIG. 8 is a graph showing the error value between the actual angle and the measured angle.

도 8을 참조하면, x축 값이 852 이상부터 계산 오차가 1도 이상이므로, 1도 미만의 오차를 위해 x축 값이 852 미만일 때부터 근사화된 주소값의 LUT를 사용할 수 있다. 따라서, 852 이상일 때에는 정수 데이터로 라운딩 함으로써 발생하는 오차이며, 852 미만일 때에는 근사화된 주소값에 의한 오차가 추가적으로 발생한다.Referring to FIG. 8, since the x-axis value is 852 or more and the calculation error is 1 degree or more, the approximated address value LUT can be used when the x-axis value is less than 852 for less than 1 degree error. Therefore, an error caused by rounding with integer data when the number is 852 or more, and an error due to an approximated address value occurs when the number is less than 852.

또한, 상기 각도 계산부(150)는 x축 값과 y축 값의 부호를 통해 몇 사분면에 있는지를 알 수 있다. 즉, 알고리즘에 따라 아래와 같이 제1 사분면 내지 제4 사분면 중 하나에 해당하게 된다.Also, the angle calculator 150 can know the quadrant of the x-axis value and the y-axis value. That is, one of the first to fourth quadrants corresponds to the following algorithm.

제1 사분면: x>0, y>0, Angle = LUT [x]First quadrant: x> 0, y> 0, Angle = LUT [x]

제4 사분면: x>0, y<0, Angle = 360 - LUT [x]Fourth quadrant: x> 0, y <0, Angle = 360 - LUT [x]

제2 사분면: x<0, y>0, Angle = 180 - LUT [x]Second quadrant: x <0, y> 0, Angle = 180 - LUT [x]

제3 사분면: x<0, y<0, Angle = 180 + LUT [x]Third quadrant: x <0, y <0, Angle = 180 + LUT [x]

따라서, LUT는 ADC 해상도의 절반에 해당되는 10 비트(bit)에 해당되는 값만 구현하여도 각도 값은 0도 부터 360도 사이의 값으로 모두 표현할 수 있다. Therefore, even if the LUT implements only a value corresponding to 10 bits corresponding to half of the ADC resolution, the angle value can be expressed as a value between 0 and 360 degrees.

이때, 선형적인 x축 값에 대해 아크탄젠트 값은 비선형 적이기 때문에 모든 x축 값에 대해 LUT를 구비하는 것은 하드웨어 면적의 낭비를 가져온다. 이에, 본 발명은 각도가 큰 경우에는 x축 값을 근사화하여 LUT의 주소값으로 사용하고, 각도가 작은 경우에는 x축 값을 그대로 주소값으로 사용한다. At this time, arctangent values for the linear x-axis values are nonlinear, so having a LUT for all x-axis values leads to a waste of hardware area. Accordingly, when the angle is large, the x-axis value is approximated to be used as the address value of the LUT. When the angle is small, the x-axis value is directly used as the address value.

따라서, 0부터 1023의 x축 값에 대해 모든 메모리를 구비할 필요가 없다. MCU는 16 비트(bit)의 고정 소숫점 연산기만을 갖고 있기 때문에 LUT는 512배 스케일된 16 비트의 정수 데이터를 갖고 있다.Therefore, it is not necessary to provide all the memories for the x-axis values from 0 to 1023. Since the MCU has only a 16-bit fixed point calculator, the LUT has 16-bit integer data scaled 512 times.

상기 LUT(170)는 1024개의 x축 값에 대해 더욱 간소화 하여 279개의 LUT만 갖고도, 1도 미만의 오차를 갖는 아크탄젠트 계산할 수 있다. 도 5를 참조하면, x축 값에 매핑하는 각도를 저장하는 LUT를 보여준다.The LUT 170 can further simplify the 1024 x-axis values and calculate arctangent with an error of less than 1 with only 279 LUTs. Referring to FIG. 5, there is shown a LUT storing an angle mapping to an x-axis value.

본 발명에 따른 상기 LUT(170)는 0도부터 90도까지를 표현하며, 그 외의 각도는 상기 각도 계산부(150)가 수행하는 알고리즘 상에서 처리될 수 있다. The LUT 170 according to the present invention represents 0 to 90 degrees, and other angles can be processed on the algorithm performed by the angle calculator 150. [

x축 값과 y축 값의 부호를 통해 몇 사분면에 있는지를 알 수 있기 때문에, LUT는 ADC 해상도의 절반에 해당되는 10 비트에 해당 되는 값만 구현하여도 각도 값은 0도 부터 360도 사이의 값으로 모두 표현할 수 있다. 이에 따라, 본 발명에 따른 상기 LUT(170)는 매우 작게 축소할 수 있다.Because the x-axis and y-axis values indicate the quadrant, the LUT has a value between 0 and 360 degrees even if only the 10 bits corresponding to half the resolution of the ADC are implemented. . Accordingly, the LUT 170 according to the present invention can be reduced very small.

이는 도 9와 같이 아크탄젠트의 각도가 반복되는 특성을 이용하기 때문이다. 도 9의 아크탄젠트 값은 아래와 같다.This is because, as shown in Fig. 9, the arc tangent angle is repeated. The arc tangent values in Fig. 9 are as follows.

Figure 112016111265704-pat00003
Figure 112016111265704-pat00003

이에 따라, 본 발명은 기존 룩-업 테이블의 4분의 1만 필요하게 되어, LUT의 사이즈를 대폭 줄일 수 있는 것이다. LUT의 사이즈가 줄어듬에 따라 최근 더 소형화되고, 컴팩트화 되는 전자기기 등에 적용하기에 적합하다.Accordingly, the present invention requires only 1/4 of the conventional look-up table, thereby greatly reducing the size of the LUT. It is suitable for application to electronic apparatuses that are further downsized and compacted in accordance with the reduction of the size of the LUT.

본 발명에서는 홀 센서의 위치 정보로부터 각도를 측정하기 위한 저가의 시스템에 대해 제안한다. 본 발명은 복잡한 하드웨어 추가나 긴 연산시간 없이 각도를 추정하기 위하여 LUT를 이용한 아크탄젠트(ATAN) 함수를 구현한다. The present invention proposes a low-cost system for measuring the angle from the position information of the hall sensor. The present invention implements an arc tangent (ATAN) function using an LUT to estimate angles without adding complex hardware or long computation time.

또한, LUT의 소형화를 위해 오차값에 따라 근사화된 주소값을 갖도록 구현하고, 구현된 함수는 모의 시뮬레이션 환경에서 0 내지 360도 까지 1도 미만의 오차를 가지므로 매우 정확한 결과를 도출할 수 있다.In order to miniaturize the LUT, the address value is approximated according to the error value, and the implemented function has an error of less than 1 degree from 0 to 360 degrees in the simulated simulation environment, so that a very accurate result can be obtained.

도 10은 본 발명의 일 실시예에 따른 아크탄젠트 계산 방법의 흐름도이다.10 is a flowchart of an arc tangent calculation method according to an embodiment of the present invention.

본 실시예에 따른 아크탄젠트 계산 방법은, 도 2의 장치(10)와 실질적으로 동일한 구성에서 진행될 수 있다. 따라서, 도 2의 장치(10)와 동일한 구성요소는 동일한 도면부호를 부여하고, 반복되는 설명은 생략한다. 또한, 본 실시예에 따른 아크탄젠트 계산 방법은 아크탄젠트 계산을 수행하기 위한 소프트웨어(애플리케이션)에 의해 실행될 수 있다.The arctangent calculation method according to the present embodiment can be carried out in substantially the same configuration as the apparatus 10 of Fig. Therefore, the same components as those of the device 10 of FIG. 2 are denoted by the same reference numerals, and repeated descriptions are omitted. Further, the arc tangent calculation method according to the present embodiment can be executed by software (application) for performing arc tangent calculation.

도 10을 참조하면, 본 실시예에 따른 아크탄젠트 계산 방법은, 2축 홀센서로부터 생성되는 x축 전압값 및 y축 전압값을 수신한다(단계 S10). Referring to FIG. 10, the arc tangent calculation method according to the present embodiment receives an x-axis voltage value and a y-axis voltage value generated from a biaxial hall sensor (step S10).

상기 홀 센서는 전류가 흐르는 도체에 자기장을 걸어 주면 전류와 자기장에 수직 방향으로 전압이 발생하는 홀 효과(Hall effect)를 이용하여 자기장의 방향과 크기를 알아낸다. 이때, 발생된 전압은 전류와 자장의 세기에 비례하며, 전류가 일정할 경우 자장의 세기에 비례하는 출력을 발생한다.The Hall sensor detects a direction and a size of a magnetic field by using a Hall effect in which a voltage is generated in a direction perpendicular to a current and a magnetic field when a magnetic field is applied to a conductor through which current flows. At this time, the generated voltage is proportional to the intensity of the current and the magnetic field, and when the current is constant, an output proportional to the intensity of the magnetic field is generated.

본 발명의 일 실시예에 따른 상기 홀 센서는 x축 및 y축의 값을 갖는 2축 홀센서일 수 있으며, x축 전압값 및 y축 전압값을 출력한다.The Hall sensor according to an embodiment of the present invention may be a two-axis hall sensor having values of x axis and y axis and outputs x axis voltage value and y axis voltage value.

상기 x축 전압값 및 상기 y축 전압값을 아날로그-디지털 변환기(Analog-Digital Converter; ADC)를 통해 x축 값 및 y축 값의 디지털 데이터로 변환한다(단계 S30).The x-axis voltage value and the y-axis voltage value are converted into digital data of an x-axis value and a y-axis value through an analog-to-digital converter (ADC) (step S30).

홀 센서와 자석에서 발생하는 자기장의 중심축이 일치해 있고, 홀 센서의 오프셋 전압 및 감도가 보정된 환경에서는, x축 값의 제곱과 y축 값 제곱이 일정한 값을 가진다. 따라서, x축 값을 통해 LUT에서 해당 각도를 알아 낼 수 있다.In a circumstance where the center axes of the magnetic field generated by the Hall sensor and the magnet coincide with each other and the offset voltage and sensitivity of the hall sensor are corrected, the square of the x-axis value and the square of the y-axis value are constant. Therefore, the angle can be found in the LUT through the x-axis value.

상기 디지털 데이터로 변환된 x축 값을 기초로 룩-업 테이블(Look-Up Table; LUT)의 주소값을 간소화한다(단계 S50).The address value of the look-up table (LUT) is simplified based on the x-axis value converted into the digital data (step S50).

상기 주소값을 간소화하는 단계(단계 S50)에서는, 선형적인 x축 값에 대해 아크탄젠트 값은 비선형 적이기 때문에, 각도가 큰 경우에는 x축 값을 근사화하여 LUT의 주소값으로 사용하고, 각도가 작은 경우에는 x축 값을 그대로 주소값으로 사용할 수 있다.In the step of simplifying the address value (step S50), since the arctangent value is nonlinear with respect to the linear x-axis value, when the angle is large, the x-axis value is approximated to be used as the address value of the LUT, In this case, the x-axis value can be directly used as the address value.

상기 주소값을 간소화하는 단계(단계 S50)는 차량, 핸드폰 등의 MCU(Micro Controller Unit)에 구현될 수 있으며, 상기 LUT는 MCU의 내부 메모리 또는 별도 메모리에 구현될 수 있다.The step of simplifying the address value (step S50) may be implemented in an MCU (Micro Controller Unit) such as a vehicle or a mobile phone, and the LUT may be implemented in an internal memory or a separate memory of the MCU.

본 발명에서는 에러 분석을 통해 LUT 구간을 미리 정의하고, 이를 알고리즘 상에서 주소값을 근사화한다. 상기 정의된 구간은 아크탄젠트 계산 오차가 일정 범위 안에 들어오도록 정의하는 구간으로 설정할 수 있다.In the present invention, the LUT interval is predefined through error analysis, and the address value is approximated on the algorithm. The defined interval may be defined as a section defining an arc tangent calculation error within a certain range.

예를 들어, 상기 x축 값이 임계값 미만인 경우, 근사화된 주소값을 사용하고, 상기 x축 값이 임계값 이상인 경우, 상기 x축 값을 주소값으로 사용할 수 있다. 일례로, 계산 오차가 1도 미만으로 설정한 경우, 상기 임계값은 852의 x축 값일 수 있다. For example, when the x-axis value is less than the threshold value, the approximated address value is used, and when the x-axis value is equal to or greater than the threshold value, the x-axis value can be used as the address value. For example, if the computation error is set to less than one degree, the threshold may be an x-axis value of 852.

이 경우, x축 값이 852 이상부터 계산 오차가 1도 이상이므로, 1도 미만의 오차를 위해 x축 값이 852 미만일 때부터 근사화된 주소값의 LUT를 사용할 수 있다. 따라서, 852 이상일 때에는 정수 데이터로 라운딩 함으로써 발생하는 오차이며, 852 미만일 때에는 근사화된 주소값에 의한 오차가 추가적으로 발생한다.In this case, since the calculation error is more than 1 degree from the x-axis value of 852 or more, the approximated address value LUT can be used when the x-axis value is less than 852 for less than 1 degree error. Therefore, an error caused by rounding with integer data when the number is 852 or more, and an error due to an approximated address value occurs when the number is less than 852.

LUT의 주소값을 도출하면, 0도 내지 90도를 표현하는 룩-업 테이블로부터 상기 주소값에 매핑되는 각도를 도출한다(단계 S70). 또한, 상기 x축 값 및 상기 y축 값의 부호를 기초로, 제1 사분면 내지 제4 사분면 중 어느 사분면인지 결정한다(단계 S90). When an address value of the LUT is derived, an angle mapped to the address value is derived from a look-up table expressing 0 degrees to 90 degrees (step S70). Further, based on the sign of the x-axis value and the y-axis value, it is determined which quadrant of the first to fourth quadrants (step S90).

본 발명에 따른 상기 LUT는 0도부터 90도까지를 표현하며, 그 외의 각도는 알고리즘 상에서 처리될 수 있다. 이에 따라, 본 발명에 따른 상기 LUT는 기존 룩-업 테이블의 4분의 1만 필요하게 되어, LUT의 사이즈를 대폭 줄일 수 있다.The LUT according to the present invention represents from 0 to 90 degrees, and other angles can be processed in an algorithm. Accordingly, the LUT according to the present invention requires only 1/4 of the conventional look-up table, and the size of the LUT can be greatly reduced.

도 4를 참조하면, MCU에서 구현되는 각도를 추정하기 위해 수행되는 알고리즘의 예를 나타내었다. 본 발명에서는 미리 정의된 구간에 대해 복잡한 계산 과정 없이 상기 LUT에서 아크탄젠트를 맵핑한다. Referring to FIG. 4, an example of an algorithm performed to estimate an angle implemented in the MCU is shown. In the present invention, the arctangent is mapped in the LUT without complicated calculation for a predefined period.

따라서, x축 값을 통해 LUT에서 해당 각도를 알아 낼 수 있다. 그리고, x축 값과 y축 값의 부호를 통해 몇 사분면에 있는지를 알 수 있기 때문에, LUT는 ADC 해상도의 절반에 해당되는 10 비트(bit)에 해당 되는 값만 구현하여도 각도 값은 0도 부터 360도 사이의 값으로 모두 표현할 수 있다. Therefore, the angle can be found in the LUT through the x-axis value. Since the x-axis value and the y-axis value indicate the quadrants, the LUT has 0 to 10 degrees even if only 10 bits corresponding to half of the ADC resolution are implemented. It can be expressed as a value between 360 degrees.

이때, 선형적인 x축 값에 대해 아크탄젠트 값은 비선형 적이기 때문에 모든 x축 값에 대해 LUT를 구비하는 것은 하드웨어 면적의 낭비를 가져온다. 이에, 본 발명은 각도가 큰 경우에는 x축 값을 근사화하여 LUT의 주소값으로 사용하고, 각도가 작은 경우에는 x축 값을 그대로 주소값으로 사용한다. At this time, arctangent values for the linear x-axis values are nonlinear, so having a LUT for all x-axis values leads to a waste of hardware area. Accordingly, when the angle is large, the x-axis value is approximated to be used as the address value of the LUT. When the angle is small, the x-axis value is directly used as the address value.

따라서, 0부터 1023의 x축 값에 대해 모든 메모리를 구비할 필요가 없다. MCU는 16 비트(bit)의 고정 소숫점 연산기만을 갖고 있기 때문에 LUT는 512배 스케일된 16 비트의 정수 데이터를 갖고 있다.Therefore, it is not necessary to provide all the memories for the x-axis values from 0 to 1023. Since the MCU has only a 16-bit fixed point calculator, the LUT has 16-bit integer data scaled 512 times.

이에 따라, 1024개의 x축 값에 대해 더욱 간소화 하여, 279개의 LUT만 갖고도 1도 미만의 오차를 갖는 아크탄젠트를 계산할 수 있다. 또한, 본 발명은 복잡한 하드웨어 추가나 긴 연산시간 없이, 작은 사이즈의 LUT로 각도를 추정할 수 있다.Accordingly, arctangent with an error of less than one degree can be calculated even with only 279 LUTs by further simplifying the 1024 x-axis values. Further, the present invention can estimate the angle with a small-sized LUT without adding complicated hardware or a long computation time.

이와 같은, 아크탄젠트 계산 방법은 애플리케이션으로 구현되거나 다양한 컴퓨터 구성요소를 통하여 수행될 수 있는 프로그램 명령어의 형태로 구현되어 컴퓨터 판독 가능한 기록 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능한 기록 매체는 프로그램 명령어, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. Such arctangent calculation methods may be implemented in an application or implemented in the form of program instructions that may be executed through various computer components and recorded on a computer-readable recording medium. The computer-readable recording medium may include program commands, data files, data structures, and the like, alone or in combination.

상기 컴퓨터 판독 가능한 기록 매체에 기록되는 프로그램 명령어는 본 발명을 위하여 특별히 설계되고 구성된 것들이거니와 컴퓨터 소프트웨어 분야의 당업자에게 공지되어 사용 가능한 것일 수도 있다. The program instructions recorded on the computer-readable recording medium may be ones that are specially designed and configured for the present invention and are known and available to those skilled in the art of computer software.

컴퓨터 판독 가능한 기록 매체의 예에는, 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체, CD-ROM, DVD와 같은 광기록 매체, 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 ROM, RAM, 플래시 메모리 등과 같은 프로그램 명령어를 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks and magnetic tape, optical recording media such as CD-ROMs and DVDs, magneto-optical media such as floptical disks, media, and hardware devices specifically configured to store and execute program instructions such as ROM, RAM, flash memory, and the like.

프로그램 명령어의 예에는, 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드도 포함된다. 상기 하드웨어 장치는 본 발명에 따른 처리를 수행하기 위해 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.Examples of program instructions include machine language code such as those generated by a compiler, as well as high-level language code that can be executed by a computer using an interpreter or the like. The hardware device may be configured to operate as one or more software modules for performing the processing according to the present invention, and vice versa.

이상에서는 실시예들을 참조하여 설명하였지만, 해당 기술 분야의 숙련된 당업자는 하기의 특허 청구의 범위에 기재된 본 발명의 사상 및 영역으로부터 벗어나지 않는 범위 내에서 본 발명을 다양하게 수정 및 변경시킬 수 있음을 이해할 수 있을 것이다.It will be apparent to those skilled in the art that various modifications and variations can be made in the present invention without departing from the spirit or scope of the present invention as defined by the following claims. You will understand.

본 발명은 하드웨어 복잡도나 연산 사이클 수를 줄이기 위해 LUT 방식을 이용하여 ATAN 함수를 구현하여, LUT의 사이즈를 줄였다. 이에 따라, 홀(Hall) 센서를 이용하는 스마트 폰, 조이스틱, 카메라, 차량 등의 각도 측정 시스템에 다양하게 적용될 수 있다.In order to reduce the hardware complexity and the number of operation cycles, the present invention implements an ATAN function using the LUT method to reduce the size of the LUT. Accordingly, the present invention can be applied to various angular measurement systems such as a smart phone, a joystick, a camera, and a vehicle using a Hall sensor.

1: 각도 추정 시스템
10: 아크탄젠트 계산 장치
110: 홀 센서
130: 변환부
150: 각도 계산부
170: LUT
1: Angle estimation system
10: arctangent calculation device
110: hall sensor
130:
150:
170: LUT

Claims (10)

2축 홀센서로부터 생성되는 x축 전압값 및 y축 전압값을 수신하는 단계;
상기 x축 전압값 및 상기 y축 전압값을 아날로그-디지털 변환기(Analog-Digital Converter; ADC)를 통해 x축 값 및 y축 값의 디지털 데이터로 변환하는 단계;
상기 디지털 데이터로 변환된 x축 값을 기초로 룩-업 테이블(Look-Up Table; LUT)의 주소값을 간소화하는 단계;
0도 내지 90도를 표현하는 룩-업 테이블로부터 상기 주소값에 매핑되는 각도를 도출하는 단계; 및
상기 x축 값 및 상기 y축 값의 부호를 기초로, 제1 사분면 내지 제4 사분면 중 어느 사분면인지 결정하는 단계를 포함하는, 아크탄젠트 계산 방법.
Receiving an x-axis voltage value and a y-axis voltage value generated from the biaxial hall sensor;
Converting the x-axis voltage value and the y-axis voltage value into digital data of an x-axis value and a y-axis value through an analog-to-digital converter (ADC);
Simplifying an address value of a look-up table (LUT) based on an x-axis value converted into the digital data;
Deriving an angle mapped to the address value from a look-up table representing 0 degrees to 90 degrees; And
Determining a quadrant of the first to fourth quadrants based on the sign of the x-axis value and the y-axis value.
제1항에 있어서, 상기 디지털 데이터로 변환된 x축 값을 기초로 룩-업 테이블(Look-Up Table; LUT)의 주소값을 간소화하는 단계는,
상기 x축 값이 임계값 미만인 경우, 근사화된 주소값을 룩-업 테이블(Look-Up Table; LUT)의 주소값으로 사용하는, 아크탄젠트 계산 방법.
The method of claim 1, wherein the step of simplifying an address value of a look-up table (LUT) based on an x-
Wherein the approximated address value is used as an address value of a look-up table (LUT) when the x-axis value is less than a threshold value.
제2항에 있어서, 상기 디지털 데이터로 변환된 x축 값을 기초로 룩-업 테이블(Look-Up Table; LUT)의 주소값을 간소화하는 단계는,
상기 x축 값이 임계값 이상인 경우, 상기 x축 값을 룩-업 테이블(Look-Up Table; LUT)의 주소값으로 사용하는, 아크탄젠트 계산 방법.
3. The method of claim 2, wherein the step of simplifying an address value of a look-up table (LUT) based on an x-
Axis value is used as an address value of a look-up table (LUT) when the x-axis value is equal to or greater than a threshold value.
제2항에 있어서,
상기 임계값은 아크탄젠트 계산 오차가 일정 범위 내에 포함되도록 정의하는, 아크탄젠트 계산 방법.
3. The method of claim 2,
Wherein the threshold defines the arc tangent calculation error to be within a certain range.
제4항에 있어서,
상기 계산 오차는 1이고, 상기 x축 값의 임계값은 852인, 아크탄젠트 계산 방법.
5. The method of claim 4,
Wherein the calculation error is 1 and the threshold value of the x-axis value is 852. [
제1항에 있어서,
상기 x축 값은 0 내지 1023의 값을 갖고, 상기 룩-업 테이블(Look-Up Table; LUT)은 279개의 x축 값에 대응하는 각도 데이터를 저장하는, 아크탄젠트 계산 방법.
The method according to claim 1,
Wherein the x-axis value has a value from 0 to 1023, and the look-up table (LUT) stores angle data corresponding to 279 x-axis values.
제1항 내지 제6항 중 어느 하나의 항에 따른 아크탄젠트 계산 방법을 수행하기 위한, 컴퓨터 프로그램이 기록된 컴퓨터로 판독 가능한 기록 매체.
A computer-readable recording medium on which a computer program is recorded, for performing the arc tangent calculation method according to any one of claims 1 to 6.
2축 홀센서로부터 생성되는 x축 및 y축 전압값을 수신하는 수신부;
상기 x축 및 y축 전압값을 아날로그-디지털 변환기(Analog-Digital Converter; ADC)를 통해 x축 값 및 y축 값의 디지털 데이터로 변환하는 변환부;
상기 디지털 데이터로 변환된 x축 값을 기초로 룩-업 테이블(Look-Up Table; LUT)의 주소값을 간소화 하고, 상기 x축 값 및 상기 y축 값의 부호를 기초로, 상기 주소값에 매핑되는 각도에 대응하는 사분면을 결정하는 각도 계산부; 및
상기 x축 값에 대응하는 0도 내지 90도를 표현하고, 상기 주소값에 대응하는 각도를 상기 각도 계산부에 반환하는 룩-업 테이블을 포함하는, 아크탄젠트 계산 장치.
A receiving unit for receiving x-axis and y-axis voltage values generated from the biaxial hall sensor;
A conversion unit for converting the x-axis and y-axis voltage values into digital data of an x-axis value and a y-axis value through an analog-digital converter (ADC);
Based on the x-axis value converted into the digital data, simplifies an address value of a look-up table (LUT), and based on the x-axis value and the sign of the y- An angle calculation unit for determining a quadrant corresponding to an angle to be mapped; And
And a look-up table which represents 0 to 90 degrees corresponding to the x-axis value and returns an angle corresponding to the address value to the angle calculation unit.
제8항에 있어서, 상기 각도 계산부는,
각도가 큰 경우에는 상기 x축 값을 근사화하여 룩-업 테이블(Look-Up Table; LUT)의 주소값으로 사용하고, 각도가 작은 경우에는 상기 x축 값을 룩-업 테이블(Look-Up Table; LUT)의 주소값으로 사용하는, 아크탄젠트 계산 장치.
9. The apparatus according to claim 8,
If the angle is large, the x-axis value is approximated and used as an address value of a look-up table (LUT). If the angle is small, the x-axis value is referred to as a look-up table ; LUT). &Lt; / RTI &gt;
제8항에 있어서,
상기 아날로그-디지털 변환기는 11 비트(bit)의 디지털 데이터로 변환하고, 상기 룩-업 테이블(Look-Up Table; LUT)은 10 비트 값을 구현하는, 아크탄젠트 계산 장치.
9. The method of claim 8,
Wherein the analog-to-digital converter converts the digital data into 11-bit digital data, and the look-up table (LUT) implements a 10-bit value.
KR1020160151671A 2016-11-15 2016-11-15 Method for calculating arctangent, recording medium and device for performing the method Expired - Fee Related KR101806843B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020160151671A KR101806843B1 (en) 2016-11-15 2016-11-15 Method for calculating arctangent, recording medium and device for performing the method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020160151671A KR101806843B1 (en) 2016-11-15 2016-11-15 Method for calculating arctangent, recording medium and device for performing the method

Publications (1)

Publication Number Publication Date
KR101806843B1 true KR101806843B1 (en) 2017-12-08

Family

ID=60919860

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020160151671A Expired - Fee Related KR101806843B1 (en) 2016-11-15 2016-11-15 Method for calculating arctangent, recording medium and device for performing the method

Country Status (1)

Country Link
KR (1) KR101806843B1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100912509B1 (en) 2007-11-26 2009-08-17 한국전자통신연구원 Inverse tangent calculation method and apparatus
KR101114785B1 (en) 2009-07-03 2012-03-13 후지쯔 가부시끼가이샤 Apparatus and computer readable recording medium for arctangent calculation
JP2016102659A (en) 2014-11-27 2016-06-02 旭化成エレクトロニクス株式会社 Hall sensor, rotation angle sensor, offset adjustment device, and offset adjustment method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100912509B1 (en) 2007-11-26 2009-08-17 한국전자통신연구원 Inverse tangent calculation method and apparatus
KR101114785B1 (en) 2009-07-03 2012-03-13 후지쯔 가부시끼가이샤 Apparatus and computer readable recording medium for arctangent calculation
JP2016102659A (en) 2014-11-27 2016-06-02 旭化成エレクトロニクス株式会社 Hall sensor, rotation angle sensor, offset adjustment device, and offset adjustment method

Similar Documents

Publication Publication Date Title
KR101565362B1 (en) Gyroscope conditioning and gyro-camera alignment
CN107421523A (en) Azimuth calibration method, apparatus, storage medium and computer equipment
KR101922700B1 (en) Method and Apparatus for calculation of angular velocity using acceleration sensor and geomagnetic sensor
JP2013510318A (en) Multi-dimensional sensor offset, sensitivity, and non-orthogonal calibration
US9151622B2 (en) Method and apparatus for estimating moving direction of user and computer-readable storage medium having recorded thereon the method
US10533874B2 (en) Inertial positioning and navigation device featuring a novel walk detection method
JP6465982B2 (en) Image processing apparatus, image processing method, and program
KR20150142322A (en) Apparatus and method for compensating for position error of resolver
CN102342016A (en) Method and device for the angle sensor-free position detection of the rotor shaft of a permanently excited synchronous machine based on current signals and voltage signals
JP7165149B2 (en) Method, digital signal processor and system for determining absolute angle of magnetic field
Chiou et al. A reduced-complexity data-fusion algorithm using belief propagation for location tracking in heterogeneous observations
CN112362044A (en) Indoor positioning method, device, equipment and system
TW201507341A (en) Estimating method for rotor position of motor and estimating device for the same
CN108571967B (en) Positioning method and device
KR101806843B1 (en) Method for calculating arctangent, recording medium and device for performing the method
KR20130093409A (en) Cordic processing device and method
KR20170092356A (en) System for calibrating azimuth of 3-axis magnetic sensor
CN117879429B (en) Rotor initial phase detection method, system, device and readable storage medium
CN107209014B (en) Offset calculation device and azimuth angle sensor using the same
JP2009008536A (en) Device for detecting the rotational position of a rotating body using a resolver
US10921122B2 (en) Tilt event detection device, system and method
CN108253931B (en) Binocular stereo vision ranging method and ranging device thereof
CN105841682B (en) A kind of pointing method based on sensing equipment, device and a kind of mobile terminal
CN112686934B (en) Registration method, device, equipment and medium of point cloud data
Kim et al. Relative azimuth estimation algorithm using rotational displacement

Legal Events

Date Code Title Description
PA0109 Patent application

St.27 status event code: A-0-1-A10-A12-nap-PA0109

PA0201 Request for examination

St.27 status event code: A-1-2-D10-D11-exm-PA0201

PE0902 Notice of grounds for rejection

St.27 status event code: A-1-2-D10-D21-exm-PE0902

P11-X000 Amendment of application requested

St.27 status event code: A-2-2-P10-P11-nap-X000

P13-X000 Application amended

St.27 status event code: A-2-2-P10-P13-nap-X000

E701 Decision to grant or registration of patent right
GRNT Written decision to grant
PE0701 Decision of registration

St.27 status event code: A-1-2-D10-D22-exm-PE0701

PR0701 Registration of establishment

St.27 status event code: A-2-4-F10-F11-exm-PR0701

PR1002 Payment of registration fee

St.27 status event code: A-2-2-U10-U11-oth-PR1002

Fee payment year number: 1

PG1601 Publication of registration

St.27 status event code: A-4-4-Q10-Q13-nap-PG1601

PR1001 Payment of annual fee

St.27 status event code: A-4-4-U10-U11-oth-PR1001

Fee payment year number: 4

PN2301 Change of applicant

St.27 status event code: A-5-5-R10-R13-asn-PN2301

St.27 status event code: A-5-5-R10-R11-asn-PN2301

PR1001 Payment of annual fee

St.27 status event code: A-4-4-U10-U11-oth-PR1001

Fee payment year number: 5

PR1001 Payment of annual fee

St.27 status event code: A-4-4-U10-U11-oth-PR1001

Fee payment year number: 6

PC1903 Unpaid annual fee

St.27 status event code: A-4-4-U10-U13-oth-PC1903

Not in force date: 20231205

Payment event data comment text: Termination Category : DEFAULT_OF_REGISTRATION_FEE

PC1903 Unpaid annual fee

St.27 status event code: N-4-6-H10-H13-oth-PC1903

Ip right cessation event data comment text: Termination Category : DEFAULT_OF_REGISTRATION_FEE

Not in force date: 20231205