Control of surge in centrifugal compressors by active magnetic bearings: Theory and implementation