2

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. enter image description here

The aim of the fitting is to acquire the values K_p, tau_p, and theta_p. On APMonitor, there is a Python script available to fit a FOPDT model to data. Sadly, the outcome is very disappointing. enter image description here

What could be the reason for this? This is the data i used (first column is time, second one the inout, third one the output)

cheesus
  • 1,111
  • 1
  • 16
  • 44

2 Answers2

0

I made a 3D scatterplot of the linked data, and it is not what I expected - but I am unfamiliar with your experimental setup. Please review this plot and the data, the data itself appears to be the problem.

enter image description here

James Phillips
  • 4,526
  • 3
  • 13
  • 11
  • Not sure I understand what you mean. [At this link](https://filebin.net/461v9vuahskyzowv) you can find the original data from the project and "generated" data which I want to fit a curve to. To me, they do look very similar, however, scipy manages to fit a curve to the original data and not mine. – cheesus Oct 09 '19 at 09:33
  • Please verify the max and min values for the original and generated data. To me these are very different. – James Phillips Oct 09 '19 at 12:34
  • the scales are very different. i got it working with different initial values ... i guess this can be automized with something like a brute force method, setting different initial values.. – cheesus Oct 09 '19 at 13:34
0

Apparently it was just a problem of wrong initial values. Once I adjusted, I got a much better optimization going. Maybe this can be avoided by choosing the right optimization method?

cheesus
  • 1,111
  • 1
  • 16
  • 44