基于matlab的QPSK系统仿真及应用

介绍
QPSK是一种四进制相位调制,具有良好的抗噪特性和频带利用率,广泛应用于卫星链路、数字集群等通信业务。
产生
QPSK信号的正弦载波有4个可能的离散相位状态,每个载波相位携带2个二进制符号,其信号表示式为:
QPSK信号表达式

解调
QPSK数字解调包括:模数转换、抽取或插值、匹配滤波、时钟和载波恢复等。

代码
下面代码基于matlab实现了QPSK系统的仿真,系统框图如下。考虑到部分功能需要多次重复使用,设计了一个子程序。主程序负责实现GUI,具体的仿真过程全都在子程序中实现。
QPSK系统框图
主程序

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
评论 331
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值