Answered step by step
Verified Expert Solution
Question
1 Approved Answer
check values at each iteration compute next LFSR values. compute Syndrom % Decoder for Systematic (N,K) Cyclic Codes function M = CyclicDecoder (ReceivedCode, Polynomial,
check values at each iteration compute next LFSR values. compute Syndrom % Decoder for Systematic (N,K) Cyclic Codes function M = CyclicDecoder (ReceivedCode, Polynomial, ErrorPatternTable) You can generate ErrorPatternTable = syndtable (cyclgen (N, P, 'system')); function M = CyclicDecoder (R, P, T) Define N, K, DegPoly K = N = ; ; DegPoly = ; 4.4 Set initial value of Linear Feedback Shift Register LFSR zeros (1, N-K); for i 1 K end == feedback = ; % compute feedback str=sprintf('Input messag: %d, Current LFSR : %s, feedback %d', R (N-i+1), num2str(LFSR), feedback) ; disp(str) ; for j = end Deg Poly -1 : 2 LFSR shifting routine (same as encoder LFSR (1) = feedback ; disp(['Next LFSR:,num2str(LFSR) ]) ; SYN = index= ; % compute syndrome using Received remainder and LFSR value ; % get index value using SYN bit vector. i.e. [101] = 5 ErrorPattern = T (index+1, ); Uhat= Extract Message M = ... ; % Using ErrorPattern and Received Codedword, Correct R ;% Cut message only from the corrected Codeword >> C C = 1 0 0 1 0 1 1 >> Err= [ 0 0 0 0 0 0 1]; >> R mod (C + Err, 2) R = 1 0 0 1 0 1 0 >> Mhat = Cyclic Decoder (R, P, T) input message: 0, Current LFSR : [000], feedback : 0 Next LFSR: 0 0 0 input message : 1, Current LFSR: [000], feedback : 1 Next LFSR: 1 1 0 input message: 0, Current LFSR: [1 1 0], feedback : 0 Next LFSR : 0 1 1 input message : 1, Current LFSR : [0 1 feedback : 0 Next LFSR: 0 0 1 1], >> T = syndtable (cyclgen (N, P, 'system')) SYN = 1 0 1 T = SYN: [000] 0 0 [001] 0 1 [010] 0 1 0 000 0 0 0 0 [011] 0 0 1 [100] 1 0 0 0 0 [101] 0 0 0 0 [110] 0 0 0 1 0 0 [111] 0 0 0 0 0 1 ooooOOO ooooOOOH index = 0 5 0 1 0 E = 0 0 0 0 0 0 0 1 Mhat = 1 1 1
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started