资源简介
涉及:QPSK信号调制(带噪声)、解调、加纳算法码元同步、科斯塔斯环载波同步。信号采样率32M 星座图显示 眼图显示
代码片段和文件信息
%%%%%%%%%%%%%%%%%%%%%%%%%%
%程序功能:QPSK信号解调 2018.03.29 %
%程序流程:码元同步 载波同步 判决输出 %
%要 求:采样率为码元速率的整数倍 %
%问 题:由于未考虑加纳算法首尾问题可能产生误判(例如加纳算法该次XX在0附近 而下次再Rate附近)
%该程序仅做原理说明 还有许多不足 需要完善
%%%%%%%%%%%%%%%%%%%%%%%%%%
clc;
close all;
clear all;
%信号基本参数
Fs = 32e6; %信号采样率
Fb = 0.5e6; %码元速率
Fc = 3e6; %实际载波频率
ts = 1/Fs; %时间分辨率
wfc = Fc+2000; %初始频率
Rate = Fs/Fb; %每个码元样点个数
num = 1e5; %样点个数
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%生成QPSK信号%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%带通滤波器设计%%%%
Fstop1 = Fc-Fb-0.25e6; % First Stopband Frequency
Fpass1 = Fc-Fb; % First Passband Frequency
Fpass2 = Fc+Fb; % Second Passband Frequency
Fstop2 = Fc+Fb+0.25e6; % Second Stopband Frequency
Dstop1 = 0.0001; % First Stopband Attenuation
Dpass = 0.057501127785; % Passband Ripple
Dstop2 = 0.0001; % Second Stopband Attenuation
dens = 20; % Density Factor
% Calculate the order from the parameters using FIRPMORD.
[N Fo Ao W] = firpmord([Fstop1 Fpass1 Fpass2 Fstop2]/(Fs/2) [0 1 ...
0] [Dstop1 Dpass Dstop2]);
bfir1 = firpm(N Fo Ao W {dens});
disp(‘生成QPSK信号‘);
%产生QPSK信号
LData = ceil(num/Rate); %码元数量
Symbs = zeros(LData1);
for i=1:1:LData
Symbs(i) = randi(41); %随机产生符号
end
constellation_map=[0 0.5*pi pi 1.5*pi]; %星座图
Pskmodu = constellation_map(Symbs); %映射
angl = zeros(num1); %对应
for i=1:1:num
angl(i) = Pskmodu(floor((i-1)/Rate)+1);
end
SNR = -20; %信噪比
BPSK_Sig = zeros(1num);
for k=1:1:num
BPSK_Sig(k) = (cos(2*pi*Fc*k*ts+angl(k))+sqrt(10^(SNR/10))*randn(11)); %%产生信号并加噪声
end
Data = conv(BPSK_Sigbfir1); %带通滤波
if(num>length(Data))
num = length(Data); %判断是否超过数据长度 若超过则num等于数据长度
end
%低通滤波器设计
Fpass = 0.5e6; % Passband Frequency
Fstop = 2e6; % Stopband Frequency
Dpass = 0.057501127785; % Passband Ripple
Dstop = 0.0001; % Stopband Attenuation
dens = 20; % Density Factor
% Calculate the order from the parameters using FIRPMORD.
[N Fo Ao W] = firpmord([Fpass Fstop]/(Fs/2) [1 0] [Dpass Dstop]);
% Calculate the coefficients using the FIRPM function.
bfir2 = firpm(N Fo Ao W {dens}); %滤波器系数
FirCoeNum = length(bfir2); %滤波器长度
phase_Save = zeros(floor(num/Rate)1); %保存的角度
CodeS_Save = zeros(floor(num/Rate)1); %输出码元
Posion_Save = zeros(floor(num/Rate)1);
Freq_Out = zeros(num1); %载频输出
PhaseDert_Out = zeros(num1); %相位差输出
Data_DoFreq = zeros(1num); %下变频后数据
Data_LoPass = zeros(1num); %低通滤波后数据
phase = 0; %相位
ss = 0; %自加项
dert_w = 0;%频差
dert_f = 0;%相差
temp = 0;
XX = 0;
YY = 0;
%%%考虑到滤波器因素跳过前面一
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 5939 2018-03-29 14:24 Qpsk_Demod\QPSK_Demod.m
目录 0 2018-03-29 20:58 Qpsk_Demod\
- 上一篇:粒子滤波和卡尔曼滤波视频运动目标跟踪
- 下一篇:最经典的Turbo码simuli
nk
相关资源
- csdn20200307_SingleRectifierSOGI_QSGPLL.mdl
- OBJ批量导入.ms
- QPSK matlab 代码
- matlab函数库.m文件
- matlab数据集heart_scale.mat
- bpsk qpsk 16qam 的ber方针matlab
- QPSK调制解调代码
- QPSK with matlab code and pi/4 DQPSK
- Matlab _ MIMO + QPSK + ML/MMSE/ZF
- guangfu.mdl
- 基于matlab的QPSK仿真
- DVR.mdl
- poedit的TM自动翻译中文zh_CN.mo词库
- 瑞利衰落信道下无分集,2分集,4分集
- BPSK和QPSK调制解调原理及MATLAB程序
- 基于-MATLAB-的QPSK系统仿真设计与实现
- 单载波为、BPSK、QPSK三种情况下锁相环
- 5份基于MATLAB的关于扩频+BPSK/QPSK仿真代
- 4份直接序列扩频+BPSK/QPSK的MATLAB仿真程
- quan.mdl
- writetxt.m
- M_M_1.m
- SAR_Figure_7_5.m
- SAR_Figure_5_18.m
- SAR_Figure_5_16.m
- SAR_Figure_5_17.m
- wave_vorticity.m
- 一个小通信系统的MATLAB源代码仿真或
- arrow3.m--Matlab
-
OFDM的QPSK的simuli
nk仿真,matlab 2016a版
评论
共有 条评论