MPSK通信系统的设计与性能研究

您所在的位置:网站首页 误码率最大值怎么求 MPSK通信系统的设计与性能研究

MPSK通信系统的设计与性能研究

2023-03-30 08:32| 来源: 网络整理| 查看: 265

文章和代码已经归档至【Github仓库:communication-system-simulation】或者公众号【AIShareLab】回复 通信系统仿真 也可获取。

一、8PSK背景

二、原理概述2.1 PSK调制

发送端发送的是一连串离散而随机的二进制比特流,使用PSK载波相位调制的方法,这样发送端发送的消息便包含在了相位中,此种调制方法可以十分有效地节约带宽。

MPSK通信系统的设计与性能研究-8PSK_代码实现

其中, MPSK通信系统的设计与性能研究-8PSK_代码实现_02 是发送滤波器的脉冲形状, 传输信号的频谱特性由它决定。A则是信号的幅度。在 MPSK通信系统的设计与性能研究-8PSK_8PSK_03 调制中, 所有的 MPSK通信系统的设计与性能研究-8PSK_8PSK_03 信号对于所有的 MPSK通信系统的设计与性能研究-8PSK_代码实现_05 都具有相同的能量。 能量为:

MPSK通信系统的设计与性能研究-8PSK_通信系统_06

代表每个传输符号的能量。

在本次实验中, 为了方便分析, 我们令 MPSK通信系统的设计与性能研究-8PSK_代码实现_07 , 那么, 相应的 MPSK通信系统的设计与性能研究-8PSK_通信系统_08 调制信号的波形为

MPSK通信系统的设计与性能研究-8PSK_距离度量_09

我们规定:

MPSK通信系统的设计与性能研究-8PSK_代码实现_10

经过上述分析, 我们不难得出, 这样一个相位调制信号可以看作两个正交载波, 因

此, 数字相位调制信号可以在几何上可用二维向量的形式来表示, 即 $$ \vec{s} {m}=(\sqrt{\varepsilon{s}} \cos \frac{2 \pi m}{M}, \sqrt{\varepsilon_{s}} \sin \frac{2 \pi m}{M}) $$

正交基函数为:

MPSK通信系统的设计与性能研究-8PSK_通信系统_11

2.2 信号传输

调制信号在 AWGN 信道传输的时候, 会有噪声混杂进来, 此时输出信号变为: $$ r(t)=u_{m}(t)+n_{c}(t) \cos (2 \pi f_{c} t)-n_{s}(t) \sin (2 \pi f_{c} t) $$

其中, MPSK通信系统的设计与性能研究-8PSK_距离度量_12MPSK通信系统的设计与性能研究-8PSK_代码实现_13 分别是加性噪声的同相分量和正交分量, 之后, 我们将输出信号和 给出的基函数作相关, 则两个相关器的输出为: MPSK通信系统的设计与性能研究-8PSK_距离度量_14 需要注意的是 MPSK通信系统的设计与性能研究-8PSK_距离度量_12MPSK通信系统的设计与性能研究-8PSK_代码实现_13 这两个正交噪声的分量是零均值, 互不相关的高斯随机过程。

2.3 解调方式

(1)最小欧式距离准则判决

最小欧式距离准则判决: 求出接收到的信号向量与 M 个传输向量的欧式距离, 选取 对应的最小欧式距离的向量, 该向量对应的符号即为判决输出符号。此种方法需要掌握 距离度量的概念并熟练运用, 下面给出关于距离度量具体的

理论分析:

在接收消息尚不确定 (即还没有接收到矢量 MPSK通信系统的设计与性能研究-8PSK_8PSK_17 ) 的情况下, 要使得先验概率为最大, 最好的判决方法就是选择具有最高先验概率 MPSK通信系统的设计与性能研究-8PSK_8PSK_18 的信号; 接受到矢量 MPSK通信系统的设计与性能研究-8PSK_8PSK_17 后, 其方法与 前者类似, 前者是寻找先验概率的最大值, 此时是寻找后验概率的最大值, 换言之, 选择使 MPSK通信系统的设计与性能研究-8PSK_8PSK_20 最大的 MPSK通信系统的设计与性能研究-8PSK_代码实现_21 , 这个判决准则称为最大后验概率 (MAP) 准则。

根据贝叶斯公式, 后验概率可表示为: $P(\vec{s} {m} \mid \vec{r})=\frac{f(\vec{r} \mid \vec{s} {m}) P(\vec{s} *{m})}{f(\vec{r})} $ 当 M 个信号先验概率相等, 由于 MPSK通信系统的设计与性能研究-8PSK_距离度量_22MPSK通信系统的设计与性能研究-8PSK_通信系统_23 均为确定的值 MPSK通信系统的设计与性能研究-8PSK_通信系统_24 。则寻找 MPSK通信系统的设计与性能研究-8PSK_8PSK_25 的最大值就等价于寻找 MPSK通信系统的设计与性能研究-8PSK_代码实现_26 的最大值。此时 MAP 准则简化为 ML 准则。

我们不妨对接收到的矢量 MPSK通信系统的设计与性能研究-8PSK_8PSK_17 进行简要的分析, MPSK通信系统的设计与性能研究-8PSK_代码实现_28, MPSK通信系统的设计与性能研究-8PSK_代码实现_21 是信号矢量, MPSK通信系统的设计与性能研究-8PSK_距离度量_30 是 AWGN 信道中的噪声矢量, 噪声矢量的分量 MPSK通信系统的设计与性能研究-8PSK_通信系统_31 服从分布 MPSK通信系统的设计与性能研究-8PSK_8PSK_32 , 则 MPSK通信系统的设计与性能研究-8PSK_距离度量_33 服从分布 MPSK通信系统的设计与性能研究-8PSK_8PSK_34

因此 $$\begin{aligned} f(\vec{r} \mid \vec{s} {m}) & =\prod{k=1}^{N} \frac{1}{\sqrt{\pi N_{0}}} \mathrm{e}^{-\frac{(r_{k}-s_{m k})^{2}}{N_{0}}} \ & =\frac{1}{(\pi N_{0})^{\frac{N}{2}}} e^{\frac{|\vec{r}-\vec{s} {m}|^{2}}{N{0}}}, m=1,2, \ldots, M \end{aligned} $$

右端取对数有:

$\ln f(\vec{r} \mid \vec{s} {m})=-\frac{N}{2} \ln (\pi N{0})-\frac{1}{N_{0}} \sum_{k=1}^{N}(r_{k}-s_{m k})^{2} $

上式若要取得最大值, 显而易见 MPSK通信系统的设计与性能研究-8PSK_8PSK_35 需要取最小值。这也是符合我们直观印象的, 信号空间里两个信号点的欧氏距离越小, 说明它们越接近。

因此, 定义距离度量 MPSK通信系统的设计与性能研究-8PSK_8PSK_36

如下:

MPSK通信系统的设计与性能研究-8PSK_距离度量_37

(2) 最佳检测器

最佳检测器将收到的信号向量 r 投射到 M 个可能的传输信号向量 MPSK通信系统的设计与性能研究-8PSK_代码实现_38 之一上去, 并 选取对应与最大投影的向量。将上述定义的距离度量展开:

MPSK通信系统的设计与性能研究-8PSK_距离度量_39

其中, MPSK通信系统的设计与性能研究-8PSK_距离度量_40项对所有的判决度量是等价的的, 我们忽略这一项, 则得到相关度量:

MPSK通信系统的设计与性能研究-8PSK_距离度量_41

可以看出, 距离度量越小, 则相关度量越大。

上述分析也证明了老师要求证明的内容:即相关度量与距离度量是完全等价的。

2.4 错误概率

理论错误概率:

8PSK: MPSK通信系统的设计与性能研究-8PSK_8PSK_42 ;

QPSK: MPSK通信系统的设计与性能研究-8PSK_距离度量_43

实际错误概率:

误码率: 错误码元/传输总码元

误比特率: 错误比特/传输总比特

三、系统框图

8PSK:

MPSK通信系统的设计与性能研究-8PSK_8PSK_44

图3.1 8PSK系统框图

四、主函数设计4.1 星座图绘制主函数

1.流程图

MPSK通信系统的设计与性能研究-8PSK_8PSK_45

图4.1 星座图绘制主函数流程图

2.代码实现

clc,clear,close; % Symbol sequence length L=100000; % Generate the original bit sequence sourceSeq=randnum(L); [pI,pQ,sourceSeqCode]=Map(sourceSeq,L); Eb = 1/3; errbit = zeros(1,26); errnum = zeros(1,26); SNR=-5:20; LS = length(SNR); for i=1:LS % Find the one-sided power spectral density of noise for a given signal-to-noise ratio N0=Eb/(10^(SNR(i)/10)); % variance var(i)=N0/2 ; [rI,rQ]=noise(var(i),pI,pQ); [result,I]=judgment(rI,rQ); [errbit(i),errnum(i)]=Count(result,I,sourceSeq,sourceSeqCode); end draw(sourceSeqCode,rI,rQ);4.2 QPSK与8PSK误码率对比主函数

1.流程图

MPSK通信系统的设计与性能研究-8PSK_通信系统_46

图4.2 qpsk与8psk误码率对比主函数流程图

2.代码实现

clc,clear,close; % Symbol sequence length L=100000; % Generate the original bit sequence sourceSeq=randnum(L); [pI,pQ,sourceSeqCode]=Map(sourceSeq,L); Eb = 1/3; errbit = zeros(1,26); errnum = zeros(1,26); SNR=-5:20; LS = length(SNR); for i=1:LS % Find the one-sided power spectral density of noise for a given signal-to-noise ratio N0=Eb/(10^(SNR(i)/10)); % variance var(i)=N0/2 ; [rI,rQ]=noise(var(i),pI,pQ); [result,I]=judgment(rI,rQ); [errbit(i),errnum(i)]=Count(result,I,sourceSeq,sourceSeqCode); end % draw(sourceSeqCode,rI,rQ); % Calculate the theoretical bit error rate using the erfc function Theory8PSKSER = erfc(sqrt(3*10.^(SNR/10)) * sin(pi/8)); % QPSK TheoryQPSKSER = erfc(sqrt(10.^(SNR/10))).*(1-0.25*erfc(sqrt(10.^(SNR/10))));; % Load the SER-SNR curve of QPSK load('qpsk_errnum'); figure(2); epskerr = errnum/L; semilogy(SNR,epskerr,'r-o');hold on; semilogy(SNR,qpskerr,'b-o');hold on; semilogy(SNR,Theory8PSKSER,'k-');hold on; semilogy(SNR,TheoryQPSKSER,'k-');hold on; ylabel('SER'); xlabel('SNR/dB') legend('8PSK仿真曲线','QPSK仿真曲线','理论曲线','Location', 'northeast' ); grid on; axis([-5,20,10e-7,1]);五、子函数设计5.1 随机比特序列的产生

代码实现:

function [SourceSeq]=randnum(L) % L is the length of the generated sequence code % Since a code is composed of 3 bits, it is generated here with 3*L. randnum=rand(3*L,1); % Initialize the original sequence SourceSeq=zeros(3*L,1); % The randomly generated sequence is judged % if the random number is greater than 0.5, it is judged as 1, otherwise it is judged as 0. for i=1:3*L if(randnum(i)>=0.5) SourceSeq(i)=1; else SourceSeq(i)=0; end end5.2格雷编码序列

代码实现

% Define 8psk mapping function function [pI,pQ,SourceCode] = Map(SourceSeq,L) % pI - in-phase component % pQ - quadrature component % SourceCode - The size of the binary number of each digit of the sequence % initialization pI = zeros(L,1); pQ = zeros(L,1); % In order to facilitate subsequent expressions, sqrt(2)/2 is represented here root =sqrt(2)/2; % Constructing the mapping matrix according to the Gray code of 8PSK MappingMat = [[1,0];[root,root];[-root,root];[0,1];[root,-root];[0,-1];[-1,0];[-root,-root]]; SourceCode =zeros(L,1); % mapping process for i=1:L % Since a source symbol is composed of three bits % the low and high bits are read in reverse order here, and expressed in decimal SourceCode(i)=SourceSeq(3*i-2)*4+SourceSeq(3*i-1)*2+SourceSeq(3*i)+1; % Find the corresponding code through the decimal representation and map it pI(i) = MappingMat(SourceCode(i),1); pQ(i) = MappingMat(SourceCode(i),2); end end % Octal Gray Code Conversion function[a1,a2]=Map_other(N) % a1 is a sequence of random bits in binary % a2 is a sequence of octal symbols % Random bit sequence of length 3L a1=bit(3*N); % a2 is used to store the code element sequence of length L a2=zeros(1,N); for i=1:3:3*N-2 a2((i+2)/3)=abs(a1(i)*7-abs(a1(i+1)*3-a1(i+2))); % Converts binary bit sequence Gray-encoded to octal sequence end end5.3 映射函数

代码实现

% 8PSK coordinate mapping function [y3]=coordinate(x1,bit) % x1 is the encoded octal sequence, bit is the originally generated binary random sequence N=length(x1); Es=bit*bit'/N; % The first line of y3 is used to store the abscissa % the second line is used to store the ordinate y3=zeros(2,N); % Coordinate mapping for i=1:N y3(1,i)=sqrt(Es)*cos(pi/4*x1(i)+pi/8); y3(2,i)=sqrt(Es)*sin(pi/4*x1(i)+pi/8); end end5.4 噪声生成与叠加输出

代码实现

% Generate Gaussian random noise sub-function , var is the variance function [rI,rQ] = noise(var,pI,pQ) L = length(pI); nc=zeros(L,1); ns=zeros(L,1); for k=1:L u=rand; z=sqrt(var*2*log(1/(1-u))); nc(k)=z*cos(2*pi*u); ns(k)=z*sin(2*pi*u); end % Output two mutually orthogonal Gaussian signals rI = pI+nc; rQ = pQ+ns; end5.5 判决函数

代码实现

% Judgment Criterion: Minimum Euclidean Distance Criterion function [result,I]=judgment(rI,rQ) root=sqrt(2)/2; L = length(rI); I=zeros(L,1); mapl = [[1,0];[root,root];[-root,root];[0,1];[root,-root];[0,-1];[-1,0];[-root,-root]]; for i=1:L index=0; minp=100; for j=1:8 % Traverse each coordinate % find the point with the smallest Euclidean distance from the point, and record it. if((mapl(j,1)-rI(i))^2+(mapl(j,2)-rQ(i))^24 的情况下才可以使用, 而对于 \mathrm{M}=4 时的系统误码率, 应该采用公式:

MPSK通信系统的设计与性能研究-8PSK_距离度量_70

3.关于星座图绘制的问题

在绘制星座图时,初步想法是对于每一个判决分类的样本点采用不同的颜色绘制,但是对于如何针对点进行颜色,线性的绘制,我的初步想法是建立一个颜色-线性的向量,然后对于每个点判决的具体情况找到对应的样本颜色线型,采用数组引用的形式进行属性的赋值,但是随后发现看似简化了绘制过程,实际却在引用时产生很大的工作量,还可能产生错误绘制,因此综合比较下我选择用switch的方法进行情况判断,并对相应的判决点进行绘制。



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3