A method is provided for controlling braking in a vehicle having a motor
and a brake. The method includes sensing an actual operating parameter of
the motor and receiving a desired operating parameter of the motor. The
motor is controlled based on the actual operating parameter and the
desired operating parameter of the motor. The brake is controlled based
on the actual operating parameter and the desired operating parameter of
the motor and an output from the motor control.