A resolver shaft angle software decoding method
By using a software decoding method for rotary transformers based on a four-quadrant DAC, a high-frequency excitation signal is generated by a microprocessor and then corrected and demodulated. This solves the problems of high cost and low accuracy in rotary transformer decoding, and achieves high-precision angle information acquisition. It is suitable for low- to mid-range microprocessors.
Patent Information
- Application Number
- CN202310195758.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-03
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2043-03-03
AI Technical Summary
Existing rotary transformer decoding solutions rely on dedicated chips, which are expensive and monopolized by foreign companies, suffer from secondary delay issues, and have low accuracy.
A software decoding method based on a four-quadrant DAC is adopted, which uses a microprocessor to generate a high-frequency excitation signal, performs signal correction and phase-sensitive demodulation through a four-quadrant DAC, and combines the angle observer method of a phase-locked loop for position analysis to achieve high-precision angle information acquisition.
No dedicated decoding chip is required, simplifying circuit design, saving costs, eliminating secondary delay, improving decoding accuracy and anti-interference ability, and suitable for low-to-mid-range microprocessors.
Smart Images

Figure CN116184905B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of sensor technology for motion control systems, and in particular to a software decoding method for the shaft angle of a rotary transformer. This method is suitable for low- to mid-range microprocessors and can be applied to scenarios involving position measurement of rotary transformers. Background Technology
[0002] In motion control systems, the rotor position and speed of the controlled motor are fundamental elements that directly affect the stability of the entire motor control. Currently, widely used rotor position sensors include rotary transformers, photoelectric encoders, and Hall effect sensors. Rotary transformers are widely used in industry and automotive fields due to their advantages such as high temperature resistance, moisture resistance, shock resistance, and interference resistance. The current mainstream solution for rotary transformer decoding is hardware decoding technology, relying on dedicated chips to achieve functions such as excitation signal generation, sampling, and demodulation. However, dedicated decoding chips are expensive and mainly controlled by foreign companies; my country does not yet have independent production capabilities. Furthermore, they require SPI communication, analog encoder ABZ signal output, or parallel interfaces to interface with the control chip, resulting in secondary delay issues. Summary of the Invention
[0003] To address the technical problems of high cost and low accuracy in current rotor position determination processes, this invention presents a software decoding method for a rotary transformer based on a four-quadrant DAC, which achieves high-precision acquisition of position and angle information without the need for a dedicated decoding chip.
[0004] To achieve the above objectives, the technical solution of the present invention is as follows:
[0005] A software decoding method for the shaft angle of a rotary transformer specifically includes the following steps:
[0006] S1: A high-frequency excitation signal Usinωt is generated by a microprocessor and applied to the primary winding of the rotary transformer, where U represents the amplitude of the excitation signal and ω represents the angular frequency of the excitation signal.
[0007] S2: Corrects the amplitude and phase of the output signal on the secondary winding side of the rotary transformer;
[0008] S3: The output signals kUsinωt·sinθ and kUsinωt·cosθ of the sine winding and cosine winding of the rotary transformer are respectively connected to the reference input terminal of the four-quadrant DAC. The digital sine signal sinφ and digital cosine signal cosφ generated by following the angle φ are respectively connected to the digital input terminal of the four-quadrant DAC. The four-quadrant DAC outputs the analog signals kUsinωt·sinθ·cosφ and kUsinωt·cosθ·sinφ obtained by multiplication, respectively, where k represents the transformer ratio of the rotary transformer and θ represents the absolute position angle of the rotor.
[0009] S4: The output signal of the rotary transformer is analyzed for position and the corresponding angle information is output.
[0010] Furthermore, the microprocessor model is STM32H750.
[0011] Furthermore, the microprocessor includes an excitation module and an axis angle calculation module.
[0012] Furthermore, the specific process by which the microprocessor generates the high-frequency excitation signal in S1 is as follows:
[0013] S1.1: The microprocessor generates a high-frequency digital sine wave signal D based on the DDS algorithm. ex ;
[0014] S1.2: Convert the high-frequency digital sine wave signal D ex The signal is converted into an analog signal by a D / A converter, and then level-shifted and amplified by an operational amplifier to become a high-frequency excitation signal Usinωt. This high-frequency excitation signal is applied to the primary winding of the rotary transformer. According to the principle of electromagnetic induction, the output signal of the sine winding of the rotary transformer is kUsinωt·sinθ, and the output signal of the cosine winding is kUsinωt·cosθ.
[0015] Furthermore, the specific steps of S2 are as follows: using an operational amplifier to correct the amplitude and phase of the obtained sine and cosine winding output signals.
[0016] Furthermore, the digital cosine signal cosφ and the digital sine signal sinφ in S3 are orthogonal to each other.
[0017] Furthermore, S4 performs position analysis using a phase-locked loop-based angle observer method based on the four-quadrant DAC output signal.
[0018] Furthermore, the specific steps of S4 are as follows:
[0019] S4.1: Subtract the analog signals kUsinωt·sinθ·cosφ and kUsinωt·cosθ·sinφ in S3 to obtain the product difference kUsinωt·sin(θ-φ), where θ-φ represents the following error between the following angle and the actual rotor angle;
[0020] S4.2: Convert the digital sine wave signal D ex Connect the digital input terminal of the four-quadrant DAC, and connect the product difference in S4.1 to the reference input terminal of the four-quadrant DAC to achieve phase-sensitive demodulation;
[0021] S4.3: The microprocessor digitizes the result obtained from S4.2 using an ADC and performs Butterworth digital low-pass filtering. The filtered result is then PI-adjusted, and the current following angle φ is obtained by software lookup table method to follow the change of θ, thus completing the entire closed-loop control process.
[0022] Compared with the prior art, the beneficial effects of the present invention are:
[0023] This invention provides a software decoding method for the shaft angle of a resolver. This software decoding method has the following advantages: The software decoding utilizes the abundant peripheral resources and powerful computing capabilities of a microprocessor to extract resolver position detection information. The microprocessor generates an excitation signal, which is sent to the primary winding of the resolver via a power amplifier circuit. The two output signals from the secondary winding of the resolver are corrected for amplitude and phase, and then the product of the sine and cosine winding output signals of the resolver and the digital sine and cosine signals generated by the following angle φ is obtained through a four-quadrant DAC. The product difference is then compared with the digital sine signal D. ex Phase-sensitive demodulation is performed via multiplication, and the microprocessor receives, samples, decodes, and outputs the obtained position information. Software decoding does not require a dedicated decoding chip, thus eliminating the need for SPI or IIC communication, eliminating the secondary delay problem caused by using dedicated digital converter chips, simplifying circuit design, saving space and cost, and offering flexible phase angle observation algorithm selection with wide applicability. The phase-locked loop-based angle observer method provides closed-loop control, improving the system's anti-interference capability and accurately tracking the rotor's angular velocity and position information. A lookup table method is used to calculate the current tracking angle φ, reducing the requirements for peripheral circuits, lowering complexity, and saving microprocessor computing power. A four-quadrant DAC is used for multiplication of analog and digital quantities, saving microprocessor computing power and simplifying the software decoding process. Attached Figure Description
[0024] Figure 1 This is a general functional structure diagram of the present invention, which includes an excitation module, an shaft angle calculation module, and a software lookup table module;
[0025] Figure 2 This is a flowchart of the excitation signal generation and shaft angle calculation of the present invention;
[0026] Figure 3 This is a waveform diagram of the modulation signal and excitation signal coupled by the position signal and excitation signal output from the secondary winding of the rotary transformer of the present invention. Detailed Implementation
[0027] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments.
[0028] See Figures 1-3As shown, a software decoding method for the shaft angle of a rotary transformer specifically includes the following steps:
[0029] S1: A high-frequency excitation signal Usinωt is generated by a microprocessor and applied to the primary winding of the rotary transformer, where U represents the amplitude of the excitation signal and ω represents the angular frequency of the excitation signal.
[0030] S2: Considering that external factors may cause unbalanced amplitude and non-orthogonal phase of the output signal of the rotary transformer, the amplitude and phase of the output signal on the secondary winding side of the rotary transformer are corrected to improve the smoothness of the calculated output angle.
[0031] S3: The output signals kUsinωt·sinθ and kUsinωt·cosθ of the sine winding and cosine winding of the rotary transformer are respectively connected to the reference input terminal of the four-quadrant DAC. The digital sine signal sinφ and digital cosine signal cosφ generated by following the angle φ are respectively connected to the digital input terminal of the four-quadrant DAC. The four-quadrant DAC outputs the analog signals kUsinωt·sinθ·cosφ and kUsinωt·cosθ·sinφ obtained by multiplication, respectively, where k represents the transformer ratio of the rotary transformer and θ represents the absolute position angle of the rotor.
[0032] S4: The output signal of the rotary transformer is analyzed for position and the corresponding angle information is output.
[0033] The microprocessor model is STM32H750, and the microprocessor contains an excitation module and an axis angle calculation module.
[0034] The specific process by which the microprocessor in S1 generates the high-frequency excitation signal is as follows:
[0035] S1.1: The microprocessor generates a high-frequency digital sine wave signal D based on the DDS algorithm. ex ;
[0036] S1.2: Convert the high-frequency digital sine wave signal D ex The signal is converted into an analog signal by a D / A converter, and then level-shifted and amplified by an operational amplifier to become a high-frequency excitation signal. This high-frequency excitation signal is applied to the primary winding of the rotary transformer. According to the principle of electromagnetic induction, after the rotary transformer receives the high-frequency excitation signal, the sine winding of the rotary transformer outputs the signal kUsinωt·sinθ, and the cosine winding outputs the signal kUsinωt·cosθ.
[0037] The specific steps of S2 are as follows: use an operational amplifier to correct the amplitude and phase of the obtained sine and cosine winding output signals.
[0038] The digital cosine signal cosφ and the digital sine signal sinφ in S3 are orthogonal to each other.
[0039] S4 uses the phase-locked loop-based angle observer method to analyze the position based on the corrected resolver sine and cosine output signals.
[0040] The specific steps of S4 are as follows:
[0041] S4.1: Subtract the analog signals kUsinωt·sinθ·cosφ and kUsinωt·cosθ·sinφ in S3 to obtain the product difference kUsinωt·sin(θ-φ), where θ-φ represents the following error between the following angle and the actual rotor angle;
[0042] S4.2: Convert the digital sine wave signal D ex Connect the digital input terminal of the four-quadrant DAC, and connect the product difference in S4.1 to the reference input terminal of the four-quadrant DAC to achieve phase-sensitive demodulation;
[0043] S4.3: The results obtained from S4.2 are digitally acquired through A / D conversion and Butterworth digital low-pass filtering is performed. The filtered results are then PI-adjusted, and the current following angle φ can be obtained by software lookup table method to follow the change of θ, thus completing the entire closed-loop control process.
[0044] The software decoding in this invention does not require a dedicated decoding chip, thus eliminating the need for SPI communication, IIC communication, and other similar methods. This eliminates the secondary delay problem caused by using dedicated digital-to-digital converter chips, simplifies circuit design, and saves space and cost. Furthermore, the phase angle observation algorithm offers flexible selection and wide applicability, suitable for low- to mid-range microprocessors. The phase-locked loop-based angle observer method provides closed-loop control, improving the system's anti-interference capability and accurately tracking the rotor's angular velocity and position information. The lookup table method for calculating the current tracking angle φ requires minimal external circuitry, reducing complexity and saving microprocessor computing power. The use of a four-quadrant DAC for multiplying analog and digital quantities further conserves microprocessor computing power and simplifies the software decoding process.
[0045] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Any simple modifications, equivalent substitutions, and improvements made by those skilled in the art to the above embodiments without departing from the scope of the technical solution of the present invention, based on the technical essence of the present invention, shall still fall within the protection scope of the technical solution of the present invention.
Claims
1. A software decoding method for the shaft angle of a rotary transformer, characterized in that: Specifically, the following steps are included: S1: A high-frequency excitation signal Usinωt is generated by a microprocessor and applied to the primary winding of the rotary transformer, where U represents the amplitude of the excitation signal and ω represents the angular frequency of the excitation signal. S2: Corrects the amplitude and phase of the output signal on the secondary winding side of the rotary transformer; S3: The output signals kUsinωt·sinθ and kUsinωt·cosθ of the sine winding and cosine winding of the rotary transformer are respectively connected to the reference input terminal of the four-quadrant DAC. The digital sine signal sinφ and digital cosine signal cosφ generated by following the angle φ are respectively connected to the digital input terminal of the four-quadrant DAC. The four-quadrant DAC outputs the analog signals kUsinωt·sinθ·cosφ and kUsinωt·cosθ·sinφ obtained by multiplication, respectively, where k represents the transformer ratio of the rotary transformer; θ represents the absolute position angle of the rotor. S4: The output signal of the rotary transformer is analyzed for position and the corresponding angle information is output; The specific steps of S4 are as follows: S4.1: Subtract the analog signals kUsinωt·sinθ·cosφ and kUsinωt·cosθ·sinφ in S3 to obtain the product difference kUsinωt·sin(θ-φ), where θ-φ represents the following error between the following angle and the actual rotor angle; S4.2: Convert the digital sine wave signal D ex Connect the digital input terminal of the four-quadrant DAC, and connect the product difference in S4.1 to the reference input terminal of the four-quadrant DAC to achieve phase-sensitive demodulation; S4.3: The microprocessor digitizes the result obtained from S4.2 using an ADC, performs Butterworth digital low-pass filtering, and then adjusts the filtered result using a PI controller. The current following angle φ is obtained by software lookup table method to follow the change of θ, thus completing the entire closed-loop control process.
2. The software decoding method for the shaft angle of a rotary transformer according to claim 1, characterized in that: The microprocessor is an STM32H750.
3. The software decoding method for the shaft angle of a rotary transformer according to claim 1, characterized in that: The microprocessor contains an excitation module and an axis angle calculation module.
4. The software decoding method for the shaft angle of a rotary transformer according to claim 1, characterized in that: The specific process by which the microprocessor in S1 generates the high-frequency excitation signal Usinωt is as follows: S1.1: The microprocessor generates a high-frequency digital sine wave signal D based on the DDS algorithm. ex ; S1.2: Convert the high-frequency digital sine wave signal D ex The signal is converted into an analog signal by a D / A converter, and then level-shifted and amplified by an operational amplifier to become a high-frequency excitation signal Usinωt. This high-frequency excitation signal is applied to the primary winding of the rotary transformer. According to the principle of electromagnetic induction, the output signal of the sine winding of the rotary transformer is kUsinωt·sinθ, and the output signal of the cosine winding is kUsinωt·cosθ.
5. The software decoding method for the shaft angle of a rotary transformer according to claim 1, characterized in that: The specific steps of S2 are as follows: using an operational amplifier to correct the amplitude and phase of the obtained sine and cosine winding output signals.
6. The software decoding method for the shaft angle of a rotary transformer according to claim 1, characterized in that: The digital cosine signal cosφ and the digital sine signal sinφ in S3 are orthogonal to each other.
7. The software decoding method for the shaft angle of a rotary transformer according to claim 1, characterized in that: S4 uses the phase-locked loop-based angle observer method to analyze the position based on the corrected resolver sine and cosine output signals.
Citation Information
Patent Citations
DSADC based rotary transformer software decoding system and method
CN107332565A
Rotating transformer angular position resolving device and method
CN110022097A