A Transfer Function Approach for a Generalized Electrochemical Impedance Spectroscopy