Extract Spectral Features
Description
The Extract Spectral Features task lets you interactively extract spectral fault band metrics. The task helps with analyzing and understanding spectral data. Using a comprehensive interface, you can add components to represent various bearings, gear meshes, or other parts of your hardware setup.
As you set the physical parameters of these components, the Extract Spectral Features Live Editor task plots fault frequency bands at the characteristic frequencies of the components. You can overlay power spectrum data on the fault band plot to associate various peaks in the data with the components' characteristic frequencies. These correlations can make fault detection and fault isolation easier, as changes in the power spectrum data can easily be traced back to the physical components causing them. You can also have the task determine the harmonics and sidebands automatically.
In addition to a plot of the characteristic frequencies and the power spectrum data, the task generates spectral metrics of the data within each characteristic frequency band. The output metrics table, which contains the peak amplitude, peak frequency, and band power of each band, aids in characterizing potential mechanical faults. The task automatically generates MATLAB® code for your live script. For more information about Live Editor tasks in general, see Add Interactive Tasks to a Live Script
Open the Task
To add the Extract Spectral Features task to a live script in the MATLAB Editor:
On the Live Editor tab, select Task > Extract Spectral Features.
In a code block in your script, type a relevant keyword, such as
fault bands
ormetrics
. SelectExtract Spectral Features
from the suggested command completions.
Examples
Identify Harmonics and Sidebands Automatically
Use Extract Spectral Features to automatically identify the harmonics and sidebands of an imported signal.
Load the data TVel
. Tvel
is a timetable that contains the combined vibration signal for a machine.
load velocity_data TVel
Specify Time-Domain
for Data Type and import Tvel
.
The task computes and plots the power spectrum.
The task allows you to add individual components that represents machine components such as shafts. In this case, the TVel
signal combines the vibration data of all components. Add a single custom component that represents the machine.
You can manually specify information about the frequency, harmonics, and sidebands. You can also click Auto to have the task compute the values automatically.
The plot shows the harmonics and sidebands, but they are not well grouped with respect to the major peaks.
The detection level, indicated for this component by the blue line, is at around -25 dB. Use the Detection Level slider to move the level to around -10 dB. Alternatively, you can click the blue line in the plot and move it up by dragging.
The band grouping improves somewhat relative to the major peaks.
Cycle through the harmonics by clicking the right arrow in the component section.
This set of frequency bands clearly align with most of the major peaks, but exclude the lower frequency peaks.
Add a new component to capture the fault bands in the lower frequency region. Select Auto and increase the detection level.
Cycle through the harmonics in the new component to find the low frequency harmonics.
The task displays the spectral metrics.
Click Show Code to display the generated code.
Related Examples
Parameters
Data Type
— Data type for input and output data
Power Spectrum
(default) | Time-Domain
The task accepts data in the form of both power spectrum and time-domain data.
Time-domain data can be numeric or packaged in a timetable
.
The data type you choose determines the additional parameters you must specify.
Power Spectrum
— Specify variable names for Frequency vector and Magnitude vector. The variables must already be in your MATLAB workspace.Time-Domain
— Specify the following parameters.Signal — Variable name for the signal.
Variable — For timetable data, the timetable variable that represents the signal.
Sampling rate — Sampling rate in Hz. For timetable data, the task extracts the sampling rate automatically.
Resolution — Spectral resolution. This parameter allows you to trade off spectral leakage due to windowing for separation of nearby spectral peaks.
Add component
— Bearing, gear mesh, or custom hardware representation
'Bearing
' | 'Gear mesh
' | 'Custom
'
Choose between adding a bearing, gear mesh, or custom component. You can name your component and then click the Add button. You can set the physical characteristics of these components using their corresponding parameters. For custom components, you can have the task automatically compute harmonics and sidebands. The Extract Spectral Features Live Editor task plots fault frequency bands at the characteristic frequencies of the components.
Enable component
— Toggle to enable or disable component for spectral metrics computation
on
(default) | off
You can toggle this option to enable or disable the component from being included in the spectral metrics computation. Disabling the component also removes its fault bands from the plot. Use the Delete button to permanently remove a component.
Number of balls
— Number of balls or rollers in bearing
10 (default) | positive integer
Specify the number of rolling elements in the bearing as a positive integer.
Pitch diameter
— Pitch diameter of bearing
35 (default) | positive scalar
Specify the pitch diameter of the bearing as a positive scalar. The pitch diameter is the diameter of the circle that the center of the ball or roller travels during the bearing rotation.
Rotational speed
— Rotational speed of shaft or inner race of bearing
60 (default) | positive scalar
Specify the rotational speed of the shaft or inner race of the bearing as a positive scalar. The rotational speed is the fundamental frequency around which the Extract Spectral Features live task generates the fault frequency bands. The units must be consistent with the unit of the frequency vector.
Contact angle
— Bearing contact angle
0 (default) | non-negative scalar
Specify the contact angle in degrees between a plane perpendicular to the ball or roller axis and the line joining the two raceways.
Ball diameter
— Diameter of ball or roller
10 (default) | positive scalar
Specify the diameter of the ball or roller in the bearing as a positive scalar.
Harmonics
— Harmonics of fundamental frequency
1
(default) | vector of positive integers
Specify the harmonics of the fundamental frequency to be included in the plot and in the spectral metrics computation.
Sidebands
— Sidebands around fundamental frequency and its harmonics to be included
0
(default) | vector of nonnegative integers
Specify the sidebands around the fundamental frequency and its harmonics to be included in the plot and in the spectral metrics computation.
Domain
— Units of fault band frequencies
'frequency'
(default) | 'order'
Specify the units of the fault band frequencies as either
'frequency'
or 'order'
. Select:
'frequency'
if you have the fault bands in the same units as the Rotational speed.'order'
if you have the fault bands as a number of rotations relative to the inner race rotation Rotational speed.
Band width
— Width of frequency bands centered at nominal fault frequencies
auto (default) | positive scalar
Specify the width of the frequency bands centered at the nominal fault frequencies as a positive scalar. Clear the Auto option to specify the width value manually.
Enable component
— Toggle to enable or disable component for spectral metrics computation
on
(default) | off
You can toggle this option to enable or disable the component from being included in the spectral metrics computation. Disabling the component also removes its fault bands from the plot. Use the Delete button to permanently remove a component.
Input gear teeth
— Number of teeth on input gear
10 (default) | positive integer
Specify the number of teeth on the input gear as a positive integer.
Output gear teeth
— Number of teeth on output gear
40 (default) | positive integer
Specify the number of teeth on the output gear as a positive integer.
Rotational speed
— Rotational speed of input gear
60 (default) | positive scalar
Specify the rotational speed of the input gear as a positive scalar. The rotational speed is the fundamental frequency around which the Extract Spectral Features live task generates the fault frequency bands. The units must be consistent with the unit of the frequency vector.
Harmonics
— Harmonics of fundamental frequency to be included
1
(default) | vector of positive integers
Specify the harmonics of the fundamental frequency to be included in the plot and in the spectral metrics computation.
Sidebands
— Sidebands around fundamental frequency and its harmonics to be included
0
(default) | vector of nonnegative integers
Specify the sidebands around the fundamental frequency and its harmonics to be included in the plot and in the spectral metrics computation.
Domain
— Units of fault band frequencies
'frequency'
(default) | 'order'
Specify the units of the fault band frequencies as either
'frequency'
or 'order'
. Select:
'frequency'
if you have the fault bands in the same units as the Rotational speed.'order'
if you have the fault bands as a number of rotations relative to the Rotational speed.
Band width
— Width of frequency bands centered at nominal fault frequencies
auto (default) | positive scalar
Specify the width of the frequency bands centered at the nominal fault frequencies as a positive scalar. Clear the Auto option to specify the width value manually.
Enable component
— Toggle to enable or disable component for spectral metrics computation
on
(default) | off
You can toggle this option to enable or disable the component from being included in the spectral metrics computation. Disabling the component also removes its fault bands from the plot. Use the Delete button to permanently remove a component.
Auto
— Automatically compute harmonic and sideband values
off
(default) | on
Automatically compute harmonic and sideband values for harmonically related groups of spectral peaks. Use the arrows to cycle through each set of frequency groups.
Use Detection Level to raise or lower the threshold of detection so that you control the alignment of the harmonics with the major peaks. You can also change the detection level by dragging the detection line within the spectral plot.
Frequency
— Fundamental frequency of interest
60 (default) | positive scalar
Specify the fundamental frequency of interest as a positive scalar. The Extract Spectral Features live task constructs the fault frequency bands around the fundamental frequency. For instance, to construct fault bands for a faulty induction motor, the mains frequency of 60 Hz is the fundamental frequency of interest. Similarly, to generate fault bands for a faulty gear train, the input shaft frequency is the fundamental frequency.
Harmonics
— Harmonics of fundamental frequency to be included
1
(default) | vector of positive integers
Specify the harmonics of the fundamental frequency to be included in the plot and in the spectral metrics computation.
Sidebands
— Sidebands around fundamental frequency and its harmonics to be included
0
(default) | vector of nonnegative integers
Specify the sidebands around the fundamental frequency and its harmonics to be included in the plot and in the spectral metrics computation.
Separation type
— Type of separation between successive sidebands
'additive'
(default) | 'multiplicative'
Specify the type of separation between successive sidebands as either
'additive'
or 'multiplicative'
. Select:
'additive'
, to set the separation between successive sidebands to a value of 0.1 times theF1
frequency value, whereF1
is the distance of the first sideband from the fundamental frequency.'multiplicative'
, to set the separation between successive sidebands proportional to both the harmonic order and the sideband value.
Separation
— Separation value between successive sidebands
Auto
(default) | positive scalar
Specify the separation value between successive sidebands as a positive scalar. Clear the Auto option to specify the separation value manually.
Band width
— Width of frequency bands centered at nominal fault frequencies
auto (default) | positive scalar
Specify the width of the frequency bands centered at the nominal fault frequencies as a positive scalar. Clear the Auto option to specify the width value manually.
Folding
— Toggle to specify whether negative nominal fault frequencies are folded about frequency origin
off
(default) | on
Toggle this option to specify whether negative nominal fault frequencies are folded
about the frequency origin. If you turn Folding
on
, then the Extract Spectral
Features live task folds the negative nominal fault frequencies about
the frequency origin by taking their absolute values such that the folded fault bands
always fall in the positive frequency intervals. The folded fault bands are computed as , where W is the Band width
and F is the Frequency.
Spectral metrics
— Toggle to enable or disable display of spectral metrics
off
(default) | on
Toggle this option to enable or disable the display of spectral metrics. When the
option is checked, then the Extract Spectral Features
live task displays the metrics as a 1
-by-N
table,
where N = 3*size((F+S),1)+1
. That is, it displays three metrics per
frequency range and the total band power over the frequency range.
The live task returns the following spectral metrics:
Peak Amplitude
— Peak amplitude value for each specified frequency range.Peak Frequency
— Peak frequency value for each specified frequency range.Band Power
— Average power of each specified frequency range. For more information on band power, seebandpower
.Total Band Power
— Sum of individual band powers for the set of specified frequency ranges.
Version History
Introduced in R2021aR2023b: Automatic computation of harmonics and sidebands
The task can compute harmonics and sidebands automatically from the spectrum for custom components.
R2023b: Time-domain signal data accepted
The task is updated to accept time-domain data in the form of a numeric vector or a timetable. The task continues to accept numeric power spectrum data.
See Also
faultBands
| gearMeshFaultBands
| bearingFaultBands
| faultBandMetrics
Comando MATLAB
Hai fatto clic su un collegamento che corrisponde a questo comando MATLAB:
Esegui il comando inserendolo nella finestra di comando MATLAB. I browser web non supportano i comandi MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)