瑞利信道条件下BPSK的误码率
通信系统
- s s s为随机产生的信号,为0或者1
- 调制后的信号为 x x x,0映射为 − E b -\sqrt{E_b} −Eb,1映射为 + E b +\sqrt{E_b} +Eb
- 高斯白噪声为 n n n,满足均值为0,方差为 σ 2 = N 0 2 \sigma^2=\frac{N0}{2} σ2=2N0的高斯分布
- 收到的信号 y = h x + n y=hx+n y=hx+n,h用于描述信道,这里的信道是瑞利信道,固h有实部和虚部,且实部和虚部是独立同分布的高斯变量,均值为0,方差为 1 2 \frac{1}{2} 21(这里的1/2好像是涉及归一化之后的结果,具体原因不太清楚,但是很文章和代码都取的这个,明白的大佬可以在下面附上文章或者解释)
- 经过解调之后的信号为 s h s^h sh,也是0或者1的形式
整体举个例子:
发射
s
s
s = 0
假设
E
b
=
1
\sqrt{E_b}=1
Eb=1,调制之后
x
=
−
1
x=-1
x=−1
过信道,假设
n
=
0.5
n=0.5
n=0.5,
h
=
1
+
0.1
i
h=1+0.1i
h=1+0.1i
收到的信号
y
=
h
x
+
n
=
−
0.5
−
0.1
i
y=hx+n=-0.5-0.1i
y=hx+n=−0.5−0.1i
假设接收端知道
h
h
h
估计
x
h
=
y
/
h
=
x
+
n
h
x^h=y/h=x+\frac{n}{h}
xh=y/h=x+hn
解调判决,
r
e
a
l
(
x
h
)
<
0
=
>
s
h
=
0
real(x^h)<0=>s^h=0
real(xh)<0=>sh=0
误码率分析
在BPSK,
h
=
1
h=1
h=1的情况下,推导的误码率为:
P
(
e
)
=
1
2
e
r
f
c
(
E
b
N
0
)
P(e)=\frac{1}{2}erfc(\sqrt\frac{{E_b}}{N_0})
P(e)=21erfc(N0Eb)
推导过程可参考另一篇文章:(没放的话提醒我放链接)
E
b
N
0
\frac{E_b}{N_0}
N0Eb是之前讨论的信噪比,在瑞利信道的情况下,应该为
∣
h
∣
2
E
b
N
0
\frac{|h|^2E_b}{N_0}
N0∣h∣2Eb
知道h的情况下,错误概率为
P
(
e
∣
h
)
=
1
2
e
r
f
c
(
∣
h
∣
2
E
b
N
0
)
P(e|h)=\frac{1}{2}erfc(\sqrt\frac{{|h|^2E_b}}{N_0})
P(e∣h)=21erfc(N0∣h∣2Eb)
∣
h
∣
2
|h|^2
∣h∣2是实部和虚部的平方再相加,实部和虚部都服从高斯分布,最终这个变量服从卡方分布
令
Ψ
=
∣
h
∣
2
E
b
N
0
\Psi=\sqrt\frac{{|h|^2E_b}}{N_0}
Ψ=N0∣h∣2Eb,则
p
(
Ψ
)
=
1
E
b
/
N
0
e
−
Ψ
E
b
/
N
0
p(\Psi)=\frac{1}{E_b/N_0}e^\frac{-\Psi}{E_b/N_0}
p(Ψ)=Eb/N01eEb/N0−Ψ
最终的错误概率
P
(
e
)
=
∫
0
∞
1
2
e
r
f
c
(
Ψ
)
p
(
Ψ
)
d
Ψ
P(e)=\int_{0}^{\infty}\frac{1}{2}erfc(\Psi)p(\Psi)d\Psi
P(e)=∫0∞21erfc(Ψ)p(Ψ)dΨ
最终求得
P
(
e
)
=
1
2
(
1
−
E
b
/
N
0
E
b
/
N
0
+
1
)
P(e)=\frac{1}{2}(1-\frac{E_b/N_0}{E_b/N_0+1})
P(e)=21(1−Eb/N0+1Eb/N0)
matlab仿真
- 随机生成发射的01
- 调制,00映射为 − E b -\sqrt{E_b} −Eb,1映射为 + E b +\sqrt{E_b} +Eb
- 产生信道 h h h,噪声 n n n
- 过信道 y = h x + n y=hx+n y=hx+n
- x h = y / h = x + n h x^h=y/h=x+\frac{n}{h} xh=y/h=x+hn
- 判决,与发射端进行对比,计算误码率
- 理论值和实际值比较
clear
N = 10^6 % number of bits or symbols
% Transmitter
ip = rand(1,N)>0.5; % generating 0,1 with equal probability
s = 2*ip-1; % BPSK modulation 0 -> -1; 1 -> 0
Eb_N0_dB = [-3:35]; % multiple Eb/N0 values
for ii = 1:length(Eb_N0_dB)
n = 1/sqrt(2)*[randn(1,N) + j*randn(1,N)]; % white gaussian noise, 0dB variance
h = 1/sqrt(2)*[randn(1,N) + j*randn(1,N)]; % Rayleigh channel
% Channel and noise Noise addition
y = h.*s + 10^(-Eb_N0_dB(ii)/20)*n;
% equalization
yHat = y./h;
% receiver - hard decision decoding
ipHat = real(yHat)>0;
% counting the errors
nErr(ii) = size(find([ip- ipHat]),2);
end
simBer = nErr/N; % simulated ber
theoryBerAWGN = 0.5*erfc(sqrt(10.^(Eb_N0_dB/10))); % theoretical ber
EbN0Lin = 10.^(Eb_N0_dB/10);
theoryBer = 0.5.*(1-sqrt(EbN0Lin./(EbN0Lin+1)));
% plot
close all
figure
semilogy(Eb_N0_dB,theoryBerAWGN,'cd-','LineWidth',2);
hold on
semilogy(Eb_N0_dB,theoryBer,'bp-','LineWidth',2);
semilogy(Eb_N0_dB,simBer,'mx-','LineWidth',2);
axis([-3 35 10^-5 0.5])
grid on
legend('AWGN-Theory','Rayleigh-Theory', 'Rayleigh-Simulation');
xlabel('Eb/No, dB');
ylabel('Bit Error Rate');
title('BER for BPSK modulation in Rayleigh channel');