一、
1.抽样定理
2. 信号重建
二、
1. 验证实验原理中所述的相关程序;
2. 设,由于带限信号不严格,但其带宽 wm可以根据一定的精度要求做一些近似。
根据以下三种情况使用MATLAB实现由f(t)的抽样信号fs(t),再重构 f(t),并对三种情况下的结果进行误差分析。
wm=1;%信号带宽 wc=wm; 理想低通截止频率% ws=2*wm; %采样频率 Ts=2*pi/ws; %采样间隔 n=-100:100; %时域采样点数 nTs=n*Ts; %时域采样点 f=sinc(nTs/pi); Dt=0.005; t=-15:Dt:15; fa=f*Ts*wc/pi*sinc((wc/pi)*ones(length(nTs),1)*t-nTs'*ones(1,length(t)));%信号重建 t1=-15:0.5:15; f1=sinc(t1/pi); subplot(2,1,1) stem(t1,f1) xlabel('kTs'); ylabel('f(kTs)'); title('sa(t)=sinc(t/pi)的临界采样信号') subplot(2,1,2) plot(t,fa) xlabel('t'); ylabel('f(at)'); title('由sa(t)=sinc(t/pi)重建临界采样信号sa(t)') grid on %% wm=1;%信号带宽 wc=wm;%低通截止频率 ws=3*wm;%采样频率 Ts=2*pi/ws;%采样间隔 n=-100:100;%时域采样点数 nTs=n*Ts;%时域采样点 f=sinc(nTs/pi); Dt=0.005; t=-15:Dt:15; 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=-15:0.5:15; f1=sinc(t1/pi); figure; subplot(3,1,1) stem(t1,f1); xlabel('kTs'); ylabel('f(kTs)'); title('sa(t)=sinc(t/pi)欠采样信号; grid subplot(3,1,2) plot(t,fa); xlabel('t'); ylabel('f(at)'); title('sa(t)=sinc(t/pi)重建欠采样信号 sa(t)'); grid subplot(3,1,3) plot(t,error) xlabel('t'); ylabel('f(at)'); title('重建信号与原信号之间的误差 errot(t)'); grid on
wm=5000*pi;%信号带宽 wc=wm;理想低通截止频率% ws=2*wm;%采样频率 Ts=pi/wm;%采样间隔 n=-100:100;%时域采样点数 nTs=n*Ts;%时域采样点 f=exp(-1000.*abs(nTs)); Dt=0.005; t=-15:Dt:15; fa=f*Ts*wc/pi*sinc((wc/pi)*ones(length(nTs),1)*t-nTs'*ones(1,length(t)));%信号重建。 error=abs(fa-exp(-1000.*abs(t)));%重建信号与原信号之间的误差。 t1=-15:0.5:15; f1=exp(-1000.*abs(t1)); subplot(4,1,1) plot(t,exp(-1000.*abs(t))); xlabel('t'); ylabel('f(t)'); title(原信号); grid subplot(4,1,2) stem(t1,f1); xlabel('kTs'); ylabel('f(kTs)'); title(采样信号); grid subplot(4,1,3) plot(t,fa); xlabel('t'); ylabel('f(at)'); title(重建采样信号 sa(t)'); grid subplot(4,1,4) plot(t,error) xlabel('t'); ylabel('f(at)'); title('重建信号与原信号之间的误差 errot(t)'); grid on
wm=10000*pi;%信号带宽 wc=1.1*wm;理想低通截止频率% ws=2*wm;%采样频率 Ts=pi/wm;%采样间隔 n=-100:100;%时域采样点数 nTs=n*Ts;%时域采样点 f=exp(-1000.*abs(nTs)); Dt=0.005; t=-15:Dt:15; fa=f*Ts*wc/pi*sinc((wc/pi)*ones(length(nTs),1)*t-nTs'*ones(1,length(t)));%信号重建。 error=abs(fa-exp(-1000.*abs(t)));%重建信号与原信号之间的误差。 t1=-15:0.5:15; f1=exp(-1000.*abs(t1)); subplot(4,1,1) plot(t,exp(-1000.*abs(t))); xlabel('t'); ylabel('f(t)'); title(原信号); grid subplot(4,1,2) stem(t1,f1); xlabel('kTs'); ylabel('f(kTs)'); title(采样信号); grid subplot(4,1,3) plot(t,fa); xlabel('t'); ylabel('f(at)'); title(重建采样信号 sa(t)'); grid subplot(4,1,4) plot(t,error) xlabel('t'); ylabel('f(at)'); title('重建信号与原信号之间的误差 errot(t)'); grid on
wm=2500*pi;%信号带宽 wc=0.9*wm;理想低通截止频率% ws=2*wm;%采样频率 Ts=pi/wm;%采样间隔 n=-100:100;%时域采样点数 nTs=n*Ts;%时域采样点 f=exp(-1000.*abs(nTs)); Dt=0.005; t=-15:Dt:15; fa=f*Ts*wc/pi*sinc((wc/pi)*ones(length(nTs),1)*t-nTs'*ones(1,length(t)));%信号重建。 error=abs(fa-exp(-1000.*abs(t)));%重建信号与原信号之间的误差。 t1=-15:0.5:15; f1=exp(-1000.*abs(t1)); subplot(4,1,1) plot(t,exp(-1000.*abs(t))); xlabel('t'); ylabel('f(t)'); title(原信号); grid subplot(4,1,2) stem(t1,f1); xlabel('kTs'); ylabel('f(kTs)'); title(采样信号); grid subplot(4,1,3) plot(t,fa); xlabel('t'); ylabel('f(at)'); title(重建采样信号 sa(t)'); grid subplot(4,1,4) plot(t,error) xlabel('t'); ylabel('f(at)'); title('重建信号与原信号之间的误差 errot(t)'); grid on
若f(t)是带限连续信号,最高频率为wm,即带宽为wm,即频谱在范围内(-wm.wm)以外为零,保证信号每隔一次Ts重要信息仍然可以在第二次采样后保留,采样频率ws必须大于两倍wm。否则,如果ws<=2wm,所谓频率混叠(频谱重叠)现象。