signalFrequencyFeatureExtractor
Description
Use signalFrequencyFeatureExtractor
to extract frequency-domain
features from a signal. You can use the extracted features to train a machine
learning model or a deep learning network.
Creation
Syntax
Description
creates a sFE
= signalFrequencyFeatureExtractorsignalFrequencyFeatureExtractor
object with default property
values.
specifies nondefault property values of the
sFE
= signalFrequencyFeatureExtractor(PropertyName=Value
)signalFrequencyFeatureExtractor
object. For example,
sFE = signalFrequencyFeatureExtractor( ...
FrameSize=30,FrameOverlapLength=6,MeanFrequency=true)
signalFrequencyFeatureExtractor
object that partitions a signal into overlapping 30-sample
frames and extracts the mean frequency feature from the power spectral density estimate of
each frame.Properties
Object Functions
extract | Extract time-domain, frequency-domain, or time-frequency-domain features |
generateMATLABFunction | Create MATLAB function compatible with C/C++ code generation |
getExtractorParameters | Get current parameter values of feature extractor object |
getScalarizationMethods | Get scalarization methods for domain-specific signal features |
setExtractorParameters | Set nondefault parameter values for feature extractor object |
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 frequency-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 signalFrequencyFeatureExtractor
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 = signalFrequencyFeatureExtractor( ... FrameSize=fl,FrameRate=fr, ... IncompleteFrameRule=ifr); |
xFrames = framesig(x,fl, ... OverlapLength=fl-fr, ... IncompleteFrameRule=ifr); | |
sFE = signalFrequencyFeatureExtractor( ... FrameSize=fl,FrameOverlapLength=ol, ... IncompleteFrameRule=ifr); |
xFrames = framesig(x,fl, ... OverlapLength=ol, ... IncompleteFrameRule=ifr); |
If you do not specify signal framing properties, signalFrequencyFeatureExtractor
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 signalFrequencyFeatureExtractor
object and the individual feature extractor
functions.
Features | Feature Extractor Object | Individual Feature Extractors |
---|---|---|
|
sFE = signalFrequencyFeatureExtractor( ... SampleRate=Fs, ... MeanFrequency=true, ... MedianFrequency=true, ... BandPower=true, ... OccupiedBandwidth=true, ... PowerBandwidth=true, ... WelchPSD=true, ... PeakAmplitude=true, ... PeakLocation=true); features = extract(sFE,x); |
[P,F] = pwelch(x,[],[],[],Fs); features = [ ... meanfreq(P,F) ... medfreq(P,F) ... bandpower(P,F,"psd") ... obw(P,F) ... powerbw(P,F) ... P' ... P(islocalmax(P,MaxNumExtrema=1)) ... F(islocalmax(P,MaxNumExtrema=1)) ... ]; |
Note
Because
signalFrequencyFeatureExtractor
reuses intermediary representations, the features thatsignalFrequencyFeatureExtractor
outputs might not correspond with the default configuration of features output by the corresponding individual feature extraction functions.To obtain the equivalent syntax for the feature extraction setup based on the properties specified when you create the
signalFrequencyFeatureExtractor
object, usegenerateMATLABFunction
.