Adaptive Filter Implementation
randn. For the "unknown" system, use a fourth-order, low-pass elliptical IIR filter. Thus, the reference signal can be generated with the following MATLAB commands:
>> x = randn(1000,1);%random input signal >> [B,A] = ellip(4,0.25,10,0.25);%IIR filter >> d = filter(B,A,x);%reference signal >> figure;freqz(B,A)%view frequency response
whilecommands). Plot the squared-error versus sample number as the filter adapts over time. Also, use
freqzto plot the frequency response of the adaptive filter coefficients,
W, at the end of the simulation. Finally, use
figure;stem(dimpulse(B,A,32))to view and compare the adaptive FIR impulse response and the IIR impulse reponse.
- The filter coefficients should be initialized to zero at the start of program execution.
- The left input channel is the input x[n] to the adaptive filter.
- The right input channel is the reference input signal d[n].
- The left channel output is the adaptive filter output y[n].
- The right channel output is the error signal e[n].
SUB, MPY, MAC, BCC.