## 1 Introduction
The controller can adjust the assistance force according to the patient's functional ability to realize the assistance training of the patient's arm. In addition, the controller can also satisfy the training requirements of different rehabilitation stages by regulating these adjustable parameters of the controller. For example, active training and resistant training in the later stage of rehabilitation therapy, passive training in the early stage of rehabilitation, and assistance training in the middle stage of rehabilitation where patients have partial upper limb motor control ability. Compared with previous research, the main contributions in this study are summarized as follows:  
Figure 1: The diagram scheme of the impedance control; the black curve is the desired trajectory, while the blue curve is the actual trajectory. Compared with window-type controllers, the impedance-based AAN controller proposed in this work enables a patient's arm to have complete motion freedom within the FTR by building a virtual tunnel around the rehabilitation trajectory and has been implemented on an end-effector rehabilitation robot that can perform rehabilitation training on a three-dimension (3D) trajectory. When the patient's arm deviates from the FTR, the robot will apply a time-varying assistance force according to the patient's functional ability during the rehabilitation training. Meanwhile, when the patient's arm is stagnant or moving too slowly in the FTR, the controller will generate a moving wall to push patient's arm to complete the training task to avoid slacking. 2. The AAN controllers in existing studies, whether band-based or windows-based controllers, would construct a fixed stiffness wall to assist the patient's arm when their functional ability is getting worse. In the impedance-based AAN controller proposed in this paper, a spatial stiffness field contains a series of columnar stiffness walls will be constructed during the rehabilitation training to assist the patient's arm, and the stiffness of the wall will increase with the deterioration of the patient's upper limb functional ability. This is not found in the current research. 3. Few of the existing studies on AAN control strategies have the ability to cover the entire upper limb rehabilitation stages, such as passive, assistant, active, and resistant training. So far, although it is feasible to switch different controllers on one rehabilitation robot to satisfy the training requirements of different rehabilitation stages [36], it is relatively rare to use a single controller to provide training requirements for the entire rehabilitation stage. The impedance-based AAN controller proposed in this paper could provide training requirements for the entire rehabilitation stage by adjusting the controller parameters, which can greatly simplify the development difficulty of the software and rehabilitation training system. The remaining sections in this work are organized as follows: we first describe the design, kinematics, and dynamics model of the end-effector rehabilitation robot in Section 2; Section 3 presents the development of the impedance-based AAN controller and the parameters adjustment for different rehabilitation training mode of the controller; the validation experiment and results of different AAN controller parameters showing the correctness of the controller in different rehabilitation modes are presented in Section 4; discussions and conclusions of our research are presented in Section 5.