You are on page 1of 3

2011 Fourth International Conference on Intelligent Computation Technology and Automation

The ECU control of diesel engine based on CAN

Dong Hui , Huang Bo ,Wang Dafang and Zhao Guifan


School of Automobile Engineering Harbin Institute of Technology at Weihai Weihai , Shandong Province , China hitdonghui@163.com
AbstractThe dynamic, comfort and emission performances of vehicle directly dependent on the control of engine. Engine electronic control unit (ECU) receives the signals from the sensors, and gets the current engine status. Then depending on the signals, the ECU calculates fuel injection rate, injection timing and quantity. Accordingly the actuators which are driven by ECU carry out the better fuel control. Whether the vehicle could work efficiently and reliably almost dependents on the engine ECU is normal or not. One way to test engine ECU is using load box which can diagnose and calibrate the faults. This paper chooses CAN bus to realize the communication between ECU and load box because of its widely using and well function. This paper formulates the CAN bus communication protocol which meets the needs of load box test, and designs the CAN communication module and signal input /output module. MPC5633 made by Freescale is used as the micro controller unit (MCU) in ECU. Through the experiments showed in paper proves the testing programs of ECU control can realize the function requirements. Keywords- Diesel engine, CAN,ECU.

ECU calculates the fuel injection rate, timing and quantity based on the input data and stored in the MAP data. These parameters will be transmitted into the power quantity matched with the engine running time[2]. The engine working is highly, so the ECU is demanded to have well calculation accuracy and high processing speed. Therefore the requirements of the main processor operation speed and performance are extremely strict. As the core component of automobile dynamic control, the production quality inspection of the engine ECU is an important step to insure the integrity and reliability of the whole production process. For the convenience of engineers to extraction the ECU signals which are used in fault diagnosis and signal calibration, load box is needed in test process. The communication between ECU and load box is necessary, and it need to have the function of fault diagnosis and error calibration. Usually the communication is based on CAN bus. Fig.2 shows the relationships among them[3-4].

I.

INTRODUCTION

Fig.2: Relationships among ECU, Load Box and Computer

Engine ECU is the core part of diesel engine control system, which is formed by microprocessor, its peripheral hardware and control software. The ECUs function is to receive data and signal, judge the current status of engine and make corresponding treatment, then drive the circuit of actuators to achieve its control purpose. Fig.1 introduces the functions of ECU[1].

When the load box is under the test, ECU is working on two directions. One is that it receives the signals from the load box, at the same time turn these signals into data and store them in CAN message buffers, then transmit them to the load box. The other is to receive the commands from load box through the messages, then the MCU deals with the commands and make them work. The function of load box is to transmit analog signal, receive the CAN message from ECU, next together the real data and the receive data in order to transmit them to upper computer where can judges if the ECU is well work. II. ACQUISITION OF SIGNALS

Fig.1: Functions of ECU

A. Analog Input Use the EQADC module of MPC5633 which is fully called enhanced queued analog-to-digital converter. It can change the input analog signal which usually between 0 and 5V to one of the data from 0 to 255. The AD conversion using successive approximation principle, and this module has three optional resolutions which are 8,10 and 12. Tis paper chooses 8.
734 760

978-0-7695-4353-6/11 $26.00 2011 IEEE DOI 10.1109/ICICTA.2011.191

B. Switch Input Use the SIU module of MPC5633 which means system integration unit. This module controls the GPIO register. Set up the values of GPIO registers to make them in input conduction. Then they can choose to be 0 or 1 depending on the voltage value. C. PWM Output Use the EMIOS200 module of MPC5633 which is short for configurable enhanced modular IO subsystem. It can be implemented under import demand of cycle and duty cycle which is requested to the appropriate channel for PWM output, and it has 16 channels. III. CAN COMMUNICATION

Diagram 1 message information


ECU load box Load box ECU value of the accelerator pedal position sensor value of the engine oil pressure sensor value of the fuel oil rail pressure sensor value of the fuel oil temperature transmitter Exhaust brake switch valve order Engine brake relay order Engine brake indicator light order Diagnose indicator light order

State of the key switch State of the remote-control parking switch State of the engine braking switch

CAN bus is contained in the field bus. It is a serial communication net which supports real-time control effectively. Compared to the traditional bus, CAN bus have higher data transmit rate (the maximum baud rate is 1Mbps), the stability of communication, excellent ability to detect and handle errors and on-site anti-interference, which make CAN bus the most commonly used bus in automobiles these years. CAN has these properties: prioritization of messages; guarantee of latency times; configuration flexibility; multicast reception with time synchronization; system wide data consistency; multimaster; error detection and signaling; automatic retransmission of corrupted messages as soon as the bus is idle again; distinction between temporary errors and permanent failures of nodes and autonomous switching off of defect nodes. In this design, the CAN bus is used for the data transmission between the engine and the load box. The protocol used here makes the application layer by referring to the international SAE J1939. Data transmission is safer and more rapid and the CAN bus communication is more evidence-based by making the united CAN bus communication protocol. A. CAN Protocol Between ECU and Load box The message definition between the engine ECU and the load box based on the functions respectively, the messages which ECU uploads to the load box and the messages which the load box downloads to the ECU are described in diagram 1. As is described in the diagram, the messages the load box downloads to ECU can be expressed by a frame of message. However, the messages ECU uploads to the load box are more. Depending on the signal types, it can be divided to three frames of messages. Based on J1939, use the extended frame (29 bits ID) and set a sole source address for each mode. Map the source addresses to the CAN ID, in case that several nodes use the same ID. J1939 definite a frame via PDU which is used to organize the relevant J1939 information in data frames. The form of PDU is shown in Fig.3.

Communication fault diagnosis

Arbitration Field
S O F S R R 6 I D E 2 R r T 1 R

Field
18 PF PS SA r 0~8 DLC 0 DATA 0~64

11 bit

P R DP PF 3 1 1

8 8

J1939PDU

Fig.3: PDU

According to the CAN node addressing rules, SA source address can be selected as below: use 10 for the SA in the load box. Use 11 for engine ECU. At the same time, number the different kinds of signal information to different parameter group. SA=AE. GE can be chosen from 01, 02, 03. sets the priority as 6. sets the address of the load box as 0x18 FF 01 10, and the engine ECUs 0x18 FF 01 11 0x18 FF 02 11 0x18 FF 03 11. Depending on the different types of the signal, attribute the data bits and data formats. The message form of the 0x18 FF 01 11 of the engine ECU is showed in Fig.4.
locati on Byte0 Byte1 Byte2 Byte3 Byte4 Byte5 ~7 Signal name accelerator pedal position sensor AD value engine oil pressure sensor AD value fuel oil rail pressure sensor AD value fuel oil temperature transmitter AD value air inlet temperature sensor Ad value Reserved len gth 8 8 8 8 8 24 val ue 0255 0255 0255 0255 0255 implication 0V-5V 0V-5V 0V-5V 0V-5V 0V-5V

Fig.4: Message Form

Set the baud rate of the CAN bus as 500Kbit/s meanwhile. Send one message per 100ms.

735 761

B. Software Implementation of the Protocol The software consists of three parts: the initialization of the CAN controller, transmission of the CAN bus data and the reception of the CAN bus data. MPC5633 in freescale integrates the FLEXCAN module. The modules function is realized by C language. The initialization of the CAN controller The key to program design is the initialization of the CAN controller which decides whether the system can work normally. The initialization of the CAN controller contains the settings of the baud rate, CAN channel, interruption, timer, operation modes and the acceptance check filter. Data transmission and reception on CAN bus Transmission of data in period interruption inquire way Use PIT period interruption. Call on the transmission buffer cache per 100ms and send messages. IV. EXPERIMENTAL RESULT Experiment depending on the contents above. Use Codewarrior software to simulate and programming of programs. The interface is shown in Fig.5.

Fig.6: Results

Second, the load box sends messages to ECU and ECU control the output of the PWM. The experiment proved to be successful and the result is showed in Fig.7

Fig.7: Result

V. CONCLUSION This paper realizes the data transmit between engine ECU and load box based on CAN bus, and test the function of ECU. This paper also establishes a CAN communication protocol making reference of J1939. Based on this protocol, ECU turns the signal into data and store them in the right position mentioned in the protocol, when doing this work, the upper computer can judge the current work status. At the same time, the message can change with the signals. The ECU can also make corresponding signal output depending on the message it received. At the end of this paper, some experiments prove the feasibility of programs written based on this paper. ACKNOWLEDGMENT The Project supported by National Science and Technology Major Project (Core electronic devices, highend general-purpose chip and basic software products) 2009ZX01038-002-001 The Project supported by the National Laboratory for Electric Vehicles Research Funds (BIT-NELEV-2010-1) REFERENCES
[1] C.-H.Ji, F. Kong, B-H. Zhao, Y-H, Zhang. Development of DemarcationSystem about Electronic Fuel Injection Engine Based on CAN Bus,Internal Combustion Engine Engineering,2006. R.J.Woermann,H.J.Theuerkauf.A, Real-Time Model of a Common RailDiesel Engine ,SAE 1999-01-0862._ F. Kong, Development of 32-bit University Electronic Control Unit UECU for Automotive Application , Agriculture Mechnical Transaction,2006,(7). MinggaoYang.Survey of the EleCtronieInjeetion and Control of DieselEngines.SAE PaPer 940738.

Fig.5: Interface

Run the program and test the CAN bus input/output. The experimental procedures are: First, collect AD and GPIO value and send the data to computer (which is used to replace the load box) to test whether the value sent corresponds to the real value and changes as the real value does. Run the CANTool software to transmit and receive messages. The results are shown as in Fig.6. The programs can realize their function successfully.

[2] [3]

[4]

736 762

You might also like