# How can I make correction in the constants of the model equation?

1 view (last 30 days)
Yugal Gupta on 29 May 2017
Commented: Yugal Gupta on 30 May 2017
Till the nth instant of time, I have some data, using that data I have fitted the curve, have found the constants. Now at (n+1)th instant, I have one more experimental data. Using that data, I want to make some correction in the constants of the model equation without doing curve fitting for again n+1 data. How should I proceed? Thanks in Advance.

Star Strider on 29 May 2017
You are doing sequential parameter estimation. A thorough discussion by James V. Beck, an expert in the field, is SEQUENTIAL METHODS IN PARAMETER ESTIMATION available free online.
It includes MATLAB code. (It was written in 2002, so it may be necessary for you to update the code.)

John D'Errico on 29 May 2017
Edited: John D'Errico on 29 May 2017
This is not even a question about MATLAB, so I'm not sure why I'm answering, therefore I must be bored. :) People think they can gain so much in problems like this. You don't in general.
If the problem is nonlinear, there is no magic updating scheme at all. Just redo the curve fit, but with one more point. Since you will use the previous start point, the estimation will be a bit more efficient, fairly robust to problems as long as the new point is consistent with the rest. The new iterations will be few since schemes like Gauss-Newton are generally quadratic in their convergence near the solution.
Again though, for the nonlinear case, there is no magic update.
If the model is linear in the parameters, then why are you bothering to ask this? Backslash is really fast. Just add the extra data point and redo the estimate. Yes, there are linear algebraic schemes to update a QR factorization to add an extra row. Then you will need to redo the solve anyway from the newly factored system. Unless you have a HUGE amount of data and you are doing this hugely many times, it will be easier to just redo the fit.
The point is, don't waste your effort in trying to optimize code for a problem that does not need the optimization in the first place. The gain, even IF you truly know what you are doing in the linear algebra won't be huge anyway. And I'm sorry to say, that if you don't know enough about the linear algebra to already have known the answer to this question in the first place, then your code will probably be far less efficient than if you had just redone the curve fit with that extra point included! (Hey, somebody had to say it.)
(IFFFF you can find code that works, written by an expert, that you will be able to use, and learn how to use, then you can gain some speed, IF it works in your MATLAB release. If you need to modify the code to make it run, then don't forget that your time is of some value too.)
Yugal Gupta on 30 May 2017
Thank You 'John D'Errico'. My problem is non-linear in nature. The problem is not the optimisation at all. Actually, for redoing curve fit, I have to store the whole experimental data from t=0 point, which will be such a huge data that it will be difficult to store. That's why I am thinking about sequential parameter estimation(Is it the waste of time !). Will it not be as accurate as redoing the curve fit at each instant? Thank you.

Yugal Gupta on 30 May 2017
Thank You 'John D'Errico'. My problem is non-linear in nature. The problem is not the optimisation at all. Actually, for redoing curve fit, I have to store the whole experimental data from t=0 point, which will be such a huge data that it will be difficult to store. That's why I am thinking about sequential parameter estimation(Is it the waste of time !). Will it not be as accurate as redoing the curve fit at each instant? Thank you.