Decoding method for sine and cosine output signals of TMR magnetic resistance angle sensing chip
The rotation amount is converted into sine and cosine signals through the TMR magnetoresistive angle sensing chip, and the rotation speed and angle signals are calculated using closed-loop control and PID regulator, which solves the problems of low decoding accuracy and low reliability in the prior art, and realizes high-precision and anti-interference signal decoding.
Patent Information
- Application Number
- CN202510092158.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-21
- Publication Date
- 2025-05-06
AI Technical Summary
The existing TMR magnetoresistive angle sensing chip decoding methods are easily disturbed by noise, resulting in low accuracy, complex decoding process and low reliability.
The TMR magnetoresistive angle sensing chip is used to convert the rotation amount into a sine signal and a cosine signal. These signals are collected through the A/D conversion module of the processor unit, and the speed signal and angle signal are calculated through closed-loop control, combined with the PID regulator and the integrator.
It realizes high-precision and strong anti-interference capability of angle and speed signal decoding, simplifies the decoding process, improves reliability, and solves the problems of high-speed and low-speed compensation.
Smart Images

Figure CN119934959A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of magnetoresistive chip decoding, and in particular to a method for decoding sine and cosine output signals of a TMR magnetoresistive angle sensor chip. Background Art
[0002] In the field of precision machining and high-precision transmission, it is often necessary to monitor the rotation amount of rotating parts, such as motor rotation. Traditional detection methods can use grating sensors, Hall sensors, etc. for measurement, but they are easily interfered by the outside world during actual use. With the development of technology, in order to meet the needs of high-precision detection with interference resistance, magnetoresistive sensing technology has been developed. With the advancement of TMR magnetoresistive, it is used in the measurement of angle rotation, but in the actual landing process, it is necessary to decode the signal transmitted by it for processor chip recognition and subsequent processing. The existing decoding method mostly uses inverse tangent calculation for decoding. This method obtains the angle information obtained by inverse tangent calculation, which is easily interfered by noise, resulting in low precision. It needs to be processed by a low-pass filtering algorithm, which will cause phase lag, especially when rotating at high speed. Phase compensation is required, and the decoding method is complex and the reliability is not high. In order to achieve fast and accurate decoding, a decoding method for the sine and cosine output signal of a TMR magnetoresistive angle sensor chip is proposed. Summary of the invention
[0003] The technical problem to be solved by the present invention is to provide a decoding method for the sine and cosine output signals of a TMR magnetoresistive angle sensor chip, which has simple steps, high decoding accuracy and strong anti-interference.
[0004] In order to solve the above technical problems, the present invention is solved by the following technical solutions: a decoding method of the sine and cosine output signals of a TMR magnetoresistive angle sensor chip, comprising the following steps: Step 1, setting a TMR magnetoresistive angle sensor chip, and obtaining the rotation amount of the rotating part to be measured through the TMR magnetoresistive angle sensor chip; Step 2, the TMR magnetoresistive angle sensor chip converts the rotation amount into a sine signal and a cosine signal, and transmits the signals to the processor unit; Step 3, the processor unit processes the sine signal to obtain a sine value, processes the cosine signal to obtain a cosine value, and transmits the sine value and the cosine value to the angle phase difference calculation module, which calculates the difference signal in combination with the feedback angle; Step 4: The above difference signal is processed by a PID regulator to obtain a speed signal; Step 5: The above speed signal is processed by an integrator to obtain an angle signal; Step 6: The angle signal is sent to the angle phase difference calculation module as a feedback angle, and steps 1-5 are repeated to obtain the speed signal and the angle signal in real time.
[0005] On the basis of the above, the processor module is provided with an A / D conversion module, and the sine signal and the cosine signal are collected and acquired by the A / D conversion module.
[0006] Preferably, the sine signal includes sinα+ and sinα-, and the cosine signal includes cosα+ and cosα-; The sine value sinα is: sinα= (sinα+) – (sinα-); The cosine value cosα is: cosα= (cosα+) – (cosα-).
[0007] Preferably, the feedback angle is θ, and the difference signal e is: e = sin (α-θ) = sinα* cosθ - cosα* sinθ .
[0008] Preferably, the speed signal ω in step 4 is: ω = Kp * e + Ki * ∫e·dt Among them: Kp is the proportional gain of PID, Ki is the integral gain of PID.
[0009] Preferably, the angle signal θ in step 5 is: θ =∫ω·dt .
[0010] Compared with the prior art, the present invention has the following beneficial effects: the present invention samples the sine signal and the cosine signal through the A / D conversion module of the processor unit, and obtains the speed signal and the angle signal through closed-loop control. The angle and speed information obtained by adopting closed-loop feedback control have the advantages of high precision and small phase difference, and at the same time solves the problem of high-speed and low-speed compensation, realizes the unification of signal processing algorithms, and is conducive to standardized design. It can adopt a general ARM chip or a DSP chip, with a simple circuit, low cost and high reliability. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0012] Figure 1 It is a schematic diagram of the communication between the TMR magnetoresistive angle sensor chip and the processor unit of the present invention; Figure 2 It is a schematic diagram of the process of the present invention. DETAILED DESCRIPTION
[0013] The present invention is further described in detail below with reference to the accompanying drawings.
[0014] The following description is used to disclose the present invention so that those skilled in the art can implement the present invention. The preferred embodiments described below are only examples, and those skilled in the art can think of other obvious variations. The basic principles of the present invention defined in the following description can be used for other embodiments, variations, improvements, equivalents, and other technical solutions that do not deviate from the spirit and scope of the present invention.
[0015] As attached Figure 1-2 The method for decoding the sine and cosine output signals of a TMR magnetoresistive angle sensor chip shown in the figure comprises the following steps: Step 1: Set a TMR magnetoresistive angle sensor chip, and obtain the rotation amount of the rotating part to be measured through the TMR magnetoresistive angle sensor chip; for example, set a magnetic element on the rotating part, and detect the change of the magnetic field through the TMR magnetoresistive angle sensor chip.
[0016] Step 2: The TMR magnetoresistive angle sensor chip converts the detected information into sine signals and cosine signals, and the processor unit is provided with an A / D conversion module to collect and acquire the sine signals and cosine signals. The sine signals include sinα+ and sinα-, and the cosine signals include cosα+ and cosα-.
[0017] Step 3: The processor unit processes the sine signal to obtain the sine value sinα, and processes the cosine signal to obtain the cosine value cosα; specifically, sinα= (sinα+) – (sinα-), cosα= (cosα+) – (cosα-). The sine value and cosine value are transmitted to the angle phase difference calculation module, and the angle phase difference calculation module is used to calculate the difference signal e in combination with the feedback angle θ. Wherein, e=sin (α-θ), that is, e=sinα* cosθ - cosα* sinθ.
[0018] Step 4: The above difference signal is processed by the PID regulator to obtain the speed signal ω. Wherein, ω = Kp * e + Ki * ∫e·dt, where: Kp is the proportional gain of PID, Ki is the integral gain of PID.
[0019] Step 5: The above speed signal is processed by an integrator to obtain an angle signal θ. θ=∫ω·dt, the initial state θ is 0.
[0020] Step 6: The angle signal is sent to the angle phase difference calculation module as a feedback angle, and steps 1-5 are repeated to obtain the speed signal ω and the angle signal θ in real time.
[0021] Those skilled in the art should understand that the embodiments of the present invention described above and shown in the accompanying drawings are only examples and do not limit the present invention. The purpose of the present invention has been fully and effectively achieved. The functions and structural principles of the present invention have been demonstrated and explained in the embodiments, and the embodiments of the present invention may be deformed or modified in any way without departing from the principles.
Claims
1. A method for decoding the sine and cosine output signals of a TMR magnetoresistive angle sensor chip, characterized in that: The following steps are involved: Step 1, setting a TMR magnetoresistive angle sensor chip, and obtaining the rotation amount of the rotating part to be measured through the TMR magnetoresistive angle sensor chip; Step 2, the TMR magnetoresistive angle sensor chip converts the rotation amount into a sine signal and a cosine signal, and transmits the signals to the processor unit; Step 3, the processor unit processes the sine signal to obtain a sine value, processes the cosine signal to obtain a cosine value, and transmits the sine value and the cosine value to the angle phase difference calculation module, which calculates the difference signal in combination with the feedback angle; Step 4: The above difference signal is processed by a PID regulator to obtain a speed signal; Step 5: The above speed signal is processed by an integrator to obtain an angle signal; Step 6: The angle signal is sent to the angle phase difference calculation module as a feedback angle, and steps 1-5 are repeated to obtain the speed signal and the angle signal in real time.
2. The decoding method of the sine and cosine output signals of a TMR magnetoresistive angle sensor chip according to claim 1, characterized in that: The processor module is provided with an A / D conversion module, and the sine signal and the cosine signal are collected and acquired by the A / D conversion module.
3. The decoding method of the sine and cosine output signals of a TMR magnetoresistive angle sensor chip according to claim 2, characterized in that: The sine signal includes sinα+ and sinα-, and the cosine signal includes cosα+ and cosα-; The sine value sinα is: sinα= (sinα+) – (sinα-); The cosine value cosα is: cosα= (cosα+) – (cosα-).
4. The method for decoding the sine and cosine output signals of a TMR magnetoresistive angle sensor chip according to claim 3, characterized in that: The feedback angle is θ, and the difference signal e is: e = sin (α-θ) = sinα* cosθ - cosα* sinθ .
5. The method for decoding the sine and cosine output signals of a TMR magnetoresistive angle sensor chip according to claim 4, characterized in that: The speed signal ω described in step 4 is: ω = Kp * e + Ki * ∫e·dt .
6. The method for decoding the sine and cosine output signals of a TMR magnetoresistive angle sensor chip according to claim 5, characterized in that: The angle signal θ described in step 5 is: θ = ∫ω·dt .