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
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.
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
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.
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
- Popular Resources
- Popular amplifiers
- Three-Phase 11 kW PFC + LLC Electric Vehicle On-Board Charging (OBC) Platform User Manual (ONSEMI Semiconductor)
- Microcontroller Principles and Applications Tutorial (2nd Edition) (Zhang Yuanliang)
- Getting Started and Improving MSP430 Microcontrollers - National Undergraduate Electronic Design Competition Training Course
- Frequency Converter Circuit Maintenance and Fault Example Analysis
- Naxin Micro and Xinxian jointly launched the NS800RT series of real-time control MCUs
- How to learn embedded systems based on ARM platform
- Summary of jffs2_scan_eraseblock issues
- Application of SPCOMM Control in Serial Communication of Delphi7.0
- Using TComm component to realize serial communication in Delphi environment
- Bar chart code for embedded development practices
- Embedded Development Learning (10)
- Embedded Development Learning (8)
- Embedded Development Learning (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- STMicroelectronics discloses its 2027-2028 financial model and path to achieve its 2030 goals
- 2024 China Automotive Charging and Battery Swapping Ecosystem Conference held in Taiyuan
- State-owned enterprises team up to invest in solid-state battery giant
- The evolution of electronic and electrical architecture is accelerating
- The first! National Automotive Chip Quality Inspection Center established
- BYD releases self-developed automotive chip using 4nm process, with a running score of up to 1.15 million
- GEODNET launches GEO-PULSE, a car GPS navigation device
- Should Chinese car companies develop their own high-computing chips?
- Infineon and Siemens combine embedded automotive software platform with microcontrollers to provide the necessary functions for next-generation SDVs
- Continental launches invisible biometric sensor display to monitor passengers' vital signs
- I would like to ask how to calculate the current of the external gate-source capacitor of IGBT
- Determining the working status of multiple transistor coupling
- A simple study of 51 single-chip Keil C delay program (transferred)
- Simple vibration analyzer
- Difficulties and Solutions in Interviews (English Version)
- I saw a question on another forum about whether the mass of a battery increases after charging?
- Design principles and functions of EPS emergency power supply
- PIC16F630-676 Data Sheet
- Electromagnetic Controlled Motion Device (J)
- Live broadcast at 10 am today [Introduction to TI Sitara's latest AM64X platform]