From: Ant_Magma on
I'm simulating an OFDM transceiver to be later converted and
implemented on a C6713 DSK.
I'm currently facing a problem with the simulation and i'm at my wits
end trying to figure
out what is wrong. Thus i'm really hoping you guys can lend me some
help otherwise i can't
proceed anymore...

Here are 2 pictures of my OFDM simlation in Simulink. Pic1 is the model
with the
convolutional encoder, viterbi decoder, BPSK mod & demod and the OFDM
transceiver. Pic2 is without the encoder/decoder

(both pics size <50k)
Pic1
http://geocities.com/antonio_magma/public/pic1.gif

Pic2
http://geocities.com/antonio_magma/public/pic2.gif

I'm generating 12 bits in a frame (Pic1) and encode with the 1/2
convolutional encoder with
its default setting "poly2trellis(7, [171 133])", the 24 complex
numbers generated by BPSK
are placed on to the carrier bins with symmetric conjugate and are
padded in this format:

(64 IFFT)
1(DC) 2~5(0) 6~29(data) 30~32(0) 33(Nyquist,0) 34~36(0) 37~60(conjugate
data) 61~64(0)

The "Input is conjugate symmetric" parameter in the IFFT block is
ticked so that it'll
produce at real output. Then a 16 sample cyclic prefix is added,
producing a 80 sample
output.

At the receiver, the inverse is performed. At the remove zero padding
block, only the
samples 6~29 are fed through since 37~60 is the complex conjugate and
are useless. Then it is demodulated and decoded with Viterbi decoder
having the same parameter "poly2trellis(7, [171 133])" with a traceback
depth of 35 (since based on Simulink's help, it says if coding is 1/2
then the traceback depth is about x5 of the constaint length which in
this case is 7).

The decision type is set to Hard Decision instead of Unquantized bcoz
if i use unquantized,
i would need an extra Unipolar to Bipolar converter which is not
necessary.

As you can see, i'm getting a BER of 0.5. However, when i tried
removing the convolutional
encoder and Viterbi decoder, set the Bernoulli to output 24 bits (so
that Tx & Rx will be
the same). I get zero errors! Which should mean that my OFDM
tranceivers are working
correctly. I have properly set the receiver delay parameter in the
Error rate calculation
block, 35 with the decoders and 0 without them.

I've checked the output of every single block and noticed that when i
place the
encoder/decoders, i get 35 zeros at the output of Viterbi (due to the
traceback path), then
the corrected bits. The first 12 bits are exactly the same as produced
by the Bernoulli
binary generator, however the rest after that 12 bits contains many
errors! That's why i'm
getting 0.5 BER.

But the question is why is my Viterbi producing such an output? Please
help, i can't
proceed anymore if i can't figure this out...i'm this close to killing
myself

PS: I've attached my OFDM model in Simulink for reference.
http://geocities.com/antonio_magma/public/ofdm.zip

From: Don Orofino on
Hi Antonio,

> But the question is why is my Viterbi producing such an output? Please
> help, i can't
> proceed anymore if i can't figure this out...i'm this close to killing
> myself
>
> PS: I've attached my OFDM model in Simulink for reference.
> http://geocities.com/antonio_magma/public/ofdm.zip

Please don't go jumping off a trellis or anything - I'm sure you're pretty
close! I've forwarded your model to some comms engineers here. Good idea
placing the Simulink model on your web page...

--Don


"Ant_Magma" <vcteo1(a)gmail.com> wrote in message
news:1133915900.964903.25450(a)f14g2000cwb.googlegroups.com...
> I'm simulating an OFDM transceiver to be later converted and
> implemented on a C6713 DSK.
> I'm currently facing a problem with the simulation and i'm at my wits
> end trying to figure
> out what is wrong. Thus i'm really hoping you guys can lend me some
> help otherwise i can't
> proceed anymore...
>
> Here are 2 pictures of my OFDM simlation in Simulink. Pic1 is the model
> with the
> convolutional encoder, viterbi decoder, BPSK mod & demod and the OFDM
> transceiver. Pic2 is without the encoder/decoder
>
> (both pics size <50k)
> Pic1
> http://geocities.com/antonio_magma/public/pic1.gif
>
> Pic2
> http://geocities.com/antonio_magma/public/pic2.gif
>
> I'm generating 12 bits in a frame (Pic1) and encode with the 1/2
> convolutional encoder with
> its default setting "poly2trellis(7, [171 133])", the 24 complex
> numbers generated by BPSK
> are placed on to the carrier bins with symmetric conjugate and are
> padded in this format:
>
> (64 IFFT)
> 1(DC) 2~5(0) 6~29(data) 30~32(0) 33(Nyquist,0) 34~36(0) 37~60(conjugate
> data) 61~64(0)
>
> The "Input is conjugate symmetric" parameter in the IFFT block is
> ticked so that it'll
> produce at real output. Then a 16 sample cyclic prefix is added,
> producing a 80 sample
> output.
>
> At the receiver, the inverse is performed. At the remove zero padding
> block, only the
> samples 6~29 are fed through since 37~60 is the complex conjugate and
> are useless. Then it is demodulated and decoded with Viterbi decoder
> having the same parameter "poly2trellis(7, [171 133])" with a traceback
> depth of 35 (since based on Simulink's help, it says if coding is 1/2
> then the traceback depth is about x5 of the constaint length which in
> this case is 7).
>
> The decision type is set to Hard Decision instead of Unquantized bcoz
> if i use unquantized,
> i would need an extra Unipolar to Bipolar converter which is not
> necessary.
>
> As you can see, i'm getting a BER of 0.5. However, when i tried
> removing the convolutional
> encoder and Viterbi decoder, set the Bernoulli to output 24 bits (so
> that Tx & Rx will be
> the same). I get zero errors! Which should mean that my OFDM
> tranceivers are working
> correctly. I have properly set the receiver delay parameter in the
> Error rate calculation
> block, 35 with the decoders and 0 without them.
>
> I've checked the output of every single block and noticed that when i
> place the
> encoder/decoders, i get 35 zeros at the output of Viterbi (due to the
> traceback path), then
> the corrected bits. The first 12 bits are exactly the same as produced
> by the Bernoulli
> binary generator, however the rest after that 12 bits contains many
> errors! That's why i'm
> getting 0.5 BER.
>
> But the question is why is my Viterbi producing such an output? Please
> help, i can't
> proceed anymore if i can't figure this out...i'm this close to killing
> myself
>
> PS: I've attached my OFDM model in Simulink for reference.
> http://geocities.com/antonio_magma/public/ofdm.zip
>


From: Martin Clark on
The problem is mixed sample times in the OFDM frame assembly (which causes
the Error Rate Calculation block to compare data signals with different
sample rates). In the DSP Constant blocks "DC" and "Nyquist", set the frame
period to inf. The model will then use a single frame rate.

--Martin Clark, Comms Development, The MathWorks


"Don Orofino" <dorofino(a)verizon.net> wrote in message
news:I5slf.3290$605.2831(a)trndny09...
> Hi Antonio,
>
>> But the question is why is my Viterbi producing such an output? Please
>> help, i can't
>> proceed anymore if i can't figure this out...i'm this close to killing
>> myself
>>
>> PS: I've attached my OFDM model in Simulink for reference.
>> http://geocities.com/antonio_magma/public/ofdm.zip
>
> Please don't go jumping off a trellis or anything - I'm sure you're pretty
> close! I've forwarded your model to some comms engineers here. Good idea
> placing the Simulink model on your web page...
>
> --Don
>
>
> "Ant_Magma" <vcteo1(a)gmail.com> wrote in message
> news:1133915900.964903.25450(a)f14g2000cwb.googlegroups.com...
>> I'm simulating an OFDM transceiver to be later converted and
>> implemented on a C6713 DSK.
>> I'm currently facing a problem with the simulation and i'm at my wits
>> end trying to figure
>> out what is wrong. Thus i'm really hoping you guys can lend me some
>> help otherwise i can't
>> proceed anymore...
>>
>> Here are 2 pictures of my OFDM simlation in Simulink. Pic1 is the model
>> with the
>> convolutional encoder, viterbi decoder, BPSK mod & demod and the OFDM
>> transceiver. Pic2 is without the encoder/decoder
>>
>> (both pics size <50k)
>> Pic1
>> http://geocities.com/antonio_magma/public/pic1.gif
>>
>> Pic2
>> http://geocities.com/antonio_magma/public/pic2.gif
>>
>> I'm generating 12 bits in a frame (Pic1) and encode with the 1/2
>> convolutional encoder with
>> its default setting "poly2trellis(7, [171 133])", the 24 complex
>> numbers generated by BPSK
>> are placed on to the carrier bins with symmetric conjugate and are
>> padded in this format:
>>
>> (64 IFFT)
>> 1(DC) 2~5(0) 6~29(data) 30~32(0) 33(Nyquist,0) 34~36(0) 37~60(conjugate
>> data) 61~64(0)
>>
>> The "Input is conjugate symmetric" parameter in the IFFT block is
>> ticked so that it'll
>> produce at real output. Then a 16 sample cyclic prefix is added,
>> producing a 80 sample
>> output.
>>
>> At the receiver, the inverse is performed. At the remove zero padding
>> block, only the
>> samples 6~29 are fed through since 37~60 is the complex conjugate and
>> are useless. Then it is demodulated and decoded with Viterbi decoder
>> having the same parameter "poly2trellis(7, [171 133])" with a traceback
>> depth of 35 (since based on Simulink's help, it says if coding is 1/2
>> then the traceback depth is about x5 of the constaint length which in
>> this case is 7).
>>
>> The decision type is set to Hard Decision instead of Unquantized bcoz
>> if i use unquantized,
>> i would need an extra Unipolar to Bipolar converter which is not
>> necessary.
>>
>> As you can see, i'm getting a BER of 0.5. However, when i tried
>> removing the convolutional
>> encoder and Viterbi decoder, set the Bernoulli to output 24 bits (so
>> that Tx & Rx will be
>> the same). I get zero errors! Which should mean that my OFDM
>> tranceivers are working
>> correctly. I have properly set the receiver delay parameter in the
>> Error rate calculation
>> block, 35 with the decoders and 0 without them.
>>
>> I've checked the output of every single block and noticed that when i
>> place the
>> encoder/decoders, i get 35 zeros at the output of Viterbi (due to the
>> traceback path), then
>> the corrected bits. The first 12 bits are exactly the same as produced
>> by the Bernoulli
>> binary generator, however the rest after that 12 bits contains many
>> errors! That's why i'm
>> getting 0.5 BER.
>>
>> But the question is why is my Viterbi producing such an output? Please
>> help, i can't
>> proceed anymore if i can't figure this out...i'm this close to killing
>> myself
>>
>> PS: I've attached my OFDM model in Simulink for reference.
>> http://geocities.com/antonio_magma/public/ofdm.zip
>>
>
>


From: Ant_Magma on
Bless you Don :D

Thx 4 ur reply Martin.....
I've did noticed the different sample colors in my model but i didn't
thought much about it. You mentioned:

>In the DSP Constant blocks "DC" and "Nyquist", set the frame
>period to inf. The model will then use a single frame rate.

Did u mean sample time?
I can't find any 'frame period' parameter in the Constant parameters
(I'm looking at the 'constant' help at mathworks.com, the computer i'm
using now doesnt have matlab)

And do i need to set the Output paramter to 'Frame-based'? Since i'm
operating on a column vector and in my Bernoulli i've set it to output
12 bits/frame?

From: Ant_Magma on
Bless you Don :D

Thx 4 ur reply Martin.....
I've did noticed the different sample colors in my model but i didn't
thought much about it. You mentioned:

>In the DSP Constant blocks "DC" and "Nyquist", set the frame
>period to inf. The model will then use a single frame rate.

I've checked the help for Constant at mathworks.com. I have to set the
Output to 'Frame-based' then Sample time will change to Frame period...

Since i dun have matlab in this computer, i'll try it when i get back
and feedback the results later...

Another question, why set it to inf? Since my bernoulli produces 12
bits/frame, why not set it to 12 instead of inf?