Class DLControlStrategy
Maps a deep-learning regression vector (8 outputs) to prosthetic Degrees of Actuation.
Implements
Inherited Members
Namespace: MOSAIC.Components.Manager.ControlAlgorithm
Assembly: MOSAIC.dll
Syntax
public class DLControlStrategy : ControlStrategyBase, IControlAlgorithmStrategy
Remarks
The prediction vector must follow this public interface contract:
| Index | Output | Range |
|---|---|---|
| 0 | Index finger | [0, 1] |
| 1 | Middle finger | [0, 1] |
| 2 | Ring finger | [0, 1] |
| 3 | Little finger | [0, 1] |
| 4 | Thumb flexion | [0, 1] |
| 5 | Wrist flex(+) / ext(-) | [-1, 1] |
| 6 | Wrist pron(+) / sup(-) | [-1, 1] |
| 7 | Wrist 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
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
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 |