介绍
QPSK是一种四进制相位调制,具有良好的抗噪特性和频带利用率,广泛应用于卫星链路、数字集群等通信业务。
产生
QPSK信号的正弦载波有4个可能的离散相位状态,每个载波相位携带2个二进制符号,其信号表示式为:
解调
QPSK数字解调包括:模数转换、抽取或插值、匹配滤波、时钟和载波恢复等。
代码
下面代码基于matlab实现了QPSK系统的仿真,系统框图如下。考虑到部分功能需要多次重复使用,设计了一个子程序。主程序负责实现GUI,具体的仿真过程全都在子程序中实现。
主程序
clc;close all;clear all;
%---------------------------GUI------------------------------
%------------------------genertae figure---------------------
h0=figure('position',[800 150 600 600],...
'resize','off',...
'name','显示各种图形');
%-------------------------genertae axes----------------------
a1=axes('parent',h0,...
'position',[0.1,0.45,0.5,0.5]);
%-------------------------genertae text----------------------
tx_SNR=uicontrol('parent',h0,...
'style','text',...
'string','添加噪声后信噪比(dB)',...
'position',[400 515 100 40]);
tx_N=uicontrol('parent',h0,...
'style','text',...
'string','输入序列长度',...
'position',[400 465 100 40]);
tx_ifconv=uicontrol('parent',h0,...
'style','text',...
'string','使用卷积编码',...
'position',[400 415 100 40]);
tx_rayle=uicontrol('parent',h0,...
'style','text',...
'string','添加瑞利衰落',...
'position',[400 365 100 40]);
tx_ber=uicontrol('parent',h0,...
'style','text',...
'string','误码率',...
'position',[400 315 100 40]);
%-------------------------genertae edit----------------------
ed_SNR=uicontrol('parent',h0,...
'style','edit',...
'position',[500 530 60 40]);
ed_N=uicontrol('parent',h0,...
'style','edit',...
'position',[500 480 60 40]);
ra_ifconv=uicontrol('parent',h0,...
'style','radiobutton',...
'position',[520 430 60 40]);
ra_rayle=uicontrol('parent',h0,...
'style','radiobutton',...
'position',[520 380 60 40]);
%----------------------genertae pushbutton-------------------
pt_sv=uicontrol('parent',h0,...
'style','pushbutton',...
'position',[420 280 60 40],...
'string','保存参数',...
'callback',[...
'SNR=str2num(ed_SNR.String);',...
'ifconv=ra_ifconv.Value;',...
'rayle=ra_rayle.Value;',...
'N=str2num(ed_N.String);',...
'[I,Q,Iwave,Qwave,Ins,Qns,Imt,Qmt,ber,Isam,Qsam,Ijg,Qjg,lencc]=QPSK_c(SNR,ifconv,N,rayle);',...
'ed_ber.String=ber;']);
ed_ber=uicontrol('parent',h0,...
'style','edit',...
'position',[500 330 60 40]);
pt_ber=uicontrol('parent',h0,...
'style','pushbutton',...
'position',[500 280 60 40],...
'string','误码率曲线',...
'callback',['cla;',...
'N=10000;',...
'rayle=ra_rayle.Value;',...
'for SNR=0:2:14,',...
'[I,Q,Iwave,Qwave,Ins,Qns,Imt,Qmt,b