0 Introduction
Over the past few decades, the rapid development of digital technology, computer technology and permanent magnetic materials has opened up broad prospects for the application of stepper motors. The open-loop CNC system composed of stepper motors and drive circuits is very simple, cheap and very reliable. In addition, stepper motors are also widely used in printers, engraving machines, plotters, embroidery machines and automation instruments. Because of the wide application of stepper motors, more and more research has been done on the control of stepper motors. If the step pulse changes too fast during startup or acceleration, the rotor cannot keep up with the change of the power signal due to inertia, resulting in stalling or loss of step; when stopping or decelerating, superstepping may occur due to the same reason. In order to prevent stalling, loss of step and superstepping and increase the operating frequency, the stepper motor should be controlled by speed control. This article introduces a stepper motor speed controller for automatic edge grinding machines. Considering the versatility, it can be applied to other occasions.
From the torque-frequency characteristics of the stepper motor, it can be seen that the output torque of the stepper motor decreases as the pulse frequency increases. The higher the starting frequency, the smaller the starting torque, the worse the ability to drive the load, and the loss of step will occur when starting, and overshoot will occur when stopping. In order to make the stepper motor quickly reach the required speed without losing step or overshoot, the key is to make the torque required by the acceleration during the acceleration process fully utilize the torque provided by the stepper motor at each operating frequency, and not exceed this torque. Therefore, the operation of the stepper motor generally goes through three stages: acceleration, constant speed, and deceleration. The acceleration and deceleration process time is required to be as short as possible, and the constant speed time is as long as possible. Especially in work that requires fast response, the time required to run from the starting point to the end point is the shortest, which requires the acceleration and deceleration process to be the shortest, and the speed at constant speed is the highest. In the past, most of the speed increase and deceleration were selected according to the linear law. When this method is used, the change of its pulse frequency has a constant acceleration. Under the condition that the stepper motor does not lose step, the acceleration of the drive pulse frequency change is proportional to the angular acceleration of the stepper motor rotor. When the torque of the stepper motor remains constant as the pulse frequency increases, the linear acceleration and deceleration curve is the ideal acceleration and deceleration curve. However, the torque of the stepper motor decreases as the pulse frequency increases, so the straight line is not the ideal acceleration and deceleration curve. Therefore, although the method of accelerating and decelerating according to the linear law is simple, it cannot ensure that the change of the angular acceleration of the stepper motor rotor is consistent with the change of its output torque during the acceleration and deceleration process, and cannot maximize the acceleration performance of the motor. This system seeks a discrete control algorithm based on FPGA control that accelerates and decelerates according to the exponential law. After multiple runs, it achieves the expected goal.
1 Acceleration and deceleration control algorithm
1.1 Acceleration and deceleration curve
This design derives the distribution law of the acceleration and deceleration pulse sequence that changes according to the exponential curve according to the dynamic equation and torque-frequency characteristic curve of the stepper motor, because the torque-frequency characteristic describes the maximum output torque at each frequency, that is, the maximum torque applied to the stepper motor as a load at this frequency. Therefore, taking the torque-frequency characteristic as the maximum output torque that can be achieved (but not exceeded) within the acceleration range to formulate the distribution law of the acceleration and deceleration pulse sequence is close to the optimal acceleration and deceleration law of maximum torque control. This ensures that the maximum torque can be output when the frequency increases, that is, it can follow the maximum torque, fully exert the working performance of the stepper motor, and make the system have good dynamic characteristics.
From the dynamic equation of the stepper motor and the torque-frequency characteristic curve, ignoring the damping torque, the following equation can be derived:
In the formula,
is the rotor moment of inertia, K is the slope when the output torque is assumed to change in a straight line, and τ is the time constant that determines the speed of the speed increase, which is determined by experiments in actual work. fm is the highest continuous operating frequency of the stepper motor under load torque. The stepper motor must operate at a frequency lower than this frequency to ensure that it does not lose steps. Formula (1) is the speed increase characteristic of the stepper motor, and the motor speed increase curve can be drawn from this equation. Formula (1) shows that the frequency f of the drive pulse should increase exponentially with time t, so that the speed of the stepper motor can be increased to the required operating speed in a shorter time. Since the torque-frequency characteristics of most stepper motors are approximately linearly decreasing, the above control law is the best.
1.2 Acceleration and deceleration discrete processing
In this system, FPGA uses a frequency divider to control the speed of the stepper motor. The speed increase and decrease control is actually to continuously change the size of the initial load value of the frequency divider. Since the exponential curve cannot be realized through program compilation, a step curve can be used to approximate the speed increase curve, and the load value does not necessarily have to be calculated for each step.
As shown in Figure 1, the vertical axis is the frequency, the unit is step/second, which actually reflects the speed. The horizontal axis is time, and the number of steps taken in each period of time is represented by N. The number of steps actually reflects the distance traveled. The ideal speed increase curve and the actual speed increase curve are marked in the figure.
The speed-up process of the stepper motor can be processed according to the following steps.
(1) If the actual operating speed is fg, the speed-up time can be calculated from formula (3.4):
(2) The speed-up section is evenly discretized into n sections, which is the number of steps for the step-by-step speed-up. The rise time is tr, and the holding time of each speed is:
During the execution of the program, the number of steps to be taken at each speed should be calculated, and then checked in a decreasing manner, that is, each step is reduced by 1. When it is reduced to zero, it means that the number of steps to be taken at this speed has been completed and the next speed should be entered. The cycle continues until the given speed is greater than or equal to the given speed. The deceleration process is exactly the opposite of the speed-up process.
2 Implementation of frequency pulses
The core of the frequency pulse module is the controllable divider. The standard frequency is generated by an external crystal oscillator. As long as the corresponding frequency division coefficient is input at the input end of the divider, the required frequency can be obtained. This module uses VHDL hardware description language, QuartusII development platform, and Altera's FPGA to design a relatively general controllable frequency divider that can meet the above requirements. Figure 2 is the schematic diagram of the frequency divider, and Figure 3 is the simulation waveform of the frequency divider.
3 Conclusion
The controller designed based on the hardware description language VHDL has the advantages of short development and design cycle, low risk, high system integration, and low power consumption, and will be the mainstream direction of chip design. In the open CNC system, the acceleration and deceleration modules and related functional modules that can be reused by hardware are studied and implemented. By using the reconfigurable capability of the programmable logic device FPGA, the motion control chip with fully customized functions can be flexibly implemented according to the needs. This paper designs an exponential acceleration and deceleration controller in the automatic edge grinding machine. On this basis, it is only necessary to expand the corresponding number of acceleration and deceleration modules to realize multi-axis linkage acceleration and deceleration control.
Previous article:Design of motion vision processing system based on SOPC
Next article:Design of MIG arc welding power supply control system based on DSC+MCU
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- [AIoT Smart Smoke Detection System] Product Design Background
- Simulation research on high frequency antenna protection design
- Please give some advice on the working mode of the boost circuit
- i.MX6ULL Embedded Linux Development 6-System Burning to eMMC and the Pitfalls Encountered!
- Gowin GW1N development board logic analyzer speed test
- Which MSP430FR6972 development board is suitable?
- Please recommend some easy-to-understand books or web links about phase detectors and frequency detectors. Thank you.
- PS2 Interface.pdf
- DIY a CNC switching power supply, you need to master these knowledge
- General architecture of the hardware system of the C6000 series DSP