资源简介
仿真4PSK信号的产生与解调
带有信道噪声
代码片段和文件信息
% 4PSK
clc;
close all;
clear;
m=64;
N=256;
n=1:1:N;
h0=zeros(1N);
N0=0.3*rand(1N)-0.15; %噪声
% 30阶低通滤波器 h0
f = [0 0.28 0.28 1]; w0 = [1 1 0 0];
b = fir2(30fw0);
[hw] = freqz(b1N/2);
h0(11:N/2)=abs(h‘);
for i=1:N/2
h0(1N-i+1)=h0(1i);
end;
a=rand(1m);
for i=1:m
if(a(1i)<0.25)
a(1i)=1;
else
if(a(1i)<0.5)
a(1i)=3;
else
if(a(1i)<0.75)
a(1i)=5;
else
a(1i)=7;
end;
end;
end;
end;
X_4psk=zeros(1N);
j=1;k=1;
for i=1:N
if(j==(N/m+1))
j=1;
k=k+1;
end;
X_4psk(1i)=1.414*sin(2*pi*0.25*i+a(1k)*pi/4+0.2*pi);
j=j+1;
end;
X_4psk=X_4psk+N0;
X_4psk_m1=X_4psk.*sin(2*pi*0.2
评论
共有 条评论