Method and system for controlling servo motor, storage medium, product and application thereof
By fitting the compensation curve and calculating the dynamic compensation value, the stability problem of linear control of the motor in the cam transmission structure bending machine is solved, and accurate position control and operation simplification at the end of the mechanism are achieved.
Patent Information
- Application Number
- CN202510169097.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-17
- Publication Date
- 2025-05-23
AI Technical Summary
When using a bending machine with a cam transmission structure in the prior art, the linear control of the motor cannot meet the requirements under the nonlinear transmission mode, and there are stability problems such as difficulty in adjusting parameters, unstable PID compensation amount, and abnormal overshoot oscillation.
By collecting the motor end position value and mechanism end position value, fitting the compensation curve, and calculating the dynamic compensation value, combining the motor end position value design value for calculation, the motor end position value output value is obtained, and the motor end position value is achieved to achieve precise control of the motor.
解决了PID控制的弊端,简化了参数调节,确保了机构末端的准确位置控制,使操作更加直观和简单。
Smart Images

Figure CN120034041A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of motor control technology, and in particular to a method for controlling a servo motor of a pure electric servo bending machine based on a cam transmission structure, and a method, system, storage medium, product and application thereof. Background Art
[0002] Most mechanical transmission methods rely on motors, reducers, screws, pulleys, etc. Based on this method, the motor's movement (internal feedback) and the movement distance of the end of the mechanism (external feedback) are linearly related. However, in addition to the above transmission methods, some transmission methods are nonlinear transmissions, such as the cam structure used in bending machines. In this transmission method, when the motor moves at a constant speed, the end moves at a variable speed. In order to offset mechanical errors, users generally install a grating ruler at the end of the mechanism for position feedback. In this way, the linear control of the motor cannot meet the needs of users.
[0003] At present, most of the existing operating methods on the market are PID closed-loop control. According to the motor resolution and the lead screw pitch, the displacement of the lead screw after one rotation of the motor is calculated. Then, the PID control is used to take the external feedback grating ruler signal for closed-loop compensation (such as Figure 3 shown).
[0004] However, although the above control method can also control it to be active, this control method has the disadvantages of difficulty in parameter adjustment, unstable PID compensation, stability problems such as abnormal overshoot oscillation, and nonlinear time-varying systems requiring certain compensation and improvement.
[0005] Based on this, the present invention designs a method, system, storage medium, product and application of controlling a servo motor to solve the above problems. Summary of the invention
[0006] In view of the above-mentioned shortcomings of the prior art, the present invention provides a method, system, storage medium, product and application of controlling a servo motor.
[0007] To achieve the above objectives, the present invention is implemented through the following technical solutions:
[0008] A first aspect: A method for controlling a servo motor, comprising the following steps:
[0009] Step 1: Collect the motor end position value x and the mechanism end position value y corresponding to the motor end position value x;
[0010] Step 2: Fitting compensation curves through multiple sets of motor end position values x and mechanism end position values y;
[0011] Step 3: Set the target value y of the end position of the mechanism in the i-th cycle iInput it into the fitting compensation curve and calculate the theoretical value x of the motor end position value in the ith cycle i ;
[0012] Step 4: Input the design value M of the motor end position value of the i-th cycle i , and then compare it with the theoretical value of the motor end position x i Cooperate with dynamic compensation calculation to get dynamic compensation value T i ;
[0013] Step 5: Set the dynamic compensation value T i Add to the motor end position design value M i+1 Get the motor end position output value D.
[0014] Furthermore, the position value y of the end of the mechanism is collected by a grating ruler.
[0015] Furthermore, the fitted compensation curve is:
[0016] y=-6E-11x 5 +7E-08x 4 -2E-05x 3 -0.0006x 2 +1.5854x+0.0703.
[0017] Furthermore, the dynamic compensation value T i The calculation is as follows:
[0018] T i =T i-1 +(x i -M i ).
[0019] T i is the dynamic compensation value of the ith cycle, T i-1 is the dynamic compensation value of the i-1th cycle, x i is the theoretical value of the motor end position in the ith cycle, M i Design value of the motor end position value for the i-th cycle.
[0020] Furthermore, D is calculated as follows:
[0021] D=T i +M i+1 .
[0022] A second aspect: A control system comprising:
[0023] Processor; and
[0024] The memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors are enabled to execute the method of controlling the servo motor.
[0025] A third aspect: A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to execute a method for controlling a servo motor.
[0026] A fourth aspect: A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, a method for controlling a servo motor is implemented.
[0027] Fifth aspect: Application of the method of controlling servo motor in pure electric servo bending machine based on cam transmission structure.
[0028] Beneficial effects: The present invention provides a method for controlling the motor so that the end of the mechanism can still move to the correct position when the relationship between the movement amount of the motor and the moving distance of the end of the mechanism changes in a curve under the cam transmission structure of the bending machine; it solves the disadvantages of PID control and simplifies the complex parameter adjustment. The user only needs to roughly establish a position relationship table between the motor and the end of the mechanism, which can provide operational assistance to the user and make the operation control more intuitive and simple. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0030] Figure 1 A block diagram of a method for controlling a servo motor of a pure electric servo bending machine based on a cam transmission structure of the present invention;
[0031] Figure 2 It is a fitting compensation curve diagram of a method for controlling a servo motor of a pure electric servo bending machine based on a cam transmission structure of the present invention;
[0032] Figure 3 FIG. 1 is a diagram of an existing motor control method. DETAILED DESCRIPTION
[0033] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0034] The present invention will be further described below in conjunction with the embodiments.
[0035] Example 1: Please refer to Figure 1-Figure 2 ,
[0036] A first aspect: A method for controlling a servo motor, comprising the following steps:
[0037] Step 1: Collect the motor end position value x and the mechanism end position value y corresponding to the motor end position value x;
[0038] Step 2: Fitting compensation curves through multiple sets of motor end position values x and mechanism end position values y;
[0039] Step 3: Set the target value y of the end position of the mechanism in the i-th cycle i Input it into the fitting compensation curve and calculate the theoretical value x of the motor end position value in the ith cycle i ;
[0040] Step 4: Input the design value M of the motor end position value of the i-th cycle i , and then compare it with the theoretical value of the motor end position x i Cooperate with dynamic compensation calculation to get dynamic compensation value T i ;
[0041] Step 5: Set the dynamic compensation value T i Add to the motor end position design value M i+1 Get the motor end position output value D.
[0042] The position value y of the end of the mechanism is collected by the grating ruler.
[0043] The fitted compensation curve is:
[0044] y=-6E-11x 5 +7E-08x 4 -2E-05x 3 -0.0006x 2 +1.5854x+0.0703.
[0045] Dynamic compensation value T i The calculation is as follows:
[0046] T i =T i-1 +(x i -M i ).
[0047] T i is the dynamic compensation value of the ith cycle, T i-1 is the dynamic compensation value of the i-1th cycle, x i is the theoretical value of the motor end position in the ith cycle, M i Design value of the motor end position value for the i-th cycle.
[0048] The specific calculation of D is as follows:
[0049] D=T i +M i+1 .
[0050] A second aspect: A control system comprising:
[0051] Processor; and
[0052] The memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors are enabled to execute the method of controlling the servo motor.
[0053] A third aspect: A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to execute a method for controlling a servo motor.
[0054] A fourth aspect: A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, a method for controlling a servo motor is implemented.
[0055] Fifth aspect: Application of the method of controlling servo motor in pure electric servo bending machine based on cam transmission structure.
[0056] The present invention provides a method for controlling the motor so that the end of the mechanism can still move to an accurate position when the relationship between the movement amount of the motor and the moving distance of the end of the mechanism under the cam transmission structure of the bending machine is a curve; the disadvantages of PID control are solved, and complex parameter adjustment is simplified. The user only needs to roughly establish a position relationship table between the motor and the end of the mechanism, which can provide operational assistance to the user and make the operation control more intuitive and simple.
[0057] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements will not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for controlling a servo motor, characterized in that: The following steps are involved: Step 1: Collect the motor end position value x and the mechanism end position value y corresponding to the motor end position value x; Step 2: Fitting compensation curves through multiple sets of motor end position values x and mechanism end position values y; Step 3: Set the target value y of the end position of the mechanism in the i-th cycle i Input it into the fitting compensation curve and calculate the theoretical value x of the motor end position value in the ith cycle i ; Step 4: Input the design value M of the motor end position value of the i-th cycle i , and then compare it with the theoretical value of the motor end position x i Cooperate with dynamic compensation calculation to get dynamic compensation value T i ; Step 5: Set the dynamic compensation value T i Add to the motor end position design value M i+1 Get the motor end position output value D.
2. The method for controlling a servo motor of a pure electric servo bending machine based on a cam transmission structure according to claim 1 is characterized in that: The position value y of the end of the mechanism is collected by the grating ruler.
3. The method for controlling a servo motor of a pure electric servo bending machine based on a cam transmission structure according to claim 1 is characterized in that: The fitted compensation curve is: y=-6E-11x 5 +7E-08x 4 -2E-05x 3 -0.0006x 2 +1.5854x+0.0703。 4. The method for controlling a servo motor of a pure electric servo bending machine based on a cam transmission structure according to claim 3 is characterized in that: Dynamic compensation value T i The calculation is as follows: T i =T i-1 +(x i -M i )。 T i is the dynamic compensation value of the ith cycle, T i-1 is the dynamic compensation value of the i-1th cycle, x i is the theoretical value of the motor end position in the ith cycle, M i Design value of the motor end position value for the i-th cycle.
5. The method for controlling a servo motor of a pure electric servo bending machine based on a cam transmission structure according to claim 3 is characterized in that: The specific calculation of D is as follows: D=T i +M i+1 。 6. A control system, characterized in that: include: processor; as well as A memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors are enabled to execute the method for controlling a servo motor according to any one of claims 1-5.
7. A computer-readable storage medium, characterized in that: Executable instructions are stored thereon, and when the instructions are executed by a processor, the processor executes the method for controlling a servo motor according to any one of claims 1-5.
8. A computer program product, characterized in that The invention comprises a computer program, which implements the method for controlling a servo motor according to any one of claims 1 to 5 when being executed by a processor.
9. Application of the method for controlling a servo motor according to any one of claims 1 to 5 in a pure electric servo bending machine based on a cam transmission structure.