Domain wall dynamics and relaxation through the frequency dependence of hysteresis loops