This is an alternative method to manual tuning of the impedance control by using optimization. With a virtual model that represents the prosthesis attached to a frame, I am running a stochastic search for these impedance parameters: Knee equilibrium angle and stiffness during swing flexion and ankle equilibrium angle and stiffness during swing extension.
A knee and ankle prosthesis with active ankle plantarflexion/dorsiflexion, knee flexion/extension.
The goal of this process is to replicate intact swinging knee motion so that the device makes a movement that is close to the one found in typical human gait. Hence, I made a cost function that penalizes when the trajectory is not similar to a goal trajectory. Simulations are running in Gazebo. They use my plugin to interface with a joint using joint effort.
This is the basic workflow of the process. the controller module executes the power prosthesis controller firmware based on ROS. Model is the virtual representation of the device in the Gazebo environment. Simulation results are analyzed using a biological trajectory reference, creating an optimization cost function that is used in a pattern search optimization that sets the parameters for the device operation.
These plot shows how the cost function relates to different parameter values:
We can see that the process found that the best set of values are 64.9° and -17.93° respectively. Without any constraints, except for the possible range of motion of the device, the simulation learned how to do a human-like swing flexion and swing extension.
This was a test to verify that the framework works, particularly if I was able to launch multiple simulations with different parameters, retrieve the results and compare them against some trajectory. These are basic steps in the optimization process.
In this case, the flexion result was coherent with our current controllers in the real device (we are using a 65° for this parameter), for the case of swing extension the result was not so similar, in our controllers we are extending the knee to 0°. The difference can be because I am fixing the final time of the simulation instead of finding the final time of extension for each simulation. That affects the time normalization of the results, penalizing solutions with smaller knee extension angle because those take less time to reach 0.
The data extraction for this simulation can be improved to account for this. We can find the time in extension when the angle does not change anymore and define that as the final time per each simulation.
You can read more about this in the paper: