Giter Site home page Giter Site logo

inf244-programmes's Introduction

Programmes useful for INF244 course at UiB

This repository includes a lot of algorithms being useful for the UiB course INF244 Graph-based Inference, Networks and Coding Theory

It includes simulation of different channels, repetitional codes, Convolutional encoders, Viterbi decoders, Turbo encoders, LDPC decoder and Polar codes

Channels

AWGN

Parameters: 0.5 = n_0 (sigma), 0.3 = energy level
python ChannelAWGN.py uib.png 0.5 0.3 png
python ChannelAWGN.py Mondrian.csv 0.5 0.3 csv

BSC

Parameters: 0.1 = prob
python ChannelBSC.py uib.png 0.1 png
python ChannelBSC.py Mondrian.csv 0.1 csv

BEC

Parameters: 0.1 = prob
python ChannelBEC.py uib.png 0.1 png
python ChannelBEC.py Mondrian.csv 0.1 csv

Repetitional code

Parameters: 0.3 = prob for BEC/BSC, 0.6 = E_b/N_0 for AWGN
python Repcode.py Mondrian.csv 5 bsc 0.3
python Repcode.py Mondrian.csv 5 bec 0.3
python Repcode.py Mondrian.csv 5 awgn 0.6

Convolutional encoder

Parameters: k, n = Size of the Matrix, matrix = Matrix seperated by S going row by row, seq = Sequence to encode
python ConvFinal.py k n matrix seq
python ConvFinal.py 1 2 111S101 100100
python ConvFinal.py 1 2 1111S1011 1011011

Old programme, sometimes not working, but for checking

python ConvOld.py k n b m
python ConvOld.py 1 2 1111S1011 1011011

Turbo encoder

python TurboEncoder.py 1S1101 csv Sequence.csv Permutation.csv
python TurboEncoder.py 1S1101 str 10110 4S5S3S1S2

Viterbi decoder

Parameter: k, n = Size of the Matrix, channel = {awgn, bsc, bec}, seq = Sequence to encode, matrix = Matrix seperated by S going row by row
python Viterbi.py k n channel seq matrix
python Viterbi.py 1 2 bsc 111S101 000111011001110000
python Viterbi.py 1 2 bsc 111S001 000111011001110000
python Viterbi.py 2 3 bsc 111S11S101S1S01S11 111000011100000100
python Viterbi.py 1 2 bec 111S101 2220111222
python Viterbi.py 1 2 awgn 111S101 -0.3S0.0S-0.9S0.2S0.9S0.6S1.1S-0.7S1.4S1.1

LDPC Decoder

AWGN

G can actually be a dummy if no mhat decoding necessary
That will make max likelihood useless
python LDPCdecoderAWGN.py systematic paritycheck sequence N0 debug_mode
python LDPCdecoderAWGN.py G H r N0 debug_mode
python LDPCdecoderAWGN.py G.csv H4.csv -0.2S0.3S-1.2S0.5S-0.8S-0.6S1.1 4 True

BSC

python LDPCdecoderBSC.py systematic paritycheck sequence probability debug_mode
python LDPCdecoderBSC.py G H r prob debug_mode
python LDPCdecoderBSC.py G.csv H_bec_lecturenotes.csv 011111 0.25 True

BEC

python LDPCdecoderBEC.py systematic paritycheck sequence probability debug_mode
python LDPCdecoderBEC.py G H r prob debug_mode
python LDPCdecoderBEC.py G.csv H_bec_lecturenotes.csv 020212 0.25 True

Polar codes

Parameter: Amount of iterations
python3 PolarCodes.py 3

Polarise

Calculate the probabilities of erasure probability in all channels
Input is initial erasure probability
echo 0.3 | ./polarise
echo 0.3 | ./polarise | ./polarise

PolariseExp

Prints calculation path
echo p | ./polariseExp
echo p | ./polariseExp | ./polariseExp

inf244-programmes's People

Contributors

dabendorf avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.