Research on the Speed ​​Control System of AC Servo Motor Based on Single Chip Microcomputer

Publisher:shengjuLatest update time:2009-09-25 Source: 现代电子技术Keywords:MCU Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
Servo motors are control motors, which are divided into DC servo motors and AC servo motors. Due to the advantages of AC servo motors such as small size, light weight, large torque output, low inertia and good control performance, they have been widely used in automatic control systems and automatic detection systems as actuators to convert control electrical signals into mechanical rotation of the shaft. Due to the high positioning accuracy of servo motors, modern position control systems have increasingly adopted position control systems with AC servo motors as the main components. The design here also achieves the purpose of controlling the pulse width by controlling the closing and opening of the relay, and controls the displacement of the sliding magnetic block of the non-standard AC servo motor through closed-loop control, and uses the change of the magnetic field to achieve the purpose of controlling the motor speed.

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.

Keywords:MCU Reference address:Research on the Speed ​​Control System of AC Servo Motor Based on Single Chip Microcomputer

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

Using timer to realize long press and short press function on 51 single chip microcomputer
In our projects, we often need to implement a long press to execute a certain function and a short press to execute another function when there is only one button. In view of this, the core board built with 51 is tested and it is feasible. Well, no more nonsense, simple and crude, just paste the program structure di
[Microcontroller]
Using timer to realize long press and short press function on 51 single chip microcomputer
Based on the connection between LJD-ZN-8400T intelligent touch LCD display terminal and single chip microcomputer
As a common display device, LCD has the characteristics of low power consumption, small size, light weight, and large amount of displayed information. Especially in portable devices, it occupies an absolute mainstream position. For simple information display of characters or numbers, segment code LCD drivers are usu
[Microcontroller]
Based on the connection between LJD-ZN-8400T intelligent touch LCD display terminal and single chip microcomputer
Summary of PIC microcontroller interrupts
Compared with 51 or other series of single-chip microcomputers, the interrupt mechanism of PIC single-chip microcomputer has its own special features. In view of some problems and doubts of some of our beginners, I will make a personal summary here. If there are any inappropriate parts, please correct me. sO100
[Microcontroller]
The simplest system of 51 single chip microcomputer
power supply This does not need much explanation. It is impossible to work properly without power. The key question is what kind of power supply does the microcontroller need and which pin should it be connected to? See the figure below: Usually when we number the pins of a chip, we make the semicircular notch face
[Microcontroller]
The simplest system of 51 single chip microcomputer
OLED display implementation method based on single chip microcomputer
    1 Introduction      Organic electroluminescent display, also known as organic light emitting diode (OrganICLightEMIttingDiode, OLED) or organic light emitting display OrganicLightEmittingDisplay (OLED), has obvious advantages over the popular liquid crystal display (LCD) on the market, mainly manifested in: self-l
[Microcontroller]
OLED display implementation method based on single chip microcomputer
51 MCU Programming Section 5: Keyboard Driver
Section 5: Keyboard Driver It means providing some functions for tasks to call, get key information, or read key values. Define a header file KEY.H to describe the available functions, as follows: Code 1. #ifndef _KEY_H_ //Prevent repeated references to the document. If the symbol _KEY_H_ has not been defined,
[Microcontroller]
What is an automotive-grade MCU? Application of domestic control chips
Introduction to control chips Control chips mainly refer to MCU (Microcontroller Unit), which is a microcontroller, also known as a single-chip microcomputer. It appropriately reduces the CPU's main frequency and specifications, and integrates multiple functional modules and interfaces such as memory, timer, A/
[Embedded]
What is an automotive-grade MCU? Application of domestic control chips
Design based on ARM+MCU+CPLD/FPGA
0 Introduction Traditional data acquisition systems generally use single-chip microcomputers, and most systems complete data transmission through the PCI bus. Its disadvantages are poor mathematical computing capabilities; limited by the number of computer slots and interrupt resources; inconvenient to conn
[Microcontroller]
Latest Industrial Control Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号