## 4 Validation Experiments and Results  
This section mainly provides experiments under four different conditions to illustrate the correctness of the controller proposed in this paper for passive, assistant, active, and resistant robot-aided rehabilitation training for patients with an upper extremity motor dysfunction. There are five parameters of the proposed controller that need to be adjusted during the testing. The experiments were conducted on the end-effector rehabilitation robot designed in Section 2. The purpose of the experiments was to verify the function of the controller proposed in this paper. The experiments were not clinical experiments or patient-based experiments but merely healthy volunteer-based experiments to demonstrate the functionality and usability of the proposed AAN controller with different parameters. The participant was a healthy elderly female aged 65, 165 cm in height, and 55 kg in weight, and we assumed that the subject's right arm was the affected side. The manipulator on the opposite side was moved to a safe position that was defined in advance, so as not to affect the testing. The subject was required to complete a rehabilitation training task on a circle trajectory under different controller parameters with relatively slow velocity. A visual scene developed based on the Unity technology was provided for the subject, which was displayed on a screen in front of the subject. A screenshot of the visual scene is shown in Figure 9, and two flat plane views are adopted to represent the three-dimensional trajectory and the FTR. The yellow curve in Figure 9 is the training trajectory, the gray curve is the inner and outer boundaries of the FTR with adjustable radius, and the white ball is for the actual position of the patient's arm. Besides, the red arrow is the indication of the assistance force provided by the robot, and the longer the arrow is, the greater the assistance force provided by the robot. Since we paid more attention to the position of subject's hand, the pose of the robot's handle was fixed during the testing, as shown in Figure 10.  
Figure 10: The subject testing and the detail structure of the rehabilitation robot. (**a**) The experimental testing with the subject and (**b**) the internal structure of the rehabilitation robot prototype. Figure 9: The screenshot of the Unity scene for the testing. The internal structure of the rehabilitation robot prototype that was used for experimental testing is shown in Figure 10b. The controller cabinets of two manipulators were connected to a router and then connected to the control computer. Manipulators were installed on two perpendicular planes, as seen in Figure 10b. The commercial manipulator can conduct real-time external torque control through the robot software package FRI [44] with the following control law:  
\[\tau_{Cmd}=k_{j}(q_{FRI}-q_{mes})+D(d_{j})+\tau_{FRI}+f_{dynamics}(q,\dot{q}, \ddot{q}) \tag{23}\]  
where \(k_{j}\) is the joint stiffness matrix of manipulator; \(d_{j}\) is the damping term, and \(f_{dynamics}(q,\dot{q},\ddot{q})\) is the dynamic term of the manipulator. Besides, \(\tau_{FRI}\) is the expected torque, which is the assistance force calculated by Equation (22). The data of robot were received and sent by TCP/IP (Transmission Control Protocol / Internet Protocol) during the experiments, and the joint position of the robot was measured by a position sensor at each joint of the manipulator. The interaction force between the robot and the patient's hand can be calculated by the torque measured through the torque sensor at each joint:  
\[F_{int}=\left(J^{T}(q)\right)^{\#}\cdot\tau_{int}=J^{T}(q)\cdot\left(J^{T}(q) \cdot J(q)\right)^{-1}\cdot\tau_{int} \tag{24}\]  
where \(J^{\#}(q)\) is the Jacobian pseudo-inverse matrix and \(J^{\#}(q)=J^{T}(q)\cdot\left(J(q)\cdot J^{T}(q)\right)^{-1}\). The joint position and joint torque were dealt with by using a Gaussian lowpass filter to reduce the influence of noise.