Diagnostic Feature Designer is an app that allows you to develop features and evaluate potential condition indicators using a multifunction graphical interface.
The app operates on data ensembles. An ensemble is a collection of data sets, created by measuring or simulating a system under varying conditions. An individual dataset representing one system under one set of conditions is a member. Diagnostic Feature Designer processes all ensemble members when executing one operation.
This example shows how to import data into Diagnostic Feature Designer and visualize your imported data.
This example uses data generated from a transmission system model in Using Simulink to Generate Fault Data. Outputs of the model include:
Vibration measurements from a sensor monitoring casing vibrations
Data from the tachometer, which issues a pulse every time the shaft completes a rotation
Fault codes indicating the presence of a modeled fault
Load the data. The data is a table containing variables logged during multiple simulations of the model under varying conditions. Sixteen members have been extracted from the transmission model logs to form an ensemble. Four of these members represent healthy data, and the remaining 12 members exhibit varying levels of sensor drift.
load dfd_Tutorial dataTable
View this table in your MATLAB® command window.
dataTable = 16×3 table Vibration Tacho faultCode __________________ __________________ _________ [6000×1 timetable] [6000×1 timetable] 0 [6000×1 timetable] [6000×1 timetable] 1 [6000×1 timetable] [6000×1 timetable] 1 [6000×1 timetable] [6000×1 timetable] 1 [6000×1 timetable] [6000×1 timetable] 1 [6000×1 timetable] [6000×1 timetable] 1 [6000×1 timetable] [6000×1 timetable] 1 [6000×1 timetable] [6000×1 timetable] 1 [6000×1 timetable] [6000×1 timetable] 0 [6000×1 timetable] [6000×1 timetable] 0 [6000×1 timetable] [6000×1 timetable] 0 [6000×1 timetable] [6000×1 timetable] 1 [6000×1 timetable] [6000×1 timetable] 1 [6000×1 timetable] [6000×1 timetable] 1 [6000×1 timetable] [6000×1 timetable] 1 [6000×1 timetable] [6000×1 timetable] 1
Vibration
and Tacho
are each represented by a timetable, and all timetables have the same length. The
third variable, faultCode
, is the condition variable.
faultCode
has a value of 0
for healthy and
1
for degraded.To open Diagnostic Feature Designer, type the following in your command window:
diagnosticFeatureDesigner
Import the dataset that you previously loaded into your MATLAB workspace. To initiate the import process, in the Feature Designer tab, click New Session.
The New Session dialog box opens. From the
Source
Choose Variable list in the Select more
variables pane, select dataTable
.
The Source variablespane of the dialog box now displays the
variables within dataTable
. By default, the app initially
selects all source variables for import.
The app has extracted the variable names from your member tables and embedded
timetables. The icon next to the Vibration
and
Tacho
variable names indicates that the app interprets the
variables as time-based signals that each contain Time
and
Data
variables. You can verify this interpretation in the
Summary pane at the bottom, which displays the variable
name, type, and independent variable for each source-level variable.
A third variable, Sample (Virtual)
, also appears in the
list, but is not selected and does not appear in Summary. The
import dialog always includes this variable as an option to allow you to generate
virtual independent variables within the app. Because Vibration
and Tacho
both contain this unselected variable, the selection
boxes contain fill rather than a check mark.
View the properties of Vibration
by selecting the
Vibration
row.
The Source variable properties pane displays the
Vibration
variable name and the
Signal variable type. For
Vibration
, Signal is the only
Variable type option because the vibration data is packaged
in a timetable. Source variable properties also displays a preview of
Vibration
data.
Now examine the variable type of faultCode
. The icon next to
faultCode
, which illustrates a histogram, represents a
feature. Features and condition variables can both be represented by scalars, and
the app cannot distinguish between the two unless the condition variable is a
categorical. To change the variable type, click on the faultCode
to open the its properties, and, in Variable type, change
Feature to Condition
Variable.
The icon for faultCode
now illustrates a label, which
represents a condition variable.
Confirm the Ensemble Specification in Summary and click Import.
Your imported signals are now in the Signals & Spectra
area, and your imported ensemble Ensemble1
is in the
Datasets area.
The color code next to a signal represents that signal in plots. The icon to the
left of the signal indicates the variable type, which, for the variables you
imported, is Signal
.
Show information about your dataset by selecting its name in the Datasets area.
After you load your signals, plot them and view all your ensemble members
together. To view your vibration signal, in the Signals &
Spectra pane, select Vibration/Data
. Selecting a
signal variable enables the Signal Trace option in the plot
gallery. Click Signal Trace.
The plotting area displays a signal trace plot of all 16 members. As you move the cursor over the data, an indicator in the lower right corner identifies the member your cursor is on. A second indicator provides the fault code value for that member.
Interact with the trace plot using standard MATLAB plot tools, such as zoom and pan. Access these tools by pointing to the top right edge of the plot. You can also use the specialized options on the Signal Trace tab, which appears when you select the Signal Trace plot.
Explore the data in your plot using options in the Signal Trace tab.
Measure the distance between peaks for the one of the members with the high peaks.
Zoom in on the second clusters of peaks. In the panner strip, move the right handle to about 8. Then, move the panner window so that the left handle is at about 4. You now have the second set of peaks within the window.
Pause on the first high peak, and note the member number. The second high peak is a continuation of the same member trace.
Click Data Cursors, and select
Vertical Cursor. Place the left
cursor over the first high peak and the right cursor over the second
peak for that member. The lower right corner of the plot displays
the separation dX
.
Select Lock Horizontal Spacing. Shift the cursor pair to the right by one peak for the same member. Note that the right cursor is now aligned with the third member peak.
Restore the full window by moving the handles back to the edges of the panner.
Show which members have matching faultCode
values by using
color coding. Select Ensemble View Preferences > Group by
"faultCode".
The resulting signal trace shows you that all the highest vibration peaks are associated with data from faulty systems. However, not all the faulty systems have higher peaks.
Save your session data. You need this data to run the Process Data and Explore Features in Diagnostic Feature Designer example.
The next step is to explore different ways to characterize your data through features. The example Process Data and Explore Features in Diagnostic Feature Designer guides you through the feature exploration process.