Rate Limiter per minute

2 views (last 30 days)
Johannes Kretzer
Johannes Kretzer on 2 Jan 2016
Answered: goerk on 6 Jan 2016
Hello,
I have the following task:
Depending on the change in the power fed of a photovoltaic system, a battery is to be activated. Exactly the task is, if the change of power fed per minute is > 10% of the photovoltaic plant rating, power is fed into the battery or is fed out of the battery.
For this I need an algorithm that determines for a (moving) minute interval its minimum and its maximum. On that basis, it can be checked (Max - Min > 0.1 * Pnom) whether the battery needs to be activated or not to be activated.
In Simulink there is in fact the block Rate Limiter, however this block only compares the value of the current time step with the value of the previous time step.
For Matlab I have already written a script (see "rate_limiter_per_minute.m"), but I do not know how to implement this logic in Simulink.
thank you for your help
  1 Comment
Rakesh Chavan
Rakesh Chavan on 6 Jan 2016
Hi,
Have you tried using the data store read and write blocks available in Simulink for storing the data corresponding to your window size?
You can then take an average over the values stored in memory and then use the compare block to operate the battery. Documentation for the memory read and memory write blocks can be found at: http://www.mathworks.com/help/simulink/slref/datastorewrite.html
Hope this helps.

Sign in to comment.

Answers (1)

goerk
goerk on 6 Jan 2016
You can use the 'Tapped Delay' block to generate an array with the last N values. With two 'MinMax' blocks you can calculate the minimum and maximum. And then compare the difference to your threshold.

Categories

Find more on Modeling in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!