Generator and plug brake operations of asynchronous machines