Theoretical analysis of the phase modulation and demodulation principles of the lock-in amplifier was put forward. The characteristics of the resonant cavity and the phase modulation and demodulation simulations were analyzed by using multi-beam interference. The phase modulation and demodulation system of the micro optical cavity was designed. The test results verify the feasibility of the modulation and demodulation system. And the low-frequency modulation and demodulation signal and the sideband signal of the optical resonant cavity were obtained.