Study on the Lower Extremity Rehabilitation Device RHleg

This paper introduces a device to support lower extremity rehabilitation for stroke patients. First, the device's mechanical structure has been presented; the device has a simple structure and fully meets the exercise function for the patient. The equipment is controlled by control and monitoring software, which is designed from Visual Basic software. The control circuit is the Arduino 2560 circuit, responsible for receiving the angle sensor signal and measuring the current during operation. In addition, the control circuit provides control signals to the actuator and communicates with the software using the rs232 cable. Next, the mathematical model of the device has been established, and we use MatLab software to simulate the response of the device to the PID controller. Simulation results for fast response time and slight overshoot. Finally, an experiment on volunteers was conducted, the results showed that the device was stable and safe to operate. Thus, the RHleg device has been successfully designed and manufactured, tested on volunteers with good results, and this is the basis for us to continue moving towards patient testing. Keywords—rehabilitation, stroke, PID controller, Arduino, hip joint, knee joint, ankle joint


Introduction
Currently, stroke patients are increasing; the disease occurs in the elderly and in young people who are likely to get sick. Although in the world, in some countries, this disease is a significant cause of death for society, statistics show that there are many fatal patients in the US, Korea, and China [1][2][3].
The stroke accident will leave serious consequences, and the patient may die if not treated promptly, and after stroke, the patient may be hemiplegic [4]. Paralyzed patients will not be able to walk independently, so they have difficulty in daily living, so someone needs to take care of the patient, leading to high treatment costs for the patient. In order to help stroke patients soon integrate into everyday life, patients need to be rehabilitated as soon as possible [5].
Over the past decade, automatic rehabilitation equipment has received increasing attention from researchers and rehabilitation physicians worldwide. Automated rehabilitation device applications help doctors and technicians reduce labor and increase the number of patients supported with exercise during the day. Moreover, automated devices will analyze the patient's data during exercise, from which the doctor can assess the patient's recovery status. The advantages of automatic devices are high accuracy and reliability, continuous operation. Therefore, automatic rehabilitation devices can significantly improve the rehabilitation treatment process after stroke for patients [6][7][8][9][10].
Robotic-assisted rehabilitation functions are divided into the following groups: Group 1: is the training equipment for a lower limb joint. Ankle joints [11][12][13], knees [14][15][16] and hips [17][18]. The main advantage is to focus on treating one joint, so the treatment efficiency is high, the device is simple in structure and easy to control. Disadvantages: only one joint is treated for one joint, so it also makes it difficult for the recovery process of stroke patients because patients often have paralysis of all three joints of the lower extremities.
Group 2: The supporting devices for three lower limb joints. Studies in this group include the work of [19] Motion Maker (Swortec SA), which is a stationary exercise device. The device allows performing exercises with the active participation of the paralyzed leg. The advantage of Motion Maker is that it performs in real-time; the device controls exercise with electrode sensors and checks the patient's movements. The first clinical trials were performed with the system, which showed an improvement in patient mobility-the work of Lixun Zhang et al [20]. In addition, the authors have developed a training device that allows patients to exercise the ankle, knee, and hip joints. The actuator converts the reciprocating motion into a rotary motion using the motor, and the force sensors are used to measure the force exerted by the lower extremities during movement. The authors use the PID controller with a feedback loop as force value and angle value. Dynamic analysis of the device and testing results in the relationship between the value of the angle of applied force. Research work of M. Bouri et al [21]. The authors have developed a Lambda training device based on a parallel movement that allows patients to exercise the lower extremity joints. The mechanism is driven by motors with a force of 1000 N, using a hexagonal sensor and an encoder angle sensor to monitor the patient's movement parameters. First, analyze the dynamic equation and use the PID controller for the device. The test result for the reciprocating motion error of the mechanism is 0.05-0.3 mm.
The advantage of this group is that it supports the patient to regain the leg after a stroke. Disadvantages: the device's structure is complicated; the controller requires high accuracy, equipped with many sensors to receive the patient's force and angle signals.
In this study, a device to support lower extremity rehabilitation with 3 degrees of freedom is introduced for hip, knee, and ankle joints flexion/extension exercise. The device's operating range is with the range of motion of the hip (0-80 0 ), knee (-135 0 -0 0 ), ankle joint (40 0 -120 0 ). The device uses an electric cylinder to act as an actuator that drives the joints to work. The measuring angle of the joints during the process is obtained from the position sensor of the electric cylinder. The current sensor is used to measure the torque of the machine during operation. This device is a new research model in Vietnam to create lower limb rehabilitation equipment for the treatment of patients. This paper includes the following sections, and part 2 presents the lower extremity rehabilitation device RHLeg. Part 3 presents the mathematical model of the device and the results of the simulation of the device's response by the software. Part 4 presents the experiment and discussion. Finally, part 5 is the conclusion.

2
The lower extremity rehabilitation exercise equipment RHleg

The structure of the device
The RHleg device to support lower limb rehabilitation was designed and manufactured by the research team at the Faculty of Engineering and Technology, Pham Van Dong University, Quang Ngai city; the structure of the device is shown in Figure 1. Supportive device Assist the patient to exercise with two actuators for the right and left joints. The research team uses an electric cylinder to drive the joints. Due to its selfbraking nature, this mechanism ensures patient safety in case of an emergency stop. There is lower limb support for the patient in each part, ensuring make the patient feels comfortable depending on the height and size of the patient. The device has an actuator to adjust the length of the joints to suit the patient. The patient to sit in the correct position, the device has an adjustment mechanism for the exercise unit to move in/out to suit the patient. In addition, the device can adjust the patient's exercise position, such as sitting or lying down, with an automatic adjustment button. The patient is secured to the device by fixed straps at the thighs, shins, and back. The unit can be moved easily on the platform thanks to the movable wheels mounted on the base. Range of motion of cavernous joint 0-90 0 , knee joint 0-135 0 , ankle joint 0-80 0 ; this range of motion is within the limits of the patient. The device is made of stainless steel and aluminum for the main components of the device; the lower limb supports and the seat are made of padded plastic to create comfort for the patient. The device has a screen that monitors and monitors exercise parameters and also stores patient information during exercise.

2.2
The controller of the device Figure 2 shows the control connection diagram of the model, control, and monitoring software written in Visual Basic language installed on the computer. The computer connects to the Arduino Mega 2560 microcontroller circuit by rs232 cable; the microcontroller circuit is responsible for receiving control data from the computer, then controlling the actuator through the power circuit and reading the feedback signal. From the angle and current sensors, process the sensor data and send it to the computer to monitor the parameters during the device's exercise.

Fig. 2. The dynamic diagram of device
The user controls and monitors the device; software has been designed with an intuitive user interface. In this software, we use visual essential v6.0 software to build the control interface and monitor the patient's parameters. The software interface is shown in Figure 3, with command buttons and control toolbars. After logging into the software, the console will be activated. With the Select mode command button providing information to set the control parameters for the device in Figure 4, the Test command button checks whether the device operates correctly with the set parameters or not. The Exercise button allows the device to operate, and the Stop command button stops the device. In addition, there is a Play music button on the software to help patients feel happy during exercise. Patient safety is ensured through the following protection levels: The device is protected against overcurrent during operation and protection against leakage current for electrical safety; The mechanism that drives the moving joints is a screw-nut mechanism with high self-braking ability, so when a problem occurs, it will stop working immediately; Soft stop: The device has a hand-held stop button during the movement of the joints; if the force is too great or the mechanism goes beyond the allowable limit, the stop button will adjust the mechanism to move in the opposite direction of the exercise direction. To ensure patient safety; Emergency stop: Press the emergency stop button or the Stop command button on the software  The mathematical model of the device

The mathematical model
The dynamic equation of the device refers to the works [22][23]; we conduct the dynamic analysis of the joints of the device according to Figure 5.

Simulator
The PID controller has been widely applied in the control field, especially in lower limb rehabilitation equipment. Many authors have also studied and achieved specific achievements [24][25]. This paper uses a PID controller to control the lower limb rehabilitation exercise device; the controller's control diagram is shown in Figure 6. The PID controller will adjust the torque so that for error to go to 0 with a short transient time and minimum overshoot.
Set rotation angle error: Where d: is the setpoint angle,  : is the reference angle.
The PID controller for the device is shown by equation (3) Table 1 is the parameters of the research model to simulate the response using the MatLab software. The setting angles to simulate the response of the lower extremity rehabilitation exercise model with the selected angles are: Table 1. Parameters for simulator

Description Parameters
The Mass of the link 1 m1=5(kg) The Mass of the link 2 m2=5(kg) The Mass of the link 3 m3=2(kg) The Lengt of the link 1

L3=0.25(m)
The length of the center of link 1

RC1=0.2(m)
The length of the center of link 2

RC2=0.25(m)
The length of the center of link 3

RC3=0.1(m)
The torque inertia of link 1 The load torque D=5(N.m) Figure 7 shows the response results of the ankle joint; the result shows that the difference between the actual value and the set value is 0. The short time is 3s, and the overshoot is 0, the maximum torque during the process. The starting torque of the ankle joint is 2.2(Nm) and during operation is 1 (Nm). Figure 8 shows the response result of the knee joint; the result shows that the difference between the actual value and the set value is 0. The transient time is 3s, and the overshoot is 0, the torque during flexion is knee is 20(Nm), and knee extension is 35 (Nm). Figure 9 shows the response result of the hip joint, and the result is that the difference between the actual value and the set value is 0. The short time is 3s, and the overshoot is 0, the torque during the starting process is 80(Nm), and during operation is 50(Nm). The Hip joint is the joint that bears the most significant load, so a large enough torque is required to operate. The PID controller has a fast response time and slight overshoot through the response results of the neck, knee, and hip joints. This result will serve as a basis for programming the application of the PID controller in the RHleg lower limb rehabilitation training device.

Experiment results and discussion
The device has been tested with humans to evaluate the safety and technical requirements of the device; Figure 10 shows the pose with the RHleg device. In addition, we have conducted a test on volunteers whose parameters are height 1m55, weight 50kg. In the experiment, the training angles for the hip, knee, and ankle joints were set according to the values in the software simulation presented in part 3. Figure 11 presents the results of patient parameter acquisition in the training process on control and monitoring software. When tested on ordinary people at the ankle, knee, and hip joints, Figures 12-14. Figure 12 shows the test results of the ankle joint, and the result shows that the difference between the actual value and the set value is 0-1 0 . Therefore, the short time is 3s, and the overshoot is 0, the maximum current value during the starting of the ankle joint is 1.2A, and during the operation is 1A. Figure 13 shows the test results of the knee joint, and the result shows that the difference between the actual value and the set value is 0-1 0 . Therefore, the short time is 3s, and the overshoot is 0, the maximum current value during flexion of the knee joint is 1.2A, and during extension of the knee joint is 4A.    Figure 14 shows the test results of the hip joint, and the result shows that the difference between the actual value and the set value is 0-1 0 . Therefore, the short time is 3s, and the overshoot is 0, the maximum current value during the warm-up of the knee joint is 4.5A, and during the regular operation of the hip joint is 3A.
Through the test results of the ankle, knee, and hip joints, the RHleg regulator has a response time of 3s and a rotation angle error of 0-1 0 . This result shows that the lower extremity rehabilitation exercise device RHleg works well. The rotation angle deviation value is within the permissible range (0-1 0 ). The software interface operates stably and timely collects the errors of patient parameters during exercise. Research results, compared with the authors' work [19][20][21], the RHLeg device has the following advantages: The device has a more straightforward structure, the controller uses Arduino, so the cost is low and manageable. Assembly and replacement. The device operates to ensure safety and specifications with 0-1 0 rotational deviation. In addition, the control and monitoring software has a user-friendly interface. However, the RHleg device still has some disadvantages as it can only operate passive exercises and does not have a torque sensor during the patient's exercise.

Conclusion
This paper presents the mechanical structure and control part of the lower extremity rehabilitation exercise device RHleg. The RHleg equipment is built to ensure ease of exercise and a posture to suit every patient's physique. The software to control and monitor patient parameters has been designed with a simple user interface that is easy to operate. Set up the dynamic equation and design the device's PID controller. We are using Matlab software to simulate the transient response of the research model with a PID controller. As a result, the simulation at the joints showed that the rotation angle deviation was 0-1 0 , and the overshoot was 0. We also conducted the test on volunteers, and the results were consistent with the theoretical study. The device has operated stably and safely during testing with volunteers. In the upcoming research direction, we will conduct trials on patients to evaluate the device's effectiveness.