Dynamic Modelling and Control of Counter-Flow Heat Exchangers for Heating and Cooling Systems