Speed control and motion planning of the hottest s

  • Detail

Speed control and motion planning of stepper motor

the biggest feature of stepper motor different from other control motors is that it can accept digital control signals (electric pulse signals) and convert them into corresponding angular displacement or linear displacement, so it itself is an executive element to complete digital analog conversion. Moreover, it can carry out open-loop position control, and input a pulse signal to get a specified position increment to avoid major accidents. Compared with the traditional DC servo system, the cost of such an incremental position control system is significantly reduced, and there is almost no need to adjust the system. Therefore, stepper motors are widely used in CNC machine tools, robots, remote control, aerospace and other fields, especially the development of microcomputer and microelectronics technology, which makes stepper motors more widely used

speed characteristics of stepping motor

the speed of stepping motor depends on the pulse frequency, the number of rotor teeth and the number of beats. Its angular velocity is proportional to the pulse frequency and synchronized with the pulse in time. Therefore, when the number of rotor teeth and the number of running beats are certain, the required speed can be obtained as long as the pulse frequency is controlled. Since the stepper motor is started with the help of its synchronous torque, the starting frequency is not high in order to avoid out of step. Especially with the increase of power, the rotor diameter and inertia increase, and the starting frequency and the maximum operating frequency may differ by as much as 10 times. In order to give full play to the fast performance of the motor, the motor is usually started below the starting frequency, and then gradually increase the pulse frequency until the desired speed. The selected change rate should ensure that the motor does not lose step, and try to shorten the starting acceleration time. In order to ensure the positioning accuracy of the motor, the pulse rate of the motor must be gradually reduced from the maximum speed to the speed that can be stopped (equal to or slightly greater than the starting speed) before stopping. Therefore, when the stepping motor drives the load to move a certain distance at high speed and locate it accurately, generally speaking, it should include five stages of "start acceleration high speed operation (constant speed) - deceleration stop". The speed characteristic is usually trapezoidal, and if the moving distance is very short, it is triangular, as shown in Figure 1

Figure 1 speed curve of stepper motor

structure of stepper motor control system

PC sets the frequency change (i.e. speed and acceleration change) in the acceleration and deceleration process by setting the initial value of 8253 counter 0 on the hardware control circuit at an appropriate time to prevent out of step. For example, set up the speed curve in the point control, and make the stepping motor generate enough torque to drive the load and keep up with the specified speed and acceleration when starting and accelerating; When decelerating, the lowering feature makes the load stop at the specified position without overshoot. The 8253 on the hardware control circuit board generates pulse square wave as the interrupt signal source, starts the solidification program in the subdivision drive circuit to generate pulses of a certain frequency, and drives the stepping motor after power amplification. The change of the moving direction of the stepping motor and the start and stop are realized by the computer control hardware control circuit

Figure 2 step motor control system

software and hardware are combined to control, which has the advantages of simple circuit and convenient control. In this kind of control, the storage unit occupied by microcomputer software is less, and the program development is not limited by timing. As long as the external interruption is allowed, the microcomputer can freely perform other tasks between each step of the motor to realize the motion control of multiple stepping motors

determination of initial value of timer

PC is used for real-time control of stepping motor. 8253 timer is used for pulse square wave generation. Its counter 0 works in mode 0 to generate pulse square wave, counter 1 works in mode 1 to count, and the clock frequency of 8253 counter 0 is provided by 2MHz crystal oscillator. Suppose that the initial value assigned by the computer to 8253 counter 0 is D1, then the frequency of the generated pulse square wave is f1=f0/d1, the period is t1=1/f1=d1/f0, d1=f0t1=f0/f1. Where F1 is the starting frequency and F0 is the crystal oscillator frequency

mathematical model of stepping motor speed up and down

in order to make the stepping motor not out of step during operation, it is generally required that its maximum operating frequency should be less than (or equal to) the step response frequency FS. At this frequency, the stepping motor can start, stop or reverse at will without out of step. There are two driving modes for stepping motor speed up and down, namely triangle and trapezoidal driving mode (see Figure 1), and triangle driving mode is a special case of trapezoidal driving, so we only need to study trapezoidal driving mode. The acceleration and deceleration of the motor are realized by the computer constantly modifying the initial value of the timer. In the acceleration phase of the motor, from the moment of starting, for each pulse generated, the initial value of the timer decreases by a certain value, and the corresponding pulse period decreases, that is, the pulse frequency increases; In the deceleration phase, when the initial value of the timer increases continuously, the corresponding pulse period increases and the pulse frequency decreases, corresponding to the deceleration phase of trapezoidal pulse frequency characteristics. The key of this design is to determine the pulse timing TN, the pulse time interval, that is, the pulse period TN and the pulse frequency FN. Suppose that the number of pulses is calculated from the start instant, the number of pulses in the acceleration stage is n, and set the start instant as the starting point of timing, the initial value of the timer is D1, and the reduction of the initial value of the timer is △. It can be seen from the physical process of the acceleration stage that the first pulse period, namely the pulse period at startup t1=d1/f0, t1=0. Due to the modification of the initial value of the timer, the second pulse period t2= (d1- △)/f0=t1- △/f0, and the pulse timing t2=t1, then the period of the nth pulse is:

the pulse timing is:

the pulse frequency is: through the above understanding,

the above formula shows the relationship between the number of pulses N and the pulse frequency FN and time TN respectively. Make △/f0= δ, That is, the reduction of two adjacent pulse cycles in the acceleration stage, the above formula is simplified as:

simultaneous (4), (5), and the relationship between FN and TN is simplified. The mathematical model of the acceleration stage is:

where, is a constant, and its value is related to the initial value of the timer and the change of the timer, a=- δ, B=(2T1+ δ) 2,C=8 δ。

the change of pulse frequency in the acceleration stage is:

it can be seen from equations (6) and (7) that in the acceleration stage, the pulse frequency increases continuously, and the acceleration increases as a quadratic function. This acceleration method is very beneficial to the operation of the stepping motor, because when starting, the acceleration is gentle. Once the stepping motor has a certain speed, the acceleration increases quickly. On the one hand, this makes the acceleration transition smoothly, which is conducive to improving the positioning accuracy of the machine. On the other hand, it can shorten the acceleration process and improve the fast performance

for the deceleration phase, according to the similar analysis method above, it can be concluded that the expression of pulse frequency characteristics is:

Where, a=- δ, B=(2T1- δ) 2,C=8 δ, T1 is the pulse period at the beginning of deceleration, δ Is the increment of two adjacent pulse cycles in deceleration phase. Because t1>> δ, Then b=4t12, from equations (8) and (9), it can be seen that the pulse frequency decreases continuously in the deceleration stage, and the acceleration is negative, and the absolute value decreases as a quadratic function. This deceleration performance is also beneficial to the stepping motor. It enables the stepping motor to stop smoothly without impact during deceleration, and improves the positioning accuracy of the machine

to sum up, the pulse frequency characteristics of this design can be obtained (the force value accuracy represents the accuracy of the press, see Figure 3)

Figure 3 pulse frequency characteristics

experiment and summary

this method has been successfully applied to the intelligent motion control unit I designed. By developing the control software in Windows environment and using vc++ to design a good control interface, it is convenient to realize the selection and position control of motion mode, speed, acceleration and deceleration, and has a certain degree of intelligence. The control unit reduces the occupied time of PC, so as to complete other work while the motor is running, so as to realize the acceleration and deceleration, speed and position control of three stepping motors. And the subdivision driving power supply is used to improve the stepping accuracy and positioning accuracy. It provides a solid technical and intellectual property protection for the development of new alloys (end)

Copyright © 2011 JIN SHI