Regenerative Braking

@runger

Question: Does SimpleFOC currenyl support “coasting” that is, let’s say, the motor spins at 10rps, then we slowly decrease torque until we “disconnect” the voltage however we keep following the sensor and then we “connect” back the voltage and slowly increase the torque but with the faster, say 15rps because downhill we accelerated due to gravity. Example would be climbing a hill, cresting, going downhill, then slowly increase the torque when we hit the flat.

My thinking is, when we get to “coasting” and go downhill, we can disconnect the power supply and redirect to a charging circuit, and then when we hit the throttle, we disconnect the charging circuit and connect back the voltage then the driver goes into “driving” mode.

That would be the simplest and easiest to implement “dumb” regen. The SimpleFOC will keep following the sensor to be able to go back into driving mode with the whatever rps is at that point. The switching to regen will be controlled by a switch, so when the user hits the brake, since SimpleFOC is in “disconnect” mode, wouldn’t even know the power supply is not connected anymore, and we can do whatever we want during disconnect as long as the algorithm keeps track of the sensor to jump back in.

Any input on this?

Cheers,
Valentine