| Stroke is likely to lead to upper limb motor dysfunction and have a serious impact on daily life of patients.In recent years,the upper limb exoskeleton rehabilitation robot has brought the gospel to the rehabilitation of patients with its unique advantages.In this paper,the motion control code of upper limb exoskeleton rehabilitation robot is designed based on the method of joint development of Simulink and STM32,in order to solve the problems of poor openness of the controller and long development cycle of the existing upper limb exoskeleton rehabilitation robot motion control system,mainly carried out the upper limb hemiplegia rehabilitation needs analysis,rehabilitation robot motion control system platform design and simulation,motion control system implementation research in three aspects:On the basis of the physiological structure and the form of movement of the human upper limb,combined with the rehabilitation theory of hemiplegia,the rehabilitation of hemiplegia of the upper limb was studied,and the passive assisted rehabilitation training scheme of shoulder,elbow single joint and multi joint was planned.Taking the 3-DOF upper limb exoskeleton rehabilitation robot as the research object,the forward and inverse kinematics and dynamics mathematical models of the robot are deduced according to the standard D-H parameter method,the spatial pose transformation theory and the Lagrange equation.Finally,the target program is written by MATLAB to simulate the mathematical model.The results show that the model is correct.Based on the mathematical models of forward and inverse kinematics,dynamics,robot end trajectory,DC motor and PID controller,a complete motion control system of upper limb exoskeleton rehabilitation robot is built in Simulink environment by using modular design idea.The correct establishment and control effect of the motion control system are verified by virtual simulation.Finally,the motion control system code of rehabilitation robot is designed and realized based on the method of joint development of Simulink and STM32.Combined with hardware equipment such as upper limb exoskeleton rehabilitation robot control chip,motor and encoder,the hardware code is generated by using code generation technology and burned to the core control chip to drive the rehabilitation robot to complete the training task.The experimental results show that the motion control system code of upper limb exoskeleton rehabilitation robot based on Simulink and STM32 joint development method can quickly realize the early planning and shorten the development cycle compared with the traditional development method.It is of positive significance to achieve the functional goal of rehabilitation exercise program,improve the level of rehabilitation exercise and improve the evaluation system of rehabilitation exercise. |