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.
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
- Popular Resources
- Popular amplifiers
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- What do you think about RF company Qorvo providing programmable power for smart home appliances?
- Design of SAW RFID system based on DSP device TMS320VC5509A chip
- Analysis of the "Signal" topic in the National College Student Electronics Contest
- I have just started learning Cadence Virtuoso and found that as long as the schematic diagram appears in the parallel inductor simulation, an error will be reported.
- Infineon XMC4000 board is now ready to be taken home
- The college entrance examination results are announced! How are the top scorers around you doing now?
- How to use an oscilloscope to test the transient energy of a battery
- What frequency ESR should we choose for the output filter capacitor of a flyback power supply?
- LAN Problems
- [National Technology N32 MCU Development Data] - Datasheet download link