Example 6. Window Shade Control[LINK]
Problem Statement[LINK]
EnergyPlus offers a wide range of control options in the WindowShadingControl object, but it is easy to imagine custom schemes for controlling shades or blinds that are not available. We need to ask, Can we use the EMS to override the shading controls?
EMS Design Discussion[LINK]
We will take the example file PurchAirWindowBlind.idf and use EMS to add a new control scheme. This file has an interior blind that can be either “on” or “off.” The control scheme has three parts:
Deploy the blind whenever too much direct sun would enter the zone and cause discomfort for the occupants.
Deploy the blind whenever there is a significant cooling load.
Leave the blind open whenever the first two constraints have not triggered.
We assume that a model for the direct sun control is based on incidence angle, where the angle is defined as zero for normal incidence relative to the plane of the window. When the direct solar incidence angle is less than 45 degrees, we want to draw the blind. EnergyPlus has a report variable called “Surface Ext Solar Beam Cosine Of Incidence Angle,” for which we will use a sensor in our EnergyManagementSystem:Sensor input object. This sensor is a cosine value that we turn into an angle value with the built-in function @ArcCos. Then we will use the built-in function @RadToDeg to convert from radians to degrees. This new window/solar incidence angle in degree may be an interesting report variable, so we use an EnergyManagementSystem:OutputVariable input object to create custom output.
Because the transmitted solar is a problem only when there is a cooling load, we also trigger the blind based on the current data for cooling. The report variable called “Zone/Sys Sensible Cooling Rate” is used in an EMS sensor to obtain an Erl variable with the most recent data about zone cooling load required to meet setpoint. When this value is positive, we know the zone cannot make good use of passive solar heating, so we close the blind.
The EMS actuator will override the operation of a WindowShadingControl input object. Related to this, the EDD file shows
! <EnergyManagementSystem:Actuator Available>, Component Unique Name, Component Type, Control Type
EnergyManagementSystem:Actuator Available,ZN001:WALL001:WIN001,Window Shading Control,Control Status
Although the user-defined name for the WindowShadingControl is “INCIDENT SOLAR ON BLIND,” the component unique name of the actuator that is available is called “ZN001:WALL001:WIN001.” There could be multiple windows, all with shades, and each is governed by a single WindowShadingControl input object. The EMS actuator could override each window separately. The Control Type is called “Control Status,” and requires you to set the status to one of a set of possible control flags. For this case, with only an interior shade, there are two states for the actuator to take. The first shows the shade is “off,” and corresponds to a value of 0.0. The second shows the interior shade is “on,” and corresponds to a value of 6.0.
The EMS input objects for this example follow and are contained in the example file called “EMSWindowShadeControl.idf.”
Output:EnergyManagementSystem,
Verbose,
Verbose,
Verbose;
EnergyManagementSystem:Sensor,
Solar_Beam_Incident_Cos, !Name
Zn001:Wall001:Win001,! Output:Variable or Output:Meter Index Key Name
Surface Outside Face Beam Solar Incident Angle Cosine Value; ! Var Name
Output:Variable, Zn001:Wall001:Win001,
Surface Outside Face Beam Solar Incident Angle Cosine Value, Timestep;
EnergyManagementSystem:Sensor,
Zone_Sensible_Cool_Rate, !Name
RESISTIVE ZONE,! Output:Variable or Output:Meter Index Key Name
Zone Air System Sensible Cooling Rate; ! Var Name
Output:Variable, RESISTIVE ZONE,
Zone Air System Sensible Cooling Rate, Timestep;
EnergyManagementSystem:ProgramCallingManager,
Window Shading Device EMS Controller, ! Name
BeginTimestepBeforePredictor , ! EnergyPlus Model Calling Point
Set_Shade_Control_State ; ! Program Name 1
EnergyManagementSystem:Actuator,
Zn001_Wall001_Win001_Shading_Deploy_Status, ! Name
Zn001:Wall001:Win001, ! Component Name Surface name with shade controls
Window Shading Control, ! Component Type
Control Status; ! Control Type
EnergyManagementSystem:Program,
Set_Shade_Control_State, ! Name
!
Set IncidentAngleRad = @ArcCos Solar_Beam_Incident_Cos,
Set IncidentAngle = @RadToDeg IncidentAngleRad,
!
IF IncidentAngle < 45 , ! Block intense direct sun
Set Zn001_Wall001_Win001_Shading_Deploy_Status = Shade_Status_Interior_Blind_On,
ELSEIF Zone_Sensible_Cool_Rate > 20, ! block to reduce cooling loads
Set Zn001_Wall001_Win001_Shading_Deploy_Status = Shade_Status_Interior_Blind_On,
Else,
Set Zn001_Wall001_Win001_Shading_Deploy_Status = Shade_Status_Off ,
ENDIF ;
EnergyManagementSystem:OutputVariable,
Erl Shading Control Status, ! Name
Zn001_Wall001_Win001_Shading_Deploy_Status, ! EMS Variable Name
Averaged, ! Type of Data in Variable
ZoneTimeStep ; ! Update Frequency
EnergyManagementSystem:OutputVariable,
Erl Zn001:Wall001:Win001 Incident Angle, ! Name
IncidentAngle, ! EMS Variable Name
Averaged, ! Type of Data in Variable
ZoneTimeStep ; ! Update Frequency
EnergyManagementSystem:GlobalVariable, IncidentAngle;
Output:Variable,
*,
Erl Shading Control Status,
Timestep;
Output:Variable,
*,
Erl Zn001:Wall001:Win001 Incident Angle,
Timestep;
EnergyManagementSystem:ProgramCallingManager,
Init Window Shading Device Control Constants, ! Name
BeginNewEnvironment , ! EnergyPlus Model Calling Point
InitializeShadeControlFlags ; ! Program Name 1
EnergyManagementSystem:GlobalVariable, Shade_Status_None;
EnergyManagementSystem:GlobalVariable, Shade_Status_Off ;
EnergyManagementSystem:GlobalVariable, Shade_Status_Interior_Shade_On;
EnergyManagementSystem:GlobalVariable, Shade_Status_Switchable_Dark;
EnergyManagementSystem:GlobalVariable, Shade_Status_Exterior_Shade_On;
EnergyManagementSystem:GlobalVariable, Shade_Status_Interior_Blind_On;
EnergyManagementSystem:GlobalVariable, Shade_Status_Exterior_Blind_On;
EnergyManagementSystem:GlobalVariable, Shade_Status_Between_Glass_Shade_On;
EnergyManagementSystem:GlobalVariable, Shade_Status_Between_Glass_Blind_On;
EnergyManagementSystem:Program,
InitializeShadeControlFlags,
! these are control flag values used inside EnergyPlus for window shades
! EMS control of window shading devices involves setting the control values for shading control actuators with
! one of these values. The variable names can be used or replaced, it is the whole number values that trigger
! changes in the modeling.
! Shades and Blinds are either fully on or fully off, partial positions require multiple windows.
! the window shading control flag values follow
! -1: if window has no shading device
Set Shade_Status_None = 0.0 - 1.0, ! this is how to write a negative number Erl does not have unary "minus," only binary subtraction
! 0: if shading device is off
Set Shade_Status_Off = 0.0,
! 1: if interior shade is on
Set Shade_Status_Interior_Shade_On = 1.0,
! 2: if glazing is switched to darker state
Set Shade_Status_Switchable_Dark = 2.0,
! 3: if exterior shade is on
Set Shade_Status_Exterior_Shade_On = 3.0,
! 6: if interior blind is on
Set Shade_Status_Interior_Blind_On = 6.0,
! 7: if exterior blind is on
Set Shade_Status_Exterior_Blind_On = 6.0,
! 8: if between-glass shade is on
Set Shade_Status_Between_Glass_Shade_On = 8.0,
! 9: if between-glass blind is on
Set Shade_Status_Between_Glass_Blind_On = 9.0;
! 10: window has interior shade that is off but may be triggered on later
! to control daylight glare
! 20: window has switchable glazing that is unswitched but may be switched later
! to control daylight glare or daylight illuminance
! 30: window has exterior shade that is off but may be triggered on later
! to control daylaight glare or daylight illuminance
! 60: window has interior blind that is off but may be triggered on later
! to control daylaight glare or daylight illuminance
! 70: window has exterior blind that is off but may be triggered on later
! to control daylaight glare or daylight illuminance
! 80: window has between-glass shade that is off but may be triggered on later
! to control daylaight glare or daylight illuminance
! 90: window has between-glass blind that is off but may be triggered on later
! to control daylaight glare or daylight illuminance
! A "shading device" may be an exterior, interior or between-glass shade or blind,
! or the lower-transmitting (dark) state of switchable glazing (e.g., electrochromic).
! In all cases, the unshaded condition is represented
! by the construction given by window's Surface()%Construction and
! the shaded condition is represented by the construction given by
! the window's Surface()%ShadedConstruction
Example 6. Window Shade Control[LINK]
Problem Statement[LINK]
EnergyPlus offers a wide range of control options in the WindowShadingControl object, but it is easy to imagine custom schemes for controlling shades or blinds that are not available. We need to ask, Can we use the EMS to override the shading controls?
EMS Design Discussion[LINK]
We will take the example file PurchAirWindowBlind.idf and use EMS to add a new control scheme. This file has an interior blind that can be either “on” or “off.” The control scheme has three parts:
Deploy the blind whenever too much direct sun would enter the zone and cause discomfort for the occupants.
Deploy the blind whenever there is a significant cooling load.
Leave the blind open whenever the first two constraints have not triggered.
We assume that a model for the direct sun control is based on incidence angle, where the angle is defined as zero for normal incidence relative to the plane of the window. When the direct solar incidence angle is less than 45 degrees, we want to draw the blind. EnergyPlus has a report variable called “Surface Ext Solar Beam Cosine Of Incidence Angle,” for which we will use a sensor in our EnergyManagementSystem:Sensor input object. This sensor is a cosine value that we turn into an angle value with the built-in function @ArcCos. Then we will use the built-in function @RadToDeg to convert from radians to degrees. This new window/solar incidence angle in degree may be an interesting report variable, so we use an EnergyManagementSystem:OutputVariable input object to create custom output.
Because the transmitted solar is a problem only when there is a cooling load, we also trigger the blind based on the current data for cooling. The report variable called “Zone/Sys Sensible Cooling Rate” is used in an EMS sensor to obtain an Erl variable with the most recent data about zone cooling load required to meet setpoint. When this value is positive, we know the zone cannot make good use of passive solar heating, so we close the blind.
The EMS actuator will override the operation of a WindowShadingControl input object. Related to this, the EDD file shows
! <EnergyManagementSystem:Actuator Available>, Component Unique Name, Component Type, Control Type
EnergyManagementSystem:Actuator Available,ZN001:WALL001:WIN001,Window Shading Control,Control Status
Although the user-defined name for the WindowShadingControl is “INCIDENT SOLAR ON BLIND,” the component unique name of the actuator that is available is called “ZN001:WALL001:WIN001.” There could be multiple windows, all with shades, and each is governed by a single WindowShadingControl input object. The EMS actuator could override each window separately. The Control Type is called “Control Status,” and requires you to set the status to one of a set of possible control flags. For this case, with only an interior shade, there are two states for the actuator to take. The first shows the shade is “off,” and corresponds to a value of 0.0. The second shows the interior shade is “on,” and corresponds to a value of 6.0.
EMS Input Objects[LINK]
The EMS input objects for this example follow and are contained in the example file called “EMSWindowShadeControl.idf.”
Documentation content copyright © 1996-2023 The Board of Trustees of the University of Illinois and the Regents of the University of California through the Ernest Orlando Lawrence Berkeley National Laboratory. All rights reserved. EnergyPlus is a trademark of the US Department of Energy.
This documentation is made available under the EnergyPlus Open Source License v1.0.