| Step 1: input parameters |
| n, k, L, number of symbols, M, N, S, bits per symbol |
| Step 2: generation of trellis code polynomial |
| Calculate the number of constellation points using the number of bits per symbol |
| Store the value of the symbol that needs to be transmitted in N |
| Define the generator polynomial |
| Initialize the Codeword, Next state, and previous state matrices |
| Apply the random interleaver for removing the burst errors |
| Step 3: apply modulation of the Type-64 QAM |
| Step 4: defining the simulation parameters |
| Total energy of the codeword, |
| Calculate the number of information bits = number of symbols |
| Calculate the number of coded bits = number of symbols |
| While () |
| Step 5: initialize the counters to store |
| Number of errors = error counts |
| Number of frame = frame count |
| Number of bits = bit count |
| Step 6: calculate SNR |
| |
| |
| While (error counts < 1000 and frame count ≤ 100) |
| Step 7: compute energy per bit |
| |
| Step 8: compute noise variance |
| |
| Step 9: apply the input bits |
| Input bits = round (rand (1, )) |
| Step 10: convert number of bits to symbols |
| Symbols = bits to the symbol (n, number of symbols, input bits) |
| Step 11: apply convolution encoding |
| Generate the transmitted signal |
| Step 12: calculate the received signal |
| |
| Step 13: apply the demodulation |
| |
| Step 14: apply decoding |
| |
| |
| |
| |
| |
| End |
| Step 15: calculate bit error rate |
| End |