Fault-tolerant dynamic control allocation for permanent magnet synchronous motors