File Exchange

image thumbnail

Extrapolation of a sinusoidal signal Using Least Mean Square (LMS)

version 1.0.0.0 (3.33 KB) by Shujaat Khan
Extrapolation of a sinusoidal signal Using Least Mean Square (LMS)

2 Downloads

Updated 17 Jan 2017

View License

The code is quite similar to the code that I submitted for mackey glass series prediction (https://www.mathworks.com/matlabcentral/fileexchange/61017-mackey-glass-time-series-prediction-using-least-mean-square--lms-). The main difference is that in testing phase it utilizes the output generated by the filter itself (feedback) to predict next outcome. In this way you can generate data for N future values.

Comments and Ratings (1)

Shujaat Khan

In this submission, LMS is implemented unconventionally as an IIR filter. In this case the stability of the LMS is not guaranteed.

To see the effect of instability, you can introduce some noise in the training data. for example

change

Data(:,2)=A*sin(2*pi*f*n*ts)% y(t)=sinusoidal signal

to

Data(:,2)=A*sin(2*pi*f*n*ts)+0.01*randn(1,3001); % y(t)=sinusoidal signal + noise

This is due to the fact that we are giving predicted output as a feedback to the LMS, that amplify the error in prediction of the next outcome.

MATLAB Release Compatibility
Created with R2014b
Compatible with any release
Platform Compatibility
Windows macOS Linux