A Method and System for Suppressing Torque Fluctuations in Permanent Magnet Synchronous Motors Based on Kalman Filtering
By identifying the shaft current harmonic components of a permanent magnet synchronous motor through Kalman filtering and applying proportional control, the problem of motor torque fluctuation is solved, achieving efficient suppression and simplified gain tuning on different motor platforms.
Patent Information
- Application Number
- CN202611456300.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-18
- Publication Date
- 2026-11-17
AI Technical Summary
Torque fluctuations caused by air gap flux harmonics and inverter nonlinear characteristics in permanent magnet synchronous motors affect the user's riding experience. Existing harmonic suppression strategies involve large computational loads or are prone to introducing additional disturbances.
The Kalman filter-based method identifies shaft current and its harmonic components by establishing a state-space model, reconstructs the harmonic compensation amount, and applies proportional control to suppress torque ripple.
It reduces the dependence on the accuracy of motor parameters, simplifies the gain tuning process, effectively suppresses motor torque fluctuations, and improves the riding experience.
Smart Images

Figure CN123122374A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of motor control technology, and in particular to a method and system for suppressing torque fluctuations in permanent magnet synchronous motors based on Kalman filtering. Background Technology
[0002] Permanent magnet synchronous motors (PMSMs) are widely used in two-wheeled electric bicycles, high-speed electric motorcycles, and electric vehicles due to their high power density, high efficiency, low noise, and wide speed adjustment range. However, the presence of air gap flux harmonics (including 5th, 7th, 11th, 13th, and higher harmonics, with the 5th and 7th harmonics being the most abundant) and the nonlinear characteristics of the inverter (such as bias errors in phase current sampling causing...) The first harmonics of shaft current and torque, and the gain error of phase current sampling will cause... Due to factors such as shaft current and second harmonic of torque, the stator current of the motor contains a large number of high-order harmonic components, which distorts the waveform of the motor phase current and causes torque pulsation. Torque pulsation can cause mechanical resonance of the entire vehicle, thus affecting the user's riding experience, especially at low speeds where the resonance phenomenon is more pronounced.
[0003] Current research on torque ripple suppression in permanent magnet synchronous motors (PMSMs) focuses on two main directions. The first is the optimization of the motor's magnetic circuit and topology to improve magnetic field distribution and suppress non-ideal characteristics. The second is the optimization of motor control strategies to minimize harmonic components in the motor's phase currents. Mainstream harmonic suppression strategies include dead-zone compensation, 5th and 7th harmonic injection based on synchronous rotating coordinate transformation, repetitive control, resonant control, and complex vector control. However, dead-zone compensation only addresses harmonic currents caused by inverter dead-zone effects, and there is a risk of error in current polarity determination. 5th and 7th harmonic injection methods involve significant computational complexity, requiring the design of multiple PI controllers and demanding strong engineering experience for parameter tuning. Repetitive control and resonant control have limited ability to suppress harmonics beyond specific frequencies and are prone to introducing additional disturbances. Summary of the Invention
[0004] To address the aforementioned problems and technical requirements, the inventors have proposed a method and system for suppressing torque ripple in permanent magnet synchronous motors based on Kalman filtering, which significantly suppresses harmonic components in the three-phase current of the motor. The technical solution of this invention is as follows: In a first aspect, this application provides a method for suppressing torque ripple in a permanent magnet synchronous motor based on Kalman filtering, comprising the following steps: Obtain permanent magnet synchronous motor shaft current and shaft current; For those containing specific order harmonics shaft current and State-space models containing system noise and measurement noise are established for the shaft currents respectively. The state variables of each state-space model include the DC component of the corresponding current and the harmonic component corresponding to a specific order harmonic. Based on the state-space model, the estimated values of the state variables are obtained recursively through Kalman filtering, and the state variables are reconstructed from the estimated values. shaft current and Harmonic components in shaft current; The reconstructed harmonic components are proportionally controlled to generate harmonic compensation, which is then superimposed on the output of the current controller to suppress torque fluctuations in the permanent magnet synchronous motor.
[0005] A further technical solution is to address the issue of specific order harmonics. shaft current and The methods for establishing state-space models that include system noise and measurement noise for shaft current are the same, where establishing... Methods for state-space modeling of shaft currents include: Containing specific order harmonics shaft current and The expression for shaft current is:
[0006] in, , for shaft current and The DC component of the shaft current. , for The amplitude of the first harmonic component, , for Phase shift of the first harmonic component, The electric angular velocity of the motor; make , ,but The state-space model expression for shaft current is:
[0007] in, Here is the state transition matrix. For the observation matrix, For system noise, For measuring noise;
[0008] in, , , Each corresponds to a state , , The system noise at the previous moment.
[0009] A further technical solution involves obtaining estimates of state variables recursively through Kalman filtering based on a state-space model, including: Calculate the prior estimate covariance at the current time based on the corrected state estimate covariance from the previous time step; The Kalman gain at the current time is calculated based on the prior estimate covariance, the observation matrix of the state-space model, and the measurement noise covariance. The state estimate is corrected based on the predicted state estimate, Kalman gain, observation output, and observation matrix at the current time, to obtain the corrected state quantity estimate at the current time. Calculate the corrected state estimate covariance at the current time based on the Kalman gain, prior estimate covariance, and observation matrix.
[0010] A further technical solution is to estimate the covariance at the current moment using prior data. The recurrence relation is:
[0011] in, Estimate the covariance of the state after correction at the previous time step. This is the state transition matrix of the state-space model. Let be the system noise covariance.
[0012] The further technical solution is to obtain the corrected state quantity estimate at the current moment. The calculation expression is:
[0013] in, For the current moment, the predicted state estimate, The Kalman gain at the current moment. For the observed output of the state-space model, This is the observation matrix of the state-space model.
[0014] A further technical solution is to reconstruct the state variables based on their estimated values. shaft current and The method for detecting harmonic components in shaft current is the same, among which... Harmonic components in shaft current The reconstruction expression is:
[0015] in, The harmonic cosine components in the state quantity estimates, The harmonic sinusoidal components in the state quantity estimates, The electric angular velocity of the motor. The order of a specific harmonic.
[0016] A further technical solution is that the method also includes: The gain of proportional control includes Axis proportional gain and Axis proportional gain All are based on the stator resistance of the motor, axis / The shaft inductance and electric angular velocity are determined according to preset tuning parameters.
[0017] Its further technical solution is, and The calculation expression is:
[0018] in, For preset tuning parameters, For the stator resistance of the motor, and They are respectively Shaft inductance and Shaft inductor, The signal angular frequency for which harmonics to be suppressed is related to the electric angular velocity of the motor. satisfy , The order of a specific harmonic.
[0019] A further technical solution involves setting the values of preset tuning parameters to achieve a lower limit for the amplitude-frequency response of the harmonic current suppression closed-loop transfer function. Not less than 0.9, where:
[0020] in These are the preset tuning parameters.
[0021] Secondly, this application also provides a torque ripple suppression system for permanent magnet synchronous motors based on Kalman filtering, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method described in the first aspect.
[0022] The beneficial technical effects of this invention are: This application is based directly on harmonics containing specific orders. The discretized state-space model is derived from the shaft current expression. The state transition matrix is taken as the identity matrix, and the model information is concentrated in the time-varying observation matrix. Compared with the traditional voltage and current equation modeling based on motors, it is not necessary to know the stator resistance, inductance and back EMF constant of the motor. This reduces the dependence on the accuracy of motor parameters and makes it easier to port and apply to different motor platforms.
[0023] This application identifies harmonic characteristic parameters through Kalman filtering and reconstructs the current harmonic components. It then applies high gain proportional control to the harmonic components individually, enabling the filtering of other current noises while identifying specific order harmonics.
[0024] This application is based on the stator resistance of the motor, axis / The proportional controller gain is tuned using preset parameters based on the shaft inductance and electric angular velocity, with the lower limit of the closed-loop amplitude-frequency characteristic used as the tuning basis. This simplifies the gain tuning process while ensuring closed-loop tracking performance. The design is expected to achieve... When the value is set appropriately, the tracking error can be controlled within a small range. Attached Figure Description
[0025] Figure 1 This is a flowchart illustrating the method for suppressing torque fluctuations in a permanent magnet synchronous motor based on Kalman filtering, as provided in an embodiment of this application. Figure 2 This is provided by the embodiments of this application. Block diagram of shaft harmonic current suppression control; Figure 3 This is provided by the embodiments of this application. Block diagram for shaft harmonic current suppression control. Detailed Implementation
[0026] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings.
[0027] One embodiment of this application provides an overall process for a method to suppress torque fluctuations in a permanent magnet synchronous motor based on Kalman filtering, as follows: Figure 1 As shown, the main steps include the following: S1: Obtain the permanent magnet synchronous motor Axis current, for those containing specific order harmonics. shaft current and State-space models containing system noise and measurement noise are established for the shaft currents. The state variables of each state-space model include the DC component of the corresponding current and the harmonic component corresponding to a specific order harmonic. The state transition matrix is an identity matrix, and the observation matrix contains time-varying cosine and time-varying sine terms corresponding to the specific order harmonic.
[0028] In this embodiment, a specific order harmonic refers to a current harmonic that exhibits a specific frequency AC component in a synchronously rotating coordinate system. For example, the 5th negative sequence harmonic and the 7th positive sequence harmonic in the phase current are mapped to a coordinate system rotating at the fundamental frequency using a Park transform. After the coordinate system is established, all components exhibit an AC component with a frequency six times that of the fundamental frequency, i.e., the sixth harmonic in the synchronous rotating coordinate system.
[0029] S2: Based on the state-space model, the estimated values of the state variables are obtained recursively through Kalman filtering, and the state variables are reconstructed based on the estimated values. shaft current and Harmonic components in shaft current.
[0030] S3: Apply proportional control to the reconstructed harmonic components to generate harmonic compensation, and then superimpose this compensation onto the output of the current controller to suppress torque ripple in the permanent magnet synchronous motor. The gain of the proportional control includes... Axis proportional gain and Axis proportional gain All are based on the stator resistance of the motor, axis / The shaft inductance and electrical angular velocity are determined according to preset tuning parameters. The following is a detailed explanation of each step.
[0031] In S1, due to the presence of specific order harmonics... shaft current and The method for establishing state-space models that include system noise and measurement noise for shaft current is the same. In this embodiment, we will establish... The following is a detailed explanation using the state-space model of shaft current as an example: Assume the current in a two-phase rotating coordinate system containing the 6th harmonic. , The expression is: (1) in, , For those without harmonic components Axis current (i.e., DC component). , The amplitude of the 6th harmonic component. , This represents the phase shift of the 6th harmonic component. This is the electric angular velocity of the motor rotor.
[0032] The cosine and sine component coefficients obtained after orthogonal decomposition of the amplitude and phase of the harmonic components are used as harmonic characteristic parameters. For the 6th harmonic, if... The 6th harmonic component in the shaft current is expressed as The harmonic characteristic parameters include (cosine component coefficients) and (Sine component coefficients). In this embodiment, let: (2) in, For state vectors, The observed output is as follows, which includes system noise. and measuring noise of Expression for the state-space model of shaft current: (3) in: (4) in, Here is the state transition matrix. For the observation matrix, , , Each corresponds to a state , , The system noise at the previous moment, Indicates the current moment.
[0033] In S2, the estimated values of the state variables are obtained recursively through Kalman filtering based on the state-space model, specifically including the following: S21: Determine the system noise covariance and measurement noise covariance based on the peak phase current. System noise covariance The expression is: (5) in, This indicates the expected operation.
[0034] Since, under the same modeling error, the system error and the phase current amplitude are positively correlated (i.e., the larger the phase current amplitude, the larger the system error), we can assume that the system error... With peak phase current The relationship between them is: (6) If the system modeling error is large, the coefficient can be appropriately increased. The value of .
[0035] From equations (5) and (6), we can obtain: (7) Measurement noise covariance for: (8) The measurement error of phase current includes three categories: random error (noise floor), bias error, and gain error. Let's assume the measurement error... With peak phase current The relationship between them is: (9) If the output measurement error is large, the coefficient can be appropriately increased. The value of .
[0036] From equations (8) and (9), we can obtain: (10) In this embodiment, the system noise covariance and measurement noise covariance are determined based on the peak phase current, so that the noise covariance can be adaptively adjusted according to the motor operating conditions, which is beneficial to improving the identification accuracy of Kalman filtering under different loads and speeds.
[0037] S22: Estimate the covariance based on the corrected state from the previous time step. Calculate the prior estimate of covariance at the current time. The recursive expression is:
[0038] Substituting equations (4) and (7) into the above equation, we get: (11) Let the corrected state estimate covariance The initial value is: (12) This can be achieved using equations (11) and (12). The recursive calculation.
[0039] It should be noted that, express Time-corrected posterior estimate of covariance Indicates by The posterior estimated covariance at time 1 is further predicted. Prior estimate of covariance at each time step.
[0040] S23: Estimate the covariance based on the prior information at the current time. Observation matrix and measurement noise covariance Calculate the Kalman gain at the current time step. The expression is:
[0041] Substituting equations (4) and (10) into the above equation, we get:
[0042] in Representation matrix The line, number Column elements.
[0043] Set intermediate variables: (13) but The calculation expression can be simplified to: (14) S24: State estimation based on the current time-predicted state. Kalman gain Observation output and observation matrix The state estimate is corrected to obtain the corrected state quantity estimate at the current time. Its expression is:
[0044] Substituting equations (4) and (14) into the above equation, we get:
[0045] (15) S25: Based on the Kalman gain at the current moment Prior estimation of covariance and observation matrix Calculate the corrected state estimate covariance at the current time. Its expression is:
[0046] in, It is a third-order identity matrix with 1s on the diagonal.
[0047] Substituting equations (4) and (14) into the above equation, we get:
[0048] (16) In S2, the estimated values of the state variables are reconstructed. shaft current and The method for reconstructing harmonic components in shaft current is the same; this embodiment focuses on reconstructing... Harmonic components in shaft current Let's take an example to derive the result. By combining equations (1) and (2) and rearranging, we get: (17) in, For those without harmonic components shaft current, For the reconstructed Harmonic components of shaft current.
[0049] State quantity estimates are obtained by Kalman filtering. Then, it can be reconstructed according to equation (17). The 6th harmonic component in the shaft current Similarly, it can be reconstructed that The 6th harmonic component in the shaft current .
[0050] In S3, the harmonic current suppression control structure of this embodiment is a dual closed-loop architecture, such as... Figure 2 and Figure 3 As shown, it includes the main current loop and harmonic suppression loop. Current reference value. The input is a PI controller, and the main current loop tracks the input using the PI controller as its core. DC component of shaft current The harmonic suppression loop uses a proportional controller as its core to suppress specific order harmonics in the current. The two control voltages are superimposed by an adder and applied to the controlled object. The harmonic reconstruction module based on Kalman filtering acquires the actual current signal from the output. The DC component and harmonic components are separated in real time, with the harmonic components fed back to the input of the harmonic suppression loop to form a closed loop. Since the Kalman filter can identify specific order harmonic current components while also filtering other current noise, the gain of the proportional controller can be set higher, thereby suppressing current harmonic components to a greater extent.
[0051] In this embodiment, the gain coefficient of the proportional controller is implemented using the following parameterized design method: S31: Derivation of the mathematical model of the axis-controlled object.
[0052] Permanent magnet synchronous motor in rotor synchronous rotation coordinate system The dynamic voltage equation is as follows: (18) in, For the stator resistance of the motor, and They are respectively Shaft inductance and Shaft inductor, It is a permanent magnet flux linkage.
[0053] Ignoring the back electromotive force caused by rotational speed and neglecting The cross-coupling of shaft currents yields the simplified voltage equation: (19) Taking the Laplace transform of the above equation, we get: (20) in, is the variable for the Laplace transform.
[0054] S32: Derivation of the closed-loop transfer function for harmonic current suppression.
[0055] The high-gain proportional control law is as follows: (twenty one) Combining equations (20) and (21), the closed-loop transfer function is obtained as follows: (twenty two) S33: Analysis of the amplitude-frequency characteristics of the closed-loop transfer function.
[0056] From equation (22), its amplitude-frequency characteristic is: (twenty three) in The signal angular frequency for which harmonics to be suppressed is related to the electric angular velocity of the motor. satisfy According to the principles of automatic control, the closed-loop transfer function... , The closer it is to 1, the better the tracking effect. From equation (23), we can see that... , It is not a constant, but varies with the signal angular frequency. Constantly increasing, , It continues to decrease.
[0057] S34: Harmonic Suppression Proportional Controller Gain Coefficient , Adjustment.
[0058] In the analysis of equation (23) , The amplitude-frequency expression of the shaft closed-loop transfer function. When the condition of equation (24) is met, equation (23) can be simplified to equation (25): (twenty four) (25) For convenience , Axis gain , For dynamic calculation, a preset tuning parameter is now constructed. Calculate using the following formula: (26) Combining equations (23) and (26), and rearranging, we get: (27) in Indicates the selected parameter back, , The lower limit value.
[0059] The parameters are given in this embodiment. , , and The partial correspondence of the lower limit values is shown in Table 1: Table 1 , , and Correspondence of partial values of the lower limit
[0060] As shown in Table 1, when the parameter When the value is above 10, the closed-loop gain , It can reach above 0.9 (i.e., the lower limit of amplitude-frequency response). The tracking error is less than 0.1% (expressed as 10%), meaning it is not less than 0.9. When a certain order harmonic of the phase current is reduced to 10% of its original value (tracking error), it is sufficient for general motor control applications. In practical engineering applications, the parameters can also be adjusted according to actual needs. Adjustments may be made, but this application does not limit the scope of such adjustments.
[0061] It should be noted that this application's "not relying on an accurate motor model" refers to the state-space model establishment stage, meaning that the Kalman filter does not require parameters such as the motor's resistance, inductance, and back EMF constant when identifying harmonic characteristic parameters; while the proportional controller's gain tuning can refer to parameters of the controlled object such as the motor's stator resistance, inductance, and electric angular velocity, even if these parameters are estimated or approximate values, the tuning parameters... It can still be adjusted online according to the closed-loop performance without affecting the harmonic suppression effect.
[0062] Although the above specific embodiments only describe the identification and elimination of the 5th and 7th harmonics in the phase current (in the synchronous rotating coordinate system) The 6th harmonic of the shaft current), but for the bias error caused by the phase current sampling. The first harmonic of the shaft current and the gain error caused by phase current sampling. The second harmonic of the shaft current, as well as other current harmonics of various orders, can also be suppressed using the same method as in the specific embodiments described above. The method proposed in this application is advantageous in balancing torque fluctuations caused by multiple harmonic sources. Specifically, for Subharmonics ( (where the integer is positive), simply replace the time-varying term in the observation matrix with... and The state variables are replaced accordingly. The cosine and sine component coefficients of the subharmonics, as well as the other Kalman filter recursion, harmonic reconstruction, and proportional control steps, are the same.
[0063] Based on the same inventive concept, another embodiment of this application provides a torque ripple suppression system for permanent magnet synchronous motors based on Kalman filtering. This system includes a processor, a memory, a communication interface, a display screen, and an input device connected via a system bus. The processor provides computational and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a torque ripple suppression method for permanent magnet synchronous motors based on Kalman filtering. The specific implementation process can be referred to S1-S3 in the above specific embodiments, and will not be repeated here.
[0064] The above descriptions are merely preferred embodiments of this application, and the present invention is not limited to the above embodiments. It is understood that other improvements and variations directly derived or conceived by those skilled in the art without departing from the spirit and concept of the present invention should be considered to be included within the protection scope of the present invention.
Claims
1. A method for suppressing torque ripple in a permanent magnet synchronous motor based on Kalman filtering, characterized in that, The method includes: Obtain permanent magnet synchronous motor shaft current and shaft current; For those containing specific order harmonics shaft current and State space models containing system noise and measurement noise are established for the shaft currents respectively. The state variables of each state space model include the DC component of the corresponding current and the harmonic component corresponding to the specific order harmonic. Based on the state-space model, the estimated values of the state variables are obtained recursively through Kalman filtering, and the state variables are reconstructed based on the estimated values of the state variables. shaft current and Harmonic components in shaft current; The reconstructed harmonic components are proportionally controlled to generate harmonic compensation, and the harmonic compensation is superimposed on the output of the current controller to suppress torque fluctuations in the permanent magnet synchronous motor.
2. The method for suppressing torque ripple in a permanent magnet synchronous motor based on Kalman filtering according to claim 1, characterized in that, The above refers to the specific harmonics. shaft current and The methods for establishing state-space models that include system noise and measurement noise for shaft current are the same, where establishing... Methods for state-space modeling of shaft currents include: The one containing specific order harmonics shaft current and The expression for shaft current is: in, , for shaft current and The DC component of the shaft current. , for The amplitude of the first harmonic component, , for Phase shift of the first harmonic component, The electric angular velocity of the motor; make , Then the The state-space model expression for shaft current is: in, Here is the state transition matrix. For the observation matrix, The system noise, The measurement noise; in, , , Each corresponds to a state , , The system noise at the previous moment.
3. The method for suppressing torque ripple in a permanent magnet synchronous motor based on Kalman filtering according to claim 1, characterized in that, Based on the state-space model, the estimated values of the state variables are obtained recursively through Kalman filtering, including: Calculate the prior estimate covariance at the current time based on the corrected state estimate covariance from the previous time step; The Kalman gain at the current moment is calculated based on the prior estimate covariance at the current moment, the observation matrix of the state-space model, and the measurement noise covariance. The state estimate is corrected based on the predicted state estimate, Kalman gain, observation output, and observation matrix at the current time to obtain the corrected state quantity estimate at the current time. Calculate the corrected state estimate covariance at the current time based on the Kalman gain, prior estimate covariance, and observation matrix.
4. The method for suppressing torque ripple in a permanent magnet synchronous motor based on Kalman filtering according to claim 3, characterized in that, Prior estimate of covariance at the current moment The recurrence relation is: in, The corrected state estimate covariance from the previous time step. Let be the state transition matrix of the state-space model. Let be the system noise covariance.
5. The method for suppressing torque ripple in a permanent magnet synchronous motor based on Kalman filtering according to claim 3, characterized in that, The corrected state quantity estimate at the current time The calculation expression is: in, The state estimate predicted at the current moment. The Kalman gain at the current moment is... The observed output of the state-space model, Let be the observation matrix of the state-space model.
6. The method for suppressing torque ripple in a permanent magnet synchronous motor based on Kalman filtering according to claim 1, characterized in that, Reconstructing from the estimated values of the state variables shaft current and The method for handling harmonic components in shaft current is the same, wherein... Harmonic components in shaft current The reconstruction expression is: in, The harmonic cosine component in the state quantity estimate. The harmonic sinusoidal components in the state quantity estimates, The electric angular velocity of the motor. The order of the specific harmonic.
7. The method for suppressing torque ripple in a permanent magnet synchronous motor based on Kalman filtering according to claim 1, characterized in that, The method further includes: The gain of the proportional control includes Axis proportional gain and Axis proportional gain All are based on the motor stator resistance, axis / The shaft inductance and electric angular velocity are determined according to preset tuning parameters.
8. The method for suppressing torque ripple in a permanent magnet synchronous motor based on Kalman filtering according to claim 7, characterized in that, The and The calculation expression is: in, The preset tuning parameters are... The stator resistance of the motor. and They are respectively Shaft inductance and Shaft inductor, The signal angular frequency for which harmonics to be suppressed is related to the electric angular velocity of the motor. satisfy , The order of the specific harmonic.
9. The method for suppressing torque ripple in a permanent magnet synchronous motor based on Kalman filtering according to claim 7, characterized in that, The value of the preset tuning parameter is such that the lower limit of the amplitude-frequency characteristic of the harmonic current suppression closed-loop transfer function is achieved. Not less than 0.9, where: in The preset tuning parameters are...
10. A torque ripple suppression system for a permanent magnet synchronous motor based on Kalman filtering, comprising a memory, a processor, and a computer program stored in the memory, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 9.
