#include <rdActuatorForceTarget.h>
Public Member Functions | |
virtual | ~rdActuatorForceTarget () |
Destructor. | |
rdActuatorForceTarget (int aNX, rdCMC *aController) | |
Constructor. | |
void | setStressTermWeight (double aWeight) |
Set the weight of the actuator force stress term in the performance criterion. | |
int | compute (double *x, double *p, double *c) |
Compute performance and the constraints given x. | |
int | computeGradients (double *dx, double *x, double *dpdx, double *dcdx) |
Compute the gradients of the performance and the constraints given x. | |
int | computePerformance (double *x, double *p) |
Compute performance given x. | |
int | computePerformanceGradient (double *x, double *dpdx) |
Compute the gradient of performance given x. | |
int | computeConstraint (double *x, int i, double *c) |
Compute constraint ic given x. | |
int | computeConstraintGradient (double *x, int i, double *dcdx) |
Compute the gradient of constraint i given x. | |
Private Member Functions | |
void | setNull () |
Set all member variables to their NULL or default values. | |
Private Attributes | |
rdCMC * | _controller |
Parent controller. | |
OpenSim::Array< double > | _x |
Work array of the controls. | |
OpenSim::Array< double > | _y |
Work array of the states. | |
OpenSim::Array< double > | _dydt |
Work array of the derivatives of the states. | |
OpenSim::Array< double > | _dqdt |
Array of the derivatives of the generalized coordinates. | |
OpenSim::Array< double > | _dudt |
Array of the derivatives of the generalized speeds. | |
double | _stressTermWeight |
Weight used to scale the stress term of objective function. |
The performance criterion is a sum of two terms. The first term is the sum of actutor stresses squared. The second term is a weighted sum of terms designed to achieve a set of desired accelerations that will drive the dynamic model toward a set of target kinematic trajectories. The desired accelerations are according to the Proportional Derivative (PD) control law.
Because the performance criterion is simply a long sum of things, achieving the desired accelerations can be compromised in order to reduce the forces (or moments) applied by the actutors. This feature is what is exploited by the Residual Reduction Algorithm.
Although this target is fairly robust (meaning the optimizer should not fail to find a solution), it is a bit slower and less accurate than the "fast" target
|
Constructor.
|
|
Compute performance and the constraints given x. Note - used by paramopt.
|
|
Compute constraint ic given x.
|
|
Compute the gradient of constraint i given x.
|
|
Compute the gradients of the performance and the constraints given x. The array dx is an array of perturbation sizes which can be used to compute the gradients numerically. Note- used by paramopt.
|
|
Compute performance given x.
|
|
Compute the gradient of performance given x.
|
|
Set the weight of the actuator force stress term in the performance criterion.
|
|
Weight used to scale the stress term of objective function. * |