Nguy n V n ễ ă Đờ Ni – 1050953 Name: Nguyễn Kim Lễ - 1050927 Nguyễn Văn Đờ Ni – 1050953 Laboratory Exercise 5 DIGITAL PROCESSING OF CONTINUOUS-TIME SIGNALS Project 5.1 Sampling of a Sinu
Trang 1Nguy n V n ễ ă Đờ Ni – 1050953 Name: Nguyễn Kim Lễ - 1050927
Nguyễn Văn Đờ Ni – 1050953
Laboratory Exercise 5 DIGITAL PROCESSING OF CONTINUOUS-TIME SIGNALS
Project 5.1 Sampling of a Sinusoidal Signal (Lấy mẫu một tín hiệu hình sin)
Answers:
Q5.1 The plots of the continuous-time signal and its sampled version generated
by running Program P5_1 are shown below:
Q5.2 The frequency of the sinusoidal signal in Hz is 13
The sampling period in seconds is 0,1
Q5.3 The effects of the two axis commands are –
Q5.4 The plots of the continuous-time signal and its sampled version generated by
running Program P5_1 for the following four values of the sampling period:
T=0.2
Trang 2T=0.05
T=0.025
Trang 3Nguy n V n ễ ă Đờ Ni – 1050953
Nhận xét:
Chu kỳ lấy mẫu tăng thì các mẫu xa nhau hơn, dạng tín hiệu không giống tín hiệu ban đầu
Chu kỳ lấy mẫu giảm thì các mẫu gần nhau hơn, dạng tín hiệu càng giống tín hiệu ban đầu
Q5.5 The plots of the continuous-time sinusoidal signal of frequency 3 Hz and its
sampled version generated by running a modified Program P5_1 are shown below:
Trang 4The plots of the continuous-time sinusoidal signal of frequency 7 Hz and its sampled version generated by running a modified Program P5_1 are shown below:
Khi lấy mẫu tín hiệu ở tần số 3Hz và 7Hz thì các mẫu giống nhau, hiện tượng chồng phổ trong miền thời gian
Project 5.2 Aliasing Effect in the Time-Domain
Answers:
Q5.6 The plots of the discrete-time signal and its continuous-time equivalent obtained
by running Program P5_2 are shown below:
Trang 5Nguy n V n ễ ă Đờ Ni – 1050953
Q5.7 Vùng của t trong chương trình: trục đứng: -0.5 đến 1.5; trục ngang: 0 đến 500
The value of the time increment is ya
Vùng của t trong đồ thị: trục đứng: 0 đến 1; trục ngang: 0 đến 1
The plot generated by running Program P5_2 again with the range of t changed so as to display the full range of ya(t) is shown below:
Nhận xét: tín hiệu ya(t) chỉ tồn tại trong đoạn [-0.5;1.5]
Q5.8 The plots of the discrete-time signal and its continuous-time equivalent obtained
by running Program P5_2 with the original display range restored and with the frequency of the sinusoidal signal changed to 3 Hz và 7Hz are shown below:
Trang 6Tín hiệu sin khi tần số thay đổi 3Hz và 7Hz có dạng đồ thị giống nhau, hiện tượng chồng phổ trong miền thời gian
Giải thích: do tần số lấy mẫu Fs=1/Ts=1/0,1(s)=10(Hz) < 2fm=2.7=14(Hz)
Project 5.3 Aliasing Effect in the Frequency-Domain
Answers:
Q5.9 The continuous-time function xa(t) in Program P5_3 is xa (t) = 2*t.*exp(-t)
The CTFT of xa(t) is being computed by plot(t,xa)
Q5.10 The plots generated by running Program P5_3 are shown below:
Nhận xét: chu kỳ lấy mẫu T=1: hiện tượng chồng phổ xảy ra Phổ của tín hiệu thời gian
rời rạc bị “nở ra”, không còn bị giới hạn bởi dải nữa
Q5.11 The plots generated by running Program P5_3 with sampling period increased to
1.5 are shown below:
0 0.2 0.4 0.6 0.8
Time, msec
Continuous-time signal x
0 0.5 1 1.5 2
Frequency, kHz
|X
0 0.2 0.4 0.6 0.8
Time index n
Discrete-time signal x[n]
0 0.5 1 1.5 2
Frequency, kHz
Nhận xét: phổ tín hiệu rời rạc tiếp tục “nở” ra, càng không bị giới hạn bởi dải.
Trang 7Nguy n V n ễ ă Đờ Ni – 1050953
Q5.12 The modified Program P5_3 for the case of ( ) .t2
a t e
x = π is given below: clf;
t = 0:0.005:10;
xa = exp(-pi*(t.^2));
subplot(2,2,1) plot(t,xa);grid xlabel('Time, msec');ylabel('Amplitude');
title('Continuous-time signal x_{a}(t)');
subplot(2,2,2)
wa = 0:10/511:10;
ha = freqs(2,[1 2 1],wa);
plot(wa/(2*pi),abs(ha));grid;
xlabel('Frequency, kHz');ylabel('Amplitude');
title('|X_{a}(j\Omega)|');
axis([0 5/pi 0 2]);
subplot(2,2,3)
T = 1;
n = 0:T:10;
xs = exp(-pi*(n.^2));
k = 0:length(n)-1;
stem(k,xs);grid;
xlabel('Time index n');ylabel('Amplitude');
title('Discrete-time signal x[n]');
subplot(2,2,4)
wd = 0:pi/255:pi;
hd = freqz(xs,1,wd);
plot(wd/(T*pi), T*abs(hd));grid;
xlabel('Frequency, kHz');ylabel('Amplitude');
title('|X(e^{j\omega})|');
axis([0 1/T 0 2]) The plots generated by running the modified Program P5_3 are shown below:
0 0.5 1
Time, msec
Continuous-time signal xa(t)
0 0.5 1 1.5 2
Frequency, kHz
|Xa(j Ω )|
0 0.5 1
Time index n
Discrete-time signal x[n]
0 0.5 1 1.5 2
Frequency, kHz
|X(ejω )|
Trang 8Phổ phục hồi sai dạng so với phổ của tín hiệu ban đầu.
The plots generated by running the modified Program P5_3 with sampling period increased to 1.5 are shown below:
0 0.5 1
Time, msec
Continuous-time signal x
0 0.5 1 1.5 2
Frequency, kHz
|X
0 0.5 1
Time index n
Discrete-time signal x[n]
0 0.5 1 1.5 2
Frequency, kHz
Phổ phục hồi hoàn toàn sai dạng so với phổ của tín hiệu ban đầu
Project 5.4 Design of Analog Lowpass Filters
Answers:
Q5.13 The passband ripple Rp in dB is 0.5dB.
The minimum stopband attenuation Rs in dB is 30dB
The passband edge frequency in Hz is 3500Hz
The stopband edge frequency in Hz is 4500Hz
Q5.14 The gain response obtained by running Program P5_4 is shown below:
Trang 9Nguy n V n ễ ă Đờ Ni – 1050953 Mạch lọc có dải chặn và dải thông bằng phẳng
The filter order N is 18
The 3-dB cutoff frequency in Hz of the filter is 3713Hz
Q5.15 The required modifications to Program P5_4 to design a Type 1 Chebyshev lowpass filter meeting the same specifications are given below:
% Program 5_15 clf;
Fp = 3500;Fs = 4500;
Wp = 2*pi*Fp; Ws = 2*pi*Fs;
[N, Wn] = cheb1ord(Wp, Ws, 0.5, 30,'s');
[b,a] = cheby1(N, 0.5, Wn, 's');
wa = 0:(3*Ws)/511:3*Ws;
h = freqs(b,a,wa);
plot(wa/(2*pi), 20*log10(abs(h)));grid xlabel('Frequency, Hz');ylabel('Gain, dB');
title('Gain response');
axis([0 3*Fs -60 5]);
The gain response obtained by running the modified Program P5_4 is shown below:
0 2000 4000 6000 8000 10000 12000 -60
-50 -40 -30 -20 -10 0
Frequency, Hz
Gain response
Mạch lọc có độ dốc hơn và có độ nhấp nhô trong passband
The filter order N is 8
The passband edge frequency in Hz of the filter is 3500Hz
Trang 10Q5.16 The required modifications to Program P5_4 to design a Type 2 Chebyshev lowpass filter meeting the same specifications are given below:
% Program 5_16 clf;
Fp = 3500;Fs = 4500;
Wp = 2*pi*Fp; Ws = 2*pi*Fs;
[N, Wn] = cheb2ord(Wp, Ws, 0.5, 30,'s');
[b,a] = cheby2(N, 0.5, Wn, 's');
wa = 0:(3*Ws)/511:3*Ws;
h = freqs(b,a,wa);
plot(wa/(2*pi), 20*log10(abs(h)));grid xlabel('Frequency, Hz');ylabel('Gain, dB');
title('Gain response');
axis([0 3*Fs -60 5]);
The gain response obtained by running the modified Program P5_4 is shown below:
0 2000 4000 6000 8000 10000 12000 -60
-50 -40 -30 -20 -10 0
Frequency, Hz
Gain response
Mạch lọc này có băng chuyển tiếp hẹp hơn so với “Butterworth lowpass filter” The filter order N is 8
The stopband edge frequency in Hz of the filter is 3500Hz
Q5.17 The required modifications to Program P5_4 to design an elliptic lowpass filter meeting the same specifications are given below:
Trang 11Nguy n V n ễ ă Đờ Ni – 1050953
% Program 5_17 clf;
Fp = 3500;Fs = 4500;
Wp = 2*pi*Fp; Ws = 2*pi*Fs;
[N, Wn] = ellipord(Wp, Ws, 0.5, 30,'s');
[b,a] = ellip(N, 0.5, 30, Wn, 's');
wa = 0:(3*Ws)/511:3*Ws;
h = freqs(b,a,wa);
plot(wa/(2*pi), 20*log10(abs(h)));grid xlabel('Frequency, Hz');ylabel('Gain, dB');
title('Gain response');
axis([0 3*Fs -60 5]);
The gain response obtained by running the modified Program P5_4 is shown below:
0 2000 4000 6000 8000 10000 12000 -60
-50 -40 -30 -20 -10 0
Frequency, Hz
Gain response
Mạch lọc này có băng chuyển tiếp hẹp hơn so với “Type 2 Chebyshev lowpass filter”
The filter order N is 5
The passband edge frequency in Hz of the filter is 3500Hz