Real-Time Motor Control Using a Raspberry Pi, ROS, and CANopen over EtherCAT, with Application to a Semi-Active Prosthetic Ankle - Kieran M. Nichols; Rebecca A. Roembke; Peter G. Adamczyk (Actuators)
This paper focused on the implementation method and results of modifying a Raspberry Pi 4 for real-time control of brushless direct-current motors, with application in a semi-active two-axis ankle prosthesis. CANopen over EtherCAT was implemented directly on the Raspberry Pi to synchronize real-time communication between it and the motor controllers. Kinematic algorithms for setting ankle angles of zero to ten degrees in any combination of sagittal and frontal angles were implemented. To achieve reliable motor communication, where the motors continuously move, the distributed clock synchronization of Linux and Motor driver systems needs to have a finely tuned Proportional-Integral compensation and a consistent sampling period. Data collection involved moving the ankle through 33 unique pre-selected ankle configurations nine times. The system allowed for quick movement (mean settling time 0.192 s), reliable synchronization (standard deviation of 4.51 microseconds for sampling period), and precise movement (mean movement error less than 0.2 deg) for ankle angle changes and also a high update rate (250 microseconds sampling period) with modest CPU load (12.48%). This system aims to allow for the prosthesis to move within a single swing phase, enabling it to efficiently adapt to various speeds and terrains, such as walking on slopes, stairs, or around corners.