Xử lý tín hiệu số bai4A

5 80 2
Xử lý tín hiệu số bai4A

Đang tải... (xem toàn văn)

Thông tin tài liệu

- Real part of H(ej ) Amplitude 0 0.2 0.4 0.6 0.8 1.2 1.4 1.6 1.8 1.4 1.6 1.8  / Imaginary part of H(ej ) Amplitude Q4.1 % Program P3_1 % Evaluation of the DTFT clf; % Compute the frequency samples of the DTFT w = 0:8*pi/511:2*pi; num = [2 1];den = [1 -0.6]; h = freqz(num, den, w); % Plot the DTFT subplot(2,1,1) plot(w/pi,real(h));grid title('Real part of H(e^{j\omega})') xlabel('\omega /\pi'); ylabel('Amplitude'); subplot(2,1,2) plot(w/pi,imag(h));grid title('Imaginary part of H(e^{j\omega})') xlabel('\omega /\pi'); ylabel('Amplitude'); pause subplot(2,1,1) plot(w/pi,abs(h));grid title('Magnitude Spectrum |H(e^{j\omega})|') xlabel('\omega /\pi'); ylabel('Amplitude'); subplot(2,1,2) plot(w/pi,angle(h));grid title('Phase Spectrum arg[H(e^{j\omega})]') xlabel('\omega /\pi'); ylabel('Phase in radians'); ­2 ­4 0.2 0.4 0.6 0.8 1.2  / Tòa độ đối xứng đồ thị là: M số lẽ nên tín hiệu thu có tâm đối xứng là: (M-1)/2 Tín hiệu thu có chiều dài vơ hạn khơng nhân Q4.2 M = 2 Tín hiệu thu có chiều dài định nhân với giá trị M = tín hiệu có tâm đối xứng ­5 ­10 ­15 G ain in dB - ­20 ­25 ­30 ­35 ­40 ­45 ­50 0.1 0.2 0.3 0.4 0.5  /  0.6 0.7 0.8 0.9 Q4.3 Type 1 FIR Filter 100 - Dựa vào hình ảnh tín hiệu thu ta thấy hai tín hiệu khắc nhau: Tín hiệu thu câu Q4.2 tín hiệu có chiều dài giới hạn nhân cón tín hiệu câu Q4.3 tín hiệu có chiều dai vơ hạn khơng nhân Ta lựa chọn lọc Q4.2 lọc cho ta lọc có chiều dài hữu hạn nhân Amplitude Amplitude 50 ­50 ­100 Time index n Type 3 FIR Filter 100 ­50 Q4.7 Time index n Tín hiệu thu có chiều dài N = 13 - Lệnh hay tham số thiều khiển độ dài n - Tham số chịu ảnh hưởng số cắt fc=0.25 tham số y với y = 2*fc*sinc(2*fc*n) ­50 Time index n Type 4 FIR Filter 10 Time index n 10 50 ­50 ­100 N = 13 0.6 - 100 50 ­100 50 ­100 Amplitude - Tín hiệu có độ dài vơ hạn không nhân Amplitude - Type 2 FIR Filter 100 0.5 0.4 Amplitude 0.3 0.2 0.1 ­0.1 ­0.2 Time index n 10 12 Q4.8 N = 20 0.8 0.6 Amplitude % Program P4_1 % Impulse Response of Truncated Ideal Lowpass Filter clf; fc = 0.45; n = [-10:1:10]; y = 2*fc*sinc(2*fc*n);k = n+10; stem(k,y);title('N = 20');axis([0 20 -0.2 1]); xlabel('Time index n');ylabel('Amplitude');grid; 0.4 0.2 ­0.2 10 12 Time index n 14 16 18 20 Q4.9 % Program P4_1 % Impulse Response of Truncated Ideal Lowpass Filter clf; fc = 0.65; n = [-7.5:1:7.5]; y = 2*fc*sinc(2*fc*n);k = n+7.5; stem(k,y);title('N = 15');axis([0 20 -0.2 0.6]); xlabel('Time index n');ylabel('Amplitude');grid; N = 15 0.6 0.5 0.4 Amplitude 0.3 0.2 0.1 ­0.1 ­0.2 10 15 Time index n Q4.10 % Program P4_1 % Impulse Response of Truncated Ideal Lowpass Filter clf; fc = 0.25; n = [-6.5:1:6.5]; y = 2*fc*sinc(2*fc*n);k = n+6.5; plot(k,y);title('N = 13');axis([0 13 -0.2 0.6]); xlabel('Time index n');ylabel('Amplitude');grid; N = 13 0.6 0.5 0.4 Amplitude 0.3 0.2 0.1 ­0.1 ­0.2 Time index n 10 12 Q4.11 - Nếu ta khuếch đại số cắt biên độ tín hiệu thay đổi N = 13 0.6 hai điểm đầu cuối tín hiệu 0.5 0.4 Amplitude 0.3 0.2 0.1 ­0.1 ­0.2 Time index n 10 12 Q4.12 N = 13 0.6 0.5 0.4 0.3 Amplitude % Program P4_1 % Impulse Response of Truncated Ideal Lowpass Filter clf; fc = 0.25; n = [-6.5:1:6.5]; y = 2*fc*sinc(2*fc*n);k = n+6.5;gain(k,2); stem(k,y);title('N = 13');axis([0 13 -0.2 0.6]); xlabel('Time index n');ylabel('Amplitude');grid; 0.2 0.1 ­0.1 ­0.2 Time index n 10 12 Q4.13 N = 5 0.6 0.5 0.4 0.3 Amplitude % Program P4_1 % Impulse Response of Truncated Ideal Lowpass Filter clf; fc = 0.25; n = [-2.5:1:2.5]; y = 2*fc*sinc(2*fc*n);k = n+2.5; stem(k,y);title('N = 5');axis([0 -0.2 0.6]); xlabel('Time index n');ylabel('Amplitude');grid; 0.2 0.1 ­0.1 ­0.2 Q4.19 % Program P4_3 % Zero Locations of Linear Phase FIR Filters clf; b = [1 -8.5 30.5 -63]; num1 = [b 81 fliplr(b)]; num2 = [b 81 81 fliplr(b)]; num3 = [b -fliplr(b)]; num4 = [b 81 -81 -fliplr(b)]; n1 = 0:length(num1)-1; n2 = 0:length(num2)-1; subplot(2,2,1); stem(n1,num1); xlabel('Time index n');ylabel('Amplitude'); grid; title('Type FIR Filter'); subplot(2,2,2); stem(n2,num2); xlabel('Time index n');ylabel('Amplitude'); grid; title('Type FIR Filter'); subplot(2,2,3); stem(n1,num3); xlabel('Time index n');ylabel('Amplitude'); grid; title('Type FIR Filter'); subplot(2,2,4); stem(n2,num4); xlabel('Time index n');ylabel('Amplitude'); grid; title('Type FIR Filter'); pause 0.5 1.5 2.5 Time index n 3.5 4.5 - Type 1 FIR Filter 50 ­50 ­100 are'); 100 are'); Time index n Type 3 FIR Filter ­50 Time index n ­50 Time index n Type 4 FIR Filter 10 Time index n 10 100 50 ­100 50 ­100 Amplitude are'); are'); Type 2 FIR Filter 100 Amplitude Amplitude 100 Amplitude subplot(2,2,1); zplane(num1,1); title('Type FIR Filter'); subplot(2,2,2); zplane(num2,1); title('Type FIR Filter'); subplot(2,2,3); zplane(num3,1); title('Type FIR Filter'); subplot(2,2,4); zplane(num4,1); title('Type FIR Filter'); disp('Zeros of Type FIR Filter disp(roots(num1)); disp('Zeros of Type FIR Filter disp(roots(num2)); disp('Zeros of Type FIR Filter disp(roots(num3)); disp('Zeros of Type FIR Filter disp(roots(num4)); 50 ­50 ­100 Các tín hiệu cho ta thấy giá trị M tín hiệu khác : tín hiệu giá trị M chẵn tín hiệu giá trị M lẽ Tín hiệu có M=8 a ... Type 1 FIR Filter 100 - Dựa vào hình ảnh tín hiệu thu ta thấy hai tín hiệu khắc nhau: Tín hiệu thu câu Q4.2 tín hiệu có chiều dài giới hạn nhân cón tín hiệu câu Q4.3 tín hiệu có chiều dai vô hạn không... Type FIR Filter disp(roots(num4)); 50 ­50 ­100 Các tín hiệu cho ta thấy giá trị M tín hiệu khác : tín hiệu giá trị M chẵn tín hiệu giá trị M lẽ Tín hiệu có M=8 a ... Type 3 FIR Filter 100 ­50 Q4.7 Time index n Tín hiệu thu có chiều dài N = 13 - Lệnh hay tham số thiều khiển độ dài n - Tham số chịu ảnh hưởng số cắt fc=0.25 tham số y với y = 2*fc*sinc(2*fc*n) ­50 Time index n

Ngày đăng: 25/12/2017, 08:22

Từ khóa liên quan

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan