Site Information

 Loading... Please wait...

SAE J1939 Bandwidth, Busload And Message Frame Frequency

Posted by Wilfried Voss on

A Comprehensible Guide to SAE J1939 by Wilfried Voss

This post represents an extension to A Comprehensible Guide to J1939.

When it comes to designing SAE J1939 devices, the performance of the used embedded processor is of crucial importance. The question is, does the processor support the maximum message frequency of an SAE J1939 vehicle network? The critical factors are SAE J1939 bandwidth, busload, and the resulting message frequency.

SAE J1939 Bandwidth

In general, bandwidth is the amount of data that can be transferred over a network in a defined amount of time. In a CAN Bus network, it is usually expressed in bits per second (bps). Bandwidth should not be confused with the term band, such as a wireless phone that operates on the 800 MHz band. Bandwidth is the space it occupies on that band.

The maximum bandwidth in a conventional CAN Bus network is, of course, 1 MBit per second, and 250k/500k in an SAE J1939 vehicle network. However, this particular number does not sufficiently describe the amount of raw data being transmitted over a particular time.

As any other serial fieldbus system, the CAN Bus technology has to live with a certain amount of protocol overhead. In case of a CAN Bus data message frame the “protocol overhead” is represented by the bits before the data field as well as the bits following the data field.

The definition of the exact “net” CAN bandwidth, i.e., the number of real data bits or bytes per time unit, depends on many factors such as applied baud rate, number of bytes per data message frame, and the occurrence of error conditions (which can only be assumed for worst case scenario determination).

The actual bandwidth use can be calculated by dividing the number of actual data bits by the total frame length. The maximum bandwidth for conventional data frames with 11-Bit message ID length is 56% assuming 8 data bytes and average bit stuffing (for more detailed information see A Comprehensible Guide to Controller Area Network).

The SAE J1939 protocol uses the Extended CAN Bus message ID length of 29 bits where the arbitration field is extended from 12 to 32 bits (see arbitration filed image below):

The total frame length of a 29-Bit message ID Frame is between 67 bits (0 data bytes = Remote Frame, which is not part of the SAE J1939 Standard) and 131 bits (8 data bytes).

As I mentioned previously, the actual bandwidth use can be calculated by dividing the number of actual data bits by the total frame length.

* Average bit stuffing is applied.

As shown in the above table, the maximum bandwidth use (using an 29-Bit identifier) is 47%. This number does not take into consideration the occurrence of error, or overload frames. Consequently, the realistic bandwidth usage will be less than 47%.

SAE J1939 Message Frame Frequency

The SAE J1939 message frequency depends on its length (the majority of J1939 message frames contain 8 data bytes) and the busload.

An SAE J1939 message frame time (135 bits with 8 data bytes and average bit stuffing applied) is 0.54 msec @ 250kbps and 0.27 msec @ 500 kbps.

Assuming a busload of 70%, which is generally considered the "real-world" maximum, an SAE J1939 data frame may occur every 0.77 msec @ 250 kbps or 0.39 msec @ 500 kbps.

However, consider that the SAE J1939/82 Standard (Compliance - Truck and Bus) demands to verify that the SAE J1939 device does not lose messages when the data link is at 100 percent utilization for 10 msec. The 10 msec time frame translates into 19 consecutive messages at 100% busload with 250 kbps applied. For 500 kbps, the number increases to 38 consecutive message frames.

These numbers should be used when it comes to implementing a CAN Bus message buffer. CAN Bus controllers usually come with an internal message buffer, but it is nevertheless highly recommended to create an appropriately sized buffer in your embedded application.

Note: Most of today's CAN Bus controllers can theoretically handle a constant busload of 100%. However, there will be a latency in message processing caused by the application software. Consequently, there is hardly any device in the marketplace that can reliably process 100% CAN busload. The creators of the SAE J1939 Standard have invested great efforts to define parameters such as limited baud rate, limited physical network length, etc., to ensure reliable operation with available and affordable technology.