How to put the parameter of a controller as an increasing variable, so that after each simulation it increases itself and simulates automatically. I do not want to enter a value each single time manually and wait for the simulation.

조회 수: 3 (최근 30일)
I have a PI2DOF Controller. I want to check the results(scope) with different I- Parameters of the Controller. For example from (0.1 to 3.0). How can I put this Parameter as an increasing variable, which increases by 0.1 after each Simulation? I cannot enter each value manually after each Simulation. I want to see the difference in the behaviour with all These 0.1 to 3.0 I- Parameters of the Controller. Please help!

답변 (1개)

Naty S
Naty S 2016년 2월 3일
The parameter you want to test should be taken from the workspace, then you could run the simulation in a for loop in a matlab code using the sim command http://www.mathworks.com/help/simulink/ug/using-the-sim-command.html
after that you could just plot the data you need with the hold all command.
Besides that simulink has some good tolls using the PID Tune controller to examine the gain, you main want to test those.
  댓글 수: 6
Matina Baradaran
Matina Baradaran 2016년 2월 3일
Hey Naty,
Thank you a lot. The model works now. However, we are not right now certain what to put as SOMETHING for the plot command. To explain a bit further, we brought the variable to the Workspace with SIMOUT. When we use plot(Level1), which is our variable which we like to see. We get for 0.1 to 0.9 ten independant plots. We actually would like to have all of them in one plot to compare the behaviours.
Thanks a lot again.
Matina Baradaran
Matina Baradaran 2016년 2월 3일
Hey Naty .. I got the answer!!!! thanks a lot! You helped me a lot ... :)

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

카테고리

Help CenterFile Exchange에서 Classical Control Design에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by