Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

rdActuatorForceTargetFast Class Reference

A Computed Muscle Control (CMC) optimization target for controlling dynamic systems whose actuators may be themselves governed by differential equations, meaning there may be non-linear behavior and delays in force production. More...

#include <rdActuatorForceTargetFast.h>

List of all members.

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.


Detailed Description

A Computed Muscle Control (CMC) optimization target for controlling dynamic systems whose actuators may be themselves governed by differential equations, meaning there may be non-linear behavior and delays in force production.

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.

Version:
1.0
Author:
Frank C. Anderson


Constructor & Destructor Documentation

rdActuatorForceTargetFast::rdActuatorForceTargetFast int  aNX,
rdCMC aController
 

Constructor.

Parameters:
aNX Number of controls.
aController Parent controller.


Member Function Documentation

int rdActuatorForceTargetFast::compute double *  x,
double *  p,
double *  c
 

Compute performance and the constraints given x.

Note - used by paramopt.

Parameters:
x Array of controls.
p Value of the performance criterion.
c Array of constraint values.
Returns:
Status (normal termination = 0, error < 0).

int rdActuatorForceTargetFast::computeConstraint double *  x,
int  ic,
double *  c
 

Compute constraint ic given x.

Note that the indexing starts at 1;

Parameters:
x Array of controls.
ic Index of the constraint (indexing starts at 1, not 0).
c Value of constraint ic.
Returns:
Status (normal termination = 0, error < 0).

int rdActuatorForceTargetFast::computeConstraintGradient double *  x,
int  ic,
double *  dcdx
 

Compute the gradient of constraint i given x.

Parameters:
x Array of controls.
ic Index of the constraint (indexing starts at 1, not 0).
dcdx Derivative of constraint ic with respect to the controls.
Returns:
Status (normal termination = 0, error < 0).

int rdActuatorForceTargetFast::computeGradients double *  dx,
double *  x,
double *  dpdx,
double *  dcdx
 

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.

Parameters:
dx Array of perturbations for numerical derivatives.
x Array of controls.
dpdx Derivative of the performance criterion with respect to the controls.
dcdx Matrix of derivatives of the constraints with respect to the controls.
Returns:
Status (normal termination = 0, error < 0).

int rdActuatorForceTargetFast::computePerformance double *  aX,
double *  rP
 

Compute performance given x.

Parameters:
aF Array of controls.
rP Value of the performance criterion.
Returns:
Status (normal termination = 0, error < 0).

int rdActuatorForceTargetFast::computePerformanceGradient double *  x,
double *  dpdx
 

Compute the gradient of performance given x.

Parameters:
x Array of controls.
dpdx Derivatives of performance with respect to the controls.
Returns:
Status (normal termination = 0, error < 0).


The documentation for this class was generated from the following files:
Generated on Wed Nov 1 16:04:32 2006 for Computed Muscle Control (CMC) API by doxygen 1.3.8