Design and Research of Frequency Conversion Servo System Based on Single Chip Microcomputer MSP430F149

In recent years, the development of servo system has always been based on stability, responsiveness and precision, which are also the most important factors for users in the process of use. In the machine tool servo system, robot control system, radar antenna control system and other occasions, most of them are controlled by DC servo motor and DC servo controller.In these control fields, the servo control system mainly controls the position and angle of the load.[1].

0 Preface

In recent years, the development of servo system has always been based on stability, responsiveness and precision, which are also the most important factors for users in the process of use. In the machine tool servo system, robot control system, radar antenna control system and other occasions, most of them are controlled by DC servo motor and DC servo controller.In these control fields, the servo control system mainly controls the position and angle of the load.[1]. With the rapid development of frequency converter technology, AC variable frequency drives in servo systems have been more and more widely used because of their high power factor, fast response, high precision, and suitable for use in harsh environments. This paper proposes a digital variable frequency servo system based on high-performance single-chip microcomputer MSP430F149, frequency converter and variable frequency motor, and introduces digital PID algorithm into this system, so that the system obtains good system static and dynamic performance.

1 Function of frequency conversion servo system

In order to meet the requirements of reliable operation, good static and dynamic performance of the variable frequency servo system, its functions are as follows:

1) Precise servo control function

High precision, high speed and high power are the development trends of the servo system. The system uses a high-speed single-chip microcomputer as the core controller to control the frequency converter, so that the control of the servo system can achieve higher precision.

2) Communication function

The communication between the single-chip microcomputer and the host computer must be normal and correct. The single-chip microcomputer compares the control command received from the host computer with the sampled feedback signal to obtain the offset control amount. The controller outputs the corresponding control signal.

3) Accurate collection of feedback

The accuracy of feedback collection is directly related to the control accuracy. The system adopts the variable M/T method to sample the speed of the servo motor. The sampling accuracy is more accurate than the M method and the T method, thus ensuring more accurate control.

2 System hardware design

The system takes the microcontroller MSP430F149 as the core controller[2], which integrates frequency converter, frequency conversion motor, sampling encoder and PC host computer. Its system principle block diagram is shown in Figure 1.

Design and Research of Frequency Conversion Servo System Based on Single Chip Microcomputer MSP430F149
Figure 1: System block diagram

The control process is as follows: the single-chip MSP430F149 controls the work of each functional module of the coordination system; the PC host computer transmits the control signal to the MSP430F149 through the serial port UART0, and the single-chip microcomputer processes the feedback signal after sampling, and combines the processed data with the control signal from the host computer. Compare with each other, get the error amount, and then get the servo system control amount through the corresponding operation; MSP430F149 will directly convert the obtained control amount into RS485 signal through the serial port UART1 and output it to the Inverter, and the inverter will generate frequency conversion according to the received control signal. At the same time, the host computer obtains the speed and system parameters of the variable frequency motor through the serial port UART0 of the MSP430F149 to form a printed report, which is a good man-machine interface for the operator.

2.1 MCU unit

MSP430F149 is the core controller of the variable frequency AC servo system, which completes the transmission of system control signals and measurement signals and complex control decisions, coordinates the work of each module, and receives and recognizes operation control instructions. This microcontroller is an ultra-low-power microcontroller with a 16-bit architecture, 16-bit CPU integrated registers and constant generators to maximize code efficiency. Including 2 built-in 16-bit timers, a fast 12-bit A/D converter, two universal serial synchronous asynchronous communication interfaces and 48 I/O ports, the chip contains 60KFLASHROM and 2KBRAM. This design is a real-time control system, which needs to collect and transmit data in real time. The 60KFLASH memory in MSP430F149 can meet the needs of the system program for programming storage space. The internal data RAM (2K) ensures real-time data acquisition, processing and transmission, and 48 digital peripheral ports facilitate data transmission and control with peripheral devices. , The 16-bit architecture ensures that the system can complete complex control decisions, while the dual serial UART satisfies the real-time communication needs of the controller, the host computer and the frequency converter.

2.2 Internal realization of photoelectric encoder and variable M/T speed measurement MSP430F149

The precision control of the servo system mainly depends on the measurement precision of the motor speed signal. This system adopts the incremental photoelectric encoder as the detection element of the motor speed. The more common electrical encoder speed measurement methods are M method, T method and M/T method. The M method is to measure the number of pulses output by the photoelectric encoder within a specified time interval to obtain the speed value of the measured motor speed, which is suitable for high-speed measurement occasions. T-method measurement is a method of measuring the interval time between two adjacent pulses to determine the speed of the motor under test. This method has poor accuracy in high-speed measurement, so it is generally only suitable for low-speed measurement. The M/T method determines the rotational speed by simultaneously measuring the detection time and the number of pulses that occur within the detection time.It has good speed measurement accuracy in the whole speed range, but at low speed, as the frequency decreases, it requires a long measurement time, which cannot meet the fast dynamic response performance index of the servo system.[2]. In recent years, the variable M/T speed measurement method has been gradually used, which means that in the process of speed measurement, not only the detection photoelectric encoder pulse M1 and the high-frequency clock pulse M2 change with the motor speed, but also the detection time Tg is also changing, which is always equal to The sum of the pulse periods of the photoelectric encoder M1 (the principle of speed measurement is shown in Figure 2). The size of Tg is calculated by the high-frequency clock pulse M2, then the motor speedometer can be determined by the following formula[3].

Design and Research of Frequency Conversion Servo System Based on Single Chip Microcomputer MSP430F149
Figure 2: The principle of variable M/T speed measurement

When the motor is running at low speed, the detection time Tg of the variable M/T method is obviously shorter than that of the M/T method. It can be seen that the speed measurement of the variable M/T method can meet the requirements of the control system for the accuracy and real-time performance of the speed measurement. .

The MSP430F149 internal timers A and B can be used to complete the measurement of the variable M/T method of the motor speed, which can simplify the design of the peripheral circuit and reduce the system power consumption. Timer A counts the pulses of the external photoelectric encoder, and timer B counts the internal high-frequency clock of the system; timer A works in 16-bit counting mode, and loads the measured value M1 into the register of timer A, and in the timer When A counts up to M1 pulses, the timer interrupts, and the program reads the count value M2 of timer B. Since M1 is known, the motor speed can be quickly and accurately calculated according to formula (1).

2.3 Inverter

The frequency converter is the main executive element of the entire servo system. Its working principle is: in the main circuit, the AC-DC-AC conversion method is used to convert the 220V, 50Hz AC power into a smooth DC power through the rectifier, and then the DC power is converted into a variable voltage and variable frequency through a three-phase inverter composed of semiconductor IGBTs. of alternating current. The frequency conversion control methods mainly include V/F control, space vector control (VC) and direct torque control (DTC) methods. The V/F frequency conversion control mode reduces the system performance and the stability at low speed due to the stator resistance and the dead zone effect of the inverter, and the torque caused by the low voltage of the inverter is greatly affected by the voltage drop of the stator resistance. It is suitable for occasions where the speed variation range is small and the mechanical characteristics are not high. Due to the fact that the space vector control (VC) method is difficult to accurately observe the rotor flux linkage in practical applications, and the system characteristics are greatly affected by the motor parameters, the actual control effect is difficult to achieve an ideal level.Direct torque control (DTC) abandons the complex decoupling operation in vector control, and directly analyzes the mathematical model of the AC motor in the stator coordinate system to control the flux linkage and torque of the motor, which simplifies the main circuit and improves the system. reliability, so it is suitable for occasions with a wide range of speed and load variation[4-5].

To sum up, this servo system adopts Delta VFD-V type high frequency inverter. It contains PID feedback control and various control methods such as V/F, vector control and torque control (the system adopts torque control mode), and the zero-speed torque can reach more than 150%, which ensures that the system has good static performance .

3 System software design

In order to facilitate system maintenance and upgrade, the system software design adopts a modular program structure, which mainly consists of the main program, the motor servo interrupt service program, and the speed measurement service subroutine.

3.1 Main program

After the main program completes the system initialization, it enters the communication query and Display subroutine cycle of the host computer, and waits for the occurrence of interruption. The motor speed acquisition is realized by timing interruption. The main program flow chart is shown in Figure 3a.

3.2 Motor Servo Interrupt Program

The variable frequency motor servo interrupt program is interrupted and executed by the internal timer A of MSP430F149. The flow chart of the motor control interrupt program is shown in Figure 3b.

Design and Research of Frequency Conversion Servo System Based on Single Chip Microcomputer MSP430F149
Figure 3: Program flow chart

3.3 Design of digital PID regulator

In the digital PID adjustment control system, after adding the integral correction, the system will produce excessive overshoot, which is not allowed by the servo system[6-7]. In order to reduce the impact of overshoot on the dynamic performance of the control system, it is necessary to use the integral separation PID control algorithm when the motor servo process starts, stops or deviates greatly from the given time, and only the proportional and differential operations are added to cancel the integral correction. When the controlled variable is close to the given value, the integral correction is used to eliminate the static error. In order to reduce the overshoot, improve the steady-state control accuracy of the system, and make the system have higher control quality, the servo system introduces the integral separation PID control algorithm. The specific algorithm is implemented as follows:

Design and Research of Frequency Conversion Servo System Based on Single Chip Microcomputer MSP430F149

4 Conclusion

The AC variable frequency servo system designed in this paper combines a new generation of high-speed microcontroller MSP430F149 with Delta torque control inverter VFD-V type, and controls it based on the communication method of the host computer, which improves the controllability and stability of the system. The traditional PLC control is adopted, and the system parameter adjustment is carried out in conjunction with the host computer, which realizes a good human-computer interaction platform, reduces the development cost and cycle of the system, and achieves good control accuracy and reliability in practical applications. , providing a better system solution for the design and development of the servo system.

The Links:   DMF682AN-EW CM15TF-12H