Application of TMS320F241 in hybrid electric vehicle motor control design

Publisher:脑力舞者Latest update time:2011-10-27 Keywords:TMS320F241 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Since hybrid electric vehicles have two drive systems, the information exchange and coordination between the drive system and the vehicle control unit (VCU) is particularly important. CAN (Controller Area Network) bus is a serial communication network that effectively supports distributed control or real-time control. It belongs to the category of field bus and has the characteristics of strong real-time performance, high reliability, strong anti-interference, simple structure, good operability, and low price. Therefore, it is widely used in industrial control.

TMS320X24X is a series of chips designed by TI for digital motor control. Compared with TMS320C240 or TMS320F240 of the same series, TMS320F241 has a built-in CAN module in addition to the basic functions of the latter, so it is very suitable for the control of hybrid electric vehicle motor drive system.

1 Main features of TMS320F241

Compared with TMS320X240, TMS320F241 has the following differences besides an additional CAN module:

•The TMS320X240 has dual 10-bit A/D converters, 16 input channels, and a conversion time of 6μs; while the TMS320F241 has only one 10-bit A/D converter, 8 input channels, and a conversion time of 1μs.

•The event manager of TMS320X240 has 3 timers/counters, 4 capture units and 9 PWM outputs (6 Full PWM and 3 Simple PWM); while the event manager of TMS320F241 has only 2 timers/counters, 3 capture units and 6 PWM outputs (6 Full PWM), and the counting mode of the counter is also missing the single rising edge and single rising/falling edge modes.

TMS320F241 has 8K on-chip Flash and no extended RAM interface, so debugging is not very convenient. However, it can be debugged with the TMS320F243EVM board of the same series, and the program can be transplanted to the TMS320F241 chip with almost no modification.

2 Brushless DC Motor Control System Solution

Figure 1 is a block diagram of the motor system control, which uses conversion and current dual closed-loop control.

Brushless DC motor control system solution

The rotor position is detected by the Hall element, which is three overlapping signals with a phase difference of 120 degrees (electrical angle) and a pulse width of 180 degrees (electrical angle). The speed can be obtained from the rotor position, and then the calculated value of the current can be obtained; the actual current can be detected by the current sensor, and the duty cycle of the PWM signal can be adjusted according to the difference between the current set value and the actual value, and the corresponding power switch device can be triggered according to the current rotor position, so as to achieve the purpose of controlling the motor speed.

The inverter uses an IPM intelligent power module, which contains power switching devices and drive circuits as well as process voltage, overcurrent and other detection circuits. The switching device is IGBT.

All functional modules in the motor control strategy (including ASR, ACR, PWM, commutation logic and speed calculation) are implemented by the TMS320F241 chip.

3 Peripheral Design of TMS320F241

Figure 2 is the main peripheral wiring diagram of the TMS320F241 chip. The relevant instructions are as follows:

Main peripheral wiring diagram of TMS320F241 chip

A 5MHz crystal oscillator is connected between XTAL1 and XTAL2 to provide the system clock.

The pins CAP1, CAP2, and CAP3 of the three capture units are connected to the output of the Hall element, and the rotor position signal is stored in the buffer of the capture unit. The rotor speed can be obtained by calculation.

Among the 8-bit input channels of the A/D converter, 5 channels are used, and the input quantities are the DC bus current Idc, voltage Vdc and the motor three-phase currents Iu, Iv, and Iw; the other 3 channels are grounded through resistors.

The 6-way PWM output is connected to the control end of the six switching devices of the inverter, among which U+, V+, and W+ are connected to the upper bridge arm, and U- and VW- are connected to the lower bridge arm. These 6-way PWM signals control the opening and closing of the switching devices, thereby determining the flow path of the current.

The CAN module pins CANRX and CANTX of TMS320F241 are connected to the transceiver 82C250 through the optical coupler device 6N137, and the transceiver 82C250 is connected to the CAN bus through two pins CANH and CANL, thus realizing the communication between TMS320F241 and the CAN bus. Its communication medium uses twisted pair cable. If the communication distance is within 40m, the maximum transmission rate can reach 1Mbps.

4 CAN programming of TMS320F241

The CAN module of TMS320F241 is a FullCAN controller that can send and receive standard frames (11-bit identifiers) and extended frames (29-bit identifiers). It contains 6 mailboxes and 15 different 16-bit registers. These registers are divided into control registers, status registers, interrupt registers and local receive mask registers, which are mapped to the DSP data address space of 0x7100h~0x710Fh. Among the 6 mailboxes, there are two inboxes (numbered 0 and 1), two outboxes (numbered 4 and 5), and two mailboxes (numbered 2 and 3) that can be set as inboxes or outboxes as needed. Each mailbox contains three parts: identifier, information length, remote frame sending request, and data. The length of the data sent or received is 8 bytes. The 6 mailboxes occupy the address space of 0x7200h~0x722Fh.

CAN programming of TMS320F241

To enable the TMS320F241 chip to send and receive information correctly, the CAN module must first be initialized. The bit transmission time of each node on the CAN bus is programmable (by setting the baud rate), but it must be the same. When a node receives a frame, the receiver must be synchronized with the transmitter. The steps for mailbox initialization are as follows:

(1) Disable the mailbox

CANMDER=00000000000000000000b

(2) Set up a change data request

CANMCR=0000000100000000b (bit8CDR=1)

(3) Change the mailbox identifier, control word and data (only the outbox can change the data)

(4) Return to normal mode

CANMCR=00000000000000000000b

(5) Enable mailbox (ME=1)

After initializing the CAN module and configuring it correctly, you can send and receive data information.

Figure 3 and Figure 4 are flow charts of the CAN module transmitting and receiving information, respectively.

From the above introduction, we can see that TMS320F241 is a DSP chip dedicated to motor control and embedded with CAN module. It can be used to conveniently control the speed of the permanent magnet brushless DC motor of hybrid electric vehicle (HEV). At the same time, using its embedded CAN module, it can communicate with the vehicle control unit (VCU) of the hybrid electric vehicle through the CAN bus (protocol specification CAN2.0). Therefore, it is very suitable for the control system of permanent magnet brushless DC motor of hybrid electric vehicle.

Keywords:TMS320F241 Reference address:Application of TMS320F241 in hybrid electric vehicle motor control design

Previous article:Classification and process of electronic police
Next article:Application of TMS320F2812 in Vehicle Four-Wheel Steering Control System

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
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号