Modeling and Simulation of 2-Dimensional Encoder System