Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Help me fix a convolutional code to see the BER curve

Status
Not open for further replies.

aliazmat

Banned
Member level 4
Joined
Mar 14, 2008
Messages
76
Helped
5
Reputation
10
Reaction score
2
Trophy points
1,288
Activity points
0
friends,

I am simulating a simple awgn channel with convolutional code but the code which I have developed is not working ..plz need some help....i want to see BER curve

code is

clc;
clear all;
N=1000;
tx_data=ones(1,N); %round(rand(1,N));
snr_db=[-10:2.5:15];
snr_linear=(10.^(snr_db/10));

t = poly2trellis([4 3],[4 5 17;7 4 2]); % Define trellis.
conv_enc_data = convenc(tx_data,t); % Encode a string of ones.
tb = 2; % Traceback length for decoding
pe=zeros(size(snr_db)); % initliaze pe vector

for i=1:size(snr_db,2)
sigma=1/sqrt(snr_linear(1,i));
nois=1/sqrt(2)*(randn(1,size(conv_enc_data,2))+j*randn(1,size(conv_enc_data,2)));
noise = nois*sigma;

rx_data = conv_enc_data + noise; % add awgn

detced_bits = (mean(rx_data,1)>=0);
decoded = vitdec(detced_bits,t,tb,'trunc','hard'); % Decode.
nr_of_bit_err = sum(not(decoded==tx_data));
pe(i)=nr_of_bit_err/N;
end
semilogy(snr_db,pe)
 

Re: convolutional code

Its hard to detect errors in someone's else program but here is a program i have of coonvolutional coding with MPSK modulation that might come in use.

By the way tell me how to chose the values in "poly2trellis([4 3],[4 5 17;7 4 2])" and can u make a conversion of codes given in Parity check matrix into the form required by this poly2trellis function?
 

    aliazmat

    Points: 2
    Helpful Answer Positive Rating

convolutional code

Its a convolutional coding program with MPSK modulation and hard-decision decoding. It generates a BER performance graph where the blue curve indicates the uncoded system while the red curve indicates the convolutionally coded system.
 

Re: convolutional code

omhr..........can u pls suggest me how i use ur code for 16 or 8qam.pls reply quickly
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top