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

Avoid PWM saturation on high speeds. #38

Open
cua-cua opened this issue Apr 29, 2019 · 3 comments
Open

Avoid PWM saturation on high speeds. #38

cua-cua opened this issue Apr 29, 2019 · 3 comments
Labels
bug Something isn't working feature
Milestone

Comments

@cua-cua
Copy link
Member

cua-cua commented Apr 29, 2019

Control the maximum speed and accelerations automatically ignoring lineal speed errors
so if we are below the theorical speed but the PWM is saturated (100%), stop trying. The control is applied on this zone braking one motor.
Review code and change distance calculations based on ideal speed to encoders sum.

@cua-cua cua-cua added bug Something isn't working feature labels Apr 29, 2019
@cua-cua cua-cua added this to the OSHWDem 2019 milestone Apr 29, 2019
@Peque
Copy link
Member

Peque commented Apr 29, 2019

Yeah, I think applying double correction on the angular speed (by breaking with double force instead of breaking with one wheel and accelerating with another) may be enough.

We'll see! 😄

@Peque
Copy link
Member

Peque commented Nov 19, 2019

So, ideally, we should implement a system that takes into account the "available margin" (in volts) for acceleration. Which means, accelerating more slowly as we reach higher speeds. This requires knowledge of feedforward parameters.

Anyway, I think avoiding PWM saturation is a good idea. If that happens, we should better reduce linear speed (i.e.: apply double angular correction on one wheel or some other way).

Not following the linear speed profile may not be that bad, as long as we make sure to track the position based on the estimation (encoders) and not the profiler.

Again, this should be applicable only for the extreme/unlikely case where PWM is saturated. We should probably just avoid that situation. Stepping-up may be good enough to always have a good margin.

@Peque
Copy link
Member

Peque commented Nov 19, 2019

Note: we were hit by this bug at OSHWDem 2019, where during a diagonal at high speed, the PWM got saturated and the robot just crashed into the wall without trying to turn once the straight line was finished. So, even if we decide to "abort" in case of PWM saturation, we should review that abortion process to make sure the robot breaks instead of bumping into walls at the highest speed...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working feature
Projects
None yet
Development

No branches or pull requests

2 participants