Fault Diagnosis And Hardware In The Loop Simulation For The Ecocar Project