Method for identifying initial angle of permanent magnet synchronous motor by frequency converter

The method of identifying the initial angle of a permanent magnet synchronous motor by using a frequency converter, combined with a control module and an incremental encoder and a current generation module, gradually narrows the electrical angle limit range, solving the problems of high cost and low accuracy in the existing technology, and realizing low-cost and high-precision detection of the initial angle of a permanent magnet synchronous motor.

CN116015115BActive Publication Date: 2026-05-15XJ SCHINDLER XUCHANG ELEVATOR
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
XJ SCHINDLER XUCHANG ELEVATOR
Filing Date
2022-12-30
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing technologies for detecting the initial position of a permanent magnet synchronous motor rotor suffer from problems such as high cost, low accuracy, or high complexity. In particular, the high-frequency signal injection method requires complex processing and filtering, which leads to phase delay. Absolute sensors are expensive, incremental encoders have complex and expensive programs, and the direct electrical signal method is not accurate enough when the rotor position difference is large.

Method used

The method of identifying the initial angle of a permanent magnet synchronous motor using a frequency converter utilizes a control module, a current generation module, a permanent magnet synchronous motor rotation angle and direction judgment module, and an incremental encoder. By successively narrowing the electrical angle limit range, the rotation direction and angle are determined by the pulse signal output by the incremental encoder. Combined with the current generation module to drive the permanent magnet synchronous motor to rotate, the method gradually approaches the true electrical angle.

Benefits of technology

It achieves high-precision detection of the initial angle of a permanent magnet synchronous motor at low cost, and the detection can be completed with only a small angle rotation of the permanent magnet synchronous motor, which simplifies the procedure and reduces costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116015115B_ABST
    Figure CN116015115B_ABST
Patent Text Reader

Abstract

A method for identifying initial angle of permanent magnet synchronous door machine by frequency converter, based on a device for identifying initial angle of permanent magnet synchronous door machine by frequency converter, the device comprising: a control module, a current generating module, a permanent magnet synchronous door machine rotation angle and direction judging module, an incremental encoder; the method steps are as follows: step 1), preset: initialization rotation times Count=0, flag bit Flag=0, maximum times MaxCount is a set value; preset: lower limit LowAngle of electric angle is 0 degree, upper limit HighAngle of electric angle is 360 degrees, preset: electric angle Angle is taken as 180 degrees, represented as: LowAngle=0°; HighAngle=360°; Angle=180°.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of elevator safety technology, and in particular to a method for a frequency converter to identify the initial angle of a permanent magnet synchronous door operator. Background Technology

[0002] The method for detecting the initial electrical angle of the permanent magnet synchronous gantry crane rotor is an essential part of the position sensor speed control system. Currently, there are several main methods:

[0003] (1) High-frequency signal injection detection technology. The high-frequency signal injection method mainly utilizes the salient pole effect of the permanent magnet synchronous gantry to detect the rotor position. By injecting a high-frequency rotating signal to cause the difference in the saturation degree of the magnetic circuit of the d and q axes of the permanent magnet synchronous gantry, the rotor position is detected. At the same time, the N / S polarity of the permanent magnet is determined based on the nonlinear magnetization characteristics of the stator core (this method is more suitable for PMSMs with a high salient pole ratio). Alternatively, the rotor position can be obtained by combining pulsed high-frequency signal injection with a lookup table method, and the magnetic pole polarity can be identified by the change in inductance caused by magnetic field saturation (this method is more suitable for surface-mounted PMSMs).

[0004] While no additional cost is required, the high-frequency signal injection method necessitates complex processing of the high-frequency signal carrying information about the permanent magnet synchronous gantry crane rotor. This requires multiple filters, which can cause phase delays and reduce position accuracy. Furthermore, the entire processing is extremely complex and difficult to implement.

[0005] (2) The initial position of the rotor magnetic poles is obtained by using sensors with absolute position information, such as absolute photoelectric encoders or rotary transformers. This method has high accuracy and is easy to implement, but it requires higher costs.

[0006] (3) An incremental photoelectric encoder with simple magnetic pole positioning function is adopted. It outputs two sets of information: one set is used to detect the magnetic pole position, with absolute information function, and three pulses U, V, and W that are 120° out of phase with each other; the other set is exactly the same as the incremental photoelectric encoder, outputting three square wave pulses A, B, and Z. The approximate position of the rotor can be determined first using the U, V, and W signals. Then, while the stator current is applied, the initial angular position of the rotor is reduced according to the order of the A and B signals. The required accuracy is achieved through multiple cycles.

[0007] This method can obtain a high-precision initial rotor position angle based on a small rotor rotation, but the program is relatively complex and places high demands on the photoelectric encoder, which still requires a higher cost.

[0008] (4) Apply a DC signal to the permanent magnet synchronous gantry machine to make the rotor of the permanent magnet synchronous gantry machine rotate and lock to a specified angle.

[0009] It requires no additional cost, is very easy to implement in terms of program, and has high precision. The obtained rotor preset electrical angle is the rotor's actual electrical angle. However, if the actual rotor position differs significantly from the specified position, it will cause the rotor to rotate excessively, which is not allowed in most practical applications. Summary of the Invention

[0010] To avoid the drawbacks of current technologies, a method for identifying the initial angle of a permanent magnet synchronous gantry crane using a frequency converter is proposed.

[0011] A method for identifying the initial angle of a permanent magnet synchronous gantry crane using a frequency converter, based on a device for identifying the initial angle of a permanent magnet synchronous gantry crane using a frequency converter, the device comprising: a control module, a current generation module, a permanent magnet synchronous gantry crane rotation angle and direction judgment module, and an incremental encoder;

[0012] This includes the following steps:

[0013] Step 1) Preset: Initialize rotation count Count=0, flag flag=0, maximum count MaxCount is the set value; Preset: lower limit of electrical angle LowAngle is 0 degrees, upper limit of electrical angle HighAngle is 360 degrees, preset: electrical angle Angle is 180 degrees, represented as: LowAngle=0°; HighAngle=360°; Angle=180°;

[0014] The meaning of initial rotation count is as follows: Electrical angle learning is a process of gradually narrowing the limit range based on the rotation direction of the permanent magnet synchronous gantry and the current upper and lower limits to approach the true value. Each time the permanent magnet synchronous gantry rotates, a judgment is made, and the upper and lower limits are narrowed once. Therefore, the more rotations there are, the more judgments are made, and the more accurate the learned electrical angle value will be. After system initialization, the permanent magnet synchronous gantry has not yet performed any rotation judgments, so the initial rotation count is set to 0.

[0015] The maximum number of rotations is used to constrain the accuracy of the learned electrical angle. If the permanent magnet synchronous gantry can still rotate after multiple judgments, it means that there is still an error between the current preset electrical angle and the actual electrical angle. However, if the number of rotations reaches the maximum number of rotations, it means that the error between them meets the requirements and there is no need to continue.

[0016] The meaning of the upper and lower limits of electrical angle: The range in which the actual electrical angle lies. Initially, the upper and lower limit range is 360°, and the actual electrical angle is definitely in this range. After repeated judgments to narrow down the range in which the actual electrical angle lies, the relative accurate value of the actual electrical angle is finally obtained.

[0017] Preset electrical angle: When the frequency converter continuously supplies sufficient current to the permanent magnet synchronous gantry machine at this angle, a torque will be generated to drive the permanent magnet synchronous gantry machine to rotate until the actual electrical angle coincides with this electrical angle and then the rotation stops.

[0018] Step 2) Apply the rated torque to the permanent magnet synchronous gantry crane according to the preset electrical angle, and start timing at the same time;

[0019] Step 3) If the control module receives more than X pulses of permanent magnet synchronous gantry rotation within the set time, where X ≥ 1, then proceed to step 4); if the number of pulses received after the set time is less than X, then proceed to step 9).

[0020] Step 4) Set the number of rotations Count = Count + 1, and check if the current number of rotations Count is less than the maximum number of rotations MaxCount. If it is less, proceed to Step 5); otherwise, proceed to Step 8.

[0021] Step 5): The control module reads the signal from the permanent magnet synchronous door operator rotation angle and direction judgment module from the signal input terminal to determine the rotation direction of the permanent magnet synchronous door operator: if it is forward, it means that the current electrical angle of the permanent magnet synchronous door operator is smaller than the preset electrical angle, and proceed to step 6); if it is reverse, it means that the current electrical angle of the permanent magnet synchronous door operator is larger than the preset electrical angle, and proceed to step 7).

[0022] The rule for determining the forward and reverse rotation of a permanent magnet synchronous gantry crane is as follows: if the electrical angle gradually increases as the motor rotates, the rotation is forward; if the electrical angle gradually decreases as the motor rotates, the rotation is reverse.

[0023] Step 6) Assign the value of the preset electrical angle Angle from Step 2) to the current preset electrical angle upper limit HighAngle, while keeping the current preset electrical angle lower limit LowAngle unchanged. Then, the current preset electrical angle Angle = (current preset electrical angle upper limit HighAngle + current preset electrical angle lower limit LowAngle) / 2, as shown below:

[0024] Let: HighAngle=Angle; LowAngle=LowAngle;

[0025] Angle=(HighAngle+LowAngle) / 2;

[0026] Then, return to step 2).

[0027] Step 7) Assign the preset electrical angle Angle from Step 2) to the current preset electrical angle lower limit angle LowAngle, while keeping the current preset electrical angle upper limit HighAngle unchanged. Then, the current electrical angle Angle = (current preset electrical angle upper limit HighAngle + current preset electrical angle lower limit LowAngle) / 2, as shown below:

[0028] Let: LowAngle=Angle, HighAngle=HighAngle,

[0029] Angle=(HighAngle+LowAngle) / 2;

[0030] Then, return to step 2).

[0031] Step 8) Determine that the current preset electrical angle Angle (i.e., Step 2) is the actual electrical angle. The preset electrical angle detection of the permanent magnet synchronous door machine is completed, and the step ends.

[0032] Step 9): Check if the number of rotations (Count) is 0. If it is not 0, proceed to step 8. If it is 0, proceed to step 10.

[0033] Step 10): Determine if the flag is 3. If it is not 3, proceed to step 11. If it is 3, proceed to step 12.

[0034] Step 11): Increment the original flag value by 1 to obtain the new flag value. When the new flag value is 1, 2, or 3, the preset electrical angles are -90°, 0°, and 90°, respectively. The upper limits of the electrical angles are 90°, 180°, and 270°, respectively, and the lower limits of the electrical angles are -270°, -180°, and -90°, respectively. Then return to Step 2).

[0035] Step 12) If the system is found to have an error, the process ends.

[0036] The present invention provides a method for identifying the initial angle of a permanent magnet synchronous door operator. The implementation process is very simple, requiring only the addition of an ordinary incremental encoder, which is low in cost. At the same time, it can detect the initial angle of the permanent magnet synchronous door operator when it rotates only a very small angle (almost imperceptible). Therefore, this device and method can be widely used in practice. Attached Figure Description

[0037] Figure 1 This is a structural block diagram of a device for identifying the initial angle of a permanent magnet synchronous gantry crane using a frequency converter, according to the present invention.

[0038] Figure 2 This is a flowchart of a method for identifying the initial angle of a permanent magnet synchronous gantry crane using a frequency converter, according to the present invention.

[0039] Figure 3 This is a schematic diagram of the initial angle of the permanent magnet synchronous gantry crane identified by the frequency converter in Example 1.

[0040] Figure 4 This is a schematic diagram of the initial angle of the permanent magnet synchronous gantry crane identified by the frequency converter in Example 2. Detailed Implementation

[0041] This invention provides a method for identifying the initial angle of a permanent magnet synchronous gantry crane using a frequency converter. The method is based on a device for identifying the initial angle of a permanent magnet synchronous gantry crane using a frequency converter, such as... Figure 1 As shown, the device includes: a control module, a current generation module, a permanent magnet synchronous door operator rotation angle and direction judgment module, and an incremental encoder. The current generation signal output terminal of the control module is connected to the control signal input terminal of the current generation module; the control signal output terminal of the current generation module is connected to the drive signal input terminal of the permanent magnet synchronous door operator; the incremental encoder is used to measure the rotation pulses of the permanent magnet synchronous door operator; the signal output terminal of the incremental encoder is connected to the signal input terminal of the permanent magnet synchronous door operator rotation angle and direction judgment module, and the signal output terminal of the permanent magnet synchronous door operator rotation angle and direction judgment module is connected to the signal input terminal of the control module.

[0042] An incremental encoder is installed on the permanent magnet synchronous gantry crane. When the permanent magnet synchronous gantry crane rotates, the incremental encoder outputs two square waves that are 90 degrees out of phase. The control module can determine the angle that the permanent magnet synchronous gantry crane has rotated based on the square waves.

[0043] The incremental encoder outputs A / B pulse signals when the permanent magnet synchronous door machine rotates. The A / B pulse signals are two square waves that are 90 degrees out of phase, that is, the A pulse signal and the B pulse signal are 1 / 4 cycle apart. When the permanent magnet synchronous door machine rotates one revolution, the incremental encoder outputs a fixed number of A / B pulse signals. The number of A / B pulses is used to determine how much the permanent magnet synchronous door machine has rotated, and the difference between the A and B phases is used to determine whether the permanent magnet synchronous door machine is rotating forward or backward.

[0044] The permanent magnet synchronous gate operator rotation angle and direction judgment module determines the angle turned and whether the permanent magnet synchronous gate operator is rotating forward or backward based on the output pulse signal of the received incremental encoder, and transmits this data to the control module. The control module determines the current to be generated based on the rotation angle and rotation direction parameters parsed from the currently received signal, and outputs a signal to the current generation module based on the current.

[0045] The current generating module generates a current with a set electrical angle and a set magnitude based on the signal received from the control module, thereby generating torque to drive the permanent magnet synchronous gantry machine to rotate.

[0046] The method of the present invention includes the following steps:

[0047] Step 1) Preset: Initialize rotation count Count = 0, flag flag = 0, maximum count MaxCount is the set value; Preset: lower limit of electrical angle LowAngle is 0 degrees, upper limit of electrical angle HighAngle is 360 degrees, Preset: electrical angle Angle is set to 180 degrees, represented as:

[0048] LowAngle=0°; HighAngle=360°; Angle=180°;

[0049] The meaning of initial rotation count is as follows: Electrical angle learning is a process of gradually narrowing the limit range based on the rotation direction of the permanent magnet synchronous gantry and the current upper and lower limits to approach the true value. Each time the permanent magnet synchronous gantry rotates, a judgment is made, and the upper and lower limits are narrowed once. Therefore, the more rotations there are, the more judgments are made, and the more accurate the learned electrical angle value will be. After system initialization, the permanent magnet synchronous gantry has not yet performed any rotation judgments, so the initial rotation count is set to 0.

[0050] The maximum number of rotations is used to constrain the accuracy of the learned electrical angle. If the permanent magnet synchronous gantry can still rotate after multiple judgments, it means that there is still an error between the current preset electrical angle and the actual electrical angle. However, if the number of rotations reaches the maximum number of rotations, it means that the error between them meets the requirements and there is no need to continue.

[0051] The meaning of the upper and lower limits of electrical angle: The range in which the actual electrical angle lies. Initially, the upper and lower limit range is 360°, and the actual electrical angle is definitely in this range. After repeated judgments to narrow down the range in which the actual electrical angle lies, the relative accurate value of the actual electrical angle is finally obtained.

[0052] Preset electrical angle: When the frequency converter continuously supplies sufficient current to the permanent magnet synchronous gantry machine at this angle, a torque will be generated to drive the permanent magnet synchronous gantry machine to rotate until the actual electrical angle coincides with this electrical angle and then the rotation stops.

[0053] Step 2) Apply the rated torque to the permanent magnet synchronous gantry crane according to the preset electrical angle, and start timing at the same time;

[0054] Step 3) If the control module receives more than X pulses of permanent magnet synchronous gantry rotation within the set time, where X ≥ 1, then proceed to step 4); if the number of pulses received after the set time is less than X, then proceed to step 9).

[0055] Step 4) Set the number of rotations Count = Count + 1, and check if the current number of rotations Count is less than the maximum number of rotations MaxCount. If it is less, proceed to Step 5); otherwise, proceed to Step 8.

[0056] Step 5): The control module reads the signal from the permanent magnet synchronous door operator rotation angle and direction judgment module from the signal input terminal to determine the rotation direction of the permanent magnet synchronous door operator: if it is forward, it means that the current electrical angle of the permanent magnet synchronous door operator is smaller than the preset electrical angle, and proceed to step 6); if it is reverse, it means that the current electrical angle of the permanent magnet synchronous door operator is larger than the preset electrical angle, and proceed to step 7).

[0057] Rules for determining the forward and reverse rotation of a permanent magnet synchronous gantry crane: (e.g.) Figure 4 As shown, if the electrical angle gradually increases due to the rotation of the motor, then the direction is forward rotation; if the electrical angle gradually decreases due to the rotation of the motor, then the direction is reverse rotation.

[0058] Step 6) Assign the value of the preset electrical angle Angle from Step 2) to the current preset electrical angle upper limit HighAngle, while keeping the current preset electrical angle lower limit LowAngle unchanged. Then, the current preset electrical angle Angle = (current preset electrical angle upper limit HighAngle + current preset electrical angle lower limit LowAngle) / 2, as shown below:

[0059] Let: HighAngle=Angle; LowAngle=LowAngle,

[0060] Angle=(HighAngle+LowAngle) / 2;

[0061] Then, return to step 2).

[0062] Step 7) Assign the preset electrical angle Angle from Step 2) to the current preset electrical angle lower limit angle LowAngle, while keeping the current preset electrical angle upper limit HighAngle unchanged. Then, the current electrical angle Angle = (the current preset electrical angle upper limit HighAngle + the current preset electrical angle lower limit angle LowAngle) / 2, as shown below:

[0063] Let: LowAngle=Angle, HighAngle=HighAngle,

[0064] Angle=(HighAngle+LowAngle) / 2;

[0065] Then, return to step 2).

[0066] Step 8) Determine that the current preset electrical angle Angle (i.e., Step 2) is the actual electrical angle. The initial electrical angle detection of the permanent magnet synchronous door machine is completed, and the step ends.

[0067] Step 9): Check if the number of rotations (Count) is 0. If it is not 0, proceed to step 8. If it is 0, proceed to step 10.

[0068] Step 10): Determine if the flag is 3. If it is not 3, proceed to step 11. If it is 3, proceed to step 12.

[0069] Step 11): Increment the original flag value by 1 to obtain the new flag value. When the new flag values ​​are 1, 2, and 3, the preset electrical angles are -90°, 0°, and 90°, respectively. The upper limits of the electrical angles are 90°, 180°, and 270°, respectively, and the lower limits of the electrical angles are -270°, -180°, and -90°, respectively. Then return to Step 2).

[0070] Step 12) If the system is found to have an error, the process ends.

[0071] Specific examples: such as Figure 3 As shown, angle θ is the actual electrical angle. To determine the value of angle θ (assuming it is 67.5°), according to... Figure 2 The method and steps are as follows:

[0072] 1. Initialize parameter values: the lower limit of electrical angle (LowAngle) is 0°, the upper limit of electrical angle (HighAngle) is 360°, the preset electrical angle (Angle) is 180°, the flag is 0, the number of rotations (Count) is 0, and the maximum number of rotations (MaxCount) is 10.

[0073] LowAngle=0°, HighAngle=360°, Angle=180°, Count=0, Flag=0, MaxCount=10.

[0074] 2. The main control system controls the permanent magnet synchronous gantry coil to generate current according to the preset electrical angle Angle (180°), thus generating a torque at that angle. Start timing.

[0075] 3. Read the rotation pulse count from the incremental encoder. When the absolute value of the rotation pulse count exceeds the set value, it indicates that the permanent magnet synchronous gantry is rotating. At this time, the rotation count is incremented by 1 (Count=1). This is because... Therefore, proceed to the next step.

[0076] 4. The positive value of the rotation pulse count indicates that the permanent magnet synchronous gantry is rotating in the forward direction. This means that the current angle of the permanent magnet synchronous gantry is smaller than the preset electrical angle Angle. Therefore, the preset electrical angle Angle (i.e., 180°) is directly used as the new upper limit HighAngle, while the new lower limit LowAngle remains unchanged (still 0°). Then, the new preset electrical angle Angle is set to half the sum of the new upper and lower limits ((180+0) / 2=90), that is:

[0077] LowAngle=0°, HighAngle=180°, Angle=90°, Count=1.

[0078] 5. The main control system controls the permanent magnet synchronous gantry coil to generate current according to the preset electrical angle Angle (90°), thus generating a torque at that angle. Start timing.

[0079] 6. Read the rotation pulse count from the incremental encoder. When the absolute value of the rotation pulse count exceeds the set value, it indicates that the permanent magnet synchronous gantry is rotating. At this time, the rotation count is incremented by 1 (Count=2), because... Therefore, proceed to the next step.

[0080] 7. The positive value of the rotation pulse count indicates that the permanent magnet synchronous gantry is rotating in the forward direction. This means that the current angle of the permanent magnet synchronous gantry is smaller than the preset electrical angle Angle. Therefore, the preset electrical angle Angle (i.e., 90°) is directly used as the new upper limit HighAngle, while the new lower limit LowAngle remains unchanged (still 0°). Then, the new preset electrical angle Angle is set to half the sum of the new upper and lower limits ((90+0) / 2=45), that is:

[0081] LowAngle=0°, HighAngle=90°, Angle=45°, Count=2.

[0082] 8. The main control system controls the permanent magnet synchronous gantry coil to generate current according to the preset electrical angle Angle (45°), thus generating a torque at that angle. Start timing.

[0083] 9. Read the rotation pulse count from the incremental encoder. When the absolute value of the rotation pulse count exceeds the set value, it indicates that the permanent magnet synchronous gantry is rotating. At this time, the rotation count is incremented by 1 (Count=3), because... Therefore, proceed to the next step.

[0084] 10. The negative value of the rotation pulse count indicates that the permanent magnet synchronous gantry is rotating in the opposite direction. This means that the current angle of the permanent magnet synchronous gantry is larger than the preset electrical angle Angle. Therefore, the preset electrical angle Angle (i.e., 45°) is directly used as the new lower limit of the electrical angle, LowAngle. The new upper limit, HighAngle, remains unchanged (still 90°). Then, the new preset electrical angle Angle is set to half the sum of the new upper and lower limits of the electrical angle ((45+90) / 2=67.5), that is:

[0085] LowAngle=45°, HighAngle=90°, Angle=67.5°, Flag=0, Count=3.

[0086] 11. The main control system controls the permanent magnet synchronous gantry coil to generate current according to the preset electrical angle Angle (67.5°), thus generating a torque at that angle. Start timing.

[0087] 12. Because the preset electrical angle and the actual electrical angle θ are consistent, the permanent magnet synchronous door operator cannot rotate. Therefore, the number of rotation pulses read from the incremental encoder is 0. After the timer exceeds the set time, the number of rotations (Count) will be 3, which is not 0 (indicating that the permanent magnet synchronous door operator has rotated before, meaning that the entire system hardware and software are functioning normally). Therefore, the preset electrical angle Angle (67.5°) is determined to be angle θ. The entire process of identifying the electrical angle is now complete.

[0088] In the above application example, the process of approximating the upper and lower limits of the electrical angle using angle θ was executed only 3 times to make the preset electrical angle and the actual angle consistent, thus exiting the program. In reality, however, it is highly likely that this approximation process would need to be executed many more times (more than MaxCount) to make the preset electrical angle and the actual angle nearly identical, preventing the permanent magnet synchronous gantry crane from rotating. In practical applications, we set the MaxCount value according to the required accuracy. Once the number of executions reaches MaxCount, the preset electrical angle is considered the desired electrical angle, and the errors can be ignored.

[0089] Figure 4In another embodiment, the permanent magnet synchronous gate operator is prevented from rotating at a preset electrical angle of 180° (assuming θ is 0°) starting from angle θ. The main control system generates current to produce torque according to the preset electrical angle Angle (180°) and starts timing. However, the permanent magnet synchronous gate operator cannot rotate. After the timer exceeds the set value, since the number of rotations Count is 0, it is known that the permanent magnet synchronous gate operator has not rotated. From the fact that the flag bit Flag is 0, it is known that the program has just started executing and the preset electrical angle Angle (180°) cannot make the permanent magnet synchronous gate operator rotate. Therefore, the flag bit Flag value is incremented by 1, making the flag bit Flag 1. The preset electrical angle Angle is reset to -90 degrees, and the upper limit HighAngle = 90° and the lower limit LowAngle = -270° are reset. Then, current is generated according to the preset electrical angle Angle (-90°) to produce torque and timing starts. At this time, the permanent magnet synchronous gate operator will rotate in the opposite direction, causing the number of rotation pulses to exceed the set value. The subsequent execution process is similar to the first case, and finally the value of angle θ is obtained. If there are problems with the system software or hardware, the permanent magnet synchronous gate operator will be unable to rotate under the current and torque of the preset electrical angles Angle (-90°, 0°, 90°). At this time, the process will be executed as follows: the timer exceeds the set value, the number of rotations count is 0, the flag bit Flag is 3 (indicating that the step of setting the preset electrical angles -90°, 0°, 90° has been performed), and the system error is judged, thus ending the process.

[0090] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for identifying the initial angle of a permanent magnet synchronous gantry crane using a frequency converter, based on a device for identifying the initial angle of a permanent magnet synchronous gantry crane using a frequency converter, the device comprising: Control module, current generation module, permanent magnet synchronous gantry crane rotation angle and direction judgment module, incremental encoder; Its features include the following steps: Step 1) Preset: Initialize rotation count Count = 0, flag flag = 0, maximum count MaxCount is the set value; Preset: lower limit of electrical angle LowAngle is 0 degrees, upper limit of electrical angle HighAngle is 360 degrees, Preset: electrical angle Angle is set to 180 degrees, represented as: LowAngle=0°; HighAngle=360°; Angle=180°; The meaning of initial rotation count is as follows: Electrical angle learning is a process of gradually narrowing the limit range based on the rotation direction of the permanent magnet synchronous gantry and the current upper and lower limits to approach the true value. Each time the permanent magnet synchronous gantry rotates, a judgment is made, and the upper and lower limits are narrowed once. Therefore, the more rotations there are, the more judgments are made, and the more accurate the learned electrical angle value will be. After system initialization, the permanent magnet synchronous gantry has not yet performed any rotation judgments, so the initial rotation count is set to 0. The maximum number of rotations is used to constrain the accuracy of the learned electrical angle. If the permanent magnet synchronous gantry can still rotate after multiple judgments, it means that there is still an error between the current preset electrical angle and the actual electrical angle. However, if the number of rotations reaches the maximum number of rotations, it means that the error between them meets the requirements and there is no need to continue. The meaning of the upper and lower limits of electrical angle: The range in which the actual electrical angle lies. Initially, the upper and lower limit range is 360°, and the actual electrical angle is definitely in this range. After repeated judgments to narrow down the range in which the actual electrical angle lies, the relative accurate value of the actual electrical angle is finally obtained. Preset electrical angle: When the frequency converter continuously supplies sufficient current to the permanent magnet synchronous gantry machine at this angle, a torque will be generated to drive the permanent magnet synchronous gantry machine to rotate until the actual electrical angle coincides with this electrical angle and then the rotation stops. Step 2) Apply the rated torque to the permanent magnet synchronous gantry crane according to the preset electrical angle, and start timing at the same time; Step 3) If the control module receives more than X pulses of permanent magnet synchronous gantry rotation within the set time, where X ≥ 1, then proceed to step 4); if the number of pulses received after the set time is less than X, then proceed to step 9). Step 4) Set the number of rotations Count = Count + 1, and check if the current number of rotations Count is less than the maximum number of rotations MaxCount. If it is less, proceed to Step 5); otherwise, proceed to Step 8. Step 5): The control module reads the signal from the permanent magnet synchronous door operator rotation angle and direction judgment module from the signal input terminal to determine the rotation direction of the permanent magnet synchronous door operator: if it is forward, it means that the current electrical angle of the permanent magnet synchronous door operator is smaller than the preset electrical angle, and proceed to step 6); if it is reverse, it means that the current electrical angle of the permanent magnet synchronous door operator is larger than the preset electrical angle, and proceed to step 7). The rule for determining the forward and reverse rotation of a permanent magnet synchronous gantry crane is as follows: if the electrical angle gradually increases as the motor rotates, the rotation is forward; if the electrical angle gradually decreases as the motor rotates, the rotation is reverse. Step 6) Assign the value of the preset electrical angle Angle from Step 2) to the current preset electrical angle upper limit HighAngle, while keeping the current preset electrical angle lower limit LowAngle unchanged. Then, the current preset electrical angle Angle = (current preset electrical angle upper limit HighAngle + current preset electrical angle lower limit LowAngle) / 2, as shown below: Let: HighAngle=Angle; LowAngle=LowAngle, Angle=(HighAngle+LowAngle) / 2; Then, return to step 2). Step 7) Assign the preset electrical angle Angle from Step 2) to the current preset electrical angle lower limit angle LowAngle, while keeping the current preset electrical angle upper limit HighAngle unchanged. Then, the current electrical angle Angle = (current preset electrical angle upper limit HighAngle + current preset electrical angle lower limit LowAngle) / 2, as shown below: Let: LowAngle=Angle, HighAngle=HighAngle, Angle=(HighAngle+LowAngle) / 2; Then, return to step 2). Step 8) Determine that the current preset electrical angle Angle (i.e., Step 2) is the actual electrical angle. The preset electrical angle detection of the permanent magnet synchronous door machine is completed, and the step ends. Step 9): Check if the number of rotations (Count) is 0. If it is not 0, proceed to step 8. If it is 0, proceed to step 10. Step 10): Determine if the flag is 3. If it is not 3, proceed to step 11. If it is 3, proceed to step 12. Step 11): Increment the original flag value by 1 to obtain the new flag value. When the new flag value is 1, 2, or 3, the preset electrical angles are -90°, 0°, and 90°, respectively. The upper limits of the electrical angles are 90°, 180°, and 270°, respectively, and the lower limits of the electrical angles are -270°, -180°, and -90°, respectively. Then return to Step 2). Step 12) If the system is found to have an error, the process ends.