TMS320F28P550SJ: How to create Motor Fault Detection using Embedded AI models

Part Number: TMS320F28P550SJ

Tool/software:

hi All,

We are creating a demo of Edge AI motor fault detection.
We now have vibration sensor waveforms in Model composer.

What are the next steps for creating a model of a normal motor?

I have read the reference design here, but I don't understand it.

Best Regards,

Ito

  • Hi Ito-san,

    After the specific round of data has been collected, the data files should be saved and appeared at the left-hand side task bar.

    You can click "Display Project Data" to view the captured data.

    Then, please follow the steps in Section 4.1.3 to split the data into training, validation, and test. Dataset splitting is necessary for model training (next step). Please feel free to send a message if you have any other concerns.

    Thanks,

    Jiaxin

  • Hi Jiaxin,

    I understood how to create a file.

    Please help us with the following questions

    1,Please tell me why you divide the data into “training”, “validation” or “testing”?
    2、When I want to make a model of a normal motor, what kind of data should I put in the “training”, “validation” or “testing” set? What kind of data should I put in the “training”, “validation” or “testing” set?
    3,What is the timing of clicking “Start Capture” and then “Export Dataset”?


    4,I have set “Continuous Measurement Time (s )”, “Wait Time between Collections (s )” and “Number of Collections” as in the reference design, is this correct?


    5、How many files should I save and divide into classes?

    I don't understand the theory behind classifying files. Please help me.

    Best Regards,

    Ito

  • Hi Jiaxin,

    Additional question.

    Where is the file “data_converter_for_motor_fault.py” provided ?

    Best Regards,

    Ito

  • Hi Ito-san,

    Happy New Year. Please see the responses below.

    1,Please tell me why you divide the data into “training”, “validation” or “testing”?

    This step is mandatory in any ML/AI model training. The data need to be split into training set, which is used model training, validation set, used to validate the model during training, and testing set, which refers to the part of data that the model never looked at and is used to get an unbiased accuracy evaluation of the trained model. Here is an essay on it: https://www.v7labs.com/blog/train-validation-test-set

    2、When I want to make a model of a normal motor, what kind of data should I put in the “training”, “validation” or “testing” set? What kind of data should I put in the “training”, “validation” or “testing” set?

    In the reference design, we divided the time-series data in each file/operating condition by 50% - training, 30% - validation, and 20% - testing. This is specified in the data splitting python file. After splitting, the data will still be time-series, but truncated pieces.

    3,What is the timing of clicking “Start Capture” and then “Export Dataset”?

    By clicking "Start Capture", a command is sent to C2000 to start streaming the data to PC. "Export Dataset" exports the data files from Model Composer.

    4,I have set “Continuous Measurement Time (s )”, “Wait Time between Collections (s )” and “Number of Collections” as in the reference design, is this correct?

    Yes. Correct. This is a typical setting for capturing the data under one operation condition.

    5、How many files should I save and divide into classes?

    For the example, around 4~5 data files were saved for the combination of one class and one operating condition (specific frequency and load). 

    Thanks,

    Jiaxin

  • The data split python file should locate in the folder "solutions\edge_ai_fault_detection_with_mc\data_collection_preparation".

    Thanks,

    Jiaxin

  • Hi Jiaxin,

    Thank you for your help,

    I have copied "data_converter_for_motor_fault.py" into my data folder directory.


    How do I run "data_converter_for_motor_fault.py"?
    Also, what Python application would you recommend?
    Best Regards,

    Ito

  • Hi Ito-san,

    If you have python installed on Windows (downloaded from: https://www.python.org/downloads/), you can run it through Windows command prompt, after opening the command prompt, go to the directory that contains the .py file using the "cd" command. Then run "py data_converter_for_motor_fault.py".

    It seems you only have the data in normal condition, what are other bearing cases you would like the model to classify?

    Thanks,

    Jiaxin

  • Hi Jiaxin,

    Thank you for your reply.

    It seems you only have the data in normal condition, what are other bearing cases you would like the model to classify?

    Currently, the purpose is to perform the procedures provided by the SDK.
    I am not acquiring data for faulty motors.
    Only data from normal motors is acquired.

    I ran data_converter_for_motor_fault.py and the zip file was created,
    but the split data was not stored in classes_output->classes.
    Is there a problem?

    Best Regards,

    Ito

  • Hi Ito-san,

    Glad that you are trying to make your own demo following the procedures and I am more than happy to help. But if you do not have the data of other conditions, what do you want the AI model to tell? Algorithms need data and examples of what it is trying to detect. Like if you want the model to categorize pictures of cats, dogs, and bears, you will need to train the model with certain amount of pictures of cats, dogs, and bears.

    I ran data_converter_for_motor_fault.py and the zip file was created,
    but the split data was not stored in classes_output->classes.

    Please make sure you first have a folder, in my case "data_prep", then a subfolder named "data" (Fig. 1), python script should be copied into this folder.

    Fig. 1

    pastedimage1736549496498v3.png (320×114)

    In the "data" folder, group the data by classes (Fig. 2), in my case, there are two classes corresponding to two bearing conditions.

    Fig. 2

    After running the script, "classes_output" and its zip is created (Fig. 3), the details of the "class_output" folder is shown in Fig. 4 and Fig. 5 for your reference.

    Fig.3 

    Fig. 4

    Fig. 5 As you can see, the data is split into train, validation, and test :)

    Thanks,

    Jiaxin