Interface analysis for solid state electrochemical devices and chemical sensors