Using Trend Variables through EMS for Shading Control
Dear Unmethours Community,
I am planning to actuate the blinds angle based on indoor sensors (glare index and illuminance), in which I have written the EMS coding so far as below:
EnergyManagementSystem:Sensor,
S1, !- Name D1, !- Output:Variable or Output:Meter Index Key Name
Daylighting Reference Point 1 Illuminance ; !- Output:Variable or Output:Meter Name
EnergyManagementSystem:Sensor,
S2, !- Name
D1, !- Output:Variable or Output:Meter Index Key Name
Daylighting Reference Point 1 Glare Index ; !- Output:Variable or Output:Meter Name
EnergyManagementSystem:Actuator,
myA1, !- Name
ASF, !- Actuated Component Unique Name
Schedule:Year, !- Actuated Component Type
Schedule Value; !- Actuated Component Control Type
EnergyManagementSystem:ProgramCallingManager,
MyComputedTransProg, !- Name
BeginTimestepBeforePredictor, !- EnergyPlus Model Calling Point
myProgram1; !- Program Name 1
EnergyManagementSystem:Program,
myProgram1, ! Name
Set Daylit = S1 ,
Set DGI = S2 ,
IF (Daylit <= 2000) && (DGI < 24),
Set myA1 = 90 ,
ELSEIF (Daylit > 2000) && (DGI < 24),
Set myA1 = 25 ,
ElSEIF (Daylit > 2000) && (DGI > 24),
Set myA1 = 0,
ElSEIF (Daylit <= 2000) && (DGI > 24),
Set myA1 = 45,
ENDIF ;
EnergyManagementSystem:GlobalVariable,
myglobeA1; !- Erl Variable 1 Name
EnergyManagementSystem:OutputVariable,
WeightedShadeFractionSchedule, !- Name
myglobeA1, !- EMS Variable Name
Averaged, !- Type of Data in Variable
SystemTimestep; !- Update Frequency
Output:EnergyManagementSystem ,
Verbose ,
Verbose ,
Verbose;
It works perfectly, but now I want to make a control logic that corresponds to the time steps, I mean I want to say if the venetian blinds had to be at 90 degrees, it should remain at least for 20 minutes (if my time steps are in minutes) regardless of sensors' values.
I have read that there is Trend Variables that I think is the one that I should use, and I have seen some examples here as well but they could not give a clue how should I perform this, or is this possible at all or not?
Cheers Amir