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

rdActuatorForceTarget 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 <rdActuatorForceTarget.h>

List of all members.

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.


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 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

See also:
rdActuatorForceTargetFast.
Version:
1.0
Author:
Frank C. Anderson


Constructor & Destructor Documentation

rdActuatorForceTarget::rdActuatorForceTarget int  aNX,
rdCMC aController
 

Constructor.

Parameters:
aNX Number of controls.
aController Parent controller.


Member Function Documentation

int rdActuatorForceTarget::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 rdActuatorForceTarget::computeConstraint double *  x,
int  ic,
double *  c
 

Compute constraint ic given x.

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 rdActuatorForceTarget::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 rdActuatorForceTarget::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 rdActuatorForceTarget::computePerformance double *  aF,
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 rdActuatorForceTarget::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).

void rdActuatorForceTarget::setStressTermWeight double  aWeight  ) 
 

Set the weight of the actuator force stress term in the performance criterion.

Parameters:
aWeight Weight premultiplying the sum squared stresses.


Member Data Documentation

double rdActuatorForceTarget::_stressTermWeight [private]
 

Weight used to scale the stress term of objective function.

*


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