title: Scipy fitting to function (FOPDT model identification)
body: <p>I have data from a doublet test and I'm trying to identify the mathematical model in order to tune a PID controller. This is the plotted data ... I'm pouring hot water (m [kg/s]) into a water tank and displace the colder water inside. <a href="https://i.stack.imgur.com/sdYA1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sdYA1.png" alt="enter image description here"></a></p>
  
  <p>The aim of the fitting is to acquire the values K_p, tau_p, and theta_p.
  On APMonitor, there is a <a href="https://apmonitor.com/pdc/index.php/Main/FirstOrderOptimization?action=sourceblock&amp;num=2" rel="nofollow noreferrer">Python script</a> available to fit a FOPDT model to data. Sadly, the outcome is very disappointing.  <a href="https://i.stack.imgur.com/VJ3Ix.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VJ3Ix.png" alt="enter image description here"></a></p>
  
  <p>What could be the reason for this? <a href="https://gofile.io/?c=DrpIqo" rel="nofollow noreferrer">This</a> is the data i used (first column is time, second one the inout, third one the output)</p>