System for heating a building comprising: - a heat generator adapted to heat a carrier fluid, - at least one radiating element suitable for transferring heat to a thermal load included in a building, - a delivery conduit for transferring the carrier fluid from the heat generator to the radiating element, - a return conduit for transferring the carrier fluid from the radiating element to the heat generator, - a three-way valve arranged along the delivery conduit and connected to the return conduit, the three-way valve being operable to mix the carrier fluid in the delivery conduit to the carrier fluid in the return conduit, - a plurality of temperature sensors arranged to measure the temperature of the carrier fluid and a temperature of the environment outside the building, and - a control unit operatively connected to the heat generator, to the three-way valve and to the temperature sensors, wherein the control unit is configured for: a) acquiring a temperature (Tw) of the carrier fluid in the delivery conduit downstream of the three-way valve with respect to the direction of the flow of the carrier fluid in the delivery conduit, b) acquiring a temperature (Tc) of the carrier fluid in the return conduit upstream of the three-way valve with respect to the direction of the flow of the carrier fluid in the return conduit, c) acquiring a temperature (T E) of the environment outside the building, d) estimating a first target temperature (T W1) of the carrier fluid in the delivery conduit downstream of the three-way valve, based on a simplified model of the system calculated as a function of the temperature (T E) of the external environment, characterized in that the control unit is further configured for e) actuating at least one among the heat generator and the three-way valve to generate a periodic perturbation in the temperature (Tw) of the carrier fluid downstream of the three-way valve, f) determining a second target temperature (T W2) of the carrier fluid in the delivery conduit downstream of the three-way valve based on a temperature difference (ΔT) between the temperature (Tw) of the carrier fluid in the delivery conduit and the temperature (Tc) of the carrier fluid in the return conduit based on said perturbation, g) combining the first target temperature (T W1) and the second target temperature (T W2) to obtain a total target temperature (T WT), h) actuating at least one among the heat generator and the three-way valve to bring the carrier fluid (Tw) in the delivery conduit downstream of the three-way valve to the total target temperature (T WT), and i) reiterating steps e) to h) until reaching a difference in target temperature (ΔT OPT) between the temperature (Tw) of the carrier fluid in the delivery conduit and the temperature (Tc) of the carrier fluid in the return conduit. - a heat generator adapted to heat a carrier fluid, - at least one radiating element suitable for transferring heat to a thermal load included in a building, - a delivery conduit for transferring the carrier fluid from the heat generator to the radiating element, - a return conduit for transferring the carrier fluid from the radiating element to the heat generator, - a three-way valve arranged along the delivery conduit and connected to the return conduit, the three-way valve being operable to mix the carrier fluid in the delivery conduit to the carrier fluid in the return conduit, - a plurality of temperature sensors arranged to measure the temperature of the carrier fluid and a temperature of the environment outside the building, and - a control unit operatively connected to the heat generator, to the three-way valve and to the temperature sensors, a) acquiring a temperature (Tw) of the carrier fluid in the delivery conduit downstream of the three-way valve with respect to the direction of the flow of the carrier fluid in the delivery conduit, b) acquiring a temperature (Tc) of the carrier fluid in the return conduit upstream of the three-way valve with respect to the direction of the flow of the carrier fluid in the return conduit, c) acquiring a temperature (T E) of the environment outside the building, d) estimating a first target temperature (T W1) of the carrier fluid in the delivery conduit downstream of the three-way valve, based on a simplified model of the system calculated as a function of the temperature (T E) of the external environment, characterized in that the control unit is further configured for e) actuating at least one among the heat generator and the three-way valve to generate a periodic perturbation in the temperature (Tw) of the carrier fluid downstream of the three-way valve, f) determining a second target temperature (T W2) of the carrier fluid in the delivery conduit downstream of the three-way valve based on a temperature difference (ΔT) between the temperature (Tw) of the carrier fluid in the delivery conduit and the temperature (Tc) of the carrier fluid in the return conduit based on said perturbation, g) combining the first target temperature (T W1) and the second target temperature (T W2) to obtain a total target temperature (T WT), h) actuating at least one among the heat generator and the three-way valve to bring the carrier fluid (Tw) in the delivery conduit downstream of the three-way valve to the total target temperature (T WT), and i) reiterating steps e) to h) until reaching a difference in target temperature (ΔT OPT) between the temperature (Tw) of the carrier fluid in the delivery conduit and the temperature (Tc) of the carrier fluid in the return conduit.