Design and research of digital frequency conversion servo system based on MSP430F149

Publisher:ShiningSmileLatest update time:2018-04-07 Source: eefocusKeywords:MSP430F149 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

    Preface


    With the pollution of the environment and the shortage of energy, electric bicycles are becoming more and more popular with people for their advantages of no exhaust pollution, no noise, use of electric energy and convenience, and have become a means of transportation in life. This article introduces a brushless DC motor speed control system designed using the high-speed SoC C8051F313 microcontroller of the American company SILICon laboratories (Silabs). The system makes full use of the on-chip resources of C8051F313, the design circuit is simple, requires fewer peripheral components, and the overall cost of the controller is low and the performance is good.


  1 Functions of variable frequency servo system

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

  1) Accurate servo control function

  High precision, high speed and high power are the development trend of servo system. The system adopts high-speed single-chip microcomputer as the core controller to control the inverter, so that the control of servo system can achieve higher precision.

  2) Communication function The

  communication between single-chip microcomputer and host computer must be normal and correct. The single-chip microcomputer will receive the control command from the host computer and compare it with the sampled feedback signal to obtain the offset control amount. Only when the corresponding offset is obtained, the single-chip microcomputer will output the corresponding control signal to the inverter.

  3) Accurate feedback quantity collection function

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

  2 System hardware design

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

Figure 1 System Block Diagram
Figure 1 System Block Diagram

  The control process is as follows: the single-chip microcomputer MSP430F149 controls and coordinates the work of each functional module of the system; the PC host computer transmits the control signal to the MSP430F149 through the serial port UART0, the single-chip microcomputer samples the feedback signal and processes it, compares the processed data with the control signal from the host computer, obtains the error amount, and then obtains the servo system control amount through the corresponding calculation of the error amount; the MSP430F149 directly converts the obtained control amount into an RS485 signal through the serial port UART1 and outputs it to the inverter. The inverter generates a power supply signal of variable frequency and voltage 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 form a printed report, which provides a good human-machine operation interface for the operator.

  2.1 The single-chip microcomputer unit

  MSP430F149 is the core controller of the variable frequency AC servo system. It completes the transmission of system control signals and measurement signals and complex control decisions, coordinates the work of various modules, and receives and identifies operation control instructions. This single-chip microcomputer is an ultra-low power microcontroller with a 16-bit architecture, a 16-bit CPU integrated register and a constant generator to achieve maximum code efficiency. It includes two built-in 16-bit timers, a fast 12-bit A/D converter, two universal serial synchronous asynchronous communication interfaces and 48 I/O ports, and contains 60K FLASHROM and 2KB RAM on the chip. This design is a real-time control system that requires real-time data acquisition and transmission. The 60K FLASH memory in MSP430F149 can meet the needs of system programs for burning storage space. The internal data RAM (2K) ensures real-time data acquisition, processing and transmission. The 48 digital peripheral ports conveniently realize data transmission and control with peripheral devices. The 16-bit architecture ensures that the system can complete complex control decisions, and the dual serial port UART meets the real-time communication needs of the controller, the host computer and the inverter.

  2.2 Photoelectric encoder and variable M/T speed measurement MSP430F149 internal implementation

  The precision 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 motor speed detection element. The more common electric 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 motor speed being measured, which is suitable for high-speed measurement occasions. The T method measurement is a method of measuring the time interval between two adjacent pulses to determine the speed of the motor being measured. This method has poor accuracy when measuring in high-speed occasions, so it is generally only suitable for low-speed measurement occasions. The M/T method determines the speed by simultaneously measuring the detection time and the number of pulses that occur during this detection time. It has good speed measurement accuracy within 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 indicators of the servo system [2]. In recent years, the variable M/T speed measurement method has gradually been used. It means that during the speed measurement process, not only the detection of the photoelectric encoder pulse M1 and the high-frequency clock pulse M2 change with the motor speed, but also the detection time Tg changes. It is always equal to the sum of the pulse periods of the photoelectric encoder M1 (the speed measurement principle is shown in Figure 2). The size of Tg is measured by the high-frequency clock pulse M2, and the motor speed can be determined by the following formula [3].



  Where: M1 is the preset pulse number; M2 is the high-frequency clock pulse number; fc is the high-frequency clock frequency; λ is the photoelectric encoder multiplication factor; P is the number of photoelectric encoder lines.

Principle of speed measurement by variable M/T method

   Figure 2 Variable M/T speed measurement principle

  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. This shows that the speed measurement using the variable M/T method can meet the control system's requirements for speed measurement accuracy and real-time performance.

  The variable M/T method of measuring the motor speed can be completed by using the internal timers A and B of the MSP430F149, 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 high-frequency clock inside the system; timer A works in 16-bit counting mode, and the measured value M1 is loaded into the register of timer A. When timer A counts M1 pulses, the timer generates an interrupt, 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 inverter is the main actuator of the entire servo system. Its working principle is: in the main circuit, the AC-DC-AC conversion method is used to convert 220V, 50Hz AC into smooth DC through a rectifier, and then the DC is converted into variable voltage and variable frequency AC through a three-phase inverter composed of semiconductor IGBTs. Its frequency conversion control methods mainly include V/F control, space vector control (VC) and direct torque control (DTC). The V/F frequency conversion control method reduces system performance and stability at low speeds due to the stator resistance and inverter dead zone effect, as well as the torque caused by the low voltage of the inverter being greatly affected by the stator resistance voltage drop. Therefore, it is only suitable for occasions with a small speed change range and low mechanical characteristics. The space vector control (VC) method is difficult to accurately observe the rotor flux in actual applications, and the system characteristics are greatly affected by the motor parameters, which makes it difficult to achieve the ideal control effect. 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 motor's flux and torque, simplifying the main circuit and improving the reliability of the system, making it suitable for occasions with a large range of speed and load changes [4-5].

  In summary, this servo system uses Delta VFD-V high-frequency inverter. It contains PID feedback control and multiple control methods such as V/F, vector control and torque control (the system adopts torque control method), and the zero-speed torque can reach more than 150%, ensuring that the system has good static performance.

  3 System software design

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

  3.1 Main

  program After completing the system initialization, the main program enters the host computer communication query and display subroutine loop, waiting for the interrupt to occur, and the motor speed acquisition is realized by the timer interrupt method. 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 MSP

Figure 3 Program flow chart

430F149. The flow chart of the motor control interrupt program is shown in Figure 3b.   Figure 3 Flow chart

  3.3 Design of digital PID regulator

  In the digital PID control system, after adding 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 starting, stopping or deviating greatly from the given value during the motor servo process, and only add proportional and differential operations to cancel the integral correction. When the controlled quantity 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 a higher control quality, this servo system introduces the integral separation PID control algorithm. The specific algorithm is implemented as follows:

(1) According to the actual situation, set the threshold &ep SIL on;>0.

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

  (3) At that time , PID control was adopted 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 of high-speed single- chip microcomputer MSP430F149 with Delta torque control inverter VFD-V type, and controls based on the host computer communication method, which improves the controllability and stability of the system. The single-chip microcomputer replaces the traditional PLC control, and cooperates with the host computer to adjust the system parameters, realizing a good human-machine interaction platform, while reducing the system development cost and cycle , and achieving 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 situation of motion controller [J]. Machine Tool Electrical Equipment. 2005, (4): 5-10.

  [2] Xue Xiaoling, Liu Zhiqun, Jia Junrong. Detailed explanation of the application and development examples of single-chip microcomputer interface module [M]. Beijing: Beijing Aerospace Press, 2010.

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

  [4] Han Antai, Liu Zhifei, Huang Hai. DSP controller principle and its application in motion control system [M]. Beijing: Tsinghua University Press, 2003.

  [5] Mao Jia, Yuan Senmiao. Design of a servo embedded control system based on DSP [J]. Yi Qi Yi Biao Xue Bao/ Chinese Journal of Scientific Instrument. 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. SOPC Technology Practical Tutorial [M]. Beijing: Tsinghua University Press, 2005.

Keywords:MSP430F149 Reference address:Design and research of digital frequency conversion servo system based on MSP430F149

Previous article:Application of MCF51QE128 in SD card interface design
Next article:Some key technologies in programming based on SH-3 series single chip microcomputer

Recommended ReadingLatest update time:2024-11-23 15:01

Development of automatic tube expansion controller based on MSP430
The tube expander is a special equipment designed and developed for the expansion of various types of tubes and tube sheets in condensers, oil coolers, heaters, and heat exchangers. The basic principle of its controller is to use the working current of the drive motor (also known as the drive motor, tube expander he
[Microcontroller]
LCD1602 dynamic display--based on MSP430F149 single chip microcomputer
main.c /*************************************************** Program function: Dynamically display the text "welcome!" ---------------------------------------------------- Test instructions: Observe the LCD display ****************************************************/ #include   msp430.h #include  "Cry1602.h" #defin
[Microcontroller]
Minimum system design based on MSP430F149
O Introduction A single-chip microcomputer chip combined with necessary external devices, generally including power supply and power switch, reset circuit, crystal oscillator, input and output circuits, can form a minimum system. The MSP430F149 chip is an ultra-low power microprocessor launched by TI in th
[Microcontroller]
Design of personnel registration and entry system based on MSP430F149
    The people counting system can play different roles in different application scenarios. It can obtain information such as the number of people in the mall and the direction of crowd flow at different time periods for shopping malls or retail outlets, which is helpful for evaluating the attractiveness of goods to cu
[Microcontroller]
Design of personnel registration and entry system based on MSP430F149
3000VA inverter power supply circuit (power-inverter)
The circuit symbol of the voltage regulator diode (also called Zener diode) is: This diode is a semiconductor device with very high resistance until the critical reverse breakdown voltage. At this critical breakdown point, the reverse resistance is reduced to a very small value. In this low resistance area, the current
[Power Management]
3000VA inverter power supply circuit (power-inverter)
Latest Microcontroller 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号