I am using EnergyPlus to export and FMU and imported to Modelica. I am trying to replicate the model shown in http://simulationresearch.lbl.gov/fmu/EnergyPlus/export/ which seems to work fairly ok. However, my next step is to include a PI-controller for the cooling mode. When i add the PI-controller the model doesn't seem to work properly as the results for the temperature are completely out of the setpoints (20C-heating and 27C-cooling). Could you please advice me on this issue? thank you in advance. I have attached also a screenshot of the PI-controller. I tried to tune the controller by adjusting the parameters K,Ti and although it has an effect on the results, still they are far away from the desired values.