Estimation of AC copper loss in electrical machine windings with consideration of end effects