Construction and working of alternator