当前位置:网站首页>SISO Decoder for a General (n, N - 1) SPC Code (Supplementary section 3)
SISO Decoder for a General (n, N - 1) SPC Code (Supplementary section 3)
2022-06-11 18:12:00 【Bai XiaoSheng de la dynastie Ming】
Préface:
C'est ce qui s'est passéSPC(3,2) Voici une extension àSPC(n,n-1)
La longueur des données envoyées estn-1,Passe.SPCLa longueur de formation du Code estnDe
codeword.
Table des matières
1: Processus global
2:Algorithme simplifié
3: code
Un. Processus global

Je sais.
intrinsic LLR


C'est encore en train de calculerextrinsic LLR ,InSPC(3,2)Moyenne,ParL1Par exemple
De même, nous pouvons obtenir
Plus généralement :
Méthodes de preuve: Par induction mathématique ,RÉFÉRENCESSPC(3,2),C'est toujours untanh Multiplication des fonctions

2. Algorithme simplifié
2.1 Calcul des symboles


sgn=1: Correspondant àc=0, Parité réussie ,Tiens bon.
Sans changement
sgn=-1: Correspondant àc=1, La parité a échoué ,
Flip
2.2 Calcul de la taille
Suivez - moi.SPC(3,2)C'est pareil, Il y a une façon plus simple de , Il n'est pas nécessaire de se redessiner à chaque fois 
Trois code
# -*- coding: utf-8 -*-
"""
Created on Fri Jun 10 09:23:37 2022
@author: chengxf2
"""
import numpy as np
"""
AWGN: QPSK Après Modulation ,Ajouter du bruit, Supposons ici que tout ce qui est envoyé est 1(0->1)
args
std: Écart type
mu: Moyenne
n: Nombre d'échantillons
"""
def sendmessage(mu=0,sigma=1.0,n=6):
#np.random.seed(5)
s = 1.0+ np.random.normal(mu, sigma, n)
#sr = 1+std*np.random.randn(1,n)
print("\n step1 Envoyer des données: ", s)
return s
'''
Accèschannel LLR, intrinsic
args
rList: Du canal lui - même LLR
sigma: Variance
n: Nombre d'échantillons
'''
def getIntrLLR(rList, sigma,n=6):
left = 2.0/sigma
llrList = []
for r in rList:
llr = np.round(left*r,2)
llrList.append(llr)
print("\n step2 intrinsic llr ",llrList)
return llrList
'''
Obtenir une fonction symbolique
arg
llr: Rapport de vraisemblance
return
Symbole
'''
def sign(llr):
if llr>0:
return 1
else:
return -1
'''
Obtenir le symbole ,hardDecsion Processus
args
llrList
return
sgn: Totalsign
sgnList: Chacunsign
'''
def getSign(llrList):
sgn = 1
sgnList = []
for llr in llrList:
sgn_i = sign(llr)
sgnList.append(sgn_i)
sgn = sgn*sign(llr)
print("\n step3 get sign",sgn,"\t sgnList ",sgnList)
return sgn,sgnList
'''
Trouver la valeur minimale,Et l'emplacement, Valeur inférieure trouvée
'''
def minimum(llrList):
#llrList.sort()
print("\n step4 minimum",llrList)
n = len(llrList)
min1 = llrList[0]
min2 = llrList[0]
minpos = 0
for i in range(1,n):
llr = llrList[i]
if llr<min1:
min1 = llr
minpos = i
else:
min2 = llr #Garantiemin2 Certainement plus quemin1 C'est assez grand
#print("\n min1: %4.2f minpos: %d"%(min1,minpos))
for j in range(n):
llr = llrList[j]
if j==minpos:
continue
if llr<min2:
min2 = llr
print("\n min1: %4.2f minpos: %d min2: %4.2f "%(min1,minpos,min2))
return min1,min2, minpos
def getextrinsic(sgn, sgnList,min1,min2, minpos):
n = len(sgnList)
sgn_extrinsic = np.multiply(sgn, sgnList)
print("\n sgn_extrinsic ",sgn_extrinsic,)
extrinsicLLR =[]
for i in range(n):
if i == minpos:
llr = min2
else:
llr = min1
extrinsicLLR.append(llr)
extLLR = np.multiply(sgn_extrinsic, extrinsicLLR)
print("\n extLLR ",extLLR)
return extLLR
'''
Mise à jourllr
'''
def updateLLR(intrinsicLLR, extrinsicLLR):
llr = intrinsicLLR+extrinsicLLR
print("\n llr ",llr)
if __name__ =="__main__":
sigma = 0.8**2
s = sendmessage(0, sigma, 6)
intLLR = getIntrLLR(s, sigma)
sgn,sgnList = getSign(intLLR)
absLLR = np.abs(intLLR)
min1,min2, minpos =minimum(absLLR)
extLLR =getextrinsic(sgn,sgnList,min1,min2, minpos)
updateLLR(intLLR, extLLR) 
# -*- coding: utf-8 -*-
"""
Created on Fri Jun 10 08:44:34 2022
@author: chengxf2
"""
#-*-coding:utf-8-*-
"""
python Tracer une courbe de distribution normale standard
"""
# ==============================================================
import numpy as np
import math
import matplotlib.pyplot as plt
def gd(x, mu=0, sigma=1.0):
"""Générer des données
Argument:
x: array
Saisie des données(Arguments)
mu: float
Moyenne
sigma: float
Variance
"""
left = 1 / (np.sqrt(2 * math.pi) * np.sqrt(sigma))
right = np.exp(-(x - mu)**2 / (2 * sigma))
return left * right
if __name__ == '__main__':
# Arguments
x = np.arange(-4, 5, 0.1)
# Variable dépendante( Différentes moyennes ou Variances )
y_1 = gd(x, 0, 2.0)
y_2 = gd(x, 0, 1.0)
y_3 = gd(x, 0, 5.0)
y_4 = gd(x, 0, 0.2)
# Dessin
plt.plot(x, y_1, color='green')
plt.plot(x, y_2, color='blue')
plt.plot(x, y_3, color='yellow')
plt.plot(x, y_4, color='red')
# Définir le système de coordonnées
plt.xlim(-5.0, 5.0)
plt.ylim(-0.2, 1)
#Parce queaxes Vous obtiendrez quatre axes , Et nous n'avons besoin que de deux axes , Donc nous devons cacher les deux autres axes , Réglez la couleur de l'axe supérieur et de l'axe droit à none,Ne sera pas affiché
ax = plt.gca()
ax.spines['right'].set_color('none')
ax.spines['top'].set_color('none')
ax.xaxis.set_ticks_position('bottom')
ax.spines['bottom'].set_position(('data', 0))
ax.yaxis.set_ticks_position('left')
ax.spines['left'].set_position(('data', 0))
plt.legend(labels=['$\mu = 0, \sigma^2=2.0$', '$\mu = 0, \sigma^2=1.0$', '$\mu = 0, \sigma^2=5.0$', '$\mu = 0, \sigma^2=0.2$'])
plt.show()
边栏推荐
- Valid parentheses ---2022/02/23
- Using packstack to quickly install openstack
- Codeworks round 479 (Div. 3) [done]
- ACL 2022:评估单词多义性不再困扰?一种新的基准“DIBIMT”
- About element location and size
- Ffmpeg parity field frame interlace progressive command and code processing
- Experiment 3: design and verify all operations represented by linear table sequence on the computer
- Database lock and transaction isolation level
- Ctfhub SQL Boolean blind annotation
- 密评-----
猜你喜欢
![[not forgetting the original intention and forging ahead] 2021 Zhongchuang Suanli new year conference and anniversary celebration](/img/ae/9a0c300f2dcb03b05d737f14b0955f.jpg)
[not forgetting the original intention and forging ahead] 2021 Zhongchuang Suanli new year conference and anniversary celebration

網絡安全威脅情報體系

社会工程学实战入门

Getting started with Wireshark

Delete the penultimate node of the linked list ---2022/02/22

安装mariadb 10.5.7(tar包安装)
![[collect first and use it sooner or later] 100 Flink high-frequency interview questions series (III)](/img/cf/44b3983dd5d5f7b92d90d918215908.png)
[collect first and use it sooner or later] 100 Flink high-frequency interview questions series (III)

Ffmpeg hard codec inter QSV

Radiogroup dynamically add RadioButton

Chorus translation
随机推荐
Système d'information sur les menaces à la sécurité des réseaux
Hello go (XIII). Go language common standard library III
Spring 2021 daily question [week3 not finished]
There are three standards and three methods, i.e. fast growth and quick realization. How to choose the direction for making short videos of we media?
在同花顺上面开股票账户好不好,安不安全?
Ffmpeg parity field frame interlace progressive command and code processing
Secret comment-----
Delete the penultimate node of the linked list ---2022/02/22
Mysql8 installation, Navicat installation, sqli labs setup
Retrofit source code analysis
安装mariadb 10.5.7(tar包安装)
【先收藏,早晚用得到】100个Flink高频面试题系列(一)
【先收藏,早晚用得到】100个Flink高频面试题系列(二)
Merge two ordered linked lists ---2022/02/24
Initial experience of MariaDB spider sharding engine
送给大模型的「高考」卷:442人联名论文给大模型提出204个任务,谷歌领衔
Line up to pick up the express. At this meeting, I sorted out all kinds of code sets
Explain AI accelerators in detail: GPU, DPU, IPU, TPU... There are infinite possibilities for AI acceleration schemes
7-1 are prime numbers
Can 400 fans earn 20W a month? How did you do it?





