Lecture 11

IIT Kanpur July 201
20 followers
Aug 3, 2024
[Music]
okay welcome to the class
and what we are going to see today is
basically the rate matching idea of rate
matching what why this subblock is there
and how it is actually implemented in
the standard before we get into it a
quick recap of what we have seen till
now we have seen uh transer block
segmentation okay which is closely
coupled with the ldpc encoding okay
that's what we learned in the last two
classes and our running example has been
this user is allocated 70 prbs over a
slot of 14 symbols and the user is
allocated MCS 16 okay which has a code
rate of6 42 it is this information is
given in the table once MC 16 is
specified right and as soon as this is
decided Max layer sends a transer block
of size this much okay this has to be
calculated okay this is not some magic
number we'll calculate it later and so
this is the processing which this
transport block under goes as soon as it
is received at the physical layer
transport block CRC is added which is of
24 bits okay
and then what happens after this is
basically it is segmented into four four
different code blocks C is equal to four
that's what we uh understood in the last
class and if you look at the if you
dissect this what is this basically okay
so segmentation block it led to four
code block okay and each code block
which is of equal size which is
7744 okay plus this is with the filler
bit of 672
okay right so what is so this transfer
block gets segmented into four code
block and each code block contains 748
of actual payload 24 bit of code block
CRC and 672 the filler bit okay and this
is repeated for all the code blocks okay
except for one difference that the last
code block contains additional four
transfer block CRC right okay so saw all
this and we understood why filler bit
are required okay we discussed that in
detail and now so if you see this so
this is basically how much is the input
size for for the ldpc encoder okay ldpc
encoder this will be the input size 7744
so each code block of size 7744 will be
input to the ldpc encoder okay because
each this is the size of each of this
seg segmented code block okay and we saw
this also that ldpc encoder output okay
for each segmented code block how much
this is 66 into z c okay zc is the
lifting size okay right and what are
this in this case it turns out to be for
the example which we took okay it turns
out to be
352 right okay and what is this this is
the output okay for each segmented code
block this is the length of the output
okay okay and what it gives us is
basically the rate okay input is 7744
output is 23232 which is 66 zc okay and
what is this this is exactly
1x3 right okay this is what we saw till
the last class but what is user asked
for user as has asked for a Cod rate of
642 correct and you see this that this
ldpc encoder is not directly generating
this
rate okay and we'll understand why this
is not being generated in this way okay
in basically why this output is not
directly generated this rate okay so
actual Cod rate is this okay now user
has asked for this okay and then it
needs to be this one needs to generate
this code rate from what this ldpc
encoder has given okay right and keep
this in mind what is this this is rate
1x3 and this is rate point the 6 okay so
this rate is higher than this correct
okay this is 33 and this is 64 okay so
this rate is higher than this now one
question which obviously comes to our
mind is why like ldpc and coder is not
directly generating this rate right we
saw that in the MCS table okay there are
like 27 to 28 different Cod rates which
are specified now you will have have to
if you directly generate this if the
ldpc encoder directly generates this
then you'll have to design 27 or 28
different ldpc
encoders correct okay again it is an
like designing and implementing these 20
so many encoders is a non-trivial task
and it's going to take memory processing
power okay now this task is split
between two different modules okay okay
so what ldpc encoder does is it always
generates this mother code of rate 1x3
and there is another module okay which
will come later which generates this
rate higher rate or lower rate okay
that's what is rate matching okay that
module is basically
matches this
rate what is being generated here this
is rate 1x3 to the rate what is being
asked by the user correct that's why the
name rate matching module okay so and
we'll take so this is one example we are
considering where in the rate being
asked by the user is higher than what
the uh ldpc encoder is generating it
could happen other way around also okay
that the rate being asked by the user is
lower than
1x3 correct okay so we'll take these two
cases and see how this rate matcher is
designed to match these rates Okay so
5G chain which we have seen till now is
basically again the summary okay what is
happening transport block append this
transport block CRC segment it okay then
append this code block CRC then ldpc
encod okay if ldpc encoding is as I said
is generating the rate which the user
has asked you don't read need that
module of rate matching you can straight
away modulate it correct okay and then
at the receiver side opposite of this
process will happen when like there will
be demodulation there will be ldpc
decoding will be this validation of code
block CRC then because there's
segmentation you concatenate all these
blocks then validate the transport block
CC and pass it on to the back layer okay
but we see this there is a gap here okay
this is always 1 by3 and there's another
module which is basically rate matching
okay which which is required for this to
match this rate to the desired rate okay
right and we are going to understand how
this works okay we I just explained it
to you what is the need of it because we
have if this with this architecture
there is only one ldpc encoder similarly
we will see that there will be only one
ldpc decoder also right otherwise you'll
have to design ldpc decoders for all the
different rates you could do that
theoretically you could do that and
people do it if there is only one rate
defined in the system there are so many
rates okay right and writing ldpc
decoders of so many rates again is a
non-al task right ask the engineers who
are doing it they'll tell you even like
executing one takes his own sweet
time okay right so that's the idea you
conveniently split these tasks okay of
like matching the rate to the one
generated by the ldpc encoder okay which
is always 1x3 fine okay so we'll see
this how this works okay that's the idea
okay this class and the next class we
going to understand this part so this is
the reference and this is how it is
defined in the standard the rate
matching module okay I should tell you
this also please do not look the
standard for the receiver part okay
standard doesn't Define the receiver it
is only the transmitter which is defined
and you need to design your own receiver
that's that's a common misconception
people have that they start looking out
for the receiver part also okay that you
have to do as a communication engineer
on your own because if the modulation is
defined you should have studied
communication Theory to understand how
to demodulate it the qpsk demodulation
and it is not this is the primary reason
okay and the non-technical reason is
there's a lot of IPR
here where like people design their own
ldpc good ldpc decoders why should they
disclose it to you to any other
vendor right okay so I'll write a better
ldpc decoder and then my receiver will
work better give my mobile will give a
better
performance okay right similarly all of
them all of these modules I Implement
them in a cost effective way my mobile
is going to be
cheaper fine okay so with this let's
understand start understanding this rate
matching module okay so this is our
running example we need to match rate
1x3 to 642 that's the objective of this
class before we see how that happens
okay because user has allocated the 70
prbs let's recapture our notion of a prb
how many
resources one prb has 12 sub carriers
over one symbol and how many such
symbols are allocated to this user 14
symbols okay right so each each this
ofdm sub carrier is called a resource
element in 5G language okay so how many
such sub carriers will be there for this
user 12 into 14 168 sub carriers correct
okay now this is something I need to
tell you okay we will it will come later
out of these 168 subcarriers not all of
them are used for transmitting data okay
there are certain number of subcarriers
which are
reserved for sending pilots and what are
these pilot signals pilot signals are
basically you'll let's say you'll send
one pilot here you'll send one pilot
here you'll send one pilot here One
Pilot here okay and One Pilot in between
okay one configuration okay but what are
these pilot signals see users need to
estimate the channel before they can
estimate before they can detect the data
okay right now Pilots are these known
signals known to the receiver okay so
that it can estimate the channel from
these pilot signals okay how is it
different from data because data is not
known to the receiver the pilot signals
which are known to the receiver and
using those pilot signal receiver can
first estimate the channel okay then
only it goes ahead and detect the data
how is it actually done I'll teach you
later okay how Pilots are used for
estimating the channel that comes later
okay so the point here we are trying to
make is that not all the subcarriers are
used for transmitting data there are
certain subcarriers which are reserved
for sending pilots and in this case
there are six of them okay right so sub
carriers for transmitting data 162 Now
using this okay how many bits you can
transmit okay for these 70 prv this is
basically number of sub carriers which
you can use for transmitting data in one
PRP in 70 PRP how many you can send
that's what we are going to calculate
okay simple 70 okay and this number is
basically denoted by G again coming from
the standard okay the total number of
bits which can be
transmitted okay for this allocation
which is done to a user G what is this
how
many in one uh prb how many resource
elements or subar carriers okay name for
this 160 to and how many bits you can
transmit on each sub carrier or resource
element because it is 16 quam modulation
okay using 16 quam you can
transmit four bits on one resource
element we understand this right if it
is qpsk you can using one symbol you can
transmit two bits if it is 16 quam you
can transmit four bits and on each sub
carrier you can transmit a symbol one
symbol correct okay so one symbol can
carry
four bits because it is 16 qu and how
many such sub carriers are there 162 in
one prb and how many such prvs are there
70 this is a total number of bits which
can be transmitted using this using the
allocation which is made to this user
and what are this 70 prps using this
MCS right this is what can be
transmitted so total number of segmented
code blocks how many many four Cal to
four okay so these are the total number
of bits you can send over this
assignment okay and number of bits
allowed to be sent for each segmented
code block that is denoted by E how many
it will be these are the total number of
bits right so per code block how many
you can transmit G by
C right okay because you need to Transit
all the four code blocks so what is this
1 1 3 4 0 right okay understood the
sequence
okay now for our example which we are
taking how much was the input length
Okay how much is the size of this
segmented code block
7744 okay and how much was the output
length 66 into z c which is
this right okay so this and that's what
we saw mother cord rate is 1x3
7744 by this number gives you
1x3 correct now see
this how many
bits you are generating using this code
rate 23 232 this ldpc and cod or
output correct and how many bits you are
allowed to send per code block 1 1 3 4 0
we understand this okay and what is
actually happening here you are
generating more number of bits then what
you can actually send okay and the
reason should be clear to us what is
this the code rate the mother code rate
which you are using is 1x3 okay so what
is happening for every bit you are
generating two parity bits what is the
code rate your the user has
asked 6 okay right that's actually close
to 2x3 right okay so what does that tell
you that code rate instead of for two
message bit you should generate only
one par bit
approximately right okay but you
generating two parity bit for one
message bit which essentially means that
you generating more par bits than what
you could actually what the user has
asked for or what you could actually
send so what do you need to do you need
to drop these parity bits at the
transmitter and that's what is rate
matching okay and by dropping these
parity bits what are we doing we are
converting a lower code rate to higher
code rate okay fine because here you are
generating extra par bits so the common
way of generating a higher code rate
from a lower code rate is you drop these
parity bits and the technical name
for this process is called punching okay
so you puncher the
bits right and now we see that okay
right so actual rate by considering
number of bits allowed
for E segmented code block which is 11
13 40 these are the E this is the number
of bits which is allowed to send we just
calculated here okay now look at this so
I'm instead of K I'm writing K Dash here
okay why because K contains filler bits
also right filler bits are not actual
data right and I'll show you those
filler bits get dropped at the
transmitter
okay because they are dummy bits and
those dummy bits were inserted for the
ldpc and goer to
work right okay so what's happening here
so this is the number of bit which is
allowed to send k What is the
relationship between K Das and
K what is this okay K is
7744 right K Dash is
basically you are how are you getting K
you are taking K Dash and adding 672
filler bits to it okay so what is K Das
this divided by E okay so so this should
be divided by E I missed this e here
okay which is 7072 by 11 1340 what is
this code
rate
623 okay you'll see that it's not
exactly 64 it's okay okay user has asked
for 64 it's not guaranteed that he'll
get 64
you shouldn't give the user more than
64 that we
understand correct okay right so what
are we ensuring here we are ensuring a
code rate close to what user has asked
and if you carefully see okay this K
Dash contains
24 CRC bits also so if you remove them
if you subtract them further it slightly
go lower than 623 also okay so I just
for the sake of like convenience I did
not subtract it okay but the actual Cod
rate is that right because that's the
message bit divided by the number of
encoded bits you are sending okay so
it's 623 so what is this rate match
supposed to do in this case it is
supposed to drop the bits right and the
transmitter okay right and how this is
handled at the receiver we'll see later
okay so what is its equalent module at
the the receiver that's what I'm going
to teach you also okay but hang on so
this is what we are trying to understand
here okay so we calculating the rate by
removing 672 filler bits that's what we
have done okay so you're getting
623 okay now so this is the idea of rate
matcher okay principles behind designing
our rate matcher to summarize why this
rate matching is used you are the ldpc
en coder is generating at the mother
code rate of
1x3 which is not the same as the one
asked by the user user can ask for a Cod
rate Which is higher than 1x3 or lower
than 1x3 the example which we are taking
user has asked for a code rate higher
than 1x3 okay and what is happening here
in this these slides what we have seen
is that the transmitter needs to drop
the bits to gener rate a code rate Which
is higher than the mother code rate okay
that is the idea and why it is being
done like this because of the to
simplify the
implementation that's all otherwise in
principle there can be different ldpc
encoder for different rates nobody is
stopping us from doing that okay but
then the mobile will become costly run
out of battery very soon okay because
processing power involves battery it
become costly also don't want to do
that okay so with this in mind let's see
how it is done in the
standard fine okay let's go ahead and
see that so this rate matching module is
one task is basically to match the code
rate okay and you will see that it has I
don't it has another task also which is
the implementation of hybrid arq
okay right if you remember we when we
were talking about hybrid arq we spoke
about different RVs redundancy versions
what were those redundancy versions
different par
bits correct if it is Chase combining
then you retransmit the old bits if it
is incremental redundancy what do you do
you transmit fresh sets of fresh set of
par bits you'll see that that also it
allows us to send do that
okay right so it's a nicely done
framework okay so what happens here
is what module it succeeds the ldpc ldpc
encoder correct okay so what am I saying
here this ldpc encoder is directly
written in a circular buffer what is the
circular buffer this okay you forget
what each one of this is the inner Arrow
okay and what is this rv0 rv1 I'll all
all this I'm going to tell you right so
this is a pictorial representation of a
rate matching block okay and what is
this is a memory that's all at the end
of the day okay what are we doing ldpc
encoder has generated certain bits we
are supposed to be reading those bits
and dropping certain number of par
bits okay that's what it is supposed to
be doing now so this is a circular
buffer circular buffer is basically if
you reach the end of the buffer you
start reading from the beginning from
the starting location that's what a
circular buffer okay so you see this
they're not disconnected and
disconnected to the beginning okay
correct so now this ldpc encoded is
directly written in a circular
buffer bits are red from the buffer
starting from an offset position and
increasing the bit index okay so what
are we saying here what is this bullet
saying that you write this into all
those bits
rate 1x3 okay K bits which you have
generated okay you write all of them in
the circular
buffer okay fine okay sorry not K it
will be n Bits K is the input LPC
encoder will generate n Bits n is what
66 z
c correct okay so this the length of
this buffer will be
n okay right so so what happens here is
if it is let's say the first fresh
transmission we and we are transmitting
rv0 redundancy version zero okay right
so what will happen here is you start
reading from the beginning of the
buffer okay and how many bits you are
going to
read what is
this this is
e what is e e is equal to G by C
remember
this correct okay so you're supposed to
be reading only e e bits each for each
segmented code block you are allowed to
transmit only e bits okay right so so
what is happening length of the circular
buffer is
n and you will read
only e bits because that's all you are
allowed to
transmit okay so that's what we are
saying so you start reading
this right you're
done fine okay now these bits are
transmitted they undergo rest of the
transmit processing also but at the
receiver if it goes if it is this packet
or this code block is detected fine
right then you will not trans
retransmitted transmitter will not ret
transmited correct okay so you it's
done right okay now if it is if the
receiver is not able to decode it and it
sends a knack what will happen Okay the
transmitter decides to
send another redundancy
version okay right so it will come back
transmitter will come back to the same
circular buffer so these bits will be
stored in the transmitter
memory okay what happen here is so
redundancy version one rv1 okay so it
starts from here what is happening here
you sending some old bits and some fresh
parity bits right then the this is
hybrid arq has kicked in okay the
receiver sends a knack then rv2 will be
transmitted and the pro the this begins
from here rv2 position begins from here
read this correct okay and this is e
he'll send that okay then if rv3 then it
it'll happen like this see this now the
circular buffer is kicking in right okay
because you'll have to read few bits the
new bits and some of the old
bits correct okay right so what is
happening here the first when I send the
first
RV I'm sending only e bits the rate is
matched correct okay and then when the
Knack is sent then we are reducing the
rate if I send the same RV then I'm not
reducing the rate I'm increasing the SNR
that's the chase
combining if it is
rv1 I am using the IR flavor of the
hybrid RQ so nice everything
get done in the same block okay right so
if the bit index reaches the maximum
number the bit index res to the first
bit in the buffer that's what is
happening over here that's the circular
buffer part okay redundancy version
specify the starting point in the
circular buffer so what is how what is
hbd arq implementation reducing to it's
only reducing to a starting point in the
rate matching buffer that's
all correct so if it is simple case to
understand if it is you do Chase what
will you do at the receiver you'll
simply add these bits if it is this then
you'll have to do something more
sophisticated I'll teach you that
okay because you're transmitting some
old bits and some new bits so what do
you do some old bits you add certain new
bits you leave the message right so
that's what it is actually we have
understood how it is done okay so
different RVs are specified by different
starting points we understand that
because different starting points
Implement different versions of or
different flavors of hybrid
arq correct okay rv0 start from rv0
Chase all other RVs will Implement
incremental redundency
so what are this usually rv0 is selected
for initial transmission to send as many
systematic bits as possible and this is
again the idea of ldpc this is a
constraint of ldpc because ldpc decod
requires maximum number of message bits
to successfully decode the message okay
we have understood that in great detail
okay right and scheder can choose
different RV to support CH and
incremental
redundancy this is
something you should know there's an
additional piece of information that
systematic bits are also punched okay
which means that rv0 will not start from
from the beginning I've shown it here
okay be standard drops certain number of
message bits also okay again people have
realized that this kind of if you
puncher these systematic bets it leads
to better performance at high code rates
okay okay ldpc decoder will give a
better performance they're all coding
related ideas that's but you should know
why this is being done if you want to
read about it there's something more in
this paper okay right so how many bit it
punches punches two zc bits from the
encoded output of the message bits what
I'm saying here rv0 will not begin from
the beginning it they begin with the
offset fine okay right
so and then this
rate matching modules calculate this
redundancy version starting point also
okay because who tells you this rv0 rv1
that's also a part of the rate matching
module I'll give you that formula at the
end of this class okay so and what is it
doing it basically calculat number of
bits to be read for each of the rate 1x3
encoded block that e is equal to G by C
calculation is also a part of this rate
matching
module okay fine we get that okay
so what is this our that's how it is
implemented this the standard
implementation I'll give you the
instructions also in the next class how
it is implemented okay so this is our
example we come back to our example
which we are taking how many code blocks
segmented code block Cal to
4 what is this 1 13 40 which is e this
is the number of bits which is allowed
to be transmitted for each code block so
what happens what is the length of the
circular
buffer that's what I said n correct n
will be the length of the circular
buffer how many bits you are allowed to
read 1 1 3 40 so this is a rv0 you read
these many bits that's all you leave all
these bits as such that's what was a
circular buffer right instead of writing
it showing in a circular manner I've
like unfolded it and I'm showing you
like this right so if it reaches here
it'll go back but in this case it is not
and it'll stop here so this is the first
rate Mash block
same you look at the second rate match
block second encoded output you read how
many bits 1 1 3 4 0 right so this is a
second rate match block similarly Third
Rate match block how many then there'll
be fourth
one correct okay so there will be four
different circular buffers for four
different code
block
correct is this clear
right okay so that's what is happening
here so that now this is the this is how
our positions are calculated okay this
is the final slide of this class so you
see this NCB what is NCB is the length
of the circular buffer it is set to n in
our case okay these are the some numbers
you here for ldpc base graph this is we
are setting it to zero here standard
there is another flavor it will not be
as I said some certain bits are dropped
in the beginning also okay so you see
this Here RV ID is starting from zero
okay and this is a second ldpc base
graph okay two ldpc encoders are there
correct okay and for rv1 for RV index K
not is equal to Zer so the it will start
from the beginning okay whatever I
mentioned about dropping those bits that
also happens okay but here for this this
is r index is set to zero okay rest all
indexes you'll see the first one begins
from 5 984 second one K2 Begins for
11616 and this Begins for 1 19712 this
is the formula that's how it is
calculated okay right and this helps us
in implementing the hybrid arq so rest
we'll take another example in the next
class and we'll see how
basically if the receiver has asked for
a Cod rate lower than rate 1x3 how does
rate matching help in that case thank
you
[Music]
[Music]
[Music]
