Matlab function in Simulink

조회 수: 5 (최근 30일)
Mohammad Nasiri
Mohammad Nasiri 2022년 5월 7일
답변: Joel Van Sickel 2022년 5월 10일
I have a function which is also consist of some functions.
I want to run a simulink to put a controller to control the mass flow rate.
But, when I can the matlab function from simulink, I received a lot of errors (about the optimization part and etc.).
How can I run this matlab function continiously insimulink without error?
  댓글 수: 2
Sam Chak
Sam Chak 2022년 5월 7일
Yes, it is possible to control the mass flow rate in Simulink.
But can you show the governing flow equation, and the flow control law, ?
You are also encouraged to display the control block diagram here.
Mohammad Nasiri
Mohammad Nasiri 2022년 5월 8일
Let me explain better.
There is a mass flow rate of H2 inside a fuel cell. As H2 is consued, H2O is produced and electricty and heat is generated.
All is done my some functions all in matlab.
I want to use the remaining H2 at the outlet egain (it is called recirculation), and I am sugessted to do it in simulink,
But, as I have some function like fmincon, I receive a lot of errors.

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

답변 (1개)

Joel Van Sickel
Joel Van Sickel 2022년 5월 10일
Hello Mohammad,
This answer addresses using the 'coder.extrinsic' setting to use more complicated functions so they work with Simulink inside of the matlab function block.
Regards,
Joel

카테고리

Help CenterFile Exchange에서 Specialized Power Systems에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by