-
Notifications
You must be signed in to change notification settings - Fork 63
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
Bandwidth estimator improvements #226
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Jan 25, 2024
When the controller decides to increase the rate, it should not decrease, even if the measured transmission rate was low. The rate could be lower because there was not enough data to send.
Variance calculation for exponentialMovingAverage was incorrect
Reset exponentialMovingAverage if last decrease was 1 minute ago or If R_hat(i) increases above three standard deviations of the average max bitrate
Standard says we need to use either 3*sqrt(var_v_hat) or z(i)
[1] https://c3lab.poliba.it/images/6/65/Gcc-analysis.pdf [2] https://datatracker.ietf.org/doc/html/draft-ietf-rmcat-gcc-02 Now alpha is almost 1, since (1−0,001)^(30÷(1000×5×1000000)) == 1 And this makes var_v_hat(i) always have initial value and k.gain to be a constant after convergence and hence current version of Kalman filter works as exponential moving average with A ~= 0.3. To make it more Kalman we need to calculate var_v_hat(i) corretly. Maybe we need to calculate alpha in different way, but not just set it to 1 for sure. See [1] and [2](section 5.3. Arrival-time filter) for more details
I was not able to find a reason why current implementation multiplied output from Kalman filter to up to 60.
Standard states fmax should highest bitrate among K packets. I set K to 10 and use interarrival delta from slope filter as T(i)-T(i-1)
This these params Kalmain gain recovered from bandwidth decreases faster that with lower chi. Set Kcount to track longer frames queue to calculate fmax
Golint and test cases fixed according to new filter values
Fixed tests and golint checks |
@mengelbart, @Sean-Der tests are fixed. Could you please re-run tests to start review ? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
calculate fmax for Kalman filter as stated in standard.
Kalman filter stats returning sensitive estimate and we don't need to multiply it with 60.
Kalman gain should not fall lower than minimal value or filter become very insensitive to z(i).
Set Kalman chi to chi to make it more sensitive to input and react faster.
Fix exponentialMovingAverage variance calculation for rate controller.
Reset latestDecreaseRate for rate controller as standard states.
Reset latestDecreaseRate if last decrease was more than a minute ago. In this case latestDecreaseRate in inaccurate in anyway.
Merge #221 to prevent bandwidth decrease in increase state in last decrease was recently.
Removed not used 'type estimatorFunc'
There are not fixed tests exists. If my work appreciated and tend to be accepted I will fix all tests as well. I need to know whether anybody want to review these changes.
Right now I was able to fix everything I was able to find.
@mengelbart, @Sean-Der please take a look or point me to somebody I can review this work.
I spend several weeks trying to understand and fix this BWE. I'm not sure I understand everything but enough to pay attention to this effort. Please let me know if gcc in Pion is important, supported component
Reference issue
Fixes #...