Block output differs for different instances with same parameters

조회 수: 3 (최근 30일)
Thomas
Thomas 2024년 11월 15일
편집: Paul 2024년 11월 28일
I have developed a custom library block that is being used in several subsystems within a model. However, the different instances of the block generate different outputs while the block parameters are kept constant (i.e., the only variation occurs in the subsystem containing the block and not in the block itself). The trends in the outputs are the same, but the values are slightly different between block instances.
Is this a known aspect of Simulink models with respect to model complexity/model layout?
  댓글 수: 1
Paul
Paul 2024년 11월 16일
편집: Paul 2024년 11월 28일
If two instances of a block are identical in all respects (i.e., parameters, sample time, etc.) and are stimulated with the same inputs, then the outputs should be identical.

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

답변 (1개)

Abhas
Abhas 2024년 11월 26일
Yes, this behavior can occur in Simulink models due to model complexity and layout. Factors such as numerical precision, solver settings, and the execution order of blocks can lead to slight variations in output values across different instances of the same block. Even with constant block parameters, variations in the surrounding subsystem or model configuration can influence the results due to these factors.
You may refer to the following MathWorks documentation links to know more about the solver settings and the execution order of blocks:
  1. https://www.mathworks.com/help/simulink/gui/solver.html
  2. https://www.mathworks.com/help/simulink/ug/controlling-and-displaying-the-sorted-order.html
I hope this helps!
  댓글 수: 2
Paul
Paul 2024년 11월 26일
Is there an exmaple of this behavior where two identical blocks and stimulated with the same inputs produce different outputs?
Abhas
Abhas 2024년 11월 28일
Thomas mentioned that the block parameters are same but the input and the subsystem containing the block might vary.

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

카테고리

Help CenterFile Exchange에서 Simulink Functions에 대해 자세히 알아보기

제품


릴리스

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by