Fault Diagnosis For Functional Safety In Electrified And Automated Vehicles