Initialization method of motor and motor
Through the motor position change detection at the rated current, the phase sequence of the motor is determined, which solves the operational problem caused by uncertainty in the phase sequence during the initial use of the motor, ensuring that the motor drive and feedback phase sequence are consistent, and avoiding motor alarms or speeding.
Patent Information
- Application Number
- CN202411276018.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2025-02-11
AI Technical Summary
During the first commissioning and use of the motor, it is difficult for the operator to determine the correspondence between the phase sequence of the motor UVW and the encoder direction, resulting in uncertainty in the phase sequence of the drive output and the direction of the feedback, which may cause alarms during the motor operation Or speeding.
A method for initializing a motor is proposed. By obtaining the position change of the motor under the rated current, the motor is controlled to increase from the first electrical angle to the second electrical angle, and reduce from the second electrical angle to the first electrical angle, according to the position difference The value is initially detected in phase sequence to determine the phase sequence of motor drive and feedback.
Ensure that the phase sequence of motor drive and feedback is consistent, avoid alarm and speed problems during motor operation, and solve the problem of inability to learn the initial phase angle.
Smart Images

Figure CN119420230A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of motors, and in particular to a method for initializing a motor. Background Art
[0002] When debugging and using a motor for the first time in industrial manufacturing, the operator is often unclear about the correspondence between the motor UVW phase sequence and the encoder direction. This is because when the motor is installed, the direction in which the motor is inserted into the slider is uncertain, or the mounting direction of the grating or magnetic grating on both sides of the motor is uncertain, or the winding direction of the coil is uncertain, so two phase sequence directions may appear. The above reasons lead to uncertainty in the phase sequence of the drive output and the direction of feedback when the motor is used for the first time. Once the drive and feedback directions are opposite, it is easy to cause an alarm or even a motor runaway when the motor is running. Summary of the invention
[0003] The present application proposes a motor initialization method to solve the problem of inconsistency between the motor drive phase sequence and the feedback phase sequence in the prior art, and to solve the problem that certain motion ranges are limited and the initial phase angle cannot be self-learned.
[0004] In order to solve the above technical problems, the present application proposes a method for initializing a motor, including obtaining the first position of the motor at a rated current and a first electrical angle; controlling the motor to increase from the first electrical angle to a second electrical angle, and obtaining the second position at the second electrical angle; controlling the motor to decrease from the second electrical angle to the first electrical angle, and obtaining the third position at the first electrical angle; and performing initial detection of the phase sequence of the motor based on the difference between the second position and the first position, and the difference between the third position and the second position.
[0005] In one embodiment, the initial detection of the phase sequence of the motor is performed based on the difference between the second position and the first position, and the difference between the third position and the second position, including: if the result of subtracting the first position from the second position is greater than zero, and the result of the third position and the second position is less than zero, the motor drive and the motor feedback are in phase; if the result of subtracting the first position from the second position is less than zero, and the result of the third position and the second position is greater than zero, the motor drive and the motor feedback are in anti-phase.
[0006] In one embodiment, the initial detection of the phase sequence of the motor is performed based on the difference between the second position and the first position, and the difference between the third position and the second position, including: if the difference between the second position and the first position, or the difference between the third position and the second position is less than a predetermined number of pulses of the motor, it is determined that the motor is stuck or the input current is too small to make the motor operate.
[0007] In one embodiment, the initial detection of the phase sequence of the motor is performed based on the difference between the second position and the first position, and the difference between the third position and the second position, including: if the result of subtracting the first position from the second position and the result of the third position and the second position are both less than zero or greater than zero at the same time, it is determined that the motor drive is abnormal or the motor feedback is abnormal.
[0008] In one embodiment, the first electrical angle is 0°, and the second electrical angle is 360°; controlling the motor to increase from the first electrical angle to the second electrical angle, and controlling the motor to decrease from the second electrical angle to the first electrical angle are both completed within a predetermined time.
[0009] In one embodiment, the motor initialization method also includes: setting an initial phase angle, performing zero-speed detection at the initial phase angle, and recording an initial position that meets the zero-speed condition; injecting a ramp current into the motor, and calculating the position difference between the current position and the initial position in real time; if the absolute value of the position difference remains less than or equal to a threshold value, the initial phase angle coincides with the current angle, and the current angle is recorded as zero electrical angle; if the absolute value of the position difference is greater than the threshold value and is a positive value before the ramp current injected into the motor reaches the rated current of the motor, the initial phase angle is reversed by half; if the absolute value of the position difference is greater than the threshold value and is a negative value, the initial phase angle is rotated forward by half; repeating the steps of injecting a ramp current into the motor and calculating the position difference between the current position and the initial position in real time until the ramp current injected into the motor reaches the rated current of the motor and is maintained for a period of time, at which time the absolute value of the position difference remains less than or equal to the threshold value, or until half of the initial phase angle is less than a preset angle, and the current angle is zero electrical angle.
[0010] In one embodiment, the initial phase angle coincides with the current angle, and the current angle is recorded as zero electrical angle, including: according to the formula θ = Pos × Pn / Enc - θ i Record the zero electrical angle, where θ is the zero electrical angle, Pos is the current position, Pn is the number of pole pairs, Enc is the motor resolution, θ i is the initial phase angle;
[0011] In one embodiment, the initial phase angle coincides with the current angle, and the current angle is recorded as the zero electrical angle, and then it also includes: performing zero speed detection at the zero electrical angle, and recording the zero electrical position of the zero electrical angle; inputting a ramp current to the motor for the first time, and recording the difference between the current position and the zero electrical position to determine the direction; inputting a positive ramp current to the motor for the second time, and recording the difference between the current position and the zero electrical position to verify that the positive direction is correct; inputting a negative ramp current to the motor for the third time, and recording the difference between the current position and the zero electrical position to verify that the negative direction is correct.
[0012] In one embodiment, the performing zero speed detection at the initial phase angle includes: detecting that the speed feedback of the motor is continuously less than a speed threshold within a preset time.
[0013] In order to solve the above technical problem, the present application proposes a motor, which is configured to run the above initialization method.
[0014] The motor initialization method of the present application includes obtaining the first position of the motor at the rated current and the first electrical angle; controlling the motor to increase from the first electrical angle to the second electrical angle, and obtaining the second position at the second electrical angle; controlling the motor to decrease from the second electrical angle to the first electrical angle, and obtaining the third position at the first electrical angle; performing initial detection of the phase sequence of the motor based on the difference between the second position and the first position, and the difference between the third position and the second position, combined with the injected current. The present application can determine the phase sequence of the motor during the initialization process of the motor, ensuring that the phase sequence of the drive and feedback during the subsequent use of the motor is consistent. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present disclosure will become readily understood. In the accompanying drawings, several embodiments of the present disclosure are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:
[0016] Figure 1 It is a flowchart of the first embodiment of the method for initializing a motor of the present application;
[0017] Figure 2 is a flow chart of a second embodiment of a method for initializing a motor of the present application;
[0018] Figure 3 yes Figure 2 A schematic diagram of current, electrical angle and position in the second embodiment of the initialization method shown;
[0019] Figure 4 is a flow chart of a third embodiment of a method for initializing a motor of the present application;
[0020] Figure 5 yes Figure 4 A schematic diagram of current and position in the third embodiment of the initialization method is shown. DETAILED DESCRIPTION
[0021] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.
[0022] The specific implementation of the present disclosure is described in detail below with reference to the accompanying drawings. Figure 1 , Figure 1 It is a flow chart of the first embodiment of the method for initializing a motor of the present application.
[0023] The present embodiment is applied to a servo system, which includes a driver and a servo motor, a linear motor, and an encoder for feedback on the motor. During the initialization process, it is necessary to ensure that the drive phase sequence and the encoder direction are consistent to avoid the problem of motor alarm or motor runaway. When initializing the motor, the present embodiment mainly injects the rated current into the motor through the driver, thereby setting the motor in the current loop motion mode and adopting the current open loop test. Specifically, the motor of the present embodiment determines the motor phase sequence according to the direction of position change corresponding to the change of current and electrical angle under the rated current, and specifically includes the following steps.
[0024] S11: Obtain a first position of the motor at a rated current and a first electrical angle.
[0025] In this embodiment, the first electrical angle is first determined as the electrical angle of the initial test, which can be set to 0°, and the first position Pos1 of the motor under the rated current is obtained. To ensure the measurement stability, the motor current can be gradually increased to the rated current within 1 second, or within 2 seconds or within 0.5 seconds, which can be set according to the specific situation. In addition, when recording the first position, the rated current can be kept stable for a period of time before measurement, for example, after the output is kept for 1 second.
[0026] Before starting initialization, you can set the basic parameters of the motor, confirm that the encoder receives the signal normally, and set the motor in the current loop mode.
[0027] S12: Control the motor to increase from the first electrical angle to the second electrical angle, and obtain a second position at the second electrical angle.
[0028] This step is to control the positive sequence output of the motor, increase from the first electrical angle to the second electrical angle, and obtain the second position Pos2 under the second electrical angle. In the specific process, the motor can be controlled to increase from the first electrical angle to the second electrical angle within a certain time. In this embodiment, the first electrical angle is set to 0°, the second electrical angle is set to 360°, and the certain time can be set to 2.5s. 0° to 360° can achieve complete positive sequence output. The time of 2.5s can ensure stable output. Other times can also be set according to the actual situation of the motor.
[0029] The second position Pos2 can be obtained by continuously updating during the electrical angle change to avoid large errors when obtaining it at the last moment; or after the electrical angle increases to the second electrical angle, the output can be maintained for 1 second before measuring Pos2 to avoid measurement errors.
[0030] S13: Control the motor to decrease from the second electrical angle to the first electrical angle, and obtain a third position at the first electrical angle.
[0031] After the positive sequence output detection is completed in step S12, the reverse sequence output detection is performed in step S13. The measurement process and principle are the same as step S12. The time parameters can be set with reference to step S12. After the motor is controlled to decrease to the first electrical angle, the third position Pos3 is measured.
[0032] S14: Perform initial detection of the phase sequence of the motor according to the difference between the second position and the first position, and the difference between the third position and the second position.
[0033] Obtain the difference ΔPOS1=Pos2-Pos1 between the second position Pos2 and the first position Pos1, and the difference ΔPOS2=Pos3-Pos2 between the third position Pos3 and the second position Pos2. ΔPOS1 is the position change of the feedback when the motor is driven forward at rated current, and ΔPOS2 is the position change of the feedback when the motor is driven reversely at rated current. Therefore, the drive phase sequence and feedback phase sequence of the motor can be determined based on the two differences. That is, if ΔPOS1>0, ΔPOS2<0, the drive and feedback are in phase, that is, the motor driver and encoder are in phase; if ΔPOS1<0, ΔPOS2>0, the drive and feedback are in anti-phase, that is, the motor driver and encoder are in anti-phase.
[0034] In summary, this embodiment can determine the phase sequence of the motor during the initialization process of the motor, ensuring that the phase sequence of the drive and feedback during subsequent use of the motor is consistent.
[0035] exist Figure 1 Based on the embodiment shown, the present application also proposes another embodiment, which can further increase the sequencing error mechanism in the motor initialization. For details, please refer to Figure 2 , Figure 2 It is a flow chart of the second embodiment of the motor initialization method of the present application.
[0036] S21: Obtain a first position of the motor at a rated current and a first electrical angle.
[0037] S22: Control the motor to increase from the first electrical angle to the second electrical angle, and obtain a second position at the second electrical angle.
[0038] S23: Control the motor to decrease from the second electrical angle to the first electrical angle, and obtain a third position at the first electrical angle.
[0039] S24: Perform initial detection of the phase sequence of the motor according to the difference between the second position and the first position, and the difference between the third position and the second position.
[0040] Steps S21-S24 of this embodiment are similar to steps S11-S14 in the above embodiment, and will not be described in detail. Figure 3 , Figure 3 yes Figure 2 A schematic diagram of current, electrical angle and position in the second embodiment of the initialization method is shown.
[0041] Step S21 corresponds to Figure 3 Steps 1 and 2 in step S22 correspond to Figure 3 Steps 3 and 4 in step S23 correspond to Figure 3 Steps 5 and 6 in . Figure 3 Step 7 stops the detection process and gradually reduces the motor current to 0 within 1 second.
[0042] S25: If the result of subtracting the first position from the second position is greater than zero, and the result of adding the third position to the second position is less than zero, the motor drive and the motor feedback are in phase.
[0043] S26: If the result of subtracting the first position from the second position is less than zero, and the result of adding the third position to the second position is greater than zero, the motor drive and the motor feedback are inverted.
[0044] Steps S25-S26, i.e. determining the phase sequence of the motor drive and the motor feedback, have been described in the first embodiment above, and will not be described in detail. In addition, in this embodiment, a sequencing error mechanism is added, as shown in steps S27-S28.
[0045] S27: If the difference between the second position and the first position, or the difference between the third position and the second position is less than the predetermined number of pulses of the motor, it is determined that the motor is stuck or the input current is too small to operate the motor.
[0046] If the absolute value of ΔPOS1 or ΔPOS2 is less than 100 pulses, it is considered that the motor is stuck or the output setting current is too small to make the motor move.
[0047] S28: If the result of subtracting the first position from the second position and the result of subtracting the third position from the second position are both less than zero or both greater than zero, it is determined that the motor drive is abnormal or the motor feedback is abnormal.
[0048] Regardless of the relationship between the encoder feedback and the driver output phase sequence, if ΔPOS1 and ΔPOS2 are both positive or negative, it is considered that the motor is not running normally in one direction or the encoder feedback reception count is abnormal.
[0049] The initialization processes of the above-mentioned embodiments 1 and 2 both adopt the current open-loop mode. For the linear motor, if its total stroke is less than one pole pitch, the entire test process is adjusted to one pole pitch or half a pole pitch.
[0050] After completing the phase sequence detection and initializing the phase sequence, the present application can further determine the initial phase angle. The encoder used in the motor does not have a fixed initial phase angle after power-on, and the initial phase angle needs to be measured. Traditional methods include: a method of jumping to zero position, which forces the motor to jump to a known electrical angle of 0°, involving a relatively large motor position operation, and is not applicable to certain occasions with limited motion range; it also includes Hall and Z signal phase-finding method, which requires the motor itself to have a Hall signal, and uses the Hall signal to locate the sector. After determining the rough phase angle, when it runs to the Z signal after startup, the phase angle is recalibrated. This method requires the motor to be equipped with a Hall sensor, which is relatively expensive.
[0051] The initial phase angle test method proposed in this application can be implemented separately, that is, after determining the phase sequence by other methods, the initial phase angle is determined by the method proposed in this application. Figure 4 , Figure 4 It is a flow chart of the third embodiment of the method for initializing the motor of the present application, which includes the following steps. This embodiment adopts a smooth micro-commutation method: this method combines pre-positioning and dichotomy to inject current with a ramp. The rated current is selected as the current value to drive the motor and the load. After injecting the current, observe the speed change and judge the direction of movement. If it is forward, reverse the angle to half of the previous direction; if it is reverse, reverse it forward, and repeat this process until an angle is found: inject the rated current, the motor remains stationary, and this angle is the full reactive angle; the reactive angle is 0 or 180 degrees, and finally inject 3 currents to determine the accuracy of the angle. The method of this embodiment also includes: within the minimum range of motion, realizing self-learning of the initial position angle of the motor, which specifically includes the following steps:
[0052] S41: Set the initial phase angle, perform zero speed detection at the initial phase angle, and record the initial position.
[0053] In this embodiment, the motor state is first initialized, and the initial phase angle θ is preset. i =180°, and the angle range is 0°~360°. When the initial phase angle is uncertain, it may be any value between 0°~360°, so the initial phase angle is set to 180°, and binary iteration is used in subsequent judgment steps to gradually converge and finally determine the initial phase angle. In this embodiment, i is set to the number of binary iterations, and the initial value of i is 0.
[0054] After the initial phase angle is preset, firstly, zero speed detection is performed at the initial phase angle, the motor is set to current loop mode, and when the speed feedback of the motor is continuously less than the speed threshold within the preset time, the initial position P0 is recorded, and this position meets the zero speed condition. In this step, the preset time is set to 100ms, and the speed feedback within the time is continuously less than the speed threshold. The speed threshold can be set according to the specific motor, that is, when the speed feedback is close to zero speed, the initial position is recorded.
[0055] S42: Input ramp current to the motor and record the position difference between the current position and the initial position.
[0056] In this step, a current with a ramp is input to the motor, and the position difference ΔP between the current position P1 and the initial position P0 is recorded in real time.
[0057] For the relationship diagram between input current and position feedback in this step, please refer to Figure 5 , Figure 5 yes Figure 4 A schematic diagram of current and position in the third embodiment of the initialization method is shown.
[0058] In this embodiment, the position difference ΔP is used to determine the final zero electrical angle. Specifically,
[0059] S43: If the absolute value of the position difference is greater than the threshold and is a positive value, the initial phase angle is reversed by half.
[0060] If the absolute value of the position difference is greater than the threshold and is positive, that is, the motor is running in the positive direction, the binary division number i+=1 is used in the binary division iteration; the angle search range is shortened to 0.5*i*180°; the initial phase angle is updated to: θ i =θ i -0.5*i*180°.
[0061] S44: If the absolute value of the position difference is greater than the threshold and is a negative value, the initial phase angle is rotated forward by half.
[0062] If the absolute value of the position difference is greater than the threshold and is negative, that is, the motor running direction is negative, the binary number i+=1; shorten the angle search range to 0.5*i*180°; electrical angle update: θ i =θ i +0.5*i*180°.
[0063] Furthermore, in the judgment of steps S43 and S44, the judgment needs to be made when the ramp current injected into the motor has not yet reached the rated current of the motor.
[0064] S45: If the absolute value of the position difference is less than or equal to the threshold, record the zero electrical angle based on the initial phase angle.
[0065] This step is judged when the ramp current injected into the motor is added to the rated current of the motor and maintained for a period of time.
[0066] Steps S42-S44 are repeated until the absolute value of the position difference is less than or equal to the threshold, or until half of the initial phase angle is less than a preset angle, that is, the initial phase angle is converged using the dichotomy method.
[0067] After the initial phase angle is converged, the zero electrical angle can be determined based on the initial phase angle, specifically according to the formula θ = Pos × Pn / Enc - θ i Record the zero electrical angle, where θ is the zero electrical angle, Pos is the current position, Pn is the number of pole pairs, Enc is the motor resolution, θ i is the initial phase angle.
[0068] In the case of this step, the initial position angle coincides with the current angle, and the current angle is recorded as zero electrical angle.
[0069] The above steps S41-S45 can determine the zero electrical angle and complete the initialization of the phase angle. When recording the zero electrical angle, the rated current can be input for a certain time, such as 50ms, to ensure the stability of the data.
[0070] This embodiment can further verify the accuracy of the zero electrical angle, as shown in the following steps S46-S47.
[0071] S46: Perform zero speed detection at the zero electrical angle and record the zero electrical position of the zero electrical angle.
[0072] In this step, zero speed detection is adopted at zero electrical angle, and the speed feedback of the detection motor is continuously less than the speed threshold within a preset time. The speed threshold in this step S46 is also set to a speed value that can be considered as zero speed, and the preset time can be set to 300ms.
[0073] S47: Input a ramp current to the motor for the first time, and record the difference between the current position and the zero-power position to determine the direction; input a positive ramp current to the motor for the second time, and record the difference between the current position and the zero-power position to verify that the positive direction is correct; input a negative ramp current to the motor for the third time, and record the difference between the current position and the zero-power position to verify that the negative direction is correct.
[0074] In step S47, when the current is input for the first time and the difference between the current position and the zero position is greater than a threshold, the direction can be determined and the second and third inputs can be continued. The threshold can be set to 1°. If it is less than the threshold, an alarm is output, that is, the motor needs to be checked for errors.
[0075] This embodiment combines pre-positioning and dichotomy, injects current with a ramp, observes the speed change, and determines the direction of movement. If it is forward, reverse the angle to half of the previous direction; if it is reverse, reverse it forward, and repeat this process until an angle is found, which is the fully reactive angle; the reactive angle is 0 or 180 degrees, and finally current is injected three times to test the accuracy of the angle, thereby completing the initialization of the phase angle.
[0076] The present application also proposes a motor that can implement the above initialization method. After the motor completes phase sequence confirmation and phase angle initialization, the accuracy and safety of the motor's operation can be ensured.
[0077] In the above description of this specification, unless otherwise clearly specified and limited, the terms "fixed", "installed", "connected" or "connected" should be understood in a broad sense. For example, with regard to the term "connection", it can be a fixed connection, a detachable connection, or an integral one; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, or it can be the internal connection of two elements or the interaction relationship between two elements. Therefore, unless otherwise clearly defined in this specification, those skilled in the art can understand the specific meanings of the above terms in this application according to the specific circumstances.
[0078] According to the above description of this specification, those skilled in the art may also understand that the terms used below, such as "up", "down", "front", "back", "left", "right", "length", "width", "thickness", "vertical", "horizontal", "top", "bottom", "inside", "outside", "axial", "radial", "circumferential", "center", "longitudinal", "lateral", "clockwise" or "counterclockwise", etc., which indicate the orientation or position relationship, are based on the orientation or position relationship shown in the drawings of this specification, and are only for the purpose of facilitating the explanation of the scheme of the present application and simplifying the description, rather than explicitly or implicitly indicating that the device or element involved must have the specific orientation, be constructed and operate in a specific orientation. Therefore, the above-mentioned orientation or position relationship terms cannot be understood or interpreted as limitations on the scheme of the present application.
[0079] In addition, the terms "first" or "second" used in this specification to refer to numbers or ordinals are only used for descriptive purposes and cannot be understood as explicitly or implicitly indicating relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of this specification, the meaning of "plurality" is at least two, such as two, three or more, etc., unless otherwise clearly and specifically defined.
[0080] Although this specification has shown and described multiple embodiments of the present application, it is obvious to those skilled in the art that such embodiments are provided only by way of example. Those skilled in the art will think of many changes, modifications and alternatives without departing from the thought and spirit of the present application. It should be understood that in the process of practicing the present application, various alternatives to the embodiments of the present application described herein can be adopted. The attached claims are intended to limit the scope of protection of the present application, and therefore cover the modular composition, equivalent or alternatives within the scope of these claims.
Claims
1. A motor initialization method, characterized in that: include: Obtaining a first position of the motor at a rated current and a first electrical angle; Controlling the motor to increase from a first electrical angle to a second electrical angle, and obtaining a second position at the second electrical angle; Controlling the motor to decrease from the second electrical angle to the first electrical angle, and obtaining a third position at the first electrical angle; An initial detection of the phase sequence of the motor is performed according to a difference between the second position and the first position, and a difference between the third position and the second position.
2. The motor initialization method according to claim 1, characterized in that: The initial detection of the phase sequence of the motor is performed according to the difference between the second position and the first position, and the difference between the third position and the second position, including: If the result of subtracting the first position from the second position is greater than zero and the result of adding the third position to the second position is less than zero, then the motor drive and the motor feedback are in phase; If the result of subtracting the first position from the second position is less than zero and the result of adding the third position to the second position is greater than zero, the motor drive and the motor feedback are in reverse phase.
3. The motor initialization method according to claim 2, characterized in that: The initial detection of the phase sequence of the motor is performed according to the difference between the second position and the first position, and the difference between the third position and the second position, including: If the difference between the second position and the first position, or the difference between the third position and the second position is less than a predetermined number of pulses of the motor, it is determined that the motor is stuck or the input current is too small to operate the motor.
4. The motor initialization method according to claim 2, characterized in that: The initial detection of the phase sequence of the motor is performed according to the difference between the second position and the first position, and the difference between the third position and the second position, including: If the result of subtracting the first position from the second position and the result of subtracting the third position from the second position are both less than zero or both greater than zero, it is determined that the motor drive is abnormal or the motor feedback is abnormal.
5. The motor initialization method according to claim 1, characterized in that: The first electrical angle is 0°, and the second electrical angle is 360°; the controlling of the motor to increase from the first electrical angle to the second electrical angle, and the controlling of the motor to decrease from the second electrical angle to the first electrical angle are both completed within a predetermined time.
6. The motor initialization method according to claim 1, characterized in that: The motor initialization method further includes: Set the initial phase angle, perform zero-speed detection at the initial phase angle, and record the initial position that meets the zero-speed condition; Injecting a ramp current into the motor and calculating the position difference between the current position and the initial position in real time; If the ramp current injected into the motor is added to the rated current of the motor and maintained for a period of time, and the absolute value of the position difference is always kept less than or equal to the threshold, then the initial phase angle coincides with the current angle, and the current angle is recorded as zero electrical angle; If the absolute value of the position difference is greater than the threshold value and is positive before the ramp current injected by the motor reaches the rated current of the motor, the initial phase angle is reversed by half; if the absolute value of the position difference is greater than the threshold value and is negative, the initial phase angle is forward rotated by half; Repeat the steps of injecting a ramp current into the motor and calculating the position difference between the current position and the initial position in real time until the ramp current injected into the motor is added to the rated current of the motor and maintained for a period of time, at which time the absolute value of the position difference is always kept less than or equal to the threshold, or until half of the initial phase angle is less than a preset angle and the current angle is zero electrical angle.
7. The motor initialization method according to claim 6, characterized in that: The initial phase angle coincides with the current angle, and the current angle is recorded as zero electrical angle, including: According to the formula θ=Pos×Pn / Enc-θ i Record the zero electrical angle, where θ is the zero electrical angle, Pos is the current position, Pn is the number of pole pairs, Enc is the motor resolution, θ i is the initial phase angle.
8. The motor initialization method according to claim 6, characterized in that: The initial phase angle coincides with the current angle, and the current angle is recorded as zero electrical angle, and then the following further includes: Perform zero speed detection at the zero electrical angle, and record the zero electrical position of the zero electrical angle; Inputting a ramp current to the motor for the first time, and recording the difference between the current position and the zero-power position to determine the direction; Inputting a forward ramp current to the motor for the second time, and recording the difference between the current position and the zero-power position to verify that the forward direction is correct; A negative ramp current is input to the motor for the third time, and the difference between the current position and the zero-power position is recorded to verify that the negative direction is correct.
9. The motor initialization method according to claim 6, characterized in that: The zero-speed detection at the initial phase angle comprises: It is detected that the speed feedback of the motor is continuously less than a speed threshold within a preset time.
10. A motor, characterized in that: The motor is configured to run the motor initialization method according to any one of claims 1-9.