Dynamic measurement and control of electrochemical interfaces for energy storage and conversion