1 AC servo motor control system design
The AC servo motor used in the system is a three-phase AC motor; the driver controls the U/V/W three-phase electricity to form an electromagnetic field; the rotor rotates under the action of this magnetic field, and the motor feeds back the speed signal to the driver through the proximity sensor; the driver compares the feedback value with the target value and adjusts the angle of rotation of the rotor. The servo motor, also known as the actuator motor, is used as an actuator in the automatic control system to convert the received electrical signal into the angular displacement or angular velocity output on the motor shaft.
2 System Hardware Design
This project essentially uses the STC89C52RC single-chip microcomputer to build a minimum system to achieve pulse width adjustable output to control two relays, realize the forward and reverse intelligent control of the motor, and thus achieve precise displacement control of the servo motor. The control system composition is shown in Figure 1.
The required speed value of the motor is input by pressing the button and compared with the motor speed fed back by the speed sensor. The PID algorithm is used and converted into a corresponding pulse signal after being processed by the single-chip microcomputer. The opening of the relay is then adjusted by the photoelectric coupler. By adjusting the pulse width of the relay, pulse width modulation is achieved, thereby controlling the positive and negative displacement of the magnetic block on the servo motor to make the motor reach a given speed value. At the same time, the single-chip microcomputer receives the feedback pulse signal generated by the speed sensor fixed on the servo motor shaft as the motor rotates, and displays the actual speed of the motor on the LED in real time.
2.1 Hardware Design of MCU Controller
A motion controller software system is developed here. The hardware structure of the system is developed based on a single-chip microcomputer, and the functions used are external interrupts, timer interrupts, sensor pulse signal detection, and input/output. The P0.0, P0.1, and P0.2 ports of STC89C52RC are used as input ports for the SET key, the MOVE key, and the UP key respectively. The pulse transmission frequency is controlled by the timer interrupt of the STC89C52 timer T0, thereby controlling the speed of the motor. The system schematic diagram is shown in Figure 2.
2.2 Hardware design of driving circuit
Since the microcontroller belongs to TTL circuit (the levels of logic 1 and 0 are 2.4 V and 0.4 V respectively), the switch control signal level output by its I/O port cannot directly drive the motor, so a drive circuit needs to be added to the output end of the P2.6 port to control the speed increase signal; similarly, the drive circuit is also applied to the speed reduction output end of the P2.7 port. The system uses optocouplers and transistors as drivers, and the output channel of the optocoupler is transmitted to the control motor, so it has a strong ability to suppress noise interference, plays an isolation role, and can prevent strong electromagnetic interference; the transistor mainly plays a power amplification role. The motor drive circuit is shown in Figure 3.
3 System Software Design
The software of the controller mainly completes the LED display, accepts keyboard input, realizes the servo motor uniform speed operation and relay control functions, including the main program, key interrupt service program, timer T0 interrupt service program and LED display subroutine. In the AC servo motor control system, the main function of the microcontroller is to generate a pulse sequence, which is sent through the P3.2 port of the STC89C52RC. The system software uses the timer timing interrupt to generate a periodic pulse sequence, does not use software delay, and does not occupy the CPU. The CPU can process other events during the non-interrupt time, and only when the interrupt time comes, it will drive the servo motor to rotate one step. The system program flow chart is shown in Figure 4.
3.1 Key preset subroutine
There are 3 keys on the panel related to this subroutine, they are SET, MOVE and UP, their functions are: SET is used to determine the setting position, there are 4 positions, including ones, tens, hundreds and thousands; MOVE is used to select that position; UP controls the increase of the controlled position, each increase, cycle between 0 and 9. When the user confirms his input, he can press the SET key, and the program will determine the given speed of the servo motor when it is working according to the input value. Finally, the set value is stored in the corresponding variable. The key subroutine flow is shown in Figure 5.
3.2 Timer interrupt service subroutine
The microcontroller interrupts once every time the motor rotates. The motor speed can be calculated by detecting the time interval between two interrupts, that is, by counting the timer. In order to realize the speed detection, the speed interrupt needs to be configured as the highest interrupt priority INTO. The flowchart of the interrupt counting program is shown in Figure 6.
3.3 PID control algorithm of speed
As a product of the combination of fuzzy control and PID control, fuzzy adaptive PID control has the advantages of wide speed regulation range, fast adjustment speed and no need to master the precise mathematical model of the controlled object, as well as simple structure and easy implementation. According to the law of linear motor position motion, the basic idea of fuzzy adaptive PID control is: when the error is large, it is necessary to increase the weight of the error control effect to quickly eliminate the error and improve the system response speed; when the error is small, it is necessary to increase the weight of the error change control effect to avoid overshoot and make the system enter a steady state as soon as possible. According to the above rules, a fuzzy reasoning rule table for the fuzzy adaptive PID control system can be designed. Table 1 gives an example of the fuzzy adjustment rule of KP. Among them, e(k) and △e(k) are the position error and its change, respectively. The form of fuzzy reasoning rules is:
The principle of fuzzy adaptive PID control is shown in Figure 7.
The parameter adjustment value of fuzzy PID is:
In the formula: j is the number of rule conditional statements, j=1, 2,…, n; ukxy(Cx) is the membership degree of Kx in each rule statement; Cx is the central value of the fuzzy domain of the fuzzy subset obtained by the parameter x.
After the real-time detection of the motor speed is realized, the closed-loop control can be used to adjust the motor speed. The speed control block diagram is shown in Figure 8. Its calculation is shown in formula (2):
Where: Nr is the speed set by the button; N is the actual speed output value. The PI controller is programmed by the STC89C52RC microcontroller to achieve the control deviation △N between the actual speed and the set speed.
4 Conclusion
This system studies the use of a single-chip microcomputer as a controller to control non-standard AC servo motors, effectively utilizes the internal resources of the single-chip microcomputer, and has a detailed understanding of the operating characteristics of the corresponding motor motion control system. In the actual application of supporting devices for the production of speed-regulating motors, the system cost is reduced and the system performance is improved.
Previous article:Precision measurement and control system of belt speed based on photoelectric mouse sensor
Next article:Research on MATLAB Simulation of SVPWM in Cascade Speed Control System
Recommended ReadingLatest update time:2024-11-16 22:47
- Popular Resources
- Popular amplifiers
- Wireless Sensor Network Technology and Applications (Edited by Mou Si, Yin Hong, and Su Xing)
- Modern Electronic Technology Training Course (Edited by Yao Youfeng)
- Modern arc welding power supply and its control
- Small AC Servo Motor Control Circuit Design (by Masaru Ishijima; translated by Xue Liang and Zhu Jianjun, by Masaru Ishijima, Xue Liang, and Zhu Jianjun)
- Molex leverages SAP solutions to drive smart supply chain collaboration
- Pickering Launches New Future-Proof PXIe Single-Slot Controller for High-Performance Test and Measurement Applications
- CGD and Qorvo to jointly revolutionize motor control solutions
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Nidec Intelligent Motion is the first to launch an electric clutch ECU for two-wheeled vehicles
- Bosch and Tsinghua University renew cooperation agreement on artificial intelligence research to jointly promote the development of artificial intelligence in the industrial field
- GigaDevice unveils new MCU products, deeply unlocking industrial application scenarios with diversified products and solutions
- Advantech: Investing in Edge AI Innovation to Drive an Intelligent Future
- CGD and QORVO will revolutionize motor control solutions
- 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
- New version of WEBENCH user guide
- [FS-IR02 + D1CS-D54] - 5: Linking with MCU (D1CS-D54)
- Qorvo Acquires UWB Software Provider 7Hugs Labs SAS
- How is the burning of OTP chip carried out after SMD?
- MSP430FR2355 Mixed-Signal Microcontroller
- Timing Analysis 1 Static Analysis Basics
- MicroPython v1.19 is coming soon
- Application of Single Chip Microcomputer in Inverted Pendulum Control System
- 【XMC4800 Relax EtherCAT Kit Review】+ Getting Started with DAVE, Timer Interrupt and UART Simple Application
- Share: In actual project, the average load was too high, and finally found that it was this that was causing the problem