The ability of detecting harmonic and reactive current in real time and accurately decide the compensation performance of distribution static synchronous compensator(D-STATCOM). Considering ip-iq method can"t accurately detect the compensation command current under distorting and unbalanced voltage,an improved ip-iq detection method without phase-locked loop which is suitable for non-ideal voltage is proposed. The method can eliminate the detection errors that phase-locked loop caused by using sine and cosine extraction module to calculate sine and cosine information of fundamental positive sequence voltage, using mean filter and sampling optimization to reduce filter delay and the amount of calculation in the detection , and improving the detection accuracy and speed of response. Finally results obtained by simulations system built in Matlab /SIMULINK and experiments on a 20kVA D-STATCOM experimental prototype indicate the effectiveness and feasibility of this method.