Thank you for the link. It is pretty complex with great details of mathematical and various methods.
I am sure somewhere there is much simple algorithm that implement self-tuning PID. Do you know where good and straightforward algorithm for me to write in C?