资源简介
BPSK信号调制解调,Matlab .m文件实现,涉及:BPSK信号调制(带噪声)、加纳算法码元同步、科斯塔斯环载波同步。信号采样率32M,码元速率500K,载波8M
代码片段和文件信息
%%%%%%%%%%%%%%%%%%%%%%%%%%
%程序功能:BPSK信号解调 2018.03.07 %
%程序流程:码元同步 载波同步 判决输出 %
%要 求:采样率为码元速率的整数倍 %
%%%%%%%%%%%%%%%%%%%%%%%%%%
clc;
close all;
clear all;
Fs = 32e6; %信号采样率
Fb = 500000; %码元速率
Fc = 2e6; %实际载波频率
ts = 1/Fs; %时间分辨率
wfc = Fc+10000; %初始频率
Rate = Fs/Fb; %每个码元样点个数
num = 5e4; %样点个数
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%生成BPSK信号%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%带通滤波器设计%%%%
Fstop1 = Fc-Fb-0.2e6; % First Stopband Frequency
Fpass1 = Fc-Fb; % First Passband Frequency
Fpass2 = Fc+Fb; % Second Passband Frequency
Fstop2 = Fc+Fb+0.2e6; % 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]);
% Calculate the coefficients using the FIRPM function.
bfir1 = firpm(N Fo Ao W {dens});
LData = ceil(num/Rate); %码元数量
Symbs = zeros(1LData);
for i=1:1:LData
Symbs(i) = randi(21)-1; %随机产生符号
end
constellation_map=[0 pi]; %星座图
Pskmodu = constellation_map(Symbs+1);
angl = zeros(num1);
for i=1:1:num
angl(i) = Pskmodu(floor((i-1)/Rate)+1);
end
SNR = -30;
BPSK_Sig = zeros(1num);
for k=1:1:num
BPSK_Sig(k) = 10000*(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); %输出码元
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;
%%%考虑到滤波器因素跳过前面一些点
for k=1:1:num
Data_DoFreq(k) = Data(k)*exp(-1j*(phase)); %下变频 并将数据存储在Data_DoFreq中
if(k>=FirCoeNum) %因为滤波需要先去的数据 所以等累积的点数大于FircoeNum时再开始滤波
Data_LoPass(k) = Data_DoFreq(k+1-FirCo
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 5621 2018-03-07 19:17 BPSK_Demod.m
- 上一篇:matlab 经典二值化算法
- 下一篇:D-S证据理论数据融合MATLAB实现
相关资源
- 卷积编码和viterbi译码,调制方式为
- LDPC的matlab 仿真 BP算法 BPSK调制
- QPSK松尾环载波同步MATLAB仿真
- 计算bpsk的循环累积量
- 用MATLAB(BPSK仿真+直接扩频
- costas环载波同步的matlab实现
- LDPC编码的matlab实现
- OFDM-BER-BPSK的matlab
- BPSK+AWGN1.zip
- bpsk在高斯白噪声信道中调制解调MAT
-
BPSK调制的simuli
nk仿真 -
BPSK调制解调simuli
nk模型 - BPSK扩频误码率曲线MATLAB仿真
- AM信号载波同步
- BPSKQPSK数字信号的调制仿真
- MATLAB实现BPSK
- BPSK-QPSK-16QAM-64QAM调制解调
- 通信系统设计—数字带通传输系统仿
- IEEE802.11b 物理层DBPSK编码程序
- bpsk_qpsk.m
- BPSK,QPSK Matlab仿真代码
- 通信仿真 ofdm-bpsk
- BPSK调制.ms11
- bpsk MATLAB仿真
- 锁相环仿真
- matlab仿真的载波同步算法-Fitz算法
- ldpc码通过瑞利衰落信道功能分析BPS
- matlab_OFDM调制解调(来自剑桥大学)
- Matlab的BPSKQPSK等调制解调仿真带界面
- 一份锁相环实现的载波同步的
评论
共有 条评论