Fault diagnosis and fault-tolerant control allocation for a class of nonlinear systems with redundant inputs