Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Problem with EMS code to control window operation according to indoor CO2 levels

I'm using EMS to set the window operation (open = 1, closed = 0) according to the zone CO2 levels (over 800 ppm the window should open). It's working fine but the problem is that the window state changes each timestep (reaches the target - window opens / the next timestep is below the target - window closes... and so on). Any suggestions on how I could overcome this oscillation?

My code is:

EnergyManagementSystem:Sensor,Num_People,Ocupacao_Z1,People Occupant Count; EnergyManagementSystem:Sensor,Sensor_CO2,Z1,Zone Air CO2 Concentration;

EnergyManagementSystem:Actuator,Window,Window,Schedule:Constant,Schedule Value;

EnergyManagementSystem:Program,CO2_window_control,IF (Num_People > 0) && (Sensor_CO2 >= 800),SET Window = 1,ELSE,SET Window = 0,ENDIF;

Thank you.

Problem with EMS code to control window operation according to indoor CO2 levels

I'm using EMS to set the window operation (open = 1, closed = 0) according to the zone CO2 levels (over 800 ppm the window should open). It's working fine but the problem is that the window state changes each timestep (reaches the target - window opens / the next timestep is below the target - window closes... and so on). Any suggestions on how I could overcome this oscillation?

My code is:

EnergyManagementSystem:Sensor,Num_People,Ocupacao_Z1,People

EnergyManagementSystem:Sensor,
  Num_People,
  Ocupacao_Z1,
  People Occupant Count;
EnergyManagementSystem:Sensor,Sensor_CO2,Z1,Zone 
EnergyManagementSystem:Sensor,
  Sensor_CO2,
  Z1,
  Zone Air CO2 Concentration;

Concentration; EnergyManagementSystem:Actuator, Window, Window, Schedule:Constant, Schedule Value;

EnergyManagementSystem:Actuator,Window,Window,Schedule:Constant,Schedule Value;

EnergyManagementSystem:Program,CO2_window_control,IF EnergyManagementSystem:Program, CO2_window_control, IF (Num_People > 0) && (Sensor_CO2 >= 800),SET 800), SET Window = 1,ELSE,SET 1, ELSE, SET Window = 0,ENDIF;

0, ENDIF;

Thank you.

Problem with EMS code to control window operation according to indoor CO2 levels

I'm using EMS to set the window operation (open = 1, closed = 0) according to the zone CO2 levels (over 800 ppm the window should open). It's working fine but the problem is that the window state changes each timestep (reaches the target - window opens / the next timestep is below the target - window closes... and so on). Any suggestions on how I could overcome this oscillation?

My code is:

EnergyManagementSystem:Sensor,
  Num_People,
  Ocupacao_Z1,
  People Occupant Count;

EnergyManagementSystem:Sensor,
  Sensor_CO2,
  Z1,
  Zone Air CO2 Concentration;

EnergyManagementSystem:Actuator,
  Window,
  Window,
  Schedule:Constant,
  Schedule Value;

EnergyManagementSystem:Program,
  CO2_window_control,
  IF (Num_People > 0) && (Sensor_CO2 >= 800),
  SET Window = 1,
  ELSE,
  SET Window = 0,
  ENDIF;

Thank you.