设有限频带信号,(1)计算该信号的奈奎斯特频率;(2)以不同的采样频率对该信号进行采样,画出采样前和采样后信号的频谱,对比观察和分析信号临界采样、过采样和欠采样情况下,信号频谱有何变化。
解 该信号在ω0=±4π(rad/s)的地方有近似于冲激信号的谱线。根据奈奎斯特采样定理,该信号的临界采样角频率为ωs=2×ω0=8π(rad/s),临界采样频率为,临界采样周期TS=。,过采样;,欠采样。
display(',Ts<,过采样,Ts>,欠采样');
display('Please input the value of sample period');
Ts = input('Ts = ');
t = 0::40;
y = 5+2*cos(2*pi*t)+cos(4*pi*t);
subplot(221);
plot(t,y);
axis([0 8 1 9]);
xlabel('t 单位:s','Fontsize',8);
title('f(t)');
line([0 8],[0 0],'color',[0 0 0]);
%数值求解余弦信号的频谱
N = 300;
W = 2*pi*5;
k = -N:N;
w = k*W/N;
Y = *y*exp(-j*t'*w);
Y = abs(Y);
subplot(222);
plot(w/pi,Y)
axis([-10,10,0,pi*35+]);
title('F(j\omega)');
xlabel('\omega 单位:pi');
%采样后的余弦信号
subplot(223);
plot(t,y,'b:');
hold on
t2=0:Ts:40;
y2=5+2*cos(2*pi*t2)+cos(4*pi*t2);
stem(t2,y2);
axis([0 8 1 9]);
xlabel('t 单位:s','Fontsize',8);
title('fs(t)');
hold off
%采样后余弦信号的频谱
Y2 = Ts*y
云大信号与系统实验五 来自beplayapp体育下载www.apt-nc.com转载请标明出处.