OpenSim::ActuatorForceTargetFast 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 <ActuatorForceTargetFast.h>
List of all members.
Public Member Functions |
virtual | ~ActuatorForceTargetFast () |
| Destructor.
|
| ActuatorForceTargetFast (SimTK::State &s, int aNX, CMC *aController) |
| Constructor.
|
bool | prepareToOptimize (const SimTK::State &s, double *x) |
int | objectiveFunc (const SimTK::Vector &aF, const bool new_coefficients, SimTK::Real &rP) const |
int | gradientFunc (const SimTK::Vector &x, const bool new_coefficients, SimTK::Vector &gradient) const |
int | constraintFunc (const SimTK::Vector &x, const bool new_coefficients, SimTK::Vector &constraints) const |
| Compute constraint ic given x.
|
int | constraintJacobian (const SimTK::Vector &x, const bool new_coefficients, SimTK::Matrix &jac) const |
| Compute the gradient of constraint i given x.
|
CMC * | getController () |
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 ActuatorForceTarget. The benefits of using the fast target are both speed and tracking accuracy.
- Version:
- 1.0
- Author:
- Frank C. Anderson
Constructor & Destructor Documentation
ActuatorForceTargetFast::~ActuatorForceTargetFast |
( |
|
) |
[virtual] |
ActuatorForceTargetFast::ActuatorForceTargetFast |
( |
SimTK::State & |
s, |
|
|
int |
aNX, |
|
|
CMC * |
aController | |
|
) |
| | |
Constructor.
- Parameters:
-
| aNX | Number of controls. |
| aController | Parent controller. |
Member Function Documentation
int ActuatorForceTargetFast::constraintFunc |
( |
const SimTK::Vector & |
x, |
|
|
const bool |
new_coefficients, |
|
|
SimTK::Vector & |
constraints | |
|
) |
| | const |
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 ActuatorForceTargetFast::constraintJacobian |
( |
const SimTK::Vector & |
x, |
|
|
const bool |
new_coefficients, |
|
|
SimTK::Matrix & |
jac | |
|
) |
| | const |
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).
CMC* OpenSim::ActuatorForceTargetFast::getController |
( |
|
) |
[inline] |
int OpenSim::ActuatorForceTargetFast::gradientFunc |
( |
const SimTK::Vector & |
x, |
|
|
const bool |
new_coefficients, |
|
|
SimTK::Vector & |
gradient | |
|
) |
| | const |
int OpenSim::ActuatorForceTargetFast::objectiveFunc |
( |
const SimTK::Vector & |
aF, |
|
|
const bool |
new_coefficients, |
|
|
SimTK::Real & |
rP | |
|
) |
| | const |
bool ActuatorForceTargetFast::prepareToOptimize |
( |
const SimTK::State & |
s, |
|
|
double * |
x | |
|
) |
| | [virtual] |
The documentation for this class was generated from the following files:
- OpenSim/Tools/ActuatorForceTargetFast.h
- OpenSim/Tools/ActuatorForceTargetFast.cpp