简体   繁体   中英

Predictive curve fitting matlab

I have a question about curve fitting, I have many curves like the one in the picture.

X axis : time Y axis : temperature

Each sample comes out every 30s.

GOAL : predict the value at the end of the transient

What would you do in this situation? What I am doing is this : for every new sample I start a new fitting (and so each fitting is independent from the previous one) and check the value of the fitted curve 2 hours (all curves I have set before 2h) after the start of the measurement. If for a number (let's say 5) of subsequent fitting the value in the future stays more or less the same(+-0.2°C) I so assume that the estimation is the right one.

This approach seems to me far too simple and I think I am not exploiting all information. For example the info of the error I am making punctually (eg at minute 4:00 I predict and at 4:30 I see that I am doing an error).

在此处输入图片说明

In the picture the red part of the curve is excluded (but the real data in the future passes through it). the estimation is the blue one. You see in this case I don't have a good prediction... In general I have also more flat curves.

Based on the comments above, I tried to formulate an answer as no one else is giving some input .

I think your are using a good basic procedure. Better results may be obtained by using a more appropriate fitting curve, which includes all the dominant dynamics, but avoids overfitting of the data. Based on your figure, the simplest form I could think of is:

s + a(1-e^(-t/tau))

with parameters s (the initial temperature), a (amplitude = steady state value) and tau (dominant time constant). As you mentioned yourself, limiting the allowed range for the parameters may avoid overfitting and increase the quality of your estimation.

Using a random high order function, like you are using now, may give good interpolation results, but are dangerous to use for extrapolation, because strange effects may occur outside the fitting region.

Alternatives

Using the error (eg. correcting for the extrapolated error) may be possible, but is tricky and may not always give good results.

Training a neural network to perform the estimation is probably overkill, but may give better results if applied correctly. Note that you need a lot of training data which should be representative for the data for which you will use the neural network later on.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM