# Blind Recognition of Binary BCH Codes for Cognitive Radios

Authors: Jing Zhou; Zhiping Huang
Journal: Mathematical Problems in Engineering
 (2016)

---

## Abstract

A novel algorithm of blind recognition of Bose-Chaudhuri-Hocquenghem (BCH) codes is proposed to solve the problem of Adaptive Coding and Modulation (ACM) in cognitive radio systems. The recognition algorithm is based on soft decision situations. The code length is firstly estimated by comparing the Log-Likelihood Ratios (LLRs) of the syndromes, which are obtained according to the minimum binary parity check matrixes of different primitive polynomials. After that, by comparing the LLRs of different minimum polynomials, the code roots and generator polynomial are reconstructed. When comparing with some previous approaches, our algorithm yields better performance even on very low Signal-Noise-Ratios (SNRs) with lower calculation complexity. Simulation results show the efficiency of the proposed algorithm.


---

## Body

## 1. Introduction

Adaptive Coding and Modulation (ACM) technique is one of the most important techniques of cognitive radio networks for the intelligent communications [1–4]. A typical intelligent communication system based on ACM is shown in Figure 1 [5]. The transmitter chooses transmission power, modulation mode, and channel coding parameters according to the channel quality to adapt the electromagnetism environment. Instead of fixed coding and modulation systems, the intelligent communication systems choose the optimized transmission parameters to increase the flexibility and spectrum efficiency and achieve high reliability and quality of service (QoS). This fact requires that a cognitive radio receiver should be an intelligent receiver able to adapt itself to a specific transmission context and to blindly estimate the coding and modulation parameters from the received data streams.Figure 1
An intelligent communication system.In this paper, we consider the problem of blind identification of channel coding parameters for the intelligent communication systems which use binary BCH codes. We assume that the estimation of signal power and modulation mode is achieved. The transmitters might choose the optimized code length and code rate according to the channel conditions to get the best balance between information transmission speed and fault tolerance. But the receivers always could not get the channel coding parameters directly. In [6, 7], the authors propose a reliable channel to transmit the modulation and coding parameters. If such a reliable channel is difficult to build, the receivers could not obtain the transmitted information from the received data streams. And if a communication system contains multiple users, the building of those reliable channels is complex. In recent years, the blind recognition algorithms of channel coding parameters are considered by some researchers. In [8–15], some blind recognition methods of convolutional codes are proposed. But these approaches are not suitable for BCH codes. In [16], a blind recognition of binary linear block codes for the low code rate situations is presented. It has a good performance in high Bit Error Rate (BER) case but could not be suitable for high code rate situations. In [17, 18], the authors propose a blind recognition algorithm of BCH codes based on roots information dispersion entropy and roots statistic. The algorithm could achieve correct recognition in both high and low code rate situations with the BER of 10−2, but the calculation complexity is large, especially when the code length is long. The authors of [19] improve that algorithm proposed in [18] to reduce the calculation complexity and make the recognition procedure be much fast.In this paper, we propose a new algorithm to recognize the BCH codes parameters for the soft decision situations. Although the previous works have good performance, the main base of those algorithms is utilizing the algebraic properties of the codes in Galois Fields (GF) under hard decisions. The major drawback is low fault tolerance. When soft information about the channel output is available, the decoding performance is improved about 2~3 dB in soft decision situations [20]. In [21–24], the authors introduce a Maximum A Posteriori Probability (MAP) approach to achieve blind frame synchronization of some error-correcting codes and yield better performance than previous hard decision ones. Inspired by this idea and those previous works, we develop a soft-decision-based algorithm to achieve blind recognition of BCH codes for a cognitive radio system without building a reliable channel to transmit coding parameters.The paper is organized as follows. Section2 introduces the principle of the proposed recognition algorithm for BCH codes. In Section 3, we present the estimation method of code length. Section 4 shows the reconstruction algorithm of parity check matrix. Finally, the simulation results and conclusions are shown in Sections 5 and 6, respectively.


## 2. Principles

According to the algebraic properties of BCH codes, if no error occurs in transmission, all syndromes equal zeros. The syndromes are calculated as follows [20]:(1)
S
=
S
1
,
S
2
,
…
,
S
n
r
T
=
H
×
C
r
.In (1), H is the parity check matrix, C
r is a block of received code, and n
r is the number of syndrome elements corresponding to H. If the block contains errors or H is not correct, not all the syndromes equal zeros. So when the parity check matrix H is correctly estimated, the probability of S
=
0 is larger than the case of incorrect H. Therefore, recognition of BCH codes is equivalent to maximizing the probability that all the syndrome elements equal zeros. In other words, it minimizes the Log-Likelihood Ratio (LLR) of the syndrome calculated using H:(2)
ϕ
H
=
log
⁡
P
r
S
H
≠
0
P
r
S
H
=
0
=
log
⁡
1
-
P
H
P
H
.In [21], the authors consider that for codes having a sparse parity check matrix the syndrome elements can be assumed to be independent and therefore(3)
P
H
=
P
r
S
H
1
,
S
H
2
,
…
,
S
H
n
r
=
0
=
∏
k
=
1
n
r
P
r
S
H
k
=
0
.It is difficult to apply (3) to BCH codes directly because the parity check matrix is not sparse. Jiang and Narayanan proposes an Adaptive Belief Propagation (ABP) method on Soft-Input-Soft-Output decoding of Reed Solomon (RS) codes [25]. The main idea is adapting the parity check matrix of the codes to the reliability of the received information bits at each iteration step of the iterative decoding procedure to reduce the impact of nonzero elements in the parity check matrix. This idea is employed in [23] to achieve blind frame synchronization of RS codes. The adaptation procedure reduces the impact of nonzero elements of parity check matrix on the independence of syndrome elements. In our work, we also utilize the adaptation algorithm introduced in [23, 25] before using (3).We let(4)
L
S
H
k
=
log
⁡
P
r
S
H
k
≠
0
P
r
S
H
k
=
0be the LLR of the kth syndrome element; we have(5)
P
r
S
H
k
=
0
=
1
1
+
e
L
S
H
k
.Using (3), (4), and (5), the LLR of (2) could be written as(6)
ϕ
H
=
log
⁡
∏
k
=
1
n
r
e
L
S
H
k
+
1
-
1
.∏
k
=
1
n
r
e
L
S
H
(
k
)
+
1 in (6) is much larger than 1, so(7)
ϕ
H
≈
∑
k
=
1
n
r
log
⁡
e
L
S
H
k
+
1
.According to [26], LLR of each syndrome element is(8)
L
S
H
k
=
-
1
u
k
+
1
tanh
-
1
⁡
∏
j
=
1
u
k
tanh
⁡
r
~
k
j
2
,where r
~
(
k
j
)
=
2
/
σ
2
r
(
k
j
) is the LLR of the k
jth received sample of a block and σ
2 is the variance of noise. u
k and k
j represent number of nonzero elements in the kth row of the adapted parity check matrix of the codes and the position of the jth nonzero element in the kth row. Note that here we transform the parity check matrix H to a binary pattern in G
F
(
2
) instead of G
F
(
2
m
) to ease the implementation of adaptation procedure and LLRs calculations. The transform approach is replacing the symbol elements of H in G
F
(
2
m
) by their binary column vector patterns. For example, a parity check matrix of BCH codes in G
F
(
2
3
) with code length 2
3
-
1
=
7 is(9)
H
=
α
6
α
5
⋯
α
1
1
α
18
α
15
⋯
α
3
1
.According to the coding theories [20], we replace the symbol α by the vector 0
1
0
T and other symbols are processed similarly. Than the parity check matrix can be written in G
F
(
2
) as follows:(10)
H
=
1
1
1
0
1
0
0
0
1
1
1
0
1
0
1
1
0
1
0
0
1
1
1
1
1
1
0
0
1
0
1
0
0
1
0
0
1
1
0
1
1
1
.The purpose of blind recognition is to estimate the code length and parity check matrixH with only knowledge of received streams. The proposed blind recognition procedure includes two steps. The code length is estimated firstly and after that code rate and H are reconstructed by searching the code roots.


## 3. Recognition of Code Length

In a cognitive radio system, though the transmitters choose optimized code length and code rate, we can limit the range of them to simplify the reconstruction complexity of the encoder parameters for cognitive receivers. We can limit the fact that transmitters send primitive BCH coded packets in regular code length of2
m
-
1 defined in G
F
(
2
m
) but not extended or shortened codes. And for each code length we limit the transmitters just using one primitive polynomial to encode the blocks. These limits do not affect the error-correcting abilities and spectrum efficiency and the cognitive receivers only need to estimate the code length in the set of(11)
P
=
2
m
-
1
∣
m
∈
Z
+
,
m
m
i
n
≤
m
≤
m
m
a
x
,and receivers do not need to search all primitive polynomials for the same code length.Before the code rate is confirmed, the number of rows of the parity check matrixH is unknown. Note that all primitive BCH codes have a root of primitive element in G
F
(
2
m
). According to this fact, we propose a minimum parity check matrix H
m
i
n corresponding to primitive root of the codes as follows:(12)
H
m
i
n
=
α
n
-
1
,
α
n
-
2
,
…
,
α
,
1
.For each code lengthl in the set defined by (11), there is only one primitive root α and one minimum parity check matrix H
m
i
n. The starting of a codeword could be confirmed by synchronization information and we assume that synchronization is achieved before code length estimation. Try to calculate the LLR of (7) using H
m
i
n in different code length l and estimate the code length by minimizing the LLR. We consider that for different code length the number of elements of syndromes and rows of parity check matrices is different, which affects the comparability of LLRs with different code length. To solve the problem, we modify the LLR of (7) and (8) as follows:(13)
ϕ
H
m
i
n
≈
1
m
∑
k
=
1
m
log
⁡
e
L
S
H
m
i
n
′
k
+
1
,
(14)
H
m
i
n
=
α
n
-
1
,
α
n
-
2
,
…
,
α
,
1
.In (13), H
m
i
n
′ is the adapted matrix of H
m
i
n using the adaptation algorithm proposed in [23]. The code length is estimated by the length value l that minimizes the LLR of the syndrome:(15)
l
^
=
arg
max
l
∈
P
⁡
∑
n
=
1
N
ϕ
n
H
m
i
n
∣
l
,where ϕ
n is the LLR of the nth block in the observation window of the received sequence which has N coded blocks. Estimation performance is improved when N increases.


## 4. Reconstruction of the Parity Check Matrix

When the code length is confirmed, the number of rows in the parity check matrixH is determined by code rate. After the processing of Section 3, the first row of a check matrix H is already gotten during the estimation of code length l. The other rows are in the styles as follows:(16)
H
=
α
n
-
1
α
n
-
2
⋯
α
1
α
3
n
-
1
α
3
n
-
2
⋯
α
3
1
α
5
n
-
1
α
5
n
-
2
⋯
α
5
1
⋮
⋮
⋮
⋮
⋮
.The number of rows inH equals the error-correcting capability t. Let H
i be the ith row of H and we consider the LLR:(17)
ϕ
H
i
=
∑
k
=
1
m
log
⁡
e
L
S
H
i
′
k
+
1
,
i
=
1,3
,
…
,
2
t
m
a
x
-
1
,where t
m
a
x is the maximum of error-correcting capability for all code rates with the code length l. If α
2
i
-
1 is a root of the code, ϕ
(
H
i
) is lower than that on incorrect roots. Therefore, the whole parity check matrix H could be estimated by comparing the LLRs of (17) on different values of i. Note that the root of BCH codes is consecutive, so for the codes with the error-correcting capacity t, all the LLRs ϕ
(
H
i
) corresponding to the roots α
i
(
i
≤
2
t
-
1
) should be lower than the others except the conjugate roots of every α
i
(
i
≤
2
t
-
1
). But two problems exist when using (17) directly. Firstly, not all the ranks of binary parity check matrices are equal to same value. For example, when m
=
6 and rank (
H
i
) = 3, H
i
′ is of the style as (18) after adaptation processing. Obviously, only the first 3 rows are valid for the calculation of LLR. This largely affects the comparability between LLRs of H
i
′ with different ranks:(18)
H
i
′
=
1
1
1
⋯
1
0
0
0
1
1
⋯
0
1
0
1
1
0
⋯
0
0
1
0
0
0
⋯
0
0
0
0
0
0
⋯
0
0
0
0
0
0
⋯
0
0
0
.A simple solution is modifying (17) to(19)
ϕ
H
i
=
1
rank
⁡
H
i
′
∑
k
=
1
n
r
log
⁡
e
L
S
H
i
′
k
+
1
,where the rank of H
i
′ is calculated in G
F
(
2
). Secondly, not every integer below t
m
a
x is a valid error-correcting capability and at incorrect t, calculation of LLR is needless. For example, when m
=
6 and code length is 63, we just need to consider the LLRs with the assumptions of error-correcting capability t in the set T:(20)
T
=
1,2
,
3,4
,
5,6
,
7,10,11,13,15
.For the convenience of computer recognition, we propose the judgment of the code rate in the computer program by computing the criteria function as follows:(21)
λ
i
=
E
B
i
E
A
i
∑
n
=
1
N
ϕ
n
H
i
+
1
∑
n
=
1
N
ϕ
n
H
i
,where(22)
A
i
=
∑
n
=
1
N
ϕ
n
H
j
∣
j
≤
i
,
B
i
=
∑
n
=
1
N
ϕ
n
H
j
∣
j
>
i
,
j
∉
T
i
,and T
i is a set consisting of integers which are not larger than the maximum of the error-correcting capacity t
m
a
x and for any j
∈
T
i, α
j is a conjugate root of one of the code roots {
α
k
∣
k
≤
i
}.The error-correcting capacityt could be estimated by the one that maximizes λ
i:(23)
t
^
=
arg
max
t
∈
T
⁡
λ
t
.Finally, the parity check matrixH and code rate could be confirmed according to t
^.


## 5. Simulations

Computer simulation results of the proposed algorithm are shown in this section. In the simulations, we assume that the transmitter is sending a binary sequence of codewords and using a Binary Phase Shift Keying (BPSK) modulation. The propagation channel is corrupted by an Additive White Gaussian Noise (AWGN) with the varianceσ
n
2
=
N
0
/
2. For each configuration, the information symbols in the codes are randomly chosen. The simulations contain two parts: for code length estimation of Section 3 and parity check matrix reconstruction of Section 4. We also compare the performance of our algorithm with one of the previous ones. SNR affects the performance of code length estimations. Probabilities of fault recognition (PFR) of the code length for several codes on different SNRs are shown in Figure 2. The full curves represent the mean values of the statistical PFRs and the dotted lines are confidence intervals while the confidence level is 0.95. We also draw the performance of the algorithm proposed in [18, 19] in Figure 2 which is based on roots information dispersion entropy and roots statistic and we call it “RIDERS algorithm.”Figure 2
Special property of the rootα
2
m
-
1
=
1.In the simulations, we choose statistical samples including 50 blocks. The curves show that our proposed algorithm yields a better performance. The curves of PFR of our proposed algorithm fall rapidly when SNR increases and the PFR is much lower than that of the RIDERS algorithm. Note that the RIDERS algorithm could not estimate the code length for the BCH (127, 71) codes; even SNR is high. The authors of [18] ignore the fact that for a binary BCH code the distribution of the root α
0
=
1 in G
F
(
2
m
) is different from that of other roots because α
0
=
1 is a root of a codeword just when the number of ones in the codeword is even. Therefore, the distribution of roots information dispersion entropy on incorrect code length is not uniform. The ununiform distribution affects the roots information dispersion entropy function Δ
H proposed in [18]. Except for modifying the definition of Δ
H, another simple solution is ignoring the checking of the root α
0
=
1. We also mark the confidence intervals for each curve in the figure, where ±
c
%
@
α means the confidence interval is ±
c
% while the confidence level is α. We also simulate the modified RIDERS algorithm on the code length estimation of BCH (127, 71) codes, legend of which is “m-RIDERS BCH (127, 71)” codes in Figure 2. Even so, our algorithm still performs better.We also compare the calculation complexity of the proposed algorithm and the RIDERS algorithm in [18] under the same computer hardware and software environment; the results are shown in Figure 3. We draw the statistics of the elapsed time on different searching ranges of code length {
l
=
2
m
-
1
∣
3
≤
m
≤
m
m
a
x
}. Elapsed time of our algorithm is much lower and raises more slowly when m
m
a
x increases.Figure 3
Comparing of elapsed time between proposed and RIDERS algorithms.After estimating of the code lengthl, we can search the code roots and reconstruct the parity check matrix via (21) and (23). Figure 4 shows the sum of N LLRs ϕ
(
H
i
) defined by (19) on different roots α
i when recognizing the BCH (63, 51) codes. Also we choose N
=
50 in the simulations. For each conjugate roots group, we only calculate one ϕ
(
H
i
) on the root which has the lowest power. For example, {
α
3
,
α
6
,
α
12
,
α
24
,
α
48
,
α
33
} is a possible group of conjugate roots of the codes with length 2
6
-
1
=
63, and we just consider ϕ
(
H
i
) on α
3. Thus, we draw the LLRs ϕ
(
H
i
) on the roots α
1, α
3, α
5, α
7, α
9, α
11, α
13, α
15, α
21, α
23, α
27, and α
31. Corresponding index serials i in Figure 4 are consecutive from 1 to 12. The received stream is disturbed by an AWGN with E
s
/
N
0
=
4dB and BER = 10
-
1.92. ϕ
(
H
1
) and ϕ
(
H
2
) are obviously lower than the others, so we could consider the unconjugate roots of the code are α
1 and α
3, so the error-correcting capacity t is estimated to be 2 and the check matrix is reconstructed as follows:(24)
H
=
α
62
α
61
⋯
α
1
α
3
×
62
α
3
×
61
⋯
α
3
1
.Figure 4
LLRs on different code roots of the BCH (63, 51) codes.Then the code parameters are completely confirmed. The stems ofλ
i defined by (21) shown in Figure 5 also denote the estimation of the error-correction capability t
=
2 of the codes as λ
2 is maximum. The probabilities of fault recognition (PFR) of parity check matrices of the proposed algorithm on different noise levels are shown in Figure 6. We draw the curves of PFR for the check matrix recognition of BCH (63, 51), BCH (63, 30), and BCH (127, 71) codes. As E
s
/
N
0 increased, the curves fall rapidly. Also we draw the statistical confidence intervals (while confidence level is 0.95) by dotted lines for each curve in the figure. These show an excellent consistency of the proposed method. When E
s
/
N
0
>
5dB, no fault recognition occurs for more than 200 000 simulation tests.Figure 5
Criteria functionλ
i of the BCH (63, 51) codes.Figure 6
Probabilities of fault recognition of parity check matrix on different SNRs.


## 6. Conclusions

A new blind recognition of BCH codes for cognitive radios in soft decision situation is presented. The code length is estimated firstly by checking the LLRs of the minimum parity check matrix and the code rate and whole check matrix are reconstructed by searching code roots. Simulations show that our proposed blind recognition algorithm yields better performance than one of the previous ones.



---

*Source: 3013504-2016-01-06.xml*