文档库 最新最全的文档下载
当前位置:文档库 › SAE_J1939_Page3_diesel-engine-control-templin-fredriksson

SAE_J1939_Page3_diesel-engine-control-templin-fredriksson

SAE_J1939_Page3_diesel-engine-control-templin-fredriksson
SAE_J1939_Page3_diesel-engine-control-templin-fredriksson

Diesel Engine Control, CAN Kingdom and J1939

Lars-Berno Fredriksson Kvaser AB

Michael Templin Scania AB

960324

1.Background

At the last CANHUG meeting a discussion about diesel engine control was brought up. Current work among engine producers is clearly focused on J1939 and thus directed toward truck engine control. However, for mobile hydraulics and marine applications J1939 might not be what we would like to see. Compared with the truck industry most CANHUG members represent a small market, so the engine industry may not look into CAN Kingdom unless it can be shown that J1939 could be easily mapped on CAN Kingdom. Thus, the main question is:

Can J1939 really be mapped on CAN Kingdom offering

better performance for non J1939 applications?

I would say the answer to this question is YES! J1939 is a very "stiff" protocol as the CAN

identifiers are to a certain extent predefined. The updating times and data formats are predefined as well. However, the engine system controller might not be limited to any of these pre definitions but could support flexible updating times and other data formats.

A first attempt to map J1939 on CAN Kingdom would be by using the data formats defined by

J1939. If this works, we can later make the protocol even more efficient by introducing King's Page 17 to let the system designer create more suitable data formats and may be also King's Page

18 to compress the data formats even more. Introducing King's Page 5, "Action Page - Reaction

Page," would make further enhancements possible. In CAN Kingdom mode, fragmented messages would be handled much more reliably and faster than in J1939 mode. However, it is essential that

a CAN Kingdom module would work exactly according to J1939 when set up as J1939.

A missing piece in J1939 is Network Management. There is a Draft J1939/81 but to my

knowledge this is generally not implemented but each vendor has got his own, often very simple, solution. A standard CAN Kingdom implementation would meet most requirements for a vendor specific Network Management. J1939 users, not yet interested in network management, would have a good solution "free of charge" if they base their J1939 design on CAN Kingdom.

2.J1939 requirements

2.1King's Pages required

To make a J1939 mapping an ECU we will need to support the following CAN Kingdom King's Pages:

King's Page 0Start/Stop, Modes, CAN Kingdom compulsory.

Kings Page 1Module initiating in a system, CAN Kingdom compulsory.

King's Page 2Assigning CAN ID:s, CAN Kingdom compulsory.

King's Page 12Repetition Rate and Open Window Setup Page.

The following pages should be considered, although not really needed to map J1939, as they would make modules much more versatile for CAN Kingdom users:

King's Page 3Assigning to Groups. Most CAN Kingdom implementations have

this feature.

King's Page 4Removing from Groups. (Needed if Page 3 is implemented.)

King's Page 8CC register settings. This feature is not mentioned in J1939 but

needed in any advanced system.

King's Page 9Change of physical address.

King's Page 10Minimum time elapsing between two consecutive transmissions of

the same Envelope. Facilitates bus management. (Needed to make

event triggered systems time predictable.)

King's Page 11Circular Time Base Setup Page.

An implementation of CAN Kingdom as above would require about 3 k ROM and 100 byte RAM.

2.2J1939 parameters required

To make a simple engine control the following J 1939 messages would be sufficient:

From the system controller:

TSC1 (J1939/71 3.3.1)

From the engine EDC:

EEC2 (J1939/71 3.3.6)

EEC1 (J1939/71 3.3.7)

Engine Configuration (J1939/71 3.3.17) plus a subset of Transport Protocol (J1939/21 3.10) Engine Temperature (J1939/71 3.3.28)

Engine Fluid Level/Pressure (J1939/71 3.3. 29)

The outline of these messages according to J1939:

Data content Repetition rate Data Data PDU PDU Default Parameter

length,page format specific priority Group

bytes Number

TSC1when active800Destination 30

10ms address(000000)

16 EEC250 ms802403361,443

(00F003)

16 EEC1Engine speed dependent802404361,444

or 20 ms(00F004)

16 Engine On change of280254227665,251

configuration torque/speed points of(00FEE3)

16 more than 10% since last

transmission,

or every 5 sec

Broadcast Not scheduled80236Destination660,416

Announce address(00EC00)

16 Message

Engine1s80254238665,262

Temperature(00FEEE)

16 Engine Fluid.5 s80254239665,263

Level/Pressure(00FEEF)

16

Many CANHUG systems have different systems architecture than J1939. J1939 supposes flat architecture but most CAN Kingdom systems presume one node to be a System Controller, designed by the system designer himself, although CAN Kingdom allows for flat systems design as well. Here we assume, to make it simple for CAN Kingdom users, that there is a System Controller node and it will take control over the engine. This is not a CAN Kingdom requirement. Other nodes, e.g., an ASR/Traction Control and an automatic gearbox could be connected to the net and share the engine control function in a J1939 network.

In the System Controller City (and other modules that would have to control the engine) we need, besides the two compulsory Folders (containing King's Document and Mayor's Document), one or two Transmit Folders (depending how the two destination addresses are implemented) and five Receive Folders to set up messages as above with CAN Kingdom. The Engine Controller City would then require five transmit Folders and one or two receive Folders. EEC2 contains information about the Accelerator Pedal (AP) position and J1939 assumes that this is measured by the Engine Controller. In some systems however, the AP position is measured by another module and a message with the same data format is transmitted to the Engine Controller as a global message. If such a message is sent from the System Controller, then one Receive Folder has to be set as Transmit there and another Transmit Folder is required in the Engine Controller City.

2.3J1939 CAN ID:s

The CAN ID:s of J1939 is organized as below:

Priority R D PF PS SA

P

Priority Selectable. Two default levels, high = 3 and low = 6

R Reserved = 0

DP Data Page Currently = 0

PF PDU (Protocol Data Unit) Format.

PS PDU Specific0 - 239Single destination address

240 - 255Group Extension. Global address = 255 SA Source Address

For the details, please refer to the J1939/213.2. For the time being we need only to fill in the bits in the CAN Kingdom Envelope according to the J1939 standard to make a default Envelope for J1939 users. CAN Kingdom designers will certainly chose a more efficient scheme for assigning proper Envelopes.

3.CAN Kingdom Letters set up as J1939 messages.

3.1TSC1

TSC1 is intended for modules taking control of the engine. The fixed updating rate is 10ms and the engine will obey TSC1 commands until

either the controlling module gives up controlling by setting the Override Control Mode bits to

00 in a broadcast message

or a message with higher Override Control Mode Priority is received

or TSC1 messages have ceased to appear on the CAN bus for two update periods.

3.1.1TSC1 Page Form.

A CAN Kingdom Page Form for a TSC1 message is presented below. For the very details of the

data, please consult J1939/71 3.3.1.

Document name:TSC1 Document

Document List:

Document Number:

Document type:

Page description.

Number of Lines:8

Data description:Torque/Speed Control (J1939 update time 10 ms)

Line description.

Line 0:11ppssmm Control bits.

pp Override control mode priority

00Highest priority

01High priority

10Medium priority

11Low priority

ss Requested speed conditions

00Transient Optimized, driveline disengaged

01Stability Optimized, driveline disengaged

10Stability Optimized, driveline condition 1

11Stability Optimized, driveline condition 2

mm Override control modes

00Override disabled

01Speed control

10Torque control

11Speed/Torque limit control

Line 1:SSSSSSSS LSB Requested speed

Line 2:SSSSSSSS MSB Resolution: .125 rpm/bit gain, 0 rpm offset (upper byte resolu-

tion = 32 rpm/bit)

Data range: 0 to 8031.875 rpm

Line 3:t t t t t t t t Requested Torque

Resolution 1% gain, -125% offset

Data range: -125 to 125%

Operating range: 0 - 125%

Line 4:11111111Not defined

Line 5:11111111

Line 6:11111111

Line 7:11111111

3.1.2TSC1 CAN ID

The outline of the CAN ID of TSC1 according to J1939 looks as below:

01100000000000000000000100111

1

priority R D PF PS SA

3P Destination address Source address, here

Engine # 1 = 0as an example

Engine # 2 = 1"Management Com-

puter" = 39 For systems with one or two engines this would work but for systems with more engines, e.g., train or ship systems, another ID has to be defined anyhow. For multi-engine systems having a group address for all of them might also be attractive. This is not possible in J1939 but no problem in CAN Kingdom.

Let us assume that this Document is placed in a fixed Folder 3. Setting up this (or these) Envelope(s) in CAN Kingdom would be done by a King's Page 2:

Document name:King's Document

Document List:T1 Capital / 0 City

Document Number:0 Capital / 0 City

Document type:Transmit (Capital)

Receive (City)

Page description.

Page number:2

Number of Lines:8

Data description:The King's Page 2. Assigning an Envelope to or expelling an Envelope from a

Folder forming Letters and restraining the use of an Envelope.

Line description.

Line 0:City or Group address

Line 1:00000010(Page 2)

Line 2:00100111Envelope Number, LSB (SA = 39, Management Computer)

Line 3:00000000Envelope Number(PS, DA = 0, Engine #1)

Line 4:00000000Envelope Number(PF = 0)

Line 5:10001100Envelope Number, MSB (Priority = 3, R = 0, DP = 0)

ECr r = 0Reserved

C = 1/0Compressed Envelope yes/no.

E = 1/0Extended / Std. format.

Line 6:00000011Folder Number 3

Line 7:rrrrrAAE E = 1/0Enable/Disable the use of this Envelope. (Folder Number is ig-

nored.)

AA = 00Keep current assignment. (Folder Number is ignored.)

AA = 01Assign this Envelope to the Folder on Line 6. If another Enve-

lope is already assigned to this Folder, the previous assignment

will be kept in parallel. The use of this Envelope is enabled or

disabled according to the value of E.

AA = 11Transfer the current assignment of this Envelope to the Folder

on Line 6. The old assignment is canceled. The use of this

Envelope is enabled or disabled according to the value of E.

AAE = 100Expel this Envelope from any assignment. (Folder Number is

ignored.)

rrrrr = 00000Reserved

All other combinations are reserved.

3.1.3Repetition rate

Let us assume that we have made a fixed implementation of Circular Time Base Setup as follows:

A grain fixed to 2 μs

Number of grains per segment fixed to 250

Number of segments per revolution fixed to 200

Number of revolutions for maximum time fixed to 200.

Such a circular time setup would give a resolution of 2μs, .5 ms per segment, 100 ms per revolution and a maximum time of 20 s.

The required repetition rate of 10 ms for TSC1 would then be set up by King's Page 12:

Document name:King's Document

Document List:T1 Capital / 0 City

Document Number:0 Capital / 0 City

Document type:Transmit (Capital)

Receive (City)

Page description.

Page number:12

Number of Lines:8

Data description:The King's Page 12. Repetition rate and open window setting.

Line description.

Line 0:City or Group address

Line 1:00001100(Page 12)

Line 2:00000011Folder Number 3.

Line 3:00000000Start Segment offset.

Line 4:00000000Start Revolution offset.

Line 5:00000000Open window. Number of segments.

Window always open.

Line 6:00010100Repetition increment (within a revolution),

number of segments. (In this example a seg-

ment is 2*250 μs. 20 segments will make 10

ms.)

Line 7:00000001Repetition increment, number of revolutions.

1 will recommence repetition at every revolu-

tion.

3.2EEC2

3.2.1EEC2 data format

The EEC2 Data Content is "Accelerator pedal position / Percent Load at Current speed." A corresponding CAN Kingdom Page Form would look as below:

Document name:EEC2 Document

Document List:

Document Number:

Document type:

Page description.

Number of Lines:8

Data description:Accelerator pedal position / percent load at actual speed

(J1939/71 3.3.6, repetition rate 50 ms)

Line description.

Line 0:1111kkll Status_EEC2

kk AP kick down switch

00Kick down passive

01Kick down active

ll AP low idle switch

00AP not in low idle condition

01AP in low idle position

Line 1:pppppppp AP position

Resolution: .4%bit gain, 0% offset

Data Range: 0% to 100%

Line 2:LLLLLLLL Percent load at current speed

Resolution 1% gain, 0% offset

Data range: 0% to 125 %

Operating range: 0 - 125%

Line 3:11111111Not defined

Line 4:11111111

Line 5:11111111

Line 6:11111111

Line 7:11111111

3.2.2EEC2 CAN ID

The CAN identifier for EEC2 messages is defined as below in J1939:

01100111100000000001100000000

1 priority R D PF PS SA

3P2403Engine #1 = 0

Engine #2 = 1

In a simple CAN Kingdom implementation the EEC2 Document would be placed in a fixed Folder, e.g., Folder 3. To this Folder an Envelope with the ID above is assigned by a King's Page 2:

Document name:King's Document

Document List:T1 Capital / 0 City

Document Number:0 Capital / 0 City

Document type:Transmit (Capital)

Receive (City)

Page description.

Page number:2

Number of Lines:8

Data description:The King's Page 2. Assigning an Envelope to or expelling an Envelope from a

Folder forming Letters and restraining the use of an Envelope.

Line description.

Line 0:City or Group address

Line 1:00000010(Page 2)

Line 2:00000000Envelope Number, LSB(SA = 0, Engine 1)

Line 3:00100111Envelope Number(PS, DA = 39, Management Computer)

Line 4:00000000Envelope Number(PF = 0)

Line 5:10001100Envelope Number, MSB (Priority = 3, R = 0, DP = 0)

ECr r = 0Reserved

C = 1/0Compressed Envelope yes/no.

E = 1/0Extended / Std. format.

Line 6:00000011Folder Number 3

Line 7:rrrrrAAE E = 1/0Enable/Disable the use of this Envelope. (Folder Number is ig-

nored.)

AA = 00Keep current assignment. (Folder Number is ignored.)

AA = 01Assign this Envelope to the Folder on Line 6. If another Enve-

lope is already assigned to this Folder, the previous assignment

will be kept in parallel. The use of this Envelope is enabled or

disabled according to the value of E.

AA = 11Transfer the current assignment of this Envelope to the Folder

on Line 6. The old assignment is canceled. The use of this

Envelope is enabled or disabled according to the value of E.

AAE = 100Expel this Envelope from any assignment. (Folder Number is

ignored.)

rrrrr = 00000Reserved

All other combinations are reserved.

Here we have assumed that the AP position is sent from the Engine 1. If it would be sent from the Management Computer, Line 2 and 3 would have been switched and line 2 and 3 in the

EEC2 Document would have been padded with 1:s indicating Not Available (as that informa-tion source is definitely the engine).

3.2.3EEC2 Repetition rate

Let us assume that we have made a fixed implementation of Circular Time Base Setup like for TSC1. The required repetition rate of 50 ms for EEC2 would then be set up by King's Page 12: Document name:King's Document

Document List:T1 Capital / 0 City

Document Number:0 Capital / 0 City

Document type:Transmit (Capital)

Receive (City)

Page description.

Page number:12

Number of Lines:8

Data description:The King's Page 12. Repetition rate and open window setting.

Line description.

Line 0:City or Group address

Line 1:00001100(Page 12)

Line 2:00000011Folder Number 3.

Line 3:00000000Start Segment offset.

Line 4:00000000Start Revolution offset.

Line 5:00000000Open window. Number of segments.

Window always open.

Line 6:0010100Repetition increment (within a revolution),

number of segments. (In this example a seg-

ment is 2*250 μs. 100 segments will make 50

ms.)

Line 7:00000001Repetition increment, number of revolutions.

1 will recommence repetition at every revolu-

tion.

3.2.4EEC1

The EEC1 message would be set up in the same way as the other two messages above.

According to J1939 the repetition rate is engine speed dependent. The reason for this is that

two methods of measuring-transmission are allowed: Crank Angle or Time-Based Update

Rates. Then at maximum and minimum time delay between sampling and transmission is

specified for different speeds. This part of the J1939 spec. does not seem very relevant. As

measuring and CAN transmissions are two independent tasks, any repetition rate could be

allowed and J1939/71 3.1.6.2, 2."Normal" update rates, shows that a fixed transmission rate of

20 ms would be sufficient for a standard J1939 module.

3.2.5EEC1 Document

The EEC1 Document would look as below and be placed in a fixed Folder, e.g., Folder 4.

Document name:EEC1 Document

Document List:

Document Number:

Document type:

Page description.

Number of Lines:8

Data description:Torque/Speed Control (J1939/71 3.3.7 repetition rate engine speed dependent)

Line description.

Line 0:1111mmmm Status_EEC1

mmmm Engine torque mode (3.2.2.1)

Line 1:dddddddd Driver's demand engine - percent torque

Resolution: 1%bit gain, -125% offset

(00 = -125%, 125 = 0%, 250 = 125%)

Data Range: -125% to 125%

Operating Range: 0 to 125%

Line 2:SSSSSSSS Actual engine - percent torque

Resolution 1% gain, -125% offset

Data range: -125 to 125 %

Operating range: 0 - 125%

Line 3:SSSSSSSS LSB Engine speed

Line 4:SSSSSSSS MSB Resolution: .125 rpm/bit gain, 0 rpm offset (upper

byte resolution = 32 rpm/bit)

Data range: 0 to 8031.875 rpm

Line 5:11111111Not defined

Line 6:11111111

Line 7:11111111

3.2.6EEC1 CAN ID

The EEC1 CAN ID looks as below and would be setup by a King's Page 2 as earlier messages.

01100111100000000010000000000

1 priority R D PF PS SA

3P2404

3.2.7EEC1 repetition rate

EEC1 would be set up for a 20 ms repetition rate in the same way as earlier messages.

3.3Engine Configuration

The Engine Configuration parameter contains 28 bytes and will be sent according to the J1939 transport protocol. In CAN Kingdom Engine Configuration would be a multi-page Document and by putting the Page Number on Line 0 we would get the same format as the J1939

transport protocol. For non-J1939 users the Engine Configuration does not seem very

efficient. The Reference Engine Torque is transmitted in byte 20 and 21 although it never

changes. This would rather be a parameter of its own. The MSB and LSB of engine speed at point 3 will be transmitted in two different messages as well as the speed and torque of point 5.

Although using the same scheme for creating a CAN ID for the Engine Configuration

messages would be possible as for the other messages, J1939 has a different way to handle

fragmented messages. Fragmented messages are handled according to J1939/21 3.10.3

"Transport Protocol - Connection Management Messages." Non-J1939 users would probably not consider using this as a direct use of a Paginated Engine Configuration Document would be simpler, faster and safer.

The J1939 Transport Protocol can be implemented in different ways, all possible to map with CAN Kingdom. Here we will only discuss the simplest way, by a Broadcast Data Transfer

Sequence according to FIGURE C3 in SAE J1939/21. Then we have to start the transmission of Engine Configuration by a TP.CM_BAM message followed by four messages with data,

each within a 50 to 200 ms period, and we have not to deal with any acknowledgment or error handling procedure.

3.3.1Connection Management (TP.CM) for Engine Control

In CAN Kingdom a Connection Management Document Form the Engine Control parameter would look as below:

Document name:Connection Managent Document (TP.CM)

Document List:

Document Number:

Document type:

Page description.

Number of Lines:8

Data description:Broadcast Announce Message for Engine Control

J1939/21 3.10.3 (FIGURE 11)

(J1939/71 3.3.17 repetition rate on change of torque/speed points of more than

10% since last transmission, or every 5 sec)

Line description.

Line 0:00100000Control byte = 32

Line 1:00011100LSB Total message size, number of bytes (28)

Line 2:00000000MSB

Line 3:00000100Total number of packets (4)

Line 4:r r r r r r r r r=1Reserved

Line 5:11100011LSB Parameter Group to be transferred (00FEE3)16

Line 6:11111110

Line 7:00000000MSB

3.3.2Broadcast Announce Message for Engine Control CAN ID

The TP.CM_BAM Letter will have the following CAN ID assigned to its Form:

11000111011001111111100000000

1 priority R D PF PS SA

6P236255Engine #1 = 0

Global Engine #2 = 1

3.3.3Engine Configuration Document

An Engine Configuration Document according to J1939 would look like as below. Each Page is concecutively transmitted within a 50 to 200 ms time frame.

Document name:Engine Configuration Document

Document List:

Document Number:

Document type:

Page description.

Number of Lines:8

Data description:Engine performance map (J1939/71 3.3.17 repetition rate on change of

torque/speed points of more than 10% since last transmission, or every 5 sec) Line description.

Line 0:00000001Page 1

Line 1:s s s s s s s s LSB Engine speed at idle, point 1

11111111

Line 2:s s s s s s s s MSB Resolution: .125 rpm/bit gain, 0 rpm offset 11111111

Data range: 0 to 8031.875 rpm

Line 3:t t t t t t t t Percent torque at idle, point 1

11111111

Resolution 1% gain, -125% offset

Data range: -125 to 125 %

Operating range: 0 - 125%

Line 4:s s s s s s s s LSB Engine speed at point 2

22222222

Line 5:s s s s s s s s MSB Resolution: .125 rpm/bit gain, 0 rpm offset 22222222

Data range: 0 to 8031.875 rpm

Line 6:t t t t t t t t Percent torque at point 2

22222222

Resolution 1% gain, -125% offset

Data range: -125 to 125 %

Operating range: 0 - 125%

Line 7:s s s s s s s s LSB Engine speed at point 3

33333333

Resolution: .125 rpm/bit gain, 0 rpm offset

Data range: 0 to 8031.875 rpm

Document name:Engine Configuration Document

Document List:

Document Number:

Document type:

Page description.

Number of Lines:8

Data description:Engine performance map (J1939repetition rate on change of torque/speed

points of more than 10% since last transmission, or every 5 sec)

Line description.

Line 0:00000010Page 2

Line 1:s s s s s s s s MSB Engine speed at point 3

33333333

Resolution: .125 rpm/bit gain, 0 rpm offset

Data range: 0 to 8031.875 rpm

Line 2:t t t t t t t t Percent torque at idle, point 3

33333333

Resolution 1% gain, -125% offset

Data range: -125 to 125 %

Line 3:s s s s s s s s LSB Engine speed at point 4

44444444

Line 4:s s s s s s s s MSB Resolution: .125 rpm/bit gain, 0 rpm offset 44444444

Data range: 0 to 8031.875 rpm

Line 5:t t t t t t t t Percent torque at point 4

44444444

Resolution 1% gain, -125% offset

Data range: -125 to 125 %

Operating range: 0 - 125%

Line 6:s s s s s s s s LSB Engine speed at point 5

55555555

Line 7:s s s s s s s s MSB Resolution: .125 rpm/bit gain, 0 rpm offset 55555555

Data range: 0 to 8031.875 rpm

Document name:Engine Configuration Document

Document List:

Document Number:

Document type:

Page description.

Number of Lines:8

Data description:Engine performance map (J1939repetition rate on change of torque/speed

points of more than 10% since last transmission, or every 5 sec)

Line description.

Line 0:00000011Page 3

Line 1:t t t t t t t t Percent torque at idle, point 5

55555555

Resolution 1% gain, -125% offset

Data range: -125 to 125 %

Line 2:s s s s s s s s LSB Engine speed at high idle, point 6

66666666

Line 3:s s s s s s s s MSB Resolution: .125 rpm/bit gain, 0 rpm offset

66666666

Data range: 0 to 8031.875 rpm

Line 4:GGGGGGGG LSB Gain (KP) of endspeed governor

Line 5:GGGGGGGG MSB Resolution: .0007813% engine reference torque/rpm

per bit gain (normailized), 0%/rpm per bit offset

Data range: 0 to 50.2%/ rpm

Line 6:t t t t t t t t LSB Reference engine torque

r r r r r r r r

Line 7:t t t t t t t t MSB Resolution: 1 Nm/bit gain, 0 Nm offset

r r r r r r r r

Data range: 0 to 64 255 Nm

相关文档