?? 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 + -