How to set input for fuzzy logic controller block

조회 수: 18 (최근 30일)
Tan
Tan 2014년 10월 11일
댓글: Arkadiy Turevskiy 2016년 12월 28일
Hi, I have set up my Fuzzy logic in the FIS editor already. My model has 2 input. I want to analyse the data from excel which has 2 column(for 2 input) by the fuzzy logic I created. 1.Can anyone tell me how to set up the model in Simulink to solve this problem? 2.What is the type of the input/output block I should use if I want the output to be in the excel as well? 3.The fuzzy logic controller in simulink has just one way for input. How can I add one more?
Thank you for the answers.
  댓글 수: 1
Johnny
Johnny 2016년 12월 20일
Hello, could you explain on how you managed to simulate a set of data one by one? I did time-stamp my data from workspace but the from workspace block still inflates all the data to the fuzzy controller.

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

채택된 답변

Arkadiy Turevskiy
Arkadiy Turevskiy 2014년 10월 16일
편집: Arkadiy Turevskiy 2014년 10월 16일
You can read the data from Excel into MATLAB using xlsread command. Once you run the data through your fuzzy system you can write results to Excel using xlswrite command.
If all you are doing is running the input data through a fuzzy inference system, you do not need to do this in Simulink. You can do it using the function evalfis .
If you really need to do this in Simulink, just use Fuzzy Logic Controller block.
See this example for how to set it up with 2 inputs.
The data you import from xls file will be a matrix in your workspace, you can use it in Simulink by using From Workspace block.
  댓글 수: 2
Johnny
Johnny 2016년 12월 20일
Hello, Could you be a little more clear on this. As the from workspace block seems to inflate all the values at once in my case. I time-stamped the vector from the workspace, but still there is a problem.
Arkadiy Turevskiy
Arkadiy Turevskiy 2016년 12월 28일
what do you mean it "inflates" values?

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Fuzzy Logic in Simulink에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by