Date: Wed, 25 May 2022 12:57:41 -0700 (PDT) Message-ID: <893805629.7626.1653508661494@simtk-confluence.stanford.edu> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_7625_713189327.1653508661493" ------=_Part_7625_713189327.1653508661493 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html How RRA Works

# How RRA Works

The topics covered in this section include:

=20 =20

# Overview

Residual reduction is a form of forward dynamics simulation that uses a = tracking controller to follow model kinematics determined from the inverse = kinematics. Computed muscle control (CMC) serves as the controller, but wit= hout muscles the skeleton of the model can be used to determine a mass dist= ribution and joint kinematics that are more consistent with ground reaction= forces.

Residual reduction is primarily intended for gait, i.e., movements like = walking and running where the model is displaced relative to the ground whi= le subject to ground reaction forces and torques. In this chapter, we descr= ibe an example gait model (gait2354_simbody.osim) consisting of ten rigid s= egments (bones) where 17 of the 23 generalized coordinates (degrees of free= dom) of the model represent angles for the joints connecting the rigid segm= ents together. Each of these 17 degrees of freedom is actuated by a single = torque actuator.

The remaining 6 generalized coordinates represent the 6 degrees of freed= om (3 translational, 3 rotational) between the model's pelvis and the groun= d. To simulate walking, we need some way of representing how the model prop= els itself forward relative to the ground. One way would be to use a foot-g= round contact mechanism.

Instead, we present a simpler solution: represent the 6 degrees of freed= om between the pelvis and the ground as a 6-degree-of-freedom joint between= the pelvis and the ground, and actuate each degree of freedom with its own= torque actuator. Each of these 6 actuators is called a residual actuator. Now our model has 23 degrees of freedom and = 23 actuators, i.e., exactly one actuator per degree of freedom. The three r= esiduals that actuate the 3 translational degrees of freedom between the pe= lvis and the ground are the residu= al forces, whose values we denote by , , and . The 3 rotational degrees of freedom are= actuated by the residual torques<= /em> (or moments), whose values we denote by , , and . <= /span> is the force applied along the X (forward) axis, is the force applied along the = Y (vertical) axis, is the torque applied about the X (forward axis), and so on= .

Typically, modeling assumptions (e.g., having a model with no arms), noi= se, and other errors from motion capture data lead to dynamic inconsistency; essentially, the gro= und reaction forces and acceleration estimated from measured marker kinemat= ics for a subject do not satisfy Newton's Second Law,

=20 =20 =20 Roughly speaking, the 6 residuals amount to adding a new force to the eq= uation that accounts for inconsistency:

=20 =20 =20 # Res= idual Reduction Algorithm (RRA)

## Tracking Simulat= ion

RRA begins by placing the model in the starting configuration, i.e., by = setting the values of the model's generalized coordinates to the values com= puted by the inverse kinematics (IK) tool for the user-specified initial ti= me (specified in the setup file as the <initial_time> property). Repeatedly, RRA takes = small steps forward in time (with each time step of .001) until the user-sp= ecified final time (specified under the Settings Files and XML Tag Definiti= ons on Optimization Parameters).

At the end of the simulation, the average value for each residual actuat= or is computed. The average values for (the left-right residual torque) and&nb= sp; (the fore= -aft residual torque) are used to adjust the torso mass center to correct e= xcessive "leaning" of the model due to inaccuracies in the mass distributio= n and geometry of the torso in the model. A new model file containing the a= djusted torso mass center (specified in the setup file under the <output_model_file> property) is cr= eated.

The average value of is used to compute the recommended mass changes for al= l of the body segments. The desired mass change is:

=20 =20 =20 where g =3D -9.80665 m/s2. This mass change is then = divided up proportionally among the body segments. The computed mass change= s are recommended to the user, who can make these changes in the OpenSim mo= del file by hand. The recommended mass changes are NOT applied to the model= automatically.

The same tracking simulation process is then repeated with three importa= nt differences:

• The model with the adjusted torso mass center is used
• The residuals are weighted more heavily to make the optimizer choose sm= aller values for the residuals when minimizing the objective function
• minimum and maximum limits are placed on the residual values

The goal of these restrictions on the = residual values is to reduce the need for residuals to the absolute minimum= that is necessary to closely follow the desired kinematics so that the mot= ion is generated purely by internal joint moments. During computed muscle c= ontrol (CMC), the next stage of OpenSim, the moments will be generated by f= orces exerted by muscles. This way, biomechanical results about muscle func= tion concluded from CMC will be closer to reality than if we let the residu= als be arbitrarily large.

With these restrictions placed on the residuals, the model's motion will= likely be altered since the residuals may not be allowed to reach the magn= itudes that would result from inverse dynamics while following the kinemati= cs from IK exactly. If the minimum and/or maximum allowed residual values a= re too restrictive, the motion will be altered so dramatically that the res= ults of RRA cannot be used to generate a realistic simulation with CMC. If = the residual minimum and/or maximum values are too lenient, then the residu= als will still be large enough to exert forces that might normally be exert= ed by muscles, and thus the results would lead to unrealistic muscle functi= on from CMC.

=20

Previous: Getting = Started with RRA

=20