FIR filter by matlab
- 최초 등록일
- 2010.12.01
- 최종 저작일
- 2010.12
- 12페이지/ 한컴오피스
- 가격 1,500원
소개글
매트랩을 이용한 FIR filter 디자인 입니다.
코드와 설명 및 캡처 그림까지 포함되어 있습니다.
목차
1.코드
2.설명
3.결론
본문내용
1) Design a lowpass FIR filter with the following specifications:
Print the low pass FIR filter coefficients and plot the frequency responses using MATLAB.
What are the filter gains for the stopband at 2000 Hz and passband at 200 Hz based on the plot of the magnitude frequency response?
N=31; %order of filter
fc=800; %Cut off Frequency
fs=8000; %Sampling rate
Fc=fc/(fs/2); %normalized
bLP=fir1(N-1,Fc,`low`, boxcar(N)) %Filter coefficients
[hLP,f]=freqz(bLP,1,512,8000);
pLP=180*unwrap(angle(hLP))/pi; %Transform phasor form
subplot(2,1,1);
plot(f,20*log10(abs(hLP)));grid
axis([0 4000 -100 10]);
xlabel(`Frequency (Hz)`); ylabel(`Magnitude Response (dB)`);
subplot(2,1,2);
plot(f,pLP);grid
xlabel(`Frequency (Hz)`); ylabel(`Phase (degrees)`);
window function을 사용하면 안되므로 boxcar를 사용하여 Rectangular로 바꾸어 연산을 실시하였다.
fir1을 이용하여 필터계수를 구할 수 있다.
에서 앞에 붙은 의 값들이 필터계수가 된다.
이때 값들은 Z transform 형태로 바꾸어 계산이 가능하다.
의 연산을 통해서 구할 수 있다.
이러한 연산을 생략할 수 있도록 matlab에서는 fir1이라는 연산자가 존재한다.
참고 자료
없음