interactively extract, visualize, and rank features from measured or simulated data for machine diagnostics and prognostics -凯发k8网页登录
interactively extract, visualize, and rank features from measured or simulated data for machine diagnostics and prognostics
since r2019a
description
the diagnostic feature designer app allows you to accomplish the feature design portion of the predictive maintenance workflow using a multifunction graphical interface. you design and compare features interactively and then determine which features are best at discriminating between data from nominal systems and from faulty systems. the most effective features ultimately become your condition indicators for fault diagnosis and prognostics.
using this app, you can:
import measured or simulated data from individual files, an ensemble file, or an ensemble datastore that references files external to the app.
interactively visualize data to plot the ensemble variables you import or that you compute within the app. group data by condition label in plots so that you can clearly see whether member data comes from nominal or faulty systems.
derive new variables such as time-synchronous averaged signals or order spectra. the app executes processing on all ensemble members with one command.
generate features from your variables and visualize their effectiveness using histograms. features include signal statistics, nonlinear metrics, rotating machinery metrics, and spectral metrics. you can also create your own custom features.
rank your features to determine which ones are best at discriminating behavioral differences in the data.
use supervised ranking with labeled features to determine which features are most likely to discriminate between nominal and faulty behavior.
use unsupervised ranking when your data has no condition variables or labels to determine which features exhibit the best clustering with other features and are most likely to indicate different fault or operating conditions.
use prognostic ranking with features extracted from run-to-failure data to determine which features are most likely to indicate remaining useful life (rul).
export your most effective features directly to classification learner for more insight into feature effectiveness and for algorithm training.
generate code for the features you choose so that you can reproduce, customize, and automate the feature computations in a matlab® function. you can also generate code and simulink® blocks that support streaming data.
to get started with the app, you must have data from your systems available in your matlab workspace. for information about organizing your data for import into the app, see .
for more information about condition indicators for predictive maintenance, see .
open the diagnostic feature designer app
matlab toolstrip: on the apps tab, under control system design and analysis, click the app icon.
matlab command prompt: enter
diagnosticfeaturedesigner
.
examples
parameters
new session
— import datasets from the matlab workspace into app
button
initiate a new app session by importing source data into the app from your matlab workspace. you can import data from tables, timetables, cell arrays, or matrices. you can import data from a single source that combines the data of multiple ensemble members or import individual ensemble members from separate sources. you can import labeled signal sets created in signal processing toolbox™. you can also import an ensemble datastore that contains information that allows the app to interact with external data files. your files can contain actual or simulated time-domain measurement data, spectral models or tables, variable names, condition and operational variables, and features you generated previously. diagnostic feature designer combines all your member data into a single ensemble data set. in this data set, each variable is a collective signal or model that contains all the individual member values.
for more information about importing data, see .
for more information about terms related to data ensembles, see more about.
for more information about organizing your data for import into the app, see .
auto features
— generate a predefined set of features automatically
button
generate and rank a feature set automatically using auto features. when you select one or more signals or spectra, auto features computes a predefined set of features that are appropriate for the variable type. the automatic computations include:
deriving intermediate variables to use for feature extraction, such as spectra and time series signals
extracting the features from the expanded variable set
ranking the features and plotting the histograms of top-ranked features.
for more information, see .
plot options
— specify default plotting options for all plots that you generate during your app session
button
specify default plotting options for all plots that you generate during your app session. you can set these options before you generate your first plot, or at any time during your session. new settings apply only to plots that you generate after setting the options and not to plots that you generated earlier. you can temporarily override the plot options settings for individual plots without changing your specified defaults for subsequent plots. when you click plot options, you open a dialog that allows you to set options in the following panes.
general — these options apply to all signal and spectrum plots.
group by — group data by a condition variable label. the app uses color to distinguish label groups. for example, if your condition variable is
faultcode
with labelshealthy
anddegraded
, the app uses one color for member data with thehealthy
label and another color for member data with thedegraded
labelnumber of curves — specify the number of members to plot. set this option when you have a large number of ensemble members and you want to plot only a subset of the members. using this option reduces the plotting time and allows you to assess individual member behavior more easily.
spectrum — these options apply only to spectral plots.
number of peaks to mark — specify the number of peaks to mark. set this option to limit the number of spectral peaks that are marked to highlight only the most significant peaks.
ensemble summary — these options apply only to the ensemble summary plot, which is a special plot that displays the mean and standard deviation of the ensemble as a whole.
number of standard deviations — specify the number of standard deviations that the ensemble summary plot displays.
show min and max boundaries — specify whether to display the boundaries of the actual minimum and maximum values of the ensemble.
plot
— generate plot of ensemble variable or feature
plot type
generate a plot of an ensemble variable or feature table. to generate a plot, first select a variable or feature table from the data browser. the plot gallery shows icons for the compatible plot types. the following table describes the plot types for each type of selection.
input type | plot type | description | customize with |
---|---|---|---|
signal | signal trace | ensemble signal data plotted by time or another independent variable that does not represent frequency. | signal trace tab |
ensemble summary | mean, standard deviation, and min/max boundary for the ensemble as a whole. | ensemble summary tab | |
spectrum | power spectrum | ensemble signal power plotted by frequency. | power spectrum tab |
order spectrum | ensemble signal power plotted by order, which is the ratio of a specific frequency to the main rotational frequency. | order spectrum tab | |
feature table | histogram | feature effectiveness, as visualized by a bar chart with color coding for the condition label. effective features separate conditions cleanly. | |
feature table view | table containing feature values and their condition labels for each ensemble member. | n/a | |
feature trace | feature values for each member. this plot is especially useful for prognostic features (for rul) computed from frame-based data. |
frame policy
— specify data handling mode and frame size and rate
button
specify a frame policy when you want to perform data processing on sequential segments of a signal rather than the full signal at once. a frame policy consists of a frame size and a frame rate. the frame size is the interval over which the frame data is collected. the frame rate is the time interval between frame start times.
for more information on frame-based processing, see .
options
— select independent variable and specify parallel computing
button
specify options when you want to modify one or both the following settings.
independent variable — independent variable (iv) to use. when you import your data, you can specify more than one independent variable for a signal. for example, if your signal is time based, you might want to also have an independent variable for sample index. after you complete the import, you can change the independent variable that the app uses for a specific plot or computation. when you select options > independent variable, the app displays a list of the available independent variables. your selection changes the iv of all the applicable signals or spectra. for more information on specifying an alternate iv, see specify sample index as alternate iv in .
use parallel computing — process ensemble members in parallel. using parallel computing can significantly decrease processing time for large ensembles. this option is available only when you have parallel computing toolbox™ installed and licensed.
data processing
— select data processing options by category
filtering & averaging | residue generation | spectral estimation
select options for processing your data into new signals. use these new signals as inputs to other processing options or as inputs to feature generation. most processing options operate on each ensemble member. you can also perform ensemble-level processing to view how the ensemble behaves as a whole. each option selection opens a new tab for your specifications. selection of an option also opens a general data processing tab if that tab is not already open. the data processing tab provides information about the input signal.
to specify a signal to process, select a variable from the variables pane prior to selecting the data processing option. to change the signal after opening the option tab, close the option tab and select a new signal either in the variables pane or from the signal list in the data processing tab.
for more information about the processing options and the parameters that you can set for each option, see:
filtering & averaging
residue generation
spectral estimation
time-domain features
— compute features in time domain
signal features
| time series features
| model-based features
| rotating machinery features
| nonlinear features
| custom features
compute features in the time domain. signal features apply to any signals. time series features are features extracted from stationary time series. model-based features are features extracted using autoregressive (ar) models. rotating machinery features are specialized metrics that apply to gearing. nonlinear features provide metrics that characterize chaotic behavior in vibration signals. custom features are features that you define by adding custom functions to the app. you can add existing matlab functions or create new functions using a template and then generate and rank the features alongside built-in app features
to specify a signal source for your features, select a signal variable from the variables pane prior to selecting the time-domain features option. to change the signal after opening the option tab, close the option tab and select a new signal either in the variables pane or from the signal menu in the time-domain features tab.
for more information about time-domain features options and the parameters that you can set for each option, see:
frequency-domain features
— compute features in frequency domain
spectral features
| bearing faults features
| gear mesh faults features
| custom faults features
| custom features
compute features in the frequency domain. spectral features are general metrics that apply to any spectrum, such as the peak amplitude across the full specified frequency range. bearing faults features, gear mesh faults features, and custom faults features are specialized metrics for rotating machinery that focus on spectral behavior within specific fault bands that bound characteristic frequencies, where faults can occur, of the components of the system. custom features are features that you define by adding custom functions to the app. you can add existing matlab functions or create new functions using a template and then generate and rank the features alongside built-in app features.
for more information about the frequency-domain features, see
rank features
— rank features
feature table
open the feature ranking tab to perform supervised, unsupervised, or prognostic ranking for the feature table that you select. for more information, see feature ranking tab.
export
— export features and data or generate matlab code
export features to the matlab workspace
| export features to the classification learner
| export a data set to the matlab workspace
| generate function for features
| generate function for...
export features, or your entire data set, to use them or share them outside of the app. generate code to reproduce your feature computations in a matlab function or a simulink block.
for feature export, both options open a list of features.
if you have not yet ranked your features, the app sorts this list by name, and marks all features by export by default. you can refine the selection if you want to export only specific features.
if you have ranked your features, the app sorts this list by your sort by specification in the feature ranking tab. use select top features to export only the most highly ranked features, based on the number of features that you specify. you can change the sorting order to alphabetical by selecting
name
in the features sorted by list. with either sorting order, you can individually select or clear features to export.
when you export to the matlab workspace, you can use command-line techniques with the features. when you export to classification learner, you open a classification learner session that uses your selected features as input.
for code generation, the first option,
generate function for features
, lets you generate matlab code with a simple set of specifications for feature table, ranking algorithm, and number of features. use this option when you want to generate code for features based solely on ranking, or when you want to generate code for all your features.if you select format for streaming data, the app generates a function that is compatible with matlab coder™ and therefore supports streaming-data applications.
the second code generation option,
generate function for...
, allows you to customize your selection of items to include in the function. for example, you can filter your selection based on criteria such as input or output text. you can include signals and spectra that are not used in the features you select. selectinggenerate function for...
opens a selectable list of all the signals, features, and ranking tables that you have generated.generate function for...
also opens the code generation tab, which provides filtering capability for the list. use a filter to view only the items that meet the filter criterion. you can use different filters to select the outputs you want. to review all your selections regardless of filter, click sort by selection. this option lists all the available outputs with items that you selected on top. for more information, see code generation tab.if you have specified frame-based data (see options), clicking
generate function for...
first opens a list with selections for the frame specifications that you have used. the items in your generated code must either all operate on the full signal or all use the same frame specification.the final option,
generate feature extraction simulink block
, exports a simulink that incorporates the same streaming-formatted code that you generate ingenerate function for features
.for more information on how to generate code or a simulink in the app, see , , and .
for more information about the export options, see:
panner
— control plot scale and x-axis range
on (default) | off
use the panner to focus on data segments in the x-axis range that you specify and to change the plot scale. the panner provides a strip plot beneath the main plot. to focus on a section of the main plot, move the handles. to change the scale of the plot, select one of the options in scale.
group by, number of ..., show min and max boundaries
— override default plot options
on | off | positive scalar
use the options in the first column of the view section to override the defaults in the plot options specification. the available options vary by plot type. when you change these settings in the plot tab, you change them only for the current plot. for more information on these options, see plot options.
normalize y axis
— normalize variables to the same scale (signal trace and ensemble summary only)
off (default) | on
use normalize y axis when you are plotting multiple variables and want to view the variables on the same [-1, 1] scale. the relative signal amplitudes within a variable do not change.
show signal information
— display highlighted variable member name and condition label
on (default) | off
in a signal or spectrum plot, you highlight an individual member by positioning your cursor on the member trace. select show signal information to display both the variable member that you highlight and the condition label for that member in the lower right corner.
if you select data cursors, show signal information also displays the distance between the two cursors. for more information, see data cursors.
merge axes
— plot multiple variables together in separate plots or in one plot
on (default) | off
specify how to plot multiple variables together.
select to create a single plot that overlays all traces and uses a single y-axis scale.
clear to create separate plots displayed vertically, each with a unique y-axis scaling.
data cursors
— display x and y values of points and distances between two points
off (default) | on
select data cursors to display values of key points in your signal. data cursors are horizontal and vertical bars that you position over a point of interest, such as a peak value. the cursors display the x and y positions. to display the distance between the cursors, select show signal information. to lock the bars so that they move together, select one of the lock spacing options.
select features
— choose features to plot
button (default)
click select features to open a selectable list of features to plot. use select features, for example, when you have generated many features but you want to focus on a subset in a single plot panel.
for more information about selecting features, see .
group by
— select condition variable for grouping data
condition variable name
select the condition variable to base feature histograms on. the feature histograms use color to visualize the separation of data groups with different labels for that condition variable.
example: faultcode
bin settings
— specify histogram resolution
auto
(default) | numeric | binning method name
specify histogram resolution using bin width, bin method, number of bins, and bin limits. the bin settings apply to all the histograms for the feature table.
the bin settings are not independent. the app histogram algorithm uses an order of precedence to determine what to use:
the binning method is the default driver for the bin width.
a bin width specification overrides the binning method.
the bin width and the independent bin limits drive the number of bins. a number of bins specification has an effect only when the value of group by is
none
.for more information on interpreting and customizing histograms, see .
supervised ranking
— select supervised classification ranking method to apply
t-test
| one-way anova
| roc
| ...
select a supervised classification ranking method to assess how effectively each feature separates data with different condition labels. if you have already ranked your features, you can rank again with a different method and display the resulting rankings together. each method uses a different statistical approach.
the menu differentiates between two-class and multiclass ranking methods.
two-class methods — use when your condition variable (cv) has only two labels, such as
healthy
andfaulty
. the default value for two-class methods ist-test
.multiclass methods — use when your condition variable has two or more labels, such as
healthy
,faultcode1
, andfaultcode2
. the default value for multiclass methods isone-way anova
the default ranking method for two-class condition variables,
t-test
, is the simplest method, as it only considers
whether the means of the two labeled groups are equal or not.
t-test
is primarily useful for identifying ineffective
features to discard.
the table lays out the influence of specific criteria on ranking-method selection.
criterion | ranking method |
---|---|
condition variable type |
|
feature scoring criterion |
|
distribution shape |
|
desired method basis |
|
selecting a method activates a new tab with a name that matches the ranking method. for more information on this method-activated tab, see ranking method tabs.
for more information on the supervised ranking methods, see:
one-way anova —
bhattacharyya —
kruskal-wallis —
entropy —
roc —
wilcoxon —
t-test —
unsupervised ranking
— select unsupervised classification ranking algorithm to apply
laplacian score
| variance
select an unsupervised classification ranking method to assess how effectively each feature performs when you do not have labeled data. the app provides two unsupervised ranking options:
laplacian score — scores reflect how well features cluster with other features to form distinct groupings.
variance — scores reflect feature variance. features with low variances tend to add less useful information to a model.
selecting a method activates a new tab with a name that matches the ranking method. for more information on this tab, see ranking method tabs.
for more information on the unsupervised ranking scoring, see:
laplacian —
fsulaplacian
variance—
unsupervised ranking is available in diagnostic feature designer, but not in classification learner. if you plan to export your features to classification learner to train a model, you must use ensemble data that includes labels.
prognostic ranking
— select prognostic ranking algorithm to apply
monotonicity
| trendability
| prognosability
select a prognostic ranking method to assess how effectively each feature tracks the degradation of your ensemble members when you have run-to-failure data. the top-ranking features are best at predicting the remaining useful life (rul).
the app provides three prognostic ranking methods, all of which score features on a
scale ranging from 0 through 1. one method, monotonicity
, is
always available. the other two methods, trendability
and
prognosability
, are available only when you are using
frame-based data. the smaller data segments in frame-based data allow the tracking of
small changes that are induced by
degradation.
monotonicity characterizes the trend of a feature as the system evolves toward failure. as a system gets progressively closer to failure, a suitable condition indicator has a monotonic positive or negative trend. for more information, see .
trendability provides a measure of similarity between the trajectories of a feature measured in multiple run-to-failure experiments. trendability of a candidate condition indicator is defined as the smallest absolute correlation between measurements. for more information, see .
prognosability is a measure of the variability of a feature at failure relative to the range between its initial and final values. a more prognosable feature has less variation at failure relative to the range between its initial and final values. for more information, see .
selecting a method activates a new tab with a name that matches the ranking method. for more information on this method-activated tab, see ranking method tab.
for an example of using prognostic ranking in the app, see .
rank by
— specify condition variable for classification ranking algorithm to use
condition variable name
select the condition variable that provides the labels for the classification ranking algorithm to use.
sort by
— specify ranking method to sort results by when displaying results from multiple methods
ranking
method
specify the ranking method to sort by when comparing the results of different ranking methods. when you use a single ranking method, the app displays the results in order of importance, as indicated by the ranking score for that method. when comparing the results for multiple methods, change sort by to change the method that drives the sorting order.
delete scores
— delete ranking scores from display
no selection (default) | ranking method
specify this parameter to eliminate ranking scores for a specific method. use this parameter, for example, when comparing the results of multiple rankings, and you want to simplify the display by eliminating rankings that do not influence your feature selection.
export
— export features from app or generate matlab code to reproduce your feature computations in command-line function
export features to the matlab workspace
| export features to the classification learner
| generate function for features
| generate function for...
export features to use them or share them outside of the app. both options open a ranking-sorted selectable list to choose from. when you export to the matlab workspace, you can use command-line techniques with the features. when you export to the classification learner, you open a classification learner session that uses your selected features as input.
if you want to export your entire data set from the app, use export from the feature designer tab.
you can also generate code that reproduces the computations for the variables and
features you select. for more information, see the code generation options description
in the export section in the
feature designer tab. when you generate code using
generate function for features
from the feature
ranking tab, ranking method defaults to the method you
specify in sort by.
correlation importance
— reduce ranking of redundant features
0 (default) | scalar in the range [0,1]
the correlation importance setting allows you to screen out features that convey similar information to higher ranked features. this screening provides a more diverse feature set in the upper ranks.
the criterion for the screening is the set of cross-correlation coefficients a feature has with higher ranked features. high cross-correlation between two features implies that both features are separating condition groups similarly and provide redundant information. with the default value of 0, the app does not incorporate feature redundancy into ranking scores. as you increase the correlation importance value, the app increases the influence of feature cross-correlation on the feature ranking score. this increasing influence progressively lowers the score of redundant features.
normalization scheme
— apply normalization across members for supervised ranking and unsupervised laplacian ranking
minmax
(default) | none
| meanvar
| softmax
the normalization scheme performs independent normalization across the members for every feature. normalization allows more direct comparisons among features. the app displays the defining equation for the scheme you select directly beneath your selection.
this option is available only for supervised ranking and unsupervised laplacian ranking methods.
laplacian score
— specify parameters for laplacian score ranking
parameter values
specify parameters that define key values for calculating the laplacian score, which indicates how well a given feature clusters with other features. the laplacian score is based on the pairwise distances from a given feature to its nearest neighbors.
number of neighbors — number of nearest neighbors to use for computing the score
distance metric — method, such as
euclidean
orcityblock
, for computing each pairwise distancekernel scale — scale factor for the kernel that transforms the pairwise distances into a similarity graph that provides the scores
this option is available only for the unsupervised laplacian ranking method. for
more information on laplacian ranking, see fsulaplacian
.
apply
— apply parameter settings to new ranking computation
button
click apply to calculate a ranking with the specified parameters. the feature ranking tab in the plotting area displays the results both graphically and tabularly. this display also includes the results for the default ranking algorithm, and for any other ranking methods you calculated previously.
once you calculate a ranking, the app disables apply until you change a parameter. you can calculate a ranking within a tab multiple times. each time you modify the parameters and calculate a ranking, the new results overwrite the previous results in the plotting-area tab.
close
— close tab and return control to feature ranking tab
button
once you have completed your ranking within the ranking method tab, close that tab to return control to the feature ranking tab. the feature ranking is disabled while any ranking method tab is activated.
frame policy
— feature table name, frame size, and frame rate
feature table name, full signal
,
none
(default) | feature table name, frame size, frame rate
this parameter is read-only.
the frame policy information reflects the choice you make when you select export > generate function for... in the feature designer tab.
filter or sort
— define criteria to refine your code generation choices
empty (default) | string | input, method, or analysis type
set criteria to refine your options when selecting items for your generated function. all criteria allow you to overwrite selectable options with a string. string matching is case insensitive. your filters apply to all output items, including signals, features, and ranking tables. criteria include:
output — string appearing in the output name, which is the name of the variable, feature, or ranking table to select for the generated function
input — input signal from which the output variable or feature was computed or feature table from which the ranking table was computed
method — computation that produced the output item, such as
tsa
orkurtosis
analysis type — data processing, feature processing, or feature ranking
to reset a single filter, delete the contents and click anywhere in the app. to reset all filters at once, click reset filters.
sort by selection
— display all selected items
button
display all selected items together. use sort selected especially when you have used multiple filter combinations to assemble your codegen selections. all your selections appear together.
use parallel computing
— generate code that uses parallel computing
off | on
specify whether to use parallel computing in the generated code. the default value is the value that is specified in options. you can specify parallel computing even if you performed your interactive processing without using parallel computing. this approach helps your code to be more scalable if you plan to run the generated code on a larger ensemble than the ensemble you used to develop the features. you can also turn parallel computing off if you used it when you developed the features.
to take advantage of parallel processing in generated code, the user must have parallel computing toolbox installed and licensed. however, the code will still run in serial mode on systems that do not have the toolbox.
code
— execute function generation
generate function button
click the generate function button when you have completed configuring your selections. the app opens a function that contains computations used for all the output items you selected.
for more information about generating code in the app, see .
programmatic use
diagnosticfeaturedesigner
diagnosticfeaturedesigner
opens the diagnostic feature
designer app.
diagnosticfeaturedesigner(sessionfile
)
sessionfile
)diagnosticfeaturedesigner(
opens
the app and loads a previously saved session. sessionfile
)sessionfile
is the name
of a session data file on the matlab path. the data includes all of the variables and features that you either
imported into the app or computed within the app. the data also includes your app settings
and the processing information necessary to generate code.
to save a session, in the diagnostic feature designer app, on the feature designer tab, click save session.
more about
data ensemble
a data ensemble is a collection of datasets, created by measuring or simulating a system under varying conditions. an ensemble can be implemented using independent datasets such as matrices or tables, or in a single collective dataset such as an ensemble table.
for more information on data ensembles and variables, see .
ensemble member
each dataset within an ensemble is a member. members of an ensemble all contain the same variables. for example, if your ensemble contains data from a set of similar machines, the dataset corresponding to one of those machines is a member.
ensemble table
an ensemble table is an ensemble dataset formatted as a . each column of the table represents one variable. each row of the table represents one ensemble member. for information on converting member matrices to an ensemble table, see .
ensemble datastore object
large ensembles can be implemented using an ensemble datastore object. these objects contain a list of the member files and information for interacting with them. for more information on ensemble datastore objects, see .
data variable
data variables make up the main content of the ensemble members,
including measured data and derived data that you use for analysis and development of
predictive maintenance algorithms. for example, you might represent accelerometer data as
the data variable vibration
. data variables can also include derived
values, such as the mean value of a signal, or the frequency of the peak magnitude in a
signal spectrum.
independent variable
independent variables (iv) are the variables that identify or
order the members in an ensemble, such as timestamps, number of operating hours, or machine
identifiers. for example, time
is a common independent variable.
condition variable
condition variables (cv) are variables that describe the fault
condition or operating condition of the ensemble member. condition variables can record the
presence or absence of a fault state, or other operating conditions such as ambient
temperature. frequently condition variables have specific possible values described by
labels. for example, a condition variable named
health
might have two states described by labels
healthy
and degraded
. condition variables can also
be derived values, such as a single scalar value that encodes multiple fault and operating
conditions.
version history
introduced in r2019a
see also
topics
matlab 命令
您点击的链接对应于以下 matlab 命令:
请在 matlab 命令行窗口中直接输入以执行命令。web 浏览器不支持 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
- (español)
- (english)
- (english)
europe
- (english)
- (english)
- (deutsch)
- (español)
- (english)
- (français)
- (english)
- (italiano)
- (english)
- (english)
- (english)
- (deutsch)
- (english)
- (english)
- switzerland
- (english)
asia pacific
- (english)
- (english)
- (english)
- 中国
- (日本語)
- (한국어)