CN114370814A - Angle extraction circuit, method and chip - Google Patents

Angle extraction circuit, method and chip Download PDF

Info

Publication number
CN114370814A
CN114370814A CN202210035737.1A CN202210035737A CN114370814A CN 114370814 A CN114370814 A CN 114370814A CN 202210035737 A CN202210035737 A CN 202210035737A CN 114370814 A CN114370814 A CN 114370814A
Authority
CN
China
Prior art keywords
signal
filter
output
angle
voltage signal
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.)
Granted
Application number
CN202210035737.1A
Other languages
Chinese (zh)
Other versions
CN114370814B (en
Inventor
武建峰
钱振煌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Quanzhou Kuntaixin Microelectronic Technology Co ltd
Original Assignee
Quanzhou Kuntaixin Microelectronic Technology Co ltd
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 Quanzhou Kuntaixin Microelectronic Technology Co ltd filed Critical Quanzhou Kuntaixin Microelectronic Technology Co ltd
Priority to CN202210035737.1A priority Critical patent/CN114370814B/en
Priority to CN202411552355.1A priority patent/CN119483548A/en
Publication of CN114370814A publication Critical patent/CN114370814A/en
Application granted granted Critical
Publication of CN114370814B publication Critical patent/CN114370814B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B7/00Measuring arrangements characterised by the use of electric or magnetic techniques
    • G01B7/30Measuring arrangements characterised by the use of electric or magnetic techniques for measuring angles or tapers; for testing the alignment of axes
    • 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/14Mechanical 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 the magnitude of a current or voltage
    • G01D5/142Mechanical 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 the magnitude of a current or voltage using Hall-effect devices
    • G01D5/145Mechanical 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 the magnitude of a current or voltage using Hall-effect devices influenced by the relative movement between the Hall device and magnetic fields
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03HIMPEDANCE NETWORKS, e.g. RESONANT CIRCUITS; RESONATORS
    • H03H17/00Networks using digital techniques
    • H03H17/02Frequency selective networks
    • H03H17/0201Wave digital filters
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03HIMPEDANCE NETWORKS, e.g. RESONANT CIRCUITS; RESONATORS
    • H03H17/00Networks using digital techniques
    • H03H17/02Frequency selective networks
    • H03H17/0202Two or more dimensional filters; Filters for complex signals
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03HIMPEDANCE NETWORKS, e.g. RESONANT CIRCUITS; RESONATORS
    • H03H17/00Networks using digital techniques
    • H03H17/02Frequency selective networks
    • H03H17/0248Filters characterised by a particular frequency response or filtering method
    • H03H17/0282Sinc or gaussian filters
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M1/00Analogue/digital conversion; Digital/analogue conversion
    • H03M1/12Analogue/digital converters
    • H03M1/1205Multiplexed conversion systems
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03HIMPEDANCE NETWORKS, e.g. RESONANT CIRCUITS; RESONATORS
    • H03H17/00Networks using digital techniques
    • H03H2017/0072Theoretical filter design
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03HIMPEDANCE NETWORKS, e.g. RESONANT CIRCUITS; RESONATORS
    • H03H17/00Networks using digital techniques
    • H03H2017/0072Theoretical filter design
    • H03H2017/009Theoretical filter design of IIR filters

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Mathematical Physics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Transmission And Conversion Of Sensor Element Output (AREA)

Abstract

The invention belongs to the technical field of sensing signal processing, and particularly discloses an angle extraction circuit, method and chip. The angle extraction circuit includes: the analog-to-digital converter is used for receiving the voltage signal and performing analog-to-digital conversion on the voltage signal, wherein the voltage signal comprises angle information output by the angle sensor; a signal generator for generating a modulation signal and a reference signal, wherein the modulation signal is used for modulating a voltage signal to obtain a modulated signal; a filter to which the first modulated signal and the second modulated signal are added and inputted to extract angle information; and the phase comparison unit is used for receiving the reference signal output by the signal generator and the output signal of the filter and comparing the reference signal with the output signal so as to acquire the phase difference of the output signal relative to the reference signal. The invention has simple calculation process and greatly reduces the hardware resources required by the calculation process.

Description

角度提取电路、方法及芯片Angle extraction circuit, method and chip

技术领域technical field

本发明属于传感信号处理技术领域,尤其涉及一种角度提取电路、方法及芯片。The invention belongs to the technical field of sensor signal processing, and in particular relates to an angle extraction circuit, method and chip.

技术背景technical background

利用霍尔原理制造的霍尔角度传感器中,霍尔元件在电场力的作用下从基准位置开始旋转,其转过的角度θ是霍尔角度传感器需要输出的内容。在现有的成熟技术中,通常运用CORDIC(Coordinate Rotation Digital Computer,坐标旋转数字计算机)算法来计算该角度的值。该方法基于角度θ的正切(tan)值在一定区间内与1/2的n次方相等的预设(即公式tanαi=2-i),使用一系列固定的角度值,通过逐级累加的方法来得到霍尔角度传感器转过的角度θ的值。最后,为了去除部分噪声,CORDIC算法还要进行一次滤波。In the Hall angle sensor manufactured using the Hall principle, the Hall element starts to rotate from the reference position under the action of the electric field force, and the rotated angle θ is what the Hall angle sensor needs to output. In the existing mature technology, CORDIC (Coordinate Rotation Digital Computer, coordinate rotation digital computer) algorithm is usually used to calculate the value of the angle. This method is based on the presupposition that the tangent (tan) value of the angle θ is equal to the nth power of 1/2 within a certain interval (that is, the formula tanα i =2 -i ), using a series of fixed angle values, by accumulating step by step method to get the value of the angle θ rotated by the Hall angle sensor. Finally, in order to remove part of the noise, the CORDIC algorithm also performs a filtering.

但是相对来说,该方法的计算过程还是比较复杂,需要使用大量存储器记录用于查表指令的表格数据,相应的数字系统也比较复杂,所消耗的资源比较多。对于芯片制造来说,消耗的资源越多,意味着芯片的小型化越困难。为了降低角度计算的难度,亟需一种更节省资源,且计算精度能保持现有水准的角度计算方法。However, the calculation process of this method is relatively complicated, a large amount of memory needs to be used to record the table data used for the table look-up instruction, and the corresponding digital system is also complicated and consumes a lot of resources. For chip manufacturing, the more resources are consumed, the more difficult it is to miniaturize the chip. In order to reduce the difficulty of angle calculation, an angle calculation method that saves more resources and maintains the current level of calculation accuracy is urgently needed.

发明内容SUMMARY OF THE INVENTION

为了解决上述的缺陷,本发明提出了一种角度提取电路,用于提取角度感应器输出的角度值,包括:。In order to solve the above-mentioned defects, the present invention proposes an angle extraction circuit for extracting the angle value output by the angle sensor, including:

第一模数转换器,用于接收第一电压信号,并对所述第一电压信号进行模数转换,所述第一电压信号中包含所述角度感应器输出的角度信息;a first analog-to-digital converter, configured to receive a first voltage signal and perform analog-to-digital conversion on the first voltage signal, where the first voltage signal includes the angle information output by the angle sensor;

第二模数转换器,用于接收第二电压信号,并对所述第二电压信号进行模数转换,所述第二电压信号中包含所述角度感应器输出的角度信息;a second analog-to-digital converter, configured to receive a second voltage signal and perform analog-to-digital conversion on the second voltage signal, where the second voltage signal includes the angle information output by the angle sensor;

信号发生器,用于产生调制信号和参考信号,其中,第一调制信号用于调制所述第一电压信号,以获得第一已调信号,第二调制信号用于调制所述第二电压信号,以获得第二已调信号;a signal generator for generating a modulation signal and a reference signal, wherein the first modulation signal is used to modulate the first voltage signal to obtain a first modulated signal, and the second modulation signal is used to modulate the second voltage signal , to obtain the second modulated signal;

滤波器,所述第一已调信号和所述第二已调信号相加后输入到所述滤波器中,以提取所述角度信息;a filter, the first modulated signal and the second modulated signal are added and input into the filter to extract the angle information;

相位比对单元,接收所述信号发生器输出的所述参考信号和所述滤波器的输出信号,对比所述参考信号和所述输出信号,以获取所述输出信号相对所述参考信号的相位差。a phase comparison unit, receiving the reference signal output by the signal generator and the output signal of the filter, and comparing the reference signal and the output signal to obtain the phase of the output signal relative to the reference signal Difference.

上述的电路中,所述滤波器包括至少2级低通滤波器。In the above circuit, the filter includes at least two low-pass filters.

上述的电路中,所述滤波器为四级IIR(Infinite Impulse Response,无限冲击响应)滤波器。In the above circuit, the filter is a four-stage IIR (Infinite Impulse Response, infinite impulse response) filter.

上述的电路中,所述滤波器的特征函数为:In the above circuit, the characteristic function of the filter is:

REGn=k×REGn-1+(1-k)×new, REGn =k×REGn -1 +(1-k)×new,

其中,REGn是所述滤波器当前输出的值,REGn-1是所述滤波器的上一次的输出值,new是所述滤波器的输入值,k是控制系数。Wherein, REG n is the current output value of the filter, REG n-1 is the last output value of the filter, new is the input value of the filter, and k is a control coefficient.

上述的电路中,所述调制信号为方波。In the above circuit, the modulation signal is a square wave.

上述的电路中,所述相位比对单元为相移计数器,所述相移计数器从所述参考信号的上升/下降沿开始计数,到所述滤波器的所述输出信号的上升/下降沿结束计数。In the above circuit, the phase comparison unit is a phase shift counter, and the phase shift counter starts counting from the rising/falling edge of the reference signal and ends with the rising/falling edge of the output signal of the filter. count.

本发明还提出了一种角度提取方法,用于提取角度感应器输出的角度值,包括如下步骤:The present invention also provides an angle extraction method for extracting the angle value output by the angle sensor, including the following steps:

模数转换步骤,将来自所述角度感应器的第一电压信号和第二电压信号转换为数字信号,其中,所述第一电压信号与所述第二电压信号中包含所述角度感应器输出的角度信息;The analog-to-digital conversion step converts the first voltage signal and the second voltage signal from the angle sensor into digital signals, wherein the first voltage signal and the second voltage signal include the output of the angle sensor angle information;

调制步骤,用第一调制信号和第二调制信号分别调制所述第一电压信号和所述第二电压信号,以获得第一已调信号和第二已调信号;a modulating step of modulating the first voltage signal and the second voltage signal with a first modulation signal and a second modulation signal, respectively, to obtain a first modulated signal and a second modulated signal;

滤波步骤,所述第一已调信号和所述第二已调信号相加后进行滤波,以提取所述角度信息;a filtering step, wherein the first modulated signal and the second modulated signal are added and filtered to extract the angle information;

相位比对步骤,接收参考信号,对比所述参考信号和所述滤波步骤得到的输出信号,以获取所述输出信号相对所述参考信号的相位差。In the phase comparison step, a reference signal is received, and the reference signal is compared with the output signal obtained by the filtering step to obtain a phase difference of the output signal relative to the reference signal.

上述的方法中,所述滤波步骤中,使用多级IIR滤波器进行滤波。In the above method, in the filtering step, multi-stage IIR filters are used for filtering.

上述的方法中,所述多级递归滤波器的每一级滤波器的特征函数为:In the above-mentioned method, the characteristic function of each stage filter of described multistage recursive filter is:

REGn=k×REGn-1+(1-k)×new, REGn =k×REGn -1 +(1-k)×new,

其中,REGn是所述滤波器当前输出的值,REGn-1是所述滤波器在上一次的输出值,new是所述滤波器的输入值,k是控制系数。Wherein, REG n is the current output value of the filter, REG n-1 is the last output value of the filter, new is the input value of the filter, and k is a control coefficient.

上述的方法中,所述第一调制信号和所述第二调制信号为方波。In the above method, the first modulation signal and the second modulation signal are square waves.

相应地,本发明还提出了一种芯片,所述芯片包括角度感应单元,还包括信号处理单元,所述信号处理单元接收所述角度感应单元输出的角度信息并根据上述的方法从所述角度信息中提取出角度值。Correspondingly, the present invention also provides a chip, the chip includes an angle sensing unit, and also includes a signal processing unit, the signal processing unit receives the angle information output by the angle sensing unit and analyzes the angle from the angle according to the above method. The angle value is extracted from the information.

与现有技术相比,本发明通过信号发生器提供同频的调制信号和参考信号,其中调制信号采用方波,参考信号采用正弦波或者余弦波。调制信号用于调制角度感应单元输出的角度信息,以输出包含角度信息的信号波形,该波形一般为阶梯波。经过多级IIR滤波去除方波中所携带的高频分量后得到标准的sin(t+θ)的波形,参考信号sin t(或者也可以是cos t)用于与滤波后的sin(t+θ)波形相比较,通过计数的方式得到sin(t+θ)相对sin t的延时(即相位差θ),从而得到角度感应单元输出的角度信息。上述算法比较简单,在滤波器部分只需要采用移位和加法操作,在比较波形部分只需要简单计数器即可。并且,通过将调制信号sin t和cos t简化为同频的方波,调制部分省略了乘法过程,只需要加法器即可。因此本发明计算过程简单,并且大大减少了计算过程所需要的硬件资源。Compared with the prior art, the present invention provides a modulation signal and a reference signal of the same frequency through a signal generator, wherein the modulation signal adopts a square wave, and the reference signal adopts a sine wave or a cosine wave. The modulation signal is used to modulate the angle information output by the angle sensing unit, so as to output a signal waveform including the angle information, and the waveform is generally a staircase wave. The standard sin(t+θ) waveform is obtained after multi-stage IIR filtering to remove the high-frequency components carried in the square wave. The reference signal sin t (or cos t) is used to compare with the filtered sin(t+ Compared with θ) waveforms, the delay of sin(t+θ) relative to sin t (ie, the phase difference θ) is obtained by counting, so as to obtain the angle information output by the angle sensing unit. The above algorithm is relatively simple, only shift and addition operations are needed in the filter part, and only a simple counter is needed in the comparison waveform part. Moreover, by simplifying the modulated signals sin t and cos t into square waves of the same frequency, the modulation part omits the multiplication process and only needs an adder. Therefore, the calculation process of the present invention is simple, and the hardware resources required for the calculation process are greatly reduced.

此外,本发明在计算角度的过程中使用了多级滤波器,已起到了噪声滤除的作用,不要在计算结束后另外使用滤波器来过滤噪声,相对现有技术节省了一个步骤。In addition, the present invention uses a multi-stage filter in the process of calculating the angle, which has already played the role of noise filtering. It is not necessary to use another filter to filter the noise after the calculation, which saves one step compared with the prior art.

附图说明Description of drawings

图1为本发明一些实施例的硬件框图;1 is a hardware block diagram of some embodiments of the present invention;

图2为图1中的感应单元的原理示意图;Fig. 2 is the principle schematic diagram of the induction unit in Fig. 1;

图3a为本发明一些实施例的角度提取电路的示意框图;3a is a schematic block diagram of an angle extraction circuit according to some embodiments of the present invention;

图3b为将图3a所示的电路中的正弦/余弦信号替换为同频的方波的示意性框图;Figure 3b is a schematic block diagram of replacing the sine/cosine signal in the circuit shown in Figure 3a with a square wave of the same frequency;

图4为图3b所示的A、B、C、D、E五个位置处的波形的对照图;FIG. 4 is a comparison diagram of waveforms at five positions A, B, C, D, and E shown in FIG. 3 b;

图5为方波与标准正弦波的对照图;Fig. 5 is the comparison chart of square wave and standard sine wave;

图6-10为图3b所示的四级滤波器的输出波形与参考波形Ref经四级滤波器分别滤波后的波形的对比图;Figure 6-10 is a comparison diagram of the output waveform of the four-stage filter shown in Figure 3b and the reference waveform Ref filtered by the four-stage filter;

图11为本发明中通过计数获取角度θ的电路示意图。FIG. 11 is a schematic diagram of a circuit for obtaining the angle θ by counting in the present invention.

具体实施例specific embodiment

为使本发明的目的、特征更明显易懂,下面结合附图对本发明的具体实施方式作进一步的说明。本领域技术人员可由本说明书所揭示的内容轻易地了解本发明的其他优点及功效。虽然本发明的描述将结合较佳实施例一起介绍,但这并不代表此发明的特征仅限于该实施方式。恰恰相反,结合实施方式作发明介绍的目的是为了覆盖基于本发明的权利要求而有可能延伸出的其它选择或改造。为了提供对本发明的深度了解,以下描述中将包含许多具体的细节。本发明也可以不使用这些细节实施。此外,为了避免混乱或模糊本发明的重点,有些具体细节将在描述中被省略。且,在不冲突的情况下,本发明中的实施例及实施例中的特征允许相互组合或替换。In order to make the objects and features of the present invention more clearly understood, the specific embodiments of the present invention will be further described below with reference to the accompanying drawings. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. Although the description of the invention will be presented in conjunction with the preferred embodiment, this does not mean that the features of the invention are limited to this embodiment. On the contrary, the purpose of introducing the invention in conjunction with the embodiments is to cover other options or modifications that may be extended based on the claims of the invention. The following description will contain numerous specific details in order to provide a thorough understanding of the present invention. The invention may also be practiced without these details. Furthermore, some specific details will be omitted from the description in order to avoid obscuring or obscuring the gist of the present invention. Moreover, the embodiments of the present invention and the features of the embodiments are allowed to be combined or substituted with each other without conflict.

需说明的是,附图均采用非常简化的形式且均使用非精准的比例,仅用以方便、明晰地辅助说明本发明实施例的目的。并且,在本说明书中,相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。It should be noted that, the accompanying drawings are all in a very simplified form and in inaccurate scales, and are only used to facilitate and clearly assist the purpose of explaining the embodiments of the present invention. Also, in this specification, like numerals and letters refer to like items in the following figures, so once an item is defined in one figure, it need not be further defined in subsequent figures and explanation.

还需声明的是,本发明中对步骤编号的目的在于便于引用,而非限定先后顺序。对于个别需强调顺序的步骤,文中将以专门文字进行特别说明。It should also be stated that the purpose of numbering the steps in the present invention is to facilitate reference, rather than limiting the sequence. For individual steps that need to be emphasized in order, the text will be specially explained in special words.

在结合附图对本发明的各实施例进行描述时中,术语“上”、“下”、“内”、“底”等指示的方位或位置关系为基于附图所示的方位或位置关系,或者是该发明产品使用时惯常摆放的方位或位置关系,仅是为了便于描述本发明和简化描述,而不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本发明的限制。When describing the various embodiments of the present invention in conjunction with the accompanying drawings, the orientation or positional relationship indicated by the terms "upper", "lower", "inside", "bottom", etc. is based on the orientation or positional relationship shown in the accompanying drawings, Or the orientation or positional relationship that the product of the invention is usually placed in use is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operation, and therefore should not be construed as a limitation of the present invention.

为使本发明的目的、技术方案和优点更加清楚,以下将结合附图对本发明的实施方式作进一步地详细描述。In order to make the objectives, technical solutions and advantages of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.

图1所示为本发明中一些实施例的硬件框图。本发明所提供的角度提取电路包括:感应单元101、模数转换单元102、信号处理单元103和数模转换单元104。FIG. 1 shows a hardware block diagram of some embodiments of the present invention. The angle extraction circuit provided by the present invention includes: an induction unit 101 , an analog-to-digital conversion unit 102 , a signal processing unit 103 and a digital-to-analog conversion unit 104 .

感应单元101包括用于感应磁场的方向的角度传感器,,并输出包含了该磁场方向信息的电压或电流。本实施例以输出电压为例展开说明。在一些实施例中,角度传感器可以是霍尔(Hall)元件、各向异性磁电阻(Anisotropic Magneto resistance,AMR)元件、巨磁电阻(Giant Magneto resistance,GMR)元件以及隧道磁电阻(Tunnel MagnetoResistance,TMR)。具体的,可参看图2。图2为图1中的感应单元101的原理示意图。图中,霍尔元件HD1~HD2分别设置在平面坐标系的X轴和Y轴上。对每一个霍尔元件HD1~HD2通入电流,若平行于XY轴平面方向存在如图所示的磁场B,则在每一个霍尔元件HD1~HD2上将产生大小不同的感应电压。所述感应电压的大小与磁场B在X轴和Y轴方向的分量分别相关,因此可以根据霍尔元件HD1~HD2上的感应电压的不同来推算磁场B的方向。以X轴方向为0°角的方向,则通过对每一个霍尔元件HD1~HD2上的电压值分析,可以确定外加的磁场B的方向与X轴之间的夹角θ。The sensing unit 101 includes an angle sensor for sensing the direction of the magnetic field, and outputs a voltage or current containing the information of the direction of the magnetic field. This embodiment takes the output voltage as an example for description. In some embodiments, the angle sensor may be a Hall element, an Anisotropic Magneto resistance (AMR) element, a Giant Magneto resistance (GMR) element, and a Tunnel Magneto Resistance (Tunnel MagnetoResistance, TMR). For details, please refer to FIG. 2 . FIG. 2 is a schematic diagram of the principle of the sensing unit 101 in FIG. 1 . In the figure, the Hall elements HD1 to HD2 are respectively arranged on the X axis and the Y axis of the plane coordinate system. A current is applied to each of the Hall elements HD1 to HD2, and if there is a magnetic field B as shown in the figure parallel to the XY axis plane, induced voltages of different magnitudes will be generated on each of the Hall elements HD1 to HD2. The magnitude of the induced voltage is related to the components of the magnetic field B in the X-axis and Y-axis directions, respectively, so the direction of the magnetic field B can be estimated according to the difference in the induced voltages on the Hall elements HD1-HD2. Taking the direction of the X-axis as an angle of 0°, the included angle θ between the direction of the applied magnetic field B and the X-axis can be determined by analyzing the voltage values on each of the Hall elements HD1 to HD2.

回到图1,感应单元1输出霍尔元件HD1~HD2上产生的包含角度θ的信息的霍尔电压。Returning to FIG. 1 , the sensing unit 1 outputs the Hall voltage including the information of the angle θ generated on the Hall elements HD1 to HD2 .

为了便于后续进行数字滤波,模数转换单元102用来对所述感应电压进行模数转换。模数转换单元102可以包括例如是8位、16位的ADC(Analog Digital Converter,模数转换器)。ADC的位数越大,后续计算出的有关夹角θ的值的精度就越高。In order to facilitate subsequent digital filtering, the analog-to-digital conversion unit 102 is configured to perform analog-to-digital conversion on the induced voltage. The analog-to-digital conversion unit 102 may include, for example, an 8-bit or 16-bit ADC (Analog Digital Converter, analog-to-digital converter). The larger the number of bits of the ADC, the higher the accuracy of the subsequently calculated value of the included angle θ.

信号处理单元103接收到模数转换单元102输出的数字形式霍尔电压后,对其进行调制和数字滤波,经过多级低通滤波后,滤波效果达到稳定,输出的sin(t+θ)曲线(包含相移)相对标准的sin t曲线(即相移为0的曲线)的相移达到稳定,则该相移就是上述的外加的磁场B的方向与X轴之间的夹角θ。具体的,信号处理单元103可以包括信号发生器26、调制与滤波单元1032和相位比对单元211。在一个实施例中,感应单元101输出一组电压信号,例如,sinθ和cosθ。信号发生器26可以相应输出标准(不包括相移)的cos t和sin t信号作为调制信号,用来分别调制信号sinθ和信号cosθ,再将两个调制后的信号相加,可以得到已调信号sin t×cosθ+cos t×sinθ(即图3a中E点位置的信号)。相位比对单元211可以将该已调信号sin(t+θ)与信号发生器26输出的标准信号cos t或sin t进行比较,从而得到夹角θ的实际值(一般为数字信号)。如果进一步将标准信号cos t或sin t替换为同频的方波,则在设计滤波器的过程中还可以省略乘法器,节省芯片内资源的使用。其中,所述的同频的方波是指方波的频率与标准信号的频率相同,且过零点的位置也与标准信号的过零点重合。例如,可以参看图5所示的方波与标准正弦波的对比图,替代标准正弦波的方波的三个过零点与正弦波相同,且方波的幅度的正负也与正弦波相同。类似于方波是正弦波的包络。如果标准信号为标准余弦波,则方波也相应调整。具体的,可以在在信号发生器26输出端增加一增益可视为无穷大的放大器,则标准信号cos t和sin t的幅值被钳位在一固定值上,从而形成方波。例如,图5中虚线所示的标准信号sin t,经放大后,得到实线所示的方波。After the signal processing unit 103 receives the digital Hall voltage output by the analog-to-digital conversion unit 102, it modulates and digitally filters it. After multi-stage low-pass filtering, the filtering effect is stable, and the output sin(t+θ) curve The phase shift (including the phase shift) relative to the standard sin t curve (that is, the curve with a phase shift of 0) becomes stable, and the phase shift is the angle θ between the direction of the applied magnetic field B and the X axis. Specifically, the signal processing unit 103 may include a signal generator 26 , a modulation and filtering unit 1032 and a phase comparison unit 211 . In one embodiment, the sensing unit 101 outputs a set of voltage signals, eg, sin θ and cos θ. The signal generator 26 can correspondingly output standard (not including phase shift) cos t and sin t signals as modulation signals, which are used to modulate the signal sinθ and the signal cosθ respectively, and then add the two modulated signals to obtain the modulated signal. The signal sin t×cosθ+cos t×sinθ (that is, the signal at the position of point E in Fig. 3a). The phase comparison unit 211 can compare the modulated signal sin(t+θ) with the standard signal cos t or sin t output by the signal generator 26 to obtain the actual value of the included angle θ (generally a digital signal). If the standard signal cos t or sin t is further replaced with a square wave of the same frequency, the multiplier can also be omitted in the process of designing the filter to save the use of on-chip resources. Wherein, the square wave of the same frequency means that the frequency of the square wave is the same as that of the standard signal, and the position of the zero-crossing point also coincides with the zero-crossing point of the standard signal. For example, referring to the comparison diagram of square wave and standard sine wave shown in Figure 5, the three zero-crossing points of the square wave that replaces the standard sine wave are the same as the sine wave, and the positive and negative amplitudes of the square wave are also the same as the sine wave. Similar to a square wave is the envelope of a sine wave. If the standard signal is a standard cosine wave, the square wave is adjusted accordingly. Specifically, an amplifier whose gain can be regarded as infinite can be added to the output end of the signal generator 26, and the amplitudes of the standard signals cos t and sin t are clamped to a fixed value, thereby forming a square wave. For example, the standard signal sin t shown by the dotted line in Fig. 5 is amplified to obtain the square wave shown by the solid line.

回到图1,数模转换单元104则是可选的单元。当需要输出夹角θ的模拟值时,通过数模转换单元104将相位比对单元211输出的关于夹角θ的数字值转换为模拟值。Returning to FIG. 1, the digital-to-analog conversion unit 104 is an optional unit. When the analog value of the included angle θ needs to be output, the digital value about the included angle θ output by the phase comparison unit 211 is converted into an analog value by the digital-to-analog conversion unit 104 .

以下结合图3a和图3b来说明。图3a为本发明一些实施例的角度提取电路的示意框图。图3b为将图3a所示的电路中的正弦/余弦信号替换为同频的方波的示意性框图。The following description is made with reference to Fig. 3a and Fig. 3b. 3a is a schematic block diagram of an angle extraction circuit according to some embodiments of the present invention. FIG. 3b is a schematic block diagram of replacing the sine/cosine signals in the circuit shown in FIG. 3a with square waves of the same frequency.

图3a和图3b中第一模数转换器21接收一路电压信号(第一电压信号),经过数模转换后输出数字形式的信号cosθ,第二模数转换器22接收另一路电压信号(第二电压信号),经过数模转换后输出数字形式的信号sinθ。具体的,第一模数转换器21和第二模数转换器22的位数可以采用8bit、10bit、12bit等,位数越多,随后输出的夹角θ的值越精确。在图3a所示的实施例中,信号发生器26可以是数字信号发生器,直接输出数字形式的调制信号sint和cos t,用于调制信号cosθ和sinθ。但是,对于芯片制造行业来说,使用硬件来是实现乘法器需要占用的硬件资源比较多,且容易造成资源的浪费。为了节省硬件资源,便于在芯片内部实现调制的过程(即乘法的过程),图3b所示的实施例使用同频的方波(可参考前文中,关于方波和图5的说明)来代替调制信号sin t和cos t,则经过相加后,在图3b中E点得到的已调信号由(sin t×cosθ+cos t×sinθ)简化为

Figure BDA0003462593530000061
也就是说,本来需要使用乘法器的部分,现在只需要进行加减法(即只使用加法器)即可代替。也就是说,图3b中,将cosθ与方波1相乘、将sinθ与方波2相乘的部分在实际实施的时候,并不是以一个乘法器的硬件单元出现的,而是需要若干个判断器和加法器硬件即可。因此,本实施例在硬件层面上减少了很多逻辑门的使用,降低了系统资源的使用率。但是,本领域普通技术人员可知,简化后的已调信号
Figure BDA0003462593530000062
相对已调信号sint×cosθ+cos t×sinθ来说,简化后的已调信号中引入了高频分量。因此,为了使已调信号不变形,本实施例还设置了多级滤波器,用来将附加的高频分量滤除。具体的,本实施例中使用了四级IIR滤波器:一级滤波器27、二级滤波器28、三级滤波器29、四级滤波器30。其中,每个滤波器占用一个寄存器,即第一寄存器、第二寄存器、第三寄存器和第四寄存器。前一级滤波器的寄存器在前一次的值和本级滤波器的寄存器在前一次的值取加权和后存入本级滤波器的寄存器中。结合图3a和图3b来说,一级滤波器27的特征函数为:In Figs. 3a and 3b, the first analog-to-digital converter 21 receives a voltage signal (the first voltage signal), and outputs a digital signal cosθ after digital-to-analog conversion, and the second analog-to-digital converter 22 receives another voltage signal (the first voltage signal). Two voltage signals), after digital-to-analog conversion, the digital signal sinθ is output. Specifically, the number of bits of the first analog-to-digital converter 21 and the second analog-to-digital converter 22 can be 8bit, 10bit, 12bit, etc. The more the number of bits, the more accurate the value of the subsequently outputted angle θ. In the embodiment shown in FIG. 3a, the signal generator 26 may be a digital signal generator, which directly outputs the modulated signals sint and cos t in digital form for modulating the signals cosθ and sinθ. However, for the chip manufacturing industry, using hardware to implement a multiplier requires a lot of hardware resources, and is prone to waste of resources. In order to save hardware resources and facilitate the implementation of the modulation process (ie, the multiplication process) inside the chip, the embodiment shown in FIG. 3b uses a square wave of the same frequency (refer to the foregoing description about the square wave and FIG. 5 ) instead of modulated signal sin t and cos t, after adding, the modulated signal obtained at point E in Figure 3b is simplified by (sin t×cosθ+cos t×sinθ) as
Figure BDA0003462593530000061
That is to say, the part that originally needed to use multipliers now only needs to be added and subtracted (that is, only adders are used). That is to say, in Fig. 3b, the part of multiplying cosθ by square wave 1 and sinθ by square wave 2 does not appear as a hardware unit of a multiplier when actually implemented, but requires several The judger and adder hardware are sufficient. Therefore, the present embodiment reduces the use of many logic gates at the hardware level, and reduces the utilization rate of system resources. However, those of ordinary skill in the art know that the simplified modulated signal
Figure BDA0003462593530000062
Compared with the modulated signal sint×cosθ+cos t×sinθ, the simplified modulated signal introduces high frequency components. Therefore, in order to keep the modulated signal from being deformed, a multi-stage filter is also provided in this embodiment to filter out additional high-frequency components. Specifically, four stages of IIR filters are used in this embodiment: a first stage filter 27 , a second stage filter 28 , a third stage filter 29 , and a fourth stage filter 30 . Among them, each filter occupies one register, namely the first register, the second register, the third register and the fourth register. The previous value of the register of the previous stage filter and the previous value of the register of the current stage filter are stored in the register of the current stage filter after taking the weighted sum. Referring to Fig. 3a and Fig. 3b, the characteristic function of the first-stage filter 27 is:

REG1n=k×REG1n-1+(1-k)×new,REG1 n =k×REG1 n-1 +(1-k)×new,

其中,REG1n是一级滤波器27的第一寄存器的当前值,REG1n-1是一级滤波器27的第一寄存器在前一次的值(也就是前一次递归的结果),new是一级滤波器27的输入值(即图3a和图3b中E点的信号值),k是控制系数,根据该控制系数,REG1n-1和new的权值分别为k和(1-k)。Among them, REG1 n is the current value of the first register of the first-stage filter 27, REG1 n-1 is the previous value of the first register of the first-stage filter 27 (that is, the result of the previous recursion), and new is a The input value of the stage filter 27 (ie the signal value at point E in Figure 3a and Figure 3b), k is the control coefficient, according to the control coefficient, the weights of REG1 n-1 and new are respectively k and (1-k) .

二级滤波器28的特征函数为:The characteristic function of the secondary filter 28 is:

REG2n=k×REG2n-1+(1-k)×REG1n-1REG2 n =k×REG2 n-1 +(1-k)×REG1 n-1 ,

其中,REG2n是二级滤波器28的第二寄存器的当前值,REG2n-1是二级滤波器28的第二寄存器在前一时刻的值(也就是前一次递归的结果),REG1n-1是二级滤波器28的输入值(即图3a和图3b中A点的信号值),k是控制系数,根据该控制系数,REG2n-1和REG1n-1的权值分别为k和(1-k)。Among them, REG2 n is the current value of the second register of the secondary filter 28, REG2 n-1 is the value of the second register of the secondary filter 28 at the previous moment (that is, the result of the previous recursion), REG1 n -1 is the input value of the secondary filter 28 (ie, the signal value at point A in Fig. 3a and Fig. 3b), k is the control coefficient, according to the control coefficient, the weights of REG2 n-1 and REG1 n-1 are respectively k and (1-k).

三级滤波器29的特征函数为:The characteristic function of the three-stage filter 29 is:

REG3n=k×REG3n-1+(1-k)×REG2n-1REG3 n =k×REG3 n-1 +(1-k)×REG2 n-1 ,

其中,REG3n是三级滤波器29的第三寄存器的当前值,REG3n-1是第三寄存器在前一时刻的值(也就是前一次递归的结果),REG2n-1是三级滤波器29的输入值(即图3a和图3b中B点的信号值),k是控制系数,根据该控制系数,REG3n-1和REG2n-1的权值分别为k和(1-k)。Among them, REG3 n is the current value of the third register of the three-stage filter 29, REG3 n-1 is the value of the third register at the previous moment (that is, the result of the previous recursion), and REG2 n-1 is the third-stage filter. The input value of the device 29 (that is, the signal value at point B in Fig. 3a and Fig. 3b), k is the control coefficient, according to the control coefficient, the weights of REG3 n-1 and REG2 n-1 are k and (1-k respectively) ).

四级滤波器210的特征函数为:The characteristic function of the four-stage filter 210 is:

REG4n=k×REG4n-1+(1-k)×REG3n-1REG4 n =k×REG4 n-1 +(1-k)×REG3 n-1 ,

其中,REG4n是四级滤波器210的第四寄存器的当前值,REG4n-1是第四寄存器在前一时刻的值(也就是前一次递归的结果),REG3n-1是四级滤波器210的输入值(即图3a和图3b中C点的信号值),k是控制系数,根据该控制系数,REG4n-1和REG3n-1的权值分别为k和(1-k)。Among them, REG4 n is the current value of the fourth register of the four-stage filter 210, REG4 n-1 is the value of the fourth register at the previous moment (that is, the result of the previous recursion), and REG3 n-1 is the fourth-stage filter. The input value of the controller 210 (that is, the signal value at point C in Fig. 3a and Fig. 3b), k is the control coefficient, according to the control coefficient, the weights of REG4 n-1 and REG3 n-1 are k and (1-k respectively) ).

经过实验,经过四级滤波后的信号曲线基本可以比较完全多滤除由于之前使用方波代替正弦波(余弦波)而附加的高频分量,从而由四级滤波器210输出的信号就是比较完整的已调信号sin(t+θ),后续将该信号与标准的信号sin t(或者cos t)进行比较,即可得到夹角θ的值。当然,如果对夹角θ的精度要求比较高,也可以按上述的特征函数再增加几级滤波器,以求更多的滤除高频信号。After experiments, the signal curve after the fourth-stage filtering can basically filter out the additional high-frequency components due to the use of square waves instead of sine waves (cosine waves), so the signal output by the fourth-stage filter 210 is relatively complete. The modulated signal sin(t+θ) of , and then compare the signal with the standard signal sin t (or cos t) to obtain the value of the included angle θ. Of course, if the precision of the included angle θ is relatively high, several stages of filters can be added according to the above-mentioned characteristic function, in order to filter out more high-frequency signals.

进一步的,上述的滤波器中,将控制系数k的取值设定为

Figure BDA0003462593530000071
其中,x为小于256的正整数,则上述的滤波器也可以仅使用加法器和移位寄存器即可实现,这将大大减少硬件资源的使用,对于芯片制造行业来说,可以实现芯片小型化或者将资源用来实现其他电路。Further, in the above filter, the value of the control coefficient k is set as
Figure BDA0003462593530000071
Among them, x is a positive integer less than 256, and the above filter can also be realized by using only adders and shift registers, which will greatly reduce the use of hardware resources. For the chip manufacturing industry, it can achieve chip miniaturization. Or use the resources to implement other circuits.

相位对比单元211接收信号发生器26输出的标准信号sin t(或者cos t)和四级滤波器210输出的已调信号sin(t+θ)。其中,sin t(或者cos t)作为参考信号也可以将其简化为同频的方波。结合图11来看,将能够说明得更清楚。The phase comparison unit 211 receives the standard signal sin t (or cos t) output by the signal generator 26 and the modulated signal sin(t+θ) output by the fourth-stage filter 210 . Among them, sin t (or cos t) can also be simplified as a square wave of the same frequency as a reference signal. In conjunction with FIG. 11 , this will be explained more clearly.

图11为本发明中通过计数获取角度θ的值的电路示意图。已调信号sin(t+θ)输入到过零检测110中,提取其中的上升沿(或下降沿),并输入到计数器111,计数器111在sin t和sin(t+θ)的上升沿(或下降沿)计数,从而可计算出已调信号sin(t+θ)的相位偏移量(即夹角θ的值)。或者,在另外的实施例中,也可使用鉴相器来实现相位检测。FIG. 11 is a schematic diagram of a circuit for obtaining the value of the angle θ by counting in the present invention. The modulated signal sin(t+θ) is input to the zero-crossing detection 110, the rising edge (or falling edge) of which is extracted, and input to the counter 111, and the counter 111 is at the rising edge ( or falling edge) count, so that the phase offset (that is, the value of the included angle θ) of the modulated signal sin(t+θ) can be calculated. Alternatively, in other embodiments, a phase detector may also be used to implement phase detection.

可以说,在上述的实施例中,仅通过加法器和移位寄存器就实现了乘法器和加法器的功能,大大简化了角度提取的过程(计算过程),相应的,上述的实施例中所需使用的硬件资源也大大减少,简化了电路的复杂度。It can be said that in the above-mentioned embodiments, the functions of the multiplier and the adder are realized only by the adder and the shift register, which greatly simplifies the process (calculation process) of angle extraction. The hardware resources to be used are also greatly reduced, which simplifies the complexity of the circuit.

此外,由于在计算过程中使用了多级的滤波器,其在滤除附加的高频信号的同时,也起到了滤除噪声的作用。相对于现有技术中,通常在得到夹角θ的值后还要进行噪声滤波的方案来说,本发明还节省了一个独立的滤除噪声的过程。In addition, since the multi-stage filter is used in the calculation process, it also plays the role of filtering out noise while filtering out additional high-frequency signals. Compared with the solution in the prior art, which usually requires noise filtering after the value of the included angle θ is obtained, the present invention also saves an independent noise filtering process.

图4为图3b所示的A、B、C、D、E五个点处的波形的对照图。该图通过在数学计算软件matlab中模拟上述的四级IIR滤波器的计算过程而得到。其中,特征函数中的控制系数k取值为

Figure BDA0003462593530000081
E点处的信号数字形式的已调信号如图4中的阶梯波所示,也就是一级滤波器27的输入信号。A点处的信号为图4中的近似三角波的波形,其是经过一级滤波器27滤波后的信号。B点处的信号为图4中近似正弦波,但是有明显变形的波形,其是经过二级滤波器28滤波后的信号。C点处和D点处的信号已经非常接近正弦波,其依次是经过三级滤波器29和四级滤波器210滤波后的信号。Fig. 4 is a comparison diagram of the waveforms at five points A, B, C, D, and E shown in Fig. 3b. The figure is obtained by simulating the calculation process of the above-mentioned four-stage IIR filter in the mathematical calculation software matlab. Among them, the control coefficient k in the characteristic function takes the value of
Figure BDA0003462593530000081
The modulated signal in digital form of the signal at point E is shown as the staircase wave in FIG. The signal at point A is the approximate triangle wave waveform in FIG. 4 , which is the signal filtered by the first-stage filter 27 . The signal at point B is an approximate sine wave in FIG. 4 , but has a significantly deformed waveform, which is a signal filtered by the secondary filter 28 . The signals at points C and D are very close to sine waves, which are the signals filtered by the third-stage filter 29 and the fourth-stage filter 210 in sequence.

为了更明显的显示四级滤波器的滤波效果,图6-10示出了单周期的参考信号Ref和已调信号的滤波效果对比图。In order to more clearly show the filtering effect of the four-stage filter, Figure 6-10 shows a comparison diagram of the filtering effect of the single-cycle reference signal Ref and the modulated signal.

图6中,参考信号Ref是固定频率的方波(相应于图3b中输入相位比对单元211的参考信号Ref),已调信号经过上述的使用同频的方波来代替调制信号sin t和cos t的方法来简化(简化后的已调信号)

Figure BDA0003462593530000082
其波形为阶梯波。In FIG. 6, the reference signal Ref is a square wave with a fixed frequency (corresponding to the reference signal Ref input to the phase comparison unit 211 in FIG. 3b), and the modulated signal is replaced by the above-mentioned square wave of the same frequency instead of the modulated signals sin t and cost t method to simplify (simplified modulated signal)
Figure BDA0003462593530000082
Its waveform is a staircase wave.

图7是经过一级滤波器27滤波后,方波形式的参考信号Ref变形为近似三角波,阶梯波形状的已调信号sin(t+θ)成为不规则的折线波形。FIG. 7 shows that the reference signal Ref in the form of a square wave is deformed into an approximate triangular wave after being filtered by the first-stage filter 27, and the modulated signal sin(t+θ) in the shape of a staircase wave becomes an irregular zigzag waveform.

图8是经过二级滤波器28滤波后,参考信号Ref变形为近似正弦波,已调信号sin(t+θ)也形为近似正弦波。但是两个波形都相对标准正弦波有明显变形。FIG. 8 shows that after being filtered by the secondary filter 28, the reference signal Ref is deformed into an approximate sine wave, and the modulated signal sin(t+θ) is also shaped into an approximate sine wave. However, both waveforms are significantly deformed relative to the standard sine wave.

图9是经过三级滤波器29滤波后,参考信号Ref变形为近似正弦波,已调信号sin(t+θ)也形为近似正弦波。两个波形都相对标准正弦波已无明显变形。FIG. 9 shows that after being filtered by the three-stage filter 29, the reference signal Ref is deformed into an approximate sine wave, and the modulated signal sin(t+θ) is also shaped into an approximate sine wave. Both waveforms have no obvious deformation relative to the standard sine wave.

图10是经过四级滤波器210滤波后,参考信号Ref变形为近似余弦波,已调信号sin(t+θ)也形为近似余弦波。两个波形都相对标准正弦波已无明显变形。FIG. 10 shows that after being filtered by the four-stage filter 210, the reference signal Ref is deformed into an approximate cosine wave, and the modulated signal sin(t+θ) is also shaped into an approximate cosine wave. Both waveforms have no obvious deformation relative to the standard sine wave.

经过实验室仿真,即便再经过第五、第六级滤波器,参考信号Ref和已调信号sin(t+θ)的波形都不再明显改变,即递归可以结束,可以在图10所示波形的基础上进行相位比较,以获取夹角θ的值。After laboratory simulation, even after the fifth and sixth filters, the waveforms of the reference signal Ref and the modulated signal sin(t+θ) are no longer significantly changed, that is, the recursion can end, and the waveform shown in Figure 10 The phase comparison is performed on the basis of , to obtain the value of the included angle θ.

虽然上文通过参照本发明的一些实施例已经对本发明进行了图示和描述,但本领域的普通技术人员应该明白,以上内容是结合具体的实施方式对本发明所作的进一步详细说明,不能认定本发明的具体实施只局限于这些说明。本领域技术人员可以在形式上和细节上对其进行各种改动和变型,包括做出若干简单推演或替换,而不偏离本发明的精神和范围。因此,倘若本这些改动和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。Although the present invention has been illustrated and described above with reference to some embodiments of the present invention, those of ordinary skill in the art should understand that the above content is a further detailed description of the present invention combined with specific The specific implementation of the invention is limited only by these descriptions. Those skilled in the art can make various changes and modifications in form and details, including making some simple deductions or substitutions, without departing from the spirit and scope of the present invention. Therefore, if these changes and modifications of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these changes and modifications.

Claims (11)

1. An angle extraction circuit for extracting an angle value output from an angle sensor, comprising:
the first analog-to-digital converter is used for receiving a first voltage signal and performing analog-to-digital conversion on the first voltage signal, wherein the first voltage signal comprises angle information output by the angle sensor;
the second analog-to-digital converter is used for receiving a second voltage signal and performing analog-to-digital conversion on the second voltage signal, wherein the second voltage signal comprises angle information output by the angle sensor;
a signal generator for generating a modulation signal and a reference signal, wherein the first modulation signal is used for modulating the first voltage signal to obtain a first modulated signal, and the second modulation signal is used for modulating the second voltage signal to obtain a second modulated signal;
a filter to which the first modulated signal and the second modulated signal are added and inputted to extract the angle information;
and the phase comparison unit is used for receiving the reference signal output by the signal generator and the output signal of the filter, and comparing the reference signal with the output signal to acquire the phase difference of the output signal relative to the reference signal.
2. The circuit of claim 1, wherein the filter comprises at least a 2-stage low pass filter.
3. The circuit of claim 1 or 2, wherein the filter is a four-stage IIR (Infinite Impulse Response) filter.
4. The circuit of claim 3, wherein the filter characteristic function is:
REGn=k×REGn-1+(1-k)×new,
wherein, REGnIs the value of the current output of the filter, REGn-1Is the last output value of said filter, new isThe input value of the filter, k, is a control coefficient.
5. The circuit of claim 1, wherein the modulated signal is a square wave.
6. The circuit of claim 5, wherein the phase comparison unit is a phase shift counter that counts from a rising/falling edge of the reference signal to an end of a rising/falling edge of the output signal of the filter.
7. An angle extraction method is used for extracting an angle value output by an angle sensor, and is characterized by comprising the following steps:
an analog-to-digital conversion step of converting a first voltage signal and a second voltage signal from the angle sensor into digital signals, wherein the first voltage signal and the second voltage signal contain angle information output by the angle sensor;
a modulation step of modulating the first voltage signal and the second voltage signal with a first modulation signal and a second modulation signal, respectively, to obtain a first modulated signal and a second modulated signal;
a filtering step of adding the first modulated signal and the second modulated signal and then filtering the added signals to extract the angle information;
and a phase comparison step of receiving a reference signal and comparing the reference signal with the output signal obtained in the filtering step to obtain the phase difference of the output signal relative to the reference signal.
8. The method of claim 7, wherein in the filtering step, the filtering is performed using a multi-stage IIR filter.
9. The method of claim 8, wherein each stage of the multi-stage recursive filter has a characteristic function of:
REGn=k×REGn-1+(1-k)×new,
wherein, REGnIs the value of the current output of the filter, REGn-1Is the output value of the filter in the last time, new is the input value of the filter, and k is the control coefficient.
10. The method of claim 7, wherein the first modulation signal and the second modulation signal are square waves.
11. A chip comprising an angle sensing unit, characterized by further comprising a signal processing unit, wherein the signal processing unit receives the angle information output by the angle sensing unit and extracts an angle value from the angle information according to the method of any one of claims 7 to 10.
CN202210035737.1A 2022-01-10 2022-01-10 Angle extraction circuit, method and chip Active CN114370814B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202210035737.1A CN114370814B (en) 2022-01-10 2022-01-10 Angle extraction circuit, method and chip
CN202411552355.1A CN119483548A (en) 2022-01-10 2022-01-10 Angle extraction circuit, method and chip

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210035737.1A CN114370814B (en) 2022-01-10 2022-01-10 Angle extraction circuit, method and chip

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202411552355.1A Division CN119483548A (en) 2022-01-10 2022-01-10 Angle extraction circuit, method and chip

Publications (2)

Publication Number Publication Date
CN114370814A true CN114370814A (en) 2022-04-19
CN114370814B CN114370814B (en) 2024-11-22

Family

ID=81143360

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202210035737.1A Active CN114370814B (en) 2022-01-10 2022-01-10 Angle extraction circuit, method and chip
CN202411552355.1A Pending CN119483548A (en) 2022-01-10 2022-01-10 Angle extraction circuit, method and chip

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN202411552355.1A Pending CN119483548A (en) 2022-01-10 2022-01-10 Angle extraction circuit, method and chip

Country Status (1)

Country Link
CN (2) CN114370814B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5880586A (en) * 1994-11-22 1999-03-09 Robert Bosch Gmbh Apparatus for determining rotational position of a rotatable element without contacting it
JP2002054948A (en) * 2000-08-09 2002-02-20 Honda Motor Co Ltd Resolver conversion device
US20030132761A1 (en) * 2001-12-07 2003-07-17 Norman Poirier Phase angle determining circuit
US20040233078A1 (en) * 2003-03-17 2004-11-25 Takao Takehara Resolver/digital converter
CN1740751A (en) * 2004-08-23 2006-03-01 索尼株式会社 Angle detection signal processing device
US20070029955A1 (en) * 2005-07-19 2007-02-08 Hitachi, Ltd. Phase detection circuit, resolver/digital converter using the circuit, and control system using the converter
JP2010164450A (en) * 2009-01-16 2010-07-29 Toyota Motor Corp Resolver digital converter
CN105526954A (en) * 2016-01-15 2016-04-27 中工科安科技有限公司 Reluctance-type rotary transformer signal processing method
CN107332565A (en) * 2017-08-10 2017-11-07 上海金脉电子科技有限公司 Rotation based on DSADC becomes software decoding system and method
CN110081913A (en) * 2018-01-25 2019-08-02 迈来芯电子科技有限公司 Position sensor device
EP3712632A1 (en) * 2019-03-21 2020-09-23 Crocus Technology S.A. Electronic circuit for measuring an angle and an intensity of an external magnetic field
WO2021176297A1 (en) * 2020-03-02 2021-09-10 Crocus Technology Sa Magnetic sensor for measuring an external magnetic field angle in a two-dimensional plane and method for measuring said angle using the magnetic sensor

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5880586A (en) * 1994-11-22 1999-03-09 Robert Bosch Gmbh Apparatus for determining rotational position of a rotatable element without contacting it
JP2002054948A (en) * 2000-08-09 2002-02-20 Honda Motor Co Ltd Resolver conversion device
US20030132761A1 (en) * 2001-12-07 2003-07-17 Norman Poirier Phase angle determining circuit
US20040233078A1 (en) * 2003-03-17 2004-11-25 Takao Takehara Resolver/digital converter
CN1740751A (en) * 2004-08-23 2006-03-01 索尼株式会社 Angle detection signal processing device
US20070029955A1 (en) * 2005-07-19 2007-02-08 Hitachi, Ltd. Phase detection circuit, resolver/digital converter using the circuit, and control system using the converter
JP2010164450A (en) * 2009-01-16 2010-07-29 Toyota Motor Corp Resolver digital converter
CN105526954A (en) * 2016-01-15 2016-04-27 中工科安科技有限公司 Reluctance-type rotary transformer signal processing method
CN107332565A (en) * 2017-08-10 2017-11-07 上海金脉电子科技有限公司 Rotation based on DSADC becomes software decoding system and method
CN110081913A (en) * 2018-01-25 2019-08-02 迈来芯电子科技有限公司 Position sensor device
EP3712632A1 (en) * 2019-03-21 2020-09-23 Crocus Technology S.A. Electronic circuit for measuring an angle and an intensity of an external magnetic field
WO2021176297A1 (en) * 2020-03-02 2021-09-10 Crocus Technology Sa Magnetic sensor for measuring an external magnetic field angle in a two-dimensional plane and method for measuring said angle using the magnetic sensor

Also Published As

Publication number Publication date
CN114370814B (en) 2024-11-22
CN119483548A (en) 2025-02-18

Similar Documents

Publication Publication Date Title
TWI642279B (en) Analog-to-digital converter
CN105515597A (en) Automatic gain control circuit for receivers
CN104316737B (en) One kind biases adjustable wave generator circuit and method based on FPGA amplitudes
US20160004347A1 (en) Touch sensing apparatus and touch sensing method
JP2004528742A (en) High-speed filter
CN106775141B (en) Capacitive sensing circuit and touch panel
CN116755510A (en) FPGA implementation method and system of digital phase-locked amplifier
CN104734715B (en) A kind of method for improving A/D converter resolution ratio
CN114370814A (en) Angle extraction circuit, method and chip
CN113377340B (en) Digital oscilloscope with fractional calculus operation and display function
CN104135457A (en) Digital phase discrimination method and device based on improved CORDIC (coordinated rotation digital computer) algorithm
CN116388750A (en) High-precision digital lock-in amplifier and weak signal detection method
CN106571826A (en) System for increasing single-chip-microcomputer analog-to-digital-converter dynamic scope and method thereof
CN109067401B (en) Sigma-delta modulator for detecting sensor signals
CN101964635B (en) Automatic gain control method for digital signal
CN114915292A (en) Successive approximation type analog-digital converter circuit based on data weighted average algorithm
Lin et al. Modular low-power, high-speed CMOS analog-to-digital converter of embedded systems
CN108416311B (en) Azimuth angle acquisition method based on programmable gate array and coordinate rotation processing
CN107241099B (en) Angle sensor signal processing circuit and processing method
CN111736016B (en) Alternating current transmission characteristic detection circuit
JPH0750582A (en) Sampling analog-to-digital converter having less dense architecture and interpolated residual value sign
Vandenbussche et al. Development of a low-cost accurate phase measurement system
KR20080032302A (en) Method for calculating integral value of input pulse signal and integrator therefor
TW200427277A (en) Detector, method, program and recording medium
CN109217743B (en) Output voltage control system and method for absolute magnetic angle encoder

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant