The effect of irregularities of a periodic domain structure on the efficiency of the second harmonic generation has been numerically investigated in the case where the structure is formed by the high-voltage method. The irregularities associated with the uncontrollable motion of domain walls from under electrodes, as well as with the presence of internal defects in the crystal, have been analyzed.