Influence of external magnetic field on permanent magnet by EDM