Optical Encoder Working Principle