필터 지우기
필터 지우기

Tuning PI controller from Simulink model with an m-file

조회 수: 3 (최근 30일)
Jos
Jos 2013년 11월 14일
답변: Arkadiy Turevskiy 2013년 11월 19일
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
Jos
Jos 2013년 11월 15일
I found the solution: io(1) should be set to the controller output and io(2) to the controller input (that is, to the output of the block that gives the input to the controller). Now I should try to understand how the linearization exactly works, to see whether it makes sense to tune it in this way.
Regards, Jos

댓글을 달려면 로그인하십시오.

채택된 답변

Arkadiy Turevskiy
Arkadiy Turevskiy 2013년 11월 19일
You are correct, PID Tuner linearizes the model from PID controller output to PID controller input. This is explained in the doc here.

추가 답변 (0개)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by