필터 지우기
필터 지우기

How can I pass GUI data to simulink?

조회 수: 1 (최근 30일)
Gustavo Amorim
Gustavo Amorim 2012년 9월 5일
I'm designing a GUI to calculate PID parameters using Ziegler-Nichols, Cohen_Coon and so on. This GUI calculate the parameters and display it, I'd like to send the result values to a PID Controller block on simulink. I'v read about set_param function but I don't know how to use it actually.

답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2012년 9월 5일
편집: Azzi Abdelmalek 2012년 9월 5일
the best way is set_param, and it's simple
if your moel name is 'ModelName', and an PID Controller name is 'PID Controller' (name by default) then if your parameters are Kp, Ti ad TD
set_param('ModelName/PID Controller','P',num2str(Kp)) %Proportional action
set_param('ModelName/PID Controller','I',num2str(Ti)) %Integral action
set_param('ModelName/PID Controller','D',num2str(Td)) %Derivative action
  댓글 수: 1
Gustavo Amorim
Gustavo Amorim 2012년 9월 5일
Thank you so much Azzi, it worked perfectly! =D

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

카테고리

Help CenterFile Exchange에서 PID Controller Tuning에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by