Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Equation for Can Traffic #241

Merged
merged 11 commits into from
Nov 7, 2024
38 changes: 38 additions & 0 deletions docs/docs/can-traffic.md
ManushPatell marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
ManushPatell marked this conversation as resolved.
Show resolved Hide resolved
title: Calculating CAN traffic on a bus
---



In order to calculate the CAN load, we must declare a few variables and their importance within the CANbus protocol.
ManushPatell marked this conversation as resolved.
Show resolved Hide resolved

1. Baud: (kbaud)

The baud rate is the rate at which data is transfered in a communication channel (like CAN). For example, 9600 Baud rate is 9600 bits per second

2. Frequency (Hz)
ManushPatell marked this conversation as resolved.
Show resolved Hide resolved

Frequency in the CANbus refers to how many CAN frames (or messages) are transmitted per second. So the greater the frequency, the more bits transferred, increasing the bus load.

3. Total Data Per Cycle

Total data per cycle includes all the bits transmitted in one CAN message. This includes not only the payload but overhead bits like start of frame, CRC, acknowledgement, control field etc.



## The bus load is determined by:

![Bus Load Formula](https://latex.codecogs.com/png.latex?\text{Bus%20Load%20(\%)}%20=%20\frac{\text{Number%20of%20Bits%20per%20Frame}%20\times%20\text{Number%20of%20Frames%20per%20Second}}{\text{CAN%20Speed}}%20\times%20100)
ManushPatell marked this conversation as resolved.
Show resolved Hide resolved

![Bus Load Formula](https://latex.codecogs.com/png.latex?\text{Bus%20Load%20(\%)}%20=%20\frac{\text{Total%20Bits%20per%20Second}}{\text{CAN%20Speed}}%20\times%20100)

## Sample calculation:

Total data/cycle: 1524 (bits per cycle)

Frequency: 200 (cycles per second)

Baud Rate: 500 kbaud (500,000 bits transferred per second)

![Solved Bus Load Formula](https://latex.codecogs.com/png.latex?\text{Bus%20Load%20(\%)}%20=%20\frac{1,524%20\times%20200}{500,000}%20\times%20100%20=%2060.96\%)

Loading