A software decoding circuit for a rotary transformer
By combining the main control chip with the signal gating circuit and the feedback signal conditioning circuit, soft decoding of the rotary transformer is realized, which solves the high cost problem caused by dedicated decoding chips and enables accurate calculation of motor parameters and cost savings.
Patent Information
- Application Number
- CN202211021121.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-24
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2042-08-24
AI Technical Summary
In the existing technology, decoding the rotary transformer using a dedicated decoding chip results in high product manufacturing costs.
The system employs a main control chip, a signal gating circuit, and a feedback signal conditioning circuit. The main control chip is connected to the primary side of the rotary transformer to provide an excitation signal. The signal gating circuit and the feedback signal conditioning circuit are used for signal processing to calculate the motor parameters and achieve soft decoding.
No dedicated decoding chip is required, the hardware circuit design is simple and inexpensive, ensuring the accuracy of motor parameter calculations and reducing production costs.
Smart Images

Figure CN115683175B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of rotary transformer technology, and more specifically to a software decoding circuit for a rotary transformer. Background Technology
[0002] Automotive motors, ships, servo motors, and drones are all driven by electric motors. During driving, there are high requirements for the angle and speed information of the motor. Resolvers are often used for motor position detection. Decoding chips specifically designed for this application, such as the PGA411 and AD2S1210, have emerged in the market. These conversion chips integrate the resolver decoding hardware and software into the chip itself. The main function of these integrated circuit chips is as follows: The chip's internal excitation signal generator has a sinusoidal digital encoding function, directly generating two differential sinusoidal excitation signals, ECX+ and ECX-, with adjustable peak values and frequencies. These differential signals are input to the primary winding of the resolver, which rotates at high speed with the motor. Based on the principle of electromagnetic coupling, differential signals Sin+ / Sin- and Cos+ / Cos-, containing position and speed information, are induced in the secondary winding. After signal processing, these differential signals are fed back to the decoding chip. The chip then uses internal arithmetic circuits and algorithms to calculate the rotor position and speed, storing this data in internal registers. Developers can obtain the rotor's position and speed information by using an MCU to read these registers according to the specified communication method and protocol. However, these specialized decoding chips are expensive, significantly increasing the production cost of various products. Summary of the Invention
[0003] Therefore, the technical problem to be solved by the present invention is to overcome the problem of high production cost caused by the high price of dedicated decoding chips in the prior art, which uses dedicated decoding chips to decode the rotary transformer to obtain the motor angle.
[0004] This invention provides a software decoding circuit for a resolver, comprising: a main control chip, a signal gating circuit, and a feedback signal conditioning circuit, wherein...
[0005] The main control chip is connected to the primary side of the rotary transformer to provide an excitation signal to the rotary transformer;
[0006] The two secondary sides of the rotary transformer are respectively connected to the two sets of input interfaces of the signal gating circuit, and the two sets of output interfaces of the signal gating circuit are respectively connected to the two sets of input interfaces of the feedback signal conditioning circuit. Each set of input interfaces consists of two input interfaces, and each set of output interfaces consists of two output interfaces.
[0007] The output terminal of the feedback signal conditioning circuit is connected to the signal acquisition terminal of the main control chip.
[0008] The main control chip is also connected to the control terminal of the signal gating circuit. By adjusting the connection relationship between the two sets of input interfaces and the two sets of output interfaces of the signal gating circuit, the different feedback signals output by the feedback signal conditioning circuit are collected to calculate the motor parameters of the target motor connected to the rotary transformer.
[0009] Optionally, the feedback signal conditioning circuit includes: two completely symmetrical conditioning sub-circuits, each conditioning sub-circuit corresponding to the output interface of a set of signal gating circuits, wherein the conditioning sub-circuit includes: a bias voltage generation circuit and an operational amplifier circuit, wherein,
[0010] The output terminal of the bias voltage generating circuit is connected to the positive input terminal of the operational amplifier circuit. The positive and negative input terminals of the operational amplifier circuit are respectively connected to the two output interfaces of one set of output interfaces of the signal gating circuit. The output terminal of the operational amplifier circuit is connected to the signal acquisition terminal of the main control chip.
[0011] Optionally, the operational amplifier circuit includes: a first operational amplifier, a common-mode inductor, a first capacitor, and a filter circuit, wherein,
[0012] The two input terminals of the common-mode inductor are respectively connected to the two output interfaces of one set of output interfaces of the signal gating circuit, and the two output terminals are respectively connected to the two input terminals of the filter circuit. The two output terminals of the filter circuit are respectively connected to the positive input terminal and the negative input terminal of the first operational amplifier, and the first capacitor is connected between the two output terminals of the filter circuit.
[0013] Optionally, the operational amplifier circuit further includes: a transient diode, a pull-up resistor, a pull-down resistor, a first resistor, and a second resistor, wherein,
[0014] The positive terminal of the transient diode is connected to two output interfaces of one set of output interfaces of the signal gating circuit, and the negative terminal is grounded.
[0015] One end of the pull-up resistor is connected to an external power supply, and the other end is connected to one input terminal of the common-mode inductor.
[0016] One end of the pull-down resistor is connected to the other input terminal of the common-mode inductor, and the other end is grounded;
[0017] The first resistor and the second resistor are connected in series between the two output terminals of the filter circuit.
[0018] Optionally, the bias voltage generating circuit includes: a second operational amplifier and a voltage divider circuit, wherein,
[0019] The positive power supply of the second operational amplifier is divided by the voltage divider circuit and then connected to the positive input terminal of the second operational amplifier. The inverting input terminal of the second operational amplifier is connected to the output terminal of the second operational amplifier and then connected to the positive input terminal of the operational amplifier circuit.
[0020] Optionally, the signal gating circuit is a multiple-input multiple-output analog switch.
[0021] Optionally, the software decoding circuit further includes: an analog switch enable signal conversion circuit, wherein the analog switch enable signal conversion circuit includes: a first controlled switch and a second controlled switch, wherein,
[0022] The control terminal of the first controlled switch is connected to the enable signal output port of the main control chip, the first output terminal is connected to a high-level signal, and the second output terminal is connected to the power supply terminal of the analog switch.
[0023] The control terminal of the second controlled switch is connected to the switch switching control signal output port of the main control chip, the first output terminal is connected to a high-level signal, and the second output terminal is connected to the switch switching control terminal of the analog switch.
[0024] Optionally, the software decoding circuit of the rotary transformer further includes:
[0025] The excitation signal generation circuit includes: a differential-to-single-ended negative feedback amplifier circuit, a gain-adjustable filter circuit, and an excitation power amplifier circuit.
[0026] The two input terminals of the differential-to-single-ended negative feedback amplifier circuit are respectively connected to the two PWM ports of the main control chip, and the output terminal is connected to the positive input terminal of the gain-adjustable filter circuit.
[0027] The output terminal of the gain-adjustable filter circuit is connected to the positive input terminal of the excitation power amplifier circuit.
[0028] The output terminal of the excitation power amplifier circuit is connected to the primary side of the rotary transformer;
[0029] The main control chip sends differential PWM wave signals through two PWM ports. After passing through the differential-to-single-ended negative feedback amplifier circuit to obtain the primary excitation sine wave, it is converted into an excitation signal by the gain-adjustable filter circuit. Then, it is amplified by the excitation power amplifier circuit to obtain the sinusoidal excitation signal of the resolver, which is input to the primary side of the resolver.
[0030] Optionally, the differential-to-single-ended negative feedback amplifier circuit includes: two symmetrical low-pass filters, a third operational amplifier, and its peripheral circuitry, wherein,
[0031] The input terminals of the two symmetrical low-pass filters are respectively connected to the two PWM ports of the main control chip, and the output terminals of the two symmetrical low-pass filters are respectively connected to the positive input terminal and the negative input terminal of the third operational amplifier.
[0032] The positive power supply terminal of the third operational amplifier is connected to an external positive power supply, and the negative power supply terminal is grounded.
[0033] The third operational amplifier and its peripheral circuits perform carrier filtering and carrier gain amplification on the differential PWM wave signals emitted from the two PWM ports to obtain the primary excitation sine wave.
[0034] Optionally, the excitation power amplifier circuit includes: a follower composed of a fourth operational amplifier, a push-pull circuit, and a DC blocking capacitor, wherein,
[0035] The positive input terminal of the fourth operational amplifier is connected to the output terminal of the gain-adjustable filter circuit, and the output terminal of the fourth operational amplifier is connected to the input terminal of the push-pull circuit.
[0036] The output terminal of the push-pull circuit is connected to one end of the DC blocking capacitor, and the other end of the DC blocking capacitor is connected to the primary side of the rotary transformer.
[0037] Optionally, the gain-adjustable filter circuit is a second-order SK-type low-pass filter with adjustable gain, consisting of a sixth operational amplifier and its peripheral circuits.
[0038] Optionally, the software decoding circuit of the rotary transformer further includes: an excitation signal sampling circuit, which includes: a fifth operational amplifier, a third resistor, a fourth resistor, a fifth resistor, and a sixth resistor, wherein,
[0039] The end of the DC blocking capacitor furthest from the rotary transformer is connected to the positive input terminal of the fifth operational amplifier through a voltage divider circuit composed of the third and fourth resistors.
[0040] The output terminal of the fifth operational amplifier is connected to the inverting input terminal of the fifth operational amplifier through a voltage divider circuit composed of the fifth resistor and the sixth resistor.
[0041] The output terminal of the fifth operational amplifier is also connected to the excitation signal sampling terminal of the main control chip;
[0042] The positive power supply terminal of the fifth operational amplifier is connected to an external positive power supply, and the negative power supply terminal is grounded.
[0043] Optionally, the main control chip is a DSP chip.
[0044] Optionally, when the excitation signal sampling terminal of the main control chip receives the excitation sampling signal, the main control chip sends different control signals to the control terminal of the signal gating circuit, so as to collect different feedback signals output by the feedback signal conditioning circuit and calculate the motor parameters of the target motor connected to the rotary transformer by adjusting the connection relationship between the two sets of input interfaces and the two sets of output interfaces of the signal gating circuit.
[0045] The technical solution of this invention has the following advantages:
[0046] The software decoding circuit for a rotary transformer provided by this invention includes: a main control chip, a signal gating circuit, and a feedback signal conditioning circuit. The main control chip is connected to the primary side of the rotary transformer to provide an excitation signal. The two secondary sides of the rotary transformer are respectively connected to two sets of input interfaces of the signal gating circuit, and the two sets of output interfaces of the signal gating circuit are respectively connected to two sets of input interfaces of the feedback signal conditioning circuit. Each set of input interfaces consists of two input interfaces, and each set of output interfaces consists of two output interfaces. The output terminal of the feedback signal conditioning circuit is connected to the signal acquisition terminal of the main control chip. The main control chip is also connected to the control terminal of the signal gating circuit. By adjusting the connectivity between the two sets of input interfaces and the two sets of output interfaces of the signal gating circuit, different feedback signals output by the feedback signal conditioning circuit are acquired, and the motor parameters of the target motor connected to the rotary transformer are calculated. By using the main control chip to logically select and transmit the differential sine and cosine signals from the resolver feedback through a signal gating circuit, the feedback signal conditioning circuit can be corrected to eliminate gain and bias errors, ensuring the accuracy of motor parameter calculations. Furthermore, the feedback signal conditioning circuit converts the differential sine and cosine signals into single-ended signals, which are then directly transmitted to the main control chip. The main control chip then performs decoding operations according to the resolver's operating principle to calculate parameters such as motor angle and speed. This method of achieving software decoding by utilizing hardware circuitry combined with the main control chip's computing power eliminates the need for a dedicated decoding chip. The hardware circuit design is simple and inexpensive, significantly reducing costs. Attached Figure Description
[0047] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0048] Figure 1 This is a schematic diagram of the software decoding circuit of the rotary transformer according to an embodiment of the present invention;
[0049] Figure 2A and Figure 2B This is a schematic diagram of the structure of two conditioning sub-circuits in an embodiment of the present invention;
[0050] Figure 3 This is a schematic diagram of the hardware circuit of the analog switch according to an embodiment of the present invention;
[0051] Figure 4 This is a block diagram of the analog switch processing logic according to an embodiment of the present invention;
[0052] Figure 5 This is a schematic diagram of the analog switch enable signal conversion circuit according to an embodiment of the present invention;
[0053] Figure 6 This is a schematic diagram of the excitation signal generation circuit according to an embodiment of the present invention;
[0054] Figure 7 This is a schematic diagram of the excitation signal sampling circuit according to an embodiment of the present invention;
[0055] Figure 8 This is a schematic diagram of the excitation signal waveform and the resolver feedback signal waveform in an embodiment of the present invention;
[0056] Figure 9 This is a diagram showing the PWM waveforms emitted by the two PWM ports of the main control chip in an embodiment of the present invention. Detailed Implementation
[0057] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0058] In the description of this invention, it should be noted that the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Unless otherwise expressly specified and limited, the terms "installed," "connected," and "linked" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can also refer to the internal connection of two components; they can refer to a wireless connection or a wired connection. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0059] In addition, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0060] First, the application object of this invention, the rotary transformer, and its working principle will be introduced.
[0061] A rotary transformer is an electromagnetic sensor, also known as a synchrotron. It is a small AC motor used for measuring angles, consisting of a stator and a rotor. The stator windings act as the primary side of the transformer, receiving the excitation voltage, while the rotor windings act as the secondary side. Using two winding coils spaced 90° apart, the excitation voltage on the primary side and the secondary side of the transformer are electromagnetically coupled to generate an induced voltage. The rotor rotates coaxially with the motor, and the angular displacement and angular velocity of the rotating shaft characterize the current state of the motor. If a sinusoidal excitation signal VR is applied to the stator, this AC energy will generate a magnetic flux through the coils. Ideally, this magnetic flux will induce voltages VS and VC on the secondary side. The angle and velocity values can then be obtained using Faraday's law of electromagnetic induction and trigonometric function theory.
[0062] Assuming the excitation signal is VR, the resolver output will generate Vs = VRsinwt and Vc = VRcoswt. Using trigonometric functions, arctan(Vs / Vc) = θ, we obtain the position angle value. To smooth the angle signal, an angle observer can be added, essentially a PID controller employing Type II closed-loop tracking. It tracks θ extracted from the envelope to obtain a feedback angle Φ. This angle is compared to the calculated angle, and the difference, Δ = θ - Φ, is the error angle. When the error angle approaches 0, the angle obtained by the software algorithm is the actual angle: sinθcosΦ - cosθsinΦ = sin(θ - Φ) ≈ θ - Φ. The calculated angle error between adjacent cycles is the acceleration; integration yields the velocity, and further integration provides the rotor shaft position information.
[0063] Based on the above-described resolver working principle, this embodiment of the invention provides a software decoding circuit for a resolver, such as... Figure 1As shown, the software decoding circuit of the rotary transformer includes: a main control chip (MCU), a signal gating circuit 1, and a feedback signal conditioning circuit 2. The main control chip (MCU) is connected to the primary side of the rotary transformer to provide an excitation signal to the rotary transformer. The two secondary sides of the rotary transformer are respectively connected to the two sets of input interfaces of the signal gating circuit 1, and the two sets of output interfaces of the signal gating circuit 1 are respectively connected to the two sets of input interfaces of the feedback signal conditioning circuit 2. Each set of input interfaces consists of two input interfaces, and each set of output interfaces consists of two output interfaces. The output terminal of the feedback signal conditioning circuit 2 is connected to the signal acquisition terminal of the main control chip (MCU). The main control chip (MCU) is also connected to the control terminal of the signal gating circuit 1. By adjusting the connection relationship between the two sets of input interfaces and the two sets of output interfaces of the signal gating circuit 1, different feedback signals output by the feedback signal conditioning circuit 2 are collected to calculate the motor parameters of the target motor connected to the rotary transformer.
[0064] The feedback signal conditioning circuit 2 includes two completely symmetrical conditioning sub-circuits, each corresponding to an output interface of a set of signal gating circuits 1. Each conditioning sub-circuit includes a bias voltage generation circuit and an operational amplifier circuit. The output of the bias voltage generation circuit is connected to the positive input of the operational amplifier circuit. The positive and negative inputs of the operational amplifier circuit are respectively connected to the two output interfaces of one set of output interfaces of the signal gating circuit 1. The output of the operational amplifier circuit is connected to the signal acquisition terminal of the main control chip MCU.
[0065] Specifically, when the MCU control signal selection circuit 1 is turned off, the bias voltage generated by the feedback signal conditioning circuit 2 is the bias voltage input to the operational amplifier circuit. Here, Vout (cos) = G(cos)*Vin(cos) + Voffset(cos), and Vout(sin) = G(sin)*Vin(sin) + Voffset(sin), where Vout(cos) and Vout(sin) are the bias voltages of the feedback signal conditioning circuit 2. The output signals Vc and Vs, Vin(cos) and Vin(sin) are the signals input to the feedback signal conditioning circuit 2 of the signal gating circuit 1. G(cos) is the gain of the feedback signal conditioning circuit 2 on the resolver output signals COS+ / COS-, G(sin) is the gain of the feedback signal conditioning circuit 2 on the resolver output signals SIN+ / SIN-, and Voffset(cos) and Voffset(sin) are the bias voltages of the operational amplifier circuit on Vs and Vc. When the first and second input interfaces of the main control chip MCU control signal gating circuit 1 are respectively connected to the first and second output interfaces, the feedback signal conditioning circuit 2 outputs the resolver signals cosine Vc and sine Vs of the resolver. When the first and second input interfaces of the MCU control signal selection circuit 1 are respectively connected to the second and first output interfaces, i.e., after the input and output interfaces are mutually exchanged and connected, the feedback signal conditioning circuit 2 outputs the resolver signals of the sine Vs and cosine Vc, thereby completing the signal processing exchange. The MCU, using the above three input signals according to the resolver working principle, can mathematically calculate the angle information θ = arctg(Vs / Vc) using the formula of the output signal of the feedback signal conditioning circuit 2. The specific calculation process of the MCU according to the resolver working principle is existing technology, and the specific calculation process of angle information is not the inventive point of this invention, and will not be elaborated here. Therefore, the above circuit structure can realize the soft decoding of the resolver output signal, and then the position angle value can be obtained by mathematical analysis using the MCU's own computing power. Furthermore, parameters such as acceleration and velocity can be calculated with reference to existing technology, thus eliminating the need for a dedicated decoding chip.
[0066] Specifically, in one embodiment, exemplarily, the two conditioning sub-circuits are divided into a COS signal conditioning circuit and a SIN signal conditioning circuit, with the specific circuit structure as follows: Figure 2A each Figure 2B As shown, the two circuits are completely symmetrical and identical. Figure 2AFor example, the above-mentioned operational amplifier circuit includes: a first operational amplifier U5, a common-mode inductor L1, a first capacitor C21, and a filter circuit (composed of C19, R25, C20, and R26 in the figure). The two input terminals of the common-mode inductor L1 are respectively connected to the two output interfaces COS+ and COS- of one set of output interfaces of the signal gating circuit 1. The two output terminals are respectively connected to the two input terminals of the filter circuit. The two output terminals of the filter circuit are respectively connected to the positive input terminal and the negative input terminal of the first operational amplifier U5. The first capacitor C21 is connected between the two output terminals of the filter circuit.
[0067] Furthermore, such as Figure 2A As shown, the operational amplifier circuit also includes: a transient diode TVS, a pull-up resistor R23, a pull-down resistor R24, a first resistor R27, and a second resistor R28. The positive terminal of the transient diode TVS is connected to the two output interfaces COS+ and COS- of one set of output interfaces of the signal gating circuit 1, and the negative terminal is grounded. One end of the pull-up resistor R23 is connected to an external power supply, and the other end is connected to one input terminal of the common-mode inductor L1. One end of the pull-down resistor R24 is connected to the other input terminal of the common-mode inductor L1, and the other end is grounded. The first resistor R27 and the second resistor R28 are connected in series between the two output terminals of the filter circuit.
[0068] Specifically, in one embodiment, such as Figure 2A As shown, the bias voltage generating circuit includes: a second operational amplifier U6 and a voltage divider circuit (composed of R32 and R33). The positive power supply of the second operational amplifier U6 is divided by the voltage divider circuit and then connected to the positive input terminal of the second operational amplifier U6. The inverting input terminal of the second operational amplifier U6 is connected to the output terminal of the second operational amplifier U6 and then connected to the positive input terminal of the operational amplifier circuit, i.e., the positive input terminal of the first operational amplifier U5.
[0069] by Figure 2ATaking the COS signal conditioning circuit shown as an example, adding pull-up and pull-down resistors R23 and R24 can detect resolver disconnections. TVS is used to handle surge voltage from the coil on the secondary side of the resolver. Common-mode inductor L1 and capacitor C21 make the signal cleaner. R25 and R26, along with C19 and C20, form a filter circuit. R27 and R28 prevent interference when the resolver is floating. C22 affects the phase. R29 and R25 determine the gain. R25 = R6, R29 = R31, C22 = C23. R30, operational amplifier U6 and its peripheral circuitry, is a voltage follower, providing bias voltage to operational amplifier U5, ensuring the resolver feedback signal conditioning circuit meets the ADC sampling range. C27 is the power supply decoupling capacitor. R32 and R33 are voltage divider resistors; the divided voltage is the required bias voltage. C26 is the output filter capacitor. The design concept of the SIN signal conditioning circuit is similar to that of the COS signal conditioning circuit, so it will not be described in detail here.
[0070] Specifically, after primary-side excitation induction, the secondary coil output of the resolver is a differential sine and cosine curve. Therefore, before the signal is input to the acquisition port of the main control chip MCU, the signal feedback from the resolver needs to be adjusted in gain and filtered. Through a differential signal to single-ended signal conversion circuit with an adjustable low-pass filter, the filter cutoff frequency is set, and the analog feedback signal that meets the sampling voltage range of the main control chip MCU is sent to the main control chip MCU for ADC conversion. The main control chip MCU performs calculation and decoding on the sampled feedback signal to obtain the angle and speed signals of the motor. The processing method is simple.
[0071] Specifically, in one embodiment, the signal gating circuit 1 is a multiple-input multiple-output analog switch. Further, the software decoding circuit also includes an analog switch enable signal conversion circuit 3. Exemplarily, Figure 3 This is a schematic diagram of the hardware circuit of the analog switch used in an embodiment of the present invention. Figure 4 The block diagram shows the analog switch processing logic. The main control chip MCU sends high and low levels through GPIO, which are then converted into analog switch enable signals by circuit 3 to control the logic state of the analog switch, thereby controlling the sampling of the resolver feedback signal.
[0072] For example, Figure 5This is a specific circuit structure diagram of the analog switch enable signal conversion circuit 3. The analog switch enable signal conversion circuit 3 includes: a first controlled switch Q1 and a second controlled switch Q2. The control terminal of the first controlled switch Q1 is connected to the enable signal output port GPIO.Switch_Ctrl of the main control chip MCU, the first output terminal is externally connected to a high-level signal, and the second output terminal is connected to the power supply terminal Switch_Ctrl of the analog switch. The control terminal of the second controlled switch Q2 is connected to the switch switching control signal output port GPIO.EN_Ctrl of the main control chip MCU, the first output terminal is externally connected to a high-level signal, and the second output terminal is connected to the switch switching control terminal EN of the analog switch.
[0073] R19 = R20, R21 = R22, are used to set the transistor to switching mode. The output signals Switch_Ctrl and EN are emitter-follow signals, and the output signals change with the input signals, manifesting as high or low levels. The enable signal EN is the main switch control signal for the analog switch, and Switch_Ctrl is the status control signal for the analog switch.
[0074] The three control methods for analog switches are as follows:
[0075] ① System bias voltage sampling mode: The main control chip (MCU) controls the analog switch to open and disconnects the resolver, sampling based on the bias voltage of the feedback signal conditioning circuit 2; ② Resolver feedback signal pairing mode: Based on the feedback signal conditioning circuit 2, the COS+ / COS- signals and SIN+ / SIN- signals are respectively passed through their respective signal conditioning circuits; ③ Resolver feedback signal exchange mode: Based on the feedback signal conditioning circuit 2, the COS+ / COS- signals and SIN+ / SIN- signals are exchanged and transmitted to the other's signal conditioning circuit. In this way, the feedback signal conditioning circuit 2 can be corrected and diagnosed, and the gain and bias errors of the COS and SIN differential signal processing circuits can be eliminated.
[0076] Specifically, the control logic of the aforementioned analog switches is divided into three steps, executed once per soft decoding cycle of the rotary transformer: ① When the EN control is low, ignoring the Switch_Ctrl control state, all analog switches are disconnected. At this time, the feedback signal conditioning circuit 2 outputs the bias voltage generated by the bias voltage generation circuit. ② When the enable signal EN is high and Switch_Ctrl is high, such as... Figure 4As shown, the analog switch's input interfaces COS+ / COS- are connected to the COS+ / COS- signals of the secondary side of the resolver, and its interface SIN+ / SIN- is connected to the SIN+ / SIN- signals of the secondary side of the resolver. At this time, the feedback signal conditioning circuit 2 outputs Vc and Vs resolver signals. ③ When the enable signal EN is high and Switch_Ctrl is low, the analog switch's input interfaces COS+ / COS- are connected to the SIN+ / SIN- signals of the secondary side of the resolver, completing one exchange between the signal input and output channels. At this time, the feedback signal conditioning circuit 2 outputs Vs and Vc resolver signals. Thus, the main control chip MCU controls the analog switch to switch between different operating states to acquire different resolver signals, providing an accurate data basis for the main control chip MCU to calculate the position angle.
[0077] This allows the differential sine and cosine signals from the resolver feedback to be transmitted via analog switches through logic selection. The resolver excitation signal is sampled in real time and error diagnosis is performed. The feedback signal conditioning circuit 2 converts the signal into a single-ended signal and transmits it directly to the ADC module of the main control chip MCU for sampling and analysis. The error diagnosis logic of the analog switches makes the resolver angle and speed information more accurate. The hardware circuit design is simple and cost-effective.
[0078] Specifically, in one embodiment, such as Figure 1 As shown, the software decoding circuit of the rotary transformer also includes: excitation signal generation circuit 4.
[0079] Specifically, such as Figure 6 As shown, the excitation signal generation circuit 4 includes: a differential-to-single-ended negative feedback amplifier circuit 101, a gain-adjustable filter circuit 102, and an excitation power amplifier circuit 103. The two input terminals of the differential-to-single-ended negative feedback amplifier circuit 101 are respectively connected to the two PWM ports of the main control chip MCU, and the output terminal is connected to the positive input terminal of the gain-adjustable filter circuit 102. The output terminal of the gain-adjustable filter circuit 102 is connected to the positive input terminal of the excitation power amplifier circuit 103. The output terminal of the excitation power amplifier circuit 103 is connected to the primary side of the rotary transformer. The main control chip MCU sends differential PWM wave signals through the two PWM ports. After passing through the differential-to-single-ended negative feedback amplifier circuit 101 to obtain a primary excitation sine wave, it is converted into an excitation excitation signal by the gain-adjustable filter circuit 102. Then, it is amplified by the excitation power amplifier circuit 103 to obtain a sinusoidal excitation signal of the rotary transformer, which is input to the primary side of the rotary transformer.
[0080] Specifically, such as Figure 6As shown, the differential-to-single-ended negative feedback amplifier circuit 101 includes: two symmetrical low-pass filters (composed of R1, C1 and R2, C2), a third operational amplifier U1 and its peripheral circuits. The input terminals of the two symmetrical low-pass filters are respectively connected to the two PWM ports of the main control chip MCU, and the output terminals of the two symmetrical low-pass filters are respectively connected to the positive input terminal and the negative input terminal of the third operational amplifier U1. The positive power supply terminal of the third operational amplifier U1 is connected to an external positive power supply, and the negative power supply terminal is grounded. The third operational amplifier U1 and its peripheral circuits perform carrier filtering and carrier gain amplification on the differential PWM wave signals emitted from the two PWM ports to obtain the primary excitation sine wave.
[0081] Specifically, such as Figure 6 As shown, the excitation power amplifier circuit 103 includes: a follower composed of a fourth operational amplifier U3, a push-pull circuit (composed of Q3, Q4 and peripheral circuits), and a DC blocking capacitor C13. The positive input terminal of the fourth operational amplifier U3 is connected to the output terminal of the gain-adjustable filter circuit 102, and the output terminal of the fourth operational amplifier U3 is connected to the input terminal of the push-pull circuit. The output terminal of the push-pull circuit is connected to one end of the DC blocking capacitor C13, and the other end of the DC blocking capacitor C13 is connected to the primary side of the rotary transformer.
[0082] Specifically, such as Figure 6 As shown, the gain-adjustable filter circuit 102 is a second-order SK-type low-pass filter with adjustable gain, consisting of the sixth operational amplifier U2 and its peripheral circuits.
[0083] For example, the specific circuit design diagram of the excitation signal generation circuit 4 described above is as follows: Figure 6 As shown. This is a closed-loop amplifier circuit that effectively removes high-frequency pulse noise from the excitation signal. The differential PWM wave passes through two symmetrical low-pass filters R1, C1 and R2, C2, where R1 = R2 and C1 = C2. The filter cutoff frequency is... Where f0 = f01, the harmonic signals of the PWM are filtered out, retaining the fundamental frequency and signals below it. This fundamental frequency is used as the excitation signal frequency of the resolver. Operational amplifier U1 and its peripheral circuits constitute a differential-to-single-ended excitation pre-stage filter negative feedback amplifier circuit, performing carrier filtering and carrier gain amplification. C3 = C5, R6 = R5, R3 = R4 ensures waveform symmetry. C4 is the VCC power supply decoupling capacitor, and GND is the system ground. Operational amplifier U2 and its peripheral circuits constitute a gain-adjustable second-order SK-type low-pass filter with a cutoff frequency of [missing information]. C9 is the power supply decoupling capacitor, and R11 and R10 form an RC filter. Operational amplifier U3 and its peripheral circuits constitute the excitation power amplifier circuit 103. Operational amplifier U3 forms a follower, and Q3 and Q4 form a push-pull circuit. The entire circuit structure is a large op-amp. Capacitor C11 is the power supply decoupling capacitor, VCC is the power supply, R15, R16, R12, and R13 are used to set the quiescent operating point of the transistors, and R14 and C12 form an RC filter. C13 filters out the DC bias in the signal, making the resolver's excitation signal a sine wave with 0V as the reference.
[0084] Specifically, the main control chip MCU generates a differential PWM signal with a duty cycle of 0-3.3V and adjustable frequency. Its carrier frequency is the excitation signal frequency, and its harmonic frequency is much higher than the excitation signal frequency. The excitation signal frequency is selected through a set of RC filter circuits, and then passed through a low-power differential amplifier circuit, so that the operational amplifier of the signal processing circuit can use a single-supply operational amplifier. By setting the filter cutoff frequency and bias voltage, the excitation signal gain is improved and the harmonic signal of the PWM is suppressed. A gain-adjustable low-pass filter circuit is used for smoothing filtering and gain amplification. A voltage follower and a class AB power amplifier circuit are used to form the excitation pre-stage power amplifier circuit to meet the drive current of the resolver, thereby reducing the requirement for the very high output current of the selected power operational amplifier. The excitation sine wave signal is output to the primary coil of the resolver. This circuit can ensure that the excitation power amplifier circuit 103 is not interfered with, maintain signal integrity and no distortion, and has cost advantages and reliability.
[0085] Specifically, in one embodiment, such as Figure 1 As shown, the software decoding circuit of the rotary transformer also includes: excitation signal sampling circuit 5.
[0086] Specifically, such as Figure 7 As shown, the excitation signal sampling circuit 5 includes: a fifth operational amplifier U4, a third resistor R17, a fourth resistor R18, a fifth resistor R15, and a sixth resistor R16. The DC blocking capacitor, from the end Vr0 furthest from the resolver, is connected to the positive input terminal of the fifth operational amplifier U4 via a voltage divider circuit formed by the third resistor R17 and the fourth resistor R18. The output terminal of the fifth operational amplifier U4 is connected to its inverting input terminal via a voltage divider circuit formed by the fifth resistor R15 and the sixth resistor R16. The output terminal of the fifth operational amplifier U4 is also connected to the excitation signal sampling terminal of the main control chip MCU. The positive power supply terminal of the fifth operational amplifier U4 is connected to an external positive power supply, and the negative power supply terminal is grounded. The excitation signal sampling circuit 5 is used to sample the excitation signal of the resolver, thereby diagnosing the resolver excitation signal. R15 = R18, and R17 = R16, and their gain can be adjusted as needed.
[0087] For example, the aforementioned main control chip MCU is a DSP chip. When the main control chip MCU receives the excitation sampling signal at the excitation signal sampling terminal, the main control chip MCU sends different control signals to the control terminal of the signal gating circuit 1, so as to adjust the connection relationship between the two sets of input interfaces and the two sets of output interfaces of the signal gating circuit 1, and calculate the motor parameters of the target motor connected to the rotary transformer by collecting different feedback signals output by the feedback signal conditioning circuit 2.
[0088] Specifically, after the DSP's ADC module controls the feedback signal conditioning circuit 2 to complete one conversion of the voltage signal, an interrupt is generated to cause the main control chip MCU to execute the resolver soft decoding algorithm. First, the conversion result of the ADC is read from the ADC result register; these values are the envelopes of the two orthogonal sine curves of the resolver feedback conditioning signal. Due to hardware errors in analog devices, such as gain, offset, and temperature drift, the signal actually acquired by the ADC has a DC deviation. By utilizing the acquired DC bias voltage and the signals from the two switched-connected channels acquired by the feedback signal conditioning circuit 2, the displacement and amplitude can be corrected to obtain a sine envelope with smaller errors. Then, by modulating the signal according to the resolver's working principle, angle and velocity values can be obtained.
[0089] Exemplarily, the software decoding circuit for the rotary transformer provided in this embodiment of the invention mainly comprises four parts: a main control chip (MCU), a differential-to-single-ended negative feedback amplifier circuit 101, a gain-adjustable filter circuit 102, an excitation power amplifier circuit 103, an excitation signal sampling circuit 5, a rotary transformer, a signal gating circuit 1, and a feedback signal conditioning circuit 2. The feedback signal conditioning circuit 2 includes processing SIN+ / SIN- and COS+ / COS- differential signals, such as... Figure 8 The image shows the excitation signal waveform and the resolver feedback signal waveform. The main working principle is that the main control chip (MCU) outputs a differential PWM wave signal with a variable duty cycle from its two PWM ports, as shown in the image. Figure 9As shown, the PWM waves with adjustable duty cycles are obtained, and after passing through the differential-to-single-ended negative feedback amplifier circuit 101, the primary excitation sine wave is obtained. This primary excitation sine wave passes through a gain-adjustable low-pass filter circuit to obtain the excitation signal that satisfies the driving excitation voltage of the resolver. However, since the operational amplifier in the processing circuit is a general-purpose operational amplifier, its driving capability is insufficient. Therefore, an excitation power amplifier circuit 103 is needed to increase the driving capability before it can be used as the sinusoidal excitation signal VR of the resolver. When the sinusoidal excitation signal VR is added to the stator of the resolver, the AC energy will generate magnetic flux through the coil. This magnetic flux will generate the aforementioned induced voltages VS and VC on the secondary side as resolver feedback signals. Through a first-stage signal gating circuit 1, the feedback resolver signal is collected in three modes to obtain the resolver signal after calibration and error diagnosis. The DSP chip performs mathematical operations on this signal using the ADC port to obtain the angle and velocity values.
[0090] By utilizing the software decoding circuit of the resolver provided in this invention, the traditional resolver decoding scheme, which replaces the internal arithmetic circuit and algorithm of the integrated circuit chip to complete rotor position and speed calculations, is replaced. This fully leverages the high data processing speed and abundant internal resources of the DSP for software decoding. A hardware design and specific circuit scheme for the resolver signal processing circuit are proposed, featuring error diagnosis and elimination functions, reducing hardware costs, and providing safety and reliability. The processing of the resolver's excitation signal and sine / cosine feedback signal is completed by the main control chip (MCU), eliminating the need for a dedicated decoding chip, reducing hardware circuit design, improving the utilization rate of the MCU, and offering cost advantages. Furthermore, it achieves reliable resolver excitation signal generation and the necessary signal processing circuitry for software decoding using a single power supply scheme.
[0091] Through the synergistic cooperation of the aforementioned components, the software decoding circuit for the resolver provided in this embodiment of the invention, by using the main control chip to logically select and transmit the differential sine and cosine signals from the resolver feedback through a signal gating circuit, can correct the feedback signal conditioning circuit to eliminate gain and bias errors, ensuring the accuracy of motor parameter calculations. Furthermore, the feedback signal conditioning circuit converts the differential sine and cosine signals into single-ended signals, which are then directly transmitted to the main control chip. This allows the main control chip to perform decoding operations according to the resolver's working principle, thereby calculating parameters such as motor angle and speed. This method of achieving software decoding by utilizing hardware circuitry combined with the computing power of the main control chip eliminates the need for a dedicated decoding chip, resulting in a simple and inexpensive hardware circuit design that significantly reduces costs.
[0092] Obviously, the above embodiments are merely examples for clarity of explanation and are not intended to limit the implementation methods. Those skilled in the art will readily appreciate that other variations or modifications based on the above descriptions are possible. It is not necessary and impossible to enumerate all implementation methods here. Obvious variations or modifications arising therefrom remain within the scope of protection of the present invention.
Claims
1. A software decoding circuit for a rotary transformer, characterized in that, include: The main control chip, signal gating circuit, and feedback signal conditioning circuit, among which, The main control chip is connected to the primary side of the rotary transformer to provide an excitation signal to the rotary transformer; The two secondary sides of the rotary transformer are respectively connected to the two sets of input interfaces of the signal gating circuit, and the two sets of output interfaces of the signal gating circuit are respectively connected to the two sets of input interfaces of the feedback signal conditioning circuit. Each set of input interfaces consists of two input interfaces, and each set of output interfaces consists of two output interfaces. The output terminal of the feedback signal conditioning circuit is connected to the signal acquisition terminal of the main control chip. The main control chip is also connected to the control terminal of the signal gating circuit. By adjusting the connection relationship between the two sets of input interfaces and the two sets of output interfaces of the signal gating circuit, the different feedback signals output by the feedback signal conditioning circuit are collected to calculate the motor parameters of the target motor connected to the rotary transformer. The feedback signal conditioning circuit includes two completely symmetrical conditioning sub-circuits, each conditioning sub-circuit corresponding to the output interface of a set of signal gating circuits. Each conditioning sub-circuit includes a bias voltage generation circuit and an operational amplifier circuit. The output terminal of the bias voltage generating circuit is connected to the positive input terminal of the operational amplifier circuit. The positive and negative input terminals of the operational amplifier circuit are respectively connected to the two output interfaces of one set of output interfaces of the signal gating circuit. The output terminal of the operational amplifier circuit is connected to the signal acquisition terminal of the main control chip. The signal gating circuit is a multi-input multi-output analog switch; The three control methods for analog switches are as follows: System bias voltage sampling mode: The main control chip controls the analog switch to open and disconnects the rotary transformer, and samples the bias voltage based on the feedback signal conditioning circuit; Rotary transformer feedback signal pairing mode: Based on the feedback signal conditioning circuit, the COS+ / COS- signals and SIN+ / SIN- signals are respectively passed through their respective signal conditioning circuits; Rotary transformer feedback signal exchange mode: Based on the feedback signal conditioning circuit, the COS+ / COS- signals and SIN+ / SIN- signals are exchanged and transmitted to the other party's signal conditioning circuit.
2. The software decoding circuit for the rotary transformer according to claim 1, characterized in that, The operational amplifier circuit includes: a first operational amplifier, a common-mode inductor, a first capacitor, and a filter circuit, wherein... The two input terminals of the common-mode inductor are respectively connected to the two output interfaces of one set of output interfaces of the signal gating circuit, and the two output terminals are respectively connected to the two input terminals of the filter circuit. The two output terminals of the filter circuit are respectively connected to the positive input terminal and the negative input terminal of the first operational amplifier, and the first capacitor is connected between the two output terminals of the filter circuit.
3. The software decoding circuit for the rotary transformer according to claim 2, characterized in that, The operational amplifier circuit further includes: a transient diode, a pull-up resistor, a pull-down resistor, a first resistor, and a second resistor, wherein... The positive terminal of the transient diode is connected to two output interfaces of one set of output interfaces of the signal gating circuit, and the negative terminal is grounded. One end of the pull-up resistor is connected to an external power supply, and the other end is connected to one input terminal of the common-mode inductor. One end of the pull-down resistor is connected to the other input terminal of the common-mode inductor, and the other end is grounded; The first resistor and the second resistor are connected in series between the two output terminals of the filter circuit.
4. The software decoding circuit for the rotary transformer according to claim 1, characterized in that, The bias voltage generating circuit includes: a second operational amplifier and a voltage divider circuit, wherein... The positive power supply of the second operational amplifier is divided by the voltage divider circuit and then connected to the positive input terminal of the second operational amplifier. The inverting input terminal of the second operational amplifier is connected to the output terminal of the second operational amplifier and then connected to the positive input terminal of the operational amplifier circuit.
5. The software decoding circuit for the rotary transformer according to claim 1, characterized in that, Also includes: An analog switch enable signal conversion circuit, comprising: a first controlled switch and a second controlled switch, wherein... The control terminal of the first controlled switch is connected to the enable signal output port of the main control chip, the first output terminal is connected to a high-level signal, and the second output terminal is connected to the power supply terminal of the analog switch. The control terminal of the second controlled switch is connected to the switch switching control signal output port of the main control chip, the first output terminal is connected to a high-level signal, and the second output terminal is connected to the switch switching control terminal of the analog switch.
6. The software decoding circuit for the rotary transformer according to any one of claims 1-5, characterized in that, Also includes: The excitation signal generation circuit includes: a differential-to-single-ended negative feedback amplifier circuit, a gain-adjustable filter circuit, and an excitation power amplifier circuit. The two input terminals of the differential-to-single-ended negative feedback amplifier circuit are respectively connected to the two PWM ports of the main control chip, and the output terminal is connected to the positive input terminal of the gain-adjustable filter circuit. The output terminal of the gain-adjustable filter circuit is connected to the positive input terminal of the excitation power amplifier circuit. The output terminal of the excitation power amplifier circuit is connected to the primary side of the rotary transformer; The main control chip sends differential PWM wave signals through two PWM ports. After passing through the differential-to-single-ended negative feedback amplifier circuit to obtain the primary excitation sine wave, it is converted into an excitation signal by the gain-adjustable filter circuit. Then, it is amplified by the excitation power amplifier circuit to obtain the sinusoidal excitation signal of the resolver, which is input to the primary side of the resolver.
7. The software decoding circuit for the rotary transformer according to claim 6, characterized in that, The differential-to-single-ended negative feedback amplifier circuit includes: two symmetrical low-pass filters, a third operational amplifier and its peripheral circuitry, wherein... The input terminals of the two symmetrical low-pass filters are respectively connected to the two PWM ports of the main control chip, and the output terminals of the two symmetrical low-pass filters are respectively connected to the positive input terminal and the negative input terminal of the third operational amplifier. The positive power supply terminal of the third operational amplifier is connected to an external positive power supply, and the negative power supply terminal is grounded. The third operational amplifier and its peripheral circuits perform carrier filtering and carrier gain amplification on the differential PWM wave signals emitted from the two PWM ports to obtain the primary excitation sine wave.
8. The software decoding circuit for the rotary transformer according to claim 6, characterized in that, The excitation power amplifier circuit includes: a follower circuit composed of a fourth operational amplifier, a push-pull circuit, and a DC blocking capacitor, wherein, The positive input terminal of the fourth operational amplifier is connected to the output terminal of the gain-adjustable filter circuit, and the output terminal of the fourth operational amplifier is connected to the input terminal of the push-pull circuit. The output terminal of the push-pull circuit is connected to one end of the DC blocking capacitor, and the other end of the DC blocking capacitor is connected to the primary side of the rotary transformer.
9. The software decoding circuit for the rotary transformer according to claim 6, characterized in that, The gain-adjustable filter circuit is a second-order SK-type low-pass filter with adjustable gain, consisting of a sixth operational amplifier and its peripheral circuits.
10. The software decoding circuit for the rotary transformer according to claim 8, characterized in that, Also includes: An excitation signal sampling circuit, comprising: a fifth operational amplifier, a third resistor, a fourth resistor, a fifth resistor, and a sixth resistor, wherein... The end of the DC blocking capacitor furthest from the rotary transformer is connected to the positive input terminal of the fifth operational amplifier through a voltage divider circuit composed of the third and fourth resistors. The output terminal of the fifth operational amplifier is connected to the inverting input terminal of the fifth operational amplifier through a voltage divider circuit composed of the fifth resistor and the sixth resistor. The output terminal of the fifth operational amplifier is also connected to the excitation signal sampling terminal of the main control chip; The positive power supply terminal of the fifth operational amplifier is connected to an external positive power supply, and the negative power supply terminal is grounded.
11. The software decoding circuit for the rotary transformer according to claim 1, characterized in that, The main control chip is a DSP chip.
12. The software decoding circuit for the rotary transformer according to claim 9, characterized in that, When the excitation signal sampling terminal of the main control chip receives the excitation sampling signal, the main control chip sends different control signals to the control terminal of the signal gating circuit. By adjusting the connection relationship between the two sets of input interfaces and the two sets of output interfaces of the signal gating circuit, the different feedback signals output by the feedback signal conditioning circuit are collected to calculate the motor parameters of the target motor connected to the rotary transformer.
Citation Information
Patent Citations
Software decoding circuit of rotary transformer
CN218156213U