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