Types of substations and their functions