48403 (Проектування блоку обробки сигналів), страница 2
Описание файла
Документ из архива "Проектування блоку обробки сигналів", который расположен в категории "". Всё это находится в предмете "информатика" из 1 семестр, которые можно найти в файловом архиве . Не смотря на прямую связь этого архива с , его также можно найти и в других разделах. Архив можно найти в разделе "курсовые/домашние работы", в предмете "информатика, программирование" в общих файлах.
Онлайн просмотр документа "48403"
Текст 2 страницы из документа "48403"
subplot(212)
plot2d(frq_s,phiz_t,logflag="ln")
xgrid()
yf_out=flts(s_in,sz_t);
scf(11)
subplot(211), plot(yf_out), xgrid()
subplot(212), plot(s_in), xgrid()
scf(12)
ach=abs(fft(yf_out));
plot2d(frq_s,ach(1:641)), xgrid()
err1=0;
for n=3:(N-2),
err1=err1+(ys(n-2)-yf_out(n+2))^2;
end
err1=sqrt(err1/n);
//Режекторный фильтр;
www1sr=46.7/f_discr;
www2sr=48/f_discr;
//zz_tsr=iir(4,'sb','butt',[www1sr www2sr],[0.5 0]);
//zz_tsr=iir(4,'sb','cheb1',[www1sr www2sr],[0.5 0]);
zz_tsr=iir(4,'sb','cheb2',[www1sr www2sr],[0 0.5]);
//zz_tsr=iir(4,'sb','ellip',[www1sr www2sr],[0.5 0.3]);
sz_tsr=syslin('d',zz_tsr);
Hz_tsr=freq(sz_tsr.num,sz_tsr.den,exp(%i*2*%pi*ft));
ampz_tsr=abs(Hz_tsr);
phiz_tsr=atan(imag(Hz_tsr),real(Hz_tsr));
scf(13)
subplot(211)
plot2d(frq_s,ampz_tsr,logflag="ln")
xgrid()
subplot(212)
plot2d(frq_s,phiz_tsr,logflag="ln")
xgrid()
yf_out2=yf_out;
yf_out2=flts(yf_out2,sz_tsr);
scf(14)
subplot(211), plot(yf_out2), xgrid()
subplot(212), plot(s_in), xgrid()
err2=0;
for n=4:(N-3),
err2=err2+(ys(n-2)-yf_out2(n+2))^2;
end
err2=sqrt(err2/n);
scf(16)
ach2=abs(fft(yf_out2));
plot2d(frq_s,ach2(1:641)), xgrid()
err3=0;
for n=4:(N-3),
err3=err3+(ys(n-2)-yf_out2(n+2))^2;
end
err3=sqrt(err3/n);
ampz_t_ok=1:641;
for i=1:(length(ampz_t_ok)),
ampz_t_ok(i)=ampz_tsr(i)*ampz_t(i);
end
scf(17)
plot2d(frq_s,ampz_t_ok,logflag="ln")
xgrid()
scf(18)
subplot(311), plot2d(frq_s(1:400),ampz_t_ok(1:400),logflag="ln"),xgrid()
subplot(312), plot2d(f(1:400),ampsi(1:400),logflag="ln"), xgrid()
//subplot(413), plot2d(f(1:400),amp(1:400),logflag="ln"), xgrid()
subplot(313), plot2d(frq_s(1:400),ach2(1:400),logflag="ln"), xgrid(), xgrid()