An automatic algorithm for equivalent circuit extraction from noisy frequency responses