• 大小: 5KB
    文件类型: .m
    金币: 1
    下载: 0 次
    发布日期: 2021-05-16
  • 语言: Matlab
  • 标签: PSD误码率  

资源简介

采用本地脉冲信号对跳时ppm系统进行解调

资源截图

代码片段和文件信息

%%% 本程序在不考虑多径的情况下,并已知同步时采用干净的本地脉冲信号对跳时ppm系统进行解调 %%%
clear all
Ts=0.4*10^(-9);%the bandwidth is 1/(2*Ts)=2.5*10^9;
%------------------------------
Tbit=16*10^(-9);%the peiod of bit;
fbit=1/Tbit;%speed of transmitted;
%---------------------------------
Tsample=Tbit/10;%the sampling frequency;
fsample=1/Tsample;%frequency of sampling;
%------------------------------------
sampling_point=fsample/fbit; % the number of sampling point in a bit
n=-(sampling_point/2)+1:sampling_point/2; %sampling point
fc=2.5*10^9;%脉冲谱的中心频率
e=exp(1);
t_delay=10;%ppm调制时的时延;
Nf=2;%一个符号用Nf个帧表示;
N=10;M=195;MM=10000;
Ebn0=[-2:2:12];
point_num=2*M+sampling_point;
%信号的行式:
a=0.2;
Tc=0.2;
n=0:0.04:0.36;
s=(1-4*pi*((n-Tc)/a).^2).*exp(-2*pi*((n-Tc)/a).^2);

R=3;
s1=[zeros(1t_delay) s];
zero_serio=zeros(12*M);
zero_serio1=zeros(12*M-t_delay);
zero_serio2=zeros(1t_delay);
ss=[s zero_serio];
sss=[s1 zero_serio1];
zero1=zeros(1M);
matching_sig=[zero1 s zero1];

ss_rep0=repmat(ss1Nf);
ss_rep1=repmat(sss1Nf);
power=((norm(ss))^2)/point_num;%一个脉冲的能量; 

% 产生一本地信号;
local_sig1=[s (-1)*s zeros(1point_num-2*sampling_point)];%1*400;
PN_code0=[0111011000111110011010010000101];
PN_code1=[14292722122417371531302825196132620918481612510211123];
%计算误码率;
j=1;
ebn0_num=0;
for num=1:2:15
    ebn0_num=ebn0_num+1;
    ebn0=num-3;
    sita=sqrt((power*point_num*0.5)/(10^(ebn0/10)));
    for calculate_num=1:MM
        %产生信源 
        source_date=randint(1N);
        %进行ppm调制
        date_modulated=[];local_sig=[];
        for i=1:N
            if source_date(i)==1 
                date_modulated1=ss_rep1;
            else
                date_modulated1=ss_rep0;
            end 
            g1=zeros(1point_num);
            g2=zeros(1point_num);
            b1=zeros(1point_num);
            b2=zeros(1point_num);
            if (j>0)&(j<31) 
                for z=1:20
                    g1(PN_code1(j)*10+z)=date_modulated1(z);
                    g2(PN_code1(j+1)*10+z)=date_modulated1(point_num+z);
                end
                for z=1:2*sampling_point
                    b1(PN_code1(j)*10+z)=local_sig1(z);
                    b2(

评论

共有 条评论

相关资源