Cogging torque compensation method
By calculating the 8th and 12th order harmonic torque and phase data of the motor for compensation, the jitter and noise problems during motor steering are solved, and the smoothness of vehicle steering and customer experience are improved.
Patent Information
- Application Number
- CN202510334563.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-20
- Publication Date
- 2025-07-01
AI Technical Summary
In the prior art, the cogging torque of the motor causes jitter and noise problems during steering of the real vehicle, affecting the driving experience of the end customer.
By calculating the 8th and 12th order harmonic torque and phase data of the motor, the compensation is performed using an algorithm, and the compensation torque value is generated and converted into a digital signal, and written to the motor controller superimposed on the output value to reduce jitter and noise.
It effectively alleviates the jitter and noise of the steering wheel on the real car, and improves the smoothness of the vehicle's steering and customer experience.
Smart Images

Figure CN120238010A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of automotive motors, and in particular relates to a method for compensating cogging torque. Background Art
[0002] During the rotation of the motor, the torque is not constant and there is a fluctuation phenomenon, which is called torque ripple. When there is a lot of torque ripple, it will cause obstacles to smooth rotation. There are many reasons for torque ripple. The jitter generated by the interaction between the tooth-slot structure of the iron core and the permanent magnet is called cogging torque. It belongs to the rattling phenomenon during gear meshing rotation. The main reason for the cogging effect is the change in the magnetic field caused by the stator slotting. When the motor is running, the slots of the stator will change the distribution of the magnetic field, resulting in a periodic resistance on the rotor during rotation, thereby generating vibration and noise. This periodic resistance is called cogging torque. This kind of jitter on the actual vehicle, combined with the amplification of the steering column, will be directly felt in the experience of the end-user driver. The jitter / noise during steering results in a poor customer experience.
[0003] It has been repeatedly verified in actual vehicle tests that torque ripple at the 8th and 12th orders has a great impact on the jitter of the whole vehicle. In order to minimize the bad experience brought by cogging to the noise and jitter of the actual vehicle to the end-user. Compensating for the angles at the 8th and 12th orders while the motor is rotating, so that each tooth-slot alternation can pass more smoothly after obtaining effective angle compensation, thereby reducing the generation of jitter and noise is an important technical problem to be solved by those skilled in the art at present. Summary of the Invention
[0004] The purpose of the present invention is to solve the above problems existing in the prior art, and provide a method for compensating cogging torque.
[0005] The purpose of the present invention is achieved through the following technical solutions:
[0006] The method for compensating cogging torque includes
[0007] S1, the system obtains the back electromotive force constant, 8th-order harmonic torque, 8th-order phase data, 12th-order harmonic torque and 12th-order phase data of the motor according to the model of the input motor;
[0008] S2, obtaining the angular velocity of the motor according to the back electromotive force constant; and starting the motor to rotate one week and dividing it into m sampling points;
[0009] S3, calculating the compensated 8th-order harmonic torque and 12th-order harmonic torque at each sampling point according to the compensation torque formula;
[0010] S4. Calculate the compensated 8th - harmonic phase and 12th - harmonic phase for each sampling point according to the compensation phase formula;
[0011] S5. Calculate the Cogging compensation value for each sampling point according to the torque compensation value formula CogTb l[A]=Comp.Mag 8阶 *SIN(RADIANS(Angle*Elec.Harmonics 8阶 +Comp.Phs 8阶 ))+Comp.Mag 12阶 *SIN(RADIANS(Angle*E lec.Harmonics 12阶 +Comp.Phs 12阶 )); where, CogTb l[A] represents the superposition of the compensated harmonic air volumes of the 8th - harmonic and 12th - harmonic; Comp.Mag 8阶 is the compensated 8th - harmonic torque; Ang le is the current fundamental - wave angle value; Elec.Harmonics 8阶 is the electrical harmonic coefficient of the 8th - harmonic, which is used to adjust the scaling ratio of the angle and map the fundamental - wave angle Angl e to 8 times the high - frequency harmonic component; Comp.Phs 8阶 is the phase offset of the 8th - harmonic, representing the phase adjustment amount of the 8th - harmonic; Comp.Mag 12阶 is the compensated 12th - harmonic torque; El ec.Harmonics 12阶 is the electrical harmonic coefficient of the 12th - harmonic, which is used to adjust the scaling ratio of the angle and map the fundamental - wave angle Ang le to 12 times the high - frequency harmonic component; Comp.Phs 12阶 is the phase offset of the 12th - harmonic, representing the phase adjustment amount of the 12th - harmonic; RADIANS is the function to convert the angle from degrees to radians; SI N is the sine function, which is used to calculate the periodic change of the harmonic component;
[0012] S6. Convert the compensation value corresponding to each sampling point into a digital - signal compensation value according to the digital - signal compensation value formula;
[0013] S7. Convert the digital - signal compensation value into 16 - bit hexadecimal data and write it into the motor controller ECU;
[0014] S8. Call the 16 - bit hexadecimal compensation value and superimpose it on the output value corresponding to each sampling point to reduce noise and jitter.
[0015] Preferably, a QR code is provided on the motor in step S1, and the system can read the back electromotive force constant, 8th harmonic torque, 8th phase data, 12th harmonic torque, and 12th phase data corresponding to the motor by scanning the QR code.
[0016] Preferably, in step S2, the angular velocity of the motor is obtained according to the formula bemf = Ke * ω, where Ke is the back electromotive force constant and ω is the angular velocity of the motor.
[0017] Preferably, the m sampling points in step S2 can be obtained according to 2^n in the formula X / 2^n = Y; where X is the sampling frequency of the motor; 2^n is the number of sampling points, that is, the quantity of m; and Y shall not exceed 4HZ.
[0018] Preferably, if two or more different numbers of sampling points obtained according to the above formula all satisfy that Y does not exceed 4HZ, the smallest value among them is selected as the sampling point m.
[0019] Preferably, the compensation torque formula in step S3 is Comp.Mag = Mag(Peak) / 10000 / 1.5 / Phy; where Comp.Mag is the compensated torque value; Mag(Peak) is the 8th harmonic torque or 12th harmonic torque before compensation; Phy is the physical angular velocity; 10000 is the scaling factor, and 1.5 is the compensation coefficient.
[0020] Preferably, the compensation phase formula in step S4 is Comp.Phs = Phs(Phase) / 1000 * 360; where Comp.Phs is the compensated phase value; Phs(Phase) is the 8th phase data or 12th phase data before compensation; 1000 is the scaling factor; 360 is the range of one cycle of the phase.
[0021] Preferably, the digital signal compensation value formula in step S6 is CogTb l[d igit] = Round(CogTbl * 2^10, 0); where CogTb l[digit] represents the digital signal compensation value; CogTb l * 2^10 means magnifying the compensation value corresponding to any sampling point by 2^10 times; the Round(CogTb l * 2^10, 0) function means rounding the magnified compensation value by 2^10 times.
[0022] The advantages of the technical solution of the present invention are mainly reflected in:
[0023] Using the algorithm to perform harmonic torque compensation for the 8th and 12th orders can greatly alleviate the occurrence of steering wheel jitter and noise on the actual vehicle, making the vehicle steering smoother and more silky, and enhancing the experience of end customers;
[0024] By calculating the 8th and 12th harmonic torques for each sampling point in the motor, the torque compensation value is obtained and the calculated compensation value is converted into a hexadecimal number and written into the motor, which is then superimposed on the output value of the motor to optimize the motor torque fluctuation coefficient and reduce noise and jitter. Description of the Drawings
[0025] Figure 1 : Flowchart of the present invention. Detailed Embodiments
[0026] The objectives, advantages and features of the present invention will be illustrated and explained by the following non-restrictive description of preferred embodiments. These embodiments are merely typical examples of applying the technical solutions of the present invention, and any technical solutions formed by equivalent replacement or equivalent transformation fall within the scope of protection required by the present invention.
[0027] The present invention discloses a cogging torque compensation method, including
[0028] S1. The system obtains the back electromotive force constant, 8th harmonic torque, 8th phase data, 12th harmonic torque and 12th phase data of the motor according to the model of the input motor. Further, to quickly obtain the motor parameters, the present invention preferably sets a two-dimensional code on the motor, and the system can read the back electromotive force constant, 8th harmonic torque, 8th phase data, 12th harmonic torque and 12th phase data corresponding to the motor by scanning the two-dimensional code.
[0029] S2. The angular velocity of the motor is obtained according to the back electromotive force constant. Further, the angular velocity of the motor is obtained according to the formula bemf = Ke * ω, where Ke is the back electromotive force constant and ω is the angular velocity of the motor.
[0030] The motor is started to rotate one week and divided into m sampling points. Further, in the present invention, the m sampling points are preferably equally angularly distributed; and the m sampling points can be obtained according to 2^n in the formula X / 2^n = Y, where X is the sampling frequency of the motor; 2^n is the number of sampling points, that is, the quantity of m; and Y shall not exceed 4HZ. Further still, if two or more different numbers of sampling points obtained according to the above formula all satisfy that Y does not exceed 4HZ, the one with the smallest value is selected as the sampling point m.
[0031] For example, when the sampling frequency of the current motor is 1365 HZ and the number of sampling points is 256 (i.e., 2^8), the sampling frequency of each sampling point on average is 1365 / 2^8 = 5.3 HZ; since 5.3 is greater than 4 HZ, the number of sampling points cannot be 256. If the number of sampling points is 512 (i.e., 2^9), the sampling frequency of each sampling point on average is 1365 / 2^9 = 2.7; since 2.7 is less than 4 HZ, the number of sampling points can be 512. If the number of sampling points is 1024 (i.e., 2^10), the sampling frequency of each sampling point on average is 1365 / 2^10 = 1.3; since 1.3 is less than 4 HZ, the number of sampling points can be 1024. However, due to the excessive calculation data volume of 1024, it is more preferable to use 512 sampling points between 512 and 1024 sampling points. Of course, the sampling frequencies of motors of different models vary. In the present invention, only the case where the sampling frequency of the motor is 1365 HZ is taken as an example for illustration, and the specific sampling frequency of the motor is not limited.
[0032] S3. Calculate the compensated 8th-order harmonic torque and 12th-order harmonic torque for each sampling point according to the compensation torque formula. Further, the compensation torque formula is Comp.Mag = Mag(Peak) / 10000 / 1.5 / Phy; where Comp.Mag is the compensated torque value; Mag(Peak) is the 8th-order harmonic torque or 12th-order harmonic torque before compensation; Phy is the physical angular velocity; 10000 is the scaling factor, and 1.5 is the compensation coefficient. Adjust the peak amplitude of the 8th-order / 12th-order harmonic torque to a value more in line with the actual physical meaning through the compensation torque formula.
[0033] S4. Calculate the compensated 8th-order harmonic phase and 12th-order harmonic phase for each sampling point according to the compensation phase formula. Further, the compensation phase formula is Comp.Phs = Phs(Phase) / 1000*360; where Comp.Phs is the compensated phase value; Phs(Phase) is the 8th-order phase data or 12th-order phase data before compensation; 1000 is the scaling factor; 360 is the range of one cycle of the phase. Divide the original phase angle by 1000 through the compensation phase formula, convert it from a smaller unit (such as millidegrees) to degrees, and then multiply it by 360 to expand it to the full cycle range to calculate the compensated phase angle.
[0034] S5. According to the torque compensation value formula CogTb l[A] = Comp.Mag 8阶 *SIN(RADIANS(Angle*Elec.Harmonics 8阶 +Comp.Phs 8阶 ))+Comp.Mag 12阶*SIN(RADIANS(Angle * Elec.Harmonics 12阶 + Comp.Phs 12阶 )) calculates the Cogging compensation value for each sampling point. Among them, CogTbl[A] represents the superposition of the compensated harmonic air volumes of the 8th harmonic and the 12th harmonic; Comp.Mag 8阶 is the compensated 8th harmonic torque; Angle is the current fundamental wave angle value; Elec.Harmonics 8阶 is the electrical harmonic coefficient of the 8th harmonic, which is used to adjust the scaling ratio of the angle and map the fundamental wave angle Angle to high-frequency harmonic components such as 8 times or 12 times; Comp.Phs 8阶 is the phase offset of the 8th harmonic, indicating the phase adjustment amount of the 8th harmonic; Comp.Mag 12阶 is the compensated 12th harmonic torque; Elec.Harmonics 12阶 is the electrical harmonic coefficient of the 12th harmonic, which is used to adjust the scaling ratio of the angle and map the fundamental wave angle Angle to high-frequency harmonic components such as 8 times or 12 times; Comp.Phs 12阶 is the phase offset of the 12th harmonic, indicating the phase adjustment amount of the 12th harmonic; RADIANS is a function that converts an angle from degrees to radians; SIN is a sine function, which is used to calculate the periodic change of the harmonic component. Calculate the sine values of the 8th harmonic and the 12th harmonic at the current angle according to the torque compensation value formula, multiply them by the amplitudes of the 8th harmonic and the 12th harmonic respectively, and finally add the two. Compensate the parameter after superimposing the original overall cogging torque to eliminate or reduce the influence of the 8th and 12th harmonics during the overall use process.
[0035] This formula is used to generate a compensation table for the cogging torque (motor cogging torque). By superimposing harmonic components of specific orders, preferably the 8th and 12th orders of harmonic components in the present invention, and then adjusting their amplitudes and phases to cancel or suppress the periodic interference in the system. In short, due to the influence of the original 8th and 12th order harmonic components of the motor, the overall cogging torque has periodic interference. Now, according to the original amplitudes and phases of the 8th and 12th harmonics of each motor, adjust their influence according to the formula, and then combine them into CogTbl[A] to compensate the cogging torque and eliminate its influence, achieving the effect of improving the cogging torque.
[0036] S6. Convert the compensation value corresponding to each sampling point into a digital signal compensation value according to the digital signal compensation value formula. Further, the digital signal compensation value formula is CogTbl[digit] = Round(CogTbl * 2^10, 0); where CogTbl[digit] represents the digital signal compensation value; CogTb l * 2^10 means magnifying the compensation value corresponding to any point by 2^10 times; the Round(CogTbl * 2^10, 0) function means rounding the magnified compensation value by 2^10 times. The compensation value corresponding to any sampling point is magnified by 1024 times and then rounded through the digital signal compensation value formula to obtain the digital signal corresponding to the compensation value.
[0037] S7. Convert the digital signal compensation value into 16 - bit data and write it into the motor controller ECU.
[0038] S8. Call the 16 - bit compensation value and superimpose it on the output value corresponding to each sampling point to reduce noise and jitter.
[0039] Taking sampling points 0 to 10 as an example, the table for converting the compensation value into hexadecimal numbers:
[0040]
[0041] For example, according to the model of the input motor or by scanning the QR code on the motor, the back - electromotive force constant corresponding to this motor is Ke = 2926 mV / rad; the original peak amplitude of the 8th - order harmonic torque Mag(Peak) = 92 dmNm, and the original phase angle of the 8th - order harmonic torque Phs(Phase) = 409°; the original peak amplitude of the 12th - order harmonic torque Mag(Peak) = 89 dmNm, and the original phase angle of the 12th - order harmonic torque Phs(Phase) = 376°.
[0042] Then according to the formula bemf = Ke * ω, ω in the present invention is preferably 100000. Therefore, according to this formula, the angular velocity of the motor bemf = 2926 / 10000 = 0.02926 V / (rad / s), that is, Phy = 0.02926 V / (rad / s).
[0043] At the same time, rotate the motor one week and divide it into 512 - point sampling. The 1st to 11th sampling points and their corresponding angular velocities are as shown in the first and second rows of the above table.
[0044] According to the compensation torque formula Comp.Mag = Mag(Peak) / 10000 / 1.5 / Phy, the compensation torque of the 8th harmonic torque is calculated as Comp.Mag = 92 / 10000 / 1.5 / 0.02926 = 0.209614946. According to the compensation phase formula Comp.Phs = Phs(Phase) / 1000*360, the compensation phase of the 8th harmonic torque is calculated as Comp.Phs = 409 / 1000*360 = 147.24.
[0045] Then, according to the compensation torque formula Comp.Mag = Mag(Peak) / 10000 / 1.5 / Phy, the compensation torque of the 12th harmonic torque is calculated as Comp.Mag = 89 / 10000 / 1.5 / 0.02926 = 0.202779676. According to the compensation phase formula Comp.Phs = Phs(Phase) / 1000*360, the compensation phase of the 12th harmonic torque is calculated as Comp.Phs = 376 / 1000*360 = 135.36.
[0046] Then, according to the torque compensation value formula CogTbl[A] = Comp.Mag 8阶 *SIN(RADIANS(Angle*Elec.Harmonics 8阶 +Comp.Phs 8阶 ))+Comp.Mag 12阶 *SIN(RADIANS(Angle*Elec.Harmonics 8阶 +Comp.Phs 12阶 )), substituting the above calculation results and corresponding angles into this torque compensation value formula, the results shown in the third row of the above table are obtained.
[0047] According to the digital signal compensation value formula CogTbl[digit] = Round(CogTbl*2^10,0), the values in the third row of the above table are converted into digital signal compensation values, forming the values in the fourth row.
[0048] According to the calculation formula for converting decimal to hexadecimal, the values in the fourth row of the above table are converted into hexadecimal values, and the values in the fifth row are formed.
[0049] Take the column with a sampling point of 3 in the above table as an example. Rotate the motor one full turn and divide it into 512 sampling points. At this time, the motor angle corresponding to the sampling point of 3 is 2.11°. Specifically, divide one full turn of the motor, which is 360°, into 512 sampling points. The angle between adjacent two sampling points is approximately 0.7°. Therefore, the angle corresponding to the sampling point of 3 is approximately 2.11°. Substitute this angle, the compensation torque of the 8th harmonic torque calculated, the compensation phase of the 8th harmonic torque, the compensation torque of the 12th harmonic torque, and the compensation phase of the 12th harmonic torque into the torque compensation value formula CogTbl[A] = Comp.Mag 8阶 *SIN(RADIANS(Angle*Elec.Harmonics 8阶 +Comp.Phs 8阶 ))+Comp.Mag 12阶 *SIN(RADIANS(Angle*Elec.Harmonics 8阶 +Comp.Phs 12阶 )) to obtain the corresponding torque compensation value of 0.226. Then, according to the digital signal compensation value formula CogTb l[d igit] = Round(CogTb l*2^10,0), substitute 0.226 into it, getting 0.226*1024 = 231.424. Then round 231.424 to get 231. Finally, convert 231 to a hexadecimal number, that is, divide 231 by 16 until the quotient is zero and then reverse the remainder to get 00E7. Write the compensation value of 00E7 into the MCU of the motor and superimpose it on the output value to achieve the effect of reducing jitter and noise.
[0050] There are still various implementation manners of the present invention. All technical solutions formed by using equivalent transformation or equivalent substitution fall within the protection scope of the present invention.
Claims
1. Cogging torque compensation method, characterized by: include S1, the system obtains the motor's back-EMF constant, 8th-order harmonic torque, 8th-order phase data, 12th-order harmonic torque and 12th-order phase data according to the input motor model; S2, obtaining the angular velocity of the motor according to the back electromotive force constant; and starting the motor to rotate it once and divide it into m sampling points; S3, calculating the compensated 8th-order harmonic torque and 12th-order harmonic torque of each sampling point according to the compensation torque formula; S4, calculating the compensated 8th-order harmonic phase and 12th-order harmonic phase of each sampling point according to the compensation phase formula; S5, according to the torque compensation value formula CogTbl[A]=Comp.Mag 8阶 *SIN(RADIANS(Angle*Elec.Harmonics 8阶 +Comp.Phs 8阶 ))+Comp.Mag 12阶 *SIN(RADIANS(Angle*Elec.Harmonics 12阶 +Comp.Phs 12阶 )) Calculate the Cogging compensation value of each sampling point; where CogTbl[A] represents the superposition of the compensation harmonic air volume of the 8th order harmonic and the 12th order harmonic; Comp.Mag 8阶 is the 8th order harmonic torque after compensation; Angle is the current fundamental angle value; Elec.Harmonics 8阶 The electrical harmonic coefficient of the 8th order harmonic is used to adjust the angle scaling ratio and map the fundamental angle Angle to the 8th high-frequency harmonic component; Comp.Phs 8阶 is the phase shift of the 8th order harmonic, indicating the phase adjustment of the 8th order harmonic; Comp.Mag 12阶 It is the 12th order harmonic torque after compensation; Elec.Harmonics 12阶 The electrical harmonic coefficient of the 12th order harmonic is used to adjust the angle scaling ratio and map the fundamental angle Angle to the 12th high-frequency harmonic component; Comp.Phs 12阶 is the phase offset of the 12th-order harmonic, indicating the phase adjustment of the 12th-order harmonic; RADIANS is a function that converts angles from degrees to radians; SIN is a sine function that is used to calculate the periodic changes of harmonic components; S6, converting the compensation value corresponding to each sampling point into a digital signal compensation value according to a digital signal compensation value formula; S7, converting the digital signal compensation value into hexadecimal data and writing it into the motor controller ECU; S8, calling the hexadecimal compensation value and superimposing it on the output value corresponding to each sampling point to reduce noise and jitter.
2. The Cogging torque compensation method according to claim 1, characterized in that: In step S1, a QR code is provided on the motor, and the system can read the back electromotive force constant, 8th-order harmonic torque, 8th-order phase data, 12th-order harmonic torque and 12th-order phase data corresponding to the motor by scanning the QR code.
3. The Cogging torque compensation method according to claim 1, characterized in that: In step S2, the angular velocity of the motor is obtained according to the formula bemf=Ke*ω, wherein Ke is the back electromotive force constant and ω is the angular velocity of the motor.
4. The Cogging torque compensation method according to claim 1, characterized in that: The number of the sampling points in step S2 is 2^n; and when the m sampling points are substituted into the formula X / 2^n=Y, Y shall not exceed 4HZ; wherein X is the sampling frequency of the motor.
5. The Cogging torque compensation method according to claim 4, characterized in that: If two or more different sampling points are obtained according to the above formula, and all satisfy that Y does not exceed 4HZ, the one with the smallest value is selected as the sampling point m.
6. The Cogging torque compensation method according to claim 1, characterized in that: The compensation torque formula in step S3 is Comp.Mag=Mag(Peak) / 10000 / 1.5 / Phy; wherein Comp.Mag is the torque value after compensation; Mag(Peak) is the 8th-order harmonic torque or the 12th-order harmonic torque before compensation; Phy is the physical angular velocity; 10000 is the scaling factor, and 1.5 is the compensation coefficient.
7. The Cogging torque compensation method according to claim 1, characterized in that: The compensation phase formula in step S4 is Comp.Phs=Phs(Phase) / 1000*360; wherein Comp.Phs is the phase value after compensation; Phs(Phase) is the 8th order phase data or the 12th order phase data before compensation; 1000 is the scaling factor; and 360 is the range of one cycle of the phase.
8. The Cogging torque compensation method according to claim 1, characterized in that: The digital signal compensation value formula in step S6 is CogTbl[digit]=Round(CogTbl*2^10,0); wherein CogTbl[digit] represents the digital signal compensation value; CogTbl*2^10 represents amplifying the compensation value corresponding to any sampling point by 2^10 times; and the Round(CogTbl*2^10,0) function represents rounding the compensation value after amplification by 2^10 times.