1. Trang chủ
  2. » Luận Văn - Báo Cáo

báo cáo thí nghiệm môn thông tin số mô phỏng nhiễu gauss

17 2 0

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

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

TRƯỜNG ĐẠI HỌC BÁCH KHOA HÀ NỘI VIỆN ĐIỆN TỬ - VIỄN THƠNG  BÁO CÁO THÍ NGHIỆM MƠN: THƠNG TIN SỐ GVHD: Cơ Vũ Hồng Ngọc Mã học phần : ET3250 Sinh viên : Nguyễn Văn Hiền MSSV : 20182496 Lớp : Điện tử 07_K63 Mã lớp thí nghiệm : 706759 Ngày nộp báo cáo : 7/10/2021 Hà Nội, 10/2021 download by : skknchat@gmail.com Bài 1:Mô nhiễu Gauss Bài 1.1: Mã code: x=-5:0.1:5 Px=(1/sqrt(2*pi))*exp(-x.^2/2) plot(x,Px) xlabel('x') ylabel('Px') title('Ham phan bo mat xac suat') Kết : Ham phan bo mat xac suat 0.4 0.35 0.3 Px 0.25 0.2 0.15 0.1 0.05 -5 -4 -3 -2 -1 x Câu hỏi: Câu 1: - Giá trị trung bình kì vọng phản ánh giá trị trung bình phân phối Phương sai phản ánh độ phân tán biến ngẫu nhiên Câu 2: download by : skknchat@gmail.com bao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gauss - Đồ thị P(x) có dạng phổ chng Đó (-8,0) (0,8) , hàm P(x) biểu thị cho hàm số mức lũy thừa số tự nhiên e Câu 3: - Hàm phân phối xác suất Gauss thông tin số cho biết mật độ tập trung thông tin khoảng giá trị xác định Câu 4: - Nếu tăng kì vọng phương sai đồ thị P(x) có xu hướng thoải lệch sang phía bên phải Đó tác dụng hàm lũy thừa Bài 1.2: Mã code: len=100000;%chi?u dài ng?u nhiên x=randn(1,len);%t?o ng?u nhiên theo phân phoi chuan step=0.1; k=-5:step:5; px=hist(x,k)/len/step;%tính s? vecto kho?ng cho b?i vecto k stem(k,px); Px_lt=exp(-k.^2/2)/sqrt(2*pi); hold on; plot(k,Px_lt); title('Phan bo xac xuat Gauss'); xlabel('x'); %truc hoanh ylabel('P(x)'); %truc tung legend('Ly thuyet','Mo phong')%ki hieu hold off Kết quả: download by : skknchat@gmail.com bao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gauss bao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gauss Phan bo xac xuat Gauss 0.45 Ly thuyet Mo phong 0.4 0.35 P(x) 0.3 0.25 0.2 0.15 0.1 0.05 -10 -8 -6 -4 -2 10 x Câu hỏi: Câu 5: - Kết hàm mô lý thuyết tương đối trùng khớp Câu 6: - Kết xác so với kết cũ tăng độ dài trình ngẫu nhiên lên kết xác Câu7: - Chia cho len để tạo đường nét liền, chia cho step để tăng độ dài cho phần tử Câu 8: - Độ dài q trình ngẫu nhiên dùng mơ lớn xác Bài 2:Kĩ thuật lượn tử hóa tuyến tính Bài 2.1: Mã code: download by : skknchat@gmail.com bao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gauss bao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gauss function [indx qy]=lquan(x,xmin,xmax,nbit) nlevel = 2^nbit;% so muc luong tu hoa q=(xmax-xmin)/nlevel; %Buoc luong tu [indx qy]=quantiz(x,xmin+q:q:xmax-q,xmin+q/2:q:xmax-q/2); %Luong tu hoa tin hieu xs xs = rand(1,5)*2-1; [xi xq]=lquan(xs ,-1,1,3) Kết quả: Câu hỏi: Q9 Dòng lệnh sử dụng: [xi xq] = lquan(xs,-1,1,3) Q10 xs = [0.5779 -0.7479 0.0006 0.5595 0.9705] Q11 xi = [6 7] Q12 xq = [0.6250 -0.625 0.1250 -0.6250 0.8750 ] Q13 Dòng bit truyền: 1 0 1 0 0 1 Bài 2.2: Mã code: t=0:.01:20; xt=sin(rand()+t).*cos(rand()*t); [indx xqt]=lquan(xt,-1,1,randi(3)+1); plot(t,xt,'b',t,xqt,'r') grid on Kết quả: download by : skknchat@gmail.com bao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gauss 1 bao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gauss 0.8 0.6 0.4 0.2 -0.2 -0.4 -0.6 -0.8 -1 10 12 14 16 18 20 Câu hỏi: Q14 Số bit dùng để lượng tử hóa cho mẫu tín hiệu n = Q15 Bước lượng tử q = 0.25 Q16 Liệt kê mức biên độ tất mức lượng tử: 0.875, 0.625, 0.375, 0.125, 0.125, -0.375, -0.625, -0.875 Bài 3:Tạp âm lượng tử kĩ thuật lượng tử hóa tuyến tính Bài 3.1: Mã code: N=1000; x_uni=2*rand(1,N)-1; x_sin=sin(linspace(1,5,N));%tin hieu hinh sin nbit=1:10;%so bit luong tu SNqR_uni=zeros(size(nbit));%Khoi tao SNqR_uni=0 SNqR_sin= zeros(size(nbit));%Khoi tao SNqR_uni=0 SNqR_lt=6.02*nbit;%SNqR theo li thuyet Ps_uni=sum(x_uni.^2)/N; Ps_sin=sum(x_sin.^2)/N; for i=1:size(nbit,2) [indx_uni xq_uni] = lquan(x_uni,-1,1,nbit(i)); % Luong tu hoa tin hieu x_uni download by : skknchat@gmail.com bao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gauss bao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gauss [indx_sin xq_sin] = lquan(x_sin,-1,1,nbit(i)); % Luong tu hoa tin hieu x_sin eq_uni = x_uni - xq_uni; % tinh sai so luong tu hoa x_uni eq_sin = x_sin - xq_sin; % tinh sai so luong tu hoa x_sin Pq_uni = sum(eq_uni.^2)/N; % tinh cong suat tap am luong tu x_uni Pq_sin = sum(eq_sin.^2)/N; % tinh cong suat tap am luong tu x_sin SNqR_uni(i) = 10*log10(Ps_uni/Pq_uni); % tinh SNR_db cua x_uni SNqR_sin(i) = 10*log10(Ps_sin/Pq_sin); % tinh SNR_db cua x_sin end plot(nbit,SNqR_uni,'b-'); % ve thi SNR tin hieu phan bo deu mo phong hold on; plot(nbit,SNqR_sin,'r '); % ve thi SNR tin hieu sin mo phong plot(nbit,SNqR_lt,'g-.'); % Ve thi SNR tin hieu phan bo deu ly thuyet title('Do thi SN_qR theo nbit'); xlabel('nbit'); ylabel('SN_qR'); legend('Phan bo deu','Hinh sin','Ly thuyet'); grid on; hold off Kết quả: Do thi SNqR theo nbit 70 Phan bo deu Hinh sin Ly thuyet 60 SN q R 50 40 30 20 10 10 nbit Câu hỏi: download by : skknchat@gmail.com bao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gauss bao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gauss nbit 10 11 12 SNqR_ 6.02 lt 12.04 18.0 24.08 30.10 36.12 42.14 48.1 54.1 60.2 66.22 72.2 SNqR_ 5.97 uni 71 12.10 17 18.0 24.075 29.844 35.930 42.027 48.2 527 54.1 702 60.216 66.233 72.2 792 SNqR_ 6.41 sin 71 12.88 34 19.3 981 25.670 32.038 38.160 44.326 50.4 033 56.4 544 62.572 68.481 74.7 4 Q17 Giá trị SNqR tăng thêm 6,02vì cơng thức lý thuyết SNqR = 6,02n Q18 Vì SNqR lý thuyết = 6,02n bit nên phụ thuộc vào n Q19 SNqR tín hiệu điều hịa có giá trị lớn SNqR tín hiệu phân bố Q20 PdB = A2; q = 2A 2n q2 A2  Bnhiễu = 12 = n 12 ( )  SNqR = 22n  SNqRdB = 10log( 22n) (dB) Bài 4: Mật độ phổ lượng hàm tự tương quan tín hiệu Bài 4.1: Mã code: L = 500; x1 = randn (1,L);%tin hieu gom 500 mau x2 = linspace(-1,1,L); x3 = sin(linspace(-10,10,L)); acorr_x1 = xcorr(x1);%ham tinh tu tuong quan acorr_x2 = xcorr(x2); acorr_x3 = xcorr(x3); download by : skknchat@gmail.com bao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gauss bao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gauss subplot(3,1,1); plot (acorr_x1); title ('Ham tu tuong quan x1 = randn (1,L)'); xlabel ('X'); ylabel ('Acorr_X'); subplot(3,1,2); plot (acorr_x2); title ('Ham tu tuong quan x2 = linspace(-1,1,L)'); xlabel ('X'); ylabel ('Acorr_X'); subplot(3,1,3); plot (acorr_x3); title ('Ham tu tuong quan x3 = sin(linspace(-10,10,L))'); xlabel ('X'); ylabel ('Acorr_X'); Kết quả: Ham tu tuong quan x1 = randn (1,L) 600 AcorrX 400 200 -200 100 200 300 AcorrX 400 500 600 700 800 900 1000 700 800 900 1000 700 800 900 1000 X Ham tu tuong quan x2 = linspace(-1,1,L) 200 100 -100 100 200 300 400 500 600 X Ham tu tuong quan x3 = sin(linspace(-10,10,L)) 300 AcorrX 200 100 -100 -200 100 200 300 400 500 600 X Câu hỏi: Q21 Đối xứng qua trục tung, đạt giá trị cực đại gốc tọa đô, xa gốc tọa độ giá trị giảm Q22 Giá trị cực đại nằm gốc tọa độ theo công thức lý thuyết hàm tự tương quan Q23 Các hàm tương quan tín hiệu có giá trị cực đại gốc tọa độ khoảng -(L - 1) đến (L - 1) đối xứng qua L Bài 4.2: Mã code: download by : skknchat@gmail.com bao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gauss bao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gauss L = 50; x = randn (1,L);%tin hieu voi gom 50 mau N = 200; k=0:N-1; w=linspace(0,2*pi,N); esd_x = abs(fft(x,N).^2);%tinh esd acorr_x = xcorr(x);%tinh ham tu tuong quan ft_acorr_x = fft(acorr_x,N).*exp(j*2*pi/N*k*(L-1));%bien doi ham tuong quan sang mien f subplot(2,1,1); semilogy(k*22/N,esd_x); title("Mat nang luong"); xlabel('f') ylabel('esd_x'); subplot(2,1,2); semilogy(k*2/N,real(ft_acorr_x),'r'); title("pho tuong quan"); xlabel('f') ylabel('ft_acorr'); Kết quả: Mat nang luong esdx 105 100 10-5 10 105 ft a corr 15 20 25 f tuong quan 100 10-5 0.2 0.4 0.6 0.8 1.2 1.4 1.6 1.8 f Câu hỏi: Q24 Đối xứng qua trục qua n = tín hiệu đưa hàm sin download by : skknchat@gmail.com bao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gauss bao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gauss Q25 Phổ biên độ giống nhau, sai lệch không đáng kể Q26 Cách sử dụng biến đổi FT Cách sử dụng biến đổi DFT Q27 Chọn N =100 phải theo định lý lấy mẫu Nyquit Q28 Phổ tần số hàm tự tương quan hàm mật độ phổ lượng tín hiệu số, thể phân bố lượng Bài 5: Mã đường dây NRZ Bài 5.1: Mã code: len = 100000;%do dai dong bit mo phong st=randn(1,len)>0; bsignal=round(st) %tao dong bit ngau nhien NRZ_signal = bsignal*2-1;%bien doi dong bit sang -1 SNR_db = 0:2:8;%tao vecto SNR SNR = 10.^(SNR_db./10);%doi tu DB sang lan N0 = 1./SNR; for i=1:length (SNR_db) Pe(i) = 0; NRZ_rsignal = NRZ_signal + sqrt(N0(i))*randn(1,len) NRZ_decoded = sign(NRZ_rsignal); for j=1:len if (NRZ_signal(j) * NRZ_decoded(j)==-1) Pe(i) = Pe(i)+1; end end end Pe = Pe /len; plot (SNR_db,Pe,'bo '); hold on; Pe_lythuyet = (1-erf(sqrt(SNR/2)))/2; plot (SNR_db, Pe_lythuyet,'ro '); title ('So sanh ti le loi bit BER mo phong va ly thuyet'); xlabel ('SNR'); ylabel ('Pe'); legend ('Mo phong','Ly thuyet'); hold off; Kết quả: download by : skknchat@gmail.com bao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gauss bao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gauss So sanh ti le loi bit BER mo phong va ly thuyet 0.16 Mo phong Ly thuyet 0.14 0.12 Pe 0.1 0.08 0.06 0.04 0.02 0 SNR Câu hỏi: SNR Pe Lý thuyết BER Mô 0dB 0.1587 0.1575 2dB 0.1040 0.1021 4dB 0.0565 0.0575 6dB 0.0230 0.0235 8dB 0.0060 0.0055 Q29 Chuyển phổ tín hiệu băng gốc lên miền tần số cao để lọt vào băng thông đường dây, tăng mật độ chuyển đổi tích cực tín hiệu có khả kiếm sốt tần số Q30 Khi SNR tăng xác suất lỗi giảm tỷ lệ nghịch với Kết đồ thị trung khớp với lý thuyết Q31 Đó trường hợp khơng mang dấu có loại tín hiệu NRZ đơn cực lưỡng cực Q32 Kết Pe lý thuyết gần giống với BER mơ Khi SNR tăng tỷ lệ lỗi bit giảm download by : skknchat@gmail.com bao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gauss bao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gauss Bài 6:Kĩ thuật điều chế số QPSK Bài 6.1: Mã code: len = 50000; % Do dai dong bit mo phong SNR_db = 0:3:6; % SNR co don vi Decibel SNR = 10.^(SNR_db/10); % Doi SNR tu Decibel sang lan bsignal = randi([0 1],1,len); % Tao dong bit ngau nhien dai len % Thuc hien dieu che QPSK for i=1:2:len if bsignal(i)==0 & bsignal(i+1)==0 % 00 qpsk_signal((i+1)/2) = exp(j*3*pi/4); elseif bsignal(i)==0 & bsignal(i+1)==1 % 01 qpsk_signal((i+1)/2) = exp(j*5*pi/4); elseif bsignal(i)==1 & bsignal(i+1)==1 % 11 qpsk_signal((i+1)/2) = exp(j*7*pi/4); elseif bsignal(i)==1 & bsignal(i+1)==0 % 10 qpsk_signal((i+1)/2) = exp(j*pi/4); end end for i=1:size(SNR_db,2) % Tao nhieu Gauss qpsk_awgn =awgn(qpsk_signal,SNR_db(i))% Cho tin hieu dieu che di qua kenh AWGN subplot(3,1,i) plot(qpsk_awgn,'.'); % Ve bieu chom tin hieu co nhieu title(['Do thi chom 4-QPSK co SNR=',num2str(SNR_db(i)),'db']); xlabel('I'); ylabel('Q'); hold on; plot(qpsk_signal,'r*'); % Ve bieu chom tin hieu khong nhieu plot(exp(j*[0:0.01:2*pi]),'r '); end Kết quả: download by : skknchat@gmail.com bao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gauss bao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gauss Câu hỏi: Q33 Điều chế để mang thông tin cần truyền xa Khối điều chế đóng vai trị trung gian quan trọng q trình xử lý tín hiệu truyền Q34 Kết mơ tín hiệu thu dạng đám mây bao quanh điểm chịm Q35 Chịm có nhiễu có xu hướng bao sát chịm khơng nhiễu Vì SNR giảm mật độ nhiễu tăng Q36 Es = 1dB Eb = 1.5dB Bài 7:Xác xuất lỗi bit điều chế QPSK Bài 7.1: Mã code: len = 100000; M=4; bit_vect = randi([0 M-1],len/2,1) qpsk_signal=pskmod(bit_vect,M,pi/4,'GRAY');%dieu che SNR_db = 0:2:10; %Các giá trị SNR for i=1:length(SNR_db) qpsk_awgn=awgn(qpsk_signal,SNR_db(i)); %dieu che qpskr_signal= pskdemod(qpsk_awgn,M,pi/4,'GRAY'); numerr(i)=biterr(bit_vect,qpskr_signal); %so bit end Pb = numerr/len; %xac suat so bit bi loi plot(SNR_db,Pb,'blueo '); hold on; SNR = 10.^(SNR_db/10); Pb_lythuyet =erfc(sqrt(SNR/2))/2; plot (SNR_db,Pb_lythuyet,'r* '); title ('Do thi ti le loi bit (BER) QPSK'); xlabel ('SNR_db'); ylabel ('Pb'); legend ('Mo phong', 'Ly thuyet'); hold off; qpsk qpsk có nhiễu %giải điều chế qpsk bi loi Kết quả: download by : skknchat@gmail.com bao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gauss bao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gauss Do thi ti le loi bit (BER) QPSK 0.18 Mo phong Ly thuyet 0.16 0.14 Pb 0.12 0.1 0.08 0.06 0.04 0.02 0 10 SNRd b Câu hỏi: SNR Pb Lý thuyết BER mô 0dB 0.1587 0.1567 2dB 0.1040 0.1073 4dB 0.0565 0.0556 6dB 0.0230 0.0234 8dB 0.0060 0.0065 Q37 Xác suất lỗi bit điều chế BPSK QPSK gần nhau, QPSK có lỗi mẫu so sánh BPSK có tỉ lệ lỗi thấp Q38 Hệ thống OFDM Hệ thống thơng tin xác Bài 8:Mơ điều chế M_QAM qua kênh nhiễu Gauss Bài 8.1: Mã code: n_sym = 50000; % So ky tu dieu che M = [16 64 256]; % So symbol ky hieu SNR_db = 0:25; % Tao vector SNR = - 25 Decibel BER = zeros(length(M),length(SNR_db)); % BER de luu ti le loi bit EbN0 =SNR_db; Pe= BER; for k = 1:size(M,2) % size(M,2) la so cot cua M s_stream = randi([0 M(k)-1],1,n_sym); % Tao dong bieu tuong dai n_sym s_mod = qammod(s_stream,M(k),'GRAY'); % Dieu che M-QAM download by : skknchat@gmail.com bao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gauss bao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gauss for i = 1:size(SNR_db,2) % Vong lap tinh BER s_mod_awgn = awgn(s_mod,SNR_db(i)); % Tin hieu qua nhieu s_demod = qamdemod(s_mod_awgn,M(k),'GRAY'); % Giai dieu che M-QAM [num ,ratio] = biterr(s_stream,s_demod); % Tinh ti le loi bit BER(k,r) = ratio; % Luu ti le loi bit vao BER\ EbN0(r)=10^(SNR_db(r)/20); Pe(k,r)=berawgn(EbN0(r),'qam',M(k)); end end semilogy(SNR_db,BER(1,:),'bo-'); % Ve thi BER ung voi M = 16 hold on; plot(EbN0,Pe(1,:),'b '); semilogy(SNR_db,BER(2,:),'rs-');% Ve thi BER ung voi M = 64 plot(EbN0,Pe(2,:),'r '); semilogy(SNR_db,BER(3,:),'m*-'); % Ve thi BER ung voi M = 256 plot(EbN0,Pe(3,:),'m '); grid on; title('Do thi the hien ty le loi bit M-QAM'); xlabel('SNR_d_B'); ylabel('BER'); legend('16-QAM-MP','16-QAM-LT','64-QAM-MP','64-QAM-LT','256-QAM-MP','256-QAMLT'); hold off; Kết quả: Do thi the hien ty le loi bit M-QAM 100 16-QAM-MP 16-QAM-LT 64-QAM-MP 64-QAM-LT 256-QAM-MP 256-QAM-LT 10-2 BER 10-4 10-6 10 -8 10-10 10-12 10 15 20 25 SNRdB Câu hỏi: download by : skknchat@gmail.com bao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gauss bao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gauss bao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gaussbao.cao.thi.nghiem.mon.thong.tin.so.mo.phong.nhieu.gauss

Ngày đăng: 03/01/2024, 00:57

Xem thêm:

w