State-periodic adaptive compensation of cogging and Coulomb friction in permanent-magnet linear motors