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

Mathematical solution to the Fortius low-speed-high-power limitation #88

Closed
mattipee opened this issue May 18, 2020 · 2 comments
Closed

Comments

@mattipee
Copy link
Contributor

The Fortius does not appear to handle high-power at low wheel speeds.

The symptom is that if you send a large target resistance to the Fortius, it result in motor-stuttering when the wheel speed is low.

There are a couple of consequence to this:

  • in grade mode, simulating steep gradients using a straightforward combination of Grade2Power() plus Power2Resistance() can result in too high a target resistance value at low speed
  • in power mode, setting a high power target and setting off from zero results in too high a target resistance value at low speed

Wouter has an approach to limit resistance at low speeds according to a formula which implements a sliding scale between resistance values of 1500 and 6000 for wheel speeds between 0 and 15khm.

 if self.SpeedKmh <= 15 and Resistance >= 6000:
            Resistance = int(max(1500, self.SpeedKmh / 15 * 6000))

image

There's also a slightly different approach to avoiding wheel stuttering for grade mode whereby we implement virtual gearing, to make virtual speed (and therefore targetpower and resistance) disconnected from actual wheel speed - "make the wheel spin faster and pretend it's actually running more slowly". However, it requires manual headunit button pushes and can still make the motor stutter, without the additional <15kmh trick above, or something like it.

I'm trying to work out how one might combine the two with one mathematical solution.

Previous attempts at thinking this through have taken place on the following issues:

Raising this as a separate issue because my thinking and posting on this subject on other threads are somewhat long and unhelpful. Apologies.

@WouterJD
Copy link
Owner

Practical test done today:
R=6000 WheelSpeed=10km/hr ==> motor brake stutters
R=4500 WheelSpeed=10km/hr ==> motor brake runs smoothly
I have set the cutoff point down to 10km/hr and R=1500 + SpeedKmh * 300.

Conclusion: real-life test to do highpower/lowspeed, like MTB-ride against a 20% slope cannot be done with ANT Fortius.

Alternative suggestions welcome.

@WouterJD
Copy link
Owner

PS. The red line has it's own challenges since if you get below the calibration value the engine will start to spin instead of brake, something you do not expect probable.

Version 3.0 is released with CoD as described.
Of course of there are any issues, let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants