I would like to build an adaptive PID controller for DC motor speed control. This controller should adjust the PWM duty cycle. The idea is that the program identifies the DC motor transfer function and adjust the PID parameters automatically for that motor. I've seen this using MATLAB, i.e, some data is recorded and given to MATLAB so it does all the job. But this time, let's say, I don't want to use MATLAB everytime I have to do PID tuning. I mean, let's say I have different DC motors, it means the transfer function changes, so PID parameter should change for that specific motor. Now, I have couple of doubts:
1- I'm measuring speed and current of the motor. Is this information enough?
2- The motor nameplate usually indicates the voltage, amps, and RPM. Can I extract useful information from it for the controller?
3- Is this achievable with a 32-bit ARM microcontroller?
Basically, I'm asking for help to write and understand the C algorithm, and implementation. I have been researching in Google about this, but I don't find much. if you have any document, book, or papers references which explain how to implement the C code, I will appreciate it.