Servo motor control method and actuator
The servo motor is controlled by multi-stage current input logic, which solves the problem of servo motor phase-finding failure under hard limit, realizes precise phase-finding and safe operation, and improves the control accuracy of the servo motor and the safety of the actuator.
Patent Information
- Application Number
- CN202511212747.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-28
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2045-08-28
AI Technical Summary
Existing servo motors cannot accurately control the stator winding current during startup and operation, causing the actuator to run away or stall, and phase finding failure under hard limit conditions.
Multi-stage current input logic is used to control the servo motor. By obtaining multiple mechanical rotation quantities and electrical angle differences, the phase-seeking rotation deviation is determined, and the current input logic is adjusted to avoid hard limit blocking and achieve precise phase-seeking.
The control accuracy of the servo motor is improved, the actuator is prevented from running out of control or stalling, safe operation is ensured, and the phase-finding efficiency and accuracy are improved.
Smart Images

Figure CN120729095A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of motor control, and in particular to a control method and an actuator for a servo motor. Background Art
[0002] Currently, the primary drive device in actuators such as electric cylinders and electric grippers is a servo motor, which typically uses Hall effects for micro-phase finding. However, when the servo motor encoder uses an ABZ incremental encoder, the encoder cannot detect the absolute position of the motor rotor upon power-up. It can only use the initial mechanical angle position as a starting point, and cannot determine the electrical angle (i.e., the current / voltage phase) that corresponds to its correct control. This results in inability to properly control the stator winding current during startup and operation, and an inability to generate an effective magnetic field to drive the servo motor. This can lead to the actuator running over or stalling when controlled. Furthermore, electric cylinders and electric grippers are limited by their mechanical travel. During phase finding in actual applications, the motor rotor may stop at the positive or negative hard limits when the cylinder pushes the load or the gripper grips the load. In this case, using Hall effects for micro-phase finding may fail due to obstruction by the hard limits. Therefore, phase finding for servo motors is an urgent problem that needs to be solved. Summary of the Invention
[0003] In view of this, an object of the present invention is to provide a control method and an actuator for a servo motor to alleviate the above technical problems.
[0004] In a first aspect, an embodiment of the present invention provides a control method for a servo motor, the control method comprising: after the servo motor is powered on, using a first current input logic to control the servo motor so that the rotor rotates from the power-on position until the rotor stops rotating, and obtaining a first mechanical rotation amount of the rotor; wherein the first current input logic comprises maintaining the stator of the servo motor at a first electrical angle; using a second current input logic to control the servo motor so that the rotor moves in a target phase-seeking direction until the rotor stops rotating, and obtaining a second mechanical rotation amount of the rotor; wherein the second current input logic comprises changing the stator from the first electrical angle to the second electrical angle; determining a phase-seeking rotation deviation based on the first mechanical rotation amount, the second mechanical rotation amount, and the theoretical mechanical rotation amount in the second current input logic; obtaining a target mechanical rotation amount, determining a target current input logic based on the target mechanical rotation amount and the phase-seeking rotation deviation, and using the target current input logic to control the servo motor.
[0005] Optionally, the control method also includes: using a third current input logic to control the servo motor until the rotor no longer rotates, and obtaining a third mechanical rotation amount of the rotor; wherein the third current input logic includes changing the stator from a first electrical angle to a third electrical angle; using a fourth current input logic to control the servo motor until the rotor no longer rotates, and obtaining a fourth mechanical rotation amount of the rotor; wherein the fourth current input logic includes changing the stator from a first electrical angle to a fourth electrical angle, and the electrical angle difference between the third electrical angle and the fourth electrical angle relative to the first electrical angle is a reciprocal number; determining the target phase-seeking direction based on the third mechanical rotation amount and the fourth mechanical rotation amount.
[0006] Optionally, the target phase-finding direction is determined based on the third mechanical rotation amount and the fourth mechanical rotation amount, including: judging whether the third mechanical rotation amount and the fourth mechanical rotation amount are the same; if not, taking the stator electrical angle change direction corresponding to the larger value of the third mechanical rotation amount and the fourth mechanical rotation amount as the target phase-finding direction.
[0007] Optionally, the control method also includes: if the third mechanical rotation amount and the fourth mechanical rotation amount are the same, adjusting the third electrical angle and the fourth electrical angle, and re-using the third current input logic and the fourth current input logic to control the servo motor respectively until the adjusted third mechanical rotation amount and the fourth mechanical rotation amount are different.
[0008] Optionally, the control method also includes: calculating the absolute value of the angle difference between the adjusted third electrical angle / fourth electrical angle and the first electrical angle; when the absolute value of the angle difference reaches a preset electrical angle threshold, if the adjusted third mechanical rotation amount and the fourth mechanical rotation amount are still the same, the preset phase-seeking direction is used as the target phase-seeking direction.
[0009] Optionally, the phase-seeking rotation deviation is determined based on the first mechanical rotation quantity, the second mechanical rotation quantity and the theoretical mechanical rotation quantity in the second current input logic, including: calculating the rotation difference between the second mechanical rotation quantity and the theoretical mechanical rotation quantity; if the rotation difference is not greater than a preset threshold, using the first mechanical rotation quantity as the phase-seeking rotation deviation.
[0010] Optionally, the phase-seeking rotation deviation is determined based on the first mechanical rotation quantity, the second mechanical rotation quantity and the theoretical mechanical rotation quantity in the second current input logic, including: if the rotation difference is greater than a preset threshold, determining the target electrical angle corresponding to the second mechanical rotation quantity based on the preset mapping information of the rotation quantity and the electrical angle and the second mechanical rotation quantity; determining the phase-seeking rotation deviation based on the target electrical angle, the first electrical angle and the first mechanical rotation quantity; wherein the target electrical angle is the theoretical electrical angle of the stator corresponding to when the rotor is in the first mechanical position, and the first mechanical position is the mechanical position when the rotor rotates the first mechanical rotation quantity from the power-on position.
[0011] Optionally, the phase-seeking rotation deviation is determined based on the target electrical angle, the first electrical angle and the first mechanical rotation amount, including: determining the electrical angle difference between the target electrical angle and the first electrical angle based on the target electrical angle and the first electrical angle; determining the proportional mechanical rotation amount corresponding to the electrical angle difference based on the electrical angle difference; and determining the phase-seeking rotation deviation based on the first mechanical rotation amount and the proportional mechanical rotation amount.
[0012] In a second aspect, an embodiment of the present invention further provides an actuator, comprising a servo motor and a controller; wherein the controller is configured to control the servo motor using the control method of the first aspect.
[0013] In a third aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the control method of the first aspect are executed.
[0014] The embodiments of the present invention bring the following beneficial effects: An embodiment of the present invention provides a control method and actuator for a servo motor. After the servo motor is powered on, the first current input logic is first used to control the servo motor so that the rotor starts to rotate from the power-on position until the rotor stops rotating, and the first mechanical rotation amount of the rotor is obtained; wherein the first current input logic includes maintaining the stator of the servo motor at a first electrical angle; then the second current input logic is used to control the servo motor so that the rotor moves in a target phase-seeking direction until the rotor stops rotating, and the second mechanical rotation amount of the rotor is obtained; wherein the second current input logic includes changing the stator from the first electrical angle to the second electrical angle; then the phase-seeking rotation deviation is determined based on the first mechanical rotation amount, the second mechanical rotation amount and the theoretical mechanical rotation amount in the second current input logic; finally, the target mechanical rotation amount is obtained, and the target current input logic is determined based on the target mechanical rotation amount and the phase-seeking rotation deviation, and the target current input logic is used to control the servo motor. The above control method first controls the servo motor according to the first current input logic to determine the first mechanical rotation amount, then controls the servo motor according to the second current input logic to make the rotor move in the target phase-seeking direction and determine the second mechanical rotation amount, and finally determines the phase-seeking rotation deviation according to the first mechanical rotation amount, the second mechanical rotation amount and the theoretical mechanical rotation amount in the second current input logic, and controls the servo motor according to the phase-seeking rotation deviation, thereby avoiding the situation where the actuator runs away or stalls due to phase-seeking failure caused by the hard limit obstruction of the actuator, thereby improving the control accuracy of the servo motor and ensuring the safe operation of the actuator.
[0015] Other features and advantages of the present invention will be described in the following description, and in part will become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description and the drawings.
[0016] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0018] Figure 1 This is a flow chart of a servo motor control method provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0019] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0020] To facilitate understanding of this embodiment, the embodiment of the present invention is described in detail below.
[0021] An embodiment of the present invention provides a control method for a servo motor, which is applied to an actuator. In practical applications, the actuator usually has a limited mechanical stroke, that is, the extreme mechanical position has a hard limit. In addition, the actuator also includes a controller and an incremental encoder. The specific structure of the actuator can refer to the existing technology, and the embodiment of the present invention will not be described in detail here.
[0022] Specifically, if Figure 1 As shown, the control method of the servo motor provided by the embodiment of the present invention includes the following steps: Step S102 : After the servo motor is powered on, the first current input logic is used to control the servo motor so that the rotor starts to rotate from the power-on position until the rotor stops rotating, thereby obtaining a first mechanical rotation amount of the rotor.
[0023] In practical applications, a servo motor consists of a stator (also called a motor stator) and a rotor (also called a motor rotor). When the servo motor is powered on, the controller first uses a first current input logic to control the servo motor. This first current input logic maintains the servo motor's stator at a first electrical angle θ. This means that the stator's magnetic field electrical angle remains constant, while the rotor, attracted by the fixed stator magnetic field, rotates from its power-on position toward its target position. The rotor's power-on position is unknown; the target position is where the stator and rotor magnetic fields align. It should be noted that the first electrical angle θ is typically 0° or 90° and can be set based on actual conditions.
[0024] The first current input logic is a direct current with a slowly linearly increasing current amplitude and a constant current phase angle. This not only maintains the stator at the first electrical angle θ, but also allows for a smooth increase in the first current (i.e., the current when the first current input logic controls the servo motor), reducing oscillations. When the rotor stops rotating, the first current input logic continues to control the servo motor until the first current reaches a first target current. The first target current is generally the maximum value (rated current) or twice the maximum value of the first current in the first current input logic to balance the actuator load. The specific value of the first target current can be set based on actual conditions and will not be described in detail in this embodiment of the present invention.
[0025] Furthermore, when the rotor stops rotating and the first current reaches the first target current, the rotor may have reached the target position or may be blocked by a hard limit, i.e., located at the hard limit position. For example, if the hard limit is between the rotor's power-on position and the target position, the rotor cannot rotate to the target position and is blocked by the hard limit, resulting in the rotor being in the hard limit position when it stops rotating. If the hard limit is not between the rotor's power-on position and the target position, or if the actuator does not have a hard limit, the rotor is in the target position when it stops rotating. Therefore, when the rotor stops rotating and the first current reaches the first target current, the controller also obtains a first mechanical rotation amount P1 corresponding to the rotor's position from the power-on position to the position at which it stops rotating.
[0026] Step S104 : Using the second current input logic to control the servo motor, so that the rotor moves in the target phase-seeking direction until the rotor stops rotating, and obtaining a second mechanical rotation amount of the rotor.
[0027] After the servo motor is controlled according to the first current input logic to determine the first mechanical rotation amount P1, the controller now uses the second current input logic to control the servo motor so that the rotor moves in the target phase-seeking direction under the control of the second current input logic, and obtains the second mechanical rotation amount P2 of the rotor corresponding to the second current input logic when the rotor no longer rotates, thereby improving the phase-seeking efficiency and phase-seeking effect of the servo motor through the target phase-seeking direction, thereby improving the control accuracy of the servo motor.
[0028] The second current input logic is a multiphase alternating current with a constant voltage amplitude and frequency. At this point, the servo motor's stator changes from a first electrical angle θ to a second electrical angle γ, where the second electrical angle γ is generally 360°. At this point, the first electrical angle θ is 0°, thus forming one cycle. The specific values of the first electrical angle θ and the second electrical angle γ can be adaptively adjusted based on actual conditions, and the first electrical angle θ and the second electrical angle γ do not necessarily constitute a complete 360° electrical angle cycle.
[0029] Step S106 : determining a phase-seeking rotation deviation according to the first mechanical rotation amount, the second mechanical rotation amount, and the theoretical mechanical rotation amount in the second current input logic.
[0030] Specifically, the rotational difference between the second mechanical rotational amount and the theoretical mechanical rotational amount is calculated. If the rotational difference is not greater than a preset threshold, the first mechanical rotational amount is used as the phase-seeking rotational deviation. The controller also pre-stores preset mapping information (i.e., a correspondence) between rotational amounts and electrical angles. When the second current input logic is used to control the stator from a first electrical angle θ to a second electrical angle γ, the controller determines the theoretical mechanical rotational amount corresponding to the second current input logic based on the first electrical angle θ, the second electrical angle γ, and the preset mapping information.
[0031] After determining the theoretical mechanical rotation, the controller can calculate the rotation difference between the second mechanical rotation P2 and the theoretical mechanical rotation, that is, calculate the rotation difference between the actual mechanical rotation of the rotor (that is, the second mechanical rotation P2) and the corresponding theoretical mechanical rotation in the process of the stator changing from the first electrical angle θ to the second electrical angle γ, and judge whether the rotation difference is not greater than the preset threshold. If so, it is determined that the servo motor is successfully phase-finding at this time, and the first mechanical rotation P1 is used as the phase-finding rotation deviation △P, that is, △P=P1 at this time.
[0032] In addition, if the rotation difference is greater than a preset threshold, the target electrical angle corresponding to the second mechanical rotation amount is determined based on the preset mapping information of the rotation amount and the electrical angle and the second mechanical rotation amount; and the phase-seeking rotation deviation is determined based on the target electrical angle, the first electrical angle and the first mechanical rotation amount.
[0033] The target electrical angle is the theoretical electrical angle of the stator corresponding to the rotor being in the first mechanical position, and the first mechanical position is the mechanical position of the rotor when it has rotated a first mechanical rotation amount from the power-on position. In practical applications, multiple reference electrical angles are sequentially selected between the first electrical angle θ and the second electrical angle γ, and the reference mechanical rotation amount corresponding to each reference electrical angle γ is obtained. The reference rotation difference between each reference mechanical rotation amount and the second mechanical rotation amount P2 is calculated, and the first reference electrical angle for which the reference rotation difference does not exceed a preset threshold is selected as the target electrical angle.
[0034] Specifically, when the rotation difference is greater than a preset threshold, it indicates that the actuator has a hard limit. At this time, multiple reference electrical angles are selected in sequence between the first electrical angle θ and the second electrical angle γ. Here, multiple reference electrical angles can be selected in order from small to large, or in order from large to small. Here, the order from small to large is used as an example. For example, multiple reference electrical angles such as θ+Δθ, θ+2Δθ, and θ+3Δθ are selected in sequence. Then, for the multiple reference electrical angles, the reference mechanical rotation corresponding to each reference electrical angle and the second electrical angle γ is calculated according to the preset mapping information. Here, the reference mechanical rotation can be understood as the rotation corresponding to each reference electrical angle and the second electrical angle γ, and the reference rotation difference between each reference mechanical rotation and the second mechanical rotation P2 is calculated; at this time, according to the selection order of the reference electrical angles, it is determined in sequence whether the reference rotation difference corresponding to each reference electrical angle is not greater than the preset threshold, until the first reference rotation difference that is not greater than the preset threshold is determined according to the selection order, and the reference electrical angle corresponding to the reference rotation difference is used as the target electrical angle.
[0035] After the target electrical angle is determined from multiple reference electrical angles, the controller determines the phase-seeking rotation deviation based on the target electrical angle, the first electrical angle and the first mechanical rotation amount, specifically including: determining the electrical angle difference between the target electrical angle and the first electrical angle based on the target electrical angle and the first electrical angle; determining the proportional mechanical rotation amount corresponding to the electrical angle difference based on the electrical angle difference; determining the phase-seeking rotation deviation based on the first mechanical rotation amount and the proportional mechanical rotation amount.
[0036] Specifically, the controller first calculates the electrical angle difference between the target electrical angle and the first electrical angle θ, and determines the proportional mechanical rotation amount corresponding to the electrical angle difference according to the preset mapping information; then determines the phase-seeking rotation deviation △P according to the first mechanical rotation amount P1 and the proportional mechanical rotation amount, that is, △P=P1+proportional mechanical rotation amount.
[0037] It should be noted that the above-mentioned phase-seeking rotation deviation △P can be understood as the deviation between the rotor power-on position (i.e., the starting point / 0 point position of the incremental encoder) and the theoretically corresponding position of the first electrical angle θ. Considering that the theoretically corresponding position of the first electrical angle θ may not exist due to a hard limit block, that is, the rotor cannot reach the theoretically corresponding position of the first electrical angle θ, in the embodiment of the present invention, the phase-seeking of the servo motor is not to determine the theoretically corresponding position of the first electrical angle θ, but to determine the phase-seeking rotation deviation △P, and control the servo motor according to the phase-seeking rotation deviation △P, thereby avoiding the situation where the actuator runs away or stalls due to phase-seeking failure caused by the hard limit block of the actuator, thereby improving the control accuracy of the servo motor.
[0038] In particular, if the phase-seeking rotation deviation △P cannot be determined based on the first mechanical rotation quantity, the second mechanical rotation quantity and the theoretical mechanical rotation quantity in the second current input logic, for example, the theoretical electrical angle corresponding to the hard limit position is 359°, then the rotor is controlled to rotate to the 360° electrical angle position, and the rotor may not produce a displacement that can be detected by the incremental encoder, resulting in the inability to perform subsequent steps. At this time, an electrical angle farther from the first electrical angle θ can be selected as the second electrical angle γ. For example, when the first electrical angle θ is 0°, the second electrical angle γ is changed from 180° to 360° in the same cycle, or even to the electrical angle of the next cycle, such as 360° in the next cycle, to avoid phase-seeking failure due to hard limit blocking, thereby ensuring the correct phase-seeking of the servo motor, improving the control accuracy of the servo motor, and further ensuring the safe operation of the actuator, enriching the application scenarios of the actuator, such as being suitable for applications with gravity axes or large loads.
[0039] Step S108 , obtaining the target mechanical rotation amount, determining the target current input logic according to the target mechanical rotation amount and the phase-seeking rotation deviation, and using the target current input logic to control the servo motor.
[0040] Specifically, after the phase-seeking rotation deviation △P is determined as described above, in the subsequent control process of the servo motor, when the controller obtains the target mechanical rotation amount, if it is necessary to control the rotor to move to the target mechanical rotation amount X, the controller can calculate the rotation amount relative to the first electrical angle θ, that is, X-△P, based on the target mechanical rotation amount X and the phase-seeking rotation deviation △P. Correspondingly, the electrical angle required to change relative to the first electrical angle θ can be determined, and the target current input logic can be determined. At this time, the controller uses the target current input logic to control the servo motor, realizing the rotation of the rotor to the target mechanical rotation amount X, thereby improving the control accuracy and control efficiency of the servo motor, and further ensuring the safe operation of the actuator.
[0041] In summary, the control method of the servo motor provided by the embodiment of the present invention first controls the servo motor according to the first current input logic to determine the first mechanical rotation amount, then controls the servo motor according to the second current input logic, so that the rotor moves in the target phase-seeking direction and determines the second mechanical rotation amount, and finally determines the phase-seeking rotation deviation according to the first mechanical rotation amount, the second mechanical rotation amount and the theoretical mechanical rotation amount in the second current input logic, and controls the servo motor according to the phase-seeking rotation deviation, avoiding the situation where the actuator runs away or stalls due to phase-seeking failure caused by the hard limit blocking of the actuator, thereby improving the control accuracy of the servo motor and ensuring the safe operation of the actuator.
[0042] In one embodiment, the control method also includes the following steps: ① Using a third current input logic to control the servo motor until the rotor stops rotating, and obtaining a third mechanical rotation amount of the rotor; wherein the third current input logic includes changing the stator from a first electrical angle to a third electrical angle; ② Using a fourth current input logic to control the servo motor until the rotor stops rotating, and obtaining a fourth mechanical rotation amount of the rotor; wherein the fourth current input logic includes changing the stator from a first electrical angle to a fourth electrical angle, and the electrical angle difference between the third electrical angle and the fourth electrical angle relative to the first electrical angle is a reciprocal number; ③ Determine the target phase-seeking direction based on the third mechanical rotation amount and the fourth mechanical rotation amount.
[0043] Specifically, in order to determine the target phase-seeking direction, the controller also uses the third current input logic and the fourth current input logic to control the servo motor. The specific order of the third current input logic and the fourth current input logic can be set according to actual conditions. In the process of determining the target phase-seeking direction, the process of each step is as follows: ① First, the third current input logic is used to control the servo motor so that the stator changes from the first electrical angle θ to the third electrical angle, where the third electrical angle is represented by θ-β, that is, the difference between the first electrical angle and the third electrical angle is β, until the rotor no longer rotates and the third current (that is, the current when the third current input logic controls the servo motor) reaches the corresponding third target current, and the mechanical rotation amount of the rotor corresponding to the stator changing from the first electrical angle θ to the third electrical angle θ-β, that is, the third mechanical rotation amount P3, is obtained.
[0044] ② Then, the fourth current input logic is used to control the servo motor so that the stator changes from the first electrical angle θ to the fourth electrical angle, where the fourth electrical angle is represented by θ+β, that is, the difference between the first electrical angle θ and the fourth electrical angle is also β, until the rotor no longer rotates and the fourth current (that is, the current when the fourth current input logic controls the servo motor) reaches the corresponding fourth target current, and the mechanical rotation amount of the rotor corresponding to the stator changing from the first electrical angle θ to the fourth electrical angle θ+β, that is, the fourth mechanical rotation amount P4, is obtained.
[0045] It should be noted that the electrical angle differences between the third electrical angle θ-β and the fourth electrical angle θ+β relative to the first electrical angle θ are reciprocal. The absolute value of the electrical angle difference β ranges from 0 to a preset electrical angle threshold, generally starting at 90°, and can be set based on actual circumstances. Furthermore, the third and fourth current input logics described above both utilize multi-phase alternating current with constant voltage amplitude and frequency, enabling the stator to adjust from the first electrical angle θ to the third electrical angle θ-β and the fourth electrical angle θ+β, respectively.
[0046] ③ Determine the target phase-seeking direction according to the third mechanical rotation amount P3 and the fourth mechanical rotation amount P4.
[0047] Specifically, when the third current input logic is used to control the servo motor, the electrical angle of the stator's magnetic field is adjusted from the first electrical angle θ to the third electrical angle θ-β; similarly, when the fourth current input logic is used to control the servo motor, the electrical angle of the stator's magnetic field is adjusted from the first electrical angle θ to the fourth electrical angle θ+β. The controller obtains the third mechanical rotation quantity P3 corresponding to the third current input logic and the fourth mechanical rotation quantity P4 corresponding to the fourth current input logic of the rotor, and determines the target phase-seeking direction of the servo motor based on the third mechanical rotation quantity P3 and the fourth mechanical rotation quantity P4. Here, the target phase-seeking direction can also be understood as the effective phase-seeking direction. By determining the target phase-seeking direction, the phase-seeking accuracy and phase-seeking efficiency of the servo motor are improved, thereby improving the control accuracy and control efficiency of the servo motor.
[0048] In one method of determining the target phase-seeking direction, the control method includes: determining whether the third mechanical rotation amount and the fourth mechanical rotation amount are the same; if not, taking the stator electrical angle change direction corresponding to the larger value of the third mechanical rotation amount and the fourth mechanical rotation amount as the target phase-seeking direction.
[0049] Specifically, after obtaining the third and fourth mechanical rotation quantities P3 and P4, the controller first determines whether the third and fourth mechanical rotation quantities P3 and P4 are the same. If they are different, the larger of the third and fourth mechanical rotation quantities P3 and P4 is determined, and the stator electrical angle change direction corresponding to the larger value is used as the target phase-finding direction. For example, if the larger value is the third mechanical rotation quantity P3, the target phase-finding direction is the direction in which the stator changes from the first electrical angle θ to the third electrical angle θ-β. Alternatively, if the larger value is the fourth mechanical rotation quantity P4, the target phase-finding direction is the direction in which the stator changes from the first electrical angle θ to the fourth electrical angle θ+β.
[0050] Preferably, in some embodiments, the larger value of the third mechanical rotation amount P3 and the fourth mechanical rotation amount P4 can be understood as the larger one of the two being the larger value when the difference between the two is greater than a certain threshold value. Conversely, when the difference between the two is not greater than the threshold value, the two are considered to be the same or equal, but this is not a limitation.
[0051] In another method of determining the target phase-seeking direction, the control method also includes: if the third mechanical rotation amount and the fourth mechanical rotation amount are the same, adjusting the third electrical angle and the fourth electrical angle, and re-using the third current input logic and the fourth current input logic to control the servo motor respectively until the adjusted third mechanical rotation amount and the fourth mechanical rotation amount are different.
[0052] In practical applications, assuming the rotor stops rotating at the hard limit position under the first current input logic, the corresponding magnetic field electrical angle is set to α, where α is an unknown value. When the third mechanical rotation quantity P3 and the fourth mechanical rotation quantity P4 differ, there is only one scenario: the actuator has a hard limit, and θ-β < α < θ+β. When the third mechanical rotation quantity P3 and the fourth mechanical rotation quantity P4 are the same, there are two scenarios: one in which the actuator has a hard limit, and θ-β ≥ α, or α ≥ θ+β; the other in which the actuator does not have a hard limit. Therefore, when the third mechanical rotation quantity P3 and the fourth mechanical rotation quantity P4 differ, the larger value can be used to determine the target phase-seeking direction. When the third mechanical rotation quantity P3 and the fourth mechanical rotation quantity P4 are the same, further determination is required to determine whether the actuator has a hard limit.
[0053] Specifically, when the third mechanical rotation amount P3 and the fourth mechanical rotation amount P4 are the same, the controller adjusts the third electrical angle and the fourth electrical angle respectively, such as adjusting β to achieve the adjustment of the third electrical angle and the fourth electrical angle, and after each adjustment, the third current input logic and the fourth current input logic are used again to control the servo motor, and it is judged whether the third mechanical rotation amount P3 and the fourth mechanical rotation amount P4 after each adjustment are the same, until the adjusted third mechanical rotation amount P3 and the fourth mechanical rotation amount P4 are different.
[0054] When the adjusted third mechanical rotation amount P3 and the fourth mechanical rotation amount P4 are different, it indicates that the actuator has a hard limit. At this time, the stator electrical angle change direction corresponding to the larger value of the adjusted third mechanical rotation amount P3 and the fourth mechanical rotation amount P4 is used as the target phase-seeking direction. The specific process of determining the specific target phase-seeking direction can refer to the above embodiment, and the embodiment of the present invention will not be described in detail here.
[0055] Furthermore, the method also includes: when β is adjusted to a maximum value (i.e., a preset electrical angle threshold), if the third mechanical rotation amount P3 and the fourth mechanical rotation amount P4 are still the same, the stator electrical angle change direction corresponding to the third current input logic or the stator electrical angle change direction corresponding to the fourth current input logic is used as the target phase-seeking direction.
[0056] Specifically, the absolute value of the angular difference between the adjusted third electrical angle (or fourth electrical angle) and the first electrical angle is calculated. When the absolute value of the angular difference reaches a preset electrical angle threshold, and if the adjusted third mechanical rotation amount P3 and the adjusted fourth mechanical rotation amount P4 are still the same, the preset phase-finding direction is used as the target phase-finding direction. The preset phase-finding direction is the direction of stator angle change at the third current input logic or the direction of stator angle change at the fourth current input logic. In other words, the target phase-finding direction is either of the two angular change directions.
[0057] Therefore, the embodiments of the present invention adjust β to determine the target phase-finding direction, facilitating accurate phase-finding near hard limits with short travel distances. This avoids phase-finding failures caused by hard limits, further preventing actuator runaway or stalling, and ensuring safe operation. Furthermore, the servo motor control process eliminates the need for encoder high resolution, reducing phase-finding costs and improving phase-finding efficiency, thereby enhancing servo motor control efficiency.
[0058] It should be noted that, in the process of determining the target phase-seeking direction, in addition to using the above-mentioned third current input logic and fourth current input logic to control the servo motor to determine the target phase-seeking direction, other methods can also be used to determine the target phase-seeking direction, including but not limited to: pre-setting the target phase-seeking direction in the controller in advance, or the operator specifying the target phase-seeking direction according to actual conditions, etc., which can be specifically set according to actual conditions.
[0059] Furthermore, embodiments of the present invention provide an actuator comprising a servo motor and a controller, wherein the controller is configured to control the servo motor using the aforementioned method embodiment. In practical applications, actuator types include, but are not limited to, electric cylinders and electric grippers, and can be configured based on actual circumstances.
[0060] The actuator provided in the embodiment of the present invention has the same technical features as the control method of the servo motor provided in the above embodiment, and therefore can also solve the same technical problems and achieve the same technical effects.
[0061] This embodiment further provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the above-mentioned servo motor control method.
[0062] The computer program product of the servo motor control method and actuator provided in the embodiments of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the method described in the previous method embodiments. The specific implementation can be found in the method embodiments and will not be repeated here.
[0063] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working process of the actuator described above may refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0064] In addition, in the description of the embodiments of the present invention, unless otherwise expressly specified or limited, the terms "mounted," "connected," and "connected" should be understood in a broad sense. For example, they may refer to fixed connections, detachable connections, or integral connections; they may refer to mechanical connections or electrical connections; they may refer to direct connections or indirect connections through an intermediate medium; and they may refer to internal communication between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on the specific circumstances.
[0065] If the functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage media include various media capable of storing program code, such as USB flash drives, mobile hard drives, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical disks.
[0066] In the description of the present invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings and are intended solely to facilitate and simplify the description of the present invention. They are not intended to indicate or imply that the devices or components referred to must have, be constructed, or operate in a specific orientation, and therefore should not be construed as limitations on the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0067] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the above-described embodiments, those skilled in the art should understand that any person skilled in the art can modify or easily conceive of changes to the technical solutions described in the above-described embodiments within the technical scope disclosed by the present invention, or replace some of the technical features therein with equivalents. Such modifications, changes, or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.
Claims
1. A method for controlling a servo motor, characterized in that: The control method includes: After the servo motor is powered on, the first current input logic is used to control the servo motor so that the rotor starts to rotate from the power-on position until the rotor stops rotating, and a first mechanical rotation amount of the rotor is obtained; wherein the first current input logic includes maintaining the stator of the servo motor at a first electrical angle; The servo motor is controlled using a second current input logic to cause the rotor to move in a target phase-seeking direction until the rotor stops rotating, and a second mechanical rotation amount of the rotor is obtained; wherein the second current input logic includes changing the stator from the first electrical angle to the second electrical angle; determining a phase-seeking rotation deviation according to the first mechanical rotation amount, the second mechanical rotation amount, and a theoretical mechanical rotation amount in the second current input logic; A target mechanical rotation amount is obtained, a target current input logic is determined according to the target mechanical rotation amount and the phase-seeking rotation deviation, and the servo motor is controlled using the target current input logic.
2. The control method according to claim 1, characterized in that: The control method further includes: The servo motor is controlled using a third current input logic until the rotor stops rotating, thereby obtaining a third mechanical rotation amount of the rotor; wherein the third current input logic includes changing the stator from the first electrical angle to a third electrical angle; The servo motor is controlled using a fourth current input logic until the rotor stops rotating, and a fourth mechanical rotation amount of the rotor is obtained; wherein the fourth current input logic includes changing the stator from the first electrical angle to a fourth electrical angle, and the electrical angle differences between the third electrical angle and the fourth electrical angle relative to the first electrical angle are reciprocal numbers; The target phase-seeking direction is determined according to the third mechanical rotation amount and the fourth mechanical rotation amount.
3. The control method according to claim 2, characterized in that: The determining the target phase-finding direction according to the third mechanical rotation amount and the fourth mechanical rotation amount includes: determining whether the third mechanical rotation amount and the fourth mechanical rotation amount are the same; If not, the stator electrical angle change direction corresponding to the larger value of the third mechanical rotation amount and the fourth mechanical rotation amount is used as the target phase-seeking direction.
4. The control method according to claim 3, characterized in that: The control method further includes: If the third mechanical rotation amount and the fourth mechanical rotation amount are the same, the third electrical angle and the fourth electrical angle are adjusted, and the third current input logic and the fourth current input logic are respectively used to control the servo motor again until the adjusted third mechanical rotation amount and the fourth mechanical rotation amount are different.
5. The control method according to claim 4, characterized in that: The control method further includes: Calculating an absolute value of an angle difference between the adjusted third electrical angle / the fourth electrical angle and the first electrical angle; When the absolute value of the angle difference reaches a preset electrical angle threshold, if the adjusted third mechanical rotation amount and the fourth mechanical rotation amount are still the same, the preset phase-finding direction is used as the target phase-finding direction.
6. The control method according to claim 1, characterized in that: The determining of the phase-seeking rotation deviation according to the first mechanical rotation amount, the second mechanical rotation amount, and the theoretical mechanical rotation amount in the second current input logic includes: calculating a rotation difference between the second mechanical rotation amount and the theoretical mechanical rotation amount; If the rotation difference is not greater than a preset threshold, the first mechanical rotation amount is used as the phase-seeking rotation deviation.
7. The control method according to claim 6, characterized in that: The determining of the phase-seeking rotation deviation according to the first mechanical rotation amount, the second mechanical rotation amount, and the theoretical mechanical rotation amount in the second current input logic includes: If the rotation difference is greater than a preset threshold, determining a target electrical angle corresponding to the second mechanical rotation amount according to preset mapping information of the rotation amount and the electrical angle and the second mechanical rotation amount; determining the phase-seeking rotation deviation according to the target electrical angle, the first electrical angle, and the first mechanical rotation amount; The target electrical angle is a theoretical electrical angle of the stator corresponding to when the rotor is located at a first mechanical position, and the first mechanical position is a mechanical position when the rotor rotates from the power-on position by the first mechanical rotation amount.
8. The control method according to claim 7, characterized in that: The determining the phase-seeking rotation deviation according to the target electrical angle, the first electrical angle, and the first mechanical rotation amount includes: determining an electrical angle difference between the target electrical angle and the first electrical angle according to the target electrical angle and the first electrical angle; Determining, according to the electrical angle difference, a proportional mechanical rotation amount corresponding to the electrical angle difference; The phase-seeking rotation deviation is determined according to the first mechanical rotation amount and the proportional mechanical rotation amount.
9. An actuator, characterized in that: It comprises a servo motor and a controller; wherein the controller is used to control the servo motor using the control method described in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the control method according to any one of claims 1 to 8 are executed.
Citation Information
Patent Citations
Jiggling phase searching method for three-phase AC servo motor
CN101604955A
Motor phase searching method, device and equipment based on Hall signal and storage medium
CN116388617A
Magnetic pole position estimation method for ac synchronous motor
US20100286948A1
Inverter apparatus
US20160079890A1
Cited By
Control method of linear motor and actuator
CN121417745A
Method for controlling a linear motor and actuator
CN121417745B