MATLAB Answers

Does Simulink ignore the values of the parameters of the blocks in the diagram while detecting algebraic loops?

1 ビュー (過去 30 日間)
Zdenek Hurak
Zdenek Hurak 2018 年 9 月 16 日
編集済み: Arunkumar M 2018 年 11 月 13 日
It appears that Simulink detects an algebraic loop by analyzing the structure of the model but not the parameters of the blocks - see the screenshot below. The algebraic loop was detected and visualised by typing in the command line
Simulink.BlockDiagram.getAlgebraicLoops(bdroot)
Is this correct? And is this desirable? In this case, there is in fact no algebraic loop there.

  0 件のコメント

サインインしてコメントする。

回答 (1 件)

Arunkumar M
Arunkumar M 2018 年 11 月 10 日
The input of the SUM block are taken from output of the sum block - which is why you are getting algebraic loop problem, as at the first time step, there wont be any output from sum block. Hence, simulink usually takes default value (0) in such cases.

  2 件のコメント

Zdenek Hurak
Zdenek Hurak 2018 年 11 月 12 日
Honestly, I am not sure I understand. You write that the input to the SUM block is taken from the output from the SUM block. But that is obviously not true here. See the zero gain.
Arunkumar M
Arunkumar M 2018 年 11 月 13 日
The value of the gain block doesnt matter here. Simulink only checks, during simulation of each time step, whether it has all required input values.
Irrespective of what is the gain value, the input of gain block is the output of sum block, for which the value will be obtained only from second time step. So simulink has to assume a default value (0) in this case for the first time step.
Try adding unit delay at the output of sum block - I hope that solves the algebraic loop probelm.

サインインしてコメントする。

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by