Rotary transformer decoding circuit and extensible rotary transformer decoding equipment

By designing a rotary decoding circuit, the excitation amplification module, sine feedback module and cosine feedback module are connected to the FPGA, and the rotation signal is solved using FPGA, which solves the problem of low scalability of traditional rotary signal processing technology and realizes multiple Improved flexibility and efficiency of channel rotation signal processing.

CN119010666APending Publication Date: 2024-11-22DONGFENG MOTOR GRP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411051268.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-01
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

Traditional rotary signal processing technology has low scalability when facing multi-channel demand, and it is difficult to expand flexibly to meet actual needs.

Method used

Design a rotary decoding circuit, which connects the rotary transformer module to the FPGA through excitation amplification module, sinusoidal feedback module and cosine feedback module, and uses FPGA to solve the rotary transformer signal to realize parallel processing of multiple signals, so that the number of channels can be easily expanded. .

Benefits of technology

The scalability of the rotary signal is realized, and can be applied in multi-channel usage scenarios, improving the flexibility and efficiency of rotary signal processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119010666A_ABST
    Figure CN119010666A_ABST
Patent Text Reader

Abstract

The invention discloses a resolver decoding circuit and extensible resolver decoding equipment, and relates to the technical field of electronics, the resolver decoding circuit is connected between an FPGA and a resolver module, and the resolver decoding circuit comprises an excitation amplification module, a sine feedback module and a cosine feedback module; an input port of the excitation amplification circuit is connected with a PWM wave sending port of the FPGA, and an output port of the excitation amplification circuit is connected with a resolver excitation primary side of the resolver module; input ports of the sine feedback module and the cosine feedback module are respectively connected with a sine output port and a cosine output port of the rotary transformer module, and output ports of the sine feedback module and the cosine feedback module are connected with a digital-to-analog conversion port of the FPGA. According to the resolver decoding circuit based on the FPGA, the resolver module is connected with the FPGA through the excitation amplification module, the sine feedback module and the cosine feedback module, resolving of resolver signals is achieved through the FPGA, and due to the fact that the FPGA has the characteristic of being capable of being expanded easily, the resolver decoding circuit based on the FPGA also has expandability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of electronic technology, and in particular to a resolver decoding circuit and an expandable resolver decoding device. Background Art

[0002] In modern motor control systems, accurate detection of the position and speed of the motor rotor is essential for achieving high-performance control. As a key sensor, rotary encoders (resolvers) are widely used in drive systems such as servo motors, brushless DC motors, and AC induction motors to provide real-time motor position and speed information.

[0003] Traditional resolver signal processing technology mainly relies on microcontroller units (MCUs), digital signal acquisition and conversion (DSADCs), and dedicated resolver decoding chips. Many modern MCUs integrate resolver decoding modules that can directly receive and decode signals from resolvers, or use DSADCs for high-speed sampling, and then use software algorithms (such as Kalman filtering or digital signal processing algorithms) to decode angles and speeds. Others use specially designed hardware chips to decode resolver signals. Although these methods can process resolver signals, they are difficult to flexibly expand to meet actual needs when faced with multi-channel requirements.

[0004] In summary, how to solve the problem of low scalability of traditional resolver signal processing technology has become a technical problem that needs to be solved urgently in this field. Summary of the invention

[0005] The main purpose of the present invention is to provide a resolver decoding circuit and an expandable resolver decoding device, aiming to solve the technical problem of low scalability of traditional resolver signal processing technology.

[0006] To achieve the above object, the present invention provides a resolver decoding circuit, which is connected between the FPGA and the resolver module, and includes an excitation amplification module, a sine feedback module and a cosine feedback module;

[0007] The input port of the excitation amplifier circuit is connected to the PWM wave generating port of the FPGA, and the output port is connected to the resolver excitation primary side of the resolver module;

[0008] The input ports of the sine feedback module and the cosine feedback module are respectively connected to the sine output port and the cosine output port of the resolver module, and the output ports of the sine feedback module and the cosine feedback module are connected to the digital-to-analog conversion port of the FPGA.

[0009] In one embodiment, the excitation amplification module is used to amplify the signal emitted by the PWM wave transmission port and transmit it to the resolver module;

[0010] The sine feedback module and the cosine feedback module are used to process the pre-feedback signal and the cosine feedback signal of the resolver module to preset amplitudes, respectively.

[0011] In one embodiment, the excitation amplification module includes:

[0012] A first filtering unit, used for filtering out high-frequency harmonics in the PWM fundamental wave emitted by the PWM wave transmitting port, and converting the PWM fundamental wave into a sine wave;

[0013] A bias signal generating unit, used for pushing the excitation signal to a bias position of 7.5V;

[0014] An inversion unit, used for inverting the sine wave output by the filtering unit to form a pair of differential signals with the sine wave before inversion;

[0015] A signal amplifying unit, used for amplifying the differential signal;

[0016] A bias unit, used for providing a critical conduction state to correct the sine wave distortion of the amplifying circuit when the sine wave is biased by 7.5V;

[0017] A current amplifying unit, used for amplifying the sinusoidal wave current;

[0018] An excitation unit, used for providing a dummy load and connected in parallel with the resolver excitation primary to form a complete loop for the differential signal;

[0019] The phase correction unit is used to adjust the phase difference between the excitation signal and the feedback signal.

[0020] In one embodiment, the sinusoidal feedback module includes: a first bias unit, a second filtering unit and a first voltage dividing unit;

[0021] The input end of the second filtering unit is connected to the sinusoidal output port, and the output end is connected to the input end of the first voltage dividing unit;

[0022] The output end of the first voltage dividing unit is connected to the digital-to-analog conversion port;

[0023] The first bias unit is connected between the second filtering unit and the first voltage dividing unit.

[0024] In one embodiment, the first biasing unit comprises:

[0025] A first pull-up resistor, wherein a first end of the first pull-up resistor is connected to an external power supply, and a second end of the first pull-up resistor is connected between the second filtering unit and the first voltage dividing unit;

[0026] A first pull-down resistor, wherein a first end of the first pull-down resistor is connected between the second filtering unit and the first voltage dividing unit, and a second end of the first pull-down resistor is grounded.

[0027] In one embodiment, the first biasing unit is used to pull the feedback signal to a biased 2.5V position;

[0028] The second filtering unit is used to filter out the clutter caused by the spin change;

[0029] The first voltage dividing unit is used for voltage dividing with the resolver feedback coil of the resolver module to separate a voltage signal of a preset amplitude to be collected by the digital-to-analog conversion port.

[0030] In one embodiment, the cosine feedback module includes: a second bias unit, a third filtering unit, and a second voltage dividing unit;

[0031] The input end of the third filtering unit is connected to the cosine output port, and the output end is connected to the input end of the second voltage dividing unit;

[0032] The output end of the second voltage dividing unit is connected to the digital-to-analog conversion port;

[0033] The second bias unit is connected between the third filtering unit and the second voltage dividing unit.

[0034] In one embodiment, the second bias unit includes:

[0035] a second pull-up resistor, wherein a first end of the second pull-up resistor is connected to an external power supply, and a second end of the second pull-up resistor is connected between the third filtering unit and the second voltage dividing unit;

[0036] A second pull-down resistor, wherein a first end of the second pull-down resistor is connected between the third filtering unit and the second voltage dividing unit, and a second end of the second pull-down resistor is grounded.

[0037] In one embodiment, the second biasing unit is used to pull the feedback signal to a biased 2.5V position;

[0038] The third filtering unit is used to filter out the clutter caused by the spin change;

[0039] The second voltage dividing unit is used to divide the voltage with the resolver feedback coil of the resolver module to separate a voltage signal of a preset amplitude to be collected by the digital-to-analog conversion port.

[0040] In addition, to achieve the above-mentioned purpose, the present application also proposes a scalable resolver decoding device, and the scalable resolver decoding device includes the resolver decoding circuit as described above.

[0041] In one embodiment, the scalable resolver decoding device further includes:

[0042] A resolver module, the resolver module being connected to a first end of the resolver decoding circuit;

[0043] FPGA, a first end of the FPGA is connected to the second end of the resolver decoding circuit, and the FPGA includes a plurality of resolver expansion interfaces;

[0044] MCU, the MCU is connected to the second end of the FPGA.

[0045] In addition, to achieve the above-mentioned purpose, the present application also proposes a resolver decoding method, which is applied to FPGA; the method comprises:

[0046] Calling an array stored in a register in the FPGA, and transmitting a PWM signal according to the array;

[0047] Two orthogonal sinusoidal wave signals are received and input based on the PWM signal;

[0048] The sine wave signal is sampled by the analog-to-digital conversion module of the FPGA, the value of the envelope diagram of the sine wave signal is collected, and the control deviation is calculated according to the value of the envelope diagram;

[0049] The excitation signal in the control deviation is removed, and the control deviation is iteratively solved using a preset CORDIC algorithm to obtain the angle of rotation of the resolver.

[0050] In the technical solution of the present invention, a resolver decoding circuit is designed. The resolver decoding circuit connects the resolver module to the FPGA through an excitation amplification module, a sine feedback module and a cosine feedback module, and the resolver signal is resolved through the FPGA. In addition, since the FPGA can process multiple signals in parallel, has a short delay, and the number of channels can be easily expanded, the FPGA-based resolver decoding circuit is also scalable and can be applied in multi-channel usage scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art 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 the structures shown in these drawings without paying creative work.

[0052] Figure 1 A schematic diagram of a circuit framework of a resolver decoding circuit proposed by the present invention;

[0053] Figure 2 This is a specific circuit diagram of the excitation amplification module of this application;

[0054] Figure 3 This is a specific circuit diagram of the sinusoidal feedback module of this application;

[0055] Figure 4 This is a specific circuit diagram of the cosine feedback module of this application;

[0056] Figure 5 This is a flow chart of the first embodiment of the resolver decoding method of the present application;

[0057] Figure 6 This is a flowchart of a resolver decoding algorithm involved in an embodiment of the resolver decoding method of the present application.

[0058] Description of Figure Numbers:

[0059]

[0060]

[0061] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0062] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0063] It should be noted that if the embodiments of the present invention involve directional indications (such as up, down, left, right, front, back, etc.), the directional indications are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.

[0064] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present invention, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or suggesting their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0065] In modern motor control systems, accurate detection of the position and speed of the motor rotor is essential for achieving high-performance control. As a key sensor, rotary encoders (resolvers) are widely used in drive systems such as servo motors, brushless DC motors, and AC induction motors to provide real-time motor position and speed information.

[0066] Traditional resolver signal processing technology mainly relies on microcontroller units (MCUs), digital signal acquisition and conversion (DSADCs), and dedicated resolver decoding chips. Many modern MCUs integrate resolver decoding modules that can directly receive and decode signals from resolvers, or use DSADCs for high-speed sampling, and then use software algorithms (such as Kalman filtering or digital signal processing algorithms) to decode angles and speeds. Others use specially designed hardware chips to decode resolver signals. Although these methods can process resolver signals, they are difficult to flexibly expand to meet actual needs when faced with multi-channel requirements.

[0067] In summary, how to solve the problem of low scalability of traditional resolver signal processing technology has become a technical problem that needs to be solved urgently in this field.

[0068] In view of the above problems, in the technical solution of the present invention, a resolver decoding circuit is designed. The resolver decoding circuit connects the resolver module to the FPGA through an excitation amplification module, a sine feedback module and a cosine feedback module, and the resolver signal is resolved through the FPGA. In addition, since the FPGA can process multiple signals in parallel, has a short delay, and the number of channels can be easily expanded, the FPGA-based resolver decoding circuit is also scalable and can be applied in multi-channel usage scenarios.

[0069] Reference Figure 1 As shown, Figure 1 The schematic diagram of the circuit framework of a resolver decoding circuit proposed by the present invention is shown in FIG. 1 , wherein the resolver decoding circuit is connected between the FPGA and the resolver module, and includes an excitation amplification module, a sine feedback module, and a cosine feedback module;

[0070] The input port of the excitation amplifier circuit is connected to the PWM wave generating port of the FPGA, and the output port is connected to the resolver excitation primary side of the resolver module;

[0071] The input ports of the sine feedback module and the cosine feedback module are respectively connected to the sine output port and the cosine output port of the resolver module, and the output ports of the sine feedback module and the cosine feedback module are connected to the digital-to-analog conversion port of the FPGA.

[0072] In this embodiment, the resolver decoding circuit is arranged between the FPGA platform and the resolver module in actual application, and includes an excitation amplification module, a sine feedback module and a cosine feedback module. The input port of the excitation amplification module is connected to the PWM wave generating port of the FPGA, and the output port is connected to the resolver excitation primary side. The input ports of the sine feedback module and the cosine feedback module are respectively connected to the SIN / COS output ports of the resolver, and the output ports are connected to the DSADC port of the FPGA. In addition, the FPGA communicates with the MCU through the SPI bus to transmit angle information.

[0073] Optionally, in a feasible implementation manner, the excitation amplification module is used to amplify the signal emitted by the PWM wave transmitting port and transmit it to the resolver module;

[0074] The sine feedback module and the cosine feedback module are used to process the pre-feedback signal and the cosine feedback signal of the resolver module to preset amplitudes, respectively.

[0075] In this embodiment, the excitation amplification module is used to amplify and modulate the PWM signal emitted by the PWM wave transmission port of the FPGA, so that the PWM signal can be converted into excitation + and excitation - signals that can be recognized by the resolver module. The sine feedback module and the cosine feedback module are used to feed back the sine signal and cosine signal generated by the resolver module to the DSADC port of the FPGA, so that the FPGA can calculate the rotation angle according to the feedback sine wave signal and cosine wave signal according to the resolver algorithm.

[0076] For example, in actual applications, the FPGA calls the array stored in the register, and sends out an 800KHz PWM wave according to the set array. After passing through the RC conditioning circuit and the push-pull amplifier circuit, it becomes a 10KHz sine wave and is sent to the excitation coil of the resolver. After a certain transformation ratio, the resolver converts the excitation sine wave into two orthogonal sine waves, which are S1 / S3 of the SIN signal and S2 / S4 of the COS signal. The frequency of the sine wave fundamental wave is 10KHz, and the carrier frequency is equal to the resolver speed. The signal is sent to the ADC port of the FPGA to convert the sampled amplitude information of the received sine signal and cosine signal into digital quantity, and then the rotation angle can be solved by the resolver algorithm.

[0077] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 2 , Figure 2 The specific circuit diagram of the excitation amplifier module of this application is as follows: Figure 2 As shown, the excitation amplification module includes:

[0078] A first filtering unit, used for filtering out high-frequency harmonics in the PWM fundamental wave emitted by the PWM wave transmitting port, and converting the PWM fundamental wave into a sine wave;

[0079] A bias signal generating unit, used for pushing the excitation signal to a bias position of 7.5V;

[0080] An inversion unit, used for inverting the sine wave output by the filtering unit to form a pair of differential signals with the sine wave before inversion;

[0081] A signal amplifying unit, used for amplifying the differential signal;

[0082] A bias unit, used for providing a critical conduction state to correct the sine wave distortion of the amplifying circuit when the sine wave is biased by 7.5V;

[0083] A current amplifying unit, used for amplifying the sinusoidal wave current;

[0084] An excitation unit, used for providing a dummy load and connected in parallel with the resolver excitation primary to form a complete loop for the differential signal;

[0085] The phase correction unit is used to adjust the phase difference between the excitation signal and the feedback signal.

[0086] In this embodiment, please refer to Figure 2The first filtering unit (i.e., the two-stage RC filtering unit) includes resistors R6, R7 and capacitors C4, C5, which are used to filter out high-frequency harmonics in the 800KHz PWM fundamental wave and convert the PWM wave into a sine wave. The 7.5V bias signal generating unit includes an operational amplifier U1C, resistors R19, R25, R36 and capacitor C11, which are used to provide a 7.5V bias signal and push the excitation signal to a 7.5V bias position; the inverting unit includes an operational amplifier U1B, resistors R4, R5, R12, R13 and capacitor C6, etc., which are used to invert the sine wave coming out of the RC filtering circuit and form a pair of differential signals with the sine wave before inversion, which are provided to the subsequent stage for amplification; the signal amplifying unit includes operational amplifiers U1A, U1D and resistors R3, R11, R28, R32, which are used to convert the output of the previous stage The signals of excitation + and excitation - are amplified; the bias unit, including diodes D1, D2 and resistors R2, R14, R22, and R23, is used to provide a critical conduction state to revise the sine wave distortion of the amplifying circuit when the sine wave is biased over 7.5V; the current amplifying unit, including transistors Q1, Q2, Q3, and Q4 and resistors R8, R9, R10, R29, R30, and R31, is used to amplify the sinusoidal wave current; the excitation unit, including excitation resistor R16, is used to provide a dummy load and the primary side of the resolver excitation coil in parallel to form a complete loop for excitation + and excitation - to obtain a correct sinusoidal waveform; the phase correction unit, including resistors R1, R18, R21, and R43 and capacitors C1, C8, C2, C12, C3, and C13, is used to adjust the phase difference between the excitation signal and the feedback signal.

[0087] Further, in a feasible implementation mode, please refer to Figure 3 , Figure 3 The specific circuit diagram of the sinusoidal feedback module of this application is as follows: Figure 3 As shown, the sinusoidal feedback module includes: a first bias unit, a second filtering unit and a first voltage dividing unit;

[0088] The input end of the second filtering unit is connected to the sinusoidal output port, and the output end is connected to the input end of the first voltage dividing unit;

[0089] The output end of the first voltage dividing unit is connected to the digital-to-analog conversion port;

[0090] The first bias unit is connected between the second filtering unit and the first voltage dividing unit.

[0091] In this embodiment, the sinusoidal feedback circuit includes a first bias unit, a second filtering unit and a first voltage divider unit, the input end of the second filtering unit is connected to the two sinusoidal output ports of the resolver module, the output end is connected to the input end of the first voltage divider unit, the output end of the first voltage divider unit is connected to the digital-to-analog conversion port of the FPGA, and the first bias unit is connected between the second filtering unit and the first voltage divider unit.

[0092] Further, in a feasible implementation manner, as Figure 3 As shown, the first bias unit includes:

[0093] A first pull-up resistor, wherein a first end of the first pull-up resistor is connected to an external power supply, and a second end of the first pull-up resistor is connected between the second filtering unit and the first voltage dividing unit;

[0094] A first pull-down resistor, wherein a first end of the first pull-down resistor is connected between the second filtering unit and the first voltage dividing unit, and a second end of the first pull-down resistor is grounded.

[0095] In this embodiment, the first bias unit includes a pull-up resistor R15 and a pull-down resistor R26, one end of R15 is connected between the second filtering unit and the first voltage divider unit, and the other end is connected to an external 15V power supply to obtain electrical energy, one end of R26 is connected between the second filtering unit and the first voltage divider unit, and the other end is grounded.

[0096] Further, the first biasing unit is used to pull the feedback signal to a biased 2.5V position;

[0097] The second filtering unit is used to filter out the clutter caused by the spin change;

[0098] The first voltage dividing unit is used for voltage dividing with the resolver feedback coil of the resolver module to separate a voltage signal of a preset amplitude to be collected by the digital-to-analog conversion port.

[0099] In this embodiment, the first bias unit is used to pull the feedback model to the bias position of 2.5V. The second filtering unit includes a common-mode inductor T2, Y capacitors C9, C10, X capacitor C7 and resistors R27, R34, which are used to filter out the noise generated by the spin converter. The first voltage divider unit includes resistors R17, R24, and R20, which are used to divide the voltage with the resistance of the resolver feedback coil to separate a voltage signal with a suitable amplitude to be collected by the ADC port of the FPGA.

[0100] Further, in a feasible implementation mode, please refer to Figure 4 , Figure 4 This is a specific circuit diagram of the cosine feedback module of this application, such as Figure 4 As shown, the cosine feedback module includes: a second bias unit, a third filtering unit and a second voltage dividing unit;

[0101] The input end of the third filtering unit is connected to the cosine output port, and the output end is connected to the input end of the second voltage dividing unit;

[0102] The output end of the second voltage dividing unit is connected to the digital-to-analog conversion port;

[0103] The second bias unit is connected between the third filtering unit and the second voltage dividing unit.

[0104] In this embodiment, the cosine feedback circuit includes a second bias unit, a third filtering unit and a second voltage divider unit, the input end of the third filtering unit is connected to the two cosine output ports of the resolver module, the output end is connected to the input end of the second voltage divider unit, the output end of the second voltage divider unit is connected to the digital-to-analog conversion port of the FPGA, and the second bias unit is connected between the third filtering unit and the second voltage divider unit.

[0105] Further, in a feasible implementation manner, as Figure 4 As shown, the second bias unit includes:

[0106] a second pull-up resistor, wherein a first end of the second pull-up resistor is connected to an external power supply, and a second end of the second pull-up resistor is connected between the third filtering unit and the second voltage dividing unit;

[0107] A second pull-down resistor, wherein a first end of the second pull-down resistor is connected between the third filtering unit and the second voltage dividing unit, and a second end of the second pull-down resistor is grounded.

[0108] In this embodiment, the second bias unit includes a pull-up resistor R33 and a pull-down resistor R42, one end of R33 is connected between the third filtering unit and the second voltage divider unit, and the other end is connected to an external 15V power supply to obtain electrical energy, one end of R42 is connected between the third filtering unit and the second voltage divider unit, and the other end is grounded.

[0109] Further, the second biasing unit is used to pull the feedback signal to a biased 2.5V position;

[0110] The third filtering unit is used to filter out the clutter caused by the spin change;

[0111] The second voltage dividing unit is used to divide the voltage with the resolver feedback coil of the resolver module to separate a voltage signal of a preset amplitude to be collected by the digital-to-analog conversion port.

[0112] In this embodiment, the second bias unit is used to pull the feedback model to the bias position of 2.5V. The third filtering unit includes a common-mode inductor T3, Y capacitors C15, C16, X capacitor C14 and resistors R38, R39, which are used to filter out the noise generated by the spin converter. The second voltage divider unit includes resistors R35, R37, and R40, which are used to divide the voltage with the resistance of the resolver feedback coil to separate a voltage signal with a suitable amplitude to be collected by the ADC port of the FPGA.

[0113] The present application also provides an extensible resolver decoding device, which includes the resolver decoding circuit as described above.

[0114] In a feasible embodiment, the scalable resolver decoding device further includes:

[0115] A resolver module, the resolver module being connected to a first end of the resolver decoding circuit;

[0116] FPGA, a first end of the FPGA is connected to the second end of the resolver decoding circuit, and the FPGA includes a plurality of resolver expansion interfaces;

[0117] MCU, the MCU is connected to the second end of the FPGA.

[0118] In this embodiment, the FPGA calls the array stored in the register, and sends out an 800KHz PWM wave according to the set array. After passing through the RC conditioning circuit and the push-pull amplifier circuit, it becomes a 10KHz sine wave and is sent to the excitation coil of the resolver. After a certain transformation ratio, the resolver converts the excitation sine wave into two orthogonal sine waves, namely S1 / S3 of the SIN signal and S2 / S4 of the COS signal. The frequency of the sine wave fundamental wave is 10KHz, and the carrier frequency is equal to the resolver speed. The signal is sent to the ADC port of the FPGA to convert the sampled amplitude information of the received sine signal and cosine signal into a digital quantity, and then the rotation angle can be solved by the resolver algorithm.

[0119] The scalable resolver decoding device provided by the present application adopts the resolver decoding circuit in the above embodiment, which can solve the technical problem of low scalability of traditional resolver signal processing technology. Compared with the prior art, the beneficial effects of the scalable resolver decoding device provided by the present application are the same as the beneficial effects of the resolver decoding circuit provided by the above embodiment, and other technical features in the scalable resolver decoding device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0120] Based on the above hardware device, the present application also provides a resolver decoding method, referring to Figure 5 , Figure 5 1 is a flow chart of the first embodiment of the resolver decoding method of the present application.

[0121] In this embodiment, the resolver decoding method is applied to FPGA; the resolver decoding method includes steps S10 to S40:

[0122] Step S10, calling the array stored in the register in the FPGA, and transmitting the PWM signal according to the array;

[0123] Step S20, receiving two orthogonal sinusoidal wave signals input based on the PWM signal;

[0124] Step S30, sampling the sinusoidal wave signal through the analog-to-digital conversion module of the FPGA, collecting the value of the envelope diagram of the sinusoidal wave signal, and calculating the control deviation according to the value of the envelope diagram;

[0125] Step S40, removing the excitation signal from the control deviation, and using a preset CORDIC algorithm to iteratively solve the control deviation to obtain the angle of rotation of the resolver.

[0126] In this embodiment, please refer to Figure 6 , Figure 6 This is a flowchart of the resolver decoding algorithm involved in the embodiment of the resolver decoding method of the present application. The FPGA calls the array stored in the register, and sends out an 800KHz PWM wave according to the set array. After the RC conditioning circuit and the push-pull amplifier circuit, it becomes a 10KHz sine wave and is sent to the excitation coil of the resolver. After a certain transformation ratio, the resolver converts the excitation sine wave into two orthogonal sine waves, which are S1 / S3 of the SIN signal and S2 / S4 of the COS signal, respectively. The frequency is a sine wave fundamental wave of 10KHz, and the carrier frequency is equal to the resolver speed. The signal is sent to the ADC port of the FPGA, and the ADC module samples the collected sinusoidal wave signal, makes a difference, S1-S3, S2-S4, collects the value of the envelope diagram, and calculates the control deviation ε by the following formula ① (where the sin function is solved using the CORDIC algorithm):

[0127] ε=K·sinθ·sinωt×cosφ-K·cosθ·sinωt×sinφ;

[0128] =K·sin(θ-φ)·sinωt;

[0129] Then, by shifting and subtracting, the excitation signal K·sinωt is removed, and the CORDIC algorithm is used to solve the sin function to obtain formula ②: ε=sin(θ-φ);

[0130] After multiple iterations, the control deviation is small, and the gap between θ and φ is small, ε=sin(θ-φ)≈θ-φ; the result of ② is brought into the compensation circuit ω=(α·Kp+(β·Ki) / (s·T))·Kv·ε to calculate the resolver rotation angular velocity ω. The angular velocity is integrated to obtain the angle φ, where Kv, Kp, and Ki are generally adjustable, T is the integral time constant, and s is the Laplace variable; the above steps are written into a complete resolver decoding module, and the expansion of multiple resolver decoding channels is achieved by copying the module and re-calling the instantiation allocation pin method.

[0131] It should be noted that the idea of ​​the CORDIC algorithm is to make the sum of the accumulated rotation angles infinitely close to the target angle through multiple iterations and successive approximations. It is a numerical calculation approximation method, and the operations are only shifting and addition and subtraction. Because the Cordic algorithm only uses shifting and addition, it is easy to implement with pure hardware and is very suitable for FPGA implementation. The patent of this invention uses the characteristics of the CORDIC algorithm to calculate the value of sin / cos by shifting and adding inside the FPGA. The specific implementation of the algorithm combined with the code is as follows:

[0132] Module name MyCORDIC;

[0133] input[15:0]theta, / / The input angle value θ is set to 16 bits;

[0134] outputreg[15:0]sin_theta, / / output sine function θ is set to 16 bits;

[0135] outputreg[15:0]cos_theta / / output cosine function θ is set to 16 bits;

[0136] parameterKn = 'd19898; / / 0.607253*2^15, initial value of the expansion factor Kn;

[0137] parameteriKn='d53961; / / 1.64676*2^15;

[0138] Iterate 12 times and use the table lookup method to set the inverse tangent iteration parameters:

[0139] parameterarctan_0=8192; / / arctan(1 / 2);

[0140] parameterarctan_1=4836; / / arctan(1 / 2^1);

[0141] parameterarctan_2=2555; / / arctan(1 / 2^2);

[0142] parameterarctan_3=1297; / / arctan(1 / 2^3);

[0143] parameterarctan_4=651; / / arctan(1 / 2^4);

[0144] parameterarctan_5=326; / / arctan(1 / 2^5);

[0145] parameterarctan_6=163; / / arctan(1 / 2^6);

[0146] parameterarctan_7=81; / / arctan(1 / 2^7);

[0147] parameterarctan_8=41; / / arctan(1 / 2^8);

[0148] parameterarctan_9=20; / / arctan(1 / 2^9);

[0149] parameterarctan_10=10; / / arctan(1 / 2^10);

[0150] parameterarctan_11=5; / / arctan(1 / 2^11);

[0151] regsigned[15:0]x[11:0];

[0152] regsigned[15:0]y[11:0];

[0153] regsigned[15:0]z[11:0];

[0154] wire[15:0]x_tmp; / / intermediate variable;

[0155] wire[15:0]y_tmp; / / intermediate variable;

[0156] regsigned[15:0]theta_1; / / The intermediate value theta_1 is set to 16 bits;

[0157] wire[2:0]Quadrant; / / The quadrant where the theta angle is located;

[0158] / / Quadrant judgment, solve the value of theta, i.e. θ;

[0159] assignQuadrant=theta[15:14]+1;

[0160] The judgment method is as follows:

[0161] theta_1<={2'b00,theta[13:0]}; / / Assign an initial value to the variable theta_1;

[0162] If Quadrant == 1, then theta_1 <= theta;

[0163] If Quadrant == 2, then theta_1 <= 32768-theta;

[0164] If Quadrant == 3, then theta_1 <= theta-32768;

[0165] If Quadrant == 4, then theta_1 <= 65536-theta;

[0166] Initialization at power on:

[0167] x[0]<=16'd0; / / Assign initial value;

[0168] y[0]<=16'd0; / / Assign initial value;

[0169] z[0]<=16'd0; / / Assign initial value;

[0170] Initialize after reset;

[0171] x[0]<=Kn;

[0172] y[0]<=16'd0;

[0173] z[0]<=theta_1;

[0174] Initialization is required before each iteration:

[0175] x[1]<=16'd0;

[0176] y[1]<=16'd0;

[0177] z[1]<=16'd0;

[0178] Successive approximation, repeated iterative calculation:

[0179] When i=0, the calculation is as follows / / first iteration;

[0180] If z[0]

[15] = -1, then:

[0181] x[1]<=x[0]+y[0];

[0182] y[1]<=y[0]-x[0];

[0183] z[1]<=z[0]+arctan_0;

[0184] If z[0]

[15] = +1, then:

[0185] x[1]<=x[0]-y[0];

[0186] y[1]<=y[0]+x[0];

[0187] z[1]<=z[0]-arctan_0;

[0188] When i=1, the calculation is as follows / / Second iteration:

[0189] If z[1]

[15] = -1 / / the remaining angle is negative, rotate clockwise, d = -1; then:

[0190] x[2]<=x[1]+(y[1]>>>1);

[0191] y[2]<=y[1]-(x[1]>>>1);

[0192] z[2]<=z[1]+arctan_1;

[0193] If z[1]

[15] = +1, then:

[0194] x[2]<=x[1]-(y[1]>>>1);

[0195] y[2]<=y[1]+(x[1]>>>1);

[0196] z[2]<=z[1]-arctan_1;

[0197] When i=2, the calculation is as follows / / the third iteration:

[0198] If z[2]

[15] = -1, / / the remaining angle is negative, rotate clockwise, d = -1; then:

[0199] x[3]<=x[2]+(y[2]>>>2);

[0200] y[3]<=y[2]-(x[2]>>>2);

[0201] z[3]<=z[2]+arctan_2;

[0202] If z[2]

[15] = +1 / / the remaining angle is positive, rotate counterclockwise, d = +1; then:

[0203] x[3]<=x[2]-(y[2]>>>2);

[0204] y[3]<=y[2]+(x[2]>>>2);

[0205] z[3]<=z[2]-arctan_2;

[0206] When i=3, the calculation is as follows / / the fourth iteration:

[0207] If z[3]

[15] =-1, / / the remaining angle is negative, rotate clockwise, d=-1; then x[4]<=x[3]+(y[3]>>>3);

[0208] y[4]<=y[3]-(x[3]>>>3);

[0209] z[4]<=z[3]+arctan_3;

[0210] If z[3]

[15] =+1, / / the remaining angle is positive, rotate counterclockwise, d=+1; then x[4]<=x[3]-(y[3]>>>3);

[0211] y[4]<=y[3]+(x[3]>>>3);

[0212] z[4]<=z[3]-arctan_3;

[0213] When i=4, the calculation is as follows / / Fifth iteration:

[0214] If z[4]

[15] =-1, / / the remaining angle is negative, rotate clockwise, d=-1; then x[5]<=x[4]+(y[4]>>>4);

[0215] y[5]<=y[4]-(x[4]>>>4);

[0216] z[5]<=z[4]+arctan_4;

[0217] If z[4]

[15] =+1, / / the remaining angle is positive, rotate counterclockwise, d=+1; x[5]<=x[4]-(y[4]>>>4);

[0218] y[5]<=y[4]+(x[4]>>>4);

[0219] z[5]<=z[4]-arctan_4;

[0220] When i=5, the calculation is as follows / / the sixth iteration:

[0221] If z[5]

[15] =-1, / / the remaining angle is negative, rotate clockwise, d=-1; then x[6]<=x[5]+(y[5]>>>5);

[0222] y[6]<=y[5]-(x[5]>>>5);

[0223] z[6]<=z[5]+arctan_5;

[0224] If z[5]

[15] = +1, / / the remaining angle is positive, rotate counterclockwise, d = +1; x[6] <= x[5] - (y[5] >>> 5);

[0225] y[6]<=y[5]+(x[5]>>>5);

[0226] z[6]<=z[5]-arctan_5;

[0227] When i=6, the calculation is as follows / / the seventh iteration:

[0228] If z[6]

[15] =-1, / / the remaining angle is negative, rotate clockwise, d=-1; then x[7]<=x[6]+(y[6]>>>6);

[0229] y[7]<=y[6]-(x[6]>>>6);

[0230] z[7]<=z[6]+arctan_6;

[0231] If z[6]

[15] =+1, / / the remaining angle is positive, rotate counterclockwise, d=+1; then x[7]<=x[6]-(y[6]>>>6);

[0232] y[7]<=y[6]+(x[6]>>>6);

[0233] z[7]<=z[6]-arctan_6;

[0234] When i=7, the calculation is as follows / / 8th iteration:

[0235] If z[7]

[15] =-1, / / the remaining angle is negative, rotate clockwise, d=-1; then x[8]<=x[7]+(y[7]>>>7);

[0236] y[8]<=y[7]-(x[7]>>>7);

[0237] z[8]<=z[7]+arctan_7;

[0238] If z[7]

[15] =+1, / / the remaining angle is positive, rotate counterclockwise, d=+1; then x[8]<=x[7]-(y[7]>>>7);

[0239] y[8]<=y[7]+(x[7]>>>7);

[0240] z[8]<=z[7]-arctan_7;

[0241] When i=8, the calculation is as follows / / 9th iteration:

[0242] If z[8]

[15] = -1, / / the remaining angle is negative, rotate clockwise, d = -1; then:

[0243] x[9]<=x[8]+(y[8]>>>8);

[0244] y[9]<=y[8]-(x[8]>>>8);

[0245] z[9]<=z[8]+arctan_8;

[0246] If z[8]

[15] = +1, / / the remaining angle is positive, rotate counterclockwise, d = +1; then:

[0247] x[9]<=x[8]-(y[8]>>>8);

[0248] y[9]<=y[8]+(x[8]>>>8);

[0249] z[9]<=z[8]-arctan_8;

[0250] When i=9, the calculation is as follows / / the tenth iteration:

[0251] If z[9]

[15] = -1, / / the remaining angle is negative, rotate clockwise, d = -1;

[0252] Then x

[10] <=x[9]+(y[9]>>>9);

[0253] y

[10] <=y[9]-(x[9]>>>9);

[0254] z

[10] <=z[9]+arctan_9;

[0255] If z[9]

[15] =+1, / / the remaining angle is positive, rotate counterclockwise, d=+1; then x

[10] <=x[9]-(y[9]>>>9);

[0256] y

[10] <=y[9]+(x[9]>>>9);

[0257] z

[10] <=z[9]-arctan_9;

[0258] When i=10, the calculation is as follows / / 11th iteration:

[0259] If z

[10]

[15] = -1, / / the remaining angle is negative, rotate clockwise, d = -1;

[0260] Then x

[11] <=x

[10] +(y

[10] >>>10);

[0261] y

[11] <=y

[10] -(x

[10] >>>>10);

[0262] z

[11] <=z

[10] +arctan_10;

[0263] If z

[10]

[15] = +1, / / the remaining angle is positive, rotate counterclockwise, d = +1;

[0264] Then x

[11] <=x

[10] -(y

[10] >>>10);

[0265] y

[11] <=y

[10] +(x

[10] >>>>10);

[0266] z

[11] <=z

[10] -arctan_10;

[0267] Overflow judgment:

[0268] assignx_tmp=x

[11]

[15] ==1?16'h7FFF:x

[11] ;

[0269] assigny_tmp=y

[11]

[15] ==1?16'h7FFF:y

[11] ;

[0270] / / assignx_tmp=x

[11] ;

[0271] / / assigny_tmp=y

[11] ;

[0272] When i=11, the calculation is as follows / / the twelfth iteration:

[0273] Copy initialization:

[0274] sin_theta <= 16'd0;

[0275] cos_theta <= 16'd0;

[0276] Quadrant judgment:

[0277] If Quadrant == 3'd1;

[0278] Then sin_theta<=y_tmp;

[0279] cos_theta <= x_tmp;

[0280] If Quadrant == 3'd2;

[0281] Then sin_theta<=y_tmp;

[0282] cos_theta <= -x_tmp;

[0283] If Quadrant == 3'd3;

[0284] Then sin_theta <= -y_tmp;

[0285] cos_theta <= -x_tmp;

[0286] If Quadrant == 3'd4;

[0287] Then sin_theta <= -y_tmp;

[0288] cos_theta <= x_tmp;

[0289] Otherwise sin_theta <= sin_theta;

[0290] cos_theta<=cos_theta.

[0291] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0292] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0293] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0294] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A resolver decoding circuit, characterized in that: The resolver decoding circuit is connected between the FPGA and the resolver module, and includes an excitation amplification module, a sine feedback module and a cosine feedback module; The input port of the excitation amplifier circuit is connected to the PWM wave generating port of the FPGA, and the output port is connected to the resolver excitation primary side of the resolver module; The input ports of the sine feedback module and the cosine feedback module are respectively connected to the sine output port and the cosine output port of the resolver module, and the output ports of the sine feedback module and the cosine feedback module are connected to the digital-to-analog conversion port of the FPGA.

2. The resolver decoding circuit according to claim 1, wherein: The excitation amplifier module is used to amplify the signal emitted by the PWM wave transmitting port and transmit it to the resolver module; The sine feedback module and the cosine feedback module are used to process the pre-feedback signal and the cosine feedback signal of the resolver module to preset amplitudes, respectively.

3. The resolver decoding circuit according to claim 1, wherein: The excitation amplification module comprises: A first filtering unit, used for filtering out high-frequency harmonics in the PWM fundamental wave emitted by the PWM wave transmitting port, and converting the PWM fundamental wave into a sine wave; A bias signal generating unit, used for pushing the excitation signal to a bias position of 7.5V; An inversion unit, used for inverting the sine wave output by the filtering unit to form a pair of differential signals with the sine wave before inversion; A signal amplifying unit, used for amplifying the differential signal; A bias unit, used for providing a critical conduction state to correct the sine wave distortion of the amplifying circuit when the sine wave is biased by 7.5V; A current amplifying unit, used for amplifying the sinusoidal wave current; An excitation unit, used for providing a dummy load and connected in parallel with the resolver excitation primary to form a complete loop for the differential signal; The phase correction unit is used to adjust the phase difference between the excitation signal and the feedback signal.

4. The resolver decoding circuit according to claim 1, wherein: The sinusoidal feedback module includes: a first bias unit, a second filtering unit and a first voltage dividing unit; The input end of the second filtering unit is connected to the sinusoidal output port, and the output end is connected to the input end of the first voltage dividing unit; The output end of the first voltage dividing unit is connected to the digital-to-analog conversion port; The first bias unit is connected between the second filtering unit and the first voltage dividing unit.

5. The resolver decoding circuit according to claim 4, characterized in that: The first biasing unit comprises: A first pull-up resistor, wherein a first end of the first pull-up resistor is connected to an external power supply, and a second end of the first pull-up resistor is connected between the second filtering unit and the first voltage dividing unit; A first pull-down resistor, wherein a first end of the first pull-down resistor is connected between the second filtering unit and the first voltage dividing unit, and a second end of the first pull-down resistor is grounded.

6. The resolver decoding circuit according to claim 5, characterized in that: The first bias unit is used to pull the feedback signal to a bias position of 2.5V; The second filtering unit is used to filter out the clutter caused by the spin change; The first voltage dividing unit is used for voltage dividing with the resolver feedback coil of the resolver module to separate a voltage signal of a preset amplitude to be collected by the digital-to-analog conversion port.

7. The resolver decoding circuit according to claim 1, wherein: The cosine feedback module includes: a second bias unit, a third filtering unit and a second voltage dividing unit; The input end of the third filtering unit is connected to the cosine output port, and the output end is connected to the input end of the second voltage dividing unit; The output end of the second voltage dividing unit is connected to the digital-to-analog conversion port; The second bias unit is connected between the third filtering unit and the second voltage dividing unit.

8. The resolver decoding circuit according to claim 7, wherein: The second bias unit comprises: a second pull-up resistor, wherein a first end of the second pull-up resistor is connected to an external power supply, and a second end of the second pull-up resistor is connected between the third filtering unit and the second voltage dividing unit; A second pull-down resistor, wherein a first end of the second pull-down resistor is connected between the third filtering unit and the second voltage dividing unit, and a second end of the second pull-down resistor is grounded.

9. The resolver decoding circuit according to claim 8, wherein: The second bias unit is used to pull the feedback signal to a bias position of 2.5V; The third filtering unit is used to filter out the clutter caused by the spin change; The second voltage dividing unit is used to divide the voltage with the resolver feedback coil of the resolver module to separate a voltage signal of a preset amplitude to be collected by the digital-to-analog conversion port.

10. A scalable resolver decoding device, characterized in that: The scalable resolver decoding device comprises the resolver decoding circuit according to claims 1 to 9.

11. The scalable resolver decoding device according to claim 10, characterized in that: The scalable resolver decoding device further includes: A resolver module, the resolver module being connected to a first end of the resolver decoding circuit; FPGA, a first end of the FPGA is connected to the second end of the resolver decoding circuit, and the FPGA includes a plurality of resolver expansion interfaces; MCU, the MCU is connected to the second end of the FPGA.

12. A resolver decoding method, characterized in that: The resolver decoding method is applied to FPGA; the method described includes: Calling an array stored in a register in the FPGA, and transmitting a PWM signal according to the array; Two orthogonal sinusoidal wave signals are received and input based on the PWM signal; The sine wave signal is sampled by the analog-to-digital conversion module of the FPGA, the value of the envelope diagram of the sine wave signal is collected, and the control deviation is calculated according to the value of the envelope diagram; The excitation signal in the control deviation is removed, and the control deviation is iteratively solved using a preset CORDIC algorithm to obtain the angle of rotation of the resolver.