An intelligent diagnostic tool for electronically controlled diesel engine

An intelligent diagnostic tool for electronically controlled diesel engine

Mechatronics 19 (2009) 859–867 Contents lists available at ScienceDirect Mechatronics journal homepage: www.elsevier.com/locate/mechatronics An int...

543KB Sizes 110 Downloads 170 Views

Mechatronics 19 (2009) 859–867

Contents lists available at ScienceDirect

Mechatronics journal homepage: www.elsevier.com/locate/mechatronics

An intelligent diagnostic tool for electronically controlled diesel engine q Junxi Wang *, Xiaojian Mao, Keqing Zhu, Junhua Song, Bin Zhuo Institute of Automotive Electronic Technology, School of Mechanical Engineering, Shanghai Jiao Tong University, Shanghai 200240, People’s Republic of China

a r t i c l e

i n f o

Article history: Received 3 December 2008 Accepted 29 April 2009

Keywords: Diesel engine Intelligent diagnostic tool KWP2000 Measuring Programming GSS

a b s t r a c t A diagnostic tool was designed and developed based on KWP 2000 (Kingtec Standard Diagnostic Protocol on K-line). According to the KWP2000, special communication module was devised, which implemented the physical connection and level translation between personal computer (PC) and electronic control unit (ECU). Software design includes guidance service suggestion (GSS) function module and fundamental function module. GSS function module scheduled six intelligent tests: compressing test, fuel shut-off test, run up test, fuel leakage test, electrical system test and high pressure test, and received the test results and supported the search for the cause of errors in the injection system or in the engine, provided diagnosis guidance and played an important role for the service engineer in the after-sale service market. Fundamental function module implemented the following functions: communication, diagnostic trouble code (DTC) management, measuring and programming data. All those modules were designed with Visual C++ and LabVIEW languages, which provided friendly and compatible interface. This diagnostic tool has been used successfully in first generation green diesel (GD-1) high pressure common rail diesel engine, all tests showed it could realize accurate and quick data communication, online diagnostic management, real-time and dynamic measuring data refreshment, online programming data and practical GSS. It significantly improved the efficiency and convenience in after sales service aftermarket. Ó 2009 Elsevier Ltd. All rights reserved.

1. Introduction With increasing severity of energy crisis and stringency of exhaust gas legislation, the electronically controlled system has been widely used in diesel engines for performance optimization of the diesel engine as well as vehicles propelled by the engine. However, the electronically controlled diesel engine is a very complicated control system, which involves a broad spectrum of scientific topics, including mechanics, hydrodynamics, electronics, control theory and combustion theory. Therefore, when faults take place, it is very difficult for a service engineer, who generally does not have adequate knowledge in the aforementioned technical areas, to detect and repair the electronically controlled system. Generally, the following requests are demanded in the after sales service aftermarket of electronically controlled diesel engine: (1) During the maintenance routine, service engineers need to obtain analog input and output signals, digital input and output

q This work is supported by the National High Technology Research and Development Program of China (2007 Project 863, ‘‘Advanced technologies of automotive development”). * Corresponding author. Address: Institute of Automotive Electronic Technology, School of Mechanical Engineering, Shanghai Jiao Tong University, 5/F(east), Building A, Lane 951, Jianchuan Road, Minhang District, Shanghai 200240, People’s Republic of China. E-mail address: [email protected] (J. Wang).

0957-4158/$ - see front matter Ó 2009 Elsevier Ltd. All rights reserved. doi:10.1016/j.mechatronics.2009.04.009

signals, which should utilize measurement sets, such as universal meter, oscilloscope, etc. It is inconvenient for service engineers out of doors. (2) Service engineers also need to obtain internal data and system status information, but those data are saved in RAM as numeric format not physical format (such as voltage and current), which cannot be acquired with conventional measuring and testing techniques. (3) Service engineers sometimes need to program data into ECU, such as programming data for replacing ECU and writing injection compensation data into ECU for replacing injector. That job is impossible without a right tool [1]. In order to solve requests mentioned above, much work had been carried out, such as Refs. [2–11]. Li et al. introduced a realization scheme for hand-held intelligent fault-diagnosis instrument, but the communication was low and not fit for the diesel engine [2]. Zhao and Chen introduced a distributed diagnostic system based on CAN bus, but it focused on the composing principium and the communication protocol [3]. Zhang introduced an intelligent diagnosis system for locomotive equipment’s mischief defect, but it adopted neural networks’ intelligent examination way, and not fit for high speed diesel engine [4]. Chen et al. introduced an intelligent fault diagnosis system for diesel engine, but it was based on the sound intensity recognition and not fit for after-sale service market [5]. Zhang introduced an intelligent diagnosis method for marine diesel engine, but it focused on the artificial immune algorithm and diagnosed the low speed marine diesel engine [6]. Zhou and Yang introduced a diagnostic system for electronic

860

J. Wang et al. / Mechatronics 19 (2009) 859–867

control diesel, but it adopted the CAN bus communication [7]. Li and Liu introduced an intelligent fault diagnosis for marine diesel engine, but it was based on the ant colony algorithm and unfit for high speed diesel engine [8]. Wu et al. introduced an intelligent fault diagnosis for diesel engine exhaust valve using support vector machine, but it focused one part of diesel engine [9]. Zhang et al. introduced the algorithm and the theory of the artificial neural network applied in the diesel engine, but it focused on the building he failure diagnostic model [10,11]. All of them had no GSS function and could not program data to ECU. This paper developed an intelligent diagnostic tool, the software and hardware of it were chosen specially for after sales service aftermarket characteristic. The diagnostic tool adopted international universal protocol standard KWP2000, designed communication hardware interface and developed diagnostic application software. The diagnostic tool could not only read, clear and record DTCs, read freeze data, measuring running parameters, but also could program data to ECU, which made the service engineer pay more attention to machine components. What’s more, most service engineer did not know how to deal with them clearly when facing engine trouble, they needed more maintenance guidance. Here six intelligent tests were designed for the engine. GSS function module of the diagnostic tool scheduled those test, and the received test results helped to search for the cause of the errors. The test results gave great support to service engineers at aftermarket. Ultimately, the intelligent diagnostic tool was achieved and maintenance efficiency was greatly improved.

Based on KWP2000, the ECU may have either a one-wire (K line only) or a two-wire (K and L line) data communication to a diagnostic tool. K line is bidirectional and L line is unidirectional. The baudrate is 10,400 bit/s. Logic ‘‘0” is defined as the voltage level of 20–30% of the VB battery voltage (VB = 12 V). Logic ‘‘1” is defined as the voltage level of 70–80% of the VB battery voltage. The specifications use NonReturn2to Zero (NRZ) as the coding scheme. The ECU in logic ‘‘1” state should have a resistance to ground between line K and the ground of about 50 kX. The capacitance of K-line to ground should not exceed 500 pF. The ECU in logic ‘‘0” should have a resistance between K line and the ground that is not more than 110 X. The capacitance should not exceed 2nF when none of the ECUs are connected [12–14]. KWP2000 has a message structure showed in Fig. 1, including three parts: (1) header; (2) data bytes; (3) checksum. The header consists of maximum 4 bytes. A format byte includes information about the form of the message. Target and source address bytes are optional for use with multi node connections. An optional separate length byte allows a message length up to 255 bytes. Checksum is calculated by adding all the bytes excluding the checksum. The final checksum is modulo 256, i.e. low byte of the sum [15,16]. KWP2000 is used mostly on vehicles manufactured. Here we adopted this protocol to develop diagnostic tool. According to KWP2000, the communication data between PC device and ECU depends on KWP2000 command messages. There are many messages, Table 1 shows a part of functions and their command messages used in this diagnostic tool.

2. KWP2000

3. Overall design

The standard KWP2000 has been established in order to define common requirements for diagnostic systems implemented on a serial data link. It is based on the Open Systems Interconnection (O.S.I.) Basic Reference Model in accordance with International Organization for Standardization (ISO) 7498, which structures communication systems into seven layers. When mapped on this model, the services used by a diagnostic tester and an ECU is broken into: (1) Diagnostic services (layer 7); (2) Communication services (layers 1–6).

This diagnostic tool is composed of a diagnostic platform and a special communication module (showed in Fig. 2). The communication module includes a hardware interface and a MC33290. MC33290 is the voltage switch chip between the serial interface of ECU (KWP2000 physical layer in ECU) and K line according to ISO9141. The MC33290 is a serial link bus interface device designed to provide bidirectional halfduplex communication interfacing in automotive diagnostic applications. The hardware interface implements the physical connection and level translation between RS232 and K-line. In this way, the diagnostic platform in PC is connected with ECU through serial communication port RS232, and physical connection of KWP2000 communication is realized between PC and ECU. Software design of this diagnostic tool was divided into two parts. One part is GSS function module, which can schedule six intelligent tests as follows: compression test, shut-off test, run up test, fuel leakage test, electrical test and high pressure test modes; The other part is fundamental function module, which is

Data Byte

Header Fmt Tgt

1

1

Src Len

1

Sid

2

Checksum

2

… Data …

CS

Max. 255 bytes Max. 4 bytes 1byte 1 Bytes are optional, depending on the format byte. 2 Service identification and part of data bytes. Fig. 1. Diagram of message structure.

Table 1 List of functions and command messages used in this diagnostic tool. Function module

Command message

Sid (Request)

Sid (Response)

Description

Communication

StartCommunication StopCommunication AccessTimingParamerters ReadDiagnosticTroubleCodesByStatus ReadStatusOfDiagnosticTroubleCodes ReadFreezeFrameData ClearDiagnosticInformation ReadDataByLocalIdentifier ReadMemoryByAddress SecurityAccess StartRoutineByLocalIdentifier RequestDownload TransferData RequestTransferExit

0x81 0x82 0x83 0x18 0x17 0x12 0x14 0x21 0x23 0x27 0x31 0x34 0x36 0x37

0xC1 0xC2 0xC3 0x58 0x57 0x52 0x54 0x61 0x63 0x67 0x71 0x74 0x76 0x77

Communication initialization Stop communication Set or change timing parameters Read DTC by status Read environmental conditions of DTC Read freeze data Clear part or whole fault memory Read data by identifier Read data by memory address Read data by memory address Start erasing flash and verification checksum of flash Download data to ECU Transfer data Exit transferring data

DTC management

Measuring Programming data

861

J. Wang et al. / Mechatronics 19 (2009) 859–867

Diagnostic

Hardware Engine

ISO 9141

MC33290

ECU

RS-232C

interface

platform

K line

PC

Communication module Fig. 2. Structure of whole hardware for calibration communication.

composed of Communication, DTC management, measuring and programming data functions [1,17]. The two function modules are combined together and formed the intelligent diagnostic software. 4. GSS function module Most errors are mixed together in electronic fuel injection system and mechanical system, which makes it difficult to establish the direct relationship between the error phenomena and relevant components. The routine judgment and trial strip inspection are obviously unfit for high precision electronic fuel injection system. So common service engineers are timid of errors of electronic fuel injection system, and even they are afraid to repair a simple error of mechanical system because of their fuzzy electronic control knowledge; Engine may run at special working conditions in some diagnosis test sequence, while those special working conditions are different from actual working conditions. In order to solve the above disadvantages, many intelligent tests are integrated into the ECU. The GSS function module of the diagnostic tool schedules those tests and receives test results. Those results can provide diagnosis guidance, and many difficult problems can be dealt with easily, such as unable starting diagnosis, jittery running diagnosis, weak power run-up diagnosis, idle lose diagnosis, limp home diagnosis and oscilloscope diagnosis. Those tests have two features: (1) Intelligent tests will be activated by GSS function module under the safe conditions, but they cannot operate and lie in the memory of ECU under the normal conditions. (2) Different tests will be scheduled according to different phenomenon and DTCs, and GSS function module will support service engineers with the diagnosis and troubleshooting under the thinking of service experts. Here six intelligent tests are developed for GSS function module as the follows: (1) Compression test. If the cylinders of engine are sealed poorly, they will result in air leakage. Compressing test is used for check the compression behavior and repair the cylinder leakage phenomenon. (2) Shut-off test. This test is used to examine the uniformity of injectors and cylinders under idle working conditions, and then deduce the working status of the cylinder. (3) Run up test. It is used to check work performance of cylinders, especially the contribution of every cylinder under the run-up condition. (4) Fuel leakage test. It is mainly used to check fuel leakage of the low-pressure fuel system after being maintenance. (5) Elec-

trical test. It is used to help checking the wiring harness, sensors signals and I/O of ECU. (6) High pressure test. It is mainly used to check fuel leakage and rail pressure establishment of the high pressure common rail fuel system. Some of them will be illustrated in the following chapters. When the ECU receives the intelligent test request from the GSS function module, it first checks for the conditions required to start the test. If all the conditions are met, ECU first sends the positive response and then starts the test. If all the conditions are not met, a negative response is sent from the ECU, the diagnostic tool will send the next request if necessary. The test requires some time for its completion and hence has to be polled for its completion. The diagnostic tool can send request to stop the routine that has been started. When the ECU receives this request, it checks for the conditions required to stop the routine. If the conditions are satisfied, then the ECU is stopped after sending the positive response. 4.1. Compression test The compression test determines the compression or expansion times for each cylinder and then examines the behavior of each engine cylinder. To do this, the engine is cranked by the starter with the injections shut off. The lowest instantaneous rotational speed is reached at the Top Dead Center (TDC) of each cylinder, on the other word, at the point of maximum compression. The highest instantaneous rotational speed of the engine is based on various engine specific parameters such as the cylinder number and the internal friction torque. Angle intervals are applied, which is selected freely within a segment. Here we choose the effective angle intervals part, and intervals are compiled from the TDC and 37.5°CAM before (here is the camshaft sensor signal). The result is the time duration of the given angle intervals for each cylinder, and the result is stored according to cylinder number. When requested, the results are transmitted to the diagnostic tool together with the cylinder number to which the respective time duration belongs. As showed in Fig. 3, there are six angle intervals, cyl_pre_1, cyl_pre_2, cyl_pre_3, cyl_pre_4, cyl_pre_5 and cyl_pre_6, which correspond to the six cylinders respectively. The angle intervals are used to calculate the compression time. And the compression behavior of each engine cylinder is examined as to the different compression time. Here the average compression time is taken as the reference, the maximum time indicates the best sealing, and

° °

°

°

°

Start of angle interval

°

°

Assistant signal

Camshaft sensor signal

Crankshaft sensor signal Cyl_pre_1

Cyl_pre_5

Cyl_pre_3

Cyl_pre_6

Cyl_pre_2

Cyl_pre_4

Fig. 3. Angle intervals within phase signals.

862

J. Wang et al. / Mechatronics 19 (2009) 859–867

the minimum time indicates the leakage. And so the compression behavior is determined. Start conditions of this test are showed in the following: the engine speed is 0; the vehicle speed is 0; the flag is enabled for compression test; there is no corresponding trouble code in the ECU; battery voltage is sufficient for compression test. When the compression is active, the fuel injection should be inhibited. This is done by the command from the diagnostic tool, where the maximum injection quantity is set to 0. If any one of the above conditions is violated, the test will be aborted and the corresponding cause can be provided as a signal to the diagnostic tool.

sents the pressure build-up phase. At the beginning, the timer is started. The rail pressure is build-up by raising the setpoint valve with pressure setpoint step during a time constant. As soon as the measured rail pressure exceeds the pressure threshold for build-up time, the timer value is stored in ECU. If this takes longer than T4, the test flag is assigned with the value 1. T5 is used to acquire a stable maximum rail pressure, when ECU adopts close loop control. T6 is used to determine pressure drop, when engine speed is shut off. The drop in pressure is measured within the time slice, and the time is stored in ECU. T7 represents the end of a cycle. T8 will select next engine speed for the next cycle. Finally the test results will be transmitted to the diagnostic tool.

4.2. High pressure test 4.3. Run up test High pressure test is used to determine the performance of the high pressure unit. The test consists of two phases: the pressure build-up and the pressure reduction phases that are passed at various engine speeds. During the pressure build-up phase the rail pressure setpoint is raised from a minimum value to a maximum value using a ramp. The time until the measured rail pressure has reached a certain threshold is a standard of measure for the performance of the pump. In the pressure reduction phase the pump does not supply any fuel that is achieved by closing the metering unit. The time necessary for the pressure reduction is used to infer on the quality of the pump control value and the injectors. It is possible to shut off the injections during the last pressure reduction phase in order to check the leakage without injection quantity. When received command of high pressure test from the diagnostic tool, the ECU will check whether the series of conditions are met. The test can be started if they are satisfied, all test parameters are stored in the ECU, and the test results are forwarded to the diagnostic tool along with the start request after the test is ended. Or else, the test is not started, and a negative response will be transmitted to the diagnostic tool. Those conditions are showed as follows: The engine speed is near the idle speed; the operating temperature has been reached warm state; the vehicle speed is 0; the brake is not actuated; the accelerator pedal is 0; the rail pressure governor is in close loop control state. If the test is stopped due to the failure of one of the conditions mentioned above, the cause for it can be taken from ECU. During the test, the pressure flow in a pressure build-up and reduction phase is examined within the entire test sequence. Special test parameters for the rail pressure governor are used at different state. As showed in Fig. 4, there are nine time slices within the test sequence, that is T1 to T9. T1 is used to wait for test start, and the ECU adopts precontrol mode to control rail pressure within this time slice. T2 is used to set rail pressure and engine speed. When T3 passed, the engine speed and rail pressure have reached stable values, and only in this manner the reproducibility and the comparability of the measuring values can be ensured. T4 repre-

Pressure Maximum setpoint pressure Wait

Run up test is used to determine the performance of individual cylinders (showed in Fig. 5). The test is divided into three phases. In phase 1, one cylinder is switched off by the diagnostic tool when a series of conditions are met. In phase 2, the run-up time and speed is measured when engine is accelerated with one deactivated cylinder. This is done when the boost pressure actuator and the exhaust gas recirculation actuator are in a given position and at a given rail pressure and injection quantity for the remaining active cylinders. In phase 3, all cylinders are switched off. Through the above test procedure, by switching off cylinder one by one, the different efficiency of each cylinder could be evaluated. From the Fig. 5, we can see that the efficiency of 3rd cylinder is too high (may be caused by too much injection, compared with the high speed limit value) or the efficiency of the other cylinders is too low (may be caused by gas leakage, compared with the low speed limit value) compared with limit value and experience value come from field test and after sale. The maximum speed can be compared to evaluate the performance of the individual cylinders. After the test is ended, the results are forwarded to the diagnostic tester. When the following conditions are satisfied, the test can be started after the ECU receives the request for run up test from the diagnostic tool: The vehicle speed is 0 and in neutral gear; the brake is not activated; the clutch is not actuated; the engine speed is below the maximum engine speed for the run up test; the run time of this test is below the maximum allowed. During the test, those conditions that are absolutely necessary for operation are monitored in all states. During the test, an applicable waiting time should be assigned to stabilize the rail pressure and the engine working condition. If one of the conditions is not met, the test will be terminated and the corresponding cause can be forwarded to the diagnostic tool along with a request. In addition to the conditions above, the test also can be terminated by the diagnostic tool. When the test is not active, the tool will receive a negative response. The results of this test are available to the diagnostic tool and will be transmitted to the tool on demand.

Pressure build-up

Wait

Pressure reduction Wait

Pressure threshold for build-up time

Measured pressure Setpoint pressure

Time constant Pressure setpoint step Test setpoint pressure Time

Minimum setpoint pressure Time slice

T1

T2

T3

T4

T5

T6

Fig. 4. Rail pressure during the high pressure test.

T7

T8

T9

863

J. Wang et al. / Mechatronics 19 (2009) 859–867

should have no big difference. The definition of the permissible limit value for the assessment is the responsibility of the engine manufacturer. And more test results data need to be collected in field test after-sale market as the experience value for this test. 4.4. Shut-off test

Fig. 5. Engine speed during run up test.

After the test is started, the control parameters will be set according to the value from the diagnostic tool. To ensure comparable conditions, the run-up time for each deactivated cylinder

Shut-off test is used to check the uniformity of injectors and cylinders. When the ECU receives the shut-off test request from the diagnostic tool, the following conditions are satisfied, the test can be started: The vehicle speed is 0; the brake is not activated; the clutch is not actuated; the engine speed is below the maximum engine speed for shut-off test. If one of the conditions is not met, the test will be terminated and the corresponding cause can be forwarded to the diagnostic tool with a request. When receives the request for shut-off test, the ECU can switch off injections in cylinders which has been selected. After the engine enters into stable state, the working conditions will be stored and used to analyze the contribution from injector and the cylinders, and then determines the uniformity of injectors and cylinders. Finally, diagnosis process of the weak power run-up was taken as example, described briefly the implementation of GSS function module, intelligent test scheduler and diagnosis guidance. Fig. 6

Start

Weak run-up diagnosis

Compression test request

N

Check for conditions

Connect with ECU

Meet conditions?

Succeed?

N Y

Y

Abnormal report:

N

Cylinder leakage

Check power up; Check communication cables

Engine start

Activate test record process and analyze test results

Measuring (save and analyze battery voltage and rail pressure); Read DTC Ok? Y Shut-off test request

DTC? Battery voltage, Rail pressure too low, Phase asynchrony?

Check for conditions

Y

Abnormal report: DTCs; Battery voltage; Rail pressure too low; phase asynchrony.

N

N Meet conditions?

High pressure test request

Y Activate test record process and analyze test results Abnormal report: Injectors error

Check for conditions N

N

Meet conditions?

Ok?

Y Activate test record process and analyze test results

Y Check other mechanical parts of engine

N Ok? Y

End Fig. 6. Flow chart of weak run-up detection of GSS.

Abnormal report: Bad high pressure unit

864

J. Wang et al. / Mechatronics 19 (2009) 859–867

shows its flow chart. After connected with the ECU, the diagnostic tool reads DTCs and measuring data firstly, and the present conditions are judged approximately. Then the following intelligent tests are scheduled: high pressure test, compression test and shut-off test. The following possible errors are detected separately: bad high pressure unit, cylinder leakage and injector errors. If an error exists, GSS function module will provide a report to service engineers with test results. It can be seen that the diagnosis logic is the routine thinking of professionals, but it is added obviously the maintenance features of electric injection system, which make diagnosis results of electric injection system combined closely with intelligent test modules. And so, excellent diagnosis guidance is obtained. 5. Fundamental function module Normal function module implements the following functions: communication, DTC management, measuring, programming data. Communication adopts the fast initialization mode to achieve the logic connection between PC and ECU; DTC management is used to read, clear and save DTCs; Measuring is utilized to read and save analog and digital signals, internal data and system status information; Programming data online writes data to either the whole flash memory or part memory when necessary. 5.1. Communication Before any communication between the PC and the ECU can take place, the communications link must be established through an initialization process. (This is logical operation, not a physical one). There are two types of initialization: ‘‘5-baud initialization” and ‘‘fast initialization”. Here the latter type was adopted and its form is showed in Fig. 7. It is achieved by sending a pulse which maintains the voltage at low level for TiniL time, after Twup–TiniL time (Table 2 shows the timing value), the diagnostic tool sends an initialization request at the normal 10.4 K baud rate. The fast initialization pattern should always be followed by a startCommunication command message. The initialization is said to be complete after the ECU sends the positive response to this startCommunication service, and the communication link is realized. 5.2. DTC management This function implements reading, recording and clearing DTCs with their relevant information. Fig. 8 shows the flow chart of DTC management. Firstly, the diagnostic tool should open the communication port RS232, or else, it will exit. After setting port parameters, the diagnostic platform starts its main program. Here four command messages may be used. The first message is ReadDiagnosticTroubleCodesByStatus, it is used by the dignostic tool to read DTCs with status from the ECU’s fault memory, and the ECU always issues the currently valid DTCs stored in the operation Random-access memory (RAM) (not those stored in the Electrically Erasable Programmable Read Only Memory (EEPROM)). And DTCs shall be reported by the ECU in the same sequence as they have been detected.

Table 2 Timing values for fast initialization.

TiniL Twup Tidle

Description

Min (ms)

Max (ms)

K-line low time Time between start of low and start communication request K-line idle time before new initialization

24 49

26 51

The second message is ReadStatusOfDiagnosticTroubleCodes, it is used by the diagnostic tool to read out stored DTCs with their associated status corresponding to the particular request. The request is identified by the DTC value sent along with the request message. The third message is ReadFreezeFrameData, it is used by the diagnostic tool to read out the freeze frame data that is stored in the error memory for a particular error. The freeze frame data means the environmental conditions at the time of fault occurrence. The error is identified by the DTC value that is specified in the request message. The fourth message is ClearDiagnosticInformation, it is used by the diagnostic tool to clear diagnostic information in the ECU’s memory. Here the parameter in request message can choose to erase part or whole fault memory that is still present. A successful completion of this message resets all DTC related information in the ECU’s memory, including DTC number, status Of DTC parameter and other DTC related data. The positive response may be delayed, as the erasure needs some time. 5.3. Measuring This function implements measuring recording and analyzing monitoring data. The flow chart of measuring function is as same as the former function, and here is abbreviated. As showed in Fig. 8, the diagnostic tool firstly opens the RS232, and then executes measuring function according to the command message from diagnostic platform. The request frequency of measuring is set to one time per 10 ms in order to ensure the real-time monitoring but to avoid affecting the normal running of ECU. Here two command messages are used. The first message is ReadDataByLocalIdentifier, it is used by the diagnostic tool to read ECU data by means of LocalIdentifiers. The LocalIdentifier defines and identifies the data record in the ECU memory, which is vehicle manufacturer specific. Every LocalIdentifier has its own specific table which contains the data to be transmitted to diagnostic tool. LocalIdentifiers can include analog input and output signals, digital input and output signals, internal data and system status information if supported by the ECU. The second message is ReadMemoryByAddress, it is used by the diagnostic tool to read memory areas to which access is authorized. The message requests memory data identified by the parameters memory address and memory size. Vehicle manufacturer and diagnostic tool have to agree on the conferment of memory access rights. The acquired measuring data can be saved in PC, and used for future offline processing. In this way, it is possible for offline

Twup

P2 Diagnostic tool

ECU

Tidle TiniL

StartCommunication Request Service

Fig. 7. Fast initialization.

StartCommunication positive response

865

J. Wang et al. / Mechatronics 19 (2009) 859–867

Main progam

Start Y

SecurityAccess

RS232 busy? N

Exit

N Response positive

Open RS232

Y

N

Erasing flash message from diagnostic platform

Open success? Y

N Response positive

Set COM port parameters

Y Erasing flash

Main program of diagnostic platform

Y N Erasing is finished?

Receive DTC management command from platform

Split message

Y RequestDownload

Y N Response positive

Y

Sid=18?

Y ReadDiagnosticTrou bleCodesByStatus

TransferData Y

N

N

Sid =17?

Y ReadStatusOfDiagno sticTroubleCodes

Y ReadFreezeFrameDa ta Y ClearDiagnosticInfo rmation

Finished

Y RequestTransferExit

N Sid =12?

Compare checksum

N N

Sid =14? N

Other commands

Response positive Y EcuReset Fig. 9. Programming data.

Fig. 8. Flow chart of DTC management.

analyzing and remote evaluation. So this function is also important for after sales service aftermarket. 5.4. Programming data This function is used to implement writing data into ECU. Here the flow chart of programming data function is showed in Fig. 9. It can program data to the memory area of either the whole or part flash memory content. Flash memory programming can only be done when the engine is in off condition. Here five command messages were used. As showed in Fig. 9, the SecurityAccess message is firstly performed, it is used to avoid some critical operation to ECU, such as downloading data to specific locations, erasing contents from ECU, etc. But it shall not prevent normal diagnosis communication between the PC and ECU. Before programming data, the flash memory has to be erased by means of the StartRoutineByLocalIdentifiereraseFlash request message. As the erasing procedure may take a few seconds, the routine results should permanently be polled as long as the ECU sends the negative response message. When receiving a positive response message, the diagnostic tool is sure that the erase operation was successfully finished. After the flash is erased, writing process can be started by means of the RequestDownload and TransferData messages. The

data transfer has to be terminated by the RequestTransferExit message. To verify the integrity of transferred data, the StartRoutineByLocalIdentifier-compareChecksum message should be performed finally. This message requests that the ECU compares the expected checksum (from the diagnostic tool) with the checksum of the just programmed data (from the ECU). After the comparison operation is successfully completed, a positive response is obliged to be received, or else, the erasing and programming has to be repeated. Note that it erases at least one whole section of flash memory one time. A request for erasure of single byte would cause loss of a whole sector area. The size of sectors is 4 k bytes in this system (depending on the architecture of the flash memory used). 6. Application of this diagnostic tool This intelligent diagnostic tool has been successfully used in GD-1 high pressure common rail electronically controlled diesel engine. Fig. 10 showed its main interface, which was designed with LabVIEW and Visual C++ languages. The tests, including simulation tests, engine bench tests, automobile rotary drum tests and onboard road tests, showed that this diagnostic tool could realize accurate and quick data communication, real-time and dynamic measuring interface refreshment, online programming data and practical GSS function. There was no error message in all processes. In this diagnostic tool two function modules were provided

866

J. Wang et al. / Mechatronics 19 (2009) 859–867

Fig. 10. Main interface of diagnostic tool.

corresponding with six intelligent tests and seven function buttons: (1) Compression test. It is used to examine compression behavior. (2) Shut-off test. It is used to check the uniformity of injectors and cylinders. (3) Run up test. It is used to check work performance and contribution of cylinders. (4) Fuel leakage test. It is mainly used to check fuel leakage of the low-pressure fuel system. (5) Electrical test. It is used to help checking the wiring harness. (6) High pressure test. It is used to determine the performance of the high pressure unit. (7) Connect. It is used to implement communication initialization and connection between the PC and ECU. (8) Read DTC. Reading DTCs from ECU, and displaying them on the top part of the main interface including the following items such as No., status, DTC, name and times of DTCs. (9) Clear DTC. When faults are recovered, and DTCs and their relevant information no longer needed saving in RAM, they can be cleared by this function button. (10) Save DTC. DTCs can be saved in PC when necessary, and they can help analyzing and solving problems. (11) Measuring. Analog and digital signals, internal data and system status information can be read from ECU and displayes on the bottom of interface including variable names, description, variable value and unit. (12) Save data. Saving the measuring data mentioned above in PC for offline processing, analyzing and remote solving problems. (13) Programming data. It is used to online program data to either the whole flash memory or part memory when necessary. Therefore, the present system provided reliable, accurate and quick KWP2000 communication between ECU and PC, with baud rate up to 57,600 bit/s. It also provided a friendly, compatible and flexible diagnostic interface, and the functions of online programming and real-time measuring, which made the after-service job convenient in after-service market. This intelligent tool significantly improved the diagnosis efficiency. What’s more, service engineers can achieve great help from the excellent diagnosis guidance, which shortens the diagnosis and maintenance period.

7. Conclusion This paper described an interactive user-friendly intelligent diagnostic tool based on KWP 2000. It designed special communication module, which connected the PC and K line, and implemented the physical connection between the diagnostic platform and ECU. In this way, the diagnostic tool realized accurate and quick KWP2000 communication with the baud rate up to 57,600 bit/s. The diagnostic software implemented GSS function module and fundamental function module with six intelligent tests and four functions: The intelligent tests, including compression test, shut-off test, run up test, fuel leakage test, electrical test and high pressure test, were scheduled by GSS function module with the diagnosis logic of the routine thinking of professionals. Test results gave great help for service engineers and excellent diagnosis guidance were achieved. The fundamental function module carried out the following functions: Communication adopted the fast initialization mode; DTC management could read, clear and save DTCs with their associated status and freeze data; Measuring could read and save analog input and output signals, digital input and output signals, internal data and system status information; those data could be used for offline processing, analyzing and evaluation; Programming data could write data either the whole flash memory content or part memory areas into ECU. All tests showed that this diagnostic tool could realize accurate and quick data communication, online DTC management, real-time and dynamic measuring data refreshment, and online programming data. It significantly improved the efficiency and convenience of diagnosis, and shortened the diagnosis and maintenance period. Acknowledgment The authors would like to thank Keqing Zhu, Xingli Zhou and Quankui Xu for their assistance offered in this project.

J. Wang et al. / Mechatronics 19 (2009) 859–867

References [1] Jing Feng. Research of on-line calibration and real-time monitoring system for in-vehicle electronic control units. Shanghai: Shanghai Jiao Tong University; 2004. [2] Li Peiyu, Liu Guo, Tan Da-peng. A realization for hand-held intelligent fault diagnosis instrument. Elect Meas Instrum 2006;43(483):97–102. [3] Zhao Di, Chen Jiaqi. Study of distributed monitoring and diagnostic technology based on CAN bus. Comput Eng Des 2008;29(12):3212–5. [4] Zhang Xueyi. Realization of intelligent diagnosis of locomotive engine. Comput Autom Meas Control 2005;5:428–30. [5] Chen Xiaohua, Wei Shaohua, Chang Siqin, Zhu Xuehua. Intelligent fault diagnosis system based on sound intensity recognition for engine. J Nanjing Univ Sci Technol 2005;29(1):26–30. [6] Zhang Chen. Study on artificial immune algorithm and its application to intelligent fault diagnosis of marine diesel engine. Dalian Marine University; 2007. [7] Zhou Xingli, Yang Hai. Research on intelligent diagnostic system of electronic control diesel. Vehicle Eng 2006(6):39–42. [8] Li Peng, Liu Lei. The application and research of the intelligent fault diagnosis for marine diesel engine. In: Proceedings of the 2008 IEEE/ASME international conference on advanced intelligent mechatronics. AIM; 2008. p. 74–7.

867

[9] Wu HuaFeng, Li ZhuXin, Wu JianLin, Su Yi. Intelligent fault diagnosis for diesel engine exhaust valve using support vector machine. Trans CSICE 2006;24(5):465–9. [10] Bin Zhang, Jun Yan, Cheng Tian. Study on fault diagnosis system of diesel engine fuel injection system based on BP neural network. In: Proceedings of ISECS international colloquium on computing, communication, control and management, CCCM 2008, vol. 2; 2008. p. 108–12. [11] Gao Meijuan, Tian Jingwen, Cao Liting, Xu Jin. Fault diagnosis of oil pump based on high speed and precise genetic algorithm neural network. In: 2008 IEEE international conference on cybernetics and intelligent systems, CIS 2008; 2008. p. 965–70. [12] ISO 763721 Road vehicles. Electrical disturbance by conduction and coupling – Part 1: Passenger cars and light commercial vehicles with nominal 12 V supply voltage. Electrical transient conduction along supply lines only. [13] ISO 9141 – 2 Road vehicles – diagnostic systems Part 2: CARB requirements for interchange of digital information. [14] Keyword Protocol 2000 – Part 1: Physical layer test specification. [15] Keyword Protocol 2000 – Part 2: Data link layer. [16] Keyword Protocol 2000 – Part 3: Application layer. [17] Zhou Xingli. On board self-diagnostic strategies research for electronic control diesel – oil injection system. In: The 14th Asia Pacific automotive engineering conference; 2007. p. 8.