State-dependent friction force compensation using periodic adaptive learning control