Skip to Main Content
Functional electrical stimulation (FES) systems restore motor functions after spinal cord injury (SCI). In this study, we used a model consists of a joint, two links with one degree of freedom, and two muscles as flexor and extensor of the joint, which simulated in MATLAB using SimMechanics and Simulink Toolboxes. The muscle model is based on Zajac musculotendon actuator and composed of a nonlinear recruitment curve, a nonlinear activation-frequency relationship, calcium dynamics, fatigue/recovery model, an additional constant time delay, force-length and force-velocity factors. In this study, we used a classic controller for regulating the elbow joint angle; a Proportional- Integral- Derivative controller. First, we tuned the PID coefficients with trial and error, and then a genetic algorithm was used to optimize them. This genetic-PID controller uses genetic algorithm to get the required pulse width for stimulating the biceps to reach the elbow joint to the desired angle. The fitness function was defined as sum square of error. The results for genetic-PID controller show faster response for reaching the range of the set point than the PID controller tuned by trial and error. However the genetic-PID is much better in terms of the rise time and the settling time, the PID tuned by trial and error has no overshoot. The time to reach the zero steady state error is half in genetic-PID in comparison to PID tuned by trial and error.