A synchronous machine with permanent magnets starts braking from nominal speed by feeding a diode bridge, which in turn feeds a braking resistor. Since induced voltage is reduced proportional to falling speed, the braking resistance is set proportional to speed to achieve constant current and torque.
Default machine parameters are used. The RonDiode and GoffDiode parameters of the diode bridge are both increased to 1e-4 to avoid numerical issues when the variable resistor voltage gets close to zero.