The bitrate of a transmission is an easy calculation. 1
As its name mentioned, it's the number of bits per seconds. 2
So when we calculate the bitrate, we simply divide the number of bits by the transmission time. 3
That's exactly what we've done so far. 4
But when we use a protocol, there is usually only a little part of the frame which is useful for the user. 5
Let's take an example of a LoRa packet 6
We assume that a user wants to transmit one byte for let's say a temperature. We won't send right away the byte 7
in the air. 8
We need to use a specific format in respect to the LoRa specification. 9
So let's see how a complete LoRa frame looks like. 10
In a LoRa frame, there is a Preamble and a Header following by the Payload, 11
here our temperature. 12
And finally, a CRC for error detection. 13
The previous bitrate was calculated using the Payload size and the time to transmit this Payload. 14
But the real bitrate should be the Payload size divided by the overall Frame Time. 15
And a Frame Time is what we call the Time On Air. 16
If we make an analogy, we can imagine a car journey between two cities 100 kilometers apart. 17
You can say that if you drive at 100 kilometers per hour, you will take one hour to get there. 18
This is what your car dealer told you, and everyone believes it. 19
But this is never true because you will have to get out of the city, 20
you will have few stops, 21
and again, you will never be able to drive at 100 kilometers until the final destination. 22
So, we must make the difference between the car speed capacity and the average speed. 23
And the average speed is in that case, the number of kilometers divided by the real duration of your 24
journey. 25
This is exactly the same thing here, and it is why we need to know the overall Time On Air. 26
In the book provided with these courses, there is a formula that you can use but here will use a simulator 27
called LoRa Calculator. 28
This simulator depends on the transceiver used and the one used for this video is the SX1261 transceiver. 29
I attached this little software with this video so you can download and try it. 30
So we're going to set the same configuration corresponding to our two cases and check the result in the 31
Time On Air field. The settings for the first case were SF7, 125 kHz bandwidth with a 32
coding rate of 4/5. 33
And we have several choices for the packet configuration. 34
We could use anyone for a point to point LoRa transmission. 35
Of course, as long as the transmitter and the receiver has the same configuration. But we're going 36
to prepare 37
the next step where we'll use only LoRaWAN. 38
So we are not building a LoRaWAN frame here, but the LoRaWAN protocol will need these specific settings later. 39
So that's why we apply these ones instead of choosing other ones. 40
There is a Preamble length of eight symbols, Header mode enable and CRC enable. 41
Finally, the Payload length is our simulated temperature of one byte, which gives a calculated Time 42
On Air of 25.85 milliseconds. 43
And we can do the same thing for the second case with a SF of 12, which gives a Time On Air of 827.39 milliseconds. 44
So we can use these two durations to calculate the real bitrate of our LoRa transmission. 45
Once again, the bitrate is the number of bid divided by the time, 8 bits divided by the Time On Air. 46
In the first case, which was 25.85 milliseconds, that gives a result of 309.3 bits per 47
second. 48
When we use a SF of 12, 49
we still have 8 bits, but this time it's divided by 827.39 milliseconds. 50
That gives a result of 9.6 bits per second. 51
You can see that we now reached a very low bitrate, far from the one given in the documentation. 52
And unfortunately, we're not going to stop here since there is still two other things to take into 53
account. 54
This is what we will see in the next video.