Abstract
A system for determining an orientation of a device is provided that includes a diffraction grating arranged on a surface of the device. By impinging a collimated light beam onto the diffraction grating an m-th order light beam and an n-th order light beam are generated. By monitoring the positions on sensor surface at which these light beams are detected, orientation information concerning an orientation of the device can be determined.