I have a simulink model which simulates the behavior and control of a process. I built a script to change an run the model to evaluate different scenarios and settings. Since different scenarios would require different settings for the optimal controller, I want to tune it from the m-file. I would like to mimic the tuning of the block if you doubleclick on the block and press the 'Tune...' button (because I assume that is how it should be tuned).
This is what I do:
linsys = linearize('model',io);
pi = pidtune(linsys,'PI');
That is, I linearize the process I want to control and use that to tune the PI controller. However, I get a different result if I click on the 'Tune...' button. Hence, I'm doing something different.
Can someone tell me what part of the model I should linearize to do what the 'Tune...' button does? As you can read, I'm not really used to the field of control, and the only understanding of 'tuning' that I have is that it sounds reasonable to understand the dynamic behavior of the process before setting the PI settings. But I've no idea what I should linearize to tune it correctly. In my system I have a combination of feedback and feedforward.
Kind regards, Jos