{"id":15940160,"url":"https://github.com/govindjeevan/viterbi-error-correction","last_synced_at":"2026-01-19T03:01:23.335Z","repository":{"id":110681539,"uuid":"124538092","full_name":"govindjeevan/Viterbi-Error-Correction","owner":"govindjeevan","description":"MATLAB code for convolution code (2, 1, 10) decoding with g1 = 110111 and g2 = 11101101 and the analysis of % of error detection and correction using Viterbi decoding and path metric.","archived":false,"fork":false,"pushed_at":"2018-03-09T12:39:50.000Z","size":247,"stargazers_count":0,"open_issues_count":1,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-03T20:43:43.021Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Matlab","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/govindjeevan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-09T12:30:31.000Z","updated_at":"2018-03-09T12:41:56.000Z","dependencies_parsed_at":"2023-07-17T08:47:25.031Z","dependency_job_id":null,"html_url":"https://github.com/govindjeevan/Viterbi-Error-Correction","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/govindjeevan/Viterbi-Error-Correction","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/govindjeevan%2FViterbi-Error-Correction","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/govindjeevan%2FViterbi-Error-Correction/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/govindjeevan%2FViterbi-Error-Correction/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/govindjeevan%2FViterbi-Error-Correction/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/govindjeevan","download_url":"https://codeload.github.com/govindjeevan/Viterbi-Error-Correction/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/govindjeevan%2FViterbi-Error-Correction/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28559347,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T00:46:33.223Z","status":"online","status_checked_at":"2026-01-19T02:00:08.049Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-07T06:40:27.647Z","updated_at":"2026-01-19T03:01:23.298Z","avatar_url":"https://github.com/govindjeevan.png","language":"Matlab","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# CONVOLUTIONAL ENCODING  AND VITERBI DECODING\n\n## Problem Statement\nMATLAB code for  convolution code *(2, 1, 10)* decoding with **g1 = 110111** and **g2  =  11101101**  and  the  analysis  of  %  of  error  detection  and  correction  using **Viterbi decoding** and path metric.\n\n\n# Project Contributors\n\n- **Govind Jeevan**, https://github.com/govindjeevan/\n\n-  **Darshan D V**, darshandv10@gmail.com\n\n## File/Function Sequence\nThe sequence of files/functions called during execution.\n\u003e\n![Function Sequence](https://image.ibb.co/d1mqYS/Function_Sequence.png)\n\n\u003e The Purpose of each file is provided in the yellow note boxes.\n\n## Execution\n\nOpen the ***main.m*** file in MATLAB.\nInput the maximum length of data word to be considered.\n\n    maxlength=3;        % MAXIMUM BIT SIZE OF DATAWORDS CONSIDERED\nChange the maximum number of errors to be generated in testing.\n\n    maxerror=4; % MAXIMUM NUMBER OF ERROR BITS TO BE INTRODUCED\n\nRun the file. \n\u003e ( Ctrl + Enter )  [ After selecting code windows ]\n\nAlternatively, use the ***wholecode.m*** file to view all the code in one file and to work on a **single code word** at a time\nChange the input to the desired codeword\n\n    input=[1  0  1];\nChange the maximum number of errors to be generated in testing.\n\n    maxerror=4; % MAXIMUM NUMBER OF ERROR BITS TO BE INTRODUCED\n\nRun the file. \n\u003e ( Ctrl + Enter )  [ After selecting code windows ]\n\n\n\n## Results\n\nThe initial runs were on a lower order polynomial **g1=1111** and **g2=1101** with **( 2, 1, 4 )**\n![enter image description here](https://i.imgur.com/7M498X2.jpg)\n\nAfter acheiving reasonable success using this lower polynomial, whose trellis diagram was comprehensible we moved to the higher polynomials **g1 = 110111** and **g2  =  11101101**   with **( 2, 1, 4 )**.\n\n\u003e This Trellis Diagram would have 1024 states !\n\nWe then ran it for larger number of error bits and received the following graphs after a considerabe amount  of processing time.\n\n![enter image description here](https://i.imgur.com/aTTPvwS.jpg)\n\n\u003e And a lot of processing time for this\n\n![enter image description here](https://i.imgur.com/fTLVISO.jpg)\n\nSo far, we considered only a single codeword and randomly induced errors of variable length. Inorder to get a more solid and general consensus of the efficiency of our algorithm, we considered different datawords of variable length, and introduced all possible errors in the encoded codeword.\n\n**Total Error Words Generated**\n\n|No of Error Bits| 1 | 2  | 3 | 4 |\n--|--|--|--|--|\n| [ 1 ] | 22 | 231  | 1540 | 7315 |\n| [ 0 1 ]| 24 |  276 | 2024 | 10626 |\n|[ 1 0 ]| 24 | 276 | 2024 | 10626 |\n\n\n**Percentage of Succesful Correctons**\n\n|No of Error Bits| 1 | 2  | 3 | 4 |\n--|--|--|--|--|\n| [ 1 ] | 90.9091 | 75.7576  | 56.2338 | 36.8831 |\n| [ 0 1 ]| 91.6667 |  78.2609 | 59.9308| 40.1468 |\n|[ 1 0 ]| 91.6667 | 78.2609 | 59.9308 | 48.1468 |\n\n![enter image description here](https://image.ibb.co/eixBa7/3D_Plot.jpg)\n\n## Limitations\n\nThe code takes a lot of processing time when the number of encoded bits exceed a certain limit, as the graph traversal algorithm will have to traverse through a matrix of size 1024 X sizeof(encoded).\nThe viterbi algorithm fails to satisfactorily correct codewords with more than 4 error bits.\n## Final Words\n\nThank you for patiently going through the project ( That's 550+ lines of code! ).\nIt was a good experience working out the implementation of Trellis generation and Viterbi Algorithm, for which a graph algorithm similar to **djikstra's** was used after failing at a recursive approach.\nTried really really hard along the recursive lines, but the graph algorithm repeatedly enqueing and dequeueing states was the more suitable and efficient approach after all.\nWe gained a lot of insight about error correction mechanism and it's capabilities by being able to monitor the process so repeatedly.\n\n\u003e If the set of errorwords runt through Viterbi algorithm, is the set of all possible words of the same size as the encoded word, then the total number of cases in which correction is possible remains the same. That is,\n\u003e **The  Percent correction rate is constant for the algorithm for a codeword**\n\u003e\n\nMATLAB made the coding more easier and harder at the same time. \nThe project is open to bug fixes and optimizations in the future.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgovindjeevan%2Fviterbi-error-correction","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgovindjeevan%2Fviterbi-error-correction","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgovindjeevan%2Fviterbi-error-correction/lists"}