Jamie,
I had a bug in the Python script that assumed all time steps were equal. I modified the script at http://apmonitor.com/pdc/index.php/Main/FirstOrderOptimization to accept any time step sequence and have also attached the new Python script to this message. As I mentioned on the YouTube video comment, the Scipy.optimize.minimize solver is not very good and it fails to find a better solution in this case. I just got it close to an optimal solution with guesses of Kp = 0.47, taup=190, and theta=15. The optimizer changed it slightly but came up with a slightly worse solution than my guess (see Sum of Squared Errors - SSE):
Initial SSE Objective: 17037.4813533
Final SSE Objective: 17038.3204311
“Optimized values”:
Kp: 0.470073645057
taup: 190.065271549
thetap: 14.9793341623

With the initial guess (Kp = 0.47, taup=190, and theta=15), the solution is close to your data.
You could convert over to fmincon or fminsearch if you have the energy to learn MATLAB. Here is a tutorial with fminsearch (fmincon is similar): https://youtu.be/ynm7B0N0_Yw There are also tutorials on using more advanced estimation methods in Python and MATLAB at the dynamic optimization course web-site at http://apmonitor.com/do (see Estimation section).
Best regards,
John Hedengren
--
--
APMonitor user's group e-mail list.
- To post a message, send email to apmo...@googlegroups.com
- To unsubscribe, send email to
apmonitor+...@googlegroups.com
- Visit this group at http://groups.google.com/group/apmonitor
---
You received this message because you are subscribed to the Google Groups "apmonitor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
apmonitor+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.