Go to start of banner

# Controller for Maintaining Balance

• Mishel Johns
• Chris Ploch

## Goals

1. Create a controller for maintaining balance that uses Induced Acceleration Analysis (IAA).
2. Determine whether controlling only the acceleration of the center of mass (COM) of the model is sufficient to maintain balance.
3. The controller should be compatible with a wide variety of models in OpenSim, and it should be easy for others to adopt and extend.

## Methods

• Develop IAA solver. This was needed to interface the controller we would make with the IAA algorithm.
• Create IAA controller, which performs the following functions:
• Creates a copy of the model with the controller and visualizer removed. The copy is used for IAA and calculating the COM accelerations. A copy is made so that another instance of the visualizer doesn't open when IAA runs, and so that IAA does not call this controller inside it, which would result in an infinite loop.
• Gets a list of the actuators in the model. Obtains the present muscle activations, maximum forces, and current forces.
• Runs IAA on the model, determining the effect of each muscle individually exerting 1 N on the acceleration of each COM translational coordinate. These induced acceleration values are stored in the matrix A.
• Obtains current COM position and velocity, and uses a control law to calculate the desired COM acceleration (vector b) necessary to keep the COM where we want it. The control law is a PD controller:

• We now have an equation of the form Ax = b, where we want to solve for x, the vector of muscle forces required to achieve the desired COM acceleration.

• Since this is a redundant system, we need to take a pseudoinverse of A to solve this problem, and we will use a weighting matrix W to activate the muscles in a smart way. We weight by 1/Fmax, which gives priority to muscles that have higher maximum force-generating capabilities and should get us to our end goal more efficiently.
• Once we have the weighting matrix, we perform a general norm minimization with equality constraints. We minimize ||Wx|| subject to Ax = b. This results in the following formula:

• We iterate through this control loop three times, changing the weighting factor to an extremely large value if it demands a negative force from a muscle (i.e., the muscle is pushing instead of pulling). We also increase the weight to reduce the activation if the force required is greater than the maximum force the muscle can produce.
• After obtaining x, we convert the forces into activations by dividing by the maximum muscle force available, scaled by the appropriate displacement and velocity factors.
• After creating the controller, we planned to test it on a simple model first: a block with three translational degrees of freedom actuated by six muscles, as shown below. • We wanted to determine whether we could succeed in controlling the trajectory of the block with the IAA controller. This would prove that the concept works, at least in a simple case.
• After testing the block, the controller would be tested with standing human models, like gait10dof18musc and Gait2392, to see whether they could maintain balance while resisting gravity. The feet of these models were welded to the floor to simplify the problem, since that would be sufficient to prove that the controller worked in a simple case. ## Results

Controlling the block was successful, if a little slow. There were slight tracking errors as well. The standing human models were more problematic, as shown in the videos below. Neither standing skeletal model is particularly stable, but they do much better at maintaining balance than models without controllers.

Here, the block can be seen traveling to several locations that we specified.

The gait10dof18musc model with the feet welded to the ground, right and left ercspn, extobl, and intobl muscles added, and the torso mass reduced, with low gains for the controller.

The gait10dof18musc model with the feet welded to the ground, and the torso removed, with high gains for the controller.

## Conclusions

We showed that the controller works for the simple case of the block, and it achieves mixed results with the standing models. While the controller does not keep the standing models upright in a natural way, it is clearly attempting to restore balance to the models and does a good job of preventing them from going completely unstable.

We are not sure of the cause of the instabilities. It's possible that controlling the translation of the COM is not enough to maintain balance. It may be necessary to use IAA to control other variables besides the COM position. For example, the orientation of the torso could be controlled to prevent it from traveling to an extreme angle. If the problems persist, it may be worthwhile to control all of the model generalized coordinates instead of just those associated with the COM.

Other future steps for this project include:

1. Properly treating muscle dynamics. Currently, we treat muscles like pure force generators in our calculations.
2. Fix nonstandard use of OpenSim functions in our code.
3. Implement a foot contact model instead of welding the feet to the ground (to increase realism).

## Contributions

We have created a framework to use IAA in a controller, and set up a system that is compatible with multiple models. Minor edits can be used to change the controlled variable from the position of the center of mass to any generalized coordinate. The IAA controller can be used to test resistance to perturbations, check the effect of starting positions and crouching on balance, and compare the results with activation patterns from the literature.