Its in the title. I'm just curious and it turns out that either this is such a stupid question that no one has bothered to answer it, or i'm just not good at googling today. I guess I'm thinking specifically about the PMSM in my car, but any answer however general would interest me.
The efficiency of a DC machine will be similar whether working as a motor or as a generator.
Why not identical?
Another way of expressing efficiency is the power loss of the machine. The main power losses are ...
a) \$I^2 R\$ losses in the copper windings
b) Wind resistance between rotor and stator, and friction in the bearings
c) There will be a bunch of other losses, eddy currents, noise, vibration
When running as a motor, the (a) losses will increase the input terminal voltage, and (b) will reduce the output torque. When running as a generator, (b) increases the torque needed, and (a) reduces the output voltage.
The machine is never running under exactly the same conditions, the mechanical power and electrical power are never equal (the input always exceeds the output). So if you want to define efficiency at a particular power point, or speed, or torque, they will always be slightly different for motoring or generating. But similar.
The generating efficiency should be the same as motoring efficiency under the same operating conditions. It may be a little difficult to determine that the operating conditions are the same.
When operating as a generator, some of the mechanical driving power goes directly to supply the mechanical losses of the generator. When the machine as acting as a motor, some of the electrical input power is converted to mechanical power that is used to supply the motor's mechanical losses. Thus the losses are compounded in that there are losses associated with converting electrical energy to supply mechanical losses. That additional electrical power increases the operating temperature slightly requiring the motor load to be reduced slightly to make the operating conditions the same.
With a permanent magnet machine, there is no excitation system. If the machine has an electrical excitation system, there is another compound loss situation due to the machine needing to generate it's own excitation power when acting as a generator.