#include <rdActuatorForceTargetFast.h>
Public Member Functions | |
virtual | ~rdActuatorForceTargetFast () |
Destructor. | |
rdActuatorForceTargetFast (int aNX, rdCMC *aController) | |
Constructor. | |
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 values. | |
Private Attributes | |
rdCMC * | _controller |
Model. | |
OpenSim::Array< double > | _modelControls |
Work array of the model controls. | |
OpenSim::Array< double > | _y |
Work array of the states. | |
OpenSim::Array< double > | _dydt |
Work array of the derivatives 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. | |
OpenSim::Array< double > | _recipAreaSquared |
Reciprocal of actuator area squared. |
The performance criterion is the sum of actutor stresses squared. The desired accelerations are achieved by imposing a set of constraints. The desired accelerations are computed according to the Proportional Derivative (PD) control in order to drive the dynamic model toward a set of target kinematic trajectories.
Because the desired accelerations are achieved by imposing a set of linear hard constraints, this optimiztion target can fail if the desired accelreations cannot be achieved. To insure that the constraints can be achieved, a number of sufficiently strong actuators can be added to the model. Althernatively, one can use a different optimization target rdActuatorForceTarget. The benefits of using the fast target are both speed and tracking accuracy.
|
Constructor.
|
|
Compute performance and the constraints given x. Note - used by paramopt.
|
|
Compute constraint ic given x. Note that the indexing starts at 1;
|
|
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.
|