1.算法描述 可见光通信的信道估计,均衡,抑制papr。
不考虑光信道,用传统的无线通信的OFDM的信道估计,均衡,抑制papr 信道估计,均衡最好有两个以上的方法比较
%本次仿真载频为2GHz,带宽1MHz,子载波数128个,cp为16 %子载波间隔为7.8125kHz %一个ofdm符号长度为128us,cp长度为16us %采用16QAM调制方式 %最大doppler频率为132Hz %多径信道为5径,功率延迟谱服从负指数分布~exp(-t/trms),trms=(1/4)*cp时长,各径延迟取为delay=[0 2e-6 4e-6 8e-6 12e-6]
Zero forcing, ZF:简单,但放大了噪声,性能最差
Minimum Mean Square Error, MMSE:考虑了噪声因素,性能比ZF好
2.仿真效果预览 matlab2022a仿真如下:
3.MATLAB核心程序
clear all;
close all;
warning off;
addpath 'func\'
sel = 3;
%FFT长度
FFTLen = 64;
%循环前缀长度
CPLen = 16;
%QAM
M = 4;
%子载波个数
Ns = 8;
w = ones(FFTLen,1);
SNRdB = [0:2:26];
for ii = 1:length(SNRdB)
ii
SNRS = SNRdB(ii);
NUM = 0;
ERR = 0;
while ERR <= 2000
ERR
NUM = NUM + 1;
store_input = zeros(Ns,FFTLen*M);
store_output = zeros(Ns,FFTLen*M);
store_error = zeros(Ns,FFTLen);
for sym=1:Ns
%发送数据
input = rand(1,FFTLen*M) > 0.5;
store_input(sym,:) = input;
%发送
[signal_tx,input_symbols] = func_transmitter(input,FFTLen,CPLen,M);
%通过信道
signal_rx = func_channel(signal_tx,SNRS);
%估计,均衡,
if sel == 1
[signal_recovered,w,error_sym] = func_receiver_mmse(signal_tx,signal_rx,input_symbols,FFTLen,CPLen,M,w);
end
if sel == 2
[signal_recovered,w,error_sym] = func_receiver_zf(signal_tx,signal_rx,input_symbols,FFTLen,CPLen,M,w);
end
if sel == 3
w = zeros(3,1);
[signal_recovered,w,error_sym] = func_receiver_rls(signal_tx, signal_rx, FFTLen, CPLen, M, w, 3);
end
store_output(sym,:) = signal_recovered;
store_error(sym,:) = error_sym.';
end
errors_ext = abs(store_input - store_output);
errors = errors_ext(FFTLen+1:length(errors_ext));
num_errors = sum(sum(errors));
ERR = ERR + num_errors;
end
BER(ii) = ERR/NUM/(FFTLen*M*(Ns-1));
end
% figure;
% semilogy(SNRdB,BER,'b-o');
% grid on;
% ylabel('Error');
% xlabel('SNR');
if sel == 1
save rmmse.mat SNRdB BER
end
if sel == 2
save rzf.mat SNRdB BER
end
if sel == 3
save rls.mat SNRdB BER
end
figure;
load rmmse.mat
semilogy(SNRdB,BER,'b-o');
hold on
load rzf.mat
semilogy(SNRdB,BER,'r-o');
hold on
load rls.mat
semilogy(SNRdB,BER,'k-o');
hold on
legend('MMSE','ZF','RLS');
grid on;
ylabel('Error');
xlabel('SNR');
01_099m