Angle extraction circuit, method and chip

By using angle extraction circuit in Hall angle sensors, using analog-to-digital conversion, modulation signals, multi-stage IIR filters and phase comparison units, the angle calculation process is simplified, and the complex angle calculation and resource consumption in the prior art are solved. The problem of this has achieved more efficient resource utilization and chip miniaturization.

CN119483548APending Publication Date: 2025-02-18QUANZHOU KTSENSE MICROELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411552355.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2022-01-10
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

The existing Hall angle sensor angle calculation method is complex and consumes a lot of resources, which makes it difficult to miniaturize the chip.

Method used

An angle extraction circuit is adopted, including an analog-to-digital converter, a signal generator, a filter and a phase comparison unit. By modulating the signal and a reference signal, a multi-stage IIR filter and a phase comparison unit are used to simplify the angle calculation process.

Benefits of technology

The simplification of angle calculation is achieved, reducing the consumption of hardware resources, reducing the noise filtering step, and improving the chip's miniaturization ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119483548A_ABST
    Figure CN119483548A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of sensing signal processing, and particularly discloses an angle extraction circuit and method and a chip. The angle extraction circuit comprises an analog-to-digital converter which is used for receiving a voltage signal and carrying out analog-to-digital conversion on the voltage signal, and the voltage signal comprises angle information output by an angle sensor; the signal generator is used for generating a modulation signal and a reference signal, the modulation signal is a square wave, and the modulation signal is used for modulating the voltage signal to obtain a modulated signal; the first modulated signal and the second modulated signal are added and then input into the filter so as to extract angle information; and the phase comparison unit receives the reference signal output by the signal generator and the output signal of the filter, and compares the reference signal with the output signal to obtain the phase difference of the output signal relative to the reference signal. According to the method, the calculation process is simple, and hardware resources required by the calculation process are greatly reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of sensor signal processing, and in particular relates to an angle extraction circuit, method and chip. Technical Background

[0002] In the Hall angle sensor manufactured using the Hall principle, the Hall element rotates from the reference position under the action of the electric field force, and the angle θ it rotates through is the content that the Hall angle sensor needs to output. In the existing mature technology, the CORDIC (Coordinate Rotation Digital Computer) algorithm is usually used to calculate the value of the angle. This method is based on the preset value that the tangent (tan) value of the angle θ is equal to 1 / 2 to the power of n within a certain range (i.e. the formula tanα i =2 -i ), using a series of fixed angle values, the angle θ of the Hall angle sensor is obtained by a step-by-step accumulation method. Finally, in order to remove some noise, the CORDIC algorithm also performs a filtering.

[0003] However, the calculation process of this method is relatively complicated. It requires a large amount of memory to record the table data for the table lookup instructions. The corresponding digital system is also relatively complex and consumes more resources. For chip manufacturing, the more resources consumed, the more difficult it is to miniaturize the chip. In order to reduce the difficulty of angle calculation, there is an urgent need for an angle calculation method that saves more resources and maintains the current level of calculation accuracy. Summary of the invention

[0004] In order to solve the above defects, the present invention proposes an angle extraction circuit for extracting the angle value output by the angle sensor, comprising:

[0005] A first analog-to-digital converter, used for receiving a first voltage signal and performing analog-to-digital conversion on the first voltage signal, wherein the first voltage signal includes angle information output by the angle sensor;

[0006] A second analog-to-digital converter, used for receiving a second voltage signal and performing analog-to-digital conversion on the second voltage signal, wherein the second voltage signal includes angle information output by the angle sensor;

[0007] A signal generator, configured to generate a modulation signal and a reference signal, wherein the modulation signal is a square wave, a first modulation signal is configured to modulate the first voltage signal after analog-to-digital conversion to obtain a first modulated signal, and a second modulation signal is configured to modulate the second voltage signal after analog-to-digital conversion to obtain a second modulated signal;

[0008] A filter, wherein the first modulated signal and the second modulated signal are added and then input into the filter to extract the angle information;

[0009] A phase comparison unit receives the reference signal output by the signal generator and the output signal of the filter, and compares the reference signal with the output signal to obtain a phase difference of the output signal relative to the reference signal.

[0010] In the above circuit, the filter includes a multi-stage filter.

[0011] In the above circuit, the filter includes a four-stage IIR filter.

[0012] In the above circuit, the characteristic function of the filter is:

[0013] REG n =k×REG n-1 +(1-k)×new,

[0014] Among them, REG n is the current output value of the filter, REG n-1 is the previous output value of the filter, new is the input value of the filter, and k is the control coefficient.

[0015] 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 counting at the rising / falling edge of the output signal of the filter.

[0016] The present invention also proposes an angle extraction method for extracting the angle value output by the angle sensor, comprising the following steps:

[0017] an analog-to-digital conversion step, 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;

[0018] A modulation step, modulating the first voltage signal converted into a digital signal and the second voltage signal converted into a digital signal with a first modulation signal and a second modulation signal respectively, so as to obtain a first modulated signal and a second modulated signal, wherein the first modulation signal and the second modulation signal are square waves;

[0019] A filtering step, wherein the first modulated signal and the second modulated signal are added and then input into a filter for filtering to extract the angle information;

[0020] The phase comparison step receives a reference signal and compares the reference signal with the output signal obtained in the filtering step to obtain a phase difference between the output signal and the reference signal.

[0021] In the above method, in the filtering step, a multi-stage filter is used for filtering.

[0022] In the above method, in the filtering step, a filter including a four-stage IIR filter is used for filtering.

[0023] In the above method, the characteristic function of each filter level of the multi-level recursive filter is:

[0024] REG n =k×REG n-1 +(1-k)×new,

[0025] Among them, REG n is the current output value of the filter, REG n-1 is the output value of the filter at the last time, new is the input value of the filter, and k is the control coefficient.

[0026] Correspondingly, the present invention also proposes a chip, which includes an angle sensing unit and a signal processing unit. 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 above method.

[0027] 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 to output a signal waveform containing the angle information, and the waveform is generally a step wave. After removing the high-frequency components carried in the square wave through multi-stage IIR filtering, a standard sin(t+θ) waveform is obtained, and the reference signal sin t (or cos t) is used to compare with the filtered sin(t+θ) waveform, and the delay of sin(t+θ) relative to sin t (i.e., phase difference θ) is obtained by counting, thereby obtaining the angle information output by the angle sensing unit. The above algorithm is relatively simple, and only shift and addition operations are required in the filter part, and only a simple counter is required in the comparison waveform part. In addition, by simplifying the modulation signals sin t and cos t into square waves of the same frequency, the multiplication process is omitted in the modulation part, and only an adder is required. Therefore, the calculation process of the present invention is simple, and the hardware resources required for the calculation process are greatly reduced.

[0028] In addition, the present invention uses a multi-stage filter in the process of calculating the angle, which has played a role in noise filtering. There is no need to use another filter to filter the noise after the calculation is completed, which saves a step compared to the prior art. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 is a hardware block diagram of some embodiments of the present invention;

[0030] Figure 2 for Figure 1 Schematic diagram of the principle of the sensing unit in FIG.

[0031] Figure 3a is a schematic block diagram of an angle extraction circuit according to some embodiments of the present invention;

[0032] Figure 3b For the general Figure 3a A schematic block diagram showing a circuit in which the sine / cosine signals are replaced by square waves of the same frequency;

[0033] Figure 4 for Figure 3b A comparison diagram of the waveforms at the five positions A, B, C, D, and E shown;

[0034] Figure 5 This is a comparison chart of square wave and standard sine wave;

[0035] Figure 6-10 for Figure 3b The output waveform of the four-stage filter shown is a comparison diagram with the waveform of the reference waveform Ref after being filtered by the four-stage filter respectively;

[0036] Fig.11 Schematic diagram of a circuit for obtaining the angle θ by counting in the present invention. Specific embodiments

[0037] In order to make the purpose and features of the present invention more obvious and easy to understand, the specific embodiments of the present invention are further described below in conjunction with the accompanying drawings. Those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. Although the description of the present invention will be introduced in conjunction with the preferred embodiment, this does not mean that the features of this invention are limited to this embodiment. On the contrary, the purpose of introducing the invention in conjunction with the embodiment is to cover other options or modifications that may be extended based on the claims of the present invention. In order to provide a deep understanding of the present invention, many specific details will be included in the following description. The present invention can also be implemented without using these details. In addition, in order to avoid confusion or blurring the focus of the present invention, some specific details will be omitted in the description. Moreover, in the absence of conflict, the embodiments of the present invention and the features in the embodiments are allowed to be combined or replaced with each other.

[0038] It should be noted that the drawings are in very simplified form and in non-precise proportions, and are only used to conveniently and clearly assist in explaining the embodiments of the present invention. In addition, in this specification, similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.

[0039] It should also be noted that the purpose of numbering the steps in the present invention is to facilitate reference, rather than to limit the order of precedence. For individual steps that require emphasis on the order, they will be specifically described in the text with special text.

[0040] When describing the embodiments of the present invention in conjunction with the accompanying drawings, the terms "upper", "lower", "inner", "bottom", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, or are the orientations or positional relationships in which the inventive product is usually placed when used. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.

[0041] In order to make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.

[0042] Figure 1 The hardware block diagram of some embodiments of the present invention is shown in FIG. 1. The angle extraction circuit provided by the present invention comprises: a sensing unit 101 , an analog-to-digital conversion unit 102 , a signal processing unit 103 and a digital-to-analog conversion unit 104 .

[0043] The sensing unit 101 includes an angle sensor for sensing the direction of a magnetic field, and outputs a voltage or current containing information about the direction of the magnetic field. This embodiment is described using the output voltage as an example. In some embodiments, the angle sensor may be a Hall element, an anisotropic magnetoresistance (AMR) element, a giant magnetoresistance (GMR) element, and a tunnel magnetoresistance (TMR). For details, see Figure 2 . Figure 2 for Figure 1Schematic diagram of the principle of the sensing unit 101 in the figure. In the figure, the Hall elements HD1~HD2 are respectively arranged on the X-axis and the Y-axis of the plane coordinate system. When a current is passed through each Hall element HD1~HD2, if there is a magnetic field B as shown in the figure parallel to the XY-axis plane direction, an induced voltage of different magnitude will be generated on each Hall element HD1~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. Therefore, the direction of the magnetic field B can be inferred based on the difference in the induced voltages on the Hall elements HD1~HD2. Taking the X-axis direction as the direction of the angle of 0°, the angle θ between the direction of the external magnetic field B and the X-axis can be determined by analyzing the voltage value on each Hall element HD1~HD2.

[0044] Back to Figure 1 , the sensing unit 1 outputs the Hall voltage containing the information of the angle θ generated on the Hall elements HD1~HD2.

[0045] In order to facilitate subsequent digital filtering, the analog-to-digital conversion unit 102 is used 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). The larger the number of bits of the ADC, the higher the accuracy of the value of the angle θ calculated subsequently.

[0046] After receiving the digital Hall voltage output by the analog-to-digital conversion unit 102, the signal processing unit 103 modulates and digitally filters it. After multiple levels of low-pass filtering, the filtering effect is stable, and the phase shift of the output sin(t+θ) curve (including phase shift) relative to the standard sin t curve (i.e., the curve with a phase shift of 0) is stable. The phase shift is the angle θ between the direction of the external 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, for example, sinθ and cosθ. The signal generator 26 can output standard (excluding phase shift) cos t and sin t signals as modulation signals, which are used to modulate the sinθ signal and the cosθ signal respectively. Then, the two modulated signals are added to obtain a modulated signal sin t×cosθ+cos t×sinθ (i.e. Figure 3aThe 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, so as to obtain the actual value of the angle θ (generally a digital signal). If the standard signal cos t or sin t is further replaced by a square wave of the same frequency, the multiplier can be omitted in the process of designing the filter, saving the use of resources in the chip. 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, see Figure 5 The comparison diagram of the square wave and the standard sine wave shown in the figure shows that the three zero crossing points of the square wave replacing the standard sine wave are the same as those of the sine wave, and the positive and negative amplitudes of the square wave are also the same as those of the sine wave. Similar to the square wave being the envelope of the sine wave. If the standard signal is a standard cosine wave, the square wave is also adjusted accordingly. Specifically, an amplifier with a gain that 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 at a fixed value, thereby forming a square wave. For example, Figure 5 The standard signal sin t shown by the dotted line in the middle is amplified to obtain the square wave shown by the solid line.

[0047] Back to Figure 1 The digital-to-analog conversion unit 104 is an optional unit. When the analog value of the angle θ needs to be output, the digital value of the angle θ output by the phase comparison unit 211 is converted into an analog value by the digital-to-analog conversion unit 104.

[0048] The following combination Figure 3a and Figure 3b To explain. Figure 3a is a schematic block diagram of an angle extraction circuit according to some embodiments of the present invention. Figure 3b For the general Figure 3a Schematic block diagram of a circuit in which the sine / cosine signals are replaced by square waves of the same frequency.

[0049] Figure 3a and Figure 3b The first analog-to-digital converter 21 receives a voltage signal (first voltage signal), and outputs a digital signal cosθ after digital-to-analog conversion. The second analog-to-digital converter 22 receives another voltage signal (second voltage signal), and outputs a digital signal sinθ after digital-to-analog conversion. Specifically, the number of bits of the first analog-to-digital converter 21 and the second analog-to-digital converter 22 can be 8 bits, 10 bits, 12 bits, etc. The more bits, the more accurate the value of the angle θ outputted later. Figure 3aIn the embodiment shown, the signal generator 26 may be a digital signal generator, which directly outputs the modulation signals sint and cos t in digital form, which are used to modulate the signals cosθ and sinθ. However, for the chip manufacturing industry, using hardware to implement the multiplier requires more hardware resources and is prone to waste of resources. In order to save hardware resources and facilitate the implementation of the modulation process (i.e., the multiplication process) inside the chip, Figure 3b The embodiment shown uses a square wave of the same frequency (see above for the square wave and Figure 5 ) to replace the modulation signals sin t and cos t, then after addition, Figure 3b The modulated signal obtained at point E is simplified from (sin t×cosθ+cos t×sinθ) to That is to say, the part that originally needed to use a multiplier can now be replaced by only adding and subtracting (i.e., only using an adder). Figure 3b In the actual implementation, the part of multiplying cosθ by square wave 1 and multiplying sinθ by square wave 2 does not appear as a hardware unit of a multiplier, but requires several hardware units of a judgement device and an adder. Therefore, this embodiment reduces the use of many logic gates at the hardware level and reduces the utilization rate of system resources. However, it is known to those skilled in the art that the simplified modulated signal Compared with the modulated signal sint×cosθ+cos t×sinθ, high-frequency components are introduced into the simplified modulated signal. Therefore, in order to prevent the modulated signal from being deformed, the present embodiment further provides a multi-stage filter to filter out the additional high-frequency components. Specifically, the present embodiment uses a four-stage IIR (Infinite Impulse Response) filter: a first-stage filter 27, a second-stage filter 28, a third-stage filter 29, and a fourth-stage filter 30. Each filter occupies a register, namely a first register, a second register, a third register, and a fourth register. The weighted sum of the previous value of the register of the previous filter and the previous value of the register of the current filter is stored in the register of the current filter. Combined with Figure 3a and Figure 3b For example, the characteristic function of the first-stage filter 27 is:

[0050] REG1 n =k×REG1 n-1 +(1-k)×new,

[0051] Among them, REG1 n is the current value of the first register of the first stage filter 27, REG1 n-1is the value of the first register of the first filter 27 in the previous time (that is, the result of the previous recursion), and new is the input value of the first filter 27 (that is, Figure 3a and Figure 3b The signal value of point E in the middle), k is the control coefficient, according to which REG1 n-1 The weights of and new are k and (1-k) respectively.

[0052] The characteristic function of the second-stage filter 28 is:

[0053] REG2 n =k×REG2 n-1 +(1-k)×REG1 n-1 ,

[0054] 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 second-stage filter 28 (i.e. Figure 3a and Figure 3b The signal value at point A in the middle), k is the control coefficient, according to which REG2 n-1 and REG1 n-1 The weights are k and (1-k) respectively.

[0055] The characteristic function of the three-stage filter 29 is:

[0056] REG3 n =k×REG3 n-1 +(1-k)×REG2 n-1 ,

[0057] 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), REG2 n-1 is the input value of the three-stage filter 29 (i.e. Figure 3a and Figure 3b The signal value of point B in the middle), k is the control coefficient, according to which REG3 n-1 and REG2 n-1 The weights are k and (1-k) respectively.

[0058] The characteristic function of the four-stage filter 210 is:

[0059] REG4 n =k×REG4 n-1 +(1-k)×REG3n-1 ,

[0060] 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), REG3 n-1 is the input value of the four-stage filter 210 (i.e. Figure 3a and Figure 3b The signal value of point C in the middle), k is the control coefficient, according to which REG4 n-1 and REG3 n-1 The weights are k and (1-k) respectively.

[0061] Through experiments, the signal curve after four-stage filtering can basically completely filter out the high-frequency components added by using square waves instead of sine waves (cosine waves), so that the signal output by the four-stage filter 210 is a relatively complete modulated signal sin (t + θ), and the signal is subsequently compared with the standard signal sin t (or cos t) to obtain the value of the angle θ. Of course, if the accuracy of the angle θ is required to be relatively high, several more stages of filters can be added according to the above-mentioned characteristic function to filter out more high-frequency signals.

[0062] Furthermore, in the above filter, the value of the control coefficient k is set to Wherein, x is a positive integer less than 256, and the above filter can also be implemented 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 resources to implement other circuits.

[0063] The phase contrast 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 four-stage filter 210. The sin t (or cos t) as a reference signal can also be simplified into a square wave with the same frequency. Fig.11 Let's see, it will be more clear.

[0064] Fig.11 The circuit diagram of the present invention for obtaining the value of the angle θ by counting is shown in FIG. The modulated signal sin(t+θ) is input to the zero crossing detector 110, and the rising edge (or falling edge) thereof is extracted and input to the counter 111. The counter 111 counts the rising edge (or falling edge) of sin t and sin(t+θ), thereby calculating the phase offset (i.e., the value of the angle θ) of the modulated signal sin(t+θ). Alternatively, in another embodiment, a phase detector may be used to implement phase detection.

[0065] It can be said that in the above-mentioned embodiment, the functions of the multiplier and the adder are realized only by the adder and the shift register, which greatly simplifies the angle extraction process (calculation process). Correspondingly, the hardware resources required in the above-mentioned embodiment are also greatly reduced, simplifying the complexity of the circuit.

[0066] In addition, since a multi-stage filter is used in the calculation process, it not only filters out the additional high-frequency signal, but also plays a role in filtering out noise. Compared with the prior art, which usually performs noise filtering after obtaining the value of the angle θ, the present invention also saves an independent noise filtering process.

[0067] Figure 4 for Figure 3b The comparison diagram of the waveforms at the five points A, B, C, D, and E shown in 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 is taken as The modulated signal in digital form at point E is as follows Figure 4 As shown in the step wave in, it is the input signal of the first-stage filter 27. The signal at point A is Figure 4 The waveform of the approximate triangular wave in is the signal after being filtered by the first-stage filter 27. The signal at point B is Figure 4 The waveform is close to a sine wave, but has obvious deformation, which is the signal after being filtered by the second-stage filter 28. The signals at points C and D are already very close to a sine wave, which are the signals filtered by the third-stage filter 29 and the fourth-stage filter 210 respectively.

[0068] In order to more clearly show the filtering effect of the four-stage filter, Figure 6-10 A comparison diagram of the filtering effects of a single-cycle reference signal Ref and a modulated signal is shown.

[0069] Figure 6 In the example, the reference signal Ref is a square wave with a fixed frequency (corresponding to Figure 3b The modulated signal is simplified by using the above-mentioned method of using a square wave of the same frequency to replace the modulating signals sin t and cos t (the simplified modulated signal). Its waveform is a step wave.

[0070] Figure 7 After being filtered by the primary filter 27, the square wave reference signal Ref is transformed into a triangular wave, and the step wave modulated signal sin(t+θ) becomes an irregular broken line waveform.

[0071] Figure 8After being filtered by the secondary filter 28, the reference signal Ref is deformed into a nearly sinusoidal wave, and the modulated signal sin(t+θ) is also deformed into a nearly sinusoidal wave. However, both waveforms are significantly deformed relative to the standard sinusoidal wave.

[0072] Fig. 9 After being filtered by the three-stage filter 29, the reference signal Ref is deformed into a nearly sinusoidal wave, and the modulated signal sin(t+θ) is also deformed into a nearly sinusoidal wave. Both waveforms have no obvious deformation relative to the standard sinusoidal wave.

[0073] Fig.10 After being filtered by the four-stage filter 210, the reference signal Ref is deformed into a cosine wave, and the modulated signal sin(t+θ) is also deformed into a cosine wave. Both waveforms are not significantly deformed relative to the standard sine wave.

[0074] After laboratory simulation, even after passing through the fifth and sixth filters, the waveforms of the reference signal Ref and the modulated signal sin(t+θ) no longer change significantly, that is, the recursion can be ended and can be Fig.10 A phase comparison is performed based on the waveforms shown to obtain the value of the angle θ.

[0075] Although the present invention has been illustrated and described above by referring to some embodiments of the present invention, it should be understood by those skilled in the art that the above is a further detailed description of the present invention in combination with specific implementation methods, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. Those skilled in the art may make various changes and modifications in form and detail, including making several simple deductions or substitutions, without departing from the spirit and scope of the present invention. Therefore, if these changes and modifications 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

1. An angle extraction circuit for extracting the angle value output by an angle sensor, characterized in that: include: A first analog-to-digital converter, used for receiving a first voltage signal and performing analog-to-digital conversion on the first voltage signal, wherein the first voltage signal includes angle information output by the angle sensor; A second analog-to-digital converter, used for receiving a second voltage signal and performing analog-to-digital conversion on the second voltage signal, wherein the second voltage signal includes angle information output by the angle sensor; A signal generator, configured to generate a modulation signal and a reference signal, wherein the modulation signal is a square wave, a first modulation signal is configured to modulate the first voltage signal after analog-to-digital conversion to obtain a first modulated signal, and a second modulation signal is configured to modulate the second voltage signal after analog-to-digital conversion to obtain a second modulated signal; A filter, wherein the first modulated signal and the second modulated signal are added and then input into the filter to extract the angle information; A phase comparison unit receives the reference signal output by the signal generator and the output signal of the filter, and compares the reference signal with the output signal to obtain a phase difference of the output signal relative to the reference signal.

2. The circuit according to claim 1, characterized in that The filter includes a multi-stage filter.

3. The circuit according to claim 1 or 2, characterized in that The filter comprises a four-stage IIR filter.

4. The circuit according to claim 1, characterized in that The characteristic function of the filter is: REG n =k×REG n-1 +(1-k)×new, Among them, REG n is the current output value of the filter, REG n-1 is the previous output value of the filter, new is the input value of the filter, and k is the control coefficient.

5. The circuit according to claim 1, characterized in that The phase comparison unit is a phase shift counter, and the phase shift counter starts counting from a rising / falling edge of the reference signal and ends counting at a rising / falling edge of the output signal of the filter.

6. An angle extraction method for extracting the angle value output by an angle sensor, characterized in that: The steps include: an analog-to-digital conversion step, 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, modulating the first voltage signal converted into a digital signal and the second voltage signal converted into a digital signal with a first modulation signal and a second modulation signal respectively, so as to obtain a first modulated signal and a second modulated signal, wherein the first modulation signal and the second modulation signal are square waves; A filtering step, wherein the first modulated signal and the second modulated signal are added and then input into a filter for filtering to extract the angle information; The phase comparison step receives a reference signal and compares the reference signal with the output signal obtained in the filtering step to obtain a phase difference between the output signal and the reference signal.

7. The method according to claim 6, characterized in that In the filtering step, a multi-stage filter is used for filtering.

8. The method according to claim 6, characterized in that In the filtering step, a filter including a four-stage IIR filter is used for filtering.

9. The method according to claim 6, characterized in that The characteristic function of each filter level of the multi-level recursive filter is: REG n =k×REG n-1 +(1-k)×new, Among them, REG n is the current output value of the filter, REG n-1 is the output value of the filter at the last time, new is the input value of the filter, and k is the control coefficient.

10. A chip, comprising an angle sensing unit, characterized in that: The method further comprises a signal processing unit, which receives the angle information output by the angle sensing unit and extracts an angle value from the angle information according to the method described in any one of claims 6 to 9.