hello and welcome back let's continue our journey together and let's see how we can
identify condition indicators from data that we previously reprocessed so conditioning
Decatur's or features are fundamental to train any model or predictive maintenance
applications in particular we will use condition indicators both to build a classification model
and to build a prognostic model so let's go back into MATLAB and let's see how we can
extract features from the data so here we are back in matlab and let's reopen the previous
live script so once again we will leverage the fourth physical course on our machine to speed
up the features extraction process in particular here we use the simulation and sample data store
to extract features from all the signals that we have generated in simulation so let's open
the extract features function and what we do with this function we pre allocate a table to
collect all the features but mainly what we do we call the sub function get features and this
up function is very useful because it allows us to go down from time series to scalars and
this is essential to reduce the amount of data that we will work with so the features that we
extract our time domain and frequency domain so in particular here we have minimum values maximum
values mean variance peak to peak kurtosis and so on so we do this for all the signals in the
simulation and sample data store and all of this is done automatically in parallel
okay so if we take a look at the simulation example data store once again we can see that
the number of data variables has actually increased now so this is because now we are
collecting not only the simulation theorem but also all the features and what we can out of
this simulation in sample data store is a table and this table contains a lot of columns where
each column is basically one of the features that we have extracted before and then the number of
rows is equal to the number of simulations so of course here you only see eight rows because you're
using the head function but actually the feature data table contains two thousand six hundred and
fifty-two rows okay so this is how you can extract features from MATLAB API but actually you could do
the same also in a different way in an interactive way you can do this by using an app and this app
is called diagnostic feature designer and this is an app from the pretty maintenance toolbox
so what you can just for in this app you can import the data and in particular you can link
to the simulation and sample data store that you created before you can you know go on and then
also give a name to this when you import the data you can see all the data that you have measured
in simulation that we have motor current motor speed and so on so if we activate the parallel
computing option we can actually speed up the process once again so we click on signal
trace we can see what the signals look like in particular what we're seeing here is the current
of the servo motor and then you can zoom in a little bit you can see if you can observe any
particular pattern quickly but from the app you can also extract features both in time
domain and frequency domain so for instance let's select some features here so the first thing that
you can choose is to whether you want to struct features from the current from the speed of the
motor or maybe from the position error so in this case we select current of the motor and then you
can either select all the features or maybe you can just pick some of that so for instance in
this case we're just interested in the mean the RMS in the core Tonys is the skewness and so on
so once you click on okay you will get a table and this is the exact same table
that we obtained before through MATLAB API so as you can see here we have the
table on the Left we have you know not so many features because we have
an extract more we can quickly visualize the table and as you can see here we have
rose and a few columns of these really depends on how many features you want
to extract so once this is done you can export the table to the MATLAB
workspace so that you are essentially back to the point that you were before so this
is again a different way to extract features in the next video we will see how we can use
these features to train a classification model for condition monitoring purposes