-
Notifications
You must be signed in to change notification settings - Fork 131
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
Control motor current instead of battery current #113
Comments
Well, motor current is left constant while someone want to start play with it. Maybe you can be the developer to try improve the behavior, make tests and then propose your change. |
Please have a look at this commit, did not compile it but i hope you understand the idea (as said before i do not have the motor yet so can't test myself) Edit: fixed the fmapf issue as well |
Currently, this is not a priority for me. I will back to this later. Thank you. |
Trying to look through your code, and I have one request: Some examples of things that (in my opinion) should've been cleaned up:
Apart from this, I haven't had the time to look in-depth at your proposal, but will try to later. |
Let's see if this goes to future V0.21.0. |
Wouldn't it be better to have control about the motor current instead of the battery current. Because then you have direct control about the torque the motor generates. I see that the max motor current is set to 30 so it could be a smooth transition to watts or battery current once the max speed of the motor is reached.
Sadly i don't have the motor yet but when i see the code it seems that the feeling later on will be very powerful and a bit jerky at low speeds and less powerful at higher speeds. Even if you apply the same torque all the time.
I know i sound stupid because i did not ride the motor yet but i come from electric longboards where i optimized the firmware for hundreds of hours.
There i introduced the watt control mode which provides exactly the described behavior. It starts with motor current control and then when the motor is close to it's maximum speed it switches smoothly over to watt control.
Guess that could all be implemented in the ebike_app.apply_torque_assist() function.
By that the reaction could be a lot smoother and that saves energy, generates less heat and less wear. Only downside is that it feels less powerful because the motor doesn't react like a terrier at low speeds but it applies additional torque (not power) linear to your torque input.
Edit: looks that apply_power_assist() for POWER_ASSIST_MODE is a multiplied of the human watts and could work a bit like my described behavior.
Could somebody please tell how the the 2 modes feel like compared to each other in real life?
The text was updated successfully, but these errors were encountered: