Generator is a mechanical device that converts mechanical energy into electrical energy, which is driven by a hydraulic turbine, steam turbine, diesel engine or other power machinery to convert the energy generated by water flow, air flow, fuel combustion or atomic fission into mechanical energy to be transmitted to the generator, which is then converted into electrical energy.