I'm having some trouble using a Vesc-based ESC (Flipsky mini FSESC 4.20) on a system that works at variable loads. In short, the motor expands and retracts a piston which faces a pressurized environment. I power the ESC with a PSU, and control the motor speed using the duty cycle of a PWM signal. There is no issue in the expanding phase, but when retracting the piston, the pressure pushes it back and the ESC does not achieve speed control properly. After a short time, the PSU raises a security alarm, which I see either as back-EMF flowing back to the PSU or overvoltage. I've been tuning a few parameters in order to avoid that from happening but I didn't quite succeed (max battery voltage, current regen parameter, acceleration and deceleration ramps...).
Has anybody ever had the same kind of issue ? How did you deal with it ?
I'm aware that using a rechargeable battery to power the ESC would probably solve the issue (not sure though ?) but I'd like to be able to test it first with a PSU if there's a way.
Thank you !