How to store and retrieve value in simulink

1 回表示 (過去 30 日間)
ahmad rofiq
ahmad rofiq 2015 年 4 月 22 日
回答済み: lokesh kumar 2021 年 9 月 13 日
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

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2015 年 4 月 22 日
編集済み: Azzi Abdelmalek 2015 年 4 月 22 日
You can use unit delay block

その他の回答 (5 件)

lokesh kumar
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.

ahmad rofiq
ahmad rofiq 2015 年 4 月 22 日
Ok thank you for the help

ahmad rofiq
ahmad rofiq 2015 年 4 月 22 日
Sorry but with unit delay it just like shift the input, it cannot sum all of value that happen from time k until k+10
any suggestion?

Walter Roberson
Walter Roberson 2015 年 5 月 4 日
Your x is effectively an integrator applied to P so use an integrator block.

Purushottama Rao
Purushottama Rao 2015 年 5 月 4 日
You can use integer delay block.

カテゴリ

Help Center および File ExchangeEnergy Storage についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by