Close

PID Autotune controllers added

A project log for NomadStep: Modular motor controllers

Control 2 x n motors through CAN over one UART channel

ben-limBen Lim 05/15/2018 at 20:570 Comments

The code now includes generic PID controller functions that can be used for different purposes such as velocity and position tracking.

And to use all these PID controllers, I added a PID autotuner based on the Nelder Mead algorithm that searches over a R3 space for the optimum coefficients to obtain the lowest rise time. These functions are included in the gen_algo.c file and should be applicable to other projects as well.

I decided to reorganise the code this way so that it is portable to other projects. I was also got rather annoyed with having to write the same code over and over again in another project so this quickly became a priority. This reduces the code I have to rewrite and test and should result in increased productivity in the future since the code has already been written.

Discussions