抽样定理与信号重建
1.抽样定理: 若 f(t)是带限信号,带宽为ωm,f(t)经采样后的频谱Fs(ω),此时要满足Nyquist取样定理
2.信号重建: fs(t)经过理想低通滤波h(t)后可重建f(t)
注:可参考郭宝龙教授的教材
例5-1Sa(t)的临界采样及信号重构
wm=1; %信号带宽 wc=wm; %滤波器截止频率 Ts=pi/wm; %采样间隔 ws=2pi/Ts; %采样角频率 n=-100:100; %时域采样电数 nTs=nTs %时域采样点 f=sinc(nTs/pi); Dt=0.005;t=-15:Dt:15; fa=fTswc/pisinc((wc/pi)(ones(length(nTs),1)*t-nTs’*ones(1,length(t)))); %信号重构 t1=-15:0.5:15; 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;
例5-2 Sa(t)的过采样及信号重构
Sa(t)的过采样及信号重构和绝对误差分析程序和例 5-1 类似,将采样间隔改成 Ts=0.7π/ωm , 滤波器截止频率该成 ωc=1.1ωm ,添加一个误差函数
wm=1; wc=1.1wm; Ts=0.7pi/wm; ws=2pi/Ts; n=-100:100; nTs=nTs f=sinc(nTs/pi); Dt=0.005;t=-15:Dt:15; fa=fTswc/pisinc((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); 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)’);
例 5-3 Sa(t)的欠采样及信号重构和绝对误差分析
程序和例 5-2 类似,将采样间隔改成 Ts=1.5*π/ωm , 滤波器截止频率该成 ωc =ωm =1
课后习题
2.1
wm=2; wc=1.2wm; Ts=1; ws=2pi/Ts;%取样频率 n = -100 : 100; nTs=nTs; f = 0.5 * ( 1 + cos( n * Ts ) ); Dt=0.005;t=-15:Dt:15; fa=fTswc/pisinc((wc/pi)*(ones(length(nTs),1)*t-nTs’*ones(1,length(t)))); error=abs( fa - 0.5 * ( 1 + cos( t ) ) ); %重构信号与原信号误差 t1=-15:0.5:15; f1= 0.5 * ( 1 + cos( t1 ) ) ; subplot(311); stem(t1,f1); xlabel(‘kTs’);ylabel(‘f(kTs)’); title(‘f( t ) = f( n * Ts )的采样信号’); subplot(312); plot(t,fa) xlabel(‘t’); ylabel(‘fa(t)’); title(‘由 f( t ) = f( n * Ts )的过采样信号重构 f(t)’); grid; subplot(313); plot(t,error); xlabel(‘t’); ylabel(‘error( t )’); title(‘过采样信号与原信号的误差 error( t )’);
2.2
wm=2; wc=2; Ts=2.5; ws=2pi/Ts;%取样频率 n = -100 : 100; nTs=nTs; f = 0.5 * ( 1 + cos( n * Ts ) ); Dt=0.005;t=-15:Dt:15; fa=fTswc/pisinc((wc/pi)(ones(length(nTs),1)*t-nTs’*ones(1,length(t)))); error=abs( fa - 0.5 * ( 1 + cos( t ) ) ); %重构信号与原信号误差 t1=-15:0.5:15; f1= 0.5 * ( 1 + cos( t1 ) ) ; subplot(311); stem(t1,f1); xlabel(‘kTs’);ylabel(‘f(kTs)’); title(‘f( t ) = f( n * Ts )的采样信号’); subplot(312); plot(t,fa) xlabel(‘t’); ylabel(‘fa(t)’); title(‘由 f( t ) = f( n * Ts )的过采样信号重构 f(t)’); grid; subplot(313); plot(t,error); xlabel(‘t’); ylabel(‘error( t )’); title(‘过采样信号与原信号的误差 error( t )’);
|
请发表评论