The criterion of stability is studied based on the discrete dynamic model of hardware-in-the-loop simulation system. The condition for the system having no steady state direct current error is derived on a simple first-order circuit system, and an interface algorithm is designed. The proposed algorithm can make the result of the hardware-in-the-loop simulation consistent with the actual result. The influence of simulation step and interface delay on the phase shift of the result is studied. The approximate analytical expression of the phase shift is derived. It is concluded that the phase shift is minimum when the step is two times of the interface delay. The performances of different interface algorithms and different integration algorithms are compared and the conclusions of theoretical analysis are verified by simulation.