资源简介
模拟实现一个16-QAM的调制器和解调器,同时信道采用加性高斯白噪声信道
代码片段和文件信息
%%% 16-QAM Modulator and Demodulator Implementation with an AWGN Channel %%%
clc;
clear;
close all;
%%%% Input Signal %%%%
% Input is a stream of binary digits of integers 0-15
dec=[0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0 1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1];
dl=length(dec);
%%%% Serial To Parallel and 2-to-4 Level Converter %%%%
sp=[];
o1=[];
o2=[];
clear i;
for i=1:4:64;
sp=[dec(1i:i+3)]; % Serial to Parallel 4-bit Register
I=sp(11); % Separation of I and Q bits
Id=sp(12);
Q=sp(13);
Qd=sp(14);
if I==0 % Assigning Amplitude levels for I-channel
if Id==0
o1=[o1 -3]; % if input is 00 output is -3
else
o1=[o1 -1]; % if input is 01 output is -1
end
else
if Id==0
o1=[o1 1]; % if input is 10 output is 1
else
o1=[o1 3]; % if input is 11 output is 3
end
end
if Q==0 % Assigning Amplitude levels for Q-channel
if Qd==0
o2=[o2 -3]; % if input is 00 output is -3
else
o2=[o2 -1]; % if input is 01 output is -1
end
else
if Qd==0
o2=[o2 1]; % if input is 10 output is 1
else
o2=[o2 3]; % if input is 11 output is 3
end
end
clear sp clear I clear Id clear Q clear Qd;
end
%%%% Oscillator and Balanced Modulator %%%%
fc=500; % Carrier Frequency
fs=20000; % Sampling Frequency
t=1:100; % Duration of Signal
s=[];
clear i;
for i=1:1:16; % Modulation (multiplication with carrier signals cos and sin)
Ac=o1(i);
As=o2(i);
s1=Ac*cos(2*pi*(fc/fs)*t);
s2=As*sin(2*pi*(fc/fs)*t);
s=[s (s1+s2)];
end
figure(1)
plot(s) % ‘s‘ demotes the transmitted signal
title(‘16-QAM Modulated Signal‘‘FontSize‘14)
Xlim([0 1610])
%%%% AWGN Addition While Passing Through The Channel %%%%
r=awgn(s10); % Transmitted Signal passes through AWGN Channel
figure(2) % Received Signal SNR is 10 db
plot(r) % received signal is denoted by ‘r‘
title(‘Transmitted Signal With Additive Noise After Passing Through The Channel‘‘FontSize‘14);
%%%% COHERENT DEMODULATION %%%%
ss1=[];
ss2=[];
rs1=2*cos(2*pi*(fc/fs)*t); % Sin and Cos generation by Local Oscillator
rs2=2*sin(2*pi*(fc/fs)*t);
clear i;
for i=1:100:1600; % Demodulation of Received Signal
ss1=[ss1 rs1.
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 9048 2012-12-25 11:25 qam.m
文件 1312 2014-02-12 14:14 license.txt
- 上一篇:SVPWM驱动异步电机matlab2008a
- 下一篇:PCA和IHS图像融合
相关资源
- 8QAM、QPSK误码率计算matlab程序
- 基于Matlab的QAM调制系统仿真课程设计
- qam信号产生 星座图
- 16QAM数字通信系统——MATLAB代码
- 16QAM的matlab程序
- 16QAM_Viterbi_soft.rar
- zw_16QAM信号调制解调Matlab仿真.zip
- 基于不同调制方式16QAM、64QAM、QPSKOF
- QAM误码率与SNR的MATLAB仿真
-
simuli
nk 64QAM 调制 - BPSK-QPSK-16QAM-64QAM调制解调
- 64QAM调制解调
- 4QAM调制的OFDM程序matlab的
- QAM星座图matlab仿真
- 16QAM调制和解调相关的源代码
- 通信原理QAM调制和星座图
- QAM16.m
- MQAM41664256调制解调MATLAB代码
-
OFDM_16QAM_simuli
nk - 64QAM编码和硬判决译码及软判决
- 小波变换实现微弱信号检测
- QAM球形译码
- SM_4QAM_ML
- IOTA滤波器
- 16QAM数字调制与解调_MATLAB代码
- matlab bpsk qpsk 16qam 源代码
- FBMC_OQAM-system 讲解FBMC系统的编解码
- modulationClasssify 高阶累积量的调制格式
- BER性能仿真(FBMC QAM )
- 多相滤波器和IFFT快速傅里叶变换实现
评论
共有 条评论