Class DLControlStrategy

Maps a deep-learning regression vector (8 outputs) to prosthetic Degrees of Actuation.

Inheritance
DLControlStrategy
Namespace: MOSAIC.Components.Manager.ControlAlgorithm
Assembly: MOSAIC.dll
Syntax
public class DLControlStrategy : ControlStrategyBase, IControlAlgorithmStrategy
Remarks

The prediction vector must follow this public interface contract:

IndexOutputRange
0Index finger[0, 1]
1Middle finger[0, 1]
2Ring finger[0, 1]
3Little finger[0, 1]
4Thumb flexion[0, 1]
5Wrist flex(+) / ext(-)[-1, 1]
6Wrist pron(+) / sup(-)[-1, 1]
7Wrist ulnar(+) / radial(-)[-1, 1]

Finger values are scaled from [0,1] to [0,100] via MapDirect(DegreesOfActuation, Vector<double>, int). Wrist values are scaled from [-1,+1] to [0,100] via MapBipolar(DegreesOfActuation, Vector<double>, int, bool, double) (50 = neutral).

Properties

FingerDeadband

Deadband for finger outputs [0,1]. Values below this threshold map to 0. Adjustable at runtime from UI.

Declaration
public double FingerDeadband { get; set; }
Property Value
Type Description
double

Name

Name of this strategy (used for JSON export and UI display).

Declaration
public override string Name { get; }
Property Value
Type Description
string
Overrides
ControlStrategyBase.Name

WristDeadband

Deadband for wrist outputs [-1,+1]. Absolute values below this snap to neutral (50). Adjustable at runtime from UI.

Declaration
public double WristDeadband { get; set; }
Property Value
Type Description
double

Methods

InitializeDefaults()

Initialize DOA default values. Override this in derived classes.

Declaration
protected override void InitializeDefaults()
Overrides
ControlStrategyBase.InitializeDefaults()

MapDirectWithDeadband(DegreesOfActuation, Vector<double>, int, double)

Maps a [0,1] prediction to [0,100] with a deadband below which the output is 0.

Declaration
private void MapDirectWithDeadband(DegreesOfActuation doa, Vector<double> prediction, int index, double deadband)
Parameters
Type Name Description
DegreesOfActuation doa
Vector<double> prediction
int index
double deadband

ProcessPrediction(Vector<double>)

Processes a prediction vector and updates actuation values.

Declaration
public override void ProcessPrediction(Vector<double> prediction)
Parameters
Type Name Description
Vector<double> prediction
Overrides
ControlStrategyBase.ProcessPrediction(Vector<double>)

Implements

IControlAlgorithmStrategy

Search documentation

Start typing to search the documentation.