ADC calibration method and system applied to motor control
By implementing the ADC calibration method in the motor control system, including offset, gain and phase calibration, the problem of low three-phase current reconstruction accuracy in the dual-resistance current acquisition method is solved, and the motor power loss is reduced and the working efficiency is improved.
Patent Information
- Application Number
- CN202510095063.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-21
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2045-01-21
AI Technical Summary
In the dual resistance current acquisition method, due to the mismatch between the two ADC sampling channels, the accuracy of the three-phase current reconstruction is reduced, thereby increasing the power loss of the motor and reducing the working efficiency.
By introducing ADC calibration methods in the motor control system, including offset calibration, gain calibration and phase calibration, the phase difference of the three-phase control signal is adjusted using a variable delay module and an adaptive algorithm until the preset convergence conditions are reached.
It effectively improves the quality of the three-phase control signal, reduces the power loss of the motor, and improves the working efficiency of the motor.
Smart Images

Figure CN120034187A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of motor control, and in particular to an ADC calibration method and system applied to motor control. Background Art
[0002] At present, with the continuous development of new energy technology, the role of electric motors in new energy vehicles, robots, industrial control and other fields has become increasingly important, which has correspondingly increased the safety and reliability requirements of motor controllers. As a key component for detecting the phase, speed and direction of the motor, the accuracy of ADC is very important for the accuracy and sensitivity of motor control. The acquisition and reconstruction of phase current is a key technical link in the control of AC three-phase motors. Currently, the most widely used methods are the lower end single resistor, dual resistor and three resistor acquisition methods. Among them, the dual resistor current acquisition method has become the choice of many applications due to its moderate cost and complexity. In the dual resistor current acquisition method, the two-phase current is first amplified by the amplifier and then input to two ADCs for acquisition. The ADC converts the collected analog signal into a digital quantity, and then obtains the third phase current in the digital domain according to the principle that the sum of the three-phase current is 0, and the working state of the motor is regulated by the control logic.
[0003] Since the phase currents are collected by two ADCs respectively and then the third phase is reconstructed in the digital domain, there will be offset and gain errors in the signal after ADC quantization due to the mismatch between the two ADC sampling channels. At the same time, the jitter of the sampling clock will also cause the output signal phase to shift, which will reduce the accuracy of three-phase current reconstruction, thereby increasing the power loss of the motor and reducing the efficiency of the motor. Summary of the invention
[0004] The present application provides an ADC calibration method and system for motor control, which are used to improve the quality of three-phase control signals, reduce the power loss of the motor, and improve the efficiency of the motor.
[0005] In a first aspect, an embodiment of the present application provides an ADC calibration method for motor control, the method comprising: Performing offset calibration on the first-phase ADC signal and the second-phase ADC signal of the motor respectively to obtain a first calibration signal and a second calibration signal; determining a calibration gain signal based on the first calibration signal and the second calibration signal; Based on the calibration gain signal, determining a third calibration signal and a fourth calibration signal according to the first calibration signal and the second calibration signal respectively; Inputting the third calibration signal and the fourth calibration signal into the first variable delay module and the second variable delay module respectively, performing phase calibration on the third calibration signal and the fourth calibration signal according to a preset phase difference, and obtaining a first output signal and a second output signal; Determine a third output signal according to the first output signal and the second output signal, and determine a first delay value and a second delay value according to a preset adaptive algorithm, the first output signal, the second output signal and the third output signal; According to the first delay value and the second delay value, phase calibration is performed on the third calibration signal and the fourth calibration signal respectively until the phase difference between each two corresponding phases of the first output signal, the second output signal and the third output signal reaches a preset convergence condition.
[0006] In some embodiments, the ADC calibration device further includes: a first sliding average filter and a second sliding average filter, wherein the first phase ADC signal and the second phase ADC signal of the motor are respectively subjected to offset calibration to obtain the first calibration signal and the second calibration signal, including: Inputting the first phase ADC signal into the first sliding average filter to obtain a first offset signal; Subtracting the first offset signal from the first phase ADC signal to obtain the first calibration signal; Inputting the second phase ADC signal into the second sliding average filter to obtain a second offset signal; The second offset signal is subtracted from the second phase ADC signal to obtain the second calibration signal.
[0007] In some embodiments, the ADC calibration device further comprises: a first gain filter and a second gain filter, wherein the calibration gain signal is determined according to the first calibration signal and the second calibration signal; Taking absolute values of the first calibration signal and the second calibration signal respectively to obtain a first absolute value signal and a second absolute value signal; Inputting the first absolute value signal into the first gain filter to obtain a first gain signal; Inputting the second absolute value signal into the second gain filter to obtain a second gain signal; An average value of the first gain signal and the second gain signal is used as the calibration gain signal.
[0008] In some embodiments, determining a third calibration signal and a fourth calibration signal based on the calibration gain signal and according to the first calibration signal and the second calibration signal, respectively, comprises: Calculating a quotient of the calibration gain signal and the first absolute value signal to obtain a first amplitude scaling signal; Calculating the product of the first calibration signal and the first amplitude scaling signal to obtain the third calibration signal; Calculating a quotient of the calibration gain signal and the second absolute value signal to obtain a second amplitude scaling signal; The product of the second calibration signal and the first amplitude scaling signal is calculated to obtain the fourth calibration signal.
[0009] In some embodiments, the first variable delay module and the second variable delay module each include a plurality of calibration switch tubes, and the phase calibration of the third calibration signal and the fourth calibration signal is performed according to a preset phase difference to obtain a first output signal and a second output signal, including: generating an initial delay value according to the preset phase difference, and determining an initial conduction quantity according to the initial delay value; According to the initial conduction quantity, controlling the first variable delay module to turn on the corresponding calibration switch tube to convert the third calibration signal into the first output signal; According to the initial conduction quantity, the second variable delay module is controlled to turn on the corresponding calibration switch tube to convert the fourth calibration signal into the second output signal.
[0010] In some embodiments, the ADC calibration device further includes: a phase shift module and an LMS module, and the determining of the first delay value and the second delay value according to the preset adaptive algorithm, the first output signal, the second output signal and the third output signal includes: By means of the phase shift module, the first output signal, the second output signal and the third output signal are phase-aligned respectively to obtain an aligned first output signal and an aligned second output signal; Determining a first phase difference according to the aligned first output signal and the third output signal; determining a second phase difference according to the aligned second output signal and the third output signal; Based on the LMS module, the first delay value is determined according to the first phase difference and the preset adaptive algorithm, and the second delay value is determined according to the second phase difference and the preset adaptive algorithm.
[0011] In some embodiments, determining the first delay value according to the first phase difference and the preset adaptive algorithm, and determining the second delay value according to the second phase difference and the preset adaptive algorithm, includes: Set the first initial delay, iteration step size and convergence factor; Performing a phase shift on the first output signal according to the first phase difference to obtain a first output signal after the phase shift, and subtracting the third output signal from the first signal after the phase shift to obtain a first input signal; Subtracting the first input signal from the third output signal to obtain a first error amount; If the first error amount is not less than the convergence factor, it is determined that the error has not converged, and a first delay update value is determined according to the first initial delay, the iteration step size and the first error amount; The phase of the first output signal is adjusted according to the first delay update value, and the cycle is iterated until the first error amount is less than the convergence factor, the error is determined to be converged, and the first delay update value corresponding to the error convergence moment is used as the first delay value.
[0012] In a second aspect, an embodiment of the present application provides an ADC calibration system for motor control, which is used to implement an ADC calibration method for motor control as described in any one of the embodiments of the present application.
[0013] An embodiment of the present application provides an ADC calibration method for motor control, which is applied to an ADC calibration device. The ADC calibration device includes a first variable delay module and a second variable delay module. The method includes: performing offset calibration on a first-phase ADC signal and a second-phase ADC signal of the motor respectively to obtain a first calibration signal and a second calibration signal; determining a calibration gain signal according to the first calibration signal and the second calibration signal; determining a third calibration signal and a fourth calibration signal according to the first calibration signal and the second calibration signal based on the calibration gain signal; inputting the third calibration signal and the fourth calibration signal into the first variable delay module and the second variable delay module respectively, performing phase calibration on the third calibration signal and the fourth calibration signal according to a preset phase difference to obtain a first output signal and a second output signal; determining a third output signal according to the first output signal and the second output signal, and determining a first delay value and a second delay value according to a preset adaptive algorithm, the first output signal, the second output signal and the third output signal; performing phase calibration on the third calibration signal and the fourth calibration signal according to the first delay value and the second delay value respectively, until the phase difference between each two corresponding ones of the first output signal, the second output signal and the third output signal reaches a preset convergence condition. In the above method, by calibrating the offset and gain after the ADC module in the motor control system, the difference in the amplitude of the three-phase reconstructed signal of the motor system is reduced, and the phase of the three-phase control signal is calibrated again through an adaptive algorithm, thereby eliminating the phase error of the three-phase control signal during multi-channel ADC quantization, which can effectively improve the quality of the reconstructed three-phase control signal of the motor system. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.
[0015] Figure 1 A schematic flow chart of an ADC calibration method for motor control provided in an embodiment of the present application; Figure 2 A schematic diagram of an offset and gain calibration provided in an embodiment of the present application; Figure 3 A schematic diagram of a phase calibration provided in an embodiment of the present application; Figure 4 A circuit diagram of a variable delay module provided in an embodiment of the present application; Figure 5 A schematic diagram of a phase error convergence process provided by an embodiment of the present application; Figure 6 A schematic diagram of a three-phase signal reconstruction process provided in an embodiment of the present application; Figure 7 A schematic diagram of a three-phase control signal before calibration provided in an embodiment of the present application; Figure 8 A schematic diagram of a calibrated three-phase control signal provided in an embodiment of the present application. DETAILED DESCRIPTION
[0016] 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 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.
[0017] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.
[0018] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0019] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0020] ADC is the abbreviation of "Analog-to-Digital Converter". In electronic circuits, ADC is a device or circuit that converts continuously changing analog signals into discrete digital signals.
[0021] See also Figure 1 , Figure 1 FIG. 1 is a schematic flow chart of an ADC calibration method for motor control provided in an embodiment of the present application. Figure 1 The method shown is applied to an ADC calibration device, which includes a first variable delay module and a second variable delay module. Figure 1 The ADC calibration method for motor control shown in the figure specifically includes the following steps: S101-S106.
[0022] S101 , respectively performing offset calibration on a first-phase ADC signal and a second-phase ADC signal of a motor to obtain a first calibration signal and a second calibration signal.
[0023] Exemplarily, the first phase electrical signal of the three-phase electrical signal of the motor is quantized by ADC to obtain a first phase ADC signal, and the second phase electrical signal of the three-phase electrical signal of the motor is quantized by ADC to obtain a second phase ADC signal. It should be noted that the phase difference between the first phase electrical signal and the second phase electrical signal is 120°. There is an offset signal in the initial first phase ADC signal and the initial second phase ADC signal, so it is necessary to analyze the offset signal to perform offset calibration, and then obtain the first calibration signal and the second calibration signal.
[0024] S102. Determine a calibration gain signal according to the first calibration signal and the second calibration signal.
[0025] For example, according to the first calibration signal and the second calibration signal, a suitable gain value can be determined as the calibration gain of the whole system. In a simple case, the average of the two gain values can be directly taken. However, in a more complex case, it may be necessary to find a gain value that can provide good performance in the whole working range through interpolation or other mathematical methods.
[0026] S103. Based on the calibration gain signal, determine a third calibration signal and a fourth calibration signal according to the first calibration signal and the second calibration signal respectively.
[0027] Exemplarily, based on determining the calibration gain signal, gain calibration is performed on the first calibration signal and the second calibration signal to ensure that the amplitudes of the calibrated three-phase control signals are substantially consistent.
[0028] S104, input the third calibration signal and the fourth calibration signal into the first variable delay module and the second variable delay module respectively, perform phase calibration on the third calibration signal and the fourth calibration signal according to a preset phase difference, and obtain a first output signal and a second output signal.
[0029] Exemplarily, in the embodiment of the present application, due to clock jitter, the third calibration signal and the fourth calibration signal may have a phase lag. The phase calibration of the third calibration signal and the fourth calibration signal is implemented by the first variable delay module and the second variable delay module, respectively, thereby being able to perform phase calibration on the third calibration signal and the fourth calibration signal separately to improve the accuracy of calibration.
[0030] During the first calibration, the first variable delay module and the second variable delay module both perform phase calibration with reference to a preset phase difference, and in subsequent multiple calibrations, the phase difference between the first output signal and the second output signal is gradually converged according to the received delay value.
[0031] S105 . Determine a third output signal according to the first output signal and the second output signal, and determine a first delay value and a second delay value according to a preset adaptive algorithm, the first output signal, the second output signal, and the third output signal.
[0032] Exemplarily, a third output signal is synthesized based on the first output signal and the second output signal after phase calibration, and the first output signal, the second output signal and the third output signal constitute a three-phase control signal of the motor. Then, the first delay value and the second delay value are determined based on the third output signal, the first output signal and the second output signal, respectively. Then, the first delay value is used to describe the error value between the phase difference between the first output signal and the third output signal and the preset phase difference. Similarly, the second delay value is used to describe the error value between the phase difference between the second output signal and the third output signal and the preset phase difference.
[0033] Exemplarily, an embodiment of the present application provides an adaptive algorithm, through which a delay value that can be received and used by a first variable delay module and a second variable delay module is calculated, thereby continuously optimizing the phase of a three-phase control signal.
[0034] S106. Perform phase calibration on the third calibration signal and the fourth calibration signal according to the first delay value and the second delay value, respectively, until the phase difference between every two corresponding ones of the first output signal, the second output signal and the third output signal reaches a preset convergence condition.
[0035] Exemplarily, the preset phase difference is 120°, which is an ideal phase difference of a three-phase control signal. Through the present application, the phase difference between each two corresponding phases of the first output signal, the second output signal and the third output signal will gradually tend to 120°.
[0036] An embodiment of the present application provides an ADC calibration method for motor control, which is applied to an ADC calibration device. The ADC calibration device includes a first variable delay module and a second variable delay module. The method includes: performing offset calibration on a first-phase ADC signal and a second-phase ADC signal of the motor respectively to obtain a first calibration signal and a second calibration signal; determining a calibration gain signal according to the first calibration signal and the second calibration signal; determining a third calibration signal and a fourth calibration signal according to the first calibration signal and the second calibration signal based on the calibration gain signal; inputting the third calibration signal and the fourth calibration signal into the first variable delay module and the second variable delay module respectively, performing phase calibration on the third calibration signal and the fourth calibration signal according to a preset phase difference to obtain a first output signal and a second output signal; determining a third output signal according to the first output signal and the second output signal, and determining a first delay value and a second delay value according to a preset adaptive algorithm, the first output signal, the second output signal and the third output signal; performing phase calibration on the third calibration signal and the fourth calibration signal according to the first delay value and the second delay value respectively, until the phase difference between each two corresponding ones of the first output signal, the second output signal and the third output signal reaches a preset convergence condition. In the above method, by calibrating the offset and gain after the ADC module in the motor control system, the difference in the amplitude of the three-phase reconstructed signal of the motor system is reduced, and the phase of the three-phase control signal is calibrated again through an adaptive algorithm, thereby eliminating the phase error of the three-phase control signal during multi-channel ADC quantization, which can effectively improve the quality of the reconstructed three-phase control signal of the motor system.
[0037] In order to more clearly introduce the technical solution of the present application, the technical solution of the present application will be introduced through specific embodiments below. It should be noted that the specific embodiments are used to expand the technical solution of the present application, but are not intended to limit the present application.
[0038] In some embodiments, the ADC calibration device also includes: a first sliding average filter and a second sliding average filter, which perform offset calibration on the first phase ADC signal and the second phase ADC signal of the motor respectively to obtain a first calibration signal and a second calibration signal, including: inputting the first phase ADC signal into the first sliding average filter to obtain a first offset signal; subtracting the first offset signal from the first phase ADC signal to obtain a first calibration signal; inputting the second phase ADC signal into the second sliding average filter to obtain a second offset signal; subtracting the second offset signal from the second phase ADC signal to obtain a second calibration signal.
[0039] For example, see Figure 2 , Figure 2 is a schematic diagram of an offset and gain calibration provided by an embodiment of the present application. Figure 2 As shown, the first phase ADC signal (Do1) and the second phase ADC signal (Do2) are outputted respectively by the first ADC module 111 and the second ADC module 112. In the process of offset calibration, the modules of the ADC calibration device required are: the first sliding average filter 121 and the second sliding average filter 122. First, after the first phase ADC signal (Do1) and the second phase ADC signal (Do2) are inputted into the first sliding average filter 121 and the second sliding average filter 122 respectively, the first offset signal and the second offset signal are obtained, and then the first offset signal is subtracted from the first phase ADC signal (Do1) to obtain the first calibration signal (Dg1), and the second offset signal is subtracted from the second phase ADC signal (Do2) to obtain the second calibration signal (Dg2), so that the offset can be eliminated.
[0040] In some embodiments, the ADC calibration device also includes: a first gain filter and a second gain filter, determining a calibration gain signal based on the first calibration signal and the second calibration signal; taking absolute values of the first calibration signal and the second calibration signal respectively to obtain a first absolute value signal and a second absolute value signal; inputting the first absolute value signal into the first gain filter to obtain a first gain signal; inputting the second absolute value signal into the second gain filter to obtain a second gain signal; and taking the average value of the first gain signal and the second gain signal as the calibration gain signal.
[0041] like Figure 2 As shown, in the process of offset calibration, the modules of the ADC calibration device that need to be used are: the first sliding filter 131 and the second sliding filter 132. In the process of gain calibration, it is necessary to first take the absolute values of the first calibration signal (Dg1) and the second calibration signal (Dg2), and then obtain the gain information through the first sliding filter 131 and the second sliding filter 132 respectively, and take the average of the obtained first gain information (G1) and the second gain information (G2) to obtain the calibration gain signal [(G1+G2) / 2].
[0042] In some embodiments, based on the calibration gain signal, a third calibration signal and a fourth calibration signal are determined according to the first calibration signal and the second calibration signal respectively, including: calculating the quotient of the calibration gain signal and the first absolute value signal to obtain a first amplitude scaling signal; calculating the product of the first calibration signal and the first amplitude scaling signal to obtain a third calibration signal; calculating the quotient of the calibration gain signal and the second absolute value signal to obtain a second amplitude scaling signal; calculating the product of the second calibration signal and the first amplitude scaling signal to obtain a fourth calibration signal.
[0043] For example, Figure 2 As shown, the calibration gain signal [(G1+G2) / 2] is then divided by the first gain information (G1) and the second gain information (G2) to obtain the calibration gains of the first calibration signal (Dg1) and the second calibration signal (Dg2), which are the first amplitude scaling signal [(G1+G2) / 2] / G1 and the second amplitude scaling signal [(G1+G2) / 2] / G2, respectively. Finally, the first calibration signal (Dg1) and the second calibration signal (Dg2) are multiplied by the first amplitude scaling signal [(G1+G2) / 2] / G1 and the second amplitude scaling signal [(G1+G2) / 2] / G2, respectively, to scale the signal amplitudes and obtain the third calibration signal (DM1) and the fourth calibration signal (DM2). In this way, the amplitudes of the first calibration signal (Dg1) and the second calibration signal (Dg2) after gain calibration are ±(G1+G2) / 2, and the amplitude of the reconstructed third phase signal will also be ±(G1+G2) / 2.
[0044] In some embodiments, the first variable delay module and the second variable delay module both include multiple calibration switch tubes, and phase calibrate the third calibration signal and the fourth calibration signal according to a preset phase difference to obtain a first output signal and a second output signal, including: generating an initial delay value according to the preset phase difference, and determining an initial conduction number according to the initial delay value; according to the initial conduction number, controlling the first variable delay module to turn on the corresponding calibration switch tube to convert the third calibration signal into the first output signal; according to the initial conduction number, controlling the second variable delay module to turn on the corresponding calibration switch tube to convert the fourth calibration signal into the second output signal.
[0045] See also Figure 3 , Figure 3 A schematic diagram of phase calibration provided in an embodiment of the present application. Figure 3 As shown, during the phase calibration process, the modules of the ADC calibration device 100 that need to be used are: a first variable delay module 141 and a second variable delay module 142 .
[0046] Exemplarily, after offset and gain calibration, the deviation caused by clock jitter may cause phase lag in the results of the first ADC module 111 and the second ADC module 112. Therefore, it is necessary to adjust the phase of the third calibration signal (DM1) and the fourth calibration signal (DM2) to obtain the first output signal (OUT1) and the second output signal (OUT2), so as to ensure that the phase difference between the three-phase control signals is 120°.
[0047] For example, see Figure 4 , Figure 4 is a circuit diagram of a variable delay module provided in an embodiment of the present application. Figure 4 As shown, the first variable delay module (or the second variable delay module) includes: a first input switch tube Q1, a second input switch tube Q2, a first calibration switch tube td <1> , the second calibration switch tube td <2> ,, the third calibration switch tube td <3> , ..., Nth calibration switch tube td <n>, a first output switch tube Q3 and a second output switch tube Q4.
[0048] The controlled end of the first input switch tube Q1 and the controlled end of the second input switch tube Q2 are input ends of the third calibration signal (or the fourth calibration signal). The first end of the first input switch tube Q1 is connected to the first end of the first output switch tube Q3, and the second end of the first input switch tube Q1 is connected to the first end of the second input switch tube Q2. The second end of the first input switch tube Q1 is also connected to the first end of each calibration switch tube, and to the controlled end of the first output switch tube Q3 and the controlled end of the second output switch tube Q4. The second end of the first output switch tube Q3 is connected to the first end of the second output switch tube Q4, and the second end of the second output switch tube Q4 is connected to the second end of the second input switch tube Q2 and the second end of each calibration switch tube.
[0049] The control unit controls the number of calibration switches that are turned on according to the initial delay value, delays the first output signal (DM1) and the second output signal (DM2) by a corresponding time, and thus realizes the phase shift of the overall signal. The phase shift amount is controlled by the LMS algorithm module, thereby performing the initial phase calibration on the third calibration signal (DM1) and the fourth calibration signal (DM2), and obtaining the first output signal (OUT1) and the second output signal (OUT2).
[0050] In some embodiments, Figure 3 As shown, in the process of offset calibration, the modules of the ADC calibration device 100 that are also needed are: a first phase shift module 151, a second phase shift module 152, a first LMS module 161, and a second LMS module 162. According to the preset adaptive algorithm, the first output signal, the second output signal, and the third output signal, the first delay value and the second delay value are determined, including: by the phase shift module, the first output signal, the second output signal, and the third output signal are phase-aligned to obtain the aligned first output signal and the aligned second output signal; according to the aligned first output signal and the third output signal, the first phase difference is determined; according to the aligned second output signal and the third output signal, the second phase difference is determined; based on the LMS module, the first delay value is determined according to the first phase difference and the preset adaptive algorithm, and the second delay value is determined according to the second phase difference and the preset adaptive algorithm.
[0051] After phase adjustment, the first output signal (OUT1) and the second output signal (OUT2) are the signals finally input to the motor control logic. According to the principle that the sum of the three-phase signals is 0, the third output signal (OUT3) can be reconstructed. In the LMS algorithm module, the first output signal (OUT1) and the second output signal (OUT2) need to be respectively passed through the first phase shift module 151 and the second phase shift module 152, so as to align the phase with OUT3. After the phase is aligned, the first phase difference and the second phase difference are obtained by difference, which are respectively used as the input of the first LMS module 161 and the second LMS module 162. The first LMS module 161 and the second LMS module 162 generate the first delay value (td1) and the second delay value (td2) through the adaptive algorithm to adjust the phase of the third calibration signal (DM1) and the phase of the fourth calibration signal (DM2) in real time until the phase difference between any two three-phase control signals converges to a very small value.
[0052] In some embodiments, determining the first delay value according to the first phase difference and a preset adaptive algorithm, and determining the second delay value according to the second phase difference and a preset adaptive algorithm include: S201-S205.
[0053] S201. Set a first initial delay, an iteration step, and a convergence factor.
[0054] Exemplarily, the first initial delay of the first LMS algorithm module is set to td1(0), the iteration step length is u, and the convergence factor is beta.
[0055] S202 , performing a phase shift on the first output signal according to the first phase difference to obtain a phase-shifted first output signal, and subtracting the third output signal from the phase-shifted first signal to obtain a first input signal.
[0056] Exemplarily, the first phase difference is 120°, and the first output signal is OUT1(n), where n is the iteration time, n=0, 1, 2, 3... After the first output signal OUT1(n) is phase-shifted by 120°, the first output signal ∆OUT1(n) after the phase shift is obtained, and the third output signal is subtracted from the first signal after the phase shift: ∆OUT1(n)-OUT3(n)=INL1(n); Wherein, INL1(n) is the first input signal.
[0057] S203: Subtract the first input signal from the third output signal to obtain a first error amount.
[0058] Exemplarily, the calculation formula of the first error amount e1(n) is: e1(n)=OUT3(n)-INL1(n).
[0059] S204: If the first error amount is not less than the convergence factor, it is determined that the error has not converged, and a first delay update value is determined according to the first initial delay, the iteration step size, and the first error amount.
[0060] Exemplarily, if the first error value INL1(n) is greater than or equal to the convergence factor beta, the error has not converged, and the first delay update value td1[n+1] needs to be re-determined. The formula of the first delay update value is: td1[n+1]=td1[n]+u*e1[n]*INL1[n]; S205. Adjust the phase of the first output signal according to the first delay update value, iterate cyclically until the first error amount is less than the convergence factor, determine that the error converges, and use the first delay update value corresponding to the error convergence moment as the first delay value.
[0061] Exemplarily, when INL1(n+1) is less than the convergence factor beta, the first delay update value td1[n+1] corresponding to the error convergence time (n+1) is used as the first delay value.
[0062] In some other embodiments, determining the second delay value according to the second phase difference and a preset adaptive algorithm includes: S301-S305.
[0063] S301. Set a second initial delay, an iteration step, and a convergence factor.
[0064] S302 , performing a phase shift on the second output signal according to the second phase difference to obtain a phase-shifted second output signal, and subtracting the third output signal from the phase-shifted second signal to obtain a second input signal.
[0065] S303: Subtract the second input signal from the third output signal to obtain a second error amount.
[0066] S304: If the second error amount is not less than the convergence factor, it is determined that the error has not converged, and a second delay update value is determined according to the second initial delay, the iteration step size and the second error amount.
[0067] S305. Adjust the phase of the second output signal according to the second delay update value, iterate cyclically until the second error amount is less than the convergence factor, determine that the error converges, and use the second delay update value corresponding to the error convergence moment as the second delay value.
[0068] It should be noted that the process of determining the second delay value is the same as the process of determining the first delay value, which will not be repeated here.
[0069] In some embodiments, see Figure 5 , Figure 5 A schematic diagram of a phase error convergence process provided by an embodiment of the present application. Figure 5 As shown, after the phase is adjusted by the adaptive algorithm, the error of the three-phase control signal after the phase is aligned gradually converges and stabilizes to a very small value.
[0070] In some embodiments, see Figure 6 , Figure 6 A schematic diagram of a three-phase signal reconstruction process provided in an embodiment of the present application. Figure 6 As shown, the three-phase control signal under the adaptive algorithm adjustment gradually converges, and as the adaptive adjustment time increases, the amplitude of the three-phase control signal tends to a stable value.
[0071] In some embodiments, see Figure 7 , Figure 7 Schematic diagram of a three-phase control signal before calibration provided in an embodiment of the present application. Figure 7 As shown, the amplitudes of the three-phase control signals before calibration are obviously different, and the phase differences also have errors.
[0072] In some embodiments, see Figure 8 , Figure 8 A schematic diagram of a calibrated three-phase control signal provided in an embodiment of the present application. Figure 8 As shown, a section of the signal is intercepted after the adaptive algorithm converges. It can be seen that the amplitudes of the calibrated three-phase control signals are basically consistent, and the phase difference tends to 120° through measurement.
[0073] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.< / n>
Claims
1. An ADC calibration method for motor control, characterized in that: Applied to an ADC calibration device, the ADC calibration device includes a first variable delay module and a second variable delay module, and the method includes: Performing offset calibration on the first-phase ADC signal and the second-phase ADC signal of the motor respectively to obtain a first calibration signal and a second calibration signal; determining a calibration gain signal based on the first calibration signal and the second calibration signal; Based on the calibration gain signal, determining a third calibration signal and a fourth calibration signal according to the first calibration signal and the second calibration signal respectively; Inputting the third calibration signal and the fourth calibration signal into the first variable delay module and the second variable delay module respectively, performing phase calibration on the third calibration signal and the fourth calibration signal according to a preset phase difference, and obtaining a first output signal and a second output signal; Determine a third output signal according to the first output signal and the second output signal, and determine a first delay value and a second delay value according to a preset adaptive algorithm, the first output signal, the second output signal and the third output signal; According to the first delay value and the second delay value, phase calibration is performed on the third calibration signal and the fourth calibration signal respectively until the phase difference between each two corresponding phases of the first output signal, the second output signal and the third output signal reaches a preset convergence condition.
2. The ADC calibration method for motor control according to claim 1, characterized in that: The ADC calibration device further includes: a first sliding average filter and a second sliding average filter, wherein the first phase ADC signal and the second phase ADC signal of the motor are respectively subjected to offset calibration to obtain a first calibration signal and a second calibration signal, including: Inputting the first phase ADC signal into the first sliding average filter to obtain a first offset signal; Subtracting the first offset signal from the first phase ADC signal to obtain the first calibration signal; Inputting the second phase ADC signal into the second sliding average filter to obtain a second offset signal; The second offset signal is subtracted from the second phase ADC signal to obtain the second calibration signal.
3. The ADC calibration method for motor control according to claim 1, characterized in that: The ADC calibration device further comprises: a first gain filter and a second gain filter, wherein the calibration gain signal is determined according to the first calibration signal and the second calibration signal; Taking absolute values of the first calibration signal and the second calibration signal respectively to obtain a first absolute value signal and a second absolute value signal; Inputting the first absolute value signal into the first gain filter to obtain a first gain signal; Inputting the second absolute value signal into the second gain filter to obtain a second gain signal; An average value of the first gain signal and the second gain signal is used as the calibration gain signal.
4. The ADC calibration method for motor control according to claim 3, characterized in that: The determining, based on the calibration gain signal and according to the first calibration signal and the second calibration signal respectively, a third calibration signal and a fourth calibration signal comprises: Calculating a quotient of the calibration gain signal and the first absolute value signal to obtain a first amplitude scaling signal; Calculating the product of the first calibration signal and the first amplitude scaling signal to obtain the third calibration signal; Calculating a quotient of the calibration gain signal and the second absolute value signal to obtain a second amplitude scaling signal; The product of the second calibration signal and the first amplitude scaling signal is calculated to obtain the fourth calibration signal.
5. The ADC calibration method for motor control according to claim 1, characterized in that: The first variable delay module and the second variable delay module each include a plurality of calibration switch tubes, and the third calibration signal and the fourth calibration signal are phase-calibrated according to a preset phase difference to obtain a first output signal and a second output signal, including: generating an initial delay value according to the preset phase difference, and determining an initial conduction quantity according to the initial delay value; According to the initial conduction quantity, controlling the first variable delay module to turn on the corresponding calibration switch tube to convert the third calibration signal into the first output signal; According to the initial conduction quantity, the second variable delay module is controlled to turn on the corresponding calibration switch tube to convert the fourth calibration signal into the second output signal.
6. The ADC calibration method for motor control according to claim 1, characterized in that: The ADC calibration device further includes: a phase shift module and an LMS module, wherein the first delay value and the second delay value are determined according to a preset adaptive algorithm, the first output signal, the second output signal and the third output signal, including: By means of the phase shift module, the first output signal, the second output signal and the third output signal are phase-aligned respectively to obtain an aligned first output signal and an aligned second output signal; Determining a first phase difference according to the aligned first output signal and the third output signal; determining a second phase difference according to the aligned second output signal and the third output signal; Based on the LMS module, the first delay value is determined according to the first phase difference and the preset adaptive algorithm, and the second delay value is determined according to the second phase difference and the preset adaptive algorithm.
7. The ADC calibration method for motor control according to claim 6, characterized in that: The determining the first delay value according to the first phase difference and the preset adaptive algorithm includes: Set the first initial delay, iteration step size and convergence factor; Performing a phase shift on the first output signal according to the first phase difference to obtain a first output signal after the phase shift, and subtracting the third output signal from the first signal after the phase shift to obtain a first input signal; Subtracting the first input signal from the third output signal to obtain a first error amount; If the first error amount is not less than the convergence factor, it is determined that the error has not converged, and a first delay update value is determined according to the first initial delay, the iteration step size and the first error amount; The phase of the first output signal is adjusted according to the first delay update value, and the cycle is iterated until the first error amount is smaller than the convergence factor, the error is determined to be converged, and the first delay update value corresponding to the error convergence moment is used as the first delay value.
8. An ADC calibration system for motor control, characterized in that: Used to implement the ADC calibration method for motor control as described in any one of claims 1 to 7.
Citation Information
Patent Citations
TIADC system calibration method based on digital-analog mixed signal
CN108471313A
Two-step inter-stage gain error calibration method and device for Piped SAR ADC (Synthetic Aperture Radar Analog to Digital Converter)
CN118573191A
Apparatus for determining calibration values of an ADC
US20190379387A1
Method and device for determining a motor position
WO2016004927A1