An electric generator is an electrical machine which converts mechanical energy into electrical energy. A generator works on the principle of electromagnetic induction. It states that whenever a conductor moves in a magnetic field, an emf gets induced within the conductor. This phenomenon is called as generator action.