The program uses two main scripts to perform the testing and analysis of the test signals created by placing input signals through the adaptive filter algorithms implemented. The scripts are testbench.m and DataAnalyser.m.
The script testbench.m performs the LMS or RLS algorithm on a generated input signal in the script with the parameters specified in the User Modifiable Parameters section at the top of the file (this is the only section that the user should be modifying). Once the outputs of the filter are generated, the SaveData function is used to save a copy of the desired signal, the wideband signal, the narrow band signal, the output signal, the error signal and FIR coefficients of the filter in a subfolder named with the parameters used for the test within the folder TestData. An example for the subfolder name would be the name “LMS_M50_nD100_f0.10000_r0.00010” where M is the filter order, nD is the delay of the input to the filter, f is the normalized angular frequency and r is the learning/forgetting rate. Once the data is saved in the file system, the script plots the input signal, the output signal and the error signal in the time and frequency domains, the square error signal between the wideband signal and the error signal, and the frequency response of the adaptive filter.
The script DataAnalyser.m performs the plot comparison between systems that vary by one parameter. The comparison is done by specifying the fixed parameters that are common to all data set in the User Modifiable Parameters section at the top of the script and specifying the variable that we are comparing between systems. This script only works if data has been collected and save into the TestData folder using the testbench.m script. The script will find all data sets that can be compared and will load the appropriate data sets. The script then plots the Mean Square Error between the signal s[n] and e[n] and the frequency response of the converged systems. The modifiable variables are filter order M, the delay nD, the frequency f, and the learning/forgetting rate r. The variable that is being compared must be identified in the variable variable, which can take the name of the parameter as a string (values can be 'M', 'nD', 'f', and 'r').