In this paper, we propose a new method for improving the accuracy of localizing a robot to find the position of a robot in indoor environment. The proposed method uses visible light for indoor localization with a reference receiver to estimate optical power of individual LED in order to reduce localization errors which are caused by aging of LED components and different optical power for each individual LED, etc. We evaluate the performance of the proposed method by comparing it with the performance of traditional model. In several simulations, probability density functions and cumulative distribution functions of localization errors are also obtained. Results indicate that the proposed method is able to reduce localization errors from 7.3 cm to 1.6 cm with a precision of 95%.