Skip to content

Commit e08c1f6

Browse files
committed
Pads short PDCCH payloads with zeros, to increase their length to 12. The decoder treats the padded bits as known bits, in order to improve the error correction.
1 parent 43394ef commit e08c1f6

6 files changed

Lines changed: 367 additions & 20 deletions

File tree

PDCCH_decoder.m

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
% ln(P(bit=0)/P(bit=1)).
1212
%
1313
% A should be an integer scalar. It specifies the number of bits in the
14-
% information bit sequence, where A should be less than E and should be
15-
% no greater than 200.
14+
% information bit sequence, where A should be in the range 1 to 140.
1615
%
1716
% L should be a scalar integer. It specifies the list size to use during
1817
% Successive Cancellation List (SCL) decoding.
@@ -43,9 +42,6 @@
4342

4443
addpath 'components'
4544

46-
if A < 12
47-
error('polar_3gpp_matlab:UnsupportedBlockLength','A should be no less than 12.');
48-
end
4945
if A > 140
5046
error('polar_3gpp_matlab:UnsupportedBlockLength','A should be no greater than 140.');
5147
end
@@ -72,7 +68,12 @@
7268
P2 = 3;
7369

7470
% Determine the number of information and CRC bits.
75-
K = A+P;
71+
if A < 12
72+
% a has been padded with zeros to increase its length to 12
73+
K = 12+P;
74+
else
75+
K = A+P;
76+
end
7677

7778
% Determine the number of bits used at the input and output of the polar
7879
% encoder kernal.
@@ -90,5 +91,18 @@
9091
% Get the 3GPP information bit pattern.
9192
info_bit_pattern = get_3GPP_info_bit_pattern(K, Q_N, rate_matching_pattern, mode);
9293

93-
% Perform Distributed-CRC-Aided polar decoding.
94-
a_hat = DS1CA_polar_decoder(f_tilde,crc_polynomial_pattern,RNTI,crc_interleaver_pattern,info_bit_pattern,rate_matching_pattern,mode,L,min_sum,P2);
94+
if A < 12
95+
% We know that a has been padded with zeros
96+
a_tilde = [NaN(1,A),zeros(1,12-A)];
97+
98+
% Perform Distributed-CRC-Aided polar decoding.
99+
a_hat = DS1CKA_polar_decoder(f_tilde,crc_polynomial_pattern,RNTI,crc_interleaver_pattern,info_bit_pattern,rate_matching_pattern,mode,L,min_sum,P2,a_tilde);
100+
101+
if ~isempty(a_hat)
102+
% Remove the padding
103+
a_hat = a_hat(1:A);
104+
end
105+
else
106+
% Perform Distributed-CRC-Aided polar decoding.
107+
a_hat = DS1CA_polar_decoder(f_tilde,crc_polynomial_pattern,RNTI,crc_interleaver_pattern,info_bit_pattern,rate_matching_pattern,mode,L,min_sum,P2);
108+
end

PDCCH_encoder.m

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
% order to obtain the encoded bit sequence e.
77
%
88
% a should be a binary row vector comprising A number of bits, each
9-
% having the value 0 or 1. A should be in the range 1 to 200.
9+
% having the value 0 or 1. A should be in the range 1 to 140.
1010
%
1111
% E should be an integer scalar. It specifies the number of bits in the
1212
% encoded bit sequence, where E should greater than A.
@@ -39,11 +39,9 @@
3939
end
4040

4141

42+
4243
A = length(a);
4344

44-
if A < 12
45-
error('polar_3gpp_matlab:UnsupportedBlockLength','A should be no less than 12.');
46-
end
4745
if A > 140
4846
error('polar_3gpp_matlab:UnsupportedBlockLength','A should be no greater than 140.');
4947
end
@@ -54,8 +52,14 @@
5452
crc_polynomial_pattern = [1 1 0 1 1 0 0 1 0 1 0 1 1 0 0 0 1 0 0 0 1 0 1 1 1];
5553
P = length(crc_polynomial_pattern)-1;
5654

57-
% Determine the number of information and CRC bits.
58-
K = A+P;
55+
% If a contains fewer than 12 bits, increase its length to 12 by padding it
56+
% with zeros
57+
if A < 12
58+
a = [a,zeros(1,12-length(a))];
59+
K = 12+P;
60+
else
61+
K = A+P;
62+
end
5963

6064
% Determine the number of bits used at the input and output of the polar
6165
% encoder kernal.

PUCCH_decoder.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@
77
%
88
% f_tilde should be a real row vector comprising G number of Logarithmic
99
% Likelihood Ratios (LLRS), each having a value obtained as LLR =
10-
% ln(P(bit=0)/P(bit=1)).
10+
% ln(P(bit=0)/P(bit=1)), where G should be no greater than 8192 if A<360
11+
% and no greater than 16384 if A>=360.
1112
%
1213
% A should be an integer scalar. It specifies the number of bits in the
13-
% information bit sequence, where A should be less than G.
14+
% information bit sequence, where A should be in the range 12 to 1706.
1415
%
1516
% L should be a scalar integer. It specifies the list size to use during
1617
% Successive Cancellation List (SCL) decoding.

PUCCH_encoder.m

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
% order to obtain the encoded bit sequence f.
66
%
77
% a should be a binary row vector comprising A number of bits, each
8-
% having the value 0 or 1.
8+
% having the value 0 or 1, where A should be in the range 12 to 1706.
99
%
10-
% E should be an integer scalar. It specifies the number of bits in the
11-
% encoded bit sequence, where G should be greater than A.
10+
% G should be an integer scalar. It specifies the number of bits in the
11+
% encoded bit sequence, where G should be no greater than 8192 if A<360
12+
% and no greater than 16384 if A>=360.
1213
%
1314
% f will be a binary row vector comprising G number of bits, each having
1415
% the value 0 or 1.

components/DCKA_polar_decoder.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
function a_hat = DCKA_polar_decoder(e_tilde, crc_polynomial_pattern, crc_interleaver_pattern, info_bit_pattern, rate_matching_pattern, mode, L, min_sum, P2, a_tilde)
22
% DCKA_POLAR_DECODER Distributed-CRC-and-Known-bit-Aided (DCKA) polar decoder.
3-
% a_hat = DCKA_POLAR_DECODER(e_tilde, crc_polynomial_pattern, crc_interleaver_pattern, info_bit_pattern, rate_matching_pattern, mode, L, min_sum, P2)
3+
% a_hat = DCKA_POLAR_DECODER(e_tilde, crc_polynomial_pattern, crc_interleaver_pattern, info_bit_pattern, rate_matching_pattern, mode, L, min_sum, P2, a_tilde)
44
% decodes the encoded LLR sequence e_tilde, in order to obtain the
55
% recovered information bit sequence a_hat.
66
%

0 commit comments

Comments
 (0)