A new harmonics analysis algorithm for electric power system