Design and control of a sit-to-stand assistive device based on analysis of kinematics and dynamics

Sit-to-stand is a common activity in daily life. It is difficult for the elderly and patients with lower limb disorders to complete this motion due to limb pain, muscle weakness, partial loss of motor control function, and physical defects in joints. An STS assistive device is a piece of automated medical equipment that can facilitate rehabilitation training for patients with lower limb disorders and improve their lower limb function. In this paper, we introduce a 3-DOF series type STS assistive device. First, we selected 26 healthy adults to carry out an STS transfer experiment, and we obtained the trajectory and velocity of each joint and the law of plantar pressure during STS motion. Second, based on the above kinematics and dynamics law, a 3-DOF series mechanism was designed. Through forward and inverse kinematics analysis, the relationship between the end-effector and the linear actuator was established. The trajectory planning of the end-effector was carried out according to the natural STS transfer trajectory, and the law of the linear actuator was obtained. The trajectory planning was verified by ADAMS. Finally, the Arduino controller was used to build the control system of the STS assistive device, and the prototype experiment was carried out.


Introduction
Sit-To-Stand (STS) is considered to be the most common functional activity in daily life, and it is a prerequisite for other activities. Healthy adults need to perform 60 ± 22 STS motions every day. It can be defined as a motion in which the base of support is transferred from the seat to the feet [1][2][3][4], and it can also be defined as the transfer between a stable posture (sit) and a less stable posture (stand) [5]. However, it is difficult for the elderly and patients with lower limb disorders to complete this motion due to limb pain, muscle weakness, partial loss of motor control function, and physical defects in joints [6][7][8]. STS assistive devices can help the elderly and patients with lower limb disorders to successfully complete the STS transfer motion and aid in lower limb rehabilitation training, which has attracted increasing attention [9][10][11].
Kim et al. [12] developed a Smart Mobile Walker (SMW). In order to formulate the optimal motion trajectory, they carried out a kinematics analysis of the SMW and investigated its feasibility with simulations. Based on the human motion posture obtained by the VICON motion capture system, Omar Salah et al. [13] developed an assistive device for the elderly called EJAD that could help them complete STS transfer and use their remaining physical strength during STS motion. Chuy O et al. [14] proposed a method of using a robot walking-support system to assist STS and adjusted the STS posture of the patient according to the torque of the knee joint. Ahmed Asker et al. [15] designed an indoor multi-functional assistive device to help patients who suffer from decreased muscular strength in the lower limbs. Based on a non-conventional structure of a 3-RPR planer parallel manipulator, the assistive device could carry out motions such as STS, walking, transferring, and lifting. Benyamine et al. [16] classified and summarized existing STS assistive devices and proposed a 3-DOF assistive device using elbow support. The device carried out STS motion control using EtherCAT fieldbus technology. Taisuke Sakaki et al. [17] developed a series of rehabilitation robots for each step of spinal cord injury training, including robots that assist in standing and sitting, the preliminary walking pattern, and practical walking. These robots enabled patients with lower limb disorders to undergo rehabilitation training. Pierluigi Rea et al. [18] proposed a 2-DOF STS assistive device based on the STS trajectory of the human body. The device used a double-pantograph mechanism to provide vertical motion, together with a linear guide providing the horizontal motion. Ottaviano E et al. [19] obtained the law of STS transfer of the human body using a Kinect motion capture system. They proposed three kinds of STS assistive devices with different DOF and carried out simulation and comparative analysis of the devices. Atsushi Tsukahara et al. [20] developed a controllable and wearable exoskeleton robot to improve the user's motor ability. However, due to the lack of coordination between the mechanism and human movement, user joint pain resulted in a poor walking-training effect. Erika Ottaviano et al. [21] used a 3D motion capture system to study the STS motion of the human body and designed an STS mechanism with a single-DOF. However, compared with the multi-DOF mechanism, its flexibility and range of motion in the STS were greatly reduced.
In the design of an STS assistive device, a certain joint or part of the body is often used as the support point to drive the human body to complete the STS transfer motion, which results in other joints being unable to follow the natural STS trajectory of the body and poor human-machine cooperation. In addition, most existing STS assistive devices only focus on the completion of STS transfer, without considering patients' use of residual muscle strength during the task, resulting in a poor training effect. The purpose of this study is to design an STS assistive device with high human-machine cooperation that helps the elderly and patients with lower limb disorders to improve their lower limb function, promote rehabilitation, and improve self-care ability. At the same time, it also makes full use of patients' residual muscle strength and improves the rehabilitation effect. To obtain the motion law of STS transfer of the human body, we carried out the experiment and obtained and analyzed the motion trajectory, velocity of joint, and the law of plantar pressure for subjects with different body characteristic parameters. Based on the kinematics law, we put forward the design scheme of the STS assistive device, carried out kinematics analysis to realize the optimal trajectory planning, and verified the trajectory planning through the simulation of ADAMS. Based on the law of plantar pressure, the risk of the assistive device was determined, and the strength and stiffness were calculated to ensure the safety of the assistive device. Finally, based on the analysis results, the control system of the STS assistive device was constructed, and the prototype was manufactured and tested.

Experimental methods
Twenty-six healthy adult males were randomly selected to participate in this study. The inclusion criteria included no cognitive impairment, ability to cooperate in the STS transfer experiment, no medical history or sequelae affecting body movement, and no balance dysfunction. The study was conducted from April 10-25, 2020, and all the subjects were right-hand dominant. This study was approved by the Academic Ethics and Scientific Ethics Special Committee of the Academic Committee of Tianjin University of Science and Technology. All subjects signed an informed consent statement before participating in this study. The physical characteristics of subjects are shown in Table 1.
We used a high-definition camera (EOS 200D II, Canon) to record the joint trajectory. In the experiment, we placed the camera on the left side of the subject and collected the video at a rate of 60 fps/s. To prevent the movement of clothing from affecting the accuracy of experimental data, subjects were asked to wear black tights. To obtain kinematic data, red markers were attached to anatomical landmarks on the left side of the subject's body, including the shoulder, waist, knee, hip, and ankle. The waist point was located at 60% of the line between the shoulder joint and the hip joint. Subjects were seated on the seat of an armless, backless chair, which was adjusted to 100% of each subject's knee height. Subjects were instructed to fold their arms across their chest and rise without bringing their arms forward. To simplify the movement model, it was assumed that the STS transfer was completed in the sagittal plane. Subjects began to perform STS transfer at the word "start", and the researchers turned on video recording and began to measure plantar pressure. The movement ended with the subject's self-reported "stop". At that time, researchers finished the data collection and checked for any incorrect data. Subjects performed the STS task at a natural, self-selected speed. The STS transfer experiment is shown in Figure 1.
Through the experiment, we recorded the position coordinates of each joint of the subjects, and we used the central difference method to calculate the velocity of the marker. This was problematic at the start and end of a data stream because not all of the points were available. Velocity was obtained using forward and backward difference methods [22]. We also used a flexible film pressure sensor (MD30-60, Leanstar, Suzhou, China) to obtain plantar pressure.
We screened all the data obtained and excluded the data with obvious errors to ensure the accuracy of the results. As different subjects take different time to complete STS transfer, we normalized the time to calculate the mean value and standard deviation of the data. All curves were drawn by spline fitting using Origin 2018.

Result analysis
To facilitate the analysis of the STS motion of the human body, we simplified the model. The human movement model is shown in Figure 2(a) and the trajectory of  joints is shown in Figure 2(b). Through the image processing of the collected video, the coordinates of the marker points in each image were obtained, and then the data was smoothed by spline fitting. From Figure 2(b), we can see that the trajectory of the knee joint is pendulum-shape, that of the hip joint is similar to an S-shape, and that of the shoulder joint is an L-shape. Based on the joint trajectories obtained, we were able to complete the trajectory planning of the STS assistive devices to attain high human-machine cooperation and help patients carry out rehabilitation training according to the natural STS transfer trajectory and thus improve their limb function.
The velocity of the shoulder, hip, knee, and waist are shown in Figure 3. We divided the STS motion into four phases. Since it was difficult to define phase IV, we considered the velocity of only phases I, II, and III. In phase I, the velocity of the shoulder joint was basically unchanged in the vertical (VT) direction, but the velocity changed greatly in the anterior-posterior (AP) direction. However, the velocity of the hip, knee, and waist had almost no change, indicating that only the trunk was moving in phase I, and the lower limbs were at rest. In phase II, the velocity of the shoulder, hip, and waist had obvious changes in the AP and VT directions. The velocity of the knee joint was close to zero in the VT direction, and it reached the peak value in the AP direction and became zero at the end of phase II, which indicated that phase II ended when the lower limb does not incline forward. In phase III, the velocity of the shoulder, hip, and waist decreased gradually in the AP and VT directions and approached zero at the end of phase III. The velocity of the knee joint reached the peak value in phase III in the AP and VT directions and finally became zero.
The acquisition of velocity is of great significance to the design of STS assistive devices. We can control the assistive device so that patients can complete rehabilitation training based on the velocity of STS motion of healthy people. In addition, we can refer to the STS motion velocity of healthy people to adjust the velocity of the STS assistive device. For example, the velocity of the STS assistive device can be adjusted to be slightly lower than the STS velocity of the patient to guide the follow-up motion of the assistive device and make full use of the residual muscle strength of the patient in order to better exercise the limbs and achieve the purpose of rehabilitation.
We defined the plantar pressure parameter as the ratio of plantar pressure to steady-state plantar pressure during STS. The steady-state or stability value represents the plantar pressure value of the subject after fully standing. The average plantar pressure parameters of subjects are shown in Figure 4. In phase I, the plantar pressure parameter of subjects in sitting posture was 20% of the stability value. At the end of phase I, before the hip left the seat (lift-off), the plantar pressure parameter reached 53% of stability value. In phase II, the plantar pressure parameter increased rapidly, reached the peak value, and then decreased. Through our research, we found that at the peak moment, the movement characteristics of the trunk change from forward flexion to backward extension. We defined the peak moment as the trunk transition point. In phase III, the plantar pressure parameter showed a trend of first decreasing and then increasing. Finally, the subjects reach a steady state. The plantar pressure parameters reflect the load on the joints. When the plantar pressure parameter reaches the peak, the load of each joint also reaches the maximum [23]. At that time, the STS assistive device must minimize the risk for the patient. Carrying out strength and stiffness calculation on the state of STS assistive device at this moment can help to ensure the safety and reliability of STS assistive device to securely support patients in the process of training to the greatest extent.

Design of STS assistive devices
The performance of human-machine cooperation depends on the coordination between STS assistive devices and human motion posture and trajectory. If the human-machine cooperation is out of sync, it will inevitably cause harm to patients with lower limb disorders. Improvement in the human-machine cooperation of STS assistive devices has become an important standard of design quality. Based on the above parameters of trajectory, velocity of joints, and plantar pressure, a design scheme was developed.

Mechanism design
Guided by the human motion model simplified in the sagittal plane, we designed a 3-DOF series mechanism similar to the human motion model [24]. The series mechanism was mainly composed of three links connected in series by hinges. The three links corresponded to the shank, thigh, and trunk of the human motion model, and the three hinges corresponded to the ankle, knee, and hip joints. Linear actuators were used to drive the links. The schematic of mechanisms is shown in Figure 5. To facilitate the kinematic analysis, we established the mechanism coordinate system with the ankle joint as the origin. Marker1, Marker2, and Marker3 corresponded to the knee joint, hip joint, and waist point of the human body, respectively. Marker3 was securely connected to the waist point, and the linear actuator was controlled to complete the assistive standing.

Kinematic analysis
In the STS assistive device proposed in this paper, the knee, hip, and waist of the human body corresponded with Marker1, Marker2, and Marker3 of the 3-DOF series mechanism. In this manner, the trajectory of Marker1, Marker2, and Marker3 coincided with the trajectory of knee joint, hip joint, and waist point in the experiment. By controlling three linear actuators to complete the STS transfer of the 3-DOF series mechanism, higher human-machine cooperation was realized. During the motion of the 3-DOF series mechanism, the positions of Marker1, Marker2, and Marker3 changed with the lengths of the linear actuators (d 1 , d 2 , and d 3 ). Therefore, the relationship between them must be established through kinematic analysis.
The forward kinematics analysis calculates the rotation angle of each link based on the length of the linear actuator, and it calculates the coordinate position of the three marker points through the rotation angle of the link.
A vector equation solves the coordinates of Marker1, Marker2, and Marker3. The vector equation of the mechanism is as follows: By projecting the vector Equations (1) (2) (3) to the X and Z coordinates [24], the coordinates of Marker1 can be determined as follows: the coordinates of Marker2 can be determined as follows: the coordinates of Marker3 can be determined as follows: In Equations (1)-(6), S 1 is the distance from O to Marker1, S 2 is the distance between Marker1 and Marker2, and S 3 is the distance between Marker2 and Marker3. θ * 1 , θ * 2 and θ * 3 are the rotation angles of the three links.
To solve the θ * 1 , the vector equation was listed as: The vector Equation (7) was projected to the X and Z coordinates, and we obtained: Through the trigonometric function relations, the solutions of θ * 2 and θ * 3 were obtained: In equations (7)-(10), d 1 , d 2 , and d 3 are the lengths of the three linear actuators, and l 0 is the vertical distance from O to the frame, l 1 is the horizontal distance from O to A, θ is the angle between the linear actuators d 1 and the x-axis; α, β, and γ are constants related to mechanism; and l 2 , l 3 , l 4 , l 5 , and l 6 are the lengths of the links respectively.
The inverse kinematics analysis provides the length of the linear actuator through known trajectory coordinates. We took the trajectories of the knee, hip, and waist in the STS transfer experiment as the trajectories of Marker1, Marker2, and Marker3. The length variation laws of d 1 , d 2 , and d 3 were obtained by inverse kinematics [24].
Through the law of cosines, we obtained: where θ * 1 = arctan Finally, through forward and inverse kinematics analysis, we established the relationships between the position of each marker and the linear actuators. The coordinates of the knee joint, hip joint, and waist, which were obtained from the STS motion experiment, were substituted into Equations (14), (15), and (16), and we obtained θ * 1 , θ * 2 , and θ * 3 . Substituting θ * 1 , θ * 2 and θ * 3 in Equations (11), (12), and (13), the length variation laws of d 1 , d 2 , and d 3 were obtained. These results provide a basis for kinematics simulation to further verify the feasibility of the assistive device.
We calculated the average value of the body characteristic parameters of all the subjects in this experiment and considered the range of motion of the linear actuator to determine the parameters of the mechanism shown in Table 2.
By substituting the joint coordinates and parameters of the mechanism into the inverse kinematics equation, we obtained the linear actuator length corresponding to the joint coordinate position, as shown in Table 3.

Structural design
The mechanism design provided the basis for the structural design of the STS assistive device. Relevant design principles in ergonomics were considered in the design process [25], such as user-centered design, safety design, and adjustable design. The final overall structure of the STS assistive device is shown in Figure 6.
To make the STS assistive device work with the wheelchair, we adopted the structural design scheme of two groups of 3-DOF series mechanisms, which were parallel. The STS assistive device had three groups of six linear actuators as the power source, and a pedal, knee support plate, and top plate were assembled between the two groups of series mechanisms. A chest protector plate was assembled on the top plate. When using the device, patients wore a hip-support strap, and three groups of linear actuators were used to drive the assistive device and control the patient's posture to complete the STS motion. Four medical castors were set at the bottom of the STS assistive device so that walking training could be carried out directly after STS training.

Simulation
The simulation was able to replicate the movement of the mechanism, predict the movement trajectory of the mechanism, verify the correctness of the kinematic analysis, shorten the product development cycle, and reduce the manufacturing cost of the product. We used ADAMS to carry out the simulation. The steps of the simulation were as follows ( Figure 7): (1) Creating SolidWorks 3D model; (2) Importing the 3D model into ADAMS and defining the material information, Schematic of ADAMS simulation is shown in Figure 10;   To realize the simulation movement, it was necessary to add the correct driving equation. Table 3 shows the calculated length of each linear actuator with time. Based on the data in Table 3, we obtained the relationship between the speed and time for the three linear actuators, as shown in Figure 8. We then added these relationships to the prismatic pairs of the three linear actuators to complete the simulation, where V1 was the driving function of linear actuators 1, V2 was the driving function of linear actuators 2, and V3 was the driving function of linear actuators 3. We extracted the kinematic parameters at each marker point from the results of the simulation and obtained the motion trajectory of the joints through the post-processing tool of ADAMS, as shown in Figure 9. Through comparative analysis with the joint trajectories obtained from the ADAMS simulation of the STS assistive device, we found that the movement trend was largely the same, which proved the correctness of the simulation analysis.

Control scheme of Arduino
The drive of the STS assistive device was constructed using six XTL linear actuators. Each actuator had a The board comes with a bootloader that enables users to download programmes directly via a USB. The control circuit schematic diagram is shown in Figure 10. Three L298 DC motor drive board modules were connected with the DFRduino Mega2560. L298 has the function of under-voltage protection, preventing instantaneous high current burn-out and suppressing transient interference pulse. It also increases the electromagnetic compatibility performance, making it more reliable. It is a commonly used industrial-grade driver. Each driving module drove two linear actuators respectively to push the mechanism to complete the motion in the sagittal plane. In addition, we embedded the HC-06 Bluetooth module in the control system, using the mobile phone to communicate with Bluetooth. We were able to control the DFRduino Mega2560 to execute the corresponding commands and realize the human-machine cooperation.
Trajectory control was needed to make the assistive device run according to the law of STS motion  of healthy people. In the process of mechanism design and motion simulation, we obtained the law of velocity of the linear actuator, so we needed to realize this law through the control system. Pulse Width Modulation (PWM) can adjust the duty ratio, change the ratio of high and low level in a cycle, then change the output voltage in that cycle, control the velocity of the motor, and achieve velocity control of the linear actuator. In Arduino, we can use the analogWrite (pin, value) function to complete PWM output, where pin represents the Arduino pin to write to, and value is used to control the duty ratio between 0 (always off) and 255 (always on). When the value is 0, the duty ratio is 0%, the output voltage is 0, the velocity of the linear actuator is 0, and the linear actuator is in a static state; when the value is 255, the duty ratio is 100%, the output voltage is the maximum input voltage, and the velocity of the linear actuator is the maximum.
To realize the velocity control of the linear actuator, we solved the law of PWM output corresponding to the velocity by obtaining the value in the analogWrite (pin, value) function, as shown in Figure 11. The positive and negative values of value in Figure 11 represent the direction of motion of the linear actuator. When the analogWrite function is called, the value is an absolute value.

Prototype experiment
A functional scheme of the overall control system is shown in Figure 12. In this scheme, we programmed the law of PWM output obtained above, input the programme into Arduino IDE through PC, and communicated with the Bluetooth module through the mobile phone to control the STS assistive device. Before using the STS assistive device, the clinician can adjust the assistive device to the initial position of STS motion based on the body posture and foot placement of the patient. In addition, the clinician can identify the duration of STS by assessing the patient's physical condition and then connect Bluetooth through their mobile phone and send the time to the DFRduino Mega2560. According to the time input, the DFRduino Mega2560 matches the velocity law of the linear actuator for the patient to complete STS motion and to carry out the follow-up motion of the assistive device. The flow chart of the programme is shown in Figure 13. First, the control system was connected with three groups of linear actuators of the prototype, and the assistive device was debugged separately before the experiment. To ensure the prototype was suitable for subjects with a range of heights, we selected three subjects with different heights to participate in the prototype test. The photo of the prototype test of the subject with a height of 160 cm is shown in Figure 14.
In the process of the prototype test, the subjects wore a sling and sat in wheelchairs. The personnel assisting with the experiment pushed the wheelchair to the rear of the assistive device and hung the sling under the top plate of the assistive device (see Figure 6). The assistive device was controlled by the control logic in Figure 13, and the STS motion was completed with each subject. The results of the prototype test showed that the three groups of linear actuators can meet the requirements of the assistive device STS transfer. Comparison of experimental trajectories and prototype test trajectories indicated that the experimental trajectories and prototype test trajectories were largely the same, as shown in Figure 15.
Through the prototype experiment, we found that the STS assistive device can run according to the natural STS transfer trajectory of the human body, and we identified the following advantages.
The mechanism was designed as 3-DOF. The law of kinematics and dynamics obtained from the STS motion experiment of healthy people guided the trajectory control of the STS assistive device|, which led to better human-machine cooperation.
The control system can adjust the initial state of the STS assistive device and the STS duration according to the patient's physical condition and thus carry out personalized rehabilitation training.
The STS assistive device has multiple functions. It can realize STS motion and rehabilitation training as well as walking and walking rehabilitation training in daily life.

Conclusion
In this paper, we presented an STS assistive device with high human-machine cooperation, designed and controlled based on the law of STS motion of the human body. We carried out an STS motion experiment and obtained and analyzed the motion trajectory, velocity of joint, and the law of plantar pressure of subjects with different body characteristic parameters. Based on the kinematics law, we put forward the design scheme of the STS assistive device, carried out kinematics analysis to realize the optimal trajectory planning, and verified the trajectory planning through the simulation of ADAMS. Based on the law of plantar pressure, the risk profile of the assistive device was determined, and the strength and stiffness were calculated to guide the construction of the control system of the STS assistive device and ensure its safety. Finally, the prototype was manufactured and tested. The test results showed that the control system can adjust the motion velocity, realize natural STS motion trajectory, make full use of the residual muscle strength of patients, and carry out the follow-up motion of assistive devices and personalized training.

Disclosure statement
No potential conflict of interest was reported by the author(s).