EMG Widget Breakdown

In a nutshell, we are trying to map the current flex of a muscle into the "comfortable flex range" of said muscle, and then represent that as a decimal between 0 and 1. Having the normalized value is nice because then you can apply it as scalar to any other variable, allowing for a pseudo-analog mapping of the strength of any muscle flex to an arbitrary output. In theory, if you relax, the value will be 0, and if you flex, the value will go to 1. The current EMG strength is a collection of raw voltage values averaged (or smoothed) over a known window of time. The bigger the window your averaging over, the smoother the data.

We establish an upper threshold (the outer dark blue circle of the circular visualizer) and a lower threshold (the inner dark blue circle) for the constantly updating "comfortable EMG range." Then we're mapping the current EMG (the filled circle that matches the color of the channel) value between the upper and lower thresholds. This pseudo-analog mapped value is represented more clearly in the bar graph off to the right of each channel's circular visualizer. The upper threshold is constantly creeping downwards and lower threshold is constantly creeping upwards until they get the Min ΔuV away from one another. This ensures that the overall system never creates an upper/lower flex range that is too big to influence with a muscle flex. The drop-downs of the widget are designed to allow you to tweak the various parameters of this relationship.

There are 4 drop-downs giving us control over 4 parameters: 
1) Smooth
2) uV Limit 
3) Creep 
4) Min ΔuV

Smooth: 
This is the size of the window. If we set this value at the smallest setting of 0.01 seconds (ie lowering the smooth value), our data will be very jittery but responsive. Alternatively, if we increase the smooth and set our window to 2.0 seconds, the output will be very smooth but not as responsive.

uV Limit: 
This is a cutoff point for an allowable uV value in any individual data block. Any uV values above this number will be chopped off, and set to this upper uV limit. This is to prevent crazy big blips in the data from substantially distorting the average. Sometimes dropped packets and rapid body movements can great large spikes that don't correlate to muscle activity. This helps account for those issues.

Creep: 
This value indicates how quickly the upper uV limit creeps downward and how quickly the lower limit creeps upward. Notice that by adjusting this value, the upper threshold and lower threshold rings will creep inwards more quickly. I prefer this to be slow. If this is too fast and we wait too long between muscle activations, the upper threshold will have crept very close to the lower threshold and the system will be hyper sensitive. This can certainly be improved with a smarter algorithm.

Min ΔuV: 
This value sets the minimum voltage range between the upper threshold and lower threshold. The upper threshold and lower threshold cannot get any closer than this. By making this value bigger, you will have to flex harder to go from 0 to 100% flex, after the thresholds have crept as close as they will get to one another (aka Min ΔuV). 

What do we really care about for controlling things? If we want analog control over an output, I think it's the normalized flex valuerepresented in the bar graph. Or, if we want binary control, maybe we want to use a boolean YES/NO of whether the bar graph is full or not.

I hope that helps clarify things a bit. Let me know if you have any other questions.

Comments

  • retiututretiutut Louisiana, USA
    Thanks Conor! Going to try and add this information to the Docs soon.
Sign In or Register to comment.