signalTimeFeatureExtractor
Description
Use signalTimeFeatureExtractor to extract time-domain features
      from a signal. You can use the extracted features to train a machine learning model or a deep
      learning network.
Creation
Description
sFE = signalTimeFeatureExtractorsignalTimeFeatureExtractor object with default property values.
sFE = signalTimeFeatureExtractor(PropertyName=Value)signalTimeFeatureExtractor
          object. For example,
          
sFE = signalTimeFeatureExtractor(FeatureFormat="table",Mean=true,THD=true)signalTimeFeatureExtractor object that extracts the mean and total harmonic distortion
          (THD) of a signal and returns the features in table format.Properties
Object Functions
| extract | Extract time-domain, frequency-domain, or time-frequency-domain features | 
| generateMATLABFunction | Create MATLAB function compatible with C/C++ code generation | 
| getScalarizationMethods | Get scalarization methods for domain-specific signal features | 
| setScalarizationMethods | Set scalarization methods for domain-specific signal features | 
Examples
More About
Algorithms
Assume an input signal x sampled at a rate Fs, from
      which to extract time-domain features. When you specify signal framing properties (FrameSize, FrameRate or FrameOverlapLength, and IncompleteFrameRule), the feature extractor sets up the signal partitioning
      operation for x to extract features for each frame. This table shows the
      equivalent syntaxes that signalTimeFeatureExtractor uses to partition the signal
        x into frames of size fl, frame rate
        fr or frame overlap length ol, and incomplete frame
      rule ifr.
| Frame Specifications | Feature Extractor Object Specification | Signal Framing Operation Equivalency | 
|---|---|---|
| sFE = signalTimeFeatureExtractor( ... FrameSize=fl,FrameRate=fr, ... IncompleteFrameRule=ifr); | xFrames = framesig(x,fl, ... OverlapLength=fl-fr, ... IncompleteFrameRule=ifr); | |
| sFE = signalTimeFeatureExtractor( ... FrameSize=fl,FrameOverlapLength=ol, ... IncompleteFrameRule=ifr); | xFrames = framesig(x,fl, ... OverlapLength=ol, ... IncompleteFrameRule=ifr); | 
If you do not specify signal framing properties, signalTimeFeatureExtractor
      considers x as a single-framed signal.
Given the single-framed input signal x and sample rate
        Fs, this table lists the equivalent syntaxes for extracting features
      using the signalTimeFeatureExtractor object and the individual feature extractor
        functions.
| Features | Feature Extractor Object | Individual Feature Extractors | 
|---|---|---|
| 
 
 | sFE = signalTimeFeatureExtractor( ... SampleRate=Fs, ... Mean=true, ... RMS=true, ... StandardDeviation=true, ... ShapeFactor=true, ... SNR=true, ... THD=true, ... SINAD=true, ... PeakValue=true, ... CrestFactor=true, ... ClearanceFactor=true, ... ImpulseFactor=true); features = extract(sFE,x); | features = [ ... mean(x) ... rms(x) ... std(x) ... rms(x)/mean(abs(x)) ... snr(x) ... thd(x) ... sinad(x) ... max(abs(x)) ... max(abs(x))/rms(x) ... max(abs(x))/mean(sqrt(abs(x)))^2 ... max(abs(x))/mean(abs(x)) ... ]; | 
Note
To obtain the equivalent syntax for the feature extraction setup based on the
          properties specified when you create the signalTimeFeatureExtractor object, use
            generateMATLABFunction.
References
[1] Chan, Adrian D.C., and Geoffrey C. Green. 2007. "Myoelectric Control Development Toolbox." Paper presented at 30th Conference of the Canadian Medical & Biological Engineering Society, Toronto, Canada, 2007.


