资源简介
本资源是文献Power of Deep Learning for Channel Estimation and Signal Detection in OFDM Systems的代码部分
![](http://www.nz998.com/pic/39762.jpg)
代码片段和文件信息
from __future__ import division
import numpy as np
import scipy.interpolate
import tensorflow as tf
import math
import os
K = 64
CP = K//4
P = 64 # number of pilot carriers per OFDM block
#pilotValue = 1+1j
allCarriers = np.arange(K) # indices of all subcarriers ([0 1 ... K-1])
pilotCarriers = allCarriers[::K//P] # Pilots is every (K/P)th carrier.
#pilotCarriers = np.hstack([pilotCarriers np.array([allCarriers[-1]])])
#P = P+1
dataCarriers = np.delete(allCarriers pilotCarriers)
mu = 2
payloadBits_per_OFDM = len(dataCarriers)*mu # number of payload bits per OFDM symbol
payloadBits_per_OFDM = K*mu
SNRdb = 20 # signal to noise-ratio in dB at the receiver
mapping_table = {
(00) : -1-1j
(01) : -1+1j
(10) : 1-1j
(11) : 1+1j
}
demapping_table = {v : k for k v in mapping_table.items()}
def Modulation(bits):
bit_r = bits.reshape((int(len(bits)/mu) mu))
return (2*bit_r[:0]-1)+1j*(2*bit_r[:1]-1) # This is just for QAM modulation
def OFDM_symbol(Data pilot_flag):
symbol = np.zeros(K dtype=complex) # the overall K subcarriers
#symbol = np.zeros(K)
symbol[pilotCarriers] = pilotValue # allocate the pilot subcarriers
symbol[dataCarriers] = Data # allocate the pilot subcarriers
return symbol
def IDFT(OFDM_data):
return np.fft.ifft(OFDM_data)
def addCP(OFDM_time):
cp = OFDM_time[-CP:] # take the last CP samples ...
return np.hstack([cp OFDM_time]) # ... and add them to the beginning
def channel(signalchannelResponseSNRdb):
convolved = np.convolve(signal channelResponse)
signal_power = np.mean(abs(convolved**2))
sigma2 = signal_power * 10**(-SNRdb/10)
noise = np.sqrt(sigma2/2) * (np.random.randn(*convolved.shape)+1j*np.random.randn(*convolved.shape))
return convolved + noise
def removeCP(signal):
return signal[CP:(CP+K)]
def DFT(OFDM_RX):
return np.fft.fft(OFDM_RX)
def equalize(OFDM_demod Hest):
return OFDM_demod / Hest
def get_payload(equalized):
return equalized[dataCarriers]
def PS(bits):
return bits.reshape((-1))
def ofdm_simulate(codeword channelResponseSNRdb):
OFDM_data = np.zeros(K dtype=complex)
OFDM_data[allCarriers] = pilotValue
OFDM_time = IDFT(OFDM_data)
OFDM_withCP = addCP(OFDM_time)
OFDM_TX = OFDM_withCP
OFDM_RX = channel(OFDM_TX channelResponseSNRdb)
OFDM_RX_noCP = removeCP(OFDM_RX)
# ----- target inputs ---
symbol = np.zeros(K dtype=complex)
codeword_qam = Modulation(codeword)
symbol[np.arange(K)] = codeword_qam
OFDM_data_codeword = symbol
OFDM_time_codeword = np.fft.ifft(OFDM_data_codeword)
OFDM_withCP_cordword = addCP(OFDM_time_codeword)
OFDM_RX_codeword = channel(OFDM_withCP_cordword channelResponseSNRdb)
OFDM_RX_noCP_codeword = removeCP(OFDM_RX_codeword)
return np.concatenate((np.concatenate((np.real(OFDM_RX_
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
....... 11738 2017-12-22 04:06 Power of Deep Learning for Channel Estimation and Signal Detection in OFDM Systems\DNN_Detection\Example.py
文件 14320 2018-11-16 14:27 Power of Deep Learning for Channel Estimation and Signal Detection in OFDM Systems\DNN_Detection\Example_read.py
文件 590 2018-11-16 09:32 Power of Deep Learning for Channel Estimation and Signal Detection in OFDM Systems\DNN_Detection\Main.py
文件 13436 2018-11-21 14:11 Power of Deep Learning for Channel Estimation and Signal Detection in OFDM Systems\DNN_Detection\OFDM_ChannelEstimation_DeepLearning_QAM_random_pilot.py
....... 15348 2017-12-22 04:06 Power of Deep Learning for Channel Estimation and Signal Detection in OFDM Systems\DNN_Detection\OFDM_ChannelEstimation_DeepLearning_QAM_random_pilot_withoutCP.py
....... 14999 2017-12-22 04:06 Power of Deep Learning for Channel Estimation and Signal Detection in OFDM Systems\DNN_Detection\OFDM_ChannelEstimation_DeepLearning_QAM_random_pilot_with_different_pilots.py
文件 881 2018-11-16 10:06 Power of Deep Learning for Channel Estimation and Signal Detection in OFDM Systems\DNN_Detection\partial test.py
....... 800 2017-12-22 04:06 Power of Deep Learning for Channel Estimation and Signal Detection in OFDM Systems\DNN_Detection\Pilot_16
....... 3200 2017-12-22 04:06 Power of Deep Learning for Channel Estimation and Signal Detection in OFDM Systems\DNN_Detection\Pilot_64
....... 400 2017-12-22 04:06 Power of Deep Learning for Channel Estimation and Signal Detection in OFDM Systems\DNN_Detection\Pilot_8
文件 232 2018-11-15 18:41 Power of Deep Learning for Channel Estimation and Signal Detection in OFDM Systems\DNN_Detection\ReadMe.txt
....... 6374 2017-12-22 04:06 Power of Deep Learning for Channel Estimation and Signal Detection in OFDM Systems\DNN_Detection\Test.py
文件 9998 2018-11-16 12:28 Power of Deep Learning for Channel Estimation and Signal Detection in OFDM Systems\DNN_Detection\Train.py
....... 6582 2017-12-22 04:06 Power of Deep Learning for Channel Estimation and Signal Detection in OFDM Systems\DNN_Detection\Train.pyc
....... 7486 2017-12-22 04:06 Power of Deep Learning for Channel Estimation and Signal Detection in OFDM Systems\DNN_Detection\utils.py
....... 5220 2017-12-22 04:06 Power of Deep Learning for Channel Estimation and Signal Detection in OFDM Systems\DNN_Detection\utils.pyc
....... 285 2017-12-22 04:06 Power of Deep Learning for Channel Estimation and Signal Detection in OFDM Systems\ReadMe.rst
文件 287 2018-11-15 13:47 Power of Deep Learning for Channel Estimation and Signal Detection in OFDM Systems\网上说明.txt
目录 0 2019-01-01 15:47 Power of Deep Learning for Channel Estimation and Signal Detection in OFDM Systems\DNN_Detection
目录 0 2018-11-21 14:03 Power of Deep Learning for Channel Estimation and Signal Detection in OFDM Systems
----------- --------- ---------- ----- ----
112176 20
相关资源
- 广联达6.0写锁包,2020年11月最新
- 机器学习个人笔记完整版v5.2-A4打印版
- 深度学习卷积神经网络可检测和分类
- 矿井巷道时频编码协作MC-CDMA信道估计
- GAN对抗式生成网络的应用:从图片上
- [en]深度学习[Deep Learning: Adaptive Compu
- 李宏毅-机器学习(视频2017完整)
- 吴恩达深度学习第一课第四周作业及
- 机器学习深度学习 PPT
- 麻省理工:深度学习介绍PPT-1
- Wikipedia机器学习迷你电子书之四《D
- 深度学习在遥感中的应用综述
- 深度学习数据集标注
- 深度学习算法实践源码-吴岸城
- 李宏毅深度学习ppt
- SSD目标检测算法论文-英文原版
- 台湾李宏毅教授深度学习讲义 pdf
- 基于深度学习实现人脸识别包含模型
- 深度学习与PyTorch-代码和PPT.zip
- 测试工程源码1(一种基于深度学习的
- 深度学习: MNIST的数据集
- 《深度学习》 高清版本中文PDFIan Go
- 今日头条38万条新闻数据标题
- 深度学习算法论文
- TensorFlow Machine Learning Cookbook+无码高清
- Hands-On Machine Learning with Scikit-Learn an
- Neural Networks:Tricks of the Trade+无码高清
- 基于深度学习的图像超分辨率算法论
- 人工智能初步学习总结
- 迁移学习简明手册
评论
共有 条评论