MATLAB: Does PRACH preamble 4 not show any data for TDD duplexing

LTE Toolbox

I would like to modify the example given in the 'lteprach' documentation page:
such that it uses preamble format 4 and TDD duplexing mode. However, when I try simply setting:
chs.Format = 4;
ue.DuplexMode = 'TDD';
I get nothing but zeros. Why is this the case?

Best Answer

On the 'Random Access Channel' documentation page, you can see details regarding each of the preamble formats:
There, you can see the following note which specifically addresses TDD in combination with preamble format 4:
"Note that Preamble Format 4 is only applicable for TDD in special subframes (subframe 1 or 6) and with Special Subframe Configuration that results in UpPTS with 2 symbols duration i.e. the Preamble Format 4 PRACH sits in UpPTS"
If you take that information and navigate to the 'FDD and TDD Duplexing' doc page, you can get a more complete picture of what parameters need to be set:
On that page, there is a table which shows that only SSC values 5 and above result in UpPTS with 2 symbols:
Based on the note addressing the limitations for Preamble Format 4, you must make sure that the SSC is set to a value between 5 and 9 rather than the default value of '0' which is used in the example. Otherwise, our UpPTS will not be of symbol length 2. 
Then, you must set the subframe number to one that corresponds to a special subframe. This means 1 (for all TDD configurations) or 6 (for 0,1,2, or 6) as per the following table.
In summary, you can set the following values: (for example)
ue.DuplexMode = 'TDD';
ue.TDDConfig = 1;
chs.Format = 4;
ue.NSubframe = 1;
ue.SSC = 6;
which will generate a valid PRACH.
To apply this to the example on the page:
ue.NULRB = 6;
chs.HighSpeed = 0;
chs.CyclicShiftIdx = 0;
chs.FreqOffset = 0;
chs.SeqIdx = 0;
chs.PreambleIdx = [ 0 ];
ue.DuplexMode = 'TDD';
ue.TDDConfig = 1;
ue.SSC = 6;
chs.Format = 4;
ue.NSubframe = 1;
[prachSym,prachInfo] = ltePRACH(ue,chs);
figure; plot(abs(prachSym))