A diesel generator is the set of diesel engine and
alternator. Disel engine is prime mover which rotates the
alternator and alternator generates the electricity.
Further diesel engine works on principle of carnot cycle,
air is compressed in a cylender, then it is compressed up
to high pressure, disel is injected to this compressed air
thus cumbustion takes place,this energy force to move the
piston in the cylendrical passage, piston is further
connected to crank shaft. on the other hand generator
wotrks on principle of electo magnetic induction, when a
DC excited rotor is rotated then at synchonous speed EMF
induced in static armature.