A generator generates electricity. It is a mechanical device that converts the calorific value of diesel into electrical energy using rotating devices. An inverter only stores and reconverts energy. When DC power is converted into AC electricity, the result is an unvarying electrical signal.