The task from Kristinehamns energi was to by identification create a model of the heating system in Kristinehamns. For this purely mathematical model we used MathWorks software Matlab. The purpose with the model is to investigate how one can achieve as low flow and temperature on the water back from the heat exchanger as possible. This report describes a mathematical model of three typical cases from Kristinehamns heating system made in Matlab. The models are identified with measured values for temperatures and flows. The first case is about a real estate there the energy consumption basically constitutes of heating. In the second case is the water consumption a big part of the energy consumption and is therefore harder to identify. The third case is the whole system. This is easier to identify than individual houses there it is a lot of water consumption. The variations that occur at individual houses and separate errors get less important. There have been some problems that we couldn’t do a good identification of all the systems. The problem is that we are missing some values from the secondary side of the heat exchanger. This makes that the models can not identify the relations in the heat exchanger in a good way, which leads to that the simulations of some models are not useful to what it was meant for in the beginning. Therefore we are satisfied to do simulations where we look at the trends in the dynamic.