Foundations of electrical engineering