필터 지우기
필터 지우기

Cummulative Summing in Simulink

조회 수: 8 (최근 30일)
A-Rod
A-Rod 2024년 6월 5일
댓글: A-Rod 2024년 6월 5일
Hello community.
I am trying to do cumulative summing in Simulink, which I beleive creates a a loop. Can anyone
recommend how I accomplish it?
input signal ---> SUM BLOCK ----> output
0.2 0.2
0.3 0.5
0.1 0.6
0.5 1.1
0.7 ---> SUM BLOCK ---> 1.8
0.8 2.6
0.3 2.9
0.6 3.5
any feedback will be highly appreciated

채택된 답변

Andres Adam
Andres Adam 2024년 6월 5일
Hi A-Rod, you are right: we usually need a loop in this situation. A cumulative sum is usually done with a "memory" block like this:
I am using the 8 values you provided as an example.
I have seen other solutions such as using a "unit delay" block, integrator blocks, and the dedicated "Cumulative sum" block from the DSP System Toolbox.
I recommend paying attention to the time. When should the cumulative sum be performed? I changed my solver settings to take discrete steps at 1 second. Be careful to not run into issues where you are summing the same value more than once.
  댓글 수: 1
A-Rod
A-Rod 2024년 6월 5일
this is what I was looking for, thanks a lot for sharing and for furhter explanation.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Signal Generation에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by