Investigation of 2DOF PID Controller for Physio-Therapeutic Application for Elbow Rehabilitation

The aim of this work is to evaluate the output of a two-degree of freedom (DOF) proportional integral derivative (PID) controller for controlling elbow flexion and extension on an upper limb rehabilitation robot of an existing model. Since the usage of upper limb rehabilitation is increasing dramatically because of human impairment, 2DOF has been proposed in this work as a suitable controller. The 2DOF PID controller offers set-point-weight features and, hence, is fast in removing disturbance from the system and ensuring system stability. Importantly, as the system parameters are unknown in this work, the black-box model approach has been taken into consideration, using the MATLAB System identification toolbox to estimate a model. The best-fitted estimated model is then coupled with the proposed controller in the MATLAB/Simulink environment that, upon successful simulation works, leads, finally, to the hardware implementation. Three different amplitudes of sinusoidal current signals, such as 0.3 amps, 0.2 amps, and 0.1 amps, are applied for hardware measurements. Considering patients’ physical conditions. In this work, the 2DOF controller offers a fast transient response, settling time, negligible tracking error and 0% overshoot and undershoot.


Introduction
Research on exoskeleton robots is emerging as significant, as these systems offer versatile human-robot interaction applications. Primarily intended to perform demanding jobs that require an extensive amount of energy for an individual, exoskeleton robots were designed to assist individuals in performing such jobs. Simplistically, this system can be represented in a mechanical form that is externally combined with the human body in order to extensively enhance the wearer's muscle power [1]. The feature of exoskeleton robots prompts their use in four different types of applications [2]: medical [3][4][5], military [6,7], industrial [8][9][10] and consumer [11,12] applications.
Interestingly, exoskeleton robots can be categorized based on the muscle supporting body-part into four types [13], as lower limb (incorporates hips, thigh, knee, and ankle muscles) [14][15][16], upper limb (includes shoulder and elbow muscles) [17][18][19][20], upper and lower integrated [21,22], and any specific body organ supportive part (i.e., finger muscles) [23,24]. As the upper limb system includes both elbow and shoulder movement, some of the literature shows interest in only the elbow and shoulder exoskeleton separately. In contrast, some other studies focus on both exoskeletons together. Meanwhile, in order to control the exoskeletons, a suitable controller is an inevitable component of the system which ensures a fast and perfect response for the wearer.
The literatures exhibit several types of controllers, such as linear, nonlinear, learning based controllers, motion based bilateral rehabilitation and EMG signal-based models [25][26][27]. M H Rahman et al. introduces a physio-therapeutic robot, ETS-MARSE, in order to overcome the impairment of the upper extremity that a nonlinear controller controls, such as the sliding mode control [28]. Wen Yu et al. consider a linear, model-free PID-based impedance controller intended to operate another exoskeleton robot, EXO-UL7, where the parameters are chosen based on human impedance properties [29]. Hang Su et al. propose a learning-based controller, electromyogram (EMG) based neural network control approach to control, with high accuracy in the motion of the upper limb exoskeleton in response to the wearer's motion intention [30]. Kim et al. [31] present an analysis of machine learningbased assessments for elbow spasticity. Nguyen et al. [32] investigate an adaptive fast terminal sliding mode controller for an exercise-assisted robotic arm intended to assist in elbow joint rehabilitation. Additionally, in previous research, it has been established that higher control levels, such as learning motion primitives (behaviors) and optimizing them, may need to be achieved in order to acquire human-like movements in mechanical limbs operated by patients [33,34].
While there are many advanced methods available, are some limitations of the PID controller remain, such as a long settling time, steady state error, amplifying high frequency noise and narrower range of stability. Keeping this in mind, the 2DOF PID controller is investigated in this study in order to examine the performance of the system for its flexion and extension movements with the controller.
This work exhibits a 2DOF PID controller to control an upper limb exoskeleton system that can offer physiotherapy to patients who suffer from elbow impairment. This controller is different from regular PID controllers because it introduces a set point weighting into the algorithm. As a result, this controller is able to reject disturbance from the system at a significantly fast rate [35]. This, in particular, is one of the most important objectives of a controller, other than ensuring stability in the exoskeleton during such an application. In addition, this controller is simple to design, easy to implement, and fast in ensuring the stability of a system. In contrast, nonlinear controllers are sophisticated in design but are sometimes difficult to apply in hardware. Hence, PID controllers are used in more than 90% of industrial applications nowadays [36].
This study is the continuation of earlier research, [37] which investigated a system controlled by a LQG controller. In that work, the black box model approach was taken into consideration in order to generate the system's transfer function. Since this prototype has already been investigated, the 2DOF PID controller is considered here in order to examine the performance of the system in terms of its flexion and extension movements with the controller.
Currently, the majority of research in this field is devoted to neurorehabilitation and neuropsychological rehabilitation. While neurorehabilitation focuses on manipulating the joint and training the patient's central nervous system, orthopedic rehabilitation focuses on the total body's rehabilitation. The posttraumatic elbow joint, for example, is only capable of small-angle flexion/extension movements during the early stages of therapy. These movements must be permitted and, to a limited extent, promoted in order to counteract muscular stiffening.
Patients face difficulties during upper limb arm rehabilitation, including the inability to perform daily activities, such as using phones and tablets, picking up and organizing objects, and so on. The wounded hand's brain is connected to the brain, which provides noteworthy traits, such as speed and precision. For patients undergoing physical therapy, a variety of practical and effective treatments and rehabilitation technologies are used to support the injured hands and to improve therapeutic outcomes. However, the most critical role that a rehabilitation robot can accomplish is to preserve the health of the muscles and joints. As a result, the recommended physiotherapy aims to attain a fully functional hand throughout the recovery process. Our technological contributions are summarized below:

1.
Develop a robotic system for rehabilitation of elbow flexion.

2.
Create a two-degree-of-freedom PID torque controller for the elbow robotic rehabilitation system.

Mechanical Design of Exoskeleton
The prototype, which is primarily developed in order to provide therapy to upper limb impaired patients, has two active joints and offers functionalities of 5-degress of freedom (DOF) as shown in Figure 1. It provides support for both shoulder and elbow movements. Hence, it offers patients therapeutic movements, including abduction and adduction for the shoulder and flexion and extension for the elbow. In this work, in particular, elbow movements, flexion and extension, have been taken into consideration to explain the performance of the 2DOF PID controller.
Appl. Sci. 2021, 11, x FOR PEER REVIEW 3 of 13 support the injured hands and to improve therapeutic outcomes. However, the most critical role that a rehabilitation robot can accomplish is to preserve the health of the muscles and joints. As a result, the recommended physiotherapy aims to attain a fully functional hand throughout the recovery process. Our technological contributions are summarized below: 1. Develop a robotic system for rehabilitation of elbow flexion. 2. Create a two-degree-of-freedom PID torque controller for the elbow robotic rehabilitation system.

Mechanical Design of Exoskeleton
The prototype, which is primarily developed in order to provide therapy to upper limb impaired patients, has two active joints and offers functionalities of 5-degress of freedom (DOF) as shown in Figure 1. It provides support for both shoulder and elbow movements. Hence, it offers patients therapeutic movements, including abduction and adduction for the shoulder and flexion and extension for the elbow. In this work, in particular, elbow movements, flexion and extension, have been taken into consideration to explain the performance of the 2DOF PID controller.

The Revolute Joints
In order to describe the dynamics of the elbow movement of the prototype, the mechanism of the revolute joint should first be explained, as shown in Figure 2. Here, the revolute joint is directly connected with a brushless DC motor through a shaft and, hence, the motor makes a flexion and extension movement. Therefore, controlling the revolute joint using 2DOF PID is the main objective of this work, where revolute joint is considered as the system.

The Revolute Joints
In order to describe the dynamics of the elbow movement of the prototype, the mechanism of the revolute joint should first be explained, as shown in Figure 2. Here, the revolute joint is directly connected with a brushless DC motor through a shaft and, hence, the motor makes a flexion and extension movement. Therefore, controlling the revolute joint using 2DOF PID is the main objective of this work, where revolute joint is considered as the system. Appl. Sci. 2021, 11, x FOR PEER REVIEW 4 of 13 Figure 2. Block diagram of revolute joint of the prototype and its movement range.

Mathematical Model
Since the motor is considered as the system, the mathematical design for the motor should first be considered. In the prototype, the brushless DC motor is internally geared down by a ratio of 20 that is sufficient for rehabilitation tasks, and, hence, no external gear reduction along the link is required. The actuation motor is a back-drivable brushless DC motor (Maxon RE50, 370955, 200 W, 36 V) with a gear ratio of 1:113 inside. This motor is chosen primarily because it reduces system friction, noise, and backlash, while still being compact [35].

System Identification
System identification is a simple and convenient method of representing a linear or nonlinear model. This approach is commonly used in control engineering to design a system where the parameters of a system are unknown and required to be controlled effectively. Both the system's inputs and outputs are considered in this procedure, and their characteristics are estimated using the variances in the inputs and outputs. In this work, a sine-by-sine method with a periodic band limit has been considered to derive the transfer function, as shown in Equation (4). In this process, time and frequency domains have been considered.

Mathematical Model
Since the motor is considered as the system, the mathematical design for the motor should first be considered. In the prototype, the brushless DC motor is internally geared down by a ratio of 20 that is sufficient for rehabilitation tasks, and, hence, no external gear reduction along the link is required. The actuation motor is a back-drivable brushless DC motor (Maxon RE50, 370955, 200 W, 36 V) with a gear ratio of 1:113 inside. This motor is chosen primarily because it reduces system friction, noise, and backlash, while still being compact [35].
The Equation (1) has been used to calculate the transfer function based on previous work on brushless DC motors [39].
This equation can also be represented as follows as presented Equation (2) in many other literature [35].
Substituting for τ e , τ m and K b the open loop transfer function for the BLDC motor system can be written as:

System Identification
System identification is a simple and convenient method of representing a linear or nonlinear model. This approach is commonly used in control engineering to design a system where the parameters of a system are unknown and required to be controlled effectively. Both the system's inputs and outputs are considered in this procedure, and their characteristics are estimated using the variances in the inputs and outputs. In this work, a sine-by-sine method with a periodic band limit has been considered to derive the transfer function, as shown in Equation (4). In this process, time and frequency domains have been considered.
where, I, I 0 and ω f are the motor current, signal amplitude with the range of [−0.4-0.4] and frequency (that is 4π) respectively at sampling time t. Figure 3 depicts some amplitude-varying inputs to the system as well as the system's output. To accomplish the system responses of different sine waves with different ampli-tudes, the MATLAB System Identification Toolbox was considered. In addition, several transfer functions have been computed from these responses in order to find the curve that best fits the system responses as shown in Table 1. sin (4) where, , and are the motor current, signal amplitude with the range of [−0.4-0.4] and frequency (that is 4π) respectively at sampling time . Figure 3 depicts some amplitude-varying inputs to the system as well as the system's output. To accomplish the system responses of different sine waves with different amplitudes, the MATLAB System Identification Toolbox was considered. In addition, several transfer functions have been computed from these responses in order to find the curve that best fits the system responses as shown in Table 1.     28. 19 1.98 10 1482 Now based on the comparison, this table shows that the performance of Model 2 is satisfactory in all four different amplitudes, such as 0.1, 0.2, 0.3 and 0.4 ampere, where its best fittings are 95.47%, 95.33%, 94.56% and 93.86% respective to the amplitudes. Figure 4 demonstrates the prototype's responses and the Model 2 responses in the amplitudes for a period of time, 1 s. However, it is important to highlight that the model is quite different from the motor transfer function, since it has several unknown parameters, includes a controller and is an open loop system. Whenever a controller is considered with a system, it turns into a closed loop system. Hence, the derived system is required to be designed with the proposed controller so that it can offer the same performance as the system shows. It should be noted that the prototype has its own in-built controller and, hence, this study is considering the proposed controller with motor's transfer function to achieve the prototype's performance. Figure 5 shows a block diagram that represents the actual system and derived system (using system identification toolbox), where the actual system comprises both the controller and plant in a closed loop system, whereas the derived model (using SI toolbox) includes only the plant. However, it is important to highlight that the model is quite different from the motor transfer function, since it has several unknown parameters, includes a controller and is an open loop system. Whenever a controller is considered with a system, it turns into a closed loop system. Hence, the derived system is required to be designed with the proposed controller so that it can offer the same performance as the system shows. It should be noted that the prototype has its own in-built controller and, hence, this study is considering the proposed controller with motor's transfer function to achieve the prototype's performance. Figure 5 shows a block diagram that represents the actual system and derived system (using system identification toolbox), where the actual system comprises both the controller and plant in a closed loop system, whereas the derived model (using SI toolbox) includes only the plant.
Appl. Sci. 2021, 11, x FOR PEER REVIEW 7 of 13 Figure 5. A block diagram of actual and derived (using SI toolbox) elbow revolute joint system.

2DOF PID Controller Design
This study adopts a 2DOF PID controller in order to control the flexion and extension movements of the prototype. Here, the 2DOF PID controller receives a current of different amplitudes as control inputs and the system provides the angular displacement and, hence, the higher the magnitude that is given to the system, the higher the angular dis-

2DOF PID Controller Design
This study adopts a 2DOF PID controller in order to control the flexion and extension movements of the prototype. Here, the 2DOF PID controller receives a current of different amplitudes as control inputs and the system provides the angular displacement and, hence, the higher the magnitude that is given to the system, the higher the angular displacement that will be generated by the system. Therefore, if the system does not perform well, the system may bring harm to a patient's impairment. The 2DOF PID controller primarily includes two controllers, where one controller, C r (s), is responsible for the reference input and another controller, C y (s), is responsible for system output of the system, as shown in Figure 6.

2DOF PID Controller Design
This study adopts a 2DOF PID controller in order to control the flexion and extension movements of the prototype. Here, the 2DOF PID controller receives a current of different amplitudes as control inputs and the system provides the angular displacement and, hence, the higher the magnitude that is given to the system, the higher the angular displacement that will be generated by the system. Therefore, if the system does not perform well, the system may bring harm to a patient's impairment. The 2DOF PID controller primarily includes two controllers, where one controller, Cr(s), is responsible for the reference input and another controller, Cy(s), is responsible for system output of the system, as shown in Figure 6. Here, the algorithms for both Cr(s) and Cy(s) can be shown as follows in Equations (5) and (6).
In its algorithm, the set-point weight is considered with the reference because it can reduce overshoot at the set-pint response and, thus, smooth the response [35].
The final control law of the controller can be mentioned as Equation (7). Here, the algorithms for both C r (s) and C y (s) can be shown as follows in Equations (5) and (6).
In its algorithm, the set-point weight is considered with the reference because it can reduce overshoot at the set-pint response and, thus, smooth the response [35].
The final control law of the controller can be mentioned as Equation (7). Figure 4 represents the revolution of the inertia tensor using a homogeneity transformation and the elbow joint angle in Simulink. The function of the elbow joint model is shown in the figure: the segment and corresponding arm increase gradually.

Control and Actuation
The controller is programmed on a PC equipped with a PID real-time controller, using MATLAB /Simulink software with a sampling time of 0.001 s. Incremental encoders are used to measure the angular positions.

Controller Performance
Choosing a suitable gain or weight is difficult to do manually, which is why the Simulink Tuning environment has been adopted to choose suitable gains and weights in order to design the controller properly. The controller parameters have been mentioned, as follows, in Table 2. Table 3 demonstrated the performance of the controller that is quite satisfactory. Here, the rise time and settling time is less than one second and the overshoot is 0%, making the system considerably adjustable for a patient without any jerk or delay. The performance of the controller on the estimated system with the step response and different amplitudes that have been carried out is shown in Figures 7a and 7b, respectively.

Hardware Test
To design the proposed controller, sinusoidal signals of different amplitudes have been considered as references. The sinusoidal signals are designed accordingly, with three amplitudes, such as 0.1, 0.2 and 0.3 amp, and a frequency of 4π Hz. In this system, torque is considered to be the system input and the current is considered to be an output, since the current and voltage are responsible for the motor rotation with certain amount of torques.
From the experiment, it is noticed that the amplitudes of 0.1 and 0.2 amp do not yield much effort to the patient, while the hardware moves very smoothly at 0.3 amp and this amplitude provides enough effort to the patient for elbow flexion and extension, as shown in Figure 8.

Hardware Test
To design the proposed controller, sinusoidal signals of different amplitudes have been considered as references. The sinusoidal signals are designed accordingly, with three amplitudes, such as 0.1, 0.2 and 0.3 amp, and a frequency of 4π Hz. In this system, torque is considered to be the system input and the current is considered to be an output, since the current and voltage are responsible for the motor rotation with certain amount of torques.
From the experiment, it is noticed that the amplitudes of 0.1 and 0.2 amp do not yield much effort to the patient, while the hardware moves very smoothly at 0.3 amp and this amplitude provides enough effort to the patient for elbow flexion and extension, as shown in Figure 8.

ques.
From the experiment, it is noticed that the amplitudes of 0.1 and 0.2 amp do not yield much effort to the patient, while the hardware moves very smoothly at 0.3 amp and this amplitude provides enough effort to the patient for elbow flexion and extension, as shown in Figure 8. In order to evaluate the tracking performance of the controller, the root mean square error (RMSE) method has been considered. RMSE can be expressed by the following Equation  In order to evaluate the tracking performance of the controller, the root mean square error (RMSE) method has been considered. RMSE can be expressed by the following Equation [40].
where, y a i = Actual values of y, y e i = Desired values of y and N y = Total number of y. From Table 4, it can be seen that the controller offers RMSE less than 5%. Hence, for tracking, this controller is suitable for this system.

Discussions
The proposed 2DOF controller shows that it is fast in response and in reaching stability. In addition, it does not show any undershoot and overshoot. This is a significant feature for this controller, since the prototype is designed to offer therapy to elbow-impaired patients. In addition, its set-point weight feature helps it to overcome the disturbances to the system rapidly, which is also another important feature of the proposed controller.
The successful development of the controller leads the work towards the hardware implementation. For both the simulation and hardware implementation, different amplitudes of current, such as 0.1 amperes, 0.2 amperes, and 0.3 amperes, have been considered, since the system may deal with patients with different physical conditions. Some patients are frail and feeble in their elbow movements, whereas some patients are capable of moving their elbows, but they need basic mechanical assistance and, hence, they need assistance accordingly of different amplitudes. In general, 0.3 amp is typically reserved for those who are unable to stretch or flex on their own, while 0.1 amp is reserved for those who can move but sometimes need a small amount of assistance from the machine. The proposed controller also performs surprisingly well with negligible tracking errors. However, the experimental work has been carried out only considering the periodic movement of the machine elbow, although this work would benefit from including the responses from the patients. We provide the following limitations of our study, which will be addressed in future works that take our tool and method selection into account:

1.
Our study did not examine the proposed model's compatibility with the existing 2DOF PID controller. From a translational standpoint, future research should prioritize examining the possibility of bridging that gap.

2.
At the time of writing, the global pandemic (SARS-CoV-2) caused a challenge in assessing the clinical experiment designed to evaluate the suggested PID controller's performance.

3.
We considered only single-degree elbow movement, although performance can differ when multiple-degree elbow movement is included.

Conclusions
In this study, a 2DOF PID controller is designed for a revolute joint of an existing upper limb rehabilitation prototype. Since the system parameters are unknown, the black box system identification technique is considered to estimate the open loop system. Interestingly, the open loop transfer function of the system includes a controller with the plant. Therefore, a transfer function for the motor of revolute joint is derived mathematically that can play as the role of the system. In order to make the motor transfer function behave similarly to the estimated open loop transfer function, the proposed 2DOF controller is implemented with the motor transfer function through a closed loop architecture.
From the simulation and experimental work, the proposed 2DOF PID controller appears to be a suitable controller for single-degree elbow movement. In the future, the controller's performance in the presence of disturbance and noise will be tested and adjusted appropriately, considering patients' physical ability. Acknowledgments: Not applicable.

Conflicts of Interest:
The authors declare no conflict of interest.