You may find this submission helpful if you are new to the very basic principle that guides control engineers during the first stage of the controller design process, i.e. the selection of sufficient/proper controller structure that is able to reduce control error asymptotically to zero. I don't address transient states at this point -- all controllers are tuned by guessing and checking just to make the system stable. Have fun with applying IMP!
Bartlomiej Ufnalski (2020). Internal model principle (https://www.mathworks.com/matlabcentral/fileexchange/75208-internal-model-principle), MATLAB Central File Exchange. Retrieved .