Application of DSP in brushless DC motor control

Publisher:大树下的大白菜yLatest update time:2011-04-09 Source: 嵌入式公社Keywords:DSP Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
1 Overview


This article uses the 240XDSP launched by TI as the full digital control core of the brushless DC motor. The servo system consists of only a few system components. TMS320F240X is a high-performance 16-bit digital signal processor (DSP) launched by TI in the United States. It is specially designed for digital control of motors. This DSP includes a fixed-point DSP core and a series of microcontroller peripheral circuits. It integrates the computing power of digital signal processing with the efficient control capability for motors. It can replace analog devices with software, easily modify control strategies, correct control parameters, and has the functions of fault detection, self-diagnosis and communication with the host computer. 2 Hardware Introduction The core of TMS320LF2407A is TMS320C2XX (Figure 1). It adopts Harvard structure and pipeline operation. At a clock frequency of 20MHz, the instruction cycle is only 50ns, and most instructions can be completed within one instruction cycle. The central arithmetic logic part includes a 32-bit central arithmetic logic unit (CALU), a 32-bit accumulator, a CALU input/output data scaling shifter, a 16-bit × 16-bit multiplier, a product scaling shifter, a data address generation logic (including 8 auxiliary registers and 1 auxiliary register arithmetic unit (ARAU), and a program address generation logic. When the processor works continuously, it can also simultaneously execute: a. Data reception and transmission via the serial port; b. Internal timer subtraction; c. Generation of three-phase pulse width modulation (PWM) waveforms; d. Collection of 4 analog signals; e. Watchdog timer subtraction It also includes dual 10-bit analog-to-digital converters and PWM control-based managers (6 comparison units, 12 PWM outputs, and 2-channel photoelectric encoder interface encoding units) that are not available in other series of DSP chips. Its PWM waveform generation unit includes programmable dead zone control and can output asymmetric PWM waveforms, symmetric PWM waveforms, and space vector PWM waveforms. LF2407 is the only DSP in the x240x series that can expand external memory. It is also the model with the strongest control function and the most complete on-chip facilities. It is widely used in code development, system simulation, and actual systems.





Figure 1 Overall structure of TMS320Lx240x series DSP controller


3 DSP control flow

Figure 2 is the control and drive circuit for the speed regulation of three-phase brushless DC motor using TMS320LF2407A. This design uses TMS320LF2407A microcontroller as the core of the system controller and power MOSFET field effect tube as the power conversion element. At any time, only two phases of the motor are turned on to control the commutation element, and PWM is used to control the torque and speed of the motor. Here, the three Hall sensors H1, H2, and H3 with a distribution interval of 120° are connected to the three capture pins CAP1, CAP2, and CAP3 of TMS320LF2407A respectively after the shaping isolation circuit, and the commutation moment is given by generating a capture interrupt, and the position information is given at the same time.

Figure 2 Using TMS320LF2407A to control and drive a three-phase brushless DC motor


Theoretically, the speed and torque control of brushless DC motors are mainly based on the following torque and back electromotive force engineering calculation equations

Where N is the number of coils per phase of the brushless DC motor stator, is the length of the rotor, r is the inner diameter of the rotor, B is the magnetic flux density of the rotor, is the angular velocity of the motor, i is the phase current, L is the phase inductance, is the position of the rotor, and R is the phase impedance.

From the equation, it can be seen that the back electromotive force is proportional to the speed of the motor, and the torque is almost proportional to the phase current. According to these characteristics, the control strategy shown in Figure 3 is adopted in the scheme. The given speed forms a deviation with the speed feedback, and the current reference is generated after speed regulation. The deviation between it and the current feedback is formed by current regulation to form the control amount of the PWM duty cycle, so as to realize the speed control of the motor. The current feedback is realized by detecting the voltage drop on the resistor. The speed feedback is obtained by calculating the position output by the Hall sensor. The position output by the position sensor is also used to control the commutation.

Figure 3 Speed ​​and current control of three-phase brushless DC motor


4 Software Control

The system adopts PWM control algorithm. The motor inputs DC current and only two power tubes are turned on at each moment. The PWM control signal from 2407 is directly connected to the driver, and the output of the driver is connected to the control electrode of the power MOSFET tube. The CPU clock frequency of 2407 is 20MHz and the PWM frequency is 20kHz.

4.1 Phase current detection

After TMS320LF2407A receives the voltage drop signal amplified on the resistor, it obtains the current signal through A/D conversion. At the end of the conversion, the A/D module sends an interrupt request signal to the CPU, waiting for CPU processing. Every 50us, the DSP controller samples the phase current to realize a 20kHz current regulation loop. According to the current error, the PID controller adjusts the duty cycle of the PWM pulse at the beginning of each PWM cycle.


4.2 Rotor position and speed detection

Mastering the appropriate phase change moment can reduce torque fluctuations. Position detection is not only used for phase change control, but also for generating speed control quantity.

The position signal is obtained through 3 Hall sensors. Their output signals differ by 1200. Each mechanical rotation has 6 phase changes. By setting the DSP to the double-edge triggered capture interrupt function, the correct phase change moment can be obtained. By setting the capture ports CAP1~CAP3 of the DSP as I/O ports and detecting the level state of the port, a specific capture interrupt can be obtained.

The position signal can also be used to generate speed control. As long as the time interval between two phase changes is measured, the average angular velocity of the two phase changes can be calculated according to the following formula.

The time interval between two phase changes can be obtained by reading the value of the T2CNT register of timer 2 when the capture interrupt occurs. 4.3 Current and speed regulation The phase current can be regulated by adjusting the pulse width of the PWM signal with a carrier frequency of 20kHz. Ierror="Iref" - Imea cyclenew=cycleold+IerrorK If cyclenew>=Timer_period, then cyclenew=Timer_period If cyclenew>Timer_period, then cyclenew=0 Where Iref—the reference current desired by the user; Imea——actually measured phase current; Ierror——phase current error to be adjusted; speed regulation uses PI algorithm to obtain the best dynamic effect. The calculation formula is as follows: Where Iref - speed regulation output; ek - kth speed deviation; Kp - speed proportional coefficient; Ki - speed integral coefficient; T - speed regulation cycle; Experiments have shown that it can generate a good three-phase PWM control waveform. Figure 5 shows the generated PWM waveform.




























Figure 5 PWM waveform generated by controlling a three-phase brushless DC motor using DSP


The software modules of system initialization, position signal detection, PWM signal output, etc. described above can realize a basic three-phase DC brushless motor speed control system with position sensor. However, in order to build a more complete system, some functional modules need to be added, such as the control module for adjusting the motor speed, the data recording module for saving the system operation data, etc. The communication between TMS320LF2407 and PC adopts RS-485 half-duplex interface circuit. Since the PC provides RS233 interface, it is necessary to convert the interface between RS-32 and RS-85. 5 Conclusion The innovation of this article: The PI algorithm commonly used in industrial control is realized on DSP to output PWM waveform. Due to the limitation of the performance of the single-chip microcomputer itself, it is difficult to meet the requirements of high-speed and high-precision motor control. However, DSP can well realize the PWM waveform output for DC brushless motor control.



Keywords:DSP Reference address:Application of DSP in brushless DC motor control

Previous article:Design of satellite measurement and control multi-beam system based on DSP and FPGA
Next article:Introduction to the Principle of DSPLL

Recommended ReadingLatest update time:2024-11-16 23:32

Utilize parallel port to realize high-speed data communication with DSP in EPP mode
    Abstract: High-speed data communication between DSP and PC is an important application of DSP. This article analyzes the principle of high-speed data exchange between the parallel port in EPP mode and ADSP21060, and discusses in detail the structure diagram of its hardware design and its corresponding parallel po
[Embedded]
Key circuit design of laser particle size analyzer based on DSP and ARM
O Introduction Laser particle size analyzer is a most advanced particle size measuring instrument with the broadest development prospects. Its measuring principle is based on Mie scattering theory. Mie scattering theory is a classic light scattering theory. Its biggest feature is that it can be used to measure
[Microcontroller]
Key circuit design of laser particle size analyzer based on DSP and ARM
Design of Program Encryption Protection System Based on DSP
At present, DSP has become a basic device in the fields of communication, computer, consumer electronics, etc. with its excellent performance and unique characteristics. At the same time, with the emphasis on intellectual property rights, when using DSP for product design, how to protect one's own achievements and p
[Embedded]
Design of Program Encryption Protection System Based on DSP
Design and implementation of a USB and DSP fingerprint recognition system
  The immutability and uniqueness of fingerprints make fingerprint recognition technology the most widely used identity authentication. In recent years, with the development of the latest information processing technology, the research of algorithm theory, and the high integration and low cost of computer hardware, th
[Embedded]
Design and implementation of a USB and DSP fingerprint recognition system
Design of Multi-band Mixed Signal Test System Based on DSP
1 Characteristics and test requirements of mixed signal testing With the deepening of the digital wave, chips with mixed signal functions are increasingly appearing in people's lives. MODEM (such as ADSL), CODEC and rapidly developing mobile phone chips in the communication field, MPEG and DVD chips in the
[Embedded]
Design of emulator for JTAG interface of Trimedia DSP chip
  Trimedia integrated circuit is a high-performance DSP recently launched by Philips Company for multimedia applications. It can perform high-quality video and audio processing, and can develop various resources of Trimedia DSP and debug various applications through the online debugging tool-JTAG. In order to meet the
[Embedded]
Design of interface circuit between multiple DDC chips HSP50214B and DSP
In the design of multi-channel passive radar signal processor, the author used DSP chip TMS320VC5409 to control the interface circuit of four DDC chips HSP50214B, and studied the key technologies such as synchronous control of multiple HSP50214B chips. DDC chip HSP50214B The digital downconverter HSP 50214B is
[Embedded]
Design of interface circuit between multiple DDC chips HSP50214B and DSP
Power supply solutions for DSP
Preface     This article describes a simple power supply solution. It uses synchronous buck conversion controllers such as the TPS56100, TPS5210, TPS56xx and TPS5602, targeting TI's C6000 DSP applications. At the same time, this article lists three power supply solutions: single voltage input system (5V or 12V), dual
[Power Management]
Latest Embedded 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号