Closed klues closed 5 years ago
@deinhofer @ChrisVeigl @benjaminaigner @sabicalija review/comments on this PR are welcome.
I'm not sure if I understand it entirely. You'll have to explain it to me, during a coffee. :wink:
Note: A PID controller (plugin) might be useful in this use case too. But I guess it depends on what you want to achieve.
Since I'll also make changes in other plugins, I'll create separate pull request for each change on each plugin to keep PRs smaller and hopefully more understandable. So I'm closing this now.
New PRs with separate changes are now:
@benjaminaigner @ChrisVeigl @deinhofer @sabicalija reviews/comments to these PRs are welcome.
For EMG-value processing for evaluations with CB, I needed some new functionalities for the plugins Averager, ComPort and SignalTranslation:
1. Averager
2. ComPort
3. SignalTranslation
Changes (1) and (3) make constructions like this possible:
A long-term average
avg
of a raw EMG-signal (out3
) is calculated and by two math evaluators a range betweenavg + noiseoffset
andavg + upperbound
is calculated. This range is used for min/max of a SignalTranslation instance, scaling the useful signal to a range of e.g.0-100
. The problem of this approach is that the useful, higher signals are also averaged and therefore many/long signals in the useful range will gradually raiseavg
and therefore will distort the whole calculation. Solution using the new functionalities: as long as the signal is in the useful range, the averager is stopped (see event connections in the screenshot). Therefore only noise and a potential offset will be averaged andavg
will stay a solid base for the calculation, even if there are many signals in the useful range.Change (2) for the ComPort makes it possible to use the COM-port as one of several data sources in a model and prevent the error-message at startup, if the COM-port is not used and not available.
See model https://github.com/asterics/AsTeRICS/blob/klaus/test-add-eventports-averager-signal-translation/bin/ARE/models/useCaseDemos/EEG%26EMG/emg_configurator.acs using change (2) and e.g. model https://github.com/asterics/AsTeRICS/blob/klaus/test-add-eventports-averager-signal-translation/bin/ARE/models/useCaseDemos/mouseControl/crosshairCursorControl_1EMG.acs using changes (1) and (3).