For improving the speed, accuracy and anti-noise performance of harmonics and inter-harmonics analysis, a piecewise iterative neural network is proposed in this paper. Firstly, the Hanning-windowed interpolation FFT analysis algorithm is used to obtain initial weight and activation function values of ANNs (Artificial Neural Networks). Then, the network takes piecewise iterative algorithm as a training algorithm derived number. Different from one point iteration algorithm and all points iteration algorithm, the algorithm divide sampled data according to the sampling time, and adjust the variable parameters of the network with the error function of each section. The iterative algorithm both the average error within each period, reducing the impact of noise on the network training, and better reflect the local characteristics within each period of the signal, improving the accuracy of the network training. In addition, according to the relationship between the parameter estimation errors and the first partial derivative of error function with respect to its activation functions, special handling the maximum amplitude component is proposed which is effectively improving the network"s training speed and accuracy. Simulation results verify the analysis conclusions.