How can explain the relation between mdlDerivatives output and mdlOutputs in S-function simulink
조회 수: 7(최근 30일)
표시 이전 댓글
I am new in Simulink and have a model which is used the S-function. I can not understand how the output of the mdlDerivatives relates to the outputs of the mdlOutputs? In another word, If I want to write a mfile(without using Simulink) what are the states and what are the outputs? I want to write a mfile and find ddq, dq and q but do not get how states in these two parts make the output?(file attached)
댓글 수: 0
답변(1개)
Nick Choi
2017년 11월 14일
As described in this documentation link, 'mdlDerivatives' is an optional method that can be used to compute the derivatives for the continuous states of an S-function at each time step:
'mdlOutputs' is a required method that computes the outputs for an S-function block at each time step
Regarding how the sections of an S-function relate to each other, the following documentation page provides some useful information on how S-functions work and it also describes how the inputs, outputs and states of a block are related:
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!