Electrochemical study of phase transition processes in lithium batteries