The photorefractive crystals are electro-optic materials and photoconductors, have the property that the refractive index changes locally when is illuminated by a no uniform spatial light distribution. The non-uniformity is produced by the interference of two coherent beams, one known as signal beam and the other one as reference beam. The intensity pattern produces inside the sample a local redistribution of the electric field inducing a change in the refraction index by a linear electro-optic effect known as index grating, all the incidents beams on the grating are diffracted. The purpose of this study is evaluate the use of a digital controller for the improving of the system stability. It is then shown the dynamic simulation of the experimental scheme for the self-stabilized system using a PI controller tuned as an internal model controller IMC.