Digital Signal Processing
Digital Signal Processing
Digital Signal Processing (DSP) option enables automatic processing of raw data and feature extraction for data from gyroscopes, accelerometers, magnetometers, electromyography (EMG), etc. To preprocess audio files, use our desktop app.
For Digital Signal Processing, the type of normalization will be:
Features created in Feature Extraction will be normalized within their own scale.
Lag features (raw data) will be normalized within the scale of each variable/axis from which they were extracted.
If you turn on the Windowing option, you will see that the normalization type is automatically changed to Autoselection.
Window size is the portion of data that will be used for processing the training dataset (the static window approach is applied on the platform). It should be universal for all events in the training dataset, even if the duration of events is different. Therefore, for correct training of the model, the data in the training and the validation datasets (if applicable) must be brought to the same window using upsampling or downsampling, before loading into the platform.
Using the window size the training dataset will be grouped by a selected number of samples. All variables extracted from the raw data will be calculated from these groups. For correct feature calculation, the recommended minimum window size is 5 samples/lines.
Since the platform is intended for solving TinyML tasks, it is recommended that the maximum window size does not exceed 1000 samples/lines. However, it all depends on your data and there are no technical restrictions on the window size in the platform.
You have 3 options for the windowing specification:
In Number of Rows/Samples
In Number of Rows/Samples
The platform default is 128, but you can specify the count of rows to use for windowing. For example, for the following dataset:
the window = 10 samples
Specify window size in ms and frequency in Hz to define window size for the training dataset.
If you use sensors with different frequencies, then you must first bring all signals to a single frequency using downsampling or upsampling.
According to the specified data, the platform will determine the size of the window in samples/lines and it will be used in the future to calculate features and other operations.
Using Fast Fourier Transform this option automatically selects the window size based on the best model quality (this option is available only for the classification task type). For finer tuning of SRAM usage, it is recommended that you manually enter the window size and frequency of data.
If you plan to use frequency features to solve your problem, then the window size should be a multiple of a power of two.
Estimated SRAM Usage
SRAM depends on the window you choose and the list of features that will be created from the raw data.
If you have selected auto-detection of the window, then the estimated SRAM usage will not be calculated as the platform will determine the size of the window after the start of training
Estimated SRAM. Auto Determination Enabled.
The option is only available if the user has specified the window size.
Feature Extraction, Feature Selection and Model Settings
When the window size is specified, the platform automatically extracts the following features for each column in the training dataset. The same feature extraction will be automatically executed during inference on the device. You can manage calculated features for each original variable in the training dataset by marking or unmarking the appropriate checkbox.
If you delete a variable/axis from the Feature Extraction block, then no feature will be created for it, and therefore it will not participate in building the model. By default, Feature Extraction uses all variables/axes.
If you have deleted a variable, but want to return it, then use the “Add variables” button.
You can correct the list of features, as well as configure their parameters by clicking on the “pencil” icon next to the list of features.
If you have deleted all features in a variable/axis, then it is automatically excluded from the list of variables/axes. If you have deleted all variables, then Windowing and Feature Extraction are turned off automatically.
The list of supported features is provided below:
Global peak to peak of high frequency. Enabled by default.
Global peak to peak of low frequency. Enabled by default.
You can specify the Smoothing Factor (8 by default) which is the amount of attenuation for frequencies over the cutoff frequency. It is indicated for both features and the requirements for it are the same.
The technically acceptable values of the Smoothing factor for both features are within the window size, but when choosing extreme values, the feature can be calculated with an error. Therefore, the recommended value for the smoothing factor is 10% of the window size.
For example, if the window size is 128:
the recommended smoothing factor is 12-13
deprecated values – 1-4 and 121-12
In this case, choose the value that is best suited for your data and task.
Mean – Enabled by default.
Max – Enabled by default.
Min – Enabled by default.
Root mean square – Enabled by default.
Skewness – Enabled by default.
Kurtosis – Enabled by default.
Mean Absolute Deviation – Enabled by default.
Standard Deviation – Enabled by default.
Mean crossing rate – Enabled by default.
Zero Crossing rate – Enabled by default.
Threshold-crossing Rate – Disabled by default.
For this parameter, the threshold is set by the user. The default value is 0. If you leave it unchanged, the feature will have the same values as the Zero Crossing Rate.
FFT first peak power (disabled by default)
FFT first peak frequency (disabled by default)
FFT second peak power (disabled by default)
FFT second peak frequency (disabled by default)
FFT third peak power (disabled by default)
FFT third peak frequency (disabled by default)
These functions use fast Fourier transform to calculate the frequency of peaks and their power.
If frequency features are selected the window size should be equal to the power of 2.
Lag features – Disabled by default.
Remove Lag Features
The window value for lag features should be more than 2 lines/samples, but not exceed the total window size.
The window for lag features is the same for all variables/axes. Therefore, if you change it in lag features created for one variable/axis, then it will change in lag features for another variable/axis.
The option is available only if the user has selected features in the Feature Extraction block. The following algorithms are available for selecting features (you can choose only 1 of the methods):
The default threshold is 95%, but you can change it.
Recursive Feature Elimination with Cross-validation
With this option enabled Recursive feature elimination will be executed by diverse machine learning algorithms with cross-validation.
Feature selection will include all created features for all variables/axes in the Feature Extraction block, except for Lag Features.