<< Chapter < Page
  Procedure   Page 1 / 1
Chapter >> Page >
ELEC 301 Project Procedure Part 2: Sampling and Smoothing Frequency Response

2. sampling and smoothing the response.

Next sample the frequency response logarithmically so that low frequencies will be weighted more importantly by the filter. This allows the logarithmic plot of an ideal inverse filter and the inverse filter implemented by FIR coefficients to match (rather than matching only high frequencies). Next use MATLAB’s built in Savitzky Golay [ y = sgolayfilt(x,k,f)] filter to smooth the curve so as to reduce the noise of the response. The motivation behind this was is to prevent the fir2 algorithm from trying to create an inverse filter with the inverse of the noise of the frequency response.

sampfft=thisfft(round(10.^(linspace(0,log10(length(thisfft)),1000)))); %sample fft logrithmicly at 1000 points

smoothfft=sgolayfilt(sampfft, 3, 71);

smoothfft(smoothfft<0)=0; %fix smoothing errors

semilogy(smoothfft)

title('Smoothed Frequency Response');

xlabel('Frequency');

ylabel('Response (dB)');

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Procedure. OpenStax CNX. Dec 14, 2010 Download for free at http://cnx.org/content/col11255/1.1
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Procedure' conversation and receive update notifications?

Ask