Current error compensation method and device for permanent magnet synchronous motor, electric drive system and vehicle

CN122553798APending Publication Date: 2026-08-11DEEPAL AUTOMOBILE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-27
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

然而,实际应用中,电流传感器易受温度漂移、电磁干扰、元件老化等因素影响,采集的电流中容易引入增益误差和偏置误差

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122553798A_ABST
    Figure CN122553798A_ABST
Patent Text Reader

Abstract

This invention discloses a current error compensation method, device, electric drive system, and vehicle for a permanent magnet synchronous motor. The method includes: collecting three-phase stator currents and converting them into d-axis and q-axis currents. Using an electric angular velocity adaptive short-time Fourier transform, the amplitude of the first harmonic current (A1) corresponding to the bias error and the amplitude of the second harmonic current (A2) corresponding to the gain error are extracted from the q-axis current. Using an electric angular velocity adaptive second-order generalized integrator-phase-locked loop (PLL), the phases of the first and second harmonic currents in the q-axis current are extracted. The first harmonic current is reconstructed using A1, and the second harmonic current is reconstructed using A2. Error compensation is performed on the q-axis current using and / or in the current loop feedback loop. This invention improves the control accuracy and robustness of the electric drive system, and offers strong real-time performance and high compensation accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of automotive electric drive system control technology, specifically relating to a current error compensation method, device, electric drive system, and vehicle for a permanent magnet synchronous motor. Background Technology

[0002] Permanent magnet synchronous motors, with their compact structure and high power density, have become a core component of electric drive systems in new energy vehicles. As a key sensing element in the electric drive system, the sampling accuracy of the current sensor directly determines the effectiveness of vector control and the accuracy of position sensor observations. However, in practical applications, current sensors are susceptible to factors such as temperature drift, electromagnetic interference, and component aging, easily introducing gain and bias errors into the collected current. Furthermore, the frequent rapid acceleration, deceleration, and sudden load increases during the operation of new energy vehicles cause rapid fluctuations in motor speed, further exacerbating the nonlinear changes in errors, leading to torque pulsation, speed fluctuations, and even affecting the stability of positionless control.

[0003] The existing current error compensation methods for permanent magnet synchronous motors have the following problems: (1) They are not adaptable to vehicle dynamic conditions and do not consider the influence of motor speed (characterized by electric angular velocity) and sudden load on the extraction of q-axis current error; (2) They do not fully consider the influence of gain error and bias error; (3) They have complex computational resources and poor real-time performance. Summary of the Invention

[0004] In view of the shortcomings of the prior art, the purpose of this application is to provide a current error compensation method, device, electric drive system and vehicle for permanent magnet synchronous motors that are adaptable to dynamic working conditions, have strong real-time performance and high compensation accuracy, so as to improve the control accuracy and robustness of the electric drive system.

[0005] In a first aspect, this application provides a current error compensation method for a permanent magnet synchronous motor, comprising:

[0006] The three-phase stator current is collected and converted into d-axis current and q-axis current.

[0007] The amplitude of the first harmonic current A1 corresponding to the bias error and the amplitude of the second harmonic current A2 corresponding to the gain error in the q-axis current are extracted using the short-time Fourier transform adaptive to electric angular velocity.

[0008] Phase extraction of the first harmonic current phase in the q-axis current using an adaptive second-order generalized integrator-phase-locked loop based on electric angular velocity. Phase with second harmonic current .

[0009] Using the amplitude A1 of the first harmonic current and the phase of the first harmonic current Reconstructing the first harmonic current Using the amplitude A2 of the second harmonic current and the phase of the second harmonic current Reconstructing the second harmonic current .

[0010] The first harmonic current is used in the current loop feedback circuit. And / or the second harmonic current Error compensation is performed on the q-axis current.

[0011] By employing an electric angular velocity adaptive short-time Fourier transform, the amplitudes of the first and second harmonic currents corresponding to bias and gain errors within the q-axis current can be accurately extracted. This adapts to dynamic changes in motor speed, effectively avoiding harmonic extraction deviations caused by speed fluctuations and improving the accuracy of error amplitude identification. An electric angular velocity adaptive second-order generalized integrator-phase-locked loop (PLL) is used to acquire the phases of the first and second harmonic currents, possessing excellent filtering and phase tracking capabilities. It can synchronously capture the phase timing characteristics of the first and second harmonic currents in real time, avoiding phase jumps under dynamic conditions and ensuring the dynamic tracking of phase parameter extraction. Based on the identified harmonic amplitudes and phases, the original form of the current deviation is fully restored, realizing the visualization of the error components. The reconstructed first and second harmonic current components are introduced into the current loop feedback circuit for compensation, which can specifically offset bias and gain-related current errors, suppressing motor torque and speed pulsations, improving motor operational robustness, and enhancing the control accuracy and robustness of the electric drive system.

[0012] Optionally, methods for extracting the first harmonic current amplitude A1 corresponding to the bias error and the second harmonic current amplitude A2 corresponding to the gain error in the q-axis current using the adaptive short-time Fourier transform (STFT) of electric angular velocity include:

[0013] According to electric angular velocity Preset current loop control frequency Determine the length N of the Hanning window.

[0014] Based on the Hanning window length N, the Hanning window function is called to truncate the q-axis current, and the truncated signal segment is updated by sliding according to a preset step size.

[0015] The real part amplitude of the first harmonic current is obtained by analyzing each truncated signal segment using the short-time Fourier transform algorithm. Imaginary part amplitude The real part amplitude of the second harmonic current Imaginary part amplitude .

[0016] Based on the real part amplitude of the first harmonic current Imaginary part amplitude The amplitude A1 of the first harmonic current is calculated.

[0017] Based on the real part amplitude of the second harmonic current Imaginary part amplitude The amplitude of the second harmonic current A2 is calculated.

[0018] The Hanning window length is dynamically determined based on the electric angular velocity and the preset current loop control frequency, achieving adaptive matching of short-time Fourier transform parameters. This adapts to scenarios with dynamic changes in motor speed and avoids harmonic extraction distortion caused by a fixed window length. Using a Hanning window to segment and update the sampling interval of the current signal effectively suppresses spectral leakage, smooths signal edge abrupt interference, and improves the completeness of current harmonic component extraction. Segmental short-time Fourier transform operations are performed to accurately analyze the real and imaginary amplitudes of the first and second harmonic currents, fully acquiring the fundamental harmonic characteristic parameters and ensuring comprehensive acquisition of error component information. The total harmonic amplitude is synthesized through the calculation of the real and imaginary amplitudes, quantifying the harmonic intensity corresponding to bias and gain errors, achieving accurate quantitative identification of current errors. The electric angular velocity-adaptive short-time Fourier transform method for extracting harmonic amplitudes balances real-time performance and accuracy in current error extraction during dynamic motor operation.

[0019] Optionally, the length N of the Hanning window can be determined as follows:

[0020] Using the formula: The calculated window length value is obtained. .in, This represents the floor function. Indicates taking Integers.

[0021] like Then N=128; if Then make ;like Then N=2048.

[0022] The Hanning window length N is dynamically adjusted according to the electrical angular velocity. As the electrical angular velocity increases, the Hanning window length shortens to ensure real-time performance; as the electrical angular velocity decreases, the Hanning window length length length lengthens to ensure frequency resolution. The calculated window length value is dynamically verified using a formula to match real-time electrical frequency characteristics and conform to the harmonic distribution patterns at different speeds, ensuring frequency adaptability for harmonic analysis. Setting upper and lower limits for the window length from 128 to 2048 avoids the problems of insufficient spectral resolution and harmonic identification failure caused by an excessively small window length, while also preventing increased computational delay and lag in system dynamic response caused by an excessively large window length.

[0023] Optionally, the real part amplitude of the first harmonic current .

[0024] The imaginary amplitude of the first harmonic current .

[0025] The amplitude of the first harmonic current .

[0026] The real part amplitude of the second harmonic current .

[0027] The imaginary amplitude of the second harmonic current .

[0028] The amplitude of the second harmonic current .

[0029] in, This represents the q-axis current value at the nth sampling point. denoted as the Hanning window function (i.e., the Hanning window function value at the nth sampling point), and m represents the preset amplitude correction coefficient.

[0030] The discrete summation formula is used to solve for the amplitude of the real and imaginary parts of the harmonics, and the total harmonic amplitude is obtained by combining it with the modulus calculation, realizing the quantitative analytical calculation of the first and second harmonic components. The formula incorporates a Hanning window function for weighted calculation, which can suppress the spectral leakage caused by signal truncation, reduce the impact of clutter interference on the calculation results, and improve the purity of harmonic component extraction. Corresponding cosine and sine fundamental frequency components are configured for different order harmonics to accurately match the frequency characteristics of error harmonics and ensure the directional decomposition and separation of the bias and gain corresponding harmonic components. An amplitude correction coefficient is introduced to calibrate and compensate for the calculation results, offsetting the amplitude reduction caused by Hanning window truncation, and ensuring that the obtained real and imaginary part amplitudes are close to the actual situation. The harmonic amplitude is synthesized by the square root operation of the real and imaginary parts, which completely restores the actual size of the error harmonics and quantitatively characterizes the degree of current error.

[0031] Optionally, if the rate of change of the electric angular velocity is less than a preset rate of change threshold, the SOGI damping coefficient (i.e., the second-order generalized integrator damping coefficient) in the adaptive second-order generalized integrator-phase-locked loop is adjusted. .

[0032] If the rate of change of the electric angular velocity is greater than or equal to a preset rate of change threshold, then the SOGI damping coefficient (i.e., the second-order generalized integrator damping coefficient) in the adaptive second-order generalized integrator-phase-locked loop is made. .

[0033] in, This represents the preset first damping coefficient. This represents the preset second damping coefficient. .

[0034] The operating conditions are divided into ranges based on the rate of change of electrical angular velocity, and the damping coefficient of the second-order generalized integrator is switched in stages to achieve dynamic adaptive adjustment of the phase-locked loop (PLL) parameters. A larger SOGI damping coefficient results in a larger bandwidth and better dynamic response; a smaller SOGI damping coefficient results in a smaller bandwidth and better filtering effect. A smaller damping coefficient is used for low-speed, stable operating conditions, effectively enhancing filtering and noise suppression capabilities, smoothly tracking harmonic phases, and improving steady-state phase extraction accuracy. A larger damping coefficient is used for operating conditions with sudden speed changes, accelerating the system's dynamic response speed, reducing phase tracking lag, and adapting to scenarios with rapid operating condition changes.

[0035] Optional, reconstructed first harmonic current Reconstructed second harmonic current .

[0036] Based on the identified harmonic current amplitude and phase, a cosine function expression is used to reconstruct the error harmonics, accurately reproducing the waveforms of the distortion components corresponding to the internal bias and gain of the q-axis current. The reconstructed first and second harmonic currents can be directly used as compensation quantities in the current feedback loop to specifically offset the original current detection error, effectively reducing the control deviation caused by harmonic disturbances, improving the accuracy of current regulation, and enhancing the stability of motor torque output.

[0037] Optionally, the first harmonic current can be utilized in the current loop feedback circuit. And / or the second harmonic current The method for error compensation of q-axis current is as follows:

[0038] If the amplitude of the first harmonic current A1 is greater than or equal to D% of the DC value of the q-axis current, and the amplitude of the second harmonic current A2 is less than D% of the DC value of the q-axis current, then the q-axis current after error compensation... ;

[0039] If the amplitude of the second harmonic current A2 is greater than or equal to D% of the DC value of the q-axis current, and the amplitude of the first harmonic current A1 is less than D% of the DC value of the q-axis current, then the q-axis current after error compensation is... ;

[0040] If the amplitude of the first harmonic current A1 is greater than or equal to D% of the DC value of the q-axis current, and the amplitude of the second harmonic current A2 is greater than or equal to D% of the DC value of the q-axis current, then the q-axis current after error compensation... ;

[0041] Where D% represents the preset percentage threshold, This represents the q-axis current obtained by converting the three-phase stator current (before error compensation).

[0042] Based on the percentage thresholds of the first and second harmonic amplitudes relative to the DC current of the q-axis, differentiated compensation strategies are implemented at different levels to achieve precise and on-demand error compensation. For single harmonic exceeding the limit, the distorted harmonic component is deducted separately to accurately eliminate the dominant current error and avoid control disturbances caused by redundant compensation. When both types of harmonic amplitudes exceed the limit, dual compensation amounts are simultaneously superimposed to fully offset the current distortion caused by the superposition of bias and gain errors.

[0043] Secondly, this application provides a current error compensation device for a permanent magnet synchronous motor, including a controller configured to execute the aforementioned current error compensation method for a permanent magnet synchronous motor.

[0044] Thirdly, this application provides an electric drive system that includes the current error compensation device for the aforementioned permanent magnet synchronous motor.

[0045] Fourthly, this application provides a vehicle that includes the aforementioned electric drive system.

[0046] This application focuses on the vector control scenario of permanent magnet synchronous motor in electric drive system, and accurately extracts and corrects the gain error and bias error of q-axis current. It has good dynamic operating condition adaptability, strong real-time performance and high compensation accuracy. Attached Figure Description

[0047] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the embodiments of this application will be described below.

[0048] Figure 1 This is a schematic diagram of the vehicle in an embodiment of this application;

[0049] Figure 2 This is a block diagram of the electric drive system control in an embodiment of this application;

[0050] Figure 3 This is a block diagram of the second-order generalized integrator in the embodiments of this application;

[0051] Figure 4 This is a structural block diagram of a second-order generalized integrator-phase-locked loop in an embodiment of this application;

[0052] Figure 5 Flowchart of the current error compensation method for permanent magnet synchronous motor in the embodiments of this application;

[0053] Figure 6 This is a flowchart illustrating the method for extracting the amplitude of the first and second harmonic currents in the embodiments of this application. Detailed Implementation

[0054] The embodiments of this application will be described in further detail below with reference to the accompanying drawings and examples. The detailed description of the following embodiments and the accompanying drawings are used to illustrate the principles of this application by way of example, but should not be used to limit the scope of this application, that is, this application is not limited to the described embodiments.

[0055] like Figure 1 As shown, Figure 1 This is a schematic diagram of a vehicle in an embodiment of this application. The vehicle may be, but is not limited to, a pure electric vehicle (PEV / BEV), a hybrid electric vehicle (HEV), a range-extended electric vehicle (REEV), a plug-in hybrid electric vehicle (PHEV), or a new energy vehicle.

[0056] like Figure 1 As shown, the vehicle in this embodiment includes an electric drive system.

[0057] like Figure 1 , Figure 2 As shown, the electric drive system in this embodiment includes a current error compensation device for a permanent magnet synchronous motor. The current error compensation device for the permanent magnet synchronous motor includes a controller configured to execute the current error compensation method for the permanent magnet synchronous motor in this embodiment.

[0058] After the electric drive system is powered on, the functional modules integrated within the controller (MCU) initiate the initialization process: the sampling frequency of the current sampling module is configured to be 10kHz and the ADC resolution to be 16-bit; the Clark / Park transformation matrix parameters of the coordinate transformation module are set to ensure the conversion accuracy between the three-phase stator current and the αβ-axis and dq-axis currents; the minimum window length of the short-time Fourier transform (STFT) is set to 128 points and the maximum window length to 2048 points; the adjustable range of the SOGI damping coefficient in the second-order generalized integrator-phase-locked loop (SOGI-PLL) is configured to be 0.707~0.9, the PLL bandwidth to be 100Hz, and the resonant frequency tracking range to be 10Hz~1500Hz; the harmonic reconstruction and error compensation operation buffer variables are initialized, historical operation data is cleared, and all parts are in a ready state, waiting to receive input signals.

[0059] like Figure 5 As shown, the current error compensation method for the permanent magnet synchronous motor in this embodiment includes the following steps:

[0060] S1. Collect the three-phase stator current and convert it into d-axis and q-axis currents.

[0061] Three-phase current acquisition and coordinate transformation (see...) Figure 2 The three-phase stator currents i of the permanent magnet synchronous motor (A, B, and C phases) are continuously collected at a fixed frequency of 10kHz using two Hall current sensors in the current sampling module. a i b i c The acquired analog current signal is converted into a 16-bit digital signal by a differential input ADC sampling circuit, and then transmitted to the coordinate transformation module via the MCU's peripheral interface. The coordinate transformation module first calls the Clark transformation algorithm to transform the i-axis of the three-phase stationary axis system. a i b i c Current i converted into a two-phase stationary axis system α i β Subsequently, the coordinate transformation module receives the rotor electrical angle θ output in real time from the angle / speed sensor, calls the Park transformation algorithm, and transforms the αβ axis current i α i β Converted to d-axis current i of the dq rotating axis system d and q-axis current i q .

[0062] When bias error exists, the Clark / Park transformation will generate a first harmonic component in the q-axis current that matches the motor's electrical angular frequency. When gain error exists, the Clark / Park transformation will generate a second harmonic component in the q-axis current with a frequency twice that of the motor's electrical angular frequency.

[0063] S2. Use the short-time Fourier transform adaptive to electric angular velocity to extract the amplitude of the first harmonic current A1 corresponding to the bias error and the amplitude of the second harmonic current A2 corresponding to the gain error in the q-axis current.

[0064] In one possible implementation, such as Figure 6 As shown, the method for extracting the first harmonic current amplitude A1 corresponding to the bias error and the second harmonic current amplitude A2 corresponding to the gain error in the q-axis current using the short-time Fourier transform adaptive by electric angular velocity includes the following steps:

[0065] S21, based on electric angular velocity Preset current loop control frequency Determine the length N of the Hanning window.

[0066] In one possible embodiment, the length N of the Hanning window is determined as follows:

[0067] Using the formula: The calculated window length value is obtained. ;in, This represents the integer function (rounding). This indicates that the value is obtained by rounding. Integer value. Preset current loop control frequency. This is determined by the controller's PWM interrupt frequency and is a preset parameter for the system. As an example, F... s =10kHz.

[0068] like Then N=128; if Then make ;like Then N=2048.

[0069] As the electric angular velocity increases, the Hanning window length shortens to ensure real-time performance; as the electric angular velocity decreases, the Hanning window length length length length length lengths to ensure frequency resolution. The Hanning window length N is also the number of sampling points required for a single Fourier analysis. The calculated window length value is obtained based on the electric angular velocity and the preset current loop control frequency. Combined with interval threshold constraints, the Hanning window length is limited, achieving adaptive adjustment of the window length according to the motor's operating state. The adaptively limited Hanning window length effectively reduces spectral distortion and data distortion, improves the accuracy of first and second harmonic amplitude identification, lays the foundation for accurate current error extraction, and ensures stable and reliable error detection and compensation across the entire motor speed range.

[0070] S22. Based on the Hanning window length N, call the Hanning window function to truncate the q-axis current, and update the truncated signal segment by sliding it according to a preset step size. As an example, the preset step size is 1ms.

[0071] S23. Analyze each truncated signal segment using the short-time Fourier transform algorithm to obtain the real part amplitude of the first harmonic current. Imaginary part amplitude The real part amplitude of the second harmonic current Imaginary part amplitude .

[0072] In one possible embodiment, the real part amplitude of the first harmonic current The imaginary part amplitude of the first harmonic current .

[0073] In one possible embodiment, the real part amplitude of the second harmonic current The imaginary part amplitude of the second harmonic current .

[0074] Where n represents the sampling sequence number, This represents the q-axis current value at the nth sampling point. This represents the Hanning window function (i.e., the Hanning window function value at the nth sampling point), and m represents the preset amplitude correction coefficient. As an example, m=2.

[0075] S24. Real part amplitude based on first harmonic current Imaginary part amplitude The amplitude of the first harmonic current, A1, is calculated.

[0076] In one possible embodiment, the amplitude of the first harmonic current .

[0077] S25, Real Part Amplitude Based on Second Harmonic Current Imaginary part amplitude The amplitude of the second harmonic current, A2, is calculated.

[0078] In one possible embodiment, the amplitude of the second harmonic current .

[0079] The entire amplitude extraction process has strong parameter adaptability and excellent anti-interference effect, which can significantly improve the accuracy of harmonic amplitude calculation, provide accurate and reliable data support for subsequent error reconstruction and current compensation, and effectively enhance the current error correction effect of permanent magnet synchronous motor.

[0080] The phases of the first and second harmonic currents can also be extracted using the short-time Fourier transform, but the extracted phases suffer from phase jumps and cannot be used. Therefore, a second-order generalized integrator-phase-locked loop (PLL) is used to extract the phases of the first and second harmonic currents.

[0081] S3. Extract the phase of the first harmonic current in the q-axis current using a second-order generalized integrator-phase-locked loop (SOGI-PLL) with adaptive electric angular velocity. Phase with second harmonic current (See) Figure 3 , Figure 4 ).

[0082] By utilizing the bandpass characteristics and quadrature signal generation capability of a second-order generalized integrator-phase-locked loop, the phases of the first and second harmonic currents can be locked, thus avoiding phase jumps under dynamic operating conditions.

[0083] The structure of a second-order generalized integrator (SOGI) is as follows: Figure 3 As shown, the transfer functions of its two output signals are respectively , . , Where k represents the SOGI damping coefficient (i.e., the second-order generalized integrator damping coefficient). This indicates the resonant frequency of SOGI. When the extracted current is the first harmonic current, When the extracted current is a second harmonic current, The resonant frequency of SOGI varies with the electric angular velocity. And change.

[0084] D(s) has bandpass characteristics; its amplitude characteristic is 1, and its phase characteristic is 0, allowing the extraction of signals at specific frequencies. Q(s) has low-pass characteristics and can generate corresponding orthogonal signals. The SOGI bandwidth is related to the SOGI damping coefficient k: the larger k is, the larger the SOGI bandwidth and the better the dynamic response; the smaller k is, the smaller the SOGI bandwidth and the better the filtering effect.

[0085] In one possible embodiment, if the rate of change of electric angular velocity is less than a preset rate of change threshold, the SOGI damping coefficient in the adaptive second-order generalized integrator-phase-locked loop is adjusted. If the rate of change of electric angular velocity is greater than or equal to a preset rate of change threshold, then the SOGI damping coefficient in the adaptive second-order generalized integrator-phase-locked loop is adjusted. .in, This represents the preset first damping coefficient. This represents the preset second damping coefficient. As an example, the preset rate of change threshold is 5%, k1=0.707, and k2=0.9. In dynamic conditions, a larger value for k results in a larger SOGI bandwidth, enabling faster tracking of frequency changes; in steady-state conditions, a smaller value for k results in a smaller SOGI bandwidth, leading to higher accuracy in harmonic extraction. Adjusting k according to the motor's operating conditions better balances dynamic response speed and phase extraction accuracy, improving error compensation.

[0086] The dual-level damping coefficient switching mode balances steady-state anti-interference performance and dynamic following characteristics, adapting to the wide-range variable speed operation of the motor. It effectively improves the accuracy of first and second harmonic phase detection, ensures the effect of subsequent harmonic reconstruction and current compensation, reduces control deviation caused by speed fluctuations, and enhances the operational stability and adaptability of the motor control system.

[0087] SOGI separates the first and second harmonics from the q-axis current using its bandpass characteristic, generating corresponding quadrature signals. These quadrature signals are then transmitted to the PLL. The PLL performs phase detection on the quadrature signals and, through closed-loop regulation of the phase-locked loop, locks the phase of the first harmonic current. Phase with second harmonic current The block diagram of SOGI-PLL phase extraction is as follows: Figure 4 As shown.

[0088] S4. Using the amplitude A1 of the first harmonic current and the phase of the first harmonic current. Reconstructing the first harmonic current Using the amplitude A2 of the second harmonic current and the phase of the second harmonic current Reconstructing the second harmonic current .

[0089] In one possible embodiment, the reconstructed first harmonic current Reconstructed second harmonic current .

[0090] S5. Utilizing the first harmonic current in the current loop feedback circuit. and / or second harmonic current Error compensation is performed on the q-axis current.

[0091] In one possible embodiment, the first harmonic current is utilized in the current loop feedback loop. and / or second harmonic current The method for error compensation of q-axis current is as follows:

[0092] If the amplitude of the first harmonic current A1 is greater than or equal to D% of the DC value of the q-axis current, and the amplitude of the second harmonic current A2 is less than D% of the DC value of the q-axis current, then the q-axis current after error compensation will be... .

[0093] If the amplitude of the second harmonic current A2 is greater than or equal to D% of the DC value of the q-axis current, and the amplitude of the first harmonic current A1 is less than D% of the DC value of the q-axis current, then the q-axis current after error compensation... .

[0094] If the amplitude of the first harmonic current A1 is greater than or equal to D% of the DC value of the q-axis current, and the amplitude of the second harmonic current A2 is greater than or equal to D% of the DC value of the q-axis current, then the q-axis current after error compensation... .

[0095] Where D% represents the preset percentage threshold, This represents the q-axis current (before error compensation) obtained from the conversion of the three-phase stator current. For example, D% = 5%.

[0096] When the amplitude of the second harmonic current A2 is less than D% of the DC value of the q-axis current, the second harmonic has little effect on the speed and torque. To avoid overfitting the error, no compensation is performed for the second harmonic current. When the amplitude of the first harmonic current A1 is less than D% of the DC value of the q-axis current, the first harmonic has little effect on the speed and torque. To avoid overfitting the error, no compensation is performed for the first harmonic current.

[0097] The hierarchical discrimination logic is clear, distinguishing the degree of error and matching the compensation intensity accordingly, effectively suppressing current deviation caused by harmonics. The compensation calculation is simple, quickly correcting the feedback current value, reducing the negative impact of detection errors on closed-loop control, minimizing torque pulsation and speed fluctuations, and improving the current control accuracy and operational stability of the permanent magnet synchronous motor.

[0098] The aforementioned current error compensation method for permanent magnet synchronous motors can effectively reduce torque pulsation and speed fluctuation caused by current detection errors, optimize the steady-state operation quality of the motor, improve current control accuracy and system anti-disturbance capability, and ensure the smooth operation and control reliability of the permanent magnet synchronous motor across the entire speed range.

[0099] Finally, it should be noted that the application of this application is not limited to the examples above. Those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims. Those skilled in the art can understand that implementing all or part of the processes of the above embodiments and making equivalent changes according to the claims of this application still fall within the scope of this application.

Claims

1. A current error compensation method for a permanent magnet synchronous motor, characterized by, include: The three-phase stator current is collected and converted into d-axis current and q-axis current; The amplitude of the first harmonic current A1 corresponding to the bias error and the amplitude of the second harmonic current A2 corresponding to the gain error in the q-axis current are extracted by using the short-time Fourier transform adaptive to electric angular velocity. Phase extraction of the first harmonic current phase in the q-axis current using an adaptive second-order generalized integrator-phase-locked loop based on electric angular velocity. Phase with second harmonic current ; Using the amplitude A1 of the first harmonic current and the phase of the first harmonic current Reconstructing the first harmonic current Using the amplitude A2 of the second harmonic current and the phase of the second harmonic current Reconstructing the second harmonic current ; The first harmonic current is used in the current loop feedback loop. And / or the second harmonic current Error compensation is performed on the q-axis current.

2. The current error compensation method for a permanent magnet synchronous motor according to claim 1, characterized in that, The method for extracting the first harmonic current amplitude A1 corresponding to the bias error and the second harmonic current amplitude A2 corresponding to the gain error in the q-axis current using an adaptive short-time Fourier transform based on electric angular velocity includes: According to electric angular velocity Preset current loop control frequency Determine the length N of the Hanning window; Based on the Hanning window length N, the Hanning window function is called to truncate the q-axis current, and the truncated signal segment is updated by sliding according to a preset step size. The real part amplitude of the first harmonic current is obtained by analyzing each truncated signal segment using the short-time Fourier transform algorithm. Imaginary part amplitude The real part amplitude of the second harmonic current Imaginary part amplitude ; Based on the real part amplitude of the first harmonic current Imaginary part amplitude The amplitude A1 of the first harmonic current is calculated. Based on the real part amplitude of the second harmonic current Imaginary part amplitude The amplitude of the second harmonic current A2 is calculated.

3. The current error compensation method for a permanent magnet synchronous motor according to claim 2, characterized in that, The method for determining the length N of the Hanning window is as follows: Using the formula: The calculated window length value is obtained. ;in, Represents the floor function; like Then N=128; if Then make ;like Then N=2048.

4. The current error compensation method for a permanent magnet synchronous motor according to claim 2, characterized in that: The real part amplitude of the first harmonic current ; The imaginary amplitude of the first harmonic current ; The amplitude of the first harmonic current ; The real part amplitude of the second harmonic current ; The imaginary amplitude of the second harmonic current ; The amplitude of the second harmonic current ; in, This represents the q-axis current value at the nth sampling point. This represents the Hanning window function, and m represents the preset amplitude correction coefficient.

5. The current error compensation method for a permanent magnet synchronous motor according to claim 1, characterized in that: If the rate of change of the electric angular velocity is less than a preset rate of change threshold, then the SOGI damping coefficient in the adaptive second-order generalized integrator-phase-locked loop is adjusted. ; If the rate of change of the electric angular velocity is greater than or equal to a preset rate of change threshold, then the SOGI damping coefficient in the adaptive second-order generalized integrator-phase-locked loop is adjusted. ; in, This represents the preset first damping coefficient. This represents the preset second damping coefficient. .

6. The current error compensation method for a permanent magnet synchronous motor according to claim 1, characterized in that: Reconstructed first harmonic current Reconstructed second harmonic current .

7. The current error compensation method for a permanent magnet synchronous motor according to claim 1, characterized in that, The first harmonic current is used in the current loop feedback loop. And / or the second harmonic current The method for error compensation of q-axis current is as follows: If the amplitude of the first harmonic current A1 is greater than or equal to D% of the DC value of the q-axis current, and the amplitude of the second harmonic current A2 is less than D% of the DC value of the q-axis current, then the q-axis current after error compensation... ; If the amplitude of the second harmonic current A2 is greater than or equal to D% of the DC value of the q-axis current, and the amplitude of the first harmonic current A1 is less than D% of the DC value of the q-axis current, then the q-axis current after error compensation is... ; If the amplitude of the first harmonic current A1 is greater than or equal to D% of the DC value of the q-axis current, and the amplitude of the second harmonic current A2 is greater than or equal to D% of the DC value of the q-axis current, then the q-axis current after error compensation... ; Where D% represents the preset percentage threshold, This represents the q-axis current obtained by converting the three-phase stator current.

8. A current error compensation device for a permanent magnet synchronous motor, comprising a controller, characterized in that: The controller is configured to perform the current error compensation method as described in any one of claims 1 to 7.

9. An electric drive system, characterized in that: Includes the current error compensation device for the permanent magnet synchronous motor as described in claim 8.

10. A vehicle, characterized in that: Including the electric drive system as described in claim 9.