11function main_FAR(code , A , E , L , min_sum , target_false_alarms , seed )
2- % PLOT_BLER_VS_SNR Plots Block Error Rate (BLER) versus Signal to Noise
3- % Ratio (SNR) for polar codes.
4- % plot_BLER_vs_SNR(code, A, E, L, min_sum, target_block_errors, target_BLER, EsN0_start, EsN0_delta, seed)
5- % generates the plots.
2+ % main_FAR calculates False Alarm Rate (FAR) for polar codes.
3+ % main_FAR(code, A, E, L, min_sum, target_false_alarms, seed)
64%
75% code should be a string. This identifies which encoder and decoder
86% functions to call. For example, if code is 'custom1', then the
@@ -30,25 +28,12 @@ function main_FAR(code, A, E, L, min_sum, target_false_alarms, seed)
3028% better error correction capability than the min-sum, but it has higher
3129% complexity.
3230%
33- % target_block_errors should be an integer scalar. The simulation of each
34- % SNR for each coding rate will continue until this number of block
35- % errors have been observed. A value of 100 is sufficient to obtain
31+ % target_false_alarms should be an integer scalar. The simulation of each
32+ % encoded block length will continue until this number of false
33+ % alarms have been observed. A value of 100 is sufficient to obtain
3634% smooth BLER plots for most values of A. Higher values will give
3735% smoother plots, at the cost of requiring longer simulations.
3836%
39- % target_BLER should be a real scalar, in the range (0, 1). The
40- % simulation of each coding rate will continue until the BLER plot
41- % reaches this value.
42- %
43- % EsN0_start should be a real row vector, having the same length as the
44- % vector of coding rates. Each value specifies the Es/N0 SNR to begin at
45- % for the simulation of the corresponding coding rate.
46- %
47- % EsN0_delta should be a real scalar, having a value greater than 0.
48- % The Es/N0 SNR is incremented by this amount whenever
49- % target_block_errors number of block errors has been observed for the
50- % previous SNR. This continues until the BLER reaches target_BLER.
51- %
5237% seed should be an integer scalar. This value is used to seed the random
5338% number generator, allowing identical results to be reproduced by using
5439% the same seed. When running parallel instances of this simulation,
@@ -68,9 +53,9 @@ function main_FAR(code, A, E, L, min_sum, target_false_alarms, seed)
6853
6954% Default values
7055if nargin == 0
71- code = ' custom1 ' ;
72- A = 16 ;
73- E = round( A ./[ 0.8333 0.7500 0.6666 0.5000 0.4000 0.3333 0.2500 0.2000 0.1666 0.1250 ]) ;
56+ code = ' PUCCH ' ;
57+ A = 32 ;
58+ E = [ 54 108 216 432 864 1728 3456 6912 13824 ] ;
7459 L = 1 ;
7560 min_sum = true ;
7661 target_false_alarms = 10 ;
0 commit comments