2024-05-11 04:22 PM
I need to tune PID coefficients for a set of motor controllers. I’d like to use NanoEdge AI studio, but I’m not sure it supports what I need. The input to the model is to be a set of four error values and the output is a set of coefficients. NanoEdge accepts UART input for the error values, which is perfect, but I need it to generate coefficients. Instead, I only see examples of it being used for classification tasks. Can it be used for this? If not, is there another tool?
2024-05-13 01:39 AM
Hello,
You can indeed collect data via UART to create datasets. You can also collect the data on your side and then import csv if you want.
You mentioned coefficients, In NanoEdge AI Studio, there is no "multi target" prediction but you can try the following depending on your needs:
- Create multiple "Extrapolation" models (regression). Each model will predict one of your coefficients
To create such model, you will need to collect 4 error values examples with corresponding coefficient and then train an "extrapolation" model in NanoEdge. It is easy to integrate multiple models with NanoEdge, so you can create as many models as you have coefficients.
For extrapolation, you need to collect both error values and coefficients to predict, so you will need to collect your data outside of NanoEdge with the following format:
If you don't want multiple models, you could try to create unique IDs to a combination of coefficients and then try to predict the ID instead of the multiple coefficients. When creating your IDs you need to think of a way to later be able to find the coefficient easily when you have the ID (because the model will predict the ID and you need to coefficients)
- If you don't have thousands of combinations of coefficients, you may try to create classes and do N class classification.
- You can also take a look at CubeAI but for that you will need to create and train a multi target regression model on your own and then use CubeAI to integrate it on microcontroller.
Best regards,
Julian