Self-calibration method for initial angle of rotary transformer zero position of permanent magnet synchronous motor
Technical Field
The invention belongs to the technical field of motor control, and particularly relates to a method for self-calibrating a zero initial angle of a rotary transformer of a permanent magnet synchronous motor.
Background
The motor and the motor controller are core parts of the hybrid electric vehicle, and the performance of the motor and the motor controller directly determine the performance of the whole vehicle. For the current motor structure, the motor stator and the rotor are positioned in the shell, and the rotary transformer (referred to as rotary transformer) is positioned on the same side of the motor stator and the rotor. The rotary transformer mainly has the function of monitoring the position of the motor rotor relative to the stator in real time, so that the motor controller calculates the rotating speed of the motor at the moment through the position signal, and the rotary transformer is a very important signal. If the position signal detected by the rotary transformer is inaccurate, the calculated rotating speed of the motor is not prepared enough, the motor cannot be well controlled, and three-phase overcurrent of the motor is easy to occur.
The existing calibration scheme for the rotational-transformation zero position of the permanent magnet synchronous motor basically executes calibration on a rack and depends on an external prime motor driving device, such as an engine or a dragging motor; moreover, the calibration process is complex, the automatic calibration is difficult to realize depending on the familiarity of operators, and the calibration efficiency is low.
Disclosure of Invention
In order to solve the technical problems, the invention aims to provide a method for self-calibrating the initial zero-position angle of the rotary transformer of the permanent magnet synchronous motor, which does not need external power drive, has low requirement on personnel and has high efficiency.
In order to achieve the first object, the invention adopts the following technical scheme:
a method for self-calibrating initial zero-position angle of rotary transformer of a permanent magnet synchronous motor is characterized in that after a motor production line is offline, a motor is connected with a motor controller, a high-voltage power supply and an upper computer are also connected with the motor controller, and after the power supply is switched on, an automatic calibration process is started, and the method specifically comprises the following steps:
step S1, the upper computer sends out a rotation change automatic calibration request instruction to the motor controller through CAN communication, and after the motor controller receives the self-calibration request instruction, the step S2 is automatically executed, and the pre-calibration step is carried out;
step S2, using the current given instruction and the angle given instruction to make the motor rotor drawn to the approximate zero position, recording the degree of rotation theta1Obtaining approximate rotation zero compensation angle theta1Then, automatically executing step S3, and entering a dynamic calibration step;
step S3, pre-calibrating the acquired rotation zero compensation angle theta by using the step S21(ii) a Firstly, a rotation speed ring is utilized, the given rotation speed is n r/min, the rotation speed of the motor reaches n r/min, when the program detects that the rotation speed of the motor is close to n r/min, the motor automatically enters a current ring, the given current is Id-Iq-0, the torque output of the motor is 0, the motor naturally decelerates due to friction resistance, and in the deceleration stage of the motor, a dynamically calibrated rotation zero compensation angle theta is calculated according to the average value of the ratio of d-axis voltage to rotation speed and the average value of the ratio of q-axis voltage to rotation speed2After the dynamic calibration step S3 is finished, automatically executing step S4, and entering a dynamic verification step;
step S4, using the rotational zero compensation angle theta obtained in step S21And the dynamically calibrated rotation zero compensation angle theta obtained in the step S32The sum of which is used as the final rotation compensation angle theta3I.e. theta3=θ1+θ2Verifying the calibration result, if the verification is passed, entering step S5, and if the verification is failed, entering step S6;
step S5, rotating the compensation angle theta3Writing the calibration information into a chip nonvolatile storage area of the motor controller, and feeding back the calibration success information to an upper computer; each time the motor is later powered on, the motor controller automatically reads from the nonvolatile storage area of the motor controllerTaking a rotation variation compensation angle theta3Compensating the rotation angle;
step S6: feeding back calibration failure information to the upper computer; the operator performs the recalibration process after checking according to the failure information, and repeats steps S1-S6.
As a preferable scheme: the dynamically calibrated rotation zero compensation angle theta in the step S32The calculation process of (2) is as follows: in the motor deceleration stage, the ratio of d-axis voltage to rotating speed Ud1/n1, Ud2/n2, … and Udx/nx is obtained by taking each time step as a unit, the ratio of q-axis voltage to rotating speed Uq1/n1, Uq2/n2, … and Uqx/nx are obtained at the same time, and finally the average value of the ratio of d-axis voltage to rotating speed Udnavg and the average value of the ratio of q-axis voltage to rotating speed Uqnavg are obtained; using the formula theta2Acquiring a dynamically calibrated compensation angle theta of atan2(Uqnavg, Udnavg) -pi/22。
As a preferable scheme: the specific verification step in step S4 is as follows: firstly, a rotating speed ring is utilized, the given rotating speed is m r/min, m is larger than n, the rotating speed of a motor reaches m r/min, when the rotating speed of the motor is detected to be close to m r/min, the motor automatically enters a current ring, the given current is Id-Iq-0, the torque output of the motor is 0 at the moment, the motor naturally decelerates due to friction resistance, and d-axis voltages Ud1, Ud2, … and Udy are obtained by taking each time step as a unit in the motor deceleration stage; and finally, obtaining the average value Udavg of the d-axis voltage, if the average value Udavg of the d-axis voltage is smaller than a set value, considering that the automatic calibration is successful, and if the average value Udavg of the d-axis voltage is larger than the set value, considering that the automatic calibration is failed.
As a preferable scheme: the pre-calibration comprises the following specific steps: and giving x amperes of d-axis current Id, 0 amperes of q-axis current Iq and 0 radian of a rotor angle, so that electromagnetic force is generated in the zero position direction of the rotor, and the rotor is pulled to a position approximate to the zero position.
As a preferable scheme: the time step is 100 us.
The method is innovative in that only a single motor is used on the premise of not using an external dragging device (a motor rack), and a single motor controller realizes the automatic calibration of the rotary zero position of the motor; particularly, by adopting a mode of combining pre-calibration and dynamic calibration, an external dragging device is not needed in the calibration process, so that the automation of the calibration process can be realized, and the calibration efficiency is improved; and the method of the invention has low requirements for operators.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments of the application and, together with the description, serve to explain the application and are not intended to limit the application.
FIG. 1 is a schematic overall flow diagram of the process of the present invention;
FIG. 2 is a schematic diagram of a hardware connection structure for motor calibration according to the present invention;
FIG. 3 is a schematic representation of the pre-calibration step of the present invention;
fig. 4 is a schematic diagram of the dynamic calibration and dynamic verification of the present invention.
Detailed Description
The invention is further described with reference to the following figures and examples.
As shown in fig. 1 to 4, in this embodiment, a method for self-calibrating a zero initial angle of a rotational transformer of a permanent magnet synchronous motor is provided, where after a motor production line is offline, a motor is connected to a motor controller, and a high-voltage power supply and an upper computer are also connected to the motor controller, and after the power supply is turned on, an automatic calibration process is performed, and the method specifically includes the following steps:
step S1, the upper computer sends out a rotation change automatic calibration request instruction to the motor controller through CAN communication, and after the motor controller receives the self-calibration request instruction, the step S2 is automatically executed, and the pre-calibration step is carried out;
step S2, using the current given instruction and the angle given instruction to make the motor rotor drawn to the approximate zero position, recording the degree of rotation theta1Obtaining approximate rotation zero compensation angle theta1Then, automatically executing step S3, and entering a dynamic calibration step;
the pre-calibration step S2 is based on the following principle: given that the d-axis current Id is x amperes, the q-axis current Iq is 0 amperes, and the rotor angle is 0 radians, the given effect is to generate electromagnetic force in the direction of the zero position of the rotor, and pull the rotor to a position close to the zero position, as shown in fig. 3.
It should be noted that the S2 pre-calibration is the basis and precondition of the S3 dynamic calibration, and if the S2 pre-calibration is not performed, the S3 dynamic calibration is directly performed, which may not control the motor to normally operate, and even may cause a runaway accident.
Step S3, pre-calibrating the acquired rotation zero compensation angle theta by using the step S21(ii) a Firstly, a rotating speed ring is utilized, the given rotating speed is n r/min, the rotating speed of the motor reaches n r/min, when the program detects that the rotating speed of the motor is close to n r/min, the motor automatically enters a current ring, the given current Id is 0-Iq, the torque output of the motor is 0, the motor naturally decelerates due to friction resistance, and the dynamically calibrated rotation zero compensation angle theta is calculated in the deceleration stage of the motor2The calculation process is as follows: in the motor deceleration stage, the ratio Ud1/n1, Ud2/n2, … and Udx/nx of the d-axis voltage to the rotating speed is obtained by taking each time step as a unit, such as 100us, the ratio Uq1/n1, Uq2/n2, … and Uqx/nx are obtained at the same time, and finally the average value Udnavg of the ratio of the d-axis voltage to the rotating speed and the average value Uqnavg of the ratio of the q-axis voltage to the rotating speed are obtained; using the formula theta2Acquiring a dynamically calibrated compensation angle theta of atan2(Uqnavg, Udnavg) -pi/22. After the dynamic calibration step S3 is finished, automatically executing a step S4, and entering a dynamic verification step;
step S4, using the rotational zero compensation angle theta obtained in step S21And the dynamically calibrated rotation zero compensation angle theta obtained in the step S32The sum of which is used as the final rotation compensation angle theta3I.e. theta3=θ1+θ2The method comprises the steps that a rotating speed loop is utilized, a given rotating speed is m r/min, m is larger than n, the rotating speed of a motor reaches m r/min, when the rotating speed of the motor is detected to be close to m r/min, the motor automatically enters a current loop, the given current is Id-Iq-0, the torque output of the motor is 0 at the moment, the motor naturally decelerates due to friction resistance, and d-axis voltages Ud1, Ud2, … and Udy are obtained in each time step in the motor deceleration stage; finally obtaining the average value Udavg of the d-axis voltage, and if the average value Udavg of the d-axis voltage is smaller than a set value, determining that the d-axis voltage is automaticIf the calibration is successful, the step S5 is carried out, if the average value Udavg of the d-axis voltage is larger than the set value, the automatic calibration is considered to be failed, and the step S6 is carried out;
step S5, rotating the compensation angle theta3Writing the calibration information into a chip nonvolatile storage area of the motor controller, and feeding back the calibration success information to an upper computer; automatically reading the rotation change compensation angle theta from the nonvolatile storage area of the motor controller when the motor is electrified later3Compensating the rotation angle;
step S6: feeding back calibration failure information to the upper computer; the operator performs the recalibration process after checking according to the failure information, and repeats steps S1-S6.