A zero position calibration method for a magnetic encoder of a permanent magnet synchronous motor
By controlling the combination of quadrature axis current and direct axis current in a permanent magnet synchronous motor, the zero position of the magnetic encoder can be quickly determined and calibrated, solving the problem of complicated calibration and easy error in the existing technology, and improving control accuracy and efficiency.
Patent Information
- Application Number
- CN202211578418.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-09
- Publication Date
- 2026-01-20
- Estimated Expiration
- 2042-12-09
AI Technical Summary
In existing technologies, the zero-position calibration process of magnetic encoders and motor rotors is complicated and prone to errors, resulting in a decrease in the control accuracy of permanent magnet synchronous motors.
By controlling the combination of quadrature axis current and direct axis current of the permanent magnet synchronous motor, the steady-state speed under different power supply conditions is collected. By comparing the speed and calculating the current value, the zero position alignment can be quickly determined and compensation calibration can be performed.
This enables rapid alignment of the magnetic encoder angle, reduces errors, and improves the accuracy and efficiency of the permanent magnet synchronous motor control system.
Smart Images

Figure CN115800852B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of permanent magnet synchronous motor control, in particular to a zero position calibration method of a permanent magnet synchronous motor magnetic encoder. BACKGROUND
[0002] Due to the characteristics of high efficiency, high control accuracy, high power factor, high torque density, good torque stability, low vibration noise and the like of the permanent magnet synchronous motor, as well as the advantages of safety and energy saving, convenient maintenance and the like, the permanent magnet synchronous motor is more and more widely used in the automobile industry, such as electric power steering system, electronic oil pump system and the like. The magnetic encoder is more and more used in the permanent magnet synchronous motor control system due to the characteristics of high sensitivity, small size, low power consumption and high reliability. The magnetic encoder obtains the motor rotor angle and speed information, so as to be used for FOC control of the permanent magnet synchronous motor. Therefore, the accuracy of the motor rotor angle and speed information obtained by the motor controller from the magnetic encoder plays a crucial role in the motor control effect.
[0003] The magnetic encoder obtains the motor rotor angle and speed information by sensing the change of the magnetic field of the Rb magnet connected with the motor rotor. In order to obtain a better control effect of the permanent magnet synchronous motor, the angle of the magnetic encoder is usually aligned with the angle of the motor rotor, that is, the zero angle positions of the two are aligned. When the motor rotor electric angle is zero, the angle read by the magnetic encoder is also zero, as shown in FIG. 1. However, due to the magnetic encoder patch error and PCB assembly error and the like, a large deviation between the zero positions of the magnetic encoder and the motor rotor may be caused, as shown in FIG. 2, so that the motor rotor angle and speed information obtained by the magnetic encoder is inaccurate, thereby affecting the control accuracy of the permanent magnet synchronous motor. Therefore, the zero position calibration and alignment of the magnetic encoder and the motor rotor is an important link in the permanent magnet synchronous motor control system. Figure 1a Figure 1b The electromagnetic torque of the permanent magnet synchronous motor is only related to the motor cross-axis current, so the motor zero calibration can be realized by the cross-axis current and the direct-axis current.
[0004] The existing technology has a complex adjustment mode when aligning the zero positions of the encoder and the motor, and errors are easily caused during adjustment, so that accurate and rapid adjustment cannot be realized.
[0005] The existing technology has a complex adjustment mode when aligning the zero positions of the encoder and the motor, and errors are easily caused during adjustment, so that accurate and rapid adjustment cannot be realized. SUMMARY
[0006] The problem to be solved by the present application is how to quickly judge whether the zero positions of the magnetic encoder and the motor rotor angle are aligned, and to quickly compensate the angle of the magnetic encoder to reduce errors.
[0007] To solve the above problems, the present application provides a zero position calibration method of a permanent magnet synchronous motor magnetic encoder, comprising:
[0008] Step S1, controlling the motor controller to provide at least one of the quadrature-axis current, the first preset positive direct-axis current and the first preset negative direct-axis current for the permanent magnet synchronous motor to drive the permanent magnet synchronous motor to rotate;
[0009] Step S2, controlling the magnetic encoder to collect a steady-state rotating speed of the permanent magnet synchronous motor in the quadrature-axis current power supply state, the quadrature-axis current and the positive direct-axis current simultaneous power supply state and the quadrature-axis current and the negative direct-axis current simultaneous power supply state during the rotation of the permanent magnet synchronous motor and include in the first rotating speed data;
[0010] Step S3, obtaining a corresponding zero position alignment result according to the comparison of the first rotating speed data and a pre-configured rotating speed threshold value, and judging whether the zero position alignment result represents misalignment:
[0011] If yes, controlling the motor controller to adjust the positive direct-axis current or the negative direct-axis current to a second preset value, and then turning to step S4;
[0012] If no, returning to step S2;
[0013] Step S4, collecting a first current value of the quadrature-axis current at the current moment, then controlling the motor controller to adjust the quadrature-axis current to the first preset steady-state rotating speed of the permanent magnet synchronous motor, collecting a second current value of the quadrature-axis current at this moment, and after a preset time interval, controlling the motor controller to adjust the quadrature-axis current to the second preset steady-state rotating speed of the permanent magnet synchronous motor, and collecting a third current value of the quadrature-axis current at this moment;
[0014] Step S5, obtaining a compensation angle value according to the first preset value, the first current value, the second current value and the third current value, and inputting the compensation angle value into the magnetic encoder for zero position calibration, and then returning to step S2.
[0015] Preferably, the first rotating speed data includes a first steady-state rotating speed of the permanent magnet synchronous motor in the quadrature-axis current power supply state, a second steady-state rotating speed of the permanent magnet synchronous motor in the quadrature-axis current and the positive direct-axis current simultaneous power supply state, and a third steady-state rotating speed of the permanent magnet synchronous motor in the quadrature-axis current and the negative direct-axis current simultaneous power supply state, and step S3 includes:
[0016] Step S31, obtaining a first zero position alignment result according to the comparison of the first steady-state rotating speed, the second steady-state rotating speed, the third steady-state rotating speed and the rotating speed threshold value, and judging whether the first zero position alignment result represents misalignment:
[0017] If yes, the motor controller is controlled to adjust the positive direct-axis current or the negative direct-axis current to the second preset value, and then turn to step S32;
[0018] If no, return to step S2;
[0019] In step S32, a second zero position alignment result is obtained according to the comparison of the first steady speed, the second steady speed and the third steady speed, and then turn to step S4;
[0020] In step S5, based on the second zero position alignment result, the positive compensation angle value or the negative compensation angle value is input into the magnetic encoder for zero position calibration.
[0021] Preferably, step S31 comprises:
[0022] In step S311, a first comparison value is obtained according to the comparison of the first steady speed and the second steady speed, and a second comparison value is obtained according to the comparison of the first steady speed and the third steady speed;
[0023] In step S312, it is judged whether the first comparison value or the second comparison value is greater than the speed threshold value:
[0024] If yes, the first zero position alignment result representing misalignment is output, and then turn to step S313;
[0025] If no, the first zero position alignment result representing alignment is output, and then turn to step S313;
[0026] In step S313, it is judged whether the first zero position alignment result represents misalignment:
[0027] If yes, the motor controller is controlled to adjust the positive direct-axis current or the negative direct-axis current to the second preset value, and then turn to step S32;
[0028] If no, return to step S2.
[0029] Preferably, step S311 comprises:
[0030] In step S3111, a first difference value is obtained by subtracting the first steady speed from the second steady speed, and a second difference value is obtained by subtracting the first steady speed from the third steady speed;
[0031] Step S3112, respectively, the first difference and the second difference are calculated to get a first absolute value and a second absolute value, and the first absolute value as the first comparison value, the second absolute value as the second comparison value.
[0032] Preferably, the step S32 comprises:
[0033] Step S321, whether the first steady-state speed is greater than the second steady-state speed:
[0034] If yes, go to step S322;
[0035] If no, go to step S323;
[0036] Step S322, whether the first steady-state speed is greater than the third steady-state speed:
[0037] If yes, return to step S2;
[0038] If no, output the second zero position alignment result representing the magnetic encoder angle lag, and then go to step S4;
[0039] Step S323, whether the first steady-state speed is greater than the third steady-state speed:
[0040] If yes, output the second zero position alignment result representing the magnetic encoder angle lag, and then go to step S4;
[0041] If no, return to step S2;
[0042] Then in step S5, when the second zero position alignment result represents the magnetic encoder lag, the positive compensation angle value is input into the magnetic encoder for zero position calibration; or
[0043] When the second zero position alignment result represents the magnetic encoder lead, the negative compensation angle value is input into the magnetic encoder for zero position calibration.
[0044] Preferably, the step S5 comprises:
[0045] Step S51, according to the first preset value, the first current value and the second current value to get a first offset angle, and according to the first preset value, the first current value and the third current value to get a second offset angle;
[0046] Step S52, average the first offset angle and the second offset angle to obtain a third offset angle, and take the positive third offset angle as the first compensation angle and take the negative third offset angle as the second compensation angle;
[0047] Step S53, when the second zero position alignment result indicates that the magnetic encoder angle is leading, input the second compensation angle as the negative compensation angle value into the magnetic encoder for zero position calibration, and then return to step S2; or
[0048] when the second zero position alignment result indicates that the magnetic encoder angle is lagging, input the first compensation angle as the positive compensation angle value into the magnetic encoder for zero position calibration, and then return to step S2.
[0049] Preferably, the first offset angle is obtained by the following calculation formula:
[0050]
[0051] wherein,
[0052] θ1 represents the first offset angle;
[0053] Iq1' represents the second current value;
[0054] Iq represents the first current value;
[0055] Id represents the first preset value.
[0056] Preferably, the second offset angle is obtained by the following calculation formula:
[0057]
[0058] wherein,
[0059] θ2 represents the second offset angle;
[0060] Iq2' represents the third current value;
[0061] Iq represents the first current value;
[0062] Id represents the first preset value.
[0063] Preferably, the second preset value is 0.
[0064] Preferably, in step S1, the vector sum of the quadrature axis current and the positive direct axis current is less than the rated current size of the permanent magnet synchronous motor, and the vector sum of the quadrature axis current and the negative direct axis current is less than the rated current size of the permanent magnet synchronous motor.
[0065] The beneficial effects of the present application are: the present application quickly judges whether the zero positions of the magnetic encoder and the motor rotor are aligned through the steady-state rotating speed of the permanent magnet synchronous motor under the same cross-axis current and different direct-axis currents, quickly judges the direction of the compensation angle according to the rotating speed relationship, and quickly calculates the compensation angle through the size relationship between the cross-axis current and the direct-axis current, so as to realize the quick alignment of the magnetic encoder angle, avoid the problem of low motor control precision and poor control efficiency caused by the inconsistency between the obtained rotor angle and the actual angle of the magnetic encoder, and effectively improve the control effect of the permanent magnet synchronous motor control system and reduce the error. BRIEF DESCRIPTION OF DRAWINGS
[0066] Figure 1a It is a schematic diagram of the alignment of the zero positions of the motor rotor and the magnetic encoder in the background art.
[0067] Figure 1b It is a schematic diagram of the misalignment of the zero positions of the motor rotor and the magnetic encoder in the background art.
[0068] Figure 2 It is a step flowchart of the present application.
[0069] Figure 3 It is a working principle diagram of the permanent magnet synchronous motor, the motor controller and the magnetic encoder in the present application.
[0070] Figure 4a It is a decomposition schematic diagram of the motor current I s in the present application when the zero positions of the permanent magnet synchronous motor and the magnetic encoder are aligned.
[0071] Figure 4b It is a decomposition schematic diagram of the motor current I s in the present application when the rotor angle of the permanent magnet synchronous motor is ahead.
[0072] Figure 4c It is a decomposition schematic diagram of the motor current I s in the present application when the rotor angle of the permanent magnet synchronous motor is behind.
[0073] Figure 5 It is a specific flowchart of step S3 of the present application.
[0074] Figure 6 It is a specific flowchart of step S31 of the present application.
[0075] Figure 7 It is a specific flowchart of step S311 of the present application.
[0076] Figure 8 It is a specific flowchart of step S32 of the present application.
[0077] Figure 9A specific flow chart of step S5 of the present application. DETAILED DESCRIPTION
[0078] In order to make the above-mentioned objectives, features and advantages of the present application more obvious and easy to understand, the specific embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0079] In the preferred embodiment of the present application, based on the above-mentioned problems existing in the prior art, a zero position calibration method of a permanent magnet synchronous motor magnetic encoder is provided, as shown in the accompanying drawings, comprising: Figure 2
[0080] Step S1, the motor controller provides at least one of the cross-axis current, the first preset positive direct-axis current and the first preset negative direct-axis current for the permanent magnet synchronous motor to drive the permanent magnet synchronous motor to rotate;
[0081] Step S2, the magnetic encoder collects a steady-state rotating speed of the permanent magnet synchronous motor in the cross-axis current power supply state, the cross-axis current and the positive direct-axis current simultaneous power supply state and the cross-axis current and the reverse direct-axis current simultaneous power supply state during the rotation of the permanent magnet synchronous motor and is included in the first rotating speed data;
[0082] Step S3, a corresponding zero position alignment result is obtained according to the first rotating speed data and a pre-configured rotating speed threshold value comparison, and whether the zero position alignment result represents misalignment is judged:
[0083] If yes, the motor controller adjusts the positive direct-axis current or the negative direct-axis current to a second preset value, and then turns to step S4;
[0084] If no, return to step S2;
[0085] Step S4, a first current value of the cross-axis current at the current time is collected, then the motor controller adjusts the cross-axis current to the permanent magnet synchronous motor to reach the first preset steady-state rotating speed, and a second current value of the cross-axis current at this time is collected, and after a preset time interval, the motor controller adjusts the cross-axis current to the permanent magnet synchronous motor to reach the second preset steady-state rotating speed, and a third current value of the cross-axis current at this time is collected;
[0086] Step S5, a compensation angle value is obtained according to the first preset value, the first current value, the second current value and the third current value, and the compensation angle value is input into the magnetic encoder for zero position calibration, and then returns to step S2.
[0087] Specifically, in the present embodiment, the permanent magnet synchronous motor is controlled to run by the motor controller, and the specific working principle between the motor controller and the permanent magnet synchronous motor and the magnetic encoder is as shown in the accompanying drawings. Figure 3 When the positive voltage V s At that time, the motor controller first sets V s Performing the Park transform yields the d-axis voltage component V. d and q-axis voltage component V q Next, the motor controller will input the d-axis voltage component V. d and q-axis voltage component V q Perform the inverse Park transform to obtain U α and U β Then the motor controller will U α and U β The three-phase voltage V is obtained through space vector pulse width modulation. a V b and V c Finally, the drive bridge outputs three-phase current i. a i b and i c The motor controller will control the three-phase current i a i b and i c The output is given to the permanent magnet synchronous motor to make it run. The magnetic encoder collects the angle θ of the permanent magnet synchronous motor and supplies the motor controller to perform the Park inverse transformation.
[0088] Specifically, in this embodiment, there are three angular situations between the permanent magnet synchronous motor and the magnetic encoder: the permanent magnet synchronous motor and the magnetic encoder are aligned at zero position, the rotor angle of the permanent magnet synchronous motor is ahead, and the rotor angle of the permanent magnet synchronous motor is behind. Among them, when the permanent magnet synchronous motor and the magnetic encoder are aligned at zero position, the motor current I... s The exploded diagram is as follows Figure 4a As shown, when the rotor angle of the permanent magnet synchronous motor leads, the motor current I... s The exploded diagram is as follows Figure 4b As shown, the motor current I of the permanent magnet synchronous motor when the rotor angle lags is... s The exploded diagram is as follows Figure 4c As shown.
[0089] Preferably, in order to satisfy the current vector I s The current vector I is not zero in both the d-axis and q-axis current components, thus enabling the current vector I to be constant even when the rotation angle of the permanent magnet synchronous motor exhibits lead or lag. s Significant changes occur in the d-axis and q-axis current components, causing a change in the speed of the permanent magnet synchronous motor and the positive voltage V. s and reverse voltage -V s In the absolute value, the corresponding d-axis voltage component V d =0, corresponding to the q-axis voltage component V q =V s .
[0090] Preferably, when the motor is given a voltage vector V perpendicular to the d-axis s At that time, the motor current I s It will lag behind the voltage by a certain phase, such as Figure 4a As shown, the motor current I s Decomposition yields the current component I in the motor's rotating coordinate system. q with I d , while the q-axis component I q The action generates electromagnetic torque, driving the motor to rotate; when the sensor detects a certain lead in the motor's rotation angle, such as... Figure 4b As shown, the motor current I s In the q-axis component I q The electromagnetic torque will increase accordingly, and the motor speed will also increase under the same load conditions; when the sensor obtains the motor rotation angle with a certain lag, such as Figure 4c As shown, the motor current I s In the q-axis component I q The electromagnetic torque generated will decrease, and the motor speed will also decrease accordingly. In general, when the magnetic encoder angle is offset from the actual motor angle, if the forward angle is ahead, the reverse angle will lag behind.
[0091] Preferably, the rotation process of the permanent magnet synchronous motor is a continuous process. During the rotation process, the steady-state speed of the permanent magnet synchronous motor will change due to different external factors. Therefore, when steps S3 and S5 end, the process will return to step S2 for continuous judgment and zero position calibration will be continuously performed during the rotation process.
[0092] Preferably, in specific operation, firstly, the motor controller is controlled to provide quadrature-axis current to the permanent magnet synchronous motor, and the steady-state speed of the permanent magnet synchronous motor under the quadrature-axis current supply state is collected by the magnetic encoder. Then, the motor controller is controlled to simultaneously provide quadrature-axis current and a first preset value of positive direct-axis current to the permanent magnet synchronous motor, and the steady-state speed of the permanent magnet synchronous motor under the simultaneous quadrature-axis current and positive direct-axis current supply state is collected by the magnetic encoder. Finally, the motor controller is controlled to simultaneously provide quadrature-axis current and a first preset value of reverse direct-axis current to the permanent magnet synchronous motor, and the steady-state speed of the permanent magnet synchronous motor under the simultaneous quadrature-axis current and reverse direct-axis current supply state is collected by the magnetic encoder.
[0093] Preferably, the first preset steady-state speed and the second preset steady-state speed are preset manually and can be adjusted numerically according to actual conditions. Furthermore, the first preset steady-state speed and the second preset steady-state speed do not involve subsequent calculation processes.
[0094] In a preferred embodiment of the present invention, the first speed data includes a first steady-state speed of the permanent magnet synchronous motor when it is powered by quadrature-axis current, a second steady-state speed of the permanent magnet synchronous motor when it is powered by both quadrature-axis current and forward direct-axis current, and a third steady-state speed of the permanent magnet synchronous motor when it is powered by both quadrature-axis current and reverse direct-axis current. Step S3 is as follows: Figure 5 As shown, it includes:
[0095] Step S31: Based on the comparison of the first steady-state speed, the second steady-state speed, the third steady-state speed, and the speed threshold, a first zero-position alignment result is obtained, and it is determined whether the first zero-position alignment result indicates misalignment.
[0096] If so, the motor controller will adjust the positive or negative direct-axis current to the second preset value, and then proceed to step S32;
[0097] If not, return to step S2;
[0098] Step S32: Based on the comparison of the first steady-state speed, the second steady-state speed, and the third steady-state speed, a second zero-position alignment result is obtained, and the process proceeds to step S4;
[0099] In step S5, based on the second zero-position alignment result, the positive or negative compensation angle value is input into the magnetic encoder for zero-position calibration.
[0100] Specifically, in this embodiment, the zero-position alignment result in step S3 includes a first zero-position alignment result indicating whether alignment has occurred and a second zero-position alignment result indicating whether the compensation angle value is selected in the positive or negative direction. The first zero-position alignment result has a result-oriented function, that is, the step to which to proceed can only be determined after the result of the first zero-position alignment result is judged. The second zero-position alignment result does not have a result-oriented function, that is, regardless of the result of the second zero-position alignment result, the process will proceed to step S4. Therefore, the judgment logic of the first zero-position alignment result is used as the expression in step S3, while the judgment logic of the second zero-position alignment result is used as a hidden expression.
[0101] In a preferred embodiment of the present invention, step S31 is as follows: Figure 6 As shown, it includes:
[0102] Step S311: Obtain a first comparison value by comparing the first steady-state speed and the second steady-state speed, and obtain a second comparison value by comparing the first steady-state speed and the third steady-state speed;
[0103] Step S312: Determine whether the first comparison value or the second comparison value is greater than the speed threshold.
[0104] If so, output the first zero-position alignment result representing the misalignment and proceed to step S313;
[0105] If no, a first zero position alignment result representing alignment is outputted and step S313 is turned to;
[0106] Step S313, judging whether the first zero position alignment result represents misalignment:
[0107] If yes, the motor controller is controlled to adjust the positive direct-axis current or the negative direct-axis current to a second preset value, and then step S32 is turned to;
[0108] If no, step S2 is returned.
[0109] Specifically, in the embodiment, in the specific operation, only the first comparison value and the second comparison value are obtained by comparing and calculating between two of the first steady speed, the second steady speed and the third steady speed, and then the first comparison value, the second comparison value and the speed threshold are compared and judged, and in the embodiment, only the arrangement order of the first steady speed, the second steady speed and the third steady speed is based on, the second steady speed is compared with the first steady speed and the third steady speed as a base value, which is only a preferred embodiment.
[0110] Preferably, only one of the first comparison value or the second comparison value is greater than the speed threshold, and the first zero position alignment result representing misalignment is obtained.
[0111] In the preferred embodiment of the application, step S311 is as shown in Figure 7 , comprising:
[0112] Step S3111, the first steady speed and the second steady speed are subtracted to obtain a first difference value, and the first steady speed and the third steady speed are subtracted to obtain a second difference value;
[0113] Step S3112, the first difference value and the second difference value are respectively subjected to absolute value calculation to obtain a first absolute value and a second absolute value, and the first absolute value is taken as the first comparison value and the second absolute value is taken as the second comparison value.
[0114] In the preferred embodiment of the application, step S32 is as shown in Figure 8 , comprising:
[0115] Step S321, judging whether the first steady speed is greater than the second steady speed:
[0116] If yes, step S322 is turned to;
[0117] If no, step S323 is turned to;
[0118] Step S322, judging whether the first steady speed is greater than the third steady speed:
[0119] If yes, return to step S2;
[0120] If no, output a second zero position alignment result representing magnetic encoder angle lag, and then turn to step S4;
[0121] Step S323, judge whether the first steady state speed is greater than the third steady state speed:
[0122] If yes, output a second zero position alignment result representing magnetic encoder angle lead, and then turn to step S4;
[0123] If no, return to step S2;
[0124] Then in step S5, when the second zero position alignment result represents magnetic encoder lag, input a positive compensation angle value into the magnetic encoder for zero position calibration; or
[0125] When the second zero position alignment result represents magnetic encoder lead, input a negative compensation angle value into the magnetic encoder for zero position calibration.
[0126] Specifically, in the embodiment, mark the first steady state speed as w1, mark the second steady state speed as w2, mark the third steady state speed as w3, and mark the speed threshold as w0. Judge the size relationship among w1, w2 and w3. If w2 > w1 > w3, it is considered that the magnetic encoder angle has a certain lead compared with the motor rotor angle. If w3 > w1 > w2, it is considered that the magnetic encoder angle has a certain lag compared with the motor rotor angle.
[0127] Specifically, in the embodiment, calculate the first absolute value |w2-w1| and the second absolute value |w3-w1|. Judge whether |w2-w1| is greater than w0 or whether |w3-w1| is greater than w0. If yes, it is considered that the permanent magnet synchronous motor rotor zero position and the magnetic encoder zero position are not aligned, and there is a large angle difference between them. If no, it means that the motor rotor zero position and the magnetic encoder zero position are aligned, and no compensation is needed.
[0128] In a preferred embodiment of the application, step S5 includes: Figure 9 as shown in the figure, comprising:
[0129] Step S51, obtain a first offset angle according to the first preset value, the first current value and the second current value, and obtain a second offset angle according to the first preset value, the first current value and the third current value;
[0130] Step S52, average the first offset angle and the second offset angle to obtain a third offset angle, and take the positive third offset angle as the first compensation angle and the negative third offset angle as the second compensation angle;
[0131] Step S53, when the second zero position alignment result represents that the magnetic encoder angle is ahead, input the second compensation angle as a negative compensation angle value into the magnetic encoder for zero position calibration, and then return to step S2; or
[0132] In the second zero position alignment result represents that the magnetic encoder angle is lagging, input the first compensation angle as a positive compensation angle value into the magnetic encoder for zero position calibration, and then return to step S2.
[0133] In the preferred embodiment of the present application, the first offset angle is obtained by the following calculation formula:
[0134]
[0135] Wherein,
[0136] θ1 represents the first offset angle;
[0137] Iq1' represents the second current value;
[0138] Iq represents the first current value;
[0139] Id represents the first preset value.
[0140] In the preferred embodiment of the present application, the second offset angle is obtained by the following calculation formula:
[0141]
[0142] Wherein,
[0143] θ2 represents the second offset angle;
[0144] Iq2' represents the third current value;
[0145] Iq represents the first current value;
[0146] Id represents the first preset value.
[0147] Specifically, in the embodiment, the quadrature axis current is gradually increased to the permanent magnet synchronous motor to reach a first preset steady state speed, a second current value Iq1' of the quadrature axis current at this time is collected, and a quadrature axis current increment dIq1=Iq1'-Iq is recorded; then the quadrature axis current is gradually reduced to the permanent magnet synchronous motor to reach a second preset steady state speed, a third current value Iq2' of the quadrature axis current at this time is collected, and a quadrature axis current increment dIq2=Iq2'-Iq is recorded; then a first offset angle and a second offset angle are calculated, and a third offset angle α=(θ1+θ2) / 2 is calculated according to the first offset angle and the second offset angle; if the magnetic encoder angle leads the motor rotor angle, the second compensation angle -α is used for compensation, if the magnetic encoder angle lags the motor rotor angle, the first compensation angle +α is used for compensation, and the compensated magnetic encoder angle can be aligned with the motor rotor zero position.
[0148] In a preferred embodiment of the application, the second preset value is 0.
[0149] In a preferred embodiment of the application, in step S1, the vector sum of the quadrature axis current and the positive direct axis current is less than the rated current of the permanent magnet synchronous motor, and the vector sum of the quadrature axis current and the negative direct axis current is less than the rated current of the permanent magnet synchronous motor.
[0150] Although the present disclosure is disclosed as above, the protection scope of the present disclosure is not limited to this. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the present disclosure, and these changes and modifications will fall within the protection scope of the present disclosure.
Claims
1. A method for zero-position calibration of a permanent magnet synchronous motor magnetic encoder, characterized in that, include: Step S1: Control the motor controller to provide at least one of the following currents to the permanent magnet synchronous motor: quadrature axis current, positive direct axis current of a first preset value, and negative direct axis current of the first preset value, so as to drive the permanent magnet synchronous motor to rotate. Step S2: Control the magnetic encoder to collect a steady-state speed of the permanent magnet synchronous motor in the following states during the rotation of the permanent magnet synchronous motor: when the permanent magnet synchronous motor is powered by quadrature axis current, when it is powered by both quadrature axis current and forward direct axis current, and when it is powered by both quadrature axis current and reverse direct axis current. Include the speed data in the first speed data. Step S3: Based on the comparison between the first rotational speed data and a pre-configured rotational speed threshold, obtain the corresponding zero-position alignment result, and determine whether the zero-position alignment result indicates misalignment. If so, the motor controller is controlled to adjust the positive direct-axis current or the negative direct-axis current to the second preset value, and then proceeds to step S4; If not, return to step S2; Step S4: Acquire a first current value of the quadrature-axis current at the current moment, then control the motor controller to adjust the quadrature-axis current until the permanent magnet synchronous motor reaches a first preset steady-state speed, and acquire a second current value of the quadrature-axis current at this time; and after a preset time interval, control the motor controller to adjust the quadrature-axis current until the permanent magnet synchronous motor reaches a second preset steady-state speed, and acquire a third current value of the quadrature-axis current at this time. Step S5: Obtain a compensation angle value based on the first preset value, the first current value, the second current value, and the third current value, and input the compensation angle value into the magnetic encoder for zero position calibration, then return to step S2.
2. The zero-position calibration method according to claim 1, characterized in that, The first speed data includes a first steady-state speed of the permanent magnet synchronous motor when the quadrature-axis current is supplied, a second steady-state speed of the permanent magnet synchronous motor when the quadrature-axis current and the forward direct-axis current are supplied simultaneously, and a third steady-state speed of the permanent magnet synchronous motor when the quadrature-axis current and the reverse direct-axis current are supplied simultaneously. Step S3 includes: Step S31: Based on the comparison of the first steady-state speed, the second steady-state speed, the third steady-state speed, and the speed threshold, a first zero-position alignment result is obtained, and it is determined whether the first zero-position alignment result indicates misalignment. If so, the motor controller is controlled to adjust the positive direct-axis current or the negative direct-axis current to the second preset value, and then proceeds to step S32; If not, return to step S2; Step S32: Based on the comparison of the first steady-state speed, the second steady-state speed, and the third steady-state speed, a second zero-position alignment result is obtained, and the process proceeds to step S4; In step S5, based on the second zero-position alignment result, the positive or negative compensation angle value is input into the magnetic encoder for zero-position calibration.
3. The zero-position calibration method according to claim 2, characterized in that, Step S31 includes: Step S311: A first comparison value is obtained by comparing the first steady-state speed and the second steady-state speed, and a second comparison value is obtained by comparing the first steady-state speed and the third steady-state speed; Step S312: Determine whether the first comparison value or the second comparison value is greater than the rotational speed threshold. If so, output the first zero position alignment result that indicates misalignment and proceed to step S313; If not, output the first zero-position alignment result that represents the alignment and proceed to step S313; Step S313: Determine whether the first zero-position alignment result indicates misalignment. If so, the motor controller is controlled to adjust the positive direct-axis current or the negative direct-axis current to the second preset value, and then proceeds to step S32; If not, return to step S2.
4. The zero-position calibration method according to claim 3, characterized in that, Step S311 includes: Step S3111: Subtract the first steady-state speed and the second steady-state speed to obtain a corresponding first difference, and subtract the first steady-state speed and the third steady-state speed to obtain a corresponding second difference; Step S3112: Calculate the absolute values of the first difference and the second difference to obtain a first absolute value and a second absolute value, and use the first absolute value as the first comparison value and the second absolute value as the second comparison value.
5. The zero-position calibration method according to claim 2, characterized in that, Step S32 includes: Step S321: Determine whether the first steady-state speed is greater than the second steady-state speed; if so, proceed to step S322. If not, proceed to step S323; Step S322: Determine whether the first steady-state speed is greater than the third steady-state speed; if so, return to step S2. If not, output the second zero position alignment result that characterizes the angular hysteresis of the magnetic encoder, and then proceed to step S4; Step S323: Determine whether the first steady-state speed is greater than the third steady-state speed. If so, output the second zero position alignment result that represents the lead angle of the magnetic encoder, and then proceed to step S4; If not, return to step S2; In step S5, when the second zero-position alignment result indicates that the magnetic encoder is hysteretic, the positive compensation angle value is input into the magnetic encoder for zero-position calibration; or When the second zero-position alignment result indicates that the magnetic encoder is ahead, the negative compensation angle value is input into the magnetic encoder for zero-position calibration.
6. The zero-position calibration method according to claim 5, characterized in that, Step S5 includes: Step S51: Obtain a first offset angle based on the first preset value, the first current value, and the second current value; and obtain a second offset angle based on the first preset value, the first current value, and the third current value. Step S52: Calculate a third offset angle by averaging the first offset angle and the second offset angle, and use the positive third offset angle as the first compensation angle and the negative third offset angle as the second compensation angle. Step S53: When the second zero-position alignment result indicates that the magnetic encoder angle is ahead, the second compensation angle is input as a negative compensation angle value into the magnetic encoder for zero-position calibration, and then the process returns to step S2; or When the second zero-position alignment result indicates that the magnetic encoder angle is lagging, the first compensation angle is input into the magnetic encoder as the positive compensation angle value for zero-position calibration, and then the process returns to step S2.
7. The zero-position calibration method according to claim 6, characterized in that, The first offset angle is obtained using the following formula: in, θ1 represents the first offset angle; Iq1' represents the second current value; Iq represents the first current value; Id represents the first preset value.
8. The zero-position calibration method according to claim 6, characterized in that, The second offset angle is obtained using the following formula: in, θ2 represents the second offset angle; Iq2' represents the third current value; Iq represents the first current value; Id represents the first preset value.
9. The zero-position calibration method according to claim 1, characterized in that, The second preset value is 0.
10. The zero-position calibration method according to claim 1, characterized in that, In step S1, the vector sum of the quadrature-axis current and the positive direct-axis current is less than the rated current of the permanent magnet synchronous motor, and the vector sum of the quadrature-axis current and the negative direct-axis current is less than the rated current of the permanent magnet synchronous motor.
Citation Information
Patent Citations
Control method and controller
CN111614288A
Motor rotor reference zero deviation correction method and system
CN112087176A