A motor–generator (an M–G set) is a device for converting electrical power to another form. Motor–generator sets are used to convert frequency, voltage, or phase of power.