Analysis of electrical circuits