Fault diagnosis in photovoltaic arrays