When the transmitters work,there would exit an initial phase difference between different carrier waves,which causes serious influence on calculating the pattern of an antenna array. A method of measuring phase difference based on Hilbert transform was proposed,and an effective method of phase compensation was also introduced. The phase difference of the transmitter’s output signals was obtained by Hilbert transform,and then was taken as a parameter of the compensation algorithm to compensate the phase difference. The simulation results show that the influence caused by initial phase difference can be reduced by adopting this method.