Tuning PI controller from Simulink model with an m-file
Afficher commentaires plus anciens
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:
io(1)=linio('model/controlleroutput',1,'input');
io(2)=linio('model/processoutput',1,'openoutput');
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
1 commentaire
Jos
le 15 Nov 2013
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Programmatic Tuning dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!