# Can Temperature Data be Predicted Using Adaptive Filter (Such As LMS) Algorithm?

I am working on a project which requires me to implement adaptive filter as a predictor. I have just started on adaptive filter and I intend to use least mean square algorithm for weight adjustment.

How can I predict future values from this system ?

Any help would be beneficial for me. Thanks.

Yes you can predict future temperatures, based on past temperatures, using adaptive filtering as well.

The optimal linear estimation of a WSS random process from its past values, which is known as linear prediction, is given by a Wiener filter structure where the desired response to be estimated is the current sample of the input (current temparature in your case) and the filter input is the $$N$$ past samples of the input, (assuming one step forward prediction of order $$N$$).

The LMS adaptive filtering algorithm simply approaches this optimal Wiener predictor coefficients for WSS signals and for non WSS signals tries to continue to be optimal by tracking it.

This prediction mechanism does not depend on the physical origin of the signals but on their statistical characterisation. As long as your temperature data posses reasonable degree of correlation within it, then the filter will do its best to predict it.

• Yes I want the system to predict forward, but how can I determine number of predicted samples, is it set by delay factor ? – Zia Jan 21 '19 at 11:25
• Number of predicted samples is just one; the current sample. Do you mean forward prediction step? it can be any, but the performance would be dependent on how many steps away you try to predict. Also There is no simple formula to determine the LMS filter order $N$, too. There are some approaches, such as Akaike information criterion etc. But the best practice is a trial and error procedure, if it's an offline application... – Fat32 Jan 21 '19 at 12:32
• Thanks for the help for I will definitely look into it. One last thing can you refer some literature from which I can get examples of prediction of any kind of data set for some samples. – Zia Jan 22 '19 at 18:19
• what do you mean by examples? data sets or matlab programs? – Fat32 Jan 22 '19 at 21:11
• matlab programs. – Zia Jan 23 '19 at 4:23