Matlab Toolbox - 4G/LTE |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PRACH
Description/explanation will come later !
< PRACH Configuration Setting and Retrieving PRACH Info >
ue.DuplexMode = 'FDD'; ue.NULRB = 6; prach_config.Format = 0; prach_config.HighSpeed = 0; prach_config.CyclicShiftIdx = 0; prach_config.FreqOffset = 0; prach_config.SeqIdx = 0; prach_config.PreambleIdx = [ 0 ];
[prach_sym,prachInfo] = ltePRACH(ue,prach_config)
< PRACH Symbol >
ue.DuplexMode = 'FDD'; ue.NULRB = 6; prach_config.Format = 0; prach_config.HighSpeed = 0; prach_config.CyclicShiftIdx = 0; prach_config.FreqOffset = 0; prach_config.SeqIdx = 0; prach_config.PreambleIdx = [ 0 ];
[prach_sym,prachInfo] = ltePRACH(ue,prach_config); prach_arrayIndex = 0:length(prach_sym)-1; prach_clip = 1:62;
subplot(2,3,1); plot(real(prach_sym),imag(prach_sym),'ro','MarkerFaceColor',[1 0 0]);axis([-0.2 0.2 -0.2 0.2]); title('Constellation'); subplot(2,3,[2 3]); plot(prach_arrayIndex,real(prach_sym),'ro-',prach_arrayIndex,imag(prach_sym),'bo-');ylim([-0.2 0.2]); xlim([0 6000]); title('PRACH index vs PRACH value. Red -> real, Blue -> Imaginary');
subplot(2,3,4); plot(real(prach_sym(prach_clip)),imag(prach_sym(prach_clip)),'ro','MarkerFaceColor',[1 0 0]); axis([-0.2 0.2 -0.2 0.2]); title('Constellation'); subplot(2,3,[5 6]); plot(prach_arrayIndex(prach_clip),real(prach_sym(prach_clip)),'ro-', prach_arrayIndex(prach_clip),imag(prach_sym(prach_clip)),'bo-'); xlim([0 max(prach_arrayIndex(prach_clip))]);ylim([-0.2 0.2]); title('PRACH index vs PRACH value. Red -> real, Blue -> Imaginary');
ue.DuplexMode = 'FDD'; ue.NULRB = 6;
prach_config1.Format = 0; prach_config1.HighSpeed = 0; prach_config1.CyclicShiftIdx = 0; prach_config1.FreqOffset = 0; prach_config1.SeqIdx = 0; prach_config1.PreambleIdx = [ 22 ];
prach_config2.Format = 0; prach_config2.HighSpeed = 0; prach_config2.CyclicShiftIdx = 0; prach_config2.FreqOffset = 0; prach_config2.SeqIdx = 0; prach_config2.PreambleIdx = [ 52 ];
prach_config3.Format = 0; prach_config3.HighSpeed = 0; prach_config3.CyclicShiftIdx = 0; prach_config3.FreqOffset = 0; prach_config3.SeqIdx = 0; prach_config3.PreambleIdx = [ 24 ];
[prach_sym1,prachInfo1] = ltePRACH(ue,prach_config1); [prach_sym2,prachInfo2] = ltePRACH(ue,prach_config2); [prach_sym3,prachInfo3] = ltePRACH(ue,prach_config3); prach_arrayIndex = 0:length(prach_sym1)-1; prach_clip = 1:100;
subplot(3,3,1); plot(real(prach_sym1(prach_clip)),imag(prach_sym1(prach_clip)),'ro','MarkerFaceColor',[1 0 0]);axis([-0.2 0.2 -0.2 0.2]); title('Constellation'); subplot(3,3,[2 3]); plot(prach_arrayIndex(prach_clip),real(prach_sym1(prach_clip)),'ro-',prach_arrayIndex(prach_clip),imag(prach_sym1(prach_clip)),'bo-');ylim([-0.2 0.2]); xlim([0 max(prach_clip)]); title('PRACH index vs PRACH value. Red -> real, Blue -> Imaginary');
subplot(3,3,4); plot(real(prach_sym2(prach_clip)),imag(prach_sym2(prach_clip)),'ro','MarkerFaceColor',[1 0 0]);axis([-0.2 0.2 -0.2 0.2]); title('Constellation'); subplot(3,3,[5 6]); plot(prach_arrayIndex(prach_clip),real(prach_sym2(prach_clip)),'ro-',prach_arrayIndex(prach_clip),imag(prach_sym2(prach_clip)),'bo-');ylim([-0.2 0.2]); xlim([0 max(prach_clip)]); title('PRACH index vs PRACH value. Red -> real, Blue -> Imaginary');
subplot(3,3,7); plot(real(prach_sym3(prach_clip)),imag(prach_sym3(prach_clip)),'ro','MarkerFaceColor',[1 0 0]);axis([-0.2 0.2 -0.2 0.2]); title('Constellation'); subplot(3,3,[8 9]); plot(prach_arrayIndex(prach_clip),real(prach_sym3(prach_clip)),'ro-',prach_arrayIndex(prach_clip),imag(prach_sym3(prach_clip)),'bo-');ylim([-0.2 0.2]); xlim([0 max(prach_clip)]); title('PRACH index vs PRACH value. Red -> real, Blue -> Imaginary');
Disclaimer ! : This page is only to show you the overall logics and visualization for various LTE physical layer channels. I haven't investigated much about verifying about the accuracy. If you think the code is not so efficient, it is 100% my fault. I haven't made any effort for effiecient code. I just tried to create code as simple as possible for the readers. As you know, easy-to-read code is not always efficient for a specific chipset. If you find any mistake in terms of accuracy, it is also very highly likely be my fault. Not the problem of Matlab tool box itself. Any comment and corrections if you find any mistake will be welcome and appreciated.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||