同步

同步有多种方式,基站和基站之间的同步可以通过GPS,空口同步,1588获取同步信号等。UE和基站之间的同步一般都是空口同步来实现的。

PSS在子帧1和子帧6的第三个符号上,SSS在子帧0和子帧5的最后一个符号上。

PSS 

PSS(Primary Synchronization Channel)是主同步信号,计算生成公式如下


在TDD和FDD中还处于不同的子帧时隙上:

中间的72个子载波,DC不占用,FDD中占用slot 0 (Subframe 0) and slot 10 (Subframe 5)

中间的72个子载波,DC不占用,TDD中占用slot 1 (Subframe 1) and slot 11 (Subframe 6),实际可以看到他是占用的特殊子帧的第3个OFDM符号(160 + 2048 + 144 + 2048 —PSS—)


在一个子帧的slot中,常规CP下,每个OFDM符号的位置的点数


由62 Zadoff Chu SequenceValues组成,在计算同步相关的过程中,需要将此62个频域样点映射到不同位置,并转换到时域占用特殊子帧的第三个OFDM符号

按照先前的公式计算,则有:



由Physical Cell ID(PCI)决定是哪一个序列,NID = PCI Mod 3,比如PCI= 61,NID = 1

下面是计算PSS symbol的


最终计算同步相关峰值计算如下:


最终频谱分析的计算的结果如图,中心频点是2360,PUCCH占10个RB,PUSCH资源全部占完:


起始PRB在20,固定24个RB的频谱分析,下面是带着0子载波的


下图是起始PRB是50,固定24个PRB的


下图是起始PRB是30,固定39个PRB的


SSS 

SSS(Secondary Synchronization Channel)是辅同步信号

Mapped to 72 active sub carriers(6 resource blocks), centered around the DC subcarrier in slot 0 (Subframe 0) and slot 10 (Subframe 5) in FDD,子帧0上的SSS序列和子帧5的SSS序列是不同的

Mapped to 72 active sub carriers(6 resource blocks), centered around the DC subcarrier in slot 1 (Subframe 0) and slot 11 (Subframe 5) in TDD,子帧0上的SSS序列和子帧5的SSS序列是不同的

由62 Scrambling Sequence (基于m-sequence)组成

用来做Downlink Frame Synchronization

关键的一个因子由Physical Cell ID决定

Matlab代码生成SSS Generation

clear all;


NID1 = 0;

NID2 = 0;

q_prime = floor(NID1/30);

q = floor(((NID1+q_prime*(q_prime+1)/2))/30);

m_prime = NID1 + q *(q+1)/2;

m0 = mod(m_prime, 31);

m1 = mod(m0 + floor(m_prime/31)+1,31);


%%%%%%%%%%%%%%%%% generate d_even() sequence %%%%%%%%%%%%%%%%

% Generate the sequence x_s() : x() for calculating s_tilda()

x_s = zeros(1,31);

x_s(1:5) = [0 0 0 0 1];


for i = 0:25

    x_s((i+5)+1) = mod(x_s(i+2+1)+x_s(i+1),2);

end;


% Generate the sequence x_c() : x() for calculating c_tilda()

x_c = zeros(1,31);

x_c(1:5) = [0 0 0 0 1];


for i = 0:25

    x_c((i+5)+1) = mod(x_c(i+3+1)+x_c(i+1),2);

end;


% Generate the sequence s_tilda()

s_tilda = zeros(1,31);

for i = 0:30

    s_tilda(i+1) = 1 - 2*x_s(i+1);

end;


% Generate the sequence c_tilda()

c_tilda = zeros(1,31);

for i = 0:30

    c_tilda(i+1) = 1 - 2*x_c(i+1);

end;


% Generate s0_m0_even()

s0_m0_even = zeros(1,31);

for n = 0:30

    s0_m0_even(n+1) = s_tilda(mod(n+m0,31)+1);

end;


% Generate c0_even()

c0_even = zeros(1,31);

for n = 0:30

    c0_even(n+1) = c_tilda(mod(n+NID2,31)+1);

end;


% Calculate d_even_sub0

d_even_sub0 = s0_m0_even .* c0_even;


%%%%%%%%%%%%%%%%% generate d_odd() sequence %%%%%%%%%%%%%%%%

% Generate the sequence x_s() : x() for calculating s_tilda()

x_z = zeros(1,31);

x_z(1:5) = [0 0 0 0 1];


for i = 0:25

    x_z((i+5)+1) = mod(x_z(i+4+1) + x_z(i+2+1) + x_z(i+1+1)+ x_z(i+1),2);

end;


% Generate the sequence z_tilda()

z_tilda = zeros(1,31);

for i = 0:30

    z_tilda(i+1) = 1 - 2*x_z(i+1);

end;


% Generate s1_m1_odd()

s1_m1_odd = zeros(1,31);

for n = 0:30

    s1_m1_odd(n+1) = s_tilda(mod(n+m1,31)+1);

end;


% Generate c1_odd()

c1_odd = zeros(1,31);

for n = 0:30

    c1_odd(n+1) = c_tilda(mod(n+NID2+3,31)+1);

end;


% Generate z1_m0_odd()

z1_m0_odd = zeros(1,31);

for n = 0:30

    z1_m0_odd(n+1) = z_tilda(mod(n+mod(m0,8),31)+1);

end;


% Calculate d_odd_sub0

d_odd_sub0 = s1_m1_odd .* c1_odd .* z1_m0_odd;


% Calculate d_sub0

d_sub0 = zeros(1,62);

d_sub0(1:2:end-1) = d_even_sub0;

d_sub0(2:2:end) = d_odd_sub0;


subplot(1,5,1);

plot(real(d_sub0),imag(d_sub0),'ro','MarkerFaceColor',[1 0 1]);axis([-1.5 1.5 -1.5 1.5]);

subplot(1,5,[2 5]);

plot(real(d_sub0),'ro-');xlim([0 length(d_sub0)]);


你可能感兴趣的:(同步)