
CAN bus load measures how much of the available CAN bus bandwidth is being used by network traffic. Measuring CAN bus load can help engineers determine whether a CAN network has sufficient capacity for its current traffic and whether additional messages or devices could overload the bus.
The Komodo CAN Duo Interface and Komodo Software API can be used to measure CAN bus load by capturing CAN frames over a defined period and calculating the amount of bus capacity used. This approach is useful when monitoring CAN traffic programmatically and evaluating system capacity.
CAN bus load is the percentage of available bus bandwidth occupied by CAN traffic during a given period.
The basic calculation is:
CAN bus load (%) = used bus capacity / maximum bus capacity × 100The maximum capacity is determined by the CAN bus bitrate. For example, a CAN bus operating at 125 kbit/s has a theoretical maximum capacity of:
125,000 bits/sIn practice, CAN frames contain more than just payload data. Frame fields, acknowledgments, , inter-frame spacing, and bit stuffing contribute to the total number of bits transmitted on the bus. As a result, measuring bus load requires accounting for the complete transmitted frames rather than only the payload bytes.
One way to measure CAN bus load is to capture CAN traffic over a defined time interval, determine the total number of transmitted bits, and compare that value with the bus's maximum capacity.
A longer capture period can provide a more representative measurement when CAN traffic varies over time. For example, on a 125 kbit/s CAN bus, the maximum theoretical capacity is 125,000 bits per second. The measured number of bits transmitted during the capture can then be compared with the capacity available during the same time period.
The Komodo CAN Duo Interface can monitor CAN traffic and provide packet information through the Data Center Software and the Komodo Software API. Although the API returns decoded CAN packet data rather than the raw bit stream, the captured packet information can be used to estimate CAN bus load.
The km_can_read() function returns CAN packet information, including the packet timestamp, bitrate, identifier, data length code (DLC), and other CAN information. By accumulating the captured packets and using their timestamps, it is possible to calculate the amount of bus traffic occurring during a defined interval.
A practical approach is to accumulate CAN frames during a five-second capture period and use the timestamps and packet information returned by the Komodo Software API.
The process is:
For a CAN bus operating at 125 kbit/s, the maximum available capacity during a capture period of t seconds is:
125,000 × t bitsThe resulting bus load can therefore be expressed as:
CAN bus load (%) = total bits transmitted / (125,000 × t) × 100The same calculation can be applied to other CAN bitrates by replacing 125,000 with the configured bus bitrate.
Several factors should be considered when calculating CAN bus load.
The CAN bitrate determines the maximum theoretical number of bits that can be transmitted per second. A higher bitrate provides greater available bandwidth, while a lower bitrate reaches its capacity with less traffic.
CAN frames contain fields in addition to the application payload. These include identifiers, control information, CRC, acknowledgments, and other protocol fields. Bit stuffing can also increase the number of bits transmitted.
Because of this overhead, calculating bus load from payload bytes alone will not provide an accurate representation of the bandwidth used by the CAN bus.
CAN traffic may change depending on system activity. A short capture may represent only a particular operating condition, while a longer capture can provide a better view of average bus utilization.
For systems with periodic or bursty CAN traffic, it can be useful to measure bus load during multiple operating conditions rather than relying on a single capture.
The accuracy of a calculated bus load depends on accurately determining the number of transmitted bits and the time interval over which they were transmitted. When using a CAN interface and API, packet timestamps and CAN frame information can be used to establish the capture interval and calculate the resulting bus utilization.
The Komodo CAN Duo Interface provides two independent CAN channels for monitoring and transmitting CAN traffic. With the Komodo Software API, engineers can integrate CAN communication and monitoring into custom applications and test systems.
For applications that require programmatic CAN bus monitoring, the API provides access to received CAN packets, timestamps, bitrate information, error information, and other CAN bus events. This makes it possible to build custom CAN analysis and measurement functions, including CAN bus load measurement.
For more information about CAN communication and analysis, check out our CAN protocol page for resources and FAQs. The Komodo Software API documentation provides additional information about API functions, examples, and supported programming environments when using the Komodo CAN Duo Interface.
If you have questions about measuring CAN bus load or using Total Phase CAN tools in your application, feel free to email us at sales@totalphase.com. You can also request a demo that is specific for your application.