Mechanical ventilation systems have acquired relevance in the past years in order to guarantee the hygrothermal comfort and indoor air quality (IAQ) in highly retrofitted residential buildings. The optimization of control strategies could provide a solution to this existing trade-off between energy efficiency, hygrothermal comfort and IAQ. In this publication, we propose a co-simulation approach (using EnergyPlus and Modelica) and a mathematical approximation of the discomfort of the occupant (namely, quadratic for relative humidity and exponential for CO2), and apply them to a demand controlled ventilation (DCV) scheme. Results show that this approach provides around 10% energy savings, while improving the thermal comfort, without compromising the humidity comfort or the IAQ. Finally, the developed functions could allow the control schemes to adapt to different occupant preferences, showing potential for future work.