Hi Olivier
I have used 2 PID routine's, one heating, one cooling and logic to select which one runs.
Eg - If in heating mode and PV is above set point for a certain time, switch to cooling mode. My application is a cooling tower for a moulding shop. I have a speed controlled fan for cooling, and a bypass valve for heating.
Although this system has been working ok for over a year, the changeover - heating/cooling is not a smooth one.
My new approach is to PID control the fan, then the valve attempts to keep the fan speed within a certain range. So if fan speed goes outside of a wide dead band, make adjustment to valve position.
I also add a forward feedback proportional value onto the PID CV to give a final CV. This improves control as the cooling tower receives large temp spikes.