types of solenoid working principle and its applications