The output of the FSM belongs to the set {0,1,2,3}. The Viterbi decoder requires a vector of size 4 for each FSM symbol. So if the output of the FSM is [0,3,3,2,1,0] (6 symbols) then you need to provide the Viterbi decoder with a stream of 6 x 4 floats, each indicating the "distance" between the "received" signal and each of the 4 symbols in the alphabet. If you want to simulate a noiseless transmission, the input to the viterbi should look like: [0 a a a a a a 0 a a a 0 a a 0 a a 0 a a 0 a a a ] where a is any positive number.
The simplest way to implement this is to setup a lookup table (in gnuradio is called chunks_to_symbols of length 4 and dimensionality 4) so that 0 maps to [0 a a a] 1 maps to [a 0 a a] 2 maps to [a a 0 a] 3 maps to [a a a 0] after the encoder and before the Viterbi decoder. Achilleas On Sat, Jun 4, 2011 at 5:58 AM, smith mark <smith.mark1...@gmail.com> wrote: > Hi Achilleas, > I hope that you are fine. I want to implement convolutional coding using the > trellis block. I don't want to use any modulation scheme or anything else > after the encoder. The flow graph I want is shown below > vector source---->trellis encoder----> viterbi or any decoder------->sink > Part of the code is shown below > ---------------------------------------------------------------------------- > src_d = (1,0,1,0,0,0,1,1,0,0,1) > sorc = gr.vector_source_b (src_d) //source > encoder = trellis.encoder_bs(f,0) //encoder > s2f= gr.short_to_float() > dec=trellis.viterbi_s(f,len(src_d),0,-1) //decoder > dst = gr.vector_sink_s () //sink > tb.connect (sorc,encoder,s2f,dec,dst) > return(dst.data()) > ---------------------------------------------------------------------------- > When I run the above flow graph I get nothing just empty, ( ), list. > I am using "awgn1o2_4.fsm" file. I got the correct result after encoder. I > can't use the trellis.metric or trellis.viterbi_combined_X to implement > decoder as I am not using any modulation :( . > Please help me in this ?? > Regards > Smith > _______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio