shm/swing-up and shm/swing-down with test cases