Biomedical Engineering Reference
In-Depth Information
End of Chapter Appendix 4
The algorithm steps for BER and PE estimation is given below:
i = byte number in temporary data file (source);
j = byte number in final data file (destination);
k = bit error index;
p = packet index;
k1 = missed packet index;
x = originating array in temporary data file
y = generated array in final data file;
n = packet number array;
i = 1; p =1; j = 1
1. if x(i) = 'sync word', skip step 2
2. i= i+1 ; go to step1
3. i = i + 1;
4. n(p) = x(i)
5. if p = 1 go to step 8
6. if n(p) - n(p-1)
1go to step 8
7. k1 = k1 + 1;
% missed packets counter
8. i= i + 1;
9. y(j) = x(i)
10. if j = 32; go to step 13
11. i= i + 1; j = j + 1;
12. go to step 9
13. i= i + 1; j= j + 1
14. if x(i) = 0, go to step 16
15. k = k + 1;
% byte error
16. p= p + 1;
17. Packet complete, go to step 1 for next packet
Search WWH ::




Custom Search