基于Matlab模拟OFDM中的LSE 信道估计

编程入门 行业动态 更新时间:2024-10-26 22:18:04

基于Matlab模拟OFDM中的LSE <a href=https://www.elefans.com/category/jswz/34/1766388.html style=信道估计"/>

基于Matlab模拟OFDM中的LSE 信道估计

✅作者简介:热爱科研的Matlab仿真开发者,修心和技术同步精进,matlab项目合作可私信。

🍎个人主页:Matlab科研工作室

🍊个人信条:格物致知。

更多Matlab仿真内容点击👇

智能优化算法       神经网络预测       雷达通信       无线传感器        电力系统

信号处理              图像处理               路径规划       元胞自动机        无人机 

⛄ 内容介绍

本文介绍了正交频分复用(OFDM)系统中常用的信道估计算 法:最小二乘(LS).

⛄ 完整代码

% in this Mfile, I want to investigate the performance of LSE algorithm in

% OFDM channel estimation

% initialize

clear

clc

% parameter definition

N  = 256;           % total number of subchannels

P  = 256/8;         % total number of Pilots

S  = N-P;           % totla number of data subchannels

GI = N/4;           % guard interval length

M  = 2;             % modulation

pilotInterval = 8;  % pilot position interval

L  = 16;            % channel length

nIteration = 500;    % number of iteration in each evaluation

SNR_V = [0:3:27];   % signal to noise ratio vector in dB

ber = zeros(1,length(SNR_V));   % initializing bit error rate

% Pilot Location and strength

Ip = [1:pilotInterval:N];       % location of pilots

Is = setxor(1:N,Ip);            % location of data

Ep = 2;                        % energy in pilot symbols in comparison

% to energy in data symbols

% fft matrix

F = exp(2*pi*sqrt(-1)/N .* meshgrid([0:N-1],[0:N-1])...

    .* repmat([0:N-1]',[1,N]));

for( i = 1 : length(SNR_V))

    SNR = SNR_V(i)

    for(k = 1 : nIteration)

        % generating random channel coefficients

        h(1:L,1)  =     random('Normal',0,1,L,1) + ...

            j * random('Normal',0,1,L,1);

        h  = h./sum(abs(h));    % normalization

        

        % Tr Data

        TrDataBit = randint(N,1,M);

        TrDataMod = qammod(TrDataBit,M);

        TrDataMod(Ip) = Ep * TrDataMod(Ip);

        TrDataIfft = ifft(TrDataMod,N);

        TrDataIfftGi = [TrDataIfft(N- GI + 1 : N);TrDataIfft];

        

        % tx Data

        TxDataIfftGi = filter(h,1,TrDataIfftGi);    % channel effect

        % adding awgn noise

        TxDataIfftGiNoise = awgn(TxDataIfftGi ...

            , SNR - db(std(TxDataIfftGi))); % normalization to signal power

        

        TxDataIfft  = TxDataIfftGiNoise(GI+1:N+GI);

        TxDataMod   = fft(TxDataIfft,N);

        

        % Channel estimation

        Spilot = TrDataMod(Ip); % trnasmitted pilots

        Ypilot = TxDataMod(Ip); % received pilots

        

        G = (Ep * length(Ip))^-1 ...

            * ctranspose(sqrt(Ep)*diag(Spilot)*ctranspose(F(1:L,Ip)));

        

        hHat = G*Ypilot;    % estimated channel coefficient in time domain

        

        TxDataBit   = qamdemod(TxDataMod./(fft(hHat,N)),M);

        

        % bit error rate computation

        [nErr bErr(i,k)] = symerr(TxDataBit(Is),TrDataBit(Is));

    end

end

f1 = figure(1);

set(f1,'color',[1 1 1]);

semilogy(SNR_V,mean(bErr'),'b->')

xlabel('SNR in dB');

ylabel('Bit Error Rate')

⛄ 运行结果

⛄ 参考文献

[1] 彭玲, 刘晓忠, 付杰,等. OFDM系统中基于导频的信道估计及其MATLAB仿真[J]. 井冈山学院学报, 2008(2期):47-49.

[2] 廉钰莹. 基于OFDM的电力线载波通信信道估计[D]. 吉林大学.

[3] 田志峰. 基于MATLAB环境下OFDM系统信道估计仿真[J]. 才智, 2012(23):1.

[4] 范佳佳. 基于Matlab的OFDM系统信道评估设计[D]. 东华大学, 2016.

❤️部分理论引用网络文献,若有侵权联系博主删除

❤️ 关注我领取海量matlab电子书和数学建模资料

 

更多推荐

基于Matlab模拟OFDM中的LSE 信道估计

本文发布于:2024-02-08 21:58:14,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1675521.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:信道   Matlab   OFDM   LSE

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!