Simulink "Sum" block giving wrong result
조회 수: 4 (최근 30일)
이전 댓글 표시
I ran a simulation that produced an unnexpected result. It was supposed to be just a noise floor, but for some periods this signal seems to stay constane and then spike before returning to normal. And it happened twice in this particular length of simulation:
I tried the debugger and found an error in a sum block. I've tried re-running multiple times, the error occurs at the same timestep (my noise input didn't change between these runs). If I change the tolerance, it still occurs, but at a different time step.
Example, in this step, the result of the sum of this two signals is correct 1.9794e-11 - 1.905161e-11 = 7.43e-13;
As well as in the next step, -9.639417e-13 + 3.0406e-12 = 2.07e-12
however, at the next step, the signals are updated, but the sum, wrongly, still displays the previous value:
It continues for several steps. If I choose to run the remaining of the simulation, eventually it just "explodes" after a while and goes back to normal.
What could be going on?
댓글 수: 3
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!