CN-114567229-B - Control method of motor
Abstract
The invention provides a motor control method which comprises the following steps of receiving a data instruction, obtaining a control curve algorithm model through Sigmoid function curve transformation, calculating parameters of the control curve algorithm model according to the data instruction, calculating real-time speed of a motor at each moment in an operation stage in real time according to the control curve algorithm model with the determined parameters, controlling the motor to operate according to the real-time speed, compensating operation time in real time according to an actual distance taken by a unit time in the motor operation process to form a position closed loop, and modifying the parameters of the control curve algorithm model when the maximum set speed is changed and is effective, so that n-order continuous conduction of a speed and an acceleration curve is ensured. The motor control method provided by the invention adopts a simple curve model, and continuously compensates the running time according to the actual position in positioning to form position closed-loop control. When the maximum set speed is changed, the n-order continuous guidance of the speed curve and the acceleration curve can be ensured.
Inventors
- ZOU YUNLONG
Assignees
- 西门子(中国)有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20220120
Claims (7)
- 1. The control method of the motor is characterized by comprising the following steps: receiving a data instruction, wherein the data instruction comprises a target position, a current position, a maximum set acceleration, a maximum set deceleration, a maximum set speed, a minimum set speed, a reduction ratio, a lead and a rated rotation speed of a motor; transforming the Sigmoid function curve to obtain a control curve algorithm model, wherein an acceleration stage and a uniform speed stage in an operation stage are calculated according to the Sigmoid acceleration curve model in the control curve algorithm model, and a deceleration stage is calculated according to the Sigmoid deceleration curve model; Calculating parameters of the control curve algorithm model according to the data instruction; According to the control curve algorithm model of the determined parameters, calculating the real-time speed of the motor at each moment in the operation stage in real time; controlling the operation of the motor according to the real-time speed; in the running process of the motor, compensating the running time in real time according to the actual distance of the motor in unit time to form a position closed loop; When the maximum set speed is changed and takes effect, modifying the parameters of the control curve algorithm model to ensure n-order continuous guidance of the speed curve and the acceleration curve, wherein, Transforming the Sigmoid function curve in the Sigmoid acceleration curve model and the Sigmoid deceleration curve model respectively, and intercepting a section of the Sigmoid function curve from-5 to 5; the expression of the Sigmoid acceleration curve model is V (t) = (V max -V min )/(1+e^(-a 1 t+5))+V min , t epsilon (0, 10/a 1); The expression of the Sigmoid deceleration curve model is V (t) = (V max -V min )/(1+e^(a 2 t-5))+V min , t epsilon (0, 10/a 2); the following calculation formula is obtained by deriving zero for the Sigmoid acceleration curve model and the Sigmoid deceleration curve model: Acc max =a 1 * (V max -V min )/4; Dec max =a 2 * (V max -V min )/4; Wherein V (t) is a real-time speed, V max is a maximum speed, V min is a minimum speed, acc max is a maximum set acceleration, dec max is a maximum set deceleration, a 1 and a 2 are intermediate variables, the maximum set speed is a set value of the maximum speed, and the minimum set speed is a set value of the minimum speed.
- 2. The method of controlling a motor according to claim 1, wherein a theoretical maximum set speed is calculated in the control curve algorithm model based on the target position and the actual current position, the maximum set speed in the data command, a rated speed of the motor, and the theoretical maximum set speed are compared, and a minimum value of the three is substituted into the control curve algorithm model, the theoretical maximum set speed is calculated according to the following formula: A=(5+(ln(1+e^(-5))))*(1/Acc max +1/Dec max ); B=10* V min *(1/Acc max +1/Dec max ); C=-4*D; A*(V max Theory of -V min )^2+B*(V max Theory of -V min )+C=0; V max Theory of =V min +(-B+SQRT(B*B-4*A*C))/2/A; Where D is the distance between the target position and the actual value, V min is the minimum speed, V max Theory of is the theoretical maximum calculated speed, acc max is the maximum set acceleration, and Dec max is the maximum set deceleration.
- 3. The control method of a motor according to claim 2, wherein if the maximum set speed in the data command is changed during the operation of the motor, it is judged whether the motor is immediately in effect according to the current stage: If the real-time speed is in the acceleration stage, waiting until the maximum set speed is changed in the constant speed stage; if the real-time speed is in a constant speed stage, immediately changing the maximum set speed; And if the real-time speed is in the deceleration stage, the maximum set speed is not changed.
- 4. A control method of an electric motor according to claim 3, wherein, when the maximum set speed is changed: If the changed maximum set speed is increased, estimating a theoretical maximum set speed which can be achieved by acceleration according to a real-time speed, a minimum set speed and a real-time residual displacement distance, substituting the minimum value of the theoretical maximum set speed which can be achieved by the estimated acceleration, the changed maximum set speed and a speed value corresponding to the rated rotating speed of the motor into the maximum speed in the control curve algorithm model to serve as a set value, and substituting the real-time speed into the minimum speed in the control curve algorithm model to serve as a set value; If the changed maximum set speed is reduced, calculating the sum of the displacement distance from the real-time speed to the changed maximum set speed and the displacement distance from the changed maximum set speed to the minimum set speed, judging whether the sum is smaller than the real-time residual displacement distance, substituting the changed maximum set speed into the control curve algorithm model if the sum is smaller than the real-time residual displacement distance, substituting the set value of the maximum speed before the change into the minimum speed in the control curve algorithm model as a set value, and if the sum is larger than or equal to the set value, not changing the curve model.
- 5. The method of controlling an electric motor according to claim 4, wherein estimating the theoretical maximum set speed at which acceleration is possible is specifically to obtain a first theoretical maximum speed by substituting a real-time speed as the minimum set speed and a real-time remaining distance, a maximum set acceleration, and a maximum set deceleration into a model of the calculated theoretical maximum calculated speed, obtain a second theoretical maximum speed by substituting a set value of an original minimum speed as the minimum set speed and a real-time remaining distance, a maximum set acceleration, and a maximum set deceleration into a model of the calculated theoretical maximum calculated speed, and obtain a minimum value of the first theoretical maximum speed and the second theoretical maximum speed as the theoretical maximum set speed at which acceleration is possible.
- 6. The control method of an electric motor according to claim 1, wherein the judgment is further made at the following time points: Judging whether the real-time residual distance of the target position is larger than or equal to the distance required by real-time deceleration when starting acceleration, changing the maximum set speed to accelerate and jumping from a deceleration stage to an acceleration stage, judging whether the maximum set speed is increased and a stop command is not received, and executing the Sigmoid acceleration curve model if the judgment is yes; Judging whether the real-time residual distance of the target position is larger than or equal to the distance required by real-time deceleration when changing the maximum set speed for deceleration and jumping from an acceleration stage to a deceleration stage, judging whether the maximum set speed is increased and whether a stop command is not received, and executing the Sigmoid deceleration curve model if the maximum set speed is not increased and the stop command is not received; the maximum speed of the real-time speed corresponding to the deceleration stop is calculated by the following formula: V max Deceleration of =(1+e^(-5))*( V Real time -V min )+ V min ; The distance required for real-time deceleration is calculated by the following formula: D Deceleration of =( V max Deceleration of -V min )*V min *10/4/Dec max +( V max Deceleration of -V min )^2*(5+(ln(1+e^(-5))))/4/Dec max ; wherein V Real time is the real-time speed, V min is the minimum speed, and Dec max is the maximum set deceleration.
- 7. The method for controlling a motor according to claim 1, wherein during operation of the motor, the operation time is compensated in real time according to an actual distance taken per unit time, and the compensation amount is calculated by the following formula: T=t 0 +△t*(△D Theory of /△D Actual practice is that of ); Where T is the actual calculated time value, T 0 is the starting time value, Δt sample time interval, Δd Theory of is the theoretical distance moved in the process, Δd Actual practice is that of is the actual distance moved in the process.
Description
Control method of motor Technical Field The invention relates to a control method, in particular to a control method of a motor. Background Control curves are commonly used in motor control, and the current control curves are spliced by adopting a plurality of sections of speed curves in the acceleration or deceleration process. Because of complex curve modeling, the maximum setting speed which can be achieved in practice is not easy to calculate, so that a longer low-speed crawling process exists in positioning, and when the maximum setting speed is changed, abrupt change of speed and acceleration is caused. Disclosure of Invention The invention aims to provide a motor control method, which adopts a simple curve model, and continuously compensates the running time according to the actual position in positioning to form position closed-loop control. When the maximum set speed is changed, the n-order continuous guidance of the speed and acceleration curve can be ensured. The invention provides a control method of a motor, which comprises the following steps: receiving a data instruction, wherein the data instruction comprises a target position, a current position, a maximum set acceleration, a maximum set deceleration, a maximum set speed, a minimum set speed, a reduction ratio, a lead and a rated motor rotating speed; Transforming the Sigmoid function curve to obtain a control curve algorithm model, calculating an acceleration stage and a uniform speed stage in an operation stage according to the Sigmoid acceleration curve model in the control curve algorithm model, and calculating a deceleration stage according to the Sigmoid deceleration curve model; calculating parameters of a control curve algorithm model according to the data instruction; According to the control curve algorithm model of the determined parameters, calculating the real-time speed of the motor at each moment in the operation stage in real time; Controlling the operation of the motor according to the real-time speed; In the running process of the motor, compensating the running time in real time according to the actual distance of the motor in unit time to form a position closed loop; when the maximum set speed is changed and takes effect, the parameters of the control curve algorithm model are modified, and the n-order continuous guidance of the speed curve and the acceleration curve is ensured. According to the motor control method provided by the invention, the curve control model is generated based on the Sigmoid function curve, and only one curve is needed in the acceleration or deceleration process respectively without multi-section splicing, so that the maximum operation speed which can be achieved actually is easy to obtain, and the deceleration parking has no low-speed crawling process. The Sigmoid function curve is led in order n, the jerk and deceleration of the curve control model generated based on the Sigmoid function curve are continuous and free of abrupt change, the effective time and the curve model parameters are changed by controlling the speed, the speed and the acceleration are continuous and free of abrupt change when the maximum speed is changed, and the order n is led. In another exemplary embodiment of the motor control method, the Sigmoid function curves are respectively transformed in the Sigmoid acceleration curve model and the Sigmoid deceleration curve model, and a section of the Sigmoid function curves from-5 to 5 is intercepted; The expression of the Sigmoid acceleration curve model is V (t) = (V max-Vmin)/(1+e^(-a1t+5))+Vmin, t∈(0,10/a1); the Sigmoid deceleration curve model expression is V (t) = (V max-Vmin)/(1+e^(a2t-5))+Vmin, t∈(0,10/a2); the following calculation formula is obtained by deriving zero for the Sigmoid acceleration curve model and the Sigmoid deceleration curve model: Accmax=a1* (Vmax-Vmin)/4; Decmax=a2* (Vmax-Vmin)/4。 wherein V (t) is a real-time speed, V max is a maximum speed, V min is a minimum speed, acc max is a maximum set acceleration, dec max is a maximum set deceleration, a 1 and a 2 are intermediate variables, the maximum set speed is a set value of the maximum speed, and the minimum set speed is a set value of the minimum speed. In still another exemplary embodiment of the motor control method, a theoretical maximum set speed is calculated in the control curve algorithm model according to the target position and the actual current position, the maximum set speed in the data command, the rated speed of the motor and the theoretical maximum set speed are compared, and a minimum value of the three is substituted into the control curve algorithm model, wherein the theoretical maximum set speed is calculated according to the following formula: A=(5+(ln(1+e^(-5))))*(1/Accmax+1/Decmax); B=10* Vmin *(1/Accmax+1/Decmax); C=-4*D; A*(Vmax Theory of -Vmin)^2+B*(Vmax Theory of -Vmin)+C=0; Vmax Theory of =Vmin+(-B+SQRT(B*B-4*A*C))/2/A; Where D is the distance between the target position and