OTFS系统建模、通信性能分析、信道估计、模糊函数【附MATLAB代码】

文献来源:​微信公众号:EW Frontier

OTFS简介

OTFS信道估计

% Clear command window, workspace variables, and close all figures
clc; 
clear all; 
close all;
​
% Define Eb values in dB
EbdB = -10:2:10;
​
% Convert Eb values from dB to linear scale
Eb = 10.^(EbdB/10);
​
% Define Noise Power
No = 1;
​
% Calculate Signal-to-Noise Ratio (SNR) in linear scale
SNR = 2*Eb/No;
​
% Convert SNR to dB scale
SNRdB = 10*log10(SNR);
​
% Define matrix dimensions and parameters
M = 32; 
N = 16;
Ptx = eye(M); 
Prx = eye(M);
nTaps = 5;
DelayTaps = [0 1 2 3 4];
DopplerTaps = [0 1 2 3 4];
Ncp = max(DelayTaps);
​
% Initialize arrays to store Bit Error Rate (BER) for different methods
BER_MMSE = zeros(length(Eb),1);
BER_ZF = zeros(length(Eb),1);
​
% Number of iterations for Monte Carlo simulation
ITER = 10;
​
% Precompute matrices for transformation
F_M = 1/sqrt(M)*dftmtx(M);
F_N = 1/sqrt(N)*dftmtx(N);
​
% Main loop for Monte Carlo simulation
for ite = 1:ITERite% Generate random bits for transmissionXddBits = randi([0,1],M,N);% Generate random channel tapsh = sqrt(1/2)*(randn(1,nTaps)+ 1j*randn(1,nTaps));% Construct effective channel matrixHmat = zeros(M*N,M*N);omega = exp(1j*2*pi/(M*N));for tx = 1:nTapsHmat = Hmat + h(tx)*circshift(eye(M*N),DelayTaps(tx))*...(diag(omega.^((0:M*N-1)*DopplerTaps(tx))));endHeff = kron(F_N,Prx)*Hmat*kron(F_N',Ptx);% Generate Complex NoiseChNoise = sqrt(No/2)*(randn(1,M*N) + 1j*randn(1,M*N));% Loop over different Eb/N0 valuesfor ix = 1:length(Eb)% Generate modulated symbolsX_DD = sqrt(Eb(ix))*(2*XddBits-1); X_TF = F_M*X_DD*F_N';S_mat = Ptx*F_M'*X_TF;        TxSamples = reshape(S_mat,M*N,1).';TxSamplesCP = [TxSamples(M*N-Ncp+1:M*N) TxSamples];% Channel filteringRxsamplesCP = 0;for tx = 1:nTapsDoppler = exp(1j*2*pi/M*(-Ncp:M*N-1)*DopplerTaps(tx)/N);RxsamplesCP = RxsamplesCP + h(tx)*circshift(TxSamplesCP.*Doppler,[1, DelayTaps(tx)]);end% Remove cyclic prefixRxsamples = RxsamplesCP(Ncp+1:M*N+Ncp) + ChNoise;R_mat = reshape(Rxsamples.',M, N) ;Y_TF = F_M*Prx*R_mat;Y_DD = F_M'*Y_TF*F_N;y_DD = reshape(Y_DD, M*N, 1) ;% MMSE EqualizationxhatMMSE = inv(Heff'*Heff + eye(M*N)/Eb(ix))*Heff'*y_DD;DecodedBits = (real(xhatMMSE) >= 0);BER_MMSE(ix) = BER_MMSE(ix) + sum(DecodedBits ~= reshape(XddBits,M*N,1));% Zero Forcing (ZF) EqualizationxhatZF = pinv(Heff)*y_DD;DecodedBits = (real(xhatZF) >= 0);BER_ZF(ix) = BER_ZF(ix) + sum(DecodedBits ~= reshape(XddBits,M*N,1));end
end
​
% Average BER over iterations and symbols
BER_MMSE = BER_MMSE/M/N/ITER;
BER_ZF = BER_ZF/M/N/ITER;
​
% Plot BER versus SNR
semilogy(EbdB,BER_MMSE,'b-s','linewidth',3.0,'MarkerFaceColor','b','MarkerSize',9.0);
hold on; 
grid on; 
semilogy(EbdB,BER_ZF,'r-o','linewidth',3.0,'MarkerFaceColor','r','MarkerSize',9.0);
axis tight;
legend('MMSE','ZF');
title('OTFS BER v/s SNR');
xlabel('SNR(dB)'); 
ylabel('BER');
​

OTFS系统建模

% Clear command window, workspace variables, and close all figures
clc; 
clear all; 
close all;
​
% Define Eb values in dB
EbdB = -10:2:10;
​
% Convert Eb values from dB to linear scale
Eb = 10.^(EbdB/10);
​
% Define Noise Power
No = 1;
​
% Calculate Signal-to-Noise Ratio (SNR) in linear scale
SNR = 2*Eb/No;
​
% Convert SNR to dB scale
SNRdB = 10*log10(SNR);
​
% Define matrix dimensions and parameters
M = 32; 
N = 16;
Ptx = eye(M); 
Prx = eye(M);
nTaps = 5;
DelayTaps = [0 1 2 3 4];
DopplerTaps = [0 1 2 3 4];
Ncp = max(DelayTaps);
​
% Initialize arrays to store Bit Error Rate (BER) for different methods
BER_MMSE = zeros(length(Eb),1);
BER_ZF = zeros(length(Eb),1);
​
% Number of iterations for Monte Carlo simulation
ITER = 10;
​
% Precompute matrices for transformation
F_M = 1/sqrt(M)*dftmtx(M);
F_N = 1/sqrt(N)*dftmtx(N);
​
% Main loop for Monte Carlo simulation
for ite = 1:ITERite% Generate random bits for transmissionXddBits = randi([0,1],M,N);% Generate random channel tapsh = sqrt(1/2)*(randn(1,nTaps)+ 1j*randn(1,nTaps));% Construct effective channel matrixHmat = zeros(M*N,M*N);omega = exp(1j*2*pi/(M*N));for tx = 1:nTapsHmat = Hmat + h(tx)*circshift(eye(M*N),DelayTaps(tx))*...(diag(omega.^((0:M*N-1)*DopplerTaps(tx))));endHeff = kron(F_N,Prx)*Hmat*kron(F_N',Ptx);% Generate Complex NoiseChNoise = sqrt(No/2)*(randn(1,M*N) + 1j*randn(1,M*N));% Loop over different Eb/N0 valuesfor ix = 1:length(Eb)% Generate modulated symbolsX_DD = sqrt(Eb(ix))*(2*XddBits-1); X_TF = F_M*X_DD*F_N';S_mat = Ptx*F_M'*X_TF;        TxSamples = reshape(S_mat,M*N,1).';TxSamplesCP = [TxSamples(M*N-Ncp+1:M*N) TxSamples];% Channel filteringRxsamplesCP = 0;for tx = 1:nTapsDoppler = exp(1j*2*pi/M*(-Ncp:M*N-1)*DopplerTaps(tx)/N);RxsamplesCP = RxsamplesCP + h(tx)*circshift(TxSamplesCP.*Doppler,[1, DelayTaps(tx)]);end% Remove cyclic prefixRxsamples = RxsamplesCP(Ncp+1:M*N+Ncp) + ChNoise;R_mat = reshape(Rxsamples.',M, N) ;Y_TF = F_M*Prx*R_mat;Y_DD = F_M'*Y_TF*F_N;y_DD = reshape(Y_DD, M*N, 1) ;% MMSE EqualizationxhatMMSE = inv(Heff'*Heff + eye(M*N)/Eb(ix))*Heff'*y_DD;DecodedBits = (real(xhatMMSE) >= 0);BER_MMSE(ix) = BER_MMSE(ix) + sum(DecodedBits ~= reshape(XddBits,M*N,1));% Zero Forcing (ZF) EqualizationxhatZF = pinv(Heff)*y_DD;DecodedBits = (real(xhatZF) >= 0);BER_ZF(ix) = BER_ZF(ix) + sum(DecodedBits ~= reshape(XddBits,M*N,1));end
end
​
% Average BER over iterations and symbols
BER_MMSE = BER_MMSE/M/N/ITER;
BER_ZF = BER_ZF/M/N/ITER;
​
% Plot BER versus SNR
semilogy(EbdB,BER_MMSE,'b-s','linewidth',3.0,'MarkerFaceColor','b','MarkerSize',9.0);
hold on; 
grid on; 
semilogy(EbdB,BER_ZF,'r-o','linewidth',3.0,'MarkerFaceColor','r','MarkerSize',9.0);
axis tight;
legend('MMSE','ZF');
title('OTFS BER v/s SNR');
xlabel('SNR(dB)'); 
ylabel('BER');
​OTFS系统建模
clc; clear all; close all;
% SIGNAL MODEL OF OTFS
M = 32; N = 32;                 %M-> no. of subcarriers/delay bins ; N-> no. of symbols/doppler bins
F_M = 1/sqrt(M)*dftmtx(M);      %disrete fourier transform matrix (normalised)   
F_N = 1/sqrt(N)*dftmtx(N);      %forms the grid
Ptx = eye(M);
delta_f = 15e3;                 %subcarrier BW
T = 1/delta_f;                  %OFDM symbol Duration
​X_DD = zeros(M,N);              %Delay Doppler Grid
X_DD(3, 3) = 1;                 %impulse in DD Domain
X_TF = F_M*X_DD*F_N';            
S = Ptx*F_M'
*X_TF;
s = reshape(S,M*N,1);
​
​
​
​
% figure()
subplot(4,2,[1,2,3,4])
bar3(X_DD);
axis tight;
xlabel('Doppler'); 
ylabel('Delay');
title('Basis function in DD-domain');
​
% figure()
subplot(4,2,5)
surf(real(X_TF));
axis tight;
xlabel('Time'); 
ylabel('Subcarrier');
title('Basis function in TF-domain (Real)');
​
% figure()
subplot(4,2,6)
surf(imag(X_TF));
axis tight;
xlabel('Time'); 
ylabel('Subcarrier');
title('Basis function in TF-domain (Imag)');
​
% figure()
subplot(4,2,7)
plot((0:length(s)-1)*T/M,real(s));
axis tight;
ylim([-0.5 0.5]);
xlabel('Time');
title('Basis function in time-domain (Real)');
​
% figure()
subplot(4,2,8)
plot((0:length(s)-1)*T/M,imag(s));
axis tight;
ylim([-0.5 0.5]);
xlabel('Time');
title('Basis function in time-domain (Imag)');
​

OTFS系统性能部分代码

% Clear command window, workspace variables, and close all figures
clc; 
clear all; 
close all;
​
% Define Eb values in dB
EbdB = 2;
​
% Convert Eb values from dB to linear scale
Eb = 10.^(EbdB/10);
​
% Define Noise Power
No = 1;
​
% Calculate Signal-to-Noise Ratio (SNR) in linear scale
SNR = 2*Eb/No;
​
% Convert SNR to dB scale
SNRdB = 10*log10(SNR);
​
% Define matrix dimensions and parameters
M = 32; 
N = 16;
Ptx = eye(M); 
Prx = eye(M);
nTaps = 5;
DelayTaps = [5 1 0 3 4];
DopplerTaps = [0 3 2 3 4];
Ncp = max(DelayTaps);
​
​
% Precompute matrices for transformation
F_M = 1/sqrt(M)*dftmtx(M);
F_N = 1/sqrt(N)*dftmtx(N);
​
% Generate random bits for transmission
XddBits = randi([0,1],M,N);
​
% Generate random channel taps
h = sqrt(1/2)*(randn(1,nTaps)+ 1j*randn(1,nTaps));
​
% Construct effective channel matrix
Hmat = zeros(M*N,M*N);
omega = exp(1j*2*pi/(M*N));
for tx = 1:nTapsHmat = Hmat + h(tx)*circshift(eye(M*N),DelayTaps(tx))*...(diag(omega.^((0:M*N-1)*DopplerTaps(tx))));
end
Heff = kron(F_N,Prx)*Hmat*kron(F_N',Ptx);% Generate Complex Noise
ChNoise = sqrt(No/2)*(randn(1,M*N) + 1j*randn(1,M*N));% Generate modulated symbols
X_DD = sqrt(Eb)*(2*XddBits-1); 
X_TF = F_M*X_DD*F_N';
S_mat = Ptx*F_M'*X_TF;        
TxSamples = reshape(S_mat,M*N,1).';
TxSamplesCP = [TxSamples(M*N-Ncp+1:M*N) TxSamples];
​
% Channel filtering
RxsamplesCP = 0;
for tx = 1:nTapsDoppler = exp(1j*2*pi/M*(-Ncp:M*N-1)*DopplerTaps(tx)/N);RxsamplesCP = RxsamplesCP + h(tx)*circshift(TxSamplesCP.*Doppler,[1, DelayTaps(tx)]);
end
​
% Remove cyclic prefix
Rxsamples = RxsamplesCP(Ncp+1:M*N+Ncp) + ChNoise;
R_mat = reshape(Rxsamples.',M, N) ;
Y_TF = F_M*Prx*R_mat;
Y_DD = F_M'*Y_TF*F_N;
y_DD = reshape(Y_DD, M*N, 1) ;
​
% MMSE Equalization
xhatMMSE = inv(Heff'*Heff + eye(M*N)/Eb)*Heff'*y_DD;
DecodedBits_MMSE = (real(xhatMMSE) >= 0);
DecodedBits_MMSE_reshaped = reshape(DecodedBits_MMSE,M,N);
BER_MMSE_Map = (DecodedBits_MMSE_reshaped ~= XddBits);
BER_MMSE = sum(DecodedBits_MMSE ~= reshape(XddBits,M*N,1));
​

OTFS模糊函数部分代码

% Clear command window, workspace variables, and close all figures
clc; 
clear all; 
close all;
​
% Define Eb values in dB
EbdB = 3;
​
% Convert Eb values from dB to linear scale
Eb = 10.^(EbdB/10);
​
% Define Noise Power
No = 1;

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/843386.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

【测评】香橙派 AIpro上手初体验

AI毋庸置疑是近年来,热度最高的技术之一,作为一名工程师拥抱新技术的同时不可或缺的需要一块强悍的开发板,香橙派 AIpro除了拥有好看的皮囊之外,还拥有一个有趣且充满魅力的灵魂。作为一位长期活跃在嵌入式开发领域的工程师&#…

OrangePi AIpro (8T)使用体验,性能测试报告

前言 这段时间收到了CSDN和香橙派的邀请,对OrangePi AIpro进行体验测评,在此感谢CSDN对我的信任,也感谢香橙派能做出如此优秀的开发板。 可喜可贺,周三晚上我收到了官方寄出的OrangePi AIpro。出于对国产芯片的好奇&#xff0c…

二分答案思想下的二进制问题

序列合并 题目描述 给定一个长度为 n n n 的非负整数序列 { a n } \{a_n\} {an​},你可以进行 k k k 次操作,每次操作你选择两个相邻的数,把它们合并成它们的按位或。 形式化地,一次操作中,你选择一个下标 i i …

李廉洋:5.29黄金原油持续震荡,今日美盘行情走势分析及策略。

黄金消息面分析:美联储理事鲍曼周二表示,她支持要么先等等再开始放缓缩减资产负债表,要么采取比本月早些时候宣布的更温和的放慢缩表进程。鲍曼认为商业银行准备金水平仍然充足,这让官员们有更多时间来推进缩表进程。“在准备金接…

你的手机是如何控制你的手表之广播篇

前言 要让手机能够控制手表,第一步当然要让手机能够“看见”手表,人类作为上帝视角,我们是能够通过眼睛直接看见手机和手表的,但要让手机“看见”手表,就需要一端把自己的信息通过电磁波的形式发往空中,另…

Excel中怎样将第一行建立好的规则套用到每一行?

考虑使用条件格式来完成,有两种方式可以尝试: 一、一次性创建条件格式 1.选中需要设置条件格式的区域,如果是不连续的区域,可以按住Ctrl键,然后用鼠标依次选中需要的数据区域 2.点击 开始选项卡,条件格式…

解决Plugin ‘maven-clean-plugin:3.1.0‘ not found的问题

1. 问题描述 当导入别人的Maven项目时,可能会出现Plugin maven-clean-plugin:3.1.0 not found的错误信息。 2. 解决方案 2.1 方案一 检查自己的Maven仓库地址是否正确,一般引入其他人的项目时,Maven仓库的目录以及配置都会是别人的&#xff…

Broker的主从架构

为了保证MQ的数据不丢失而且具备一定的高可用性,所以一般都是得将Broker部署成Master-Slave模式的,也就是—个Master Broker对应一个Slave Broker Master需要在接收到消息之后,将数据同步给Slave,这样一旦Master Broker挂了&#…

新能源汽车为乙炔炭黑行业带来了发展机遇

新能源汽车为乙炔炭黑行业带来了发展机遇 乙炔炭黑(Acetylene carbon black)又称乙炔黑,外观为黑色极细粉末,相对密度1.95(氮置换法),纯度很高,含碳量大于99.5%,氢含量小…

Java 泛型 <? super T> 中 super 怎么 理解?与 extends 有何不同?

作者:zhang siege 链接:https://www.zhihu.com/question/20400700/answer/91106397 来源:知乎 著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。 首先,泛型的出现时为了安全,所有与…

VSCode安装platformio插件

文章目录 一、安装VSCode二、安装platformio(一)整理文件夹(二)整理Python环境(三)安装platformio 三、创建ESP8266项目四、使用命令行创建项目五、创建项目太久怎么办六、参考链接 一、安装VSCode VSCode…

AIGC笔记--基于PEFT库使用LoRA

1--相关讲解 LORA: LOW-RANK ADAPTATION OF LARGE LANGUAGE MODELS LoRA 在 Stable Diffusion 中的三种应用:原理讲解与代码示例 PEFT-LoRA 2--基本原理 固定原始层,通过添加和训练两个低秩矩阵,达到微调模型的效果; 3--简单代…

AIGC 009-DaLLE2遇见达利!文生图过程中另外一种思路。

AIGC 009-DaLLE2遇见达利!文生图过程中另外一种思路。 0 论文工作 首先,遇见达利是我很喜欢的名字,达利是跟毕加索同等优秀的画家。这个名字就很有意思。 这篇论文提出了一种新颖的分层文本条件图像生成方法,该方法利用 CLIP&…

DolphinScheduler 3.3.0版本更新一览

Apache DolphinScheduler即将迎来3.3.0版本的发布,届时将有一系列重要的更新和改进。在近期的社区5月份用户线上分享会上,项目PMC 阮文俊为大家介绍了3.3.0版本将带来的主要更新和改进,并为大家指出了如何参与社区的方式。 什么是DolphinSch…

四川古力未来科技抖音小店安全靠谱,购物新体验

在数字化浪潮席卷而来的今天,电商行业蓬勃发展,各种线上购物平台如雨后春笋般涌现。其中,抖音小店凭借其独特的短视频直播购物模式,迅速赢得了广大消费者的青睐。而四川古力未来科技抖音小店,更是以其安全靠谱、品质保…

ARM鲲鹏920-oe2309-caffe

参考链接:Caffe | Installation 安装依赖包 dnf install dnf update dnf install leveldb-devel snappy-devel opencv.aarch64 boost-devel hdf5-devel gflags-devel glog-devel lmdb-devel openblas.aarch64 dnf install git wget tar gcc-g unzip automake libtool autoco…

网工内推 | 高校、外企网工,IE认证优先,年薪最高18w

01 上海外国语大学贤达经济人文学院 🔷招聘岗位:高校网络主管 🔷职责描述: 1、负责总机房、网络规划及管理,包括容量规划、成本评估、建设管理等; 2、负责设计、实施及维护全网络架构及规划网络变更计划 3、负责网络功…

VMware ESXi 兼容性查询

官网兼容性查询地址:https://www.vmware.com/resources/compatibility/search.php

优选免单:重塑电商销售模式的新策略

随着电商行业的不断发展,一种名为“优选免单”的新兴销售模式正逐渐崭露头角。该模式以独特的价格策略、创新的奖励机制和巧妙的社交网络应用为核心,成功激发了消费者的购买热情,并实现了销售的高速增长。 一、规范运营,避免潜在风…

【网络协议】应用层协议HTTPS

文章目录 为什么引入HTTPS?基本概念加密的基本过程对称加密非对称加密中间人攻击证书 为什么引入HTTPS? 由于HTTP协议在网络传输中是明文传输的,那么当传输一些机密的文件或着对钱的操作时,就会有泄密的风险,从而引入…