Foundations of Automation: Exploring Principles and Applications in Electrical Systems