# Development and Assist-As-Needed Control of an End-Effector Upper Limb Rehabilitation Robot
## 3 Assist-As-Needed Control of the EULRR
### Assist-As-Needed Control Based on Cartesian Impedance Control  
For the rehabilitation training in the middle and later stages of rehabilitation of patients with motor dysfunction of the upper limb, they usually have recovered part of active motor ability and consciousness. However, the main muscle groups of the upper limb cannot fully support the upper limbs to complete the rehabilitation training task; that is, the patients have the consciousness of active movement but cannot complete the training task alone, which, to a large extent, hinders the recovery of upper limbs' motor function. Therefore, rehabilitation robots are required to assist the patient to complete the training task when the patient cannot complete the rehabilitation training task. Generally, the velocity of the patient's arm during the rehabilitation training is relatively slow, and the study has shown that slow training has a better effect on upper limb motor function than fast training [38]. Therefore, the patient's movement position is more important than the movement velocity in rehabilitation training. The relationship between the assistance force and the end deviation of the robot according to Equation (9) is:  
\[K(x_{cur}-x_{dos})=F_{assist} \tag{11}\]  
An impedance-based control strategy based on Equation (11) is developed in [25; 26]; however, the spatial freedom of the patient's arm during the rehabilitation training is limited. To solve the limited spatial freedom problem, a virtual channel is added around the predetermined rehabilitation trajectory, that is, the spatial free range of motion. The main goal is to assist the patient connected to the end-effector of the robot when he/she is not able to accomplish the task. The fundamental idea is to make the robot fully compliant when the patient is moving along the planned trajectory inside the virtual channel or, alternatively, stiffer when the patient is moving out of the virtual channel. The schematic diagram of the virtual channel is, as shown in Figure 4.  
The green area in Figure 4 is the virtual channel, the red curve is the predetermined training trajectory \(R\), and the purple curve is the actual trajectory of the end of the patient's arm. Since the robot and the patient's hand are connected through the handle, the actual trajectory of the patient's hand could be calculated through the joint position sensor of the robot combined with the robot kinematics  
Figure 4: Schematic diagram of the spatial virtual channel. equation. Assume that \(P_{act}(x_{a},y_{a},z_{a})\) is the actual position of the robot end-effector, \(P_{ref}(x_{d},y_{d},z_{d})\) is the expected reference position of the patient during rehabilitation training, and \(P_{NN}(x_{N},y_{N},z_{N})\) is the nearest point on the training trajectory that is at a distance from the patient's current position. For a predetermined trajectory \(R\) in the Cartesian space, assume that the \(P_{S}\) and \(P_{E}\) are the start and end positions of the trajectory, and a cylinder with an adjustable radius \(R_{W}\) is added around the trajectory, see Figure 5. Since the reference position \(P_{ref}\) determines the magnitude and direction of the robot's assistance force, and the end-effector position of the robot and the patient is varying with time, therefore, a search algorithm is needed to define the reference position during the training in real-time. Therefore, an AAN control strategy based on the orthogonal deviation is proposed to calculate the reference position in real-time according to the deviation distance of the patient's motion position in this paper, as shown in Figure 5. Then, a cylinder region of width \(R_{W}\) is defined around the virtual channel, and the space region around the trajectory \(R\) is divided into three regions.