Dynamic electric resistor braking