A rotary permanent magnet magnetic refrigerator based on AMR cycle