Main Content

Import Data into Diagnostic Feature Designer

Diagnostic Feature Designeris an interactive tool for processing ensemble measurement data and extracting features that indicate the condition, such ashealthyorfaulty, of the machines that produced the data. The data can come from measurements on systems using sensors such as accelerometers, pressure gauges, thermometers, altimeters, voltmeters, and tachometers. The main unit for organizing and managing multifaceted data sets in the app is the data ensemble. Anensembleis a collection of data sets, created by measuring or simulating a system under varying conditions. Each row within the ensemble is amember. Each member of the ensemble contains the samevariables, such asVibrationorTacho.

The first step in usingDiagnostic Feature Designeris to import source data into the app from your MATLAB®workspace. You can import data from tables, timetables, cell arrays, or matrices. 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 Designercombines 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.

Before importing your data, it must already be clean, with preprocessing such as outlier and missing-value removal. For more information, seeData Preprocessing for Condition Monitoring and Predictive Maintenance.

During the import process, you select which variables you want to import, specify the variable types, and perform other operations to create the ensemble that you want to work with. When you click import, the app applies your specifications and creates an ensemble that contains your selected data. The following figure illustrates the overall import flow.

Notional import workflow. Workspace data sources are on the left. Import dialog box is in the middle. Post-import app variables pane is on the right.

After you import your data once, you do not need to import it again for subsequent sessions. Save your session to store both the initial data ensemble and any derived variables and features you compute prior to saving. You can also export your data set to the MATLAB workspace, and save your data as a file that you can import in a subsequent session.

如果你有大量的乐团成员,有限公司nsider creating a representative subset of members when you first start exploring the data and potential features in the app. Because the app is interactive, importing a large number of members can result in slower performance. Instead, you can develop and rank features interactively with the smaller data set, and then generate code that repeats the computations on the original data set.

For more information on data sources, ensembles, and variable types in predictive maintenance, seeData Ensembles for Condition Monitoring and Predictive Maintenance.

Source Data Requirements

For signals, the app accepts individual membertablearrays,timetablearrays, cell arrays, or numeric matrices, each member containing the same independent variables, data variables, and condition variables. For spectral data, the app accepts individual membertablearrays oridfrdobjects. This table describes the data requirements for variables within ensemble members.

Input Item Content Notes
Signal data Timetables, tables, cell arrays, or numeric arrays For time-based data, timetables are recommended.
Signal independent variables (IVs) Double,duration, ordatetime

For each signal variable, all member IVs must be of the same type, whether your signal is based on time or on another IV such as consumption or duty cycles.

如果你的会员数据存储在一个矩阵,你亩t have only one IV that applies to the full set of signals that you are importing.

If your data was uniformly sampled in time and you do not have recorded timestamps, you can construct a uniform timeline during the import process.

Spectral data Numeric (double) table oridfrdobject

Eachidfrdobject must contain data for only one spectrum (the first dimension is 1).

You cannot import spectra from matrices.

Condition variables (CVs) Scalar — Numeric, string, cell, or categorical You can import condition variables along with your data in tables, timetables, or cell arrays, but not in matrices.
Features Scalar — Numeric, string, or cell You can import features that you computed previously, either externally or within the app itself.
Matrices Purely numeric array that contains columns representing a single IV and any number of signals that share that IV. Cannot accommodate spectra. Cannot generally accommodate condition variables or features.

Matrices cannot accommodate variable names.

You can import condition variables and features from a matrix if your data set contains only scalars and does not contain signals.

You can import data members individually or as an ensemble that contains all your data members. This ensemble can be any of the following:

  • An ensemble table containingtablearrays, cell arrays, or matrices. Table rows represent individual members.

  • An ensemble cell array containing tables, cell arrays, or matrices. Cell array rows represent individual members.

  • An ensemble datastore object such as afileEnsembleDatastoreorsimulationEnsembleDatastoreobject that contains the information necessary to interact with files stored externally. Use an ensemble datastore object especially when you have too much data to fit into app memory. Reading and writing to external files during computations does impact performance, however. To create a representative subset of the ensemble datastore files to work with, seesubset.

  • An ensemble matrix that contains only condition variables and features. Matrix rows represent individual members.

  • A labeled signal set, which is alabeledSignalSetobject, that contains labeled data for signals, condition variables, and features.

For more information about organizing your data for import, seeOrganize System Data for Diagnostic Feature Designer.

Typical Workflows for Data Import

The following sections describe typical workflows for different types of data import. The first workflow describes the overall import process and the subsequent workflows focus on variations that are specific to the import data format. The following table summarizes the cases for the workflows.

Import Type Summary
Ensemble table Core workflow that describes the import of an ensemble table, including ensemble specification, configuration, import, and confirmation in the app
Individual Ensemble Members Use of the filtering capability within the import dialog process to quickly select and import individual ensemble members that are represented by tables or timetables
Matrices Use of matrix column indices for variable identification. Alternative specification of matrix as feature rather than signal.
Spectral Data Import of spectral data inidfrdobject or in a table with columns that contain frequency or order values and corresponding data values
Signal with no IV Import of signal with no explicit time stamps by generating virtual IV
Signal with multiple IVs Specification of an alternative IV so that the signal can be analyzed in the app using either IV
Ensemble Datastore Specification of an ensemble datastore that contains information on interacting with external files.
Import Labeled Signal Set (LSS) Import of signal, condition variable, and feature information from alabeledSignalSetobject.

Core Workflow—Import Ensemble Table

This workflow illustrates the steps for importing an ensemble table into the app.

Load Ensemble Table intoMATLABWorkspace

合奏表加载到MATLAB工作区. You can preview the data in the workspace variable browser, as this example shows. In this case, the data set contains two time-based signals and a scalar condition variable namedfaultCode.

Example ensemble table. Vibration signal is in the leftmost column. Tacho signal is in the center column. Fault code is in the rightmost column.

Open App and Start New Session

Open the app by enteringdiagnosticFeatureDesignerat the command line. Then, clickNew Session. This action opens the import dialog box.

New Session button

Select Ensemble Table from Source Variables

In theSelect dataset from workspacepane, select your ensemble table as theSource.

A menu displays the one available variable, which is dataTable.

View Source Variable Components and Change Variable Type and Units

TheSelect source variablespane displays the variables from your ensemble. In the following example figure, the app identifies theVibrationandTachovariables as time-based signals that each containTimeandDatavariables. The third variable in the variable set for each signal,Sample (Virtual), is not checked.Sample (Virtual)allows you to generate an IV, especially when your source data set does not contain an explicit IV. For more information onSample (Virtual), seeImport Signal with No Time Variable.

Source variables pane with Vibration, Tacho, and FaultCode in a column

The icons identify the variable type that the app assumes. The icon next tofaultCode, which illustrates a histogram, represents a feature. Both features and condition variables are scalars, and the app cannot distinguish between the two unless the condition variable is categorical. To change a variable type, click the variable name to open the variable properties in theConfigure source variable propertiespane. Then, inVariable type, changeFeaturetoCondition Variable.

In the source variables list on the left, the faultCode variable row is gray. In the source variable properties on the right, a menu displays Feature, Condition Variable, and Independent Variable.

The icon forfaultCodenow illustrates a label, which represents a condition variable.

The bottom of the variable list displays faultCode with the

For signal and spectrum variables, you can also change the units that the app uses for plotting and for other operations within the app. To do so, in the lower level variable list of the signal or spectrum variable, click the name of the IV or data variable. TheConfigure source variable propertiespane provides a menu of options for each property that you can modify. In the following example figure,Configure source variable propertiesdisplays properties for theTimevariable of theVibrationsignal. The figure illustrates the selection ofMinutesfrom the menu ofUnitsoptions.

The Select source variables pane is on the left. The Time variable in the Vibration signal is highlighted. The Configure source variable properties pane on the right displays options for variable name, variable type, IV type, and unit. The unit menu ranges from seconds to years.

Preview Data Variables

In addition to providing options for variable properties such asType, theConfigure source variable propertiespane displays a preview of your import data when you click the name of a signal or spectrum variable. The following example figure shows the preview of theVibrationdata. The preview pane in the figure displays source data for the first tenVibrationsamples of the first ensemble member, and includes values for IV, data, and the sample index.

The preview pane displays source properties only. The preview pane does not reflect any property modifications that you make in the pane. For example, if you change the units of theVibrationsignal from seconds to minutes, the preview pane still displays source units of seconds. When you complete the import, the app converts the time data to minutes for use in the app.

The Select source variables pane is on the left. The variable at the top of the pane, Vibration, is highlighted. The Configure source variable properties pane on the right displays the preview table.

Confirm Ensemble Specification and Execute Import

Confirm the ensemble specification in the Summary pane at the bottom of the dialog box. ClickImportto execute the data import.

Summary displaying the ensemble name near the top and three columns that contain, from left to right, Variable Name, Variable Type, and Independent Variable.

Confirm Successful Import into App

Confirm the import in the variables pane. In this example, the two signals appear in theSignalslist. The condition variableFaultCodeappears in theCondition Variableslist. Beneath the variables pane is theDetailspane, which provides additional information about the selected variable.

The Variables pane contains a Signals list above a Condition Variables list. The details pane is on the bottom.

SelectVibration/Dataand clickSignal Traceto plot the data and view the imported signals, as the following example figure shows. For more information on plotting data, seeImport and Visualize Ensemble Data in Diagnostic Feature Designer.

Plot of the imported vibration signal.

Import Individual Members

This workflow describes the steps associated with importing ensemble members individually.

Initiate Import Process

Load the individual member variables into your MATLAB workspace, open the app, and clickNew Session. In theSelect dataset from workspacepane, theSourcemenu displays a list of the files in your workspace. The following example figure shows 10 member files and one additional file,sens2, that is not an ensemble member.

List of all workspace variables, arranged vertically in a menu. The list contains member files that start with the letter

Select Ensemble Members

Select one of the variables that represents an ensemble member. In this example, selectd1. The app opens a list of all compatible workspace variables that contain the same internal variables. You can select any combination of these variables or clickSelect Allto select all of them at once.

On the left is a list of variables that have similar format to selected variable

Import Individual Timetables

If your individual members are packaged as timetables with a scalar value for each time point, specifyUse as signalto have the app interpret the timetable variable as a signal rather than as a feature.

The list of timetables, which are all selected, is on the left. A list of the lower level variables within each timetable is on the right.

Complete Import Process

Once you select your variables, the remaining import steps are the same as inCore Workflow—Import Ensemble Table. The app combines the members you import into a single ensemble.

矩阵数据导入

This workflow describes the import of signals from individual member matrices. When you import data in matrices, each signal in the ensemble must share one independent variable, such as a time variable, with all signals in the ensemble. You cannot import condition variables, features, or spectral data in matrices.

Select and Preview Matrices to Import

Load your matrices into the MATLAB workspace, and then initiate the import process by clickingNew Session. In theSelect dataset from workspacepane, select one of your matrices and clickSelect All. For matrices, this pane also displays aUse as featureoption. This option applies to the special case where a matrix contains only scalar condition variables and features, and no signal data.

Because matrices are numeric, the app identifies each variable column by its column index. The following example figure shows four member matrices. The first column of each matrix contains the IV representing time, and the second and third columns contain the data values for vibration and tacho data. To preview the contents of the ensemble, in theSelect Source variablespane, select theMatrixrow.

On the left is a list of the matrices to import. In the middle are the variables for each matrix, with the names

Confirm Variable Types

The app interpretsCol1as the IV because it is monotonic, andCol2andCol3as signal data variables.

Matrix variable assignments. Col1 is on the top. The properties display on the right contains

If you cannot accurately represent your signals with a single time variable, convert your matrices into tables before import.

Complete and Confirm Import

ClickImportto complete the import. Confirm that the variables pane contains the signals you want, as shown in the following example figure.

Variables pane. The top box contains Col2 and Col3. The bottom box contains the details pane, which has no information because no signals are selected.

The app merges the matrices into an ensemble data set that contains the four matrices.

This workflow demonstrates that you can import matrices, but only with limitations. If you want to identify your variables by name, import condition variables or features, or use independent timelines for independent signals, convert your matrices to tables or cell arrays prior to import. For an example of converting a set of matrices to an ensemble table, seePrepare Matrix Data for Diagnostic Feature Designer.

Import Spectral Data

This workflow illustrates how to import spectral data. You can import spectral data in two forms:

  1. Anidfrdobject that contains frequency and spectrum data for a single spectrum in theFrequencyandSpectrumDataproperties, respectively

  2. A table that contains columns with the frequency and spectral data

When you import anidfrdobject, the app recognizes that the data source is spectral, and defaults to theSpectrumvariable type, as the following example figure shows.

The source variables are on the left. The spectral variable Vibration_ps, which is selected, is the third main variable from the top. The properties pane on the right displays the variable name and type at the top. A preview table of Vibration_ps is beneath the variable type.

When you import spectral data in a table, the app defaults to theSignalvariable type, but provides additional options for theSpectrumandOrder Spectrumvariable types. The following example figure illustrates the import of spectral data in a table.

The variable Vibration_ps_1 is selected in the variable list on the left. The variable type Spectrum is highlighted in the menu on the right.

You can also import order spectra that contain order rather than frequency information. Order spectra are useful for analyzing rotating machinery. Each order is a multiple of a reference frequency, such as the primary-shaft rotational frequency. The following example figure illustrates the import of an order spectrum.

The variable Vibration_os is selected in the variable list on the left. The variable type Order Spectrum is highlighted in the menu on the right.

When you complete the import, theVariablespane displays the spectra, as the following example figure shows.

Variables pane shows the imported variables vertically in order of Signals, Spectra, and Features

Import Signal with No Time Variable

This workflow illustrates how to generate a virtual IV if your data set includes signals that contain no IV. For instance, you might have a signal that was measured or generated in uniform time samples, but which does not include a vector of the actual time stamps. The app can generate a virtual timeline that contains the same sample rate.

Select Data Source and View Source Variables

Initiate the import process and select workspace variables to import. In the following example figure, the data source is a table that containsVibrationandTachovariables. However, these variables contain only measurement data and no time information. As always, the app provides aSample (Virtual)option. In this case, since the data has no IV, the app automatically selects this variable.

The name of the workspace variable is selected on the left. The source variables within that dataset are listed vertically in the middle. A preview of the vibration data is on the right.

View Virtual IV Properties

The default unit for a virtual IV is the sample index. You can modify this default setting by selecting theSample (Virtual)name, which opens the source properties. The following example figure displays the default properties.

The list of source variables are in a vertical list on the left. Sample is highlighted. The Configure source variables properties pane on the right displays, from top to bottom, the name as Sample, the IV type as Index, and the unit as samples.

Reconstruct Signal Time Variable Using Sample Time

If you know the sample time of the signal, you can reconstruct the time variable. To do so, changeIndependent variable nameto the name you want,IV typetoTime,Unitto the time units you want, andSampling intervalto the sample time. For example, consider that you know the sample time for bothVibrationandTachois 0.001 seconds. The following figure shows how to set this sample time forVibration. Note that these settings do not affectTacho.

The source variables are on the left. The top signal is Vibration, which has Time (Virtual) as the second variable. The middle signal is Tacho, which has Sample (Virtual) as the second variable. The Configure source variable properties pane on the right shows, from top to bottom, the name as Time, the IV type as Time, the unit as seconds, and the sampling interval as 0.001

Once you have reconstructed the IVs that you want, complete the import process. You can view your reconstructed timelines by plotting your imported signals in the app. The following figure shows plots forVibration, which has the reconstructed timeline, andTacho, which retains the default IV ofSample.

The vibration signal is on the left and the tacho signal is on the right.

Specify Sample Index as Alternative IV

This workflow describes the steps for specifying the signal sample index as an alternative IV when you also import a time variable or some other signal IV.

Specify Sample Index as IV

Initiate the import and select the data to import. In theSelect source variablespane, selectSample (Virtual)and view the properties. The following example figure illustrates this step. In this figure,Vibrationnow has all three lower level variables selected. TheConfigure source variable propertiespane displays the default IV type and unit forSample (Virtual), which areIndexandsamples, respectively.

The source variables are on the left. Sample (Virtual), which is selected, is the third item beneath Vibration. The Configure source variable properties pane is on the right.

Perform the same operation on all variables for which you want to include the sample index. Complete the import process.

Switch to Sample Index the App

The app defaults to the IV type that you imported with the data. To switch to the sample index, inOptions, selectIndex, as the example figure illustrates.

The app toolstrip is on the top. The Options menu is positioned in the right third of the toolstrip. In the menu, Index is the bottom item on the right .

All signals that includeIndexas an alternative IV type now use the sample indices rather than the time values. When you plot the data, the signal trace uses the sample data, as the following example figure shows.

Plot of the vibration data along an x-axis of sample

Import Ensemble Datastore

This workflow describes the steps for importing afileEnsembleDatastoreobject or asimulationEnsembleDatastoreobject. Ensemble datastore objects provide information that allows the app to interact with external files. They include specifications for the variables you want to read, the variable types, and the source file locations. When you import an ensemble datastore, you can choose whether to store results within the app memory or write the results back to the ensemble datastore. For more information about ensemble datastores, seeData Ensembles for Condition Monitoring and Predictive Maintenance.

Select Data Source and View Source Variables

Initiate the import process. In theSelect dataset from workspacepane, select the ensemble datastore. The app uses the ensemble datastore properties forSelectedVariablesto select the variables to display. The app also uses theDataVariables,IndependentVariables, andConditionVariablesproperties to determine which variables belong to which of these variable types. The example figure illustrates the import of asimulationEnsembleDatastoreobjectens.

The ensemble ens is selected on the left. The SimulationInput variable is on the top. It is not selected, and has an orange triangle with an exclamation point next to it. Beneath SimulationInput, the variables are, from top to bottom, Flow, Pressure, and CombinedFlag.

在前面的示例图,应用解释sensas follows:

  • The data variablesFlowandPressureappear identical in form to timetable-based variables extracted from tables.

  • ensincludes the standardsimulationEnsembleDatastorevariableSimulationInputin theSelectedVariablesproperty. However, the app does not support theSimulationInputdata format and displays an orange warning icon. The app also automatically clears the selection and deletesSimulationInputfromens.SelectedVariables.

  • CombinedFlagappears as a condition variable in accordance withens.ConditionVariables.

Choose How App Interacts with External Files

You can choose whether the app interacts with the external files referenced in your ensemble datastore. In the Select more variables pane, useAppend data to file ensembleto specify your choice.

The Source menu is on the top of the Select dataset from workspace pane. The Append data to file ensemble is beneath the Source menu.

  • 如果你选择这个选项,应用国际米兰acts directly with the external files and writes results, such as derived variables or features, to the same folder as the original data. If you are using afileEnsembleDatastoreobject, the object must include a reference to awritefunction that is specific to your data structure. You do not need awritefunction if you are using asimulationEnsembleDatastoreobject.

  • If you clear this option, the app stores results in local app memory for the duration of the session. Select this option if, for example:

    • You want to keep your source files pristine at least until you have finalized your processing and feature generation.

    • You do not have write permission for your source files.

    • You do not have awritefunction, and you are using afileEnsembleDatastore.

    • The process of writing the results back to the source files is slow.

    To retain your local results at the end of the session, useSave Session. You can also export your results as atableMATLAB的工作区。从工作空间,您can store the results in the file, or integrate results selectively using ensemble datastore commands.

Import Labeled Signal Set (LSS)

This workflow describes the steps for importing an LSS, orlabeledSignalSetobject, fromSignal Labelerin Signal Processing Toolbox™. The signals you import must be full signals and not framed (segmented) signals.

Select Data Source and View Contents

Initiate the inport process. In theSelect dataset from workspacepane, select the LSS. The app retains the LSS labels and interprets the variables as signals, condition variables, and features, according to the variable roles in the LSS and their data type.

New Session dialog box. Dataset lss1 is selected on the left. Select source variables identify the signal, the condition variable, and the features in the middle. The summary on the bottom displays the imported variable names and types on the bottom.

View Imported Variables and Features in Variables Pane

View the imported variables and features in the variables pane. The imported data retains the labels and the variable and feature designations.

The Variable Br

See Also

|||||||

Related Topics