API  4.0
For C++ developers
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...

+ Inheritance diagram for OpenSim::ActuatorForceTargetFast:

Public Member Functions

virtual ~ActuatorForceTargetFast ()
 
 ActuatorForceTargetFast (SimTK::State &s, int aNX, CMC *aController)
 
bool prepareToOptimize (SimTK::State &s, double *x) override
 
int objectiveFunc (const SimTK::Vector &aF, bool new_coefficients, SimTK::Real &rP) const override
 
int gradientFunc (const SimTK::Vector &x, bool new_coefficients, SimTK::Vector &gradient) const override
 
int constraintFunc (const SimTK::Vector &x, bool new_coefficients, SimTK::Vector &constraints) const override
 
int constraintJacobian (const SimTK::Vector &x, bool new_coefficients, SimTK::Matrix &jac) const override
 
CMCgetController ()
 
- Public Member Functions inherited from OpenSim::OptimizationTarget
 OptimizationTarget (int aNX=0)
 
void setNumParameters (const int aNX)
 
void setDX (double aVal)
 
void setDX (int aIndex, double aVal)
 
double getDX (int aIndex)
 
double * getDXArray ()
 
void validatePerturbationSize (double &aSize)
 
virtual void printPerformance (double *x)
 
- Public Member Functions inherited from SimTK::OptimizerSystem
 OptimizerSystem ()
 
 OptimizerSystem (int nParameters)
 
virtual ~OptimizerSystem ()
 
virtual int hessian (const Vector &parameters, bool new_parameters, Vector &gradient) const
 
void setNumParameters (const int nParameters)
 
void setNumEqualityConstraints (const int n)
 
void setNumInequalityConstraints (const int n)
 
void setNumLinearEqualityConstraints (const int n)
 
void setNumLinearInequalityConstraints (const int n)
 
void setParameterLimits (const Vector &lower, const Vector &upper)
 
int getNumParameters () const
 
int getNumConstraints () const
 
int getNumEqualityConstraints () const
 
int getNumInequalityConstraints () const
 
int getNumLinearEqualityConstraints () const
 
int getNumNonlinearEqualityConstraints () const
 
int getNumLinearInequalityConstraints () const
 
int getNumNonlinearInequalityConstraints () const
 
bool getHasLimits () const
 
void getParameterLimits (Real **lower, Real **upper) const
 

Additional Inherited Members

- Static Public Member Functions inherited from OpenSim::OptimizationTarget
static int CentralDifferencesConstraint (const OptimizationTarget *aTarget, double *dx, const SimTK::Vector &x, SimTK::Matrix &jacobian)
 
static int CentralDifferences (const OptimizationTarget *aTarget, double *dx, const SimTK::Vector &x, SimTK::Vector &dpdx)
 
static int ForwardDifferences (const OptimizationTarget *aTarget, double *dx, const SimTK::Vector &x, SimTK::Vector &dpdx)
 
- Static Public Attributes inherited from OpenSim::OptimizationTarget
static const double SMALLDX
 Smallest allowable perturbation size for computing derivatives. More...
 
- Protected Attributes inherited from OpenSim::OptimizationTarget
Array< double > _dx
 Perturbation size for computing numerical derivatives. More...
 

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 actuator 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 optimization target can fail if the desired accelerations cannot be achieved. To insure that the constraints can be achieved, a number of sufficiently strong actuators can be added to the model. Alternatively, 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()

virtual OpenSim::ActuatorForceTargetFast::~ActuatorForceTargetFast ( )
virtual

◆ ActuatorForceTargetFast()

OpenSim::ActuatorForceTargetFast::ActuatorForceTargetFast ( SimTK::State s,
int  aNX,
CMC aController 
)

Member Function Documentation

◆ constraintFunc()

int OpenSim::ActuatorForceTargetFast::constraintFunc ( const SimTK::Vector x,
bool  new_coefficients,
SimTK::Vector constraints 
) const
overridevirtual

Reimplemented from SimTK::OptimizerSystem.

◆ constraintJacobian()

int OpenSim::ActuatorForceTargetFast::constraintJacobian ( const SimTK::Vector x,
bool  new_coefficients,
SimTK::Matrix jac 
) const
overridevirtual

Reimplemented from SimTK::OptimizerSystem.

◆ getController()

CMC* OpenSim::ActuatorForceTargetFast::getController ( )
inline

◆ gradientFunc()

int OpenSim::ActuatorForceTargetFast::gradientFunc ( const SimTK::Vector x,
bool  new_coefficients,
SimTK::Vector gradient 
) const
overridevirtual

Reimplemented from SimTK::OptimizerSystem.

◆ objectiveFunc()

int OpenSim::ActuatorForceTargetFast::objectiveFunc ( const SimTK::Vector aF,
bool  new_coefficients,
SimTK::Real rP 
) const
overridevirtual

Reimplemented from SimTK::OptimizerSystem.

◆ prepareToOptimize()

bool OpenSim::ActuatorForceTargetFast::prepareToOptimize ( SimTK::State s,
double *  x 
)
overridevirtual

Reimplemented from OpenSim::OptimizationTarget.


The documentation for this class was generated from the following file: