How to store and retrieve value in simulink
조회 수: 4 (최근 30일)
이전 댓글 표시
Hi I'm Rofiq
I'm doing project in simulink which doing battery simulation with equation for example x(k+1)=x(k)+P(k) where x(k+1) is the energy stored in battery at time k+1 that is equal to energy stored in battery at time k plus/minus amount energy that charge/discharge to or from battery at time k
What block I should use to build above simulation, I need some block that can store my input value at time k (charging phenomena) and then use/retrieve it at another time k+10 (discharging phenomena). This block/variable act like battery which can inform how much energy stored at time instance and also increase/ decrease over sample time
Thank you for the help
댓글 수: 0
채택된 답변
추가 답변 (5개)
lokesh kumar
2021년 9월 13일
Tapped Delay block could help you on this. It stores all previous values of how much delay you set in the block...It will store it in a vector format and at last you can access it altogether at once.

댓글 수: 0
Walter Roberson
2015년 5월 4일
Your x is effectively an integrator applied to P so use an integrator block.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Sources에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!