资料信号抽样与调制解调
实验四 信号抽样与调制解调
二、实验内容及步骤
Q4-1:范例程序如下
clear, close all,
tmax = 4; dt = 0.01; t = 0:dt:tmax;
Ts = 1/10; ws = 2*pi/Ts; w0 = 20*pi; dw = 0.1; w = -w0:dw:w0;
n = 0:1:tmax/Ts; x = exp(-4*t).*u(t); xn = exp(-4*n*Ts);
subplot(221)
plot(t,x), title('A continuous-time signal x(t)'), xlabel('Time t'), axis([0,tmax,0,1]), grid on subplot(223)
stem(n,xn,'.'), title('The sampled version x[n] of x(t)'), xlabel('Time index n'), axis([0,tmax/Ts,0,1]), grid on Xa = x*exp(-j*t'*w)*dt; X = 0;
for k = -8:8;
X = X + x*exp(-j*t'*(w-k*ws))*dt; end
subplot(222)
plot(w,abs(Xa))
title('Magnitude spectrum of x(t)'), grid on,
axis([-60,60,0,1.8*max(abs(Xa))]) subplot(224)
plot(w,abs(X))
title('Magnitude spectrum of x[n]'), xlabel('Frequency in radians/s'),grid on axis([-60,60,0,1.8*max(abs(Xa))])
111110248 将范例中的Ts=分别换成、和、,可得到:
12 Ts=时的信号时域波形和频谱图
A continuous-time signal x(t)Magnitude spectrum of x(t)1
0.4
0.3
0.50.2
0.1
0001234-50050
Time t
The sampled version x[n] of x(t)Magnitude spectrum of x[n]1
0.4
0.3
0.50.2
0.1
0002468-50050
Time index nFrequency in radians/s
14 Ts=时的信号时域波形和频谱图
18Ts=时的信号时域波形和频谱图
A continuous-time signal x(t)Magnitude spectrum of x(t)
1
0.4
0.3
0.50.2
0.1
0001234-50050
Time t
The sampled version x[n] of x(t)Magnitude spectrum of x[n]
1
0.4
0.3
0.50.2
0.1
000102030-50050
Time index nFrequency in radians/s
根据上面的三幅图形,作一个关于抽样频率是怎样影响已抽样信号频
谱的小结。
答:抽样频率越高,就越接近不容易失真。
程序Program4_1中的连续信号是否是带限信号,如果不是带限信号,是否可以选择一个抽样频率能够完全消除已抽样信号中的频谱的混叠,如果不是带限信号,那么,这个连续时间信号在抽样前必须滤波,请你选择一个较为合适的频率作为防混叠滤波器的截止频率,你选择的这个截止频率是多少,说明你的理由。
答:由上面的频谱图可知它不是带限信号。如果抽样频率不小于信号带宽的2倍时,其频谱之间就没有混叠,但若其抽样频率小于带宽的2倍时,就造成了频谱之间的混叠,在这种情况下,是无论如何也无法恢复出原来的连续时间信号。作为防混叠滤波器的截止频率,其大小应该为100HZ.
Q4- 2 阅读范例程序Program4_2,在这个程序中,选择的信号的最高频率是多少,这个频率选择得是否恰当,为什么, 答:选择信号的最高频率为100HZ,这个频率选择恰当,因为f>2fmax
Q4-3 在1—8之间选择抽样频率与信号最高频率之比,即程序Program4_2中的a值,反复执行范例程序Program4_2,观察重建信号与原信号之间的误差,通过对误差的
分析
定性数据统计分析pdf销售业绩分析模板建筑结构震害分析销售进度分析表京东商城竞争战略分析
,说明对于带限信号而言,抽样频率越高,则频谱混叠是否越小,
答:程序如下:
clear; close all,
wm = 2*pi; a =1;wc = wm; t0 = 2; t = -t0:0.01:t0; x = (1+cos(pi*t)).*(u(t+1)-u(t-1));
subplot(221);
plot(t,x); grid on, axis([-2,2,-0.5,2.5]); title('Original signal x(t)');xlabel('Time t'); ws = a*wm; Ts = 2*pi/ws; N = fix(t0/Ts); n = -N:N; nTs = n*Ts;
xs = (1+cos(pi*nTs)).*(u(nTs+1)-u (nTs-1)); subplot(2,2,2)
stem(n,xs,'.'); xlabel('Time index n'); grid on, title('Sampled version x[n]');
xr = zeros(1,length(t)); xa = xr;
figure(2);
stem(nTs,xs,'.'); xlabel('Time index n'); grid on;hold on for i = 1:L
m = (L-1)/2+1-i;
xa = Ts*(wc)*xs(i)*sinc((wc)*(t+m*Ts)/pi)/pi; plot(t,xa,'b:');axis([-2,2,-0.5,2.5]); hold on pause
xr = xr+xa;
end
plot(t,xr,'r'); axis([-2,2,-0.5,2.5]); hold on figure(1);
subplot(223)
plot(t,xr,'r');axis([-2,2,-0.5,2.5]);
xlabel('Time t');grid on
title('Reconstructed signal xr(t)');
error = abs(xr-x);
subplot(2,2,4)
plot(t,error);grid on
title('Error');xlabel('Time t')
将该程序中的a值分别改为1、4、8,执行该程序: a=1:
a=4:
a=8: