I am learning to implement PI controller in arduino. After searching, I discovered that there are two approaches to implementation, one using the discretization methods(tustin, zoh, foh etc) and the other is direct method( just like i= ipast+i*dt). Now which is better?
Perhaps if we knew more about your situation someone would have better ideas.
What works well in a temperature control program may not work as well in a servo positioning or motor speed control program. The BEST way may need to be found by experimentation.