发布网友 发布时间:2022-04-28 21:10
共1个回答
热心网友 时间:2022-06-23 05:25
当采样频率ws=2wm时,称为临界采样。据此可知:下列程序实现对信号Sa(t)的临界采样及由采样信号恢复Sa(t):
程序如下:
wm=1; wc=wm;
Ts=pi/wm; ws=2*pi/Ts;
n=-170:170; nTs=n*Ts f=sinc(nTs/pi);
Dt=0.005;t=-45:Dt:45;
fa=f*Ts*wc/pi*sinc((wc/pi)*(ones(length(nTs),1)*t-nTs'*ones(1,length(t))));
t1=-25:0.5:25;
f1=sinc(t1/pi); subplot(211); stem(t1,f1); xlabel('kTs');
ylabel('f(kTs)');
title('sa(t)=sinc(t/pi)的临界采样信号');
subplot(212); plot(t,fa) xlabel('t'); ylabel('fa(t)');
title('由sa(t)=sinc(t/pi)的临界采样信号重构sa(t)'); grid;
过采样及其重构 ,当ws>2wm时则称采样为过采样,所以令wm=1,wc=1.1*wm,Ts=0.8*pi/wm,ws=2*pi/Ts则下列程序实现对信号Sa(t)的临界采样及由采样信号恢复Sa(t):
wm=1; wc=1.1*wm;
Ts=0.8*pi/wm; ws=2*pi/Ts;
n=-170:170; nTs=n*Ts f=sinc(nTs/pi);
Dt=0.005;t=-45:Dt:45;
fa=f*Ts*wc/pi*sinc((wc/pi)*(ones(length(nTs),1)*t-nTs'*ones(1,length(t))));
error=abs(fa-sinc(t/pi));
t1=-25:0.5:25;
f1=sinc(t1/pi); subplot(311); stem(t1,f1); xlabel('kTs');
ylabel('f(kTs)');
title('sa(t)=sinc(t/pi)的采样信号');
subplot(312); plot(t,fa) xlabel('t'); ylabel('fa(t)');
title('由sa(t)=sinc(t/pi)的过采样信号重构sa(t)');
grid; subplot(313); plot(t,error); xlabel('t'); ylabel('error(t)');
title('过采样信号与原信号的误差error(t)');
3、欠采样及其重构 令wm=1,wc=wm,ws=1.3*pi/wm,这种采样信号被称为欠采样信号,这种信号的重构被称为欠采样信号的重构,具体程序如下:
wm=1; wc=wm;
Ts=1.3 *pi/wm; ws=2*pi/Ts;
n=-170:170; nTs=n*Ts f=sinc(nTs/pi);
Dt=0.005;t=-45:Dt:45;
fa=f*Ts*wc/pi*sinc((wc/pi)*(ones(length(nTs),1)*t-nTs'*ones(1,length(t))));
error=abs(fa-sinc(t/pi));
t1=-25:0.5:25;
f1=sinc(t1/pi); subplot(311);
stem(t1,f1);
xlabel('kTs'); ylabel('f(kTs)');
title('sa(t)=sinc(t/pi)的采样信号'); subplot(312); plot(t,fa) xlabel('t'); ylabel('fa(t)');
title('由sa(t)=sinc(t/pi)的欠采样信号重构sa(t)'); grid; subplot(313); plot(t,error); xlabel('t'); ylabel('error(t)');
title('欠采样信号与原信号的误差error(t)');
追问大神,我现在在做周期信号的傅里叶级数及频谱分析。要求: