How can explain the relation between mdlDerivatives output and mdlOutputs in S-function simulink
3 ビュー (過去 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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Block and Blockset Authoring についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!