Lithium-ion battery impedance detection method