CoolerNMP.m is the latest version. Changes: - removed the terminal cost because we want that the zc is saturated at the end, while the terminal cost prevents this resulting in a SS offset - the disturbance is passed form the plant to the NMPC to avoid plant-model mismacth. This could be avoided with a linear MPC which has set point feedback - all states are scaled in the model equation wrt the maximum temperature, which is T hot inlet, such that all values are now [0:1] - constraints for the input rate of change have been added - the weights have been tuned (by trial and error), the ratio of weights for Temp : Valve = 1e2 : 1e-2 (for the non-scales variables), and Tmax*1e2:1e-2. for the scaled. - all parameters are now called from parameters.m at the begining of the main script. Possible improvments: - linear MPC, which will does not need the disturbance, and thus the comparison with PID is fairer