Giter VIP home page Giter VIP logo

Comments (7)

mathiasvr avatar mathiasvr commented on June 27, 2024

Hi there, thanks for the detailed info and plots!

There's some approximation happening when scaling from DShot throttle value to PWM duty cycle, as well as converting commutation period to e-period (to RPM). DShot throttle scaling has been improved compared to BLHeli_S, but I'm not sure if this is the problem. The ERPM-TEST release should make RPM telemetry as precise as possible for the protocol, but I haven't been able to see any significant improvement from this.

Was this test made at 24kHz PWM frequency? It would be interesting if you could compare it to 48kHz to see if this affects the output.

I also made these test files a while ago that uses the original BLHeli_S scaling, if you want to compare: v0.14_bls_throttle.zip

I can also try to compile a version that scales DShot throttle to PWM without approximation (at the cost of underestimating and not being able to reach 100% duty cycle) to see if this would remove the non-linearity of the RPM output.

from bluejay.

mathiasvr avatar mathiasvr commented on June 27, 2024

Here is the version without approximate scaling, so a DShot throttle value of 0-2000 will correspond to around 0-97% PWM duty cycle:

v0.14_linear_pwm.zip

It would be interesting to see if this affects the linearity of the RPM output.

from bluejay.

ctzsnooze avatar ctzsnooze commented on June 27, 2024

Hi Mathias - thanks for getting back to me!
Here is an image with Bluejay 0.14 in 48k mode. I hacked the log viewer so I can see the whole ramp:

Screen Shot 2021-11-27 at 16 01 08

In the same format, this is the previous 24k log:
Screen Shot 2021-11-27 at 16 02 55

from bluejay.

ctzsnooze avatar ctzsnooze commented on June 27, 2024

We couldn't say that the linear PWM at 24khz is much of an improvement, but it perhaps suggests that the reason for the steps at the top come from something else in the code.

Screen Shot 2021-11-27 at 16 09 38

from bluejay.

ctzsnooze avatar ctzsnooze commented on June 27, 2024

@mathiasvr Happy to test whatever you come up with.

from bluejay.

mathiasvr avatar mathiasvr commented on June 27, 2024

@ctzsnooze Do you still have these logs by any chance? ๐Ÿ˜…

from bluejay.

ctzsnooze avatar ctzsnooze commented on June 27, 2024

I repeated the tests with 0.16.
Same abrupt, non-linear steps in RPM at high throttle. Left is 24kHz, right 48kHz.
Easy to make the logs. Get 4.3 RC or nightly, latest blackbox logger.
Put a fake prop on the motor (I made some out of TPU, about 1"diameter, little flat blades), or no prop.
Set all PIDs off, antigravity off, DShot telemetry on, dynamic idle off, idle % 0.1, and in CLI set blackbox_mode = MOTOR_TEST, debug mode to RPM_TELEMETRY.
Then just go to motors tab, enable motors, hold the up arrow on one motor, and watch the values increase slowly. RPM will increase steadily and be logged. The graphs above are easily made. The latest log viewer shows RPM correctly and allows zoom of 4% to show the whole ramp up.
Screen Shot 2022-02-21 at 15 16 49
.

from bluejay.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.