Share this

Design and Research of Variable Frequency Servo System Based on MSP430F149

2026-04-06 06:01:40 · · #1

Abstract: Variable frequency AC servo systems represent the current main trend in servo system applications. This design uses the MSP430F149 microcontroller as the core controller, integrating a frequency converter, variable frequency motor, encoder, etc., and discusses in detail the design of the variable frequency servo system, including both hardware and software solutions. The system exhibits good control accuracy and reliability, providing a sound solution for the design and research of variable frequency servo systems.

Keywords: MSP430F149; frequency converter; variable frequency servo system

0 Introduction

In recent years, the development of servo systems has always focused on stability, responsiveness and accuracy, which are also the factors that users value most during use. In machine tool servo systems, robot control systems, radar antenna control systems and other applications, DC servo motors and DC servo controllers are mostly used for control. In these control fields, servo control systems mainly use the position or angle of the load as the control object [1]. With the rapid development of frequency converter technology, AC frequency conversion drives in servo systems have been increasingly widely used due to their advantages such as high power factor, fast response speed, high accuracy and suitability for use in harsh environments. This paper proposes a digital frequency conversion servo system based on a high-performance single-chip microcomputer MSP430F149, a frequency converter and a frequency conversion motor, and introduces a digital PID algorithm into this system, so that the system obtains good static and dynamic performance.

1. Functions of the frequency converter servo system

To achieve reliable operation and good static and dynamic performance requirements for 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 servo systems. The system uses a high-speed microcontroller as the core controller to control the frequency converter, enabling the servo system to achieve higher control precision.

2) Communication function

The microcontroller and the host computer must ensure normal and correct communication. The microcontroller will compare the control command received from the host computer with the sampled feedback signal to obtain the offset control amount. Only after obtaining the corresponding offset amount will the microcontroller output the corresponding control signal to the frequency converter.

3) Precise feedback acquisition function

The accuracy of feedback acquisition is directly related to control precision. The system uses the variable M/T method to sample the speed of the servo motor, which is more accurate than the M method and T method, thus ensuring more precise control.

2 System Hardware Design

The system uses the single-chip microcomputer MSP430F149 as the core controller [2] and integrates a frequency converter, a frequency conversion motor, a sampling encoder and a PC host computer. Its system principle block diagram is shown in Figure 1.

Figure 1 System Block Diagram

The control process is as follows: the MSP430F149 microcontroller controls and coordinates the operation of various functional modules of the system; the PC host computer transmits control signals to the MSP430F149 via serial port UART0; the microcontroller samples and processes the feedback signals, compares the processed data with the control signals from the host computer to obtain the error, and then performs corresponding calculations to obtain the servo system control quantity; the MSP430F149 directly converts the obtained control quantity into an RS485 signal via serial port UART1 and outputs it to the frequency converter; the frequency converter generates a variable frequency and variable voltage power signal according to the received control signal to drive the motor to complete the desired action; at the same time, the host computer obtains the speed of the variable frequency motor, system parameters, etc. through the serial port UART0 of the MSP430F149 to generate printed reports, providing a good human-machine interface for operators.

2.1 Microcontroller Unit

The MSP430F149 is the core controller of a variable frequency AC servo system. It handles the transmission of system control and measurement signals, makes complex control decisions, coordinates the operation of various modules, and receives and recognizes control commands. This microcontroller is an ultra-low-power microcontroller with a 16-bit architecture, integrating a 16-bit CPU register and a constant generator, maximizing code efficiency. It includes two built-in 16-bit timers, a fast 12-bit A/D converter, two general-purpose serial synchronous/asynchronous communication interfaces, and 48 I/O ports. It contains 60KB of FLASHROM and 2KB of RAM. This design is a real-time control system requiring real-time data acquisition and transmission. The MSP430F149's 60K FLASH memory meets the system program's programming storage needs, while the internal data RAM (2K) ensures real-time data acquisition, processing, and transmission. 48 digital peripheral ports facilitate data transmission and control with peripheral devices. The 16-bit architecture ensures the system can make complex control decisions, and the dual serial UART ports meet the real-time communication needs between the controller, the host computer, and the frequency converter.

2.2 Internal Implementation of Photoelectric Encoder and M/T Speed ​​Measurement MSP430F149

The accuracy control of the servo system mainly depends on the measurement accuracy of the motor speed signal. This system uses an incremental photoelectric encoder as the detection element for the motor speed. Common speed measurement methods for electric encoders include the M method, the T method, and the M/T method. The M method measures the speed of the motor under test by measuring the number of pulses output by the photoelectric encoder within a specified time interval. It is suitable for high-speed measurement. The T method measures the speed of the motor under test by measuring the time interval between two adjacent pulses. This method has poor accuracy in high-speed measurement and is generally only suitable for low-speed measurement. The M/T method determines the speed by simultaneously measuring the detection time and the number of pulses that occur within this detection time. It has good speed measurement accuracy over the entire speed range, but at low speeds, as the frequency decreases, a longer measurement time is required, 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. It means that during the speed measurement process, not only do the photoelectric encoder pulse M1 and the high-frequency clock pulse M2 change with the motor speed, but the detection time Tg also changes. It is always equal to the sum of the M1 pulse cycles of the photoelectric encoder (the speed measurement principle is shown in Figure 2). The value of Tg is obtained by the high-frequency clock pulse M2, and the motor speed gauge can be determined by the following formula [3].

In the formula: M1 is the preset number of pulses; M2 is the number of high-frequency clock pulses; fc is the high-frequency clock frequency; λ is the photoelectric encoder frequency multiplication coefficient; P is the number of lines of the photoelectric encoder.

Figure 2. Principle of variable M/T method for speed measurement

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

Using the internal timers A and B of the MSP430F149, the variable M/T method can be used to measure the motor speed, which simplifies the design of the peripheral circuit and reduces the power consumption of the system. Timer A counts the pulses of the external photoelectric encoder, and timer B counts the internal high-frequency clock of the system. Timer A operates in 16-bit counting mode. The measured value M1 is loaded into the register of timer A. When timer A counts M1 pulses, the timer generates an interrupt. The program reads the count value M2 of timer B. Since M1 is known, the motor speed can be calculated quickly and accurately according to formula (1).

2.3 Frequency Converter

The frequency converter is the main actuator of the entire servo system. Its working principle is as follows: in the main circuit, 220V, 50Hz AC power is converted to smooth DC power through a rectifier using an AC-DC-AC conversion method. Then, a three-phase inverter composed of semiconductor IGBTs converts the DC power into AC power with variable voltage and frequency. Its frequency conversion control methods mainly include V/F control, space vector control (VC), and direct torque control (DTC). V/F frequency conversion control suffers from decreased system performance and stability at low speeds due to stator resistance, inverter dead-zone effect, and the significant influence of stator resistance voltage drop on torque caused by low inverter voltage. Therefore, it is only suitable for applications with small speed variation ranges and low mechanical characteristic requirements. Space vector control (VC) suffers from difficulties in accurately observing rotor flux in practical applications, and its system characteristics are greatly affected by motor parameters, making it difficult to achieve ideal control results. Direct torque control (DTC) eliminates the complex decoupling calculations in vector control and directly analyzes the mathematical model of the AC motor in the stator coordinate system to control the motor flux linkage and torque, which simplifies the main circuit and improves the reliability of the system, making it suitable for occasions with large speed and load variations [4-5].

In summary, this servo system uses a Delta VFD-V high-frequency inverter. It incorporates PID feedback control and various control modes including V/F, vector control, and torque control (the system uses torque control). Furthermore, its zero-speed torque can reach over 150%, ensuring excellent static performance.

3 System Software Design

To facilitate system maintenance and upgrades, the system software design adopts a modular program structure, mainly consisting of a main program, a motor servo interrupt service program, and a speed measurement service subroutine.

3.1 Main Program

After completing system initialization, the main program enters the host computer communication query and display subroutine loop, waiting for an interrupt to occur. Motor speed acquisition is implemented using a timer interrupt. The main program flowchart 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 the MSP430F149. The flowchart of the motor control interrupt program is shown in Figure 3b.

Figure 3 Program Flowchart

3.3 Design of Digital PID Regulator

In digital PID control systems, the addition of integral correction can lead to excessive overshoot, which is unacceptable in servo systems [6-7]. To reduce the impact of overshoot on the dynamic performance of the control system, an integral-separated PID control algorithm should be used during motor servoing processes such as start-up, stopping, or significant deviation from the setpoint, where only proportional and derivative operations are performed to cancel integral correction. Integral correction is only used when the controlled variable approaches the setpoint to eliminate static error. To reduce overshoot, improve the steady-state control accuracy of the system, and achieve higher control quality, this servo system introduces an integral-separated PID control algorithm. The specific algorithm implementation is as follows:

(1) Set the threshold ε>0 according to the actual situation.

(2) At that time, PD control was adopted to avoid excessive overshoot of the system and to enable the system to have a faster response speed.

(3) At that time, PID control was used to ensure the accuracy of servo control.

Control algorithm formula:

4. Conclusion

The AC variable frequency servo system designed in this paper combines the new generation high-speed microcontroller MSP430F149 with the Delta torque control frequency converter VFD-V. Control is based on the upper computer communication method, which improves the controllability and stability of the system. The microcontroller replaces the traditional PLC control and links with the upper computer to adjust system parameters, realizing a good human-machine interaction platform. At the same time, it 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 servo system design and development.

References:

[1] Xi Zhigang, Zhou Hongfu. Development and current status of motion controllers [J]. Machine Tool Electrical Appliances. 2005, (4): 5-10.

[2] Xue Xiaoling, Liu Zhiqun, Jia Junrong. Detailed Explanation of Application and Development Examples of Microcontroller Interface Modules [M]. Beijing: Beijing University of Aeronautics and Astronautics Press, 2010.

[3] Wu Hong, Jiang Shilong, Gong Xiaoyun, et al. Current status and development of motion controllers [J]. Manufacturing Technology & Machine Tool. 2004, (1): 24-27.

[4] Han Antai, Liu Zhifei, Huang Hai. DSP Controller Principles and Its Application in Motion Control Systems [M]. Beijing: Tsinghua University Press, 2003.

[5]MaoJia, YuanSenmiao.DesignofaservoembeddedcontrolsystembasedonDSP[J].YiQiYiBiaoXueBao/ChineseJournalofScientificInstrument.2003,24:392.

[6] Liu Bing, You Bo, Song Jiliang. Servo Motion Controller Based on DSP [J]. Journal of Harbin University of Science and Technology. 2005, 10(3):114-116.

[7] Pan Song, Huang Jiye, Zeng Yu, et al. Practical Tutorial on SOPC Technology [M]. Beijing: Tsinghua University Press, 2005.

Author's contact information: Name: Guo Jianling; Address: P.O. Box 474, No. 66, Wuliu Road, Wanbailin District, Taiyuan City, Shanxi Province, Postcode: 030024; Email: [email protected]; Phone: 15513048235.

Read next

CATDOLL Mimi Hard Silicone Head

The head made from hard silicone does not have a usable oral cavity. You can choose the skin tone, eye color, and wig, ...

Articles 2026-02-22