Diagnostics and analysis of electrical signals