|
Calling Sequence
|
|
ShortTimeBandPower( signal, options )
ShortTimeMeanFrequency( signal, options )
ShortTimeSpectralEntropy( signal, options )
|
|
Parameters
|
|
signal
|
-
|
1-D rtable or list of data.
|
|
|
|
|
Options
|
|
•
|
samplerate: Positive numeric value for the sampling rate. The default is 1.0.
|
•
|
overlapsize: Non-negative integer which specifies the target minimum overlap size of the segments. The default is 0.
|
•
|
segmentsize: Positive integer for the size of the overlapping segments. The default is the largest power of 2 that is not larger than the size of signal.
|
•
|
fftnormalization: One of none, symmetric, or full, indicates the normalization to be applied when using the Fast Fourier Transform (FFT). The default is symmetric.
|
•
|
temperendpoints: Either true or false, specifies whether the short-time power spectra are to be tempered at the endpoints. The default is false.
|
•
|
window: Either a list, name, or string, specifies the windowing command to be applied to the overlapping segments. The default is "none" (for no windowing to be applied). If a list is passed, the first element provides the name of the windowing command, and any remaining terms are passed as options to the command.
|
•
|
windownormalization: Either true or false, indicates if the windowing function is to be normalized. The default is true.
|
•
|
frequencyunit: Unit which specifies the unit of frequency. The default is Unit(Hz). Either of the forms algebraic or Unit(algebraic) is accepted, and the unit must be convertible to a valid unit of frequency.
|
•
|
timeunit: Unit which specifies the unit of time. The default is Unit(s). Either of the forms algebraic or Unit(algebraic) is accepted, and the unit must be convertible to a valid unit of time.
|
•
|
frequencyrange: (optional) Range of numeric frequency values used to filter (i.e. band-limit) the data. If omitted, all frequencies are considered.
|
•
|
method: (optional) The method of numerical integration to be used to find band power. The options are leftendpoint, rightendpoint, simpson, and trapezoid. The default is trapezoid, which is equivalent to finding the area under the linear interpolation through all the points.
|
•
|
bandpowerplotoptions: (optional) List of additional plot options to be passed when creating the band power plot. The default is [].
|
•
|
meanfrequencyplotoptions: (optional) List of additional plot options to be passed when creating the mean frequency plot. The default is [].
|
•
|
entropyplotoptions: (optional) List of additional plot options to be passed when creating the entropy plot. The default is [].
|
•
|
output: (optional) The type of output. The supported options are:
|
–
|
bandpower: Returns a Vector of float[8] datatype containing the Short-Time Band Power (STBP). This is the default for ShortTimeBandPower.
|
–
|
bandpowerplot: Returns a plot of the bandpower Vector versus time.
|
–
|
entropy: Returns a Vector of float[8] datatype containing the Short-Time Spectral Entropy (STSE). This is the default for ShortTimeSpectralEntropy.
|
–
|
entropyplot: Returns a plot of the entropy Vector versus time.
|
–
|
meanfrequency: Returns a Vector of float[8] datatype containing the Short-Time Mean Frequency (STMF). This is the default for ShortTimeMeanFrequency.
|
–
|
meanfrequencyplot: Returns a plot of the meanfrequency Vector versus time.
|
–
|
signal: Returns a Matrix of float[8] or complex[8] datatype containing the signal, with each column representing a short-time segment.
|
–
|
stps: Returns a Matrix of float[8] datatype containing the Short-Time Power Spectrum (STPS).
|
–
|
frequencies: Returns a Vector, of float[8] datatype and length the same as signal, containing the frequencies.
|
–
|
times: Returns a Vector, of float[8] datatype and length the same as signal, containing the times.
|
–
|
record: Returns a record with the previous options.
|
–
|
list of any of the above options: Returns an expression sequence with the corresponding outputs, in the same order.
|
|
|
Description
|
|
•
|
The ShortTimeBandPower, ShortTimeMeanFrequency, and ShortTimeSpectralEntropy commands take a 1-D rtable or list signal, and first compute the Short-Time Power Spectrum (STPS) Matrix using the ShortTimeFourierTransform command and the provided options. The Short-Time Band Power is the Vector having elements calculated as the band power of column of using the BandPower command and the provided options, including frequencyrange. The Short-Time Mean Frequency and Short-Time Spectral Entropy are defined in a similar way, and use, respectively, the MeanFrequency and SpectralEntropy commands.
|
•
|
The values of , , and must satisfy , , , , and .
|
•
|
Maple will attempt to coerce the provided signal to a 1-D Vector of either float[8] or complex[8] datatype, and an error will be thrown if this is not possible. For this reason, it is most efficient for the passed input to use this datatype.
|
•
|
The input signal cannot have an indexing function, and must use rectangular storage.
|
•
|
The ShortTimeBandPower, ShortTimeMeanFrequency, and ShortTimeSpectralEntropy commands are not thread safe.
|
|
|
Examples
|
|
>
|
|
|
Example 1
|
|
>
|
|
| (1) |
|
|
Example 2
|
|
>
|
|
| (2) |
|
|
Detecting Noise
|
|
|
Pure Signal
|
|
•
|
First, construct a signal over time interval from a pure sinusoid:
|
>
|
|
>
|
|
| (3) |
>
|
|
>
|
|
•
|
Now, find the spectral entropy of the pure signal, along with the plot:
|
>
|
|
|
|
Noisy Signal
|
|
•
|
Second, we add some noise:
|
>
|
|
>
|
|
•
|
With noise, of course, the short-time entropy changes:
|
>
|
|
|
|
Comparison
|
|
•
|
As we see from a plot of the original and noisy signals, the noise conceals the pure sinusoid:
|
>
|
|
•
|
However, the plot of the short-time spectral entropy indicates the locations where the original signal is strongest (namely, where the entropy is lowest and has the highest information content) and weakest (where the entropy is highest).
|
|
|
|
|
Compatibility
|
|
•
|
The SignalProcessing[ShortTimeBandPower], SignalProcessing[ShortTimeMeanFrequency] and SignalProcessing[ShortTimeSpectralEntropy] commands were introduced in Maple 2021.
|
|
|
|