Operation of the duty cycle algorithm? #1219
Replies: 2 comments 1 reply
-
Hi @mluis1, Have you found the time to take a look at this already? I was also wondering wether you wouldn't violate ETSI duty cycle restrictions using this current algorithm? I've made some brief analysis of the duty cycle computation in The first 12 transmissions are when the band is fully ready for transmission and enough credits are available to transmit those messages back-to-back. The diagram ignores the RX delays and assume that the application is able to schedule the transmission in back-to-back. So ignoring RX delays (in class A) for now, this takes about 17.796 seconds. The transmissions that follow those 12 are when duty cycle limiting algorithm jumps into action. Over a period half an hour this is a zero-sum game losing as much credits as you gain. Over the course of that half hour you indeed won't violate 1% duty cycle. However, when the half hour is over, you still have 1782.204 seconds left within that same hour. Given that the zero-sum game that was happening in that first half hour is still going on, because thats how the algorithm seems to work, you would still be able to transmit messages within that same hour resulting in the total air-time to exceed 36 seconds. Could you please confirm or debunk this analysis? Thanks in advance, |
Beta Was this translation helpful? Give feedback.
-
CC: @djaeckle |
Beta Was this translation helpful? Give feedback.
-
Hi @mluis1,
I would like to have some understanding on how the current duty cycle algorithm came about. Because commit ae6f260 does not really say a lot about that.
You've set the duty cycle observation period to 1800 seconds (or half an hour). IIUC, you can have never more than 18s of consecutive time-on-air as a consequence of this. If that period is exceeded the algorithm switches back to the "constant" duty cycle management as mentioned in #520. So if you built up enough credits you can be bursty for 18 seconds, but not consecutively in the same hour. Every half hour, that works.
Now if you would hypothetically set the DUTY_CYCLE_TIME_PERIOD to
3600000
, you can be bursty for 36 seconds, but after that you only backoff forcreditCosts - bands[i].TimeCredits
, which would violate ETSI as you already mentioned in your remark. To illustrate this fact, here is an example:Suppose a constant message with TOA = 1483 ms is sent repeatedly and consecutively with
#define DUTY_CYCLE_TIME_PERIOD 3600000
and ignoring the RX delays for illustrative purposes on a band with 1% Duty Cycle. You could transmit this message 24 times back-to-back, which gives a total TOA of 35592 ms (25 transmissions of this message would exceed the duty cycle of 36 seconds). The time that has passed since the first transmission is effectively the same as the TOA. But now the duty cycle restrictions jump into action with 74909 ms of credits left. This would yield a NextTxDelay of148300 - 74909 = 73391 ms
. After that delay, transmission is allowed again so that adds another TOA of 1483 ms. But now the total elapsed time since the first transmitted message is1483 + 73391 + 35592 = 110466 ms
. This yields a duty cycle of(35592 + 1483) / 110466 * 100 = 33.56%
.So despite reading that remark I still really wonder why you chose this current algorithm and how you came up with it? Why not just wait for the window to have moved beyond 3600 - 35.592 + 1.483 seconds (as applied to the example above) to reopen the opportunity to transmit uplink messages?
Thanks in advance,
Best regards,
Jelle
Beta Was this translation helpful? Give feedback.
All reactions