📄 qpsk_demodu.m
字号:
%正交下变频+A/D模数变换,采用8倍采样fs=8fc
function [x,y]=QPSK_demodu(a)
recievdata=a;
Rb=800000;%码元速率819.2k
k=1; %一个码元间隔包括1个载波周期/2
k2=8;
fc=k*Rb; % 载波频率,
fs=fc*k2; % 信号采样率
x_size=k*k2;
datalength=length(recievdata);
%产生本地载波恢复
carry_I(1:datalength)=cos(2*pi*fc*(1:datalength)/fs+pi/4);
carry_Q(1:datalength)=sin(2*pi*fc*(1:datalength)/fs+pi/4);
N=14;
Wn=1/8;
B = fir1(N,Wn);
recievdadaI=filter2(B,recievdata.*carry_I);%filter2滤波器无延时,filter有延时
recievdadaQ=filter2(B,recievdata.*carry_Q);
recievdataI(k2/2+1:datalength)=recievdadaI(1:datalength-k2/2);
x=recievdataI;
y=recievdadaQ;
%figure(2)
%subplot(2,1,1)
%plot(filtoutQ)
%grid on
%title('I路码元信号')
%subplot(2,1,2)
%plot(recievdadaQ)
%grid on
%title('I路码元信号')
%subplot(4,1,2)
%plot(carry_i)
%title('载波')
%grid on
%subplot(4,1,3)
%plot(filtoutQ)
%title('Q路码元信号')
%grid on
%subplot(4,1,4)
%plot(carry_q)
%title('载波')
%grid on
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -