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.