Logic Machine Forum
Calculation of power consumed in the Valle, Llano and Punta periods of the Spanish el - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: Calculation of power consumed in the Valle, Llano and Punta periods of the Spanish el (/showthread.php?tid=5004)



Calculation of power consumed in the Valle, Llano and Punta periods of the Spanish el - JRP - 04.10.2023

The Spanish electricity rate with the PVPC establishes three time periods, namely:

Punta hours : 10:00 - 14:00 and 18:00 - 22:00 from Monday to Friday.
Llano hours 8:00 - 10:00, 14:00 - 18:00 and 22:00 - 00:00 from Monday to Friday.
Valle hours 00:00 - 08:00 from Monday to Friday

Holidays and weekends are 24 valle hours.

I have an object with the total instantaneous active power of the installation.

Likewise I have an object with the total power consumed.

How could I calculate the power consumed in each time slot?

That is to say:

Power consumed in:
Rush hour (10:00 - 14:00) =
Rush hour (18:00 - 22:00) =
etc

This way it would allow me to easily visualize what time I have the most consumption.

Thank you.

Greetings.


RE: Calculation of power consumed in the Valle, Llano and Punta periods of the Spanish el - admin - 05.10.2023

You can use trends in counter mode mapped to the total power object. Set resolution to 1 hour to simplify the calculation. Then trends library functions can be used to query the data and calculate total consumption for different time slots.