ݷʱ : 2024/12/23 20:27:19һ µȫĶ
ɽѧŵѧԺγ˵
magY1=abs(Y1);%ѸҶ任ĸֵȡģ
subplot(2,2,4);plot(f,magY1(1:2048));title('źƵ');%Ʋ
ͼ
ͼ3.2 ͼ
ͼ3.1ͼ3.2Կ5000~10000֮ԣõźźԭʼźԵIJͬ
3.4 ˲
˲ѰһȶʱϵͳʹϵͳHzָƵԡ
ʵMATLAB亯buttordֵͨIIR˲ ͨ˲ָΪ f_p=5000;f_s=6500; Rp=3;Rs=25;
ò˹˲£
f_p=5000;f_s=6500; Rp=3;Rs=25;%˲ Ws=f_s/(fs/2);Wp=f_p/(fs/2);
9
ɽѧŵѧԺγ˵
[N,wc]=buttord(Wp,Ws,Rp,Rs);%˲N3dBֹƵwc [b,a]=butter(N,wc);%˲ϵͳӷĸʽϵ
freqz(b,a,1000,fs);%˲ W jszʵſƵͼУHWûʲônݵ滹ӦиFsԽƵͼHzȻǸ0~1*pi/FSϵ
axis([0 8000 -30 3]); ͼ
ͼ3.3 ֵͨ˲ͼ
3.5 źŴ
˹˲úfilter˲Ƶ˲ԺźŽ˲˲źŽFFTƵfftĵøʽy=fft(b,x)ͨ˲Z=fft(z,4096)
£
z=filter(b,a,y);%Ѽź˲
subplot(2,1,1);plot(z);title('˲IJ');%Ʋ
10
ɽѧŵѧԺγ˵
Z=fft(z,4096);%ź4096FFT任 magZ1=abs(Z);%ѸҶ任ĸֵȡģ magZ=magZ1(1:2048);%ȡ
subplot(2,1,2);plot(magZ);title('˲źƵ');%Ʋ ͼ
ͼ3.4 ˲ͼ
ԭʼźŲκ˲ͼȽϣͬ˵˲Ч˲ɹ
11
ɽѧŵѧԺγ˵
ƲMATLABʵźŵIJɼźŵļ뼰˲˳һϵйƵͼԿ˹˲е½ķƵԣͨǹ⻬ġѻҲкܶ㡣ͨνѧʵʹҼ˶Կ֪ʶĹ̺⣬źŴеĻӦúͻӲƽ̨㷨ʵּͨMATLABмĵãʹʵӦú֪ʶ֮佨ϵΪԺѧϰ˷dzİ
12